Message ID | 20230317082950.12738-2-zhuyinbo@loongson.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp221182wrt; Fri, 17 Mar 2023 01:48:09 -0700 (PDT) X-Google-Smtp-Source: AK7set9e4BbBHJ/HP4Lvlgv0MFkyV09Hlk7jSLdUbFyV7cieyRwjZo+8J1QYId0jDPpkmqvO8omF X-Received: by 2002:a05:6a20:6914:b0:cd:fc47:dd73 with SMTP id q20-20020a056a20691400b000cdfc47dd73mr11187481pzj.2.1679042888791; Fri, 17 Mar 2023 01:48:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679042888; cv=none; d=google.com; s=arc-20160816; b=lhh4xunplYuvFH/wtHd/4/BPQ2Kl2bgQw1C3QBBk/FraC9hbZVXAeQK0OkC1omkM0o WieTyyN8kT3cg7iskfX0vgiBbtoMaldT6qoaqPpW2ITwnRhrfaSehps2Ko/tzbS37nhx Pw0mP+qKHjJNWuiPvQAzHpbhdY+j3ESGrFF1a871v5yy2BPbwkMkii36TJ/7gGTEf7I4 CSZJI8qJf7pYOmT5H2dJQOg5fRUw/8aApmx48m08Hslv8/QcRwpY3cmxtSDXPwKykjh/ WNZ+gPpur+yh+3XpFrd1gmtK03vomX0KmvraB5MMJw7wQqGBlVDyTVleunwI+POEsary sYBQ== 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=7aIQjR8bQVsRLArcbHB1RHbcdUEV/EbX5+bRxMY6DrE=; b=Rv6vceRNL0Ddl9HJwkLfciNVWHsezRd5zbKsMV8P8A0eAkXgIoz+YIK0W8fkdPKrd8 65MwHotRVxja6WkJLxFeQ4MwkU3lKaN9ycuFzJokEn41HMIRFZ7ZGv5UC0rpbY8++WyG P0lz1Yoo16blBrdcTOLA3+jLBnwTzgHSUVbM29sBofvEijn7hiV9dBHtsIxCk/+7Btyf 7T0K+XooN5e+LLSS1CDrhUFL4X/KJi97v+8FECNcd3hYSuHr7otA3rbfEXiJYA108tJn a6cxE8OzObCNPmCHr0zmE9x6BoZ6ybbWJCRt75qHoPPiHPYoPBeNrkyQc/Ue+IryINBy rWAw== 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 bs192-20020a6328c9000000b0050aeadb53casi1743250pgb.596.2023.03.17.01.47.54; Fri, 17 Mar 2023 01:48:08 -0700 (PDT) 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 S231543AbjCQIcn (ORCPT <rfc822;chrisfriedt@gmail.com> + 99 others); Fri, 17 Mar 2023 04:32:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231575AbjCQIcV (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 17 Mar 2023 04:32:21 -0400 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 34FC719137; Fri, 17 Mar 2023 01:31:03 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.35]) by gateway (Coremail) with SMTP id _____8CxjdoGJRRky0sNAA--.7788S3; Fri, 17 Mar 2023 16:29:58 +0800 (CST) Received: from user-pc.202.106.0.20 (unknown [10.20.42.35]) by localhost.localdomain (Coremail) with SMTP id AQAAf8AxT+T_JBRkaXIDAA--.15924S3; Fri, 17 Mar 2023 16:29:57 +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 v2 1/2] dt-bindings: spi: add loongson spi Date: Fri, 17 Mar 2023 16:29:49 +0800 Message-Id: <20230317082950.12738-2-zhuyinbo@loongson.cn> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230317082950.12738-1-zhuyinbo@loongson.cn> References: <20230317082950.12738-1-zhuyinbo@loongson.cn> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8AxT+T_JBRkaXIDAA--.15924S3 X-CM-SenderInfo: 52kx5xhqerqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBjvJXoW7Cr43Aw47ur17Cw4kXF17trb_yoW8uFW5pF nrCrs7GF4IqF17Aws3Ka48Cw4rZ3s5C3ZFgFW2yw1jkas8K3Z5Za13KF1DZanrAF4UXFW7 ZF92kr4UK3WUXF7anT9S1TB71UUUUUJqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU bVAFc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3wAFIxvE14AKwVWUAVWUZwA2ocxC64 kIII0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK6xIIjxv20xvE14v26ryj6F1UM28E F7xvwVC0I7IYx2IY6xkF7I0E14v26r4j6F4UM28EF7xvwVC2z280aVAFwI0_Gr1j6F4UJw A2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Cr1j6rxdM2kKe7AKxVWUXVWUAwAS0I0E0xvYzxvE 52x082IY62kv0487Mc804VCY07AIYIkI8VC2zVCFFI0UMc02F40EFcxC0VAKzVAqx4xG6I 80ewAv7VC0I7IYx2IY67AKxVWUAVWUtwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCj c4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JMxAIw28IcxkI7VAKI48JMxAIw28IcVCjz48v1s IEY20_WwCFx2IqxVCFs4IE7xkEbVWUJVW8JwCFI7km07C267AKxVWUXVWUAwC20s026c02 F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_Jw0_GF ylIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUCVW8JwCI42IY6xIIjxv20xvEc7Cj xVAFwI0_Gr0_Cr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r 1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x07jU EfOUUUUU= 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?1760604076332652458?= X-GMAIL-MSGID: =?utf-8?q?1760604076332652458?= |
Series |
spi: loongson: add bus driver for the loongson spi
|
|
Commit Message
Yinbo Zhu
March 17, 2023, 8:29 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 | 44 +++++++++++++++++++
MAINTAINERS | 6 +++
2 files changed, 50 insertions(+)
create mode 100644 Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml
Comments
On 17/03/2023 09:29, 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 | 44 +++++++++++++++++++ > MAINTAINERS | 6 +++ > 2 files changed, 50 insertions(+) > create mode 100644 Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml > > 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..936b8dc82ce8 > --- /dev/null > +++ b/Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml > @@ -0,0 +1,44 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > + Drop blank line above. > +%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: > + enum: > + - loongson,ls2k-spi > + - loongson,ls7a-spi > + > + reg: > + maxItems: 1 > + > + clocks: > + minItems: 1 I don't understand why did you change it. I did not ask for it. Best regards, Krzysztof
在 2023/3/17 下午5:15, Krzysztof Kozlowski 写道: > On 17/03/2023 09:29, 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 | 44 +++++++++++++++++++ >> MAINTAINERS | 6 +++ >> 2 files changed, 50 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml >> >> 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..936b8dc82ce8 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml >> @@ -0,0 +1,44 @@ >> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >> + > Drop blank line above. > >> +%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: >> + enum: >> + - loongson,ls2k-spi >> + - loongson,ls7a-spi >> + >> + reg: >> + maxItems: 1 >> + >> + clocks: >> + minItems: 1 > I don't understand why did you change it. I did not ask for it. > > Best regards, > Krzysztof Add clocks "minItems: 1" description is for fix yaml file compile issue.
On Fri, 17 Mar 2023 16:29:49 +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 | 44 +++++++++++++++++++ > MAINTAINERS | 6 +++ > 2 files changed, 50 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/20230317082950.12738-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 17/03/2023 11:00, zhuyinbo wrote: >>> +properties: >>> + compatible: >>> + enum: >>> + - loongson,ls2k-spi >>> + - loongson,ls7a-spi >>> + >>> + reg: >>> + maxItems: 1 >>> + >>> + clocks: >>> + minItems: 1 >> I don't understand why did you change it. I did not ask for it. >> >> Best regards, >> Krzysztof > Add clocks "minItems: 1" description is for fix yaml file compile issue. minItems: 1 is not correct, so you cannot use incorrect code to suppress some warning. This should be list the clocks or use maxItems: 1, if you have only one clock. Best regards, Krzysztof
On 17/03/2023 16:51, Krzysztof Kozlowski wrote: > On 17/03/2023 11:00, zhuyinbo wrote: >>>> +properties: >>>> + compatible: >>>> + enum: >>>> + - loongson,ls2k-spi >>>> + - loongson,ls7a-spi >>>> + >>>> + reg: >>>> + maxItems: 1 >>>> + >>>> + clocks: >>>> + minItems: 1 >>> I don't understand why did you change it. I did not ask for it. >>> >>> Best regards, >>> Krzysztof >> Add clocks "minItems: 1" description is for fix yaml file compile issue. > > minItems: 1 is not correct, so you cannot use incorrect code to suppress > some warning. This should be list the clocks or use maxItems: 1, if you > have only one clock. BTW, as Rob's bot reports, this wasn't even tested... Please test the patches before sending them. Best regards, Krzysztof
On Fri, Mar 17, 2023 at 04:51:48PM +0100, Krzysztof Kozlowski wrote: > On 17/03/2023 16:51, Krzysztof Kozlowski wrote: > > minItems: 1 is not correct, so you cannot use incorrect code to suppress > > some warning. This should be list the clocks or use maxItems: 1, if you > > have only one clock. > BTW, as Rob's bot reports, this wasn't even tested... Please test the > patches before sending them. If they're managing to see and try to fix warnings they're doing some kinds of testing, obviously they've missed something you wanted doing but there's clearly been some testing done.
在 2023/3/17 下午10:55, Rob Herring 写道: > On Fri, 17 Mar 2023 16:29:49 +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 | 44 +++++++++++++++++++ >> MAINTAINERS | 6 +++ >> 2 files changed, 50 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 Hi Rob Herring, this error happen on 22 line, this need depend on https://lore.kernel.org/all/20230307115022.12846-1-zhuyinbo@loongson.cn/ 22 clocks = <&clk LOONGSON2_BOOT_CLK>; //22 line yaml code's dtb I had add change log in cover letter patch [PATCH v2 0/2], as follows, but robot still report error What should I do next time to ensure that your robot relies on other patches before testing ? Change in v2: 1. This [PATCH v2 1/2] dt-bindings patch need depend on clk patch: https:// lore.kernel.org/all/20230307115022.12846-1-zhuyinbo@loongson.cn/ Thanks, > > doc reference errors (make refcheckdocs): > > See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230317082950.12738-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/17 下午11:51, Krzysztof Kozlowski 写道: > On 17/03/2023 11:00, zhuyinbo wrote: >>>> +properties: >>>> + compatible: >>>> + enum: >>>> + - loongson,ls2k-spi >>>> + - loongson,ls7a-spi >>>> + >>>> + reg: >>>> + maxItems: 1 >>>> + >>>> + clocks: >>>> + minItems: 1 >>> I don't understand why did you change it. I did not ask for it. >>> >>> Best regards, >>> Krzysztof >> Add clocks "minItems: 1" description is for fix yaml file compile issue. > minItems: 1 is not correct, so you cannot use incorrect code to suppress > some warning. This should be list the clocks or use maxItems: 1, if you > have only one clock. okay, I got it. thanks. > > Best regards, > Krzysztof
在 2023/3/18 上午12:14, Mark Brown 写道: > On Fri, Mar 17, 2023 at 04:51:48PM +0100, Krzysztof Kozlowski wrote: >> On 17/03/2023 16:51, Krzysztof Kozlowski wrote: >>> minItems: 1 is not correct, so you cannot use incorrect code to suppress >>> some warning. This should be list the clocks or use maxItems: 1, if you >>> have only one clock. >> BTW, as Rob's bot reports, this wasn't even tested... Please test the >> patches before sending them. > If they're managing to see and try to fix warnings they're doing some > kinds of testing, obviously they've missed something you wanted doing > but there's clearly been some testing done. Thanks your understanding ! I had test it and this patch need depend on a clock patch, and I had added this depend on description on changelog, but I don't know how do make the robot can depend on my clock patch after testing. Thanks!
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..936b8dc82ce8 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/loongson,ls-spi.yaml @@ -0,0 +1,44 @@ +# 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: + enum: + - loongson,ls2k-spi + - loongson,ls7a-spi + + reg: + maxItems: 1 + + clocks: + minItems: 1 + +required: + - compatible + - reg + - clocks + +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>; + #address-cells = <1>; + #size-cells = <0>; + }; diff --git a/MAINTAINERS b/MAINTAINERS index 25a0981c74b6..9bc2158c735d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12157,6 +12157,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>