diff mbox series

[1/4] dt-bindings: mmc: iproc-sdhci: Convert to json-schema

Message ID 20210322185816.27582-2-nsaenz@kernel.org
State New
Headers show
Series BCM2711's sdhci-iproc CMD timeouts | expand

Commit Message

nicolas saenz julienne March 22, 2021, 6:58 p.m. UTC
Convert the brcm,iproc-sdhci binding to DT schema format using json-schema

Signed-off-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
---
 .../bindings/mmc/brcm,iproc-sdhci.yaml        | 58 +++++++++++++++++++
 .../bindings/mmc/brcm,sdhci-iproc.txt         | 37 ------------
 2 files changed, 58 insertions(+), 37 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml
 delete mode 100644 Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt

Comments

Rob Herring March 23, 2021, 8:16 p.m. UTC | #1
On Mon, 22 Mar 2021 19:58:14 +0100, Nicolas Saenz Julienne wrote:
> Convert the brcm,iproc-sdhci binding to DT schema format using json-schema
> 
> Signed-off-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
> ---
>  .../bindings/mmc/brcm,iproc-sdhci.yaml        | 58 +++++++++++++++++++
>  .../bindings/mmc/brcm,sdhci-iproc.txt         | 37 ------------
>  2 files changed, 58 insertions(+), 37 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml
>  delete mode 100644 Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
Error: Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.example.dts:22.25-26 syntax error
FATAL ERROR: Unable to parse input tree
make[1]: *** [scripts/Makefile.lib:349: Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.example.dt.yaml] Error 1
make: *** [Makefile:1380: dt_binding_check] Error 2

See https://patchwork.ozlabs.org/patch/1456815

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

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.
Nicolas Saenz Julienne March 23, 2021, 9:24 p.m. UTC | #2
On Tue, 2021-03-23 at 15:08 -0600, Rob Herring wrote:
> On Mon, Mar 22, 2021 at 12:11:29PM -0700, Scott Branden wrote:
> > On 2021-03-22 11:58 a.m., Nicolas Saenz Julienne wrote:
> > > Convert the brcm,iproc-sdhci binding to DT schema format using json-schema
> > > 
> > > Signed-off-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
> > > ---
> > >  .../bindings/mmc/brcm,iproc-sdhci.yaml        | 58 +++++++++++++++++++
> > >  .../bindings/mmc/brcm,sdhci-iproc.txt         | 37 ------------
> > >  2 files changed, 58 insertions(+), 37 deletions(-)
> > >  create mode 100644 Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml
> > >  delete mode 100644 Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt
> > > 
> > > diff --git a/Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml b/Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml
> > > new file mode 100644
> > > index 000000000000..19d84f3ef9e6
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml
> > > @@ -0,0 +1,58 @@
> > > +# SPDX-License-Identifier: GPL-2.0
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/mmc/brcm,iproc-sdhci.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: Broadcom IPROC SDHCI controller
> > > +
> > > +maintainers:
> > > +  - Nicolas Saenz Julienne <nsaenz@kernel.org>
> > This is already covered in the MAINTAINERS section via "N:	iproc".
> > M:	Ray Jui <ray.jui@broadcom.com>
> > 
> > M:	Scott Branden <scott.branden@broadcom.com>
> > 
> > M:	bcm-kernel-feedback-list@broadcom.com
> 
> Maybe so, but still required here. The problem is there is no 
> MAINTAINERS file in the DT only tree[1].

Well in that case, if Scott and Ray are OK with it I'll add them.

Regards,
Nicolas
Scott Branden March 24, 2021, 4:27 p.m. UTC | #3
On 2021-03-23 2:24 p.m., Nicolas Saenz Julienne wrote:
> On Tue, 2021-03-23 at 15:08 -0600, Rob Herring wrote:
>> On Mon, Mar 22, 2021 at 12:11:29PM -0700, Scott Branden wrote:
>>> On 2021-03-22 11:58 a.m., Nicolas Saenz Julienne wrote:
>>>> Convert the brcm,iproc-sdhci binding to DT schema format using json-schema
>>>>
>>>> Signed-off-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
>>>> ---
>>>>  .../bindings/mmc/brcm,iproc-sdhci.yaml        | 58 +++++++++++++++++++
>>>>  .../bindings/mmc/brcm,sdhci-iproc.txt         | 37 ------------
>>>>  2 files changed, 58 insertions(+), 37 deletions(-)
>>>>  create mode 100644 Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml
>>>>  delete mode 100644 Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml b/Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml
>>>> new file mode 100644
>>>> index 000000000000..19d84f3ef9e6
>>>> --- /dev/null
>>>> +++ b/Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml
>>>> @@ -0,0 +1,58 @@
>>>> +# SPDX-License-Identifier: GPL-2.0
>>>> +%YAML 1.2
>>>> +---
>>>> +$id: http://devicetree.org/schemas/mmc/brcm,iproc-sdhci.yaml#
>>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>>> +
>>>> +title: Broadcom IPROC SDHCI controller
>>>> +
>>>> +maintainers:
>>>> +  - Nicolas Saenz Julienne <nsaenz@kernel.org>
>>> This is already covered in the MAINTAINERS section via "N:	iproc".
>>> M:	Ray Jui <ray.jui@broadcom.com>
>>>
>>> M:	Scott Branden <scott.branden@broadcom.com>
>>>
>>> M:	bcm-kernel-feedback-list@broadcom.com
>>
>> Maybe so, but still required here. The problem is there is no 
>> MAINTAINERS file in the DT only tree[1].
> 
> Well in that case, if Scott and Ray are OK with it I'll add them.
I do not know what the "maintainers" section in the yaml file is used to indicate.
If it is maintainer for the driver then please add the duplicate of what is already in the MAINTAINERS file.
If it is for maintainer of devicetrees that use this driver then no need to add us.
> 
> Regards,
> Nicolas
>
Nicolas Saenz Julienne March 24, 2021, 4:35 p.m. UTC | #4
On Wed, 2021-03-24 at 09:27 -0700, Scott Branden wrote:
> On 2021-03-23 2:24 p.m., Nicolas Saenz Julienne wrote:
> > On Tue, 2021-03-23 at 15:08 -0600, Rob Herring wrote:
> > > On Mon, Mar 22, 2021 at 12:11:29PM -0700, Scott Branden wrote:
> > > > On 2021-03-22 11:58 a.m., Nicolas Saenz Julienne wrote:
> > > > > Convert the brcm,iproc-sdhci binding to DT schema format using json-schema
> > > > > 
> > > > > Signed-off-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
> > > > > ---
> > > > >  .../bindings/mmc/brcm,iproc-sdhci.yaml        | 58 +++++++++++++++++++
> > > > >  .../bindings/mmc/brcm,sdhci-iproc.txt         | 37 ------------
> > > > >  2 files changed, 58 insertions(+), 37 deletions(-)
> > > > >  create mode 100644 Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml
> > > > >  delete mode 100644 Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt
> > > > > 
> > > > > diff --git a/Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml b/Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml
> > > > > new file mode 100644
> > > > > index 000000000000..19d84f3ef9e6
> > > > > --- /dev/null
> > > > > +++ b/Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml
> > > > > @@ -0,0 +1,58 @@
> > > > > +# SPDX-License-Identifier: GPL-2.0
> > > > > +%YAML 1.2
> > > > > +---
> > > > > +$id: http://devicetree.org/schemas/mmc/brcm,iproc-sdhci.yaml#
> > > > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > > > +
> > > > > +title: Broadcom IPROC SDHCI controller
> > > > > +
> > > > > +maintainers:
> > > > > +  - Nicolas Saenz Julienne <nsaenz@kernel.org>
> > > > This is already covered in the MAINTAINERS section via "N:	iproc".
> > > > M:	Ray Jui <ray.jui@broadcom.com>
> > > > 
> > > > M:	Scott Branden <scott.branden@broadcom.com>
> > > > 
> > > > M:	bcm-kernel-feedback-list@broadcom.com
> > > 
> > > Maybe so, but still required here. The problem is there is no 
> > > MAINTAINERS file in the DT only tree[1].
> > 
> > Well in that case, if Scott and Ray are OK with it I'll add them.
> I do not know what the "maintainers" section in the yaml file is used to indicate.
> If it is maintainer for the driver then please add the duplicate of what is
> already in the MAINTAINERS file.  If it is for maintainer of devicetrees that
> use this driver then no need to add us.

From the dt bindings documentation:

maintainers
  A DT specific property. Contains a list of email address(es)
  for maintainers of this binding.

That's the maintainers for the bindings, not the devicetrees consuming them. I
belive it makes sense for you guys to maintain it as it has a strong
relationship to driver changes. But if you're not interested I'll do it myself.

Regards,
Nicolas
Scott Branden March 24, 2021, 4:43 p.m. UTC | #5
On 2021-03-24 9:35 a.m., Nicolas Saenz Julienne wrote:
> On Wed, 2021-03-24 at 09:27 -0700, Scott Branden wrote:

>> On 2021-03-23 2:24 p.m., Nicolas Saenz Julienne wrote:

>>> On Tue, 2021-03-23 at 15:08 -0600, Rob Herring wrote:

>>>> On Mon, Mar 22, 2021 at 12:11:29PM -0700, Scott Branden wrote:

>>>>> On 2021-03-22 11:58 a.m., Nicolas Saenz Julienne wrote:

>>>>>> Convert the brcm,iproc-sdhci binding to DT schema format using json-schema

>>>>>>

>>>>>> Signed-off-by: Nicolas Saenz Julienne <nsaenz@kernel.org>

>>>>>> ---

>>>>>>  .../bindings/mmc/brcm,iproc-sdhci.yaml        | 58 +++++++++++++++++++

>>>>>>  .../bindings/mmc/brcm,sdhci-iproc.txt         | 37 ------------

>>>>>>  2 files changed, 58 insertions(+), 37 deletions(-)

>>>>>>  create mode 100644 Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml

>>>>>>  delete mode 100644 Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt

>>>>>>

>>>>>> diff --git a/Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml b/Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml

>>>>>> new file mode 100644

>>>>>> index 000000000000..19d84f3ef9e6

>>>>>> --- /dev/null

>>>>>> +++ b/Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml

>>>>>> @@ -0,0 +1,58 @@

>>>>>> +# SPDX-License-Identifier: GPL-2.0

>>>>>> +%YAML 1.2

>>>>>> +---

>>>>>> +$id: http://devicetree.org/schemas/mmc/brcm,iproc-sdhci.yaml#

>>>>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#

>>>>>> +

>>>>>> +title: Broadcom IPROC SDHCI controller

>>>>>> +

>>>>>> +maintainers:

>>>>>> +  - Nicolas Saenz Julienne <nsaenz@kernel.org>

>>>>> This is already covered in the MAINTAINERS section via "N:	iproc".

>>>>> M:	Ray Jui <ray.jui@broadcom.com>

>>>>>

>>>>> M:	Scott Branden <scott.branden@broadcom.com>

>>>>>

>>>>> M:	bcm-kernel-feedback-list@broadcom.com

>>>>

>>>> Maybe so, but still required here. The problem is there is no 

>>>> MAINTAINERS file in the DT only tree[1].

>>>

>>> Well in that case, if Scott and Ray are OK with it I'll add them.

>> I do not know what the "maintainers" section in the yaml file is used to indicate.

>> If it is maintainer for the driver then please add the duplicate of what is

>> already in the MAINTAINERS file.  If it is for maintainer of devicetrees that

>> use this driver then no need to add us.

> 

> From the dt bindings documentation:

> 

> maintainers

>   A DT specific property. Contains a list of email address(es)

>   for maintainers of this binding.

> 

> That's the maintainers for the bindings, not the devicetrees consuming them. I

> belive it makes sense for you guys to maintain it as it has a strong

> relationship to driver changes. But if you're not interested I'll do it myself.

Sure, you can add us as well.
> 

> Regards,

> Nicolas

>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml b/Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml
new file mode 100644
index 000000000000..19d84f3ef9e6
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/brcm,iproc-sdhci.yaml
@@ -0,0 +1,58 @@ 
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mmc/brcm,iproc-sdhci.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom IPROC SDHCI controller
+
+maintainers:
+  - Nicolas Saenz Julienne <nsaenz@kernel.org>
+
+allOf:
+  - $ref: mmc-controller.yaml#
+
+properties:
+  compatible:
+    enum:
+      - brcm,bcm2835-sdhci
+      - brcm,bcm2711-emmc2
+      - brcm,sdhci-iproc-cygnus
+      - brcm,sdhci-iproc
+
+  reg:
+    minItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+    description:
+      Handle to core clock for the sdhci controller.
+
+  sdhci,auto-cmd12:
+    type: boolean
+    description: Specifies that controller should use auto CMD12
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    sdhci0: sdhci@18041000 {
+      compatible = "brcm,sdhci-iproc-cygnus";
+      reg = <0x18041000 0x100>;
+      interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
+      clocks = <&lcpll0_clks BCM_CYGNUS_LCPLL0_SDIO_CLK>;
+      bus-width = <4>;
+      sdhci,auto-cmd12;
+      no-1-8-v;
+    };
+
+...
diff --git a/Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt b/Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt
deleted file mode 100644
index 09d87cc1182a..000000000000
--- a/Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt
+++ /dev/null
@@ -1,37 +0,0 @@ 
-Broadcom IPROC SDHCI controller
-
-This file documents differences between the core properties described
-by mmc.txt and the properties that represent the IPROC SDHCI controller.
-
-Required properties:
-- compatible : Should be one of the following
-	       "brcm,bcm2835-sdhci"
-	       "brcm,bcm2711-emmc2"
-	       "brcm,sdhci-iproc-cygnus"
-	       "brcm,sdhci-iproc"
-
-Use brcm2835-sdhci for the eMMC controller on the BCM2835 (Raspberry Pi) and
-bcm2711-emmc2 for the additional eMMC2 controller on BCM2711.
-
-Use sdhci-iproc-cygnus for Broadcom SDHCI Controllers
-restricted to 32bit host accesses to SDHCI registers.
-
-Use sdhci-iproc for Broadcom SDHCI Controllers that allow standard
-8, 16, 32-bit host access to SDHCI register.
-
-- clocks : The clock feeding the SDHCI controller.
-
-Optional properties:
-  - sdhci,auto-cmd12: specifies that controller should use auto CMD12.
-
-Example:
-
-sdhci0: sdhci@18041000 {
-	compatible = "brcm,sdhci-iproc-cygnus";
-	reg = <0x18041000 0x100>;
-	interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
-	clocks = <&lcpll0_clks BCM_CYGNUS_LCPLL0_SDIO_CLK>;
-	bus-width = <4>;
-	sdhci,auto-cmd12;
-	no-1-8-v;
-};