Message ID | 20230308025908.21491-2-zhuyinbo@loongson.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp106899wrd; Tue, 7 Mar 2023 19:11:54 -0800 (PST) X-Google-Smtp-Source: AK7set9hXDqE3K0sB3xIXzHmzxZ0mJImsWu8hIOXaH8LqhxTKZFtTrFvixL5oJA0g5eCT4WOPxYo X-Received: by 2002:a17:907:6ea6:b0:8b1:7dea:cc40 with SMTP id sh38-20020a1709076ea600b008b17deacc40mr20266118ejc.9.1678245114508; Tue, 07 Mar 2023 19:11:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678245114; cv=none; d=google.com; s=arc-20160816; b=zV87FwuwrCEoGoSSGQIHDVbnmK4J40xZuccux79QOPUfzt5lZhDEMnbzqA+CDgrjoS qmNKeym2gwSTtGJSfQy4mEJpMNpawWP9e88NBhgCYsuHxju4tvSwFe+yEP1vQzjOQLd6 3QgyPCSfuKQCUrz16nQbKTyPGznHhc2WJH27KZNa1TxNpUvvCstSCFGAif3236Nx/eXH +cZNL3mphXO+w1YkzqhSjfys1Q3p83NqSA4O73Ca0hS9PFGKNg2MBvwqb2RYLKFCDHpL I79MbdhR75rH5UT+ouGftK8kf5v4aFe1HqPhTagbzSR5/+/EMv1mYpisPQeAYKimWc09 9Hdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=N1Vss0ebwfw1cR0C1+jSU8P9R4X/JDywrjorBvWuoWE=; b=KtoWTG4uQyWTNDRBri3j9d6BzmU+/z4c9jfkppif2YicGmjGJV7n8MlGayXZ5IuxBr qc9hgTbKCyR/lFWco87H3dliCCGPMECnwfXc7wHjV3nUywRzVg0nTqdP86s24Q1DAS3P eL9VKLz+cUW00GO2HKOScef5/czDXmwa9WxttDGwDJOERPVjm8N2caW6B2IdH7lvrK3V JR7VOMUuDyeU4JGpyLPEfZFXGEPmrm5LY537N3xREyxFoOofb9haJK+ZBsus3MsvSHn5 vC//GDDhqhh9L2cgGJl5a4S9xNw23L5hhveieDLGVlCOLFgKI9/eHl2N8EuejcMj4719 A1lQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u7-20020a1709060b0700b008b17cc2e38asi11893025ejg.582.2023.03.07.19.11.30; Tue, 07 Mar 2023 19:11:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229885AbjCHC7V (ORCPT <rfc822;toshivichauhan@gmail.com> + 99 others); Tue, 7 Mar 2023 21:59:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229844AbjCHC7S (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 7 Mar 2023 21:59:18 -0500 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5C33CA3348; Tue, 7 Mar 2023 18:59:16 -0800 (PST) Received: from loongson.cn (unknown [10.20.42.35]) by gateway (Coremail) with SMTP id _____8AxJFwD+gdkN7IJAA--.12599S3; Wed, 08 Mar 2023 10:59:15 +0800 (CST) Received: from user-pc.202.106.0.20 (unknown [10.20.42.35]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Bxyub9+QdkGeNOAA--.37836S3; Wed, 08 Mar 2023 10:59:14 +0800 (CST) From: Yinbo Zhu <zhuyinbo@loongson.cn> To: Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jianmin Lv <lvjianmin@loongson.cn>, wanghongliang@loongson.cn, Liu Peibao <liupeibao@loongson.cn>, loongson-kernel@lists.loongnix.cn, Yinbo Zhu <zhuyinbo@loongson.cn> Subject: [PATCH v1 1/2] dt-bindings: spi: add loongson spi Date: Wed, 8 Mar 2023 10:59:07 +0800 Message-Id: <20230308025908.21491-2-zhuyinbo@loongson.cn> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230308025908.21491-1-zhuyinbo@loongson.cn> References: <20230308025908.21491-1-zhuyinbo@loongson.cn> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8Bxyub9+QdkGeNOAA--.37836S3 X-CM-SenderInfo: 52kx5xhqerqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBjvJXoW7Cr43Aw47ur17Aw1rCrWUXFb_yoW8tr47pF nrCrs7GFWIqF17Aws3Ka48Cw4rZr95C3ZrXFW2yw12kF98K3W5Za13KF1UZa13AF18XFZr ZFWIkr4UK3WUXr7anT9S1TB71UUUUUJqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU b38Fc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3wAFIxvE14AKwVWUXVWUAwA2ocxC64 kIII0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK6xIIjxv20xvE14v26ryj6F1UM28E F7xvwVC0I7IYx2IY6xkF7I0E14v26r4j6F4UM28EF7xvwVC2z280aVAFwI0_Gr1j6F4UJw A2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Gr1j6F4UJwAaw2AFwI0_Jrv_JF1le2I262IYc4CY 6c8Ij28IcVAaY2xG8wAqjxCEc2xF0cIa020Ex4CE44I27wAqx4xG64xvF2IEw4CE5I8CrV C2j2WlYx0E2Ix0cI8IcVAFwI0_JF0_Jw1lYx0Ex4A2jsIE14v26r4j6F4UMcvjeVCFs4IE 7xkEbVWUJVW8JwACjcxG0xvY0x0EwIxGrwCF04k20xvY0x0EwIxGrwCF04k20xvE74AGY7 Cv6cx26rWl4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1l4IxYO2xFxVAFwI0_Jrv_JF1lx2IqxVAq x4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r 43MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_JFI_Gr1lIxAIcVC0I7IYx2IY6xkF 7I0E14v26r4j6F4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxV W8JVWxJwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjxU c4EEUUUUU X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759767549056398493?= X-GMAIL-MSGID: =?utf-8?q?1759767549056398493?= |
Series |
spi: loongson: add bus driver for the loongson spi
|
|
Commit Message
Yinbo Zhu
March 8, 2023, 2:59 a.m. UTC
Add the Loongson platform spi binding with DT schema format using
json-schema.
Signed-off-by: Yinbo Zhu <zhuyinbo@loongson.cn>
---
.../bindings/spi/loongson,ls-spi.yaml | 47 +++++++++++++++++++
MAINTAINERS | 6 +++
2 files changed, 53 insertions(+)
create mode 100644 Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml
Comments
On 08/03/2023 03:59, Yinbo Zhu wrote: > Add the Loongson platform spi binding with DT schema format using > json-schema. > > Signed-off-by: Yinbo Zhu <zhuyinbo@loongson.cn> > --- > .../bindings/spi/loongson,ls-spi.yaml | 47 +++++++++++++++++++ > MAINTAINERS | 6 +++ > 2 files changed, 53 insertions(+) > create mode 100644 Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml Filename matching the compatible. > > diff --git a/Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml b/Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml > new file mode 100644 > index 000000000000..8a13a96b3818 > --- /dev/null > +++ b/Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml > @@ -0,0 +1,47 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > + > +%YAML 1.2 > +--- > +$id: "http://devicetree.org/schemas/spi/loongson,ls-spi.yaml#" > +$schema: "http://devicetree.org/meta-schemas/core.yaml#" Drop the quotes. What was the base of your code here? > + > +title: Loongson SPI controller > + > +maintainers: > + - Yinbo Zhu <zhuyinbo@loongson.cn> > + > +allOf: > + - $ref: /schemas/spi/spi-controller.yaml# > + > +properties: > + compatible: > + const: loongson,ls2k-spi > + > + reg: > + maxItems: 1 > + > + clocks: > + maxItems: 1 > + > + clock-names: > + const: boot Drop clock-names, not needed for single entry. > + > +required: > + - compatible > + - reg > + - clocks > + - clock-names > + > +unevaluatedProperties: false Best regards, Krzysztof
On Wed, 08 Mar 2023 10:59:07 +0800, Yinbo Zhu wrote: > Add the Loongson platform spi binding with DT schema format using > json-schema. > > Signed-off-by: Yinbo Zhu <zhuyinbo@loongson.cn> > --- > .../bindings/spi/loongson,ls-spi.yaml | 47 +++++++++++++++++++ > MAINTAINERS | 6 +++ > 2 files changed, 53 insertions(+) > create mode 100644 Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13): yamllint warnings/errors: dtschema/dtc warnings/errors: Error: Documentation/devicetree/bindings/spi/loongson,ls-spi.example.dts:22.28-29 syntax error FATAL ERROR: Unable to parse input tree make[1]: *** [scripts/Makefile.lib:419: Documentation/devicetree/bindings/spi/loongson,ls-spi.example.dtb] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:1512: dt_binding_check] Error 2 doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230308025908.21491-2-zhuyinbo@loongson.cn The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
在 2023/3/8 下午7:30, Krzysztof Kozlowski 写道: > On 08/03/2023 03:59, Yinbo Zhu wrote: >> Add the Loongson platform spi binding with DT schema format using >> json-schema. >> >> Signed-off-by: Yinbo Zhu <zhuyinbo@loongson.cn> >> --- >> .../bindings/spi/loongson,ls-spi.yaml | 47 +++++++++++++++++++ >> MAINTAINERS | 6 +++ >> 2 files changed, 53 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml > Filename matching the compatible. loongson,ls-spi.yaml is for ls2k-spi and ls7a-spi, I will add following desription: properties: compatible: enum: - loongson,ls2k-spi - loongson,ls7a-spi > >> diff --git a/Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml b/Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml >> new file mode 100644 >> index 000000000000..8a13a96b3818 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml >> @@ -0,0 +1,47 @@ >> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >> + >> +%YAML 1.2 >> +--- >> +$id: "http://devicetree.org/schemas/spi/loongson,ls-spi.yaml#" >> +$schema: "http://devicetree.org/meta-schemas/core.yaml#" > Drop the quotes. What was the base of your code here? okay, I will drop the quotes. and I don't got it about the code base that you said. you meaning is advice me add a line as follows ? allOf: - $ref: /schemas/spi/spi-controller.yaml# > >> + >> +title: Loongson SPI controller >> + >> +maintainers: >> + - Yinbo Zhu <zhuyinbo@loongson.cn> >> + >> +allOf: >> + - $ref: /schemas/spi/spi-controller.yaml# >> + >> +properties: >> + compatible: >> + const: loongson,ls2k-spi >> + >> + reg: >> + maxItems: 1 >> + >> + clocks: >> + maxItems: 1 >> + >> + clock-names: >> + const: boot > Drop clock-names, not needed for single entry. if drop the clock-names entry, the yaml file will compile fail. root@user-pc:/home/user/workspace/test/code/www.kernel.org/linux# make DT_CHECKER_FLAGS=-m dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml LINT Documentation/devicetree/bindings CHKDT Documentation/devicetree/bindings/processed-schema.json SCHEMA Documentation/devicetree/bindings/processed-schema.json DTEX Documentation/devicetree/bindings/spi/loongson,ls-spi.example.dts DTC_CHK Documentation/devicetree/bindings/spi/loongson,ls-spi.example.dtb /home/user/workspace/test/code/www.kernel.org/linux/Documentation/devicetree/bindings/spi/loongson,ls-spi.example.dtb: spi@1fff0220: Unevaluated properties are not allowed ('clock-names' was unexpected) From schema: /home/user/workspace/test/code/www.kernel.org/linux/Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml root@user-pc:/home/user/workspace/test/code/www.kernel.org/linux# > >> + >> +required: >> + - compatible >> + - reg >> + - clocks >> + - clock-names >> + >> +unevaluatedProperties: false > > Best regards, > Krzysztof
On 09/03/2023 03:08, zhuyinbo wrote: > > 在 2023/3/8 下午7:30, Krzysztof Kozlowski 写道: >> On 08/03/2023 03:59, Yinbo Zhu wrote: >>> Add the Loongson platform spi binding with DT schema format using >>> json-schema. >>> >>> Signed-off-by: Yinbo Zhu <zhuyinbo@loongson.cn> >>> --- >>> .../bindings/spi/loongson,ls-spi.yaml | 47 +++++++++++++++++++ >>> MAINTAINERS | 6 +++ >>> 2 files changed, 53 insertions(+) >>> create mode 100644 Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml >> Filename matching the compatible. > > loongson,ls-spi.yaml is for ls2k-spi and ls7a-spi, I will add following > desription: > > > properties: > compatible: > enum: > - loongson,ls2k-spi > - loongson,ls7a-spi OK then. >> >>> diff --git a/Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml b/Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml >>> new file mode 100644 >>> index 000000000000..8a13a96b3818 >>> --- /dev/null >>> +++ b/Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml >>> @@ -0,0 +1,47 @@ >>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >>> + >>> +%YAML 1.2 >>> +--- >>> +$id: "http://devicetree.org/schemas/spi/loongson,ls-spi.yaml#" >>> +$schema: "http://devicetree.org/meta-schemas/core.yaml#" >> Drop the quotes. What was the base of your code here? > > okay, I will drop the quotes. and I don't got it about the code base > that you said. > > you meaning is advice me add a line as follows ? I meant, from which other file did you copy it? >>> + >>> + clock-names: >>> + const: boot >> Drop clock-names, not needed for single entry. > > if drop the clock-names entry, the yaml file will compile fail. Obviously you have to also drop it from DTS and driver... Best regards, Krzysztof
在 2023/3/9 下午2:23, Krzysztof Kozlowski 写道: > On 09/03/2023 03:08, zhuyinbo wrote: >> 在 2023/3/8 下午7:30, Krzysztof Kozlowski 写道: >>> On 08/03/2023 03:59, Yinbo Zhu wrote: >>>> Add the Loongson platform spi binding with DT schema format using >>>> json-schema. >>>> >>>> Signed-off-by: Yinbo Zhu <zhuyinbo@loongson.cn> >>>> --- >>>> .../bindings/spi/loongson,ls-spi.yaml | 47 +++++++++++++++++++ >>>> MAINTAINERS | 6 +++ >>>> 2 files changed, 53 insertions(+) >>>> create mode 100644 Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml >>> Filename matching the compatible. >> loongson,ls-spi.yaml is for ls2k-spi and ls7a-spi, I will add following >> desription: >> >> >> properties: >> compatible: >> enum: >> - loongson,ls2k-spi >> - loongson,ls7a-spi > OK then. I was to explain why that yaml was name as "loongson,ls-spi.yaml" rather than "loongson,ls2k-spi.yaml" because that need consider about yaml filename to match "loongson,ls2k-spi" and "loongson,ls7a-spi". > >>>> diff --git a/Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml b/Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml >>>> new file mode 100644 >>>> index 000000000000..8a13a96b3818 >>>> --- /dev/null >>>> +++ b/Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml >>>> @@ -0,0 +1,47 @@ >>>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >>>> + >>>> +%YAML 1.2 >>>> +--- >>>> +$id: "http://devicetree.org/schemas/spi/loongson,ls-spi.yaml#" >>>> +$schema: "http://devicetree.org/meta-schemas/core.yaml#" >>> Drop the quotes. What was the base of your code here? >> okay, I will drop the quotes. and I don't got it about the code base >> that you said. >> >> you meaning is advice me add a line as follows ? > I meant, from which other file did you copy it? okay, but I maybe forgot it, I should be refer other spi yaml file. > >>>> + >>>> + clock-names: >>>> + const: boot >>> Drop clock-names, not needed for single entry. >> if drop the clock-names entry, the yaml file will compile fail. > Obviously you have to also drop it from DTS and driver... drop clock-names should be not affect my driver, but I notice other lots of arm64 platform dts was keep clock-names and clock in dts when use grep search "clock-names". [zhuyinbo@localhost www.kernel.org]$ grep -rns "clock-names" arch/arm64/ arch/arm64/boot/dts/sprd/sc9863a.dtsi:280: clock-names = "apb_pclk"; arch/arm64/boot/dts/sprd/sc9863a.dtsi:305: clock-names = "apb_pclk"; arch/arm64/boot/dts/sprd/sc9863a.dtsi:330: clock-names = "apb_pclk"; arch/arm64/boot/dts/sprd/sc9863a.dtsi:367: clock-names = "apb_pclk"; > > > Best regards, > Krzysztof
在 2023/3/8 下午10:06, Rob Herring 写道: > On Wed, 08 Mar 2023 10:59:07 +0800, Yinbo Zhu wrote: >> Add the Loongson platform spi binding with DT schema format using >> json-schema. >> >> Signed-off-by: Yinbo Zhu <zhuyinbo@loongson.cn> >> --- >> .../bindings/spi/loongson,ls-spi.yaml | 47 +++++++++++++++++++ >> MAINTAINERS | 6 +++ >> 2 files changed, 53 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml >> > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' > on your patch (DT_CHECKER_FLAGS is new in v5.13): > > yamllint warnings/errors: > > dtschema/dtc warnings/errors: > Error: Documentation/devicetree/bindings/spi/loongson,ls-spi.example.dts:22.28-29 syntax error > FATAL ERROR: Unable to parse input tree > make[1]: *** [scripts/Makefile.lib:419: Documentation/devicetree/bindings/spi/loongson,ls-spi.example.dtb] Error 1 > make[1]: *** Waiting for unfinished jobs.... > make: *** [Makefile:1512: dt_binding_check] Error 2 > > doc reference errors (make refcheckdocs): This yaml patch need depend on https://lore.kernel.org/all/20230307115022.12846-1-zhuyinbo@loongson.cn/ , then yaml compile will be successfull. > > See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230308025908.21491-2-zhuyinbo@loongson.cn > > The base for the series is generally the latest rc1. A different dependency > should be noted in *this* patch. > > If you already ran 'make dt_binding_check' and didn't see the above > error(s), then make sure 'yamllint' is installed and dt-schema is up to > date: > > pip3 install dtschema --upgrade > > Please check and re-submit after running the above command yourself. Note > that DT_SCHEMA_FILES can be set to your schema file to speed up checking > your schema. However, it must be unset to test all examples with your schema.
On 10/03/2023 03:31, zhuyinbo wrote: > > 在 2023/3/8 下午10:06, Rob Herring 写道: >> On Wed, 08 Mar 2023 10:59:07 +0800, Yinbo Zhu wrote: >>> Add the Loongson platform spi binding with DT schema format using >>> json-schema. >>> >>> Signed-off-by: Yinbo Zhu <zhuyinbo@loongson.cn> >>> --- >>> .../bindings/spi/loongson,ls-spi.yaml | 47 +++++++++++++++++++ >>> MAINTAINERS | 6 +++ >>> 2 files changed, 53 insertions(+) >>> create mode 100644 Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml >>> >> My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' >> on your patch (DT_CHECKER_FLAGS is new in v5.13): >> >> yamllint warnings/errors: >> >> dtschema/dtc warnings/errors: >> Error: Documentation/devicetree/bindings/spi/loongson,ls-spi.example.dts:22.28-29 syntax error >> FATAL ERROR: Unable to parse input tree >> make[1]: *** [scripts/Makefile.lib:419: Documentation/devicetree/bindings/spi/loongson,ls-spi.example.dtb] Error 1 >> make[1]: *** Waiting for unfinished jobs.... >> make: *** [Makefile:1512: dt_binding_check] Error 2 >> >> doc reference errors (make refcheckdocs): > > This yaml patch need depend on > > https://lore.kernel.org/all/20230307115022.12846-1-zhuyinbo@loongson.cn/ > > , then yaml compile will be successfull. Nothing in the patch changelog (where it is preferred), not even cover letter, mention dependencies. Best regards, Krzysztof
在 2023/3/10 下午5:08, Krzysztof Kozlowski 写道: > On 10/03/2023 03:31, zhuyinbo wrote: >> 在 2023/3/8 下午10:06, Rob Herring 写道: >>> On Wed, 08 Mar 2023 10:59:07 +0800, Yinbo Zhu wrote: >>>> Add the Loongson platform spi binding with DT schema format using >>>> json-schema. >>>> >>>> Signed-off-by: Yinbo Zhu <zhuyinbo@loongson.cn> >>>> --- >>>> .../bindings/spi/loongson,ls-spi.yaml | 47 +++++++++++++++++++ >>>> MAINTAINERS | 6 +++ >>>> 2 files changed, 53 insertions(+) >>>> create mode 100644 Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml >>>> >>> My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' >>> on your patch (DT_CHECKER_FLAGS is new in v5.13): >>> >>> yamllint warnings/errors: >>> >>> dtschema/dtc warnings/errors: >>> Error: Documentation/devicetree/bindings/spi/loongson,ls-spi.example.dts:22.28-29 syntax error >>> FATAL ERROR: Unable to parse input tree >>> make[1]: *** [scripts/Makefile.lib:419: Documentation/devicetree/bindings/spi/loongson,ls-spi.example.dtb] Error 1 >>> make[1]: *** Waiting for unfinished jobs.... >>> make: *** [Makefile:1512: dt_binding_check] Error 2 >>> >>> doc reference errors (make refcheckdocs): >> This yaml patch need depend on >> >> https://lore.kernel.org/all/20230307115022.12846-1-zhuyinbo@loongson.cn/ >> >> , then yaml compile will be successfull. > Nothing in the patch changelog (where it is preferred), not even cover > letter, mention dependencies. okay, I will add it in changelog in next version. > > Best regards, > Krzysztof
在 2023/3/9 下午3:22, zhuyinbo 写道: > > 在 2023/3/9 下午2:23, Krzysztof Kozlowski 写道: >> On 09/03/2023 03:08, zhuyinbo wrote: >>> 在 2023/3/8 下午7:30, Krzysztof Kozlowski 写道: >>>> On 08/03/2023 03:59, Yinbo Zhu wrote: >>>>> Add the Loongson platform spi binding with DT schema format using >>>>> json-schema. >>>>> >>>>> Signed-off-by: Yinbo Zhu <zhuyinbo@loongson.cn> >>>>> --- >>>>> .../bindings/spi/loongson,ls-spi.yaml | 47 >>>>> +++++++++++++++++++ >>>>> MAINTAINERS | 6 +++ >>>>> 2 files changed, 53 insertions(+) >>>>> create mode 100644 >>>>> Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml >>>> Filename matching the compatible. >>> loongson,ls-spi.yaml is for ls2k-spi and ls7a-spi, I will add following >>> desription: >>> >>> >>> properties: >>> compatible: >>> enum: >>> - loongson,ls2k-spi >>> - loongson,ls7a-spi >> OK then. > > I was to explain why that yaml was name as "loongson,ls-spi.yaml" > rather than "loongson,ls2k-spi.yaml" > > because that need consider about yaml filename to match > "loongson,ls2k-spi" and "loongson,ls7a-spi". > >> >>>>> diff --git >>>>> a/Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml >>>>> b/Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml >>>>> new file mode 100644 >>>>> index 000000000000..8a13a96b3818 >>>>> --- /dev/null >>>>> +++ b/Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml >>>>> @@ -0,0 +1,47 @@ >>>>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >>>>> + >>>>> +%YAML 1.2 >>>>> +--- >>>>> +$id: "http://devicetree.org/schemas/spi/loongson,ls-spi.yaml#" >>>>> +$schema: "http://devicetree.org/meta-schemas/core.yaml#" >>>> Drop the quotes. What was the base of your code here? >>> okay, I will drop the quotes. and I don't got it about the code >>> base >>> that you said. >>> >>> you meaning is advice me add a line as follows ? >> I meant, from which other file did you copy it? > okay, but I maybe forgot it, I should be refer other spi yaml file. >> >>>>> + >>>>> + clock-names: >>>>> + const: boot >>>> Drop clock-names, not needed for single entry. >>> if drop the clock-names entry, the yaml file will compile fail. >> Obviously you have to also drop it from DTS and driver... > > drop clock-names should be not affect my driver, but I notice other > lots of arm64 platform dts > > was keep clock-names and clock in dts when use grep search "clock-names". > > [zhuyinbo@localhost www.kernel.org]$ grep -rns "clock-names" arch/arm64/ > > arch/arm64/boot/dts/sprd/sc9863a.dtsi:280: clock-names = > "apb_pclk"; > arch/arm64/boot/dts/sprd/sc9863a.dtsi:305: clock-names = > "apb_pclk"; > arch/arm64/boot/dts/sprd/sc9863a.dtsi:330: clock-names = > "apb_pclk"; > arch/arm64/boot/dts/sprd/sc9863a.dtsi:367: clock-names = > "apb_pclk"; so , if you think it is okay I will keep clock-names and clock in yaml file like other platform. > >> >> >> Best regards, >> Krzysztof
On 13/03/2023 03:09, zhuyinbo wrote: > > 在 2023/3/9 下午3:22, zhuyinbo 写道: >> >> 在 2023/3/9 下午2:23, Krzysztof Kozlowski 写道: >>> On 09/03/2023 03:08, zhuyinbo wrote: >>>> 在 2023/3/8 下午7:30, Krzysztof Kozlowski 写道: >>>>> On 08/03/2023 03:59, Yinbo Zhu wrote: >>>>>> Add the Loongson platform spi binding with DT schema format using >>>>>> json-schema. >>>>>> >>>>>> Signed-off-by: Yinbo Zhu <zhuyinbo@loongson.cn> >>>>>> --- >>>>>> .../bindings/spi/loongson,ls-spi.yaml | 47 >>>>>> +++++++++++++++++++ >>>>>> MAINTAINERS | 6 +++ >>>>>> 2 files changed, 53 insertions(+) >>>>>> create mode 100644 >>>>>> Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml >>>>> Filename matching the compatible. >>>> loongson,ls-spi.yaml is for ls2k-spi and ls7a-spi, I will add following >>>> desription: >>>> >>>> >>>> properties: >>>> compatible: >>>> enum: >>>> - loongson,ls2k-spi >>>> - loongson,ls7a-spi >>> OK then. >> >> I was to explain why that yaml was name as "loongson,ls-spi.yaml" >> rather than "loongson,ls2k-spi.yaml" >> >> because that need consider about yaml filename to match >> "loongson,ls2k-spi" and "loongson,ls7a-spi". >> >>> >>>>>> diff --git >>>>>> a/Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml >>>>>> b/Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml >>>>>> new file mode 100644 >>>>>> index 000000000000..8a13a96b3818 >>>>>> --- /dev/null >>>>>> +++ b/Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml >>>>>> @@ -0,0 +1,47 @@ >>>>>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >>>>>> + >>>>>> +%YAML 1.2 >>>>>> +--- >>>>>> +$id: "http://devicetree.org/schemas/spi/loongson,ls-spi.yaml#" >>>>>> +$schema: "http://devicetree.org/meta-schemas/core.yaml#" >>>>> Drop the quotes. What was the base of your code here? >>>> okay, I will drop the quotes. and I don't got it about the code >>>> base >>>> that you said. >>>> >>>> you meaning is advice me add a line as follows ? >>> I meant, from which other file did you copy it? >> okay, but I maybe forgot it, I should be refer other spi yaml file. >>> >>>>>> + >>>>>> + clock-names: >>>>>> + const: boot >>>>> Drop clock-names, not needed for single entry. >>>> if drop the clock-names entry, the yaml file will compile fail. >>> Obviously you have to also drop it from DTS and driver... >> >> drop clock-names should be not affect my driver, but I notice other >> lots of arm64 platform dts >> >> was keep clock-names and clock in dts when use grep search "clock-names". >> >> [zhuyinbo@localhost www.kernel.org]$ grep -rns "clock-names" arch/arm64/ >> >> arch/arm64/boot/dts/sprd/sc9863a.dtsi:280: clock-names = >> "apb_pclk"; >> arch/arm64/boot/dts/sprd/sc9863a.dtsi:305: clock-names = >> "apb_pclk"; >> arch/arm64/boot/dts/sprd/sc9863a.dtsi:330: clock-names = >> "apb_pclk"; >> arch/arm64/boot/dts/sprd/sc9863a.dtsi:367: clock-names = >> "apb_pclk"; > > so , if you think it is okay I will keep clock-names and clock in yaml > file like other platform. No, it's not ok. Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml b/Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml new file mode 100644 index 000000000000..8a13a96b3818 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml @@ -0,0 +1,47 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) + +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/spi/loongson,ls-spi.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Loongson SPI controller + +maintainers: + - Yinbo Zhu <zhuyinbo@loongson.cn> + +allOf: + - $ref: /schemas/spi/spi-controller.yaml# + +properties: + compatible: + const: loongson,ls2k-spi + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + const: boot + +required: + - compatible + - reg + - clocks + - clock-names + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/clock/loongson,ls2k-clk.h> + spi0: spi@1fff0220{ + compatible = "loongson,ls2k-spi"; + reg = <0x1fff0220 0x10>; + clocks = <&clk LOONGSON2_BOOT_CLK>; + clock-names = "boot"; + #address-cells = <1>; + #size-cells = <0>; + }; diff --git a/MAINTAINERS b/MAINTAINERS index 631fac6ab555..0efb739e793f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12156,6 +12156,12 @@ S: Maintained F: Documentation/devicetree/bindings/clock/loongson,ls2k-clk.yaml F: include/dt-bindings/clock/loongson,ls2k-clk.h +LOONGSON SPI DRIVER +M: Yinbo Zhu <zhuyinbo@loongson.cn> +L: linux-spi@vger.kernel.org +S: Maintained +F: Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml + LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI) M: Sathya Prakash <sathya.prakash@broadcom.com> M: Sreekanth Reddy <sreekanth.reddy@broadcom.com>