Message ID | 20221207131731.1291517-2-william.qiu@starfivetech.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp178938wrr; Wed, 7 Dec 2022 05:23:07 -0800 (PST) X-Google-Smtp-Source: AA0mqf6Pz1RUfFH+Bt+c2fjyVPHstSRSlAM+szM6+gE3n5hyoqmdR1LVSLw5+C+f4ShdlokOa/K1 X-Received: by 2002:a17:907:c60d:b0:7bf:5fa6:b9b8 with SMTP id ud13-20020a170907c60d00b007bf5fa6b9b8mr38592448ejc.383.1670419387533; Wed, 07 Dec 2022 05:23:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670419387; cv=none; d=google.com; s=arc-20160816; b=ftdyLVeKpRTDIW/6+1DPpXbgT2j8H9/ELdNrBWWQbPEbuN3iJuU71gF7M3dMI2gxwx F74Z9qsOlDnnaH5nVsV8RvzX4hBUIZzZjU7F8rMR1+HNSIWM+yctBMKxDQou0HR4aYJl XC/PJWjqGtXez1k1fYGUmN0gwWKdTHlINvqM56lm3OJJTJPttpC35WKuObgFFI6t0C9v WeAvT12d1ZGKPGd8/dTF3I3XblJGki4ulfXumKsP0uHZZ3ZJjcDSI2eMGnRck/2nQG6F OAEouQeFxM9fjkDrUAZsLly9448AsWilOCro8Syv8ra8uA0oKj76slY8c3I7GSF2gnCP ZOQw== 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=nw5ZkAzaiySJv6Grzc5WXx89OKF8I8XwNzpSjDz0tSE=; b=HNNmEsq184wyyUxfXobdOPzTLVOO5euvoeg1iwf7uofFPcIxFXcdaITazR2ZGxAs7T 3x9pzvxCy5SZh3nprmifDbn86/11MzUWyc1aOURbdsTMB9Ct54Vz2S+5WwpEMp1/yqKj 4feEFHnT6DcVCKy67vEPskokcxIWSDnFGlfvOh6+YrsyxGFGTCFnGuJYrTedQqv9bCl/ 77B7kzJySc01gnbk0W9FPATzNMkU7wp3+vI+mTXkyTzRC/8dqhjJN8sly6cWy8MLcU8I nHKl0Tgdx3cAkku/n0Qs/SvnU320xvN4dXV6we+PR/TvlEsn4ILM2MnfNqopabKOCY1U pkRA== 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 hw9-20020a170907a0c900b007ab1b8b71a6si17369199ejc.40.2022.12.07.05.22.43; Wed, 07 Dec 2022 05:23:07 -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 S229937AbiLGNRs convert rfc822-to-8bit (ORCPT <rfc822;b08248@gmail.com> + 99 others); Wed, 7 Dec 2022 08:17:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229886AbiLGNRh (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 7 Dec 2022 08:17:37 -0500 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E4FB26E6; Wed, 7 Dec 2022 05:17:36 -0800 (PST) Received: from EXMBX166.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX166", Issuer "EXMBX166" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id AA3AB24E2AA; Wed, 7 Dec 2022 21:17:33 +0800 (CST) Received: from EXMBX068.cuchost.com (172.16.6.68) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 7 Dec 2022 21:17:33 +0800 Received: from williamqiu-virtual-machine.starfivetech.com (171.223.208.138) by EXMBX068.cuchost.com (172.16.6.68) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 7 Dec 2022 21:17:32 +0800 From: William Qiu <william.qiu@starfivetech.com> To: <linux-riscv@lists.infradead.org>, <devicetree@vger.kernel.org>, <linux-mmc@vger.kernel.org> CC: Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Jaehoon Chung <jh80.chung@samsung.com>, Ulf Hansson <ulf.hansson@linaro.org>, William Qiu <william.qiu@starfivetech.com>, <linux-kernel@vger.kernel.org> Subject: [PATCH v1 1/3] dt-bindings: mmc: Add bindings for StarFive Date: Wed, 7 Dec 2022 21:17:29 +0800 Message-ID: <20221207131731.1291517-2-william.qiu@starfivetech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221207131731.1291517-1-william.qiu@starfivetech.com> References: <20221207131731.1291517-1-william.qiu@starfivetech.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [171.223.208.138] X-ClientProxiedBy: EXCAS066.cuchost.com (172.16.6.26) To EXMBX068.cuchost.com (172.16.6.68) X-YovoleRuleAgent: yovoleflag Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS 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?1751561680012187864?= X-GMAIL-MSGID: =?utf-8?q?1751561680012187864?= |
Series |
StarFive's SDIO/eMMC driver support
|
|
Commit Message
William Qiu
Dec. 7, 2022, 1:17 p.m. UTC
Add documentation to describe StarFive
designware mobile storage host controller driver.
Signed-off-by: William Qiu <william.qiu@starfivetech.com>
---
.../bindings/mmc/starfive,jh7110-sdio.yaml | 71 +++++++++++++++++++
1 file changed, 71 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mmc/starfive,jh7110-sdio.yaml
Comments
On Wed, 07 Dec 2022 21:17:29 +0800, William Qiu wrote: > Add documentation to describe StarFive > designware mobile storage host controller driver. > > Signed-off-by: William Qiu <william.qiu@starfivetech.com> > --- > .../bindings/mmc/starfive,jh7110-sdio.yaml | 71 +++++++++++++++++++ > 1 file changed, 71 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mmc/starfive,jh7110-sdio.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: Documentation/devicetree/bindings/mmc/starfive,jh7110-sdio.example.dts:21:18: fatal error: dt-bindings/clock/starfive-jh7110.h: No such file or directory 21 | #include <dt-bindings/clock/starfive-jh7110.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[1]: *** [scripts/Makefile.lib:406: Documentation/devicetree/bindings/mmc/starfive,jh7110-sdio.example.dtb] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:1492: dt_binding_check] Error 2 doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20221207131731.1291517-2-william.qiu@starfivetech.com 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 Wed, Dec 07, 2022 at 08:19:49AM -0600, Rob Herring wrote: > > On Wed, 07 Dec 2022 21:17:29 +0800, William Qiu wrote: > > Add documentation to describe StarFive > > designware mobile storage host controller driver. > > > > Signed-off-by: William Qiu <william.qiu@starfivetech.com> > > --- > > .../bindings/mmc/starfive,jh7110-sdio.yaml | 71 +++++++++++++++++++ > > 1 file changed, 71 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/mmc/starfive,jh7110-sdio.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: > Documentation/devicetree/bindings/mmc/starfive,jh7110-sdio.example.dts:21:18: fatal error: dt-bindings/clock/starfive-jh7110.h: No such file or directory > 21 | #include <dt-bindings/clock/starfive-jh7110.h> > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Hello William, As with the other bindings that StarFive has sent out recently, including this header in the example creates a dependency on the clock/reset stuff being merged prior to the drivers for unrelated subsytems. To avoid that, you can drop the headers & definitions from these *examples* & use the numbers themselves instead. That way, the only thing that depends on the clock binding headers is the DeviceTree patch & the driver can be merged once it is ready. Thanks, Conor. > compilation terminated. > make[1]: *** [scripts/Makefile.lib:406: Documentation/devicetree/bindings/mmc/starfive,jh7110-sdio.example.dtb] Error 1 > make[1]: *** Waiting for unfinished jobs.... > make: *** [Makefile:1492: dt_binding_check] Error 2 > > doc reference errors (make refcheckdocs): > > See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20221207131731.1291517-2-william.qiu@starfivetech.com > > 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 07/12/2022 14:17, William Qiu wrote: > Add documentation to describe StarFive > designware mobile storage host controller driver. > > Signed-off-by: William Qiu <william.qiu@starfivetech.com> > --- > .../bindings/mmc/starfive,jh7110-sdio.yaml | 71 +++++++++++++++++++ > 1 file changed, 71 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mmc/starfive,jh7110-sdio.yaml > > diff --git a/Documentation/devicetree/bindings/mmc/starfive,jh7110-sdio.yaml b/Documentation/devicetree/bindings/mmc/starfive,jh7110-sdio.yaml > new file mode 100644 > index 000000000000..4f27ef3cf4f3 > --- /dev/null > +++ b/Documentation/devicetree/bindings/mmc/starfive,jh7110-sdio.yaml > @@ -0,0 +1,71 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/mmc/starfive,jh7110-sdio.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: StarFive Designware Mobile Storage Host Controller > + > +description: > + StarFive uses the Synopsys designware mobile storage host controller > + to interface a SoC with storage medium such as eMMC or SD/MMC cards. > + > +allOf: > + - $ref: "synopsys-dw-mshc-common.yaml#" Drop quotes > + > +maintainers: > + - William Qiu <william.qiu@starfivetech.com> > + > +properties: > + compatible: > + const: starfive,jh7110-sdio Why do you call it sdio if the interface is for mmc as well? > + > + reg: > + maxItems: 1 > + > + clocks: > + minItems: 1 > + items: > + - description: biu clock > + - description: ciu clock I don't think the card interface clock is optional... are you sure you have designs working without it? No clock line at all getting to the memory? > + > + clock-names: > + minItems: 1 > + items: > + - const: biu > + - const: ciu > + > + interrupts: > + maxItems: 1 > + > + starfive,sys-syscon: > + $ref: /schemas/types.yaml#/definitions/uint32-array > + description: > + The desired number of times that the host execute tuning when needed. That's not matching the property name. Missing number of items... this is anyway confusing. Why number of tuning tries is a property of DT? > + > +required: > + - compatible > + - reg > + - clocks > + - clock-names > + - interrupts > + > +unevaluatedProperties: false > + > +examples: > + - | > + #include <dt-bindings/clock/starfive-jh7110.h> > + #include <dt-bindings/reset/starfive-jh7110.h> > + mmc@16010000 { > + compatible = "starfive,jh7110-sdio"; Use 4 spaces for example indentation. > + reg = <0x16010000 0x10000>; > + clocks = <&syscrg JH7110_SYSCLK_SDIO0_AHB>, > + <&syscrg JH7110_SYSCLK_SDIO0_SDCARD>; Align with previous < Best regards, Krzysztof
On 2022/12/7 22:19, Rob Herring wrote: > > On Wed, 07 Dec 2022 21:17:29 +0800, William Qiu wrote: >> Add documentation to describe StarFive >> designware mobile storage host controller driver. >> >> Signed-off-by: William Qiu <william.qiu@starfivetech.com> >> --- >> .../bindings/mmc/starfive,jh7110-sdio.yaml | 71 +++++++++++++++++++ >> 1 file changed, 71 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/mmc/starfive,jh7110-sdio.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: > Documentation/devicetree/bindings/mmc/starfive,jh7110-sdio.example.dts:21:18: fatal error: dt-bindings/clock/starfive-jh7110.h: No such file or directory > 21 | #include <dt-bindings/clock/starfive-jh7110.h> > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > compilation terminated. > make[1]: *** [scripts/Makefile.lib:406: Documentation/devicetree/bindings/mmc/starfive,jh7110-sdio.example.dtb] Error 1 > make[1]: *** Waiting for unfinished jobs.... > make: *** [Makefile:1492: dt_binding_check] Error 2 > > doc reference errors (make refcheckdocs): > > See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20221207131731.1291517-2-william.qiu@starfivetech.com > > 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. > Hi Rob Herring, Thank you for taking time to review and provide helpful comments for this patch. I'll take Conor's suggestion and replace the IDs and drop the header then. Best regards, William Qiu
On 2022/12/7 22:46, Conor Dooley wrote: > On Wed, Dec 07, 2022 at 08:19:49AM -0600, Rob Herring wrote: >> >> On Wed, 07 Dec 2022 21:17:29 +0800, William Qiu wrote: >> > Add documentation to describe StarFive >> > designware mobile storage host controller driver. >> > >> > Signed-off-by: William Qiu <william.qiu@starfivetech.com> >> > --- >> > .../bindings/mmc/starfive,jh7110-sdio.yaml | 71 +++++++++++++++++++ >> > 1 file changed, 71 insertions(+) >> > create mode 100644 Documentation/devicetree/bindings/mmc/starfive,jh7110-sdio.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: >> Documentation/devicetree/bindings/mmc/starfive,jh7110-sdio.example.dts:21:18: fatal error: dt-bindings/clock/starfive-jh7110.h: No such file or directory >> 21 | #include <dt-bindings/clock/starfive-jh7110.h> >> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Hello William, > As with the other bindings that StarFive has sent out recently, > including this header in the example creates a dependency on the > clock/reset stuff being merged prior to the drivers for unrelated > subsytems. > To avoid that, you can drop the headers & definitions from these > *examples* & use the numbers themselves instead. > > That way, the only thing that depends on the clock binding headers is > the DeviceTree patch & the driver can be merged once it is ready. > > Thanks, > Conor. > Hi Conor, Thank you for your suggestion. I will take it and fix it. Best regards, William Qiu >> compilation terminated. >> make[1]: *** [scripts/Makefile.lib:406: Documentation/devicetree/bindings/mmc/starfive,jh7110-sdio.example.dtb] Error 1 >> make[1]: *** Waiting for unfinished jobs.... >> make: *** [Makefile:1492: dt_binding_check] Error 2 >> >> doc reference errors (make refcheckdocs): >> >> See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20221207131731.1291517-2-william.qiu@starfivetech.com >> >> 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 2022/12/7 23:13, Krzysztof Kozlowski wrote: > On 07/12/2022 14:17, William Qiu wrote: >> Add documentation to describe StarFive >> designware mobile storage host controller driver. >> >> Signed-off-by: William Qiu <william.qiu@starfivetech.com> >> --- >> .../bindings/mmc/starfive,jh7110-sdio.yaml | 71 +++++++++++++++++++ >> 1 file changed, 71 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/mmc/starfive,jh7110-sdio.yaml >> >> diff --git a/Documentation/devicetree/bindings/mmc/starfive,jh7110-sdio.yaml b/Documentation/devicetree/bindings/mmc/starfive,jh7110-sdio.yaml >> new file mode 100644 >> index 000000000000..4f27ef3cf4f3 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/mmc/starfive,jh7110-sdio.yaml >> @@ -0,0 +1,71 @@ >> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/mmc/starfive,jh7110-sdio.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: StarFive Designware Mobile Storage Host Controller >> + >> +description: >> + StarFive uses the Synopsys designware mobile storage host controller >> + to interface a SoC with storage medium such as eMMC or SD/MMC cards. >> + >> +allOf: >> + - $ref: "synopsys-dw-mshc-common.yaml#" > > Drop quotes > Will fix. >> + >> +maintainers: >> + - William Qiu <william.qiu@starfivetech.com> >> + >> +properties: >> + compatible: >> + const: starfive,jh7110-sdio > > Why do you call it sdio if the interface is for mmc as well? > Will update compatible. >> + >> + reg: >> + maxItems: 1 >> + >> + clocks: >> + minItems: 1 >> + items: >> + - description: biu clock >> + - description: ciu clock > > I don't think the card interface clock is optional... are you sure you > have designs working without it? No clock line at all getting to the memory? > Will fix. >> + >> + clock-names: >> + minItems: 1 >> + items: >> + - const: biu >> + - const: ciu >> + >> + interrupts: >> + maxItems: 1 >> + >> + starfive,sys-syscon: >> + $ref: /schemas/types.yaml#/definitions/uint32-array >> + description: >> + The desired number of times that the host execute tuning when needed. > > That's not matching the property name. Missing number of items... this > is anyway confusing. Why number of tuning tries is a property of DT? > Will update the description. >> + >> +required: >> + - compatible >> + - reg >> + - clocks >> + - clock-names >> + - interrupts >> + >> +unevaluatedProperties: false >> + >> +examples: >> + - | >> + #include <dt-bindings/clock/starfive-jh7110.h> >> + #include <dt-bindings/reset/starfive-jh7110.h> >> + mmc@16010000 { >> + compatible = "starfive,jh7110-sdio"; > > Use 4 spaces for example indentation. > I'll fix the indentation. >> + reg = <0x16010000 0x10000>; >> + clocks = <&syscrg JH7110_SYSCLK_SDIO0_AHB>, >> + <&syscrg JH7110_SYSCLK_SDIO0_SDCARD>; > > Align with previous < > I will fix. Thank you for taking time to review and provide helpful comments for this patch. Best regards, William Qiu > Best regards, > Krzysztof >
On 08/12/2022 09:44, William Qiu wrote: > >>> + >>> + clock-names: >>> + minItems: 1 >>> + items: >>> + - const: biu >>> + - const: ciu >>> + >>> + interrupts: >>> + maxItems: 1 >>> + >>> + starfive,sys-syscon: >>> + $ref: /schemas/types.yaml#/definitions/uint32-array >>> + description: >>> + The desired number of times that the host execute tuning when needed. >> >> That's not matching the property name. Missing number of items... this >> is anyway confusing. Why number of tuning tries is a property of DT? >> > > Will update the description. I propose first to explain what is it. Because it is not about description only, but also type. Your driver uses this as syscon, so this cannot be uint32-array but phandle-array... Best regards, Krzysztof
On 2022/12/8 17:01, Krzysztof Kozlowski wrote: > On 08/12/2022 09:44, William Qiu wrote: >> >>>> + >>>> + clock-names: >>>> + minItems: 1 >>>> + items: >>>> + - const: biu >>>> + - const: ciu >>>> + >>>> + interrupts: >>>> + maxItems: 1 >>>> + >>>> + starfive,sys-syscon: >>>> + $ref: /schemas/types.yaml#/definitions/uint32-array >>>> + description: >>>> + The desired number of times that the host execute tuning when needed. >>> >>> That's not matching the property name. Missing number of items... this >>> is anyway confusing. Why number of tuning tries is a property of DT? >>> >> >> Will update the description. > > I propose first to explain what is it. Because it is not about > description only, but also type. Your driver uses this as syscon, so > this cannot be uint32-array but phandle-array... > > Best regards, > Krzysztof > Hi Krzysztof, Thank you for suggestion and I'll take it. I'll update it in next version. Best regards, William Qiu
Hi William, thanks for your patch! On Wed, Dec 7, 2022 at 2:17 PM William Qiu <william.qiu@starfivetech.com> wrote: > Add documentation to describe StarFive > designware mobile storage host controller driver. > > Signed-off-by: William Qiu <william.qiu@starfivetech.com> (...) > + starfive,sys-syscon: > + $ref: /schemas/types.yaml#/definitions/uint32-array > + description: > + The desired number of times that the host execute tuning when needed. This is not consistent with the use in the code of the attached driver. There it is a phandle, and it has three cells, which I am critical of. Also this description is hard to understand. > +required: > + - compatible > + - reg > + - clocks > + - clock-names > + - interrupts I don't think the syscon phandle is optional. > + #include <dt-bindings/clock/starfive-jh7110.h> > + #include <dt-bindings/reset/starfive-jh7110.h> > + mmc@16010000 { > + compatible = "starfive,jh7110-sdio"; > + reg = <0x16010000 0x10000>; No syscon phandle in the example: this needs to be added. Yours, Linus Walleij
On 2022/12/9 5:13, Linus Walleij wrote: > Hi William, > > thanks for your patch! > > On Wed, Dec 7, 2022 at 2:17 PM William Qiu <william.qiu@starfivetech.com> wrote: > >> Add documentation to describe StarFive >> designware mobile storage host controller driver. >> >> Signed-off-by: William Qiu <william.qiu@starfivetech.com> > > (...) > >> + starfive,sys-syscon: >> + $ref: /schemas/types.yaml#/definitions/uint32-array >> + description: >> + The desired number of times that the host execute tuning when needed. > > This is not consistent with the use in the code of the attached driver. > There it is a phandle, and it has three cells, which I am critical of. > Also this description is hard to understand. > Will update all of it in next version. >> +required: >> + - compatible >> + - reg >> + - clocks >> + - clock-names >> + - interrupts > > I don't think the syscon phandle is optional. > Will fix. >> + #include <dt-bindings/clock/starfive-jh7110.h> >> + #include <dt-bindings/reset/starfive-jh7110.h> >> + mmc@16010000 { >> + compatible = "starfive,jh7110-sdio"; >> + reg = <0x16010000 0x10000>; > > No syscon phandle in the example: this needs to be added. > I will add the syscon phandle. Thank you for taking time to review and provide helpful comments for this patch. Best regards, William Qiu > Yours, > Linus Walleij
diff --git a/Documentation/devicetree/bindings/mmc/starfive,jh7110-sdio.yaml b/Documentation/devicetree/bindings/mmc/starfive,jh7110-sdio.yaml new file mode 100644 index 000000000000..4f27ef3cf4f3 --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/starfive,jh7110-sdio.yaml @@ -0,0 +1,71 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mmc/starfive,jh7110-sdio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: StarFive Designware Mobile Storage Host Controller + +description: + StarFive uses the Synopsys designware mobile storage host controller + to interface a SoC with storage medium such as eMMC or SD/MMC cards. + +allOf: + - $ref: "synopsys-dw-mshc-common.yaml#" + +maintainers: + - William Qiu <william.qiu@starfivetech.com> + +properties: + compatible: + const: starfive,jh7110-sdio + + reg: + maxItems: 1 + + clocks: + minItems: 1 + items: + - description: biu clock + - description: ciu clock + + clock-names: + minItems: 1 + items: + - const: biu + - const: ciu + + interrupts: + maxItems: 1 + + starfive,sys-syscon: + $ref: /schemas/types.yaml#/definitions/uint32-array + description: + The desired number of times that the host execute tuning when needed. + +required: + - compatible + - reg + - clocks + - clock-names + - interrupts + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/clock/starfive-jh7110.h> + #include <dt-bindings/reset/starfive-jh7110.h> + mmc@16010000 { + compatible = "starfive,jh7110-sdio"; + reg = <0x16010000 0x10000>; + clocks = <&syscrg JH7110_SYSCLK_SDIO0_AHB>, + <&syscrg JH7110_SYSCLK_SDIO0_SDCARD>; + clock-names = "biu","ciu"; + resets = <&syscrg JH7110_SYSRST_SDIO0_AHB>; + reset-names = "reset"; + interrupts = <74>; + fifo-depth = <32>; + fifo-watermark-aligned; + data-addr = <0>; + };