diff mbox series

dt-bindings: mmc: Convert Fujitsu SDHCI to DT schema

Message ID 20221209171621.3351220-1-robh@kernel.org
State New
Headers show
Series dt-bindings: mmc: Convert Fujitsu SDHCI to DT schema | expand

Commit Message

Rob Herring Dec. 9, 2022, 5:16 p.m. UTC
Convert the Fujitsu SDHCI binding to DT schema format.

The interrupts were not documented. The driver only uses the first
interrupt, but the DT and example have 2 interrupts. The 2nd one is
unknown. "dma-coherent" was also not documented, but is used.

The "socionext,synquacer-sdhci" compatible was not documented, but it is
compatible with "fujitsu,mb86s70-sdhci-3.0.yaml" and is in use (in
u-boot Synquacer dts).

Signed-off-by: Rob Herring <robh@kernel.org>
---
 .../mmc/fujitsu,mb86s70-sdhci-3.0.yaml        | 67 +++++++++++++++++++
 .../devicetree/bindings/mmc/sdhci-fujitsu.txt | 32 ---------
 2 files changed, 67 insertions(+), 32 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mmc/fujitsu,mb86s70-sdhci-3.0.yaml
 delete mode 100644 Documentation/devicetree/bindings/mmc/sdhci-fujitsu.txt

Comments

Rob Herring Dec. 9, 2022, 6:42 p.m. UTC | #1
On Fri, Dec 9, 2022 at 11:16 AM Rob Herring <robh@kernel.org> wrote:
>
> Convert the Fujitsu SDHCI binding to DT schema format.
>
> The interrupts were not documented. The driver only uses the first
> interrupt, but the DT and example have 2 interrupts. The 2nd one is
> unknown. "dma-coherent" was also not documented, but is used.
>
> The "socionext,synquacer-sdhci" compatible was not documented, but it is
> compatible with "fujitsu,mb86s70-sdhci-3.0.yaml" and is in use (in
> u-boot Synquacer dts).
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  .../mmc/fujitsu,mb86s70-sdhci-3.0.yaml        | 67 +++++++++++++++++++
>  .../devicetree/bindings/mmc/sdhci-fujitsu.txt | 32 ---------
>  2 files changed, 67 insertions(+), 32 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/mmc/fujitsu,mb86s70-sdhci-3.0.yaml
>  delete mode 100644 Documentation/devicetree/bindings/mmc/sdhci-fujitsu.txt
>
> diff --git a/Documentation/devicetree/bindings/mmc/fujitsu,mb86s70-sdhci-3.0.yaml b/Documentation/devicetree/bindings/mmc/fujitsu,mb86s70-sdhci-3.0.yaml
> new file mode 100644
> index 000000000000..0218a6ce4b2f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mmc/fujitsu,mb86s70-sdhci-3.0.yaml
> @@ -0,0 +1,67 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mmc/fujitsu,mb86s70-sdhci-3.0.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Fujitsu SDHCI controller
> +
> +maintainers:
> +  - Vincent Yang <Vincent.Yang@tw.fujitsu.com>

Bounces. Any other volunteers?

> +
> +allOf:
> +  - $ref: mmc-controller.yaml#
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - items:
> +          - const: socionext,synquacer-sdhci
> +          - const: fujitsu,mb86s70-sdhci-3.0
> +      - const: fujitsu,mb86s70-sdhci-3.0
> +
> +  reg:
> +    maxItems: 1
> +
> +  clocks:
> +    items:
> +      - description: Core clock
> +      - description: Interface clock
> +
> +  clock-names:
> +    items:
> +      - const: core
> +      - const: iface
> +
> +  dma-coherent: true
> +
> +  interrupts:
> +    maxItems: 2
> +
> +  fujitsu,cmd-dat-delay-select:
> +    type: boolean
> +    description: Indicating that the host requires the CMD_DAT_DELAY control
> +      to be enabled.
> +
> +required:
> +  - compatible
> +  - reg
> +  - clocks
> +  - clock-names
> +  - interrupts
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    mmc@36600000 {
> +        compatible = "fujitsu,mb86s70-sdhci-3.0";
> +        reg = <0x36600000 0x1000>;
> +        interrupts = <0 172 0x4>,
> +               <0 173 0x4>;
> +        bus-width = <4>;
> +        vqmmc-supply = <&vccq_sdhci1>;
> +        clocks = <&clock 2 2 0>, <&clock 2 3 0>;
> +        clock-names = "core", "iface";
> +    };
> +...
> diff --git a/Documentation/devicetree/bindings/mmc/sdhci-fujitsu.txt b/Documentation/devicetree/bindings/mmc/sdhci-fujitsu.txt
> deleted file mode 100644
> index 3ee9263adf73..000000000000
> --- a/Documentation/devicetree/bindings/mmc/sdhci-fujitsu.txt
> +++ /dev/null
> @@ -1,32 +0,0 @@
> -* Fujitsu SDHCI controller
> -
> -This file documents differences between the core properties in mmc.txt
> -and the properties used by the sdhci_f_sdh30 driver.
> -
> -Required properties:
> -- compatible: "fujitsu,mb86s70-sdhci-3.0"
> -- clocks: Must contain an entry for each entry in clock-names. It is a
> -  list of phandles and clock-specifier pairs.
> -  See ../clocks/clock-bindings.txt for details.
> -- clock-names: Should contain the following two entries:
> -       "iface" - clock used for sdhci interface
> -       "core"  - core clock for sdhci controller
> -
> -Optional properties:
> -- vqmmc-supply: phandle to the regulator device tree node, mentioned
> -  as the VCCQ/VDD_IO supply in the eMMC/SD specs.
> -- fujitsu,cmd-dat-delay-select: boolean property indicating that this host
> -  requires the CMD_DAT_DELAY control to be enabled.
> -
> -Example:
> -
> -       sdhci1: mmc@36600000 {
> -               compatible = "fujitsu,mb86s70-sdhci-3.0";
> -               reg = <0 0x36600000 0x1000>;
> -               interrupts = <0 172 0x4>,
> -                            <0 173 0x4>;
> -               bus-width = <4>;
> -               vqmmc-supply = <&vccq_sdhci1>;
> -               clocks = <&clock 2 2 0>, <&clock 2 3 0>;
> -               clock-names = "iface", "core";
> -       };
> --
> 2.35.1
>
Ard Biesheuvel Dec. 9, 2022, 6:44 p.m. UTC | #2
cc Jassi and Masahisa

On Fri, 9 Dec 2022 at 19:42, Rob Herring <robh@kernel.org> wrote:
>
> On Fri, Dec 9, 2022 at 11:16 AM Rob Herring <robh@kernel.org> wrote:
> >
> > Convert the Fujitsu SDHCI binding to DT schema format.
> >
> > The interrupts were not documented. The driver only uses the first
> > interrupt, but the DT and example have 2 interrupts. The 2nd one is
> > unknown. "dma-coherent" was also not documented, but is used.
> >
> > The "socionext,synquacer-sdhci" compatible was not documented, but it is
> > compatible with "fujitsu,mb86s70-sdhci-3.0.yaml" and is in use (in
> > u-boot Synquacer dts).
> >
> > Signed-off-by: Rob Herring <robh@kernel.org>
> > ---
> >  .../mmc/fujitsu,mb86s70-sdhci-3.0.yaml        | 67 +++++++++++++++++++
> >  .../devicetree/bindings/mmc/sdhci-fujitsu.txt | 32 ---------
> >  2 files changed, 67 insertions(+), 32 deletions(-)
> >  create mode 100644 Documentation/devicetree/bindings/mmc/fujitsu,mb86s70-sdhci-3.0.yaml
> >  delete mode 100644 Documentation/devicetree/bindings/mmc/sdhci-fujitsu.txt
> >
> > diff --git a/Documentation/devicetree/bindings/mmc/fujitsu,mb86s70-sdhci-3.0.yaml b/Documentation/devicetree/bindings/mmc/fujitsu,mb86s70-sdhci-3.0.yaml
> > new file mode 100644
> > index 000000000000..0218a6ce4b2f
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/mmc/fujitsu,mb86s70-sdhci-3.0.yaml
> > @@ -0,0 +1,67 @@
> > +# SPDX-License-Identifier: GPL-2.0-only
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/mmc/fujitsu,mb86s70-sdhci-3.0.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Fujitsu SDHCI controller
> > +
> > +maintainers:
> > +  - Vincent Yang <Vincent.Yang@tw.fujitsu.com>
>
> Bounces. Any other volunteers?
>
> > +
> > +allOf:
> > +  - $ref: mmc-controller.yaml#
> > +
> > +properties:
> > +  compatible:
> > +    oneOf:
> > +      - items:
> > +          - const: socionext,synquacer-sdhci
> > +          - const: fujitsu,mb86s70-sdhci-3.0
> > +      - const: fujitsu,mb86s70-sdhci-3.0
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  clocks:
> > +    items:
> > +      - description: Core clock
> > +      - description: Interface clock
> > +
> > +  clock-names:
> > +    items:
> > +      - const: core
> > +      - const: iface
> > +
> > +  dma-coherent: true
> > +
> > +  interrupts:
> > +    maxItems: 2
> > +
> > +  fujitsu,cmd-dat-delay-select:
> > +    type: boolean
> > +    description: Indicating that the host requires the CMD_DAT_DELAY control
> > +      to be enabled.
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - clocks
> > +  - clock-names
> > +  - interrupts
> > +
> > +unevaluatedProperties: false
> > +
> > +examples:
> > +  - |
> > +    mmc@36600000 {
> > +        compatible = "fujitsu,mb86s70-sdhci-3.0";
> > +        reg = <0x36600000 0x1000>;
> > +        interrupts = <0 172 0x4>,
> > +               <0 173 0x4>;
> > +        bus-width = <4>;
> > +        vqmmc-supply = <&vccq_sdhci1>;
> > +        clocks = <&clock 2 2 0>, <&clock 2 3 0>;
> > +        clock-names = "core", "iface";
> > +    };
> > +...
> > diff --git a/Documentation/devicetree/bindings/mmc/sdhci-fujitsu.txt b/Documentation/devicetree/bindings/mmc/sdhci-fujitsu.txt
> > deleted file mode 100644
> > index 3ee9263adf73..000000000000
> > --- a/Documentation/devicetree/bindings/mmc/sdhci-fujitsu.txt
> > +++ /dev/null
> > @@ -1,32 +0,0 @@
> > -* Fujitsu SDHCI controller
> > -
> > -This file documents differences between the core properties in mmc.txt
> > -and the properties used by the sdhci_f_sdh30 driver.
> > -
> > -Required properties:
> > -- compatible: "fujitsu,mb86s70-sdhci-3.0"
> > -- clocks: Must contain an entry for each entry in clock-names. It is a
> > -  list of phandles and clock-specifier pairs.
> > -  See ../clocks/clock-bindings.txt for details.
> > -- clock-names: Should contain the following two entries:
> > -       "iface" - clock used for sdhci interface
> > -       "core"  - core clock for sdhci controller
> > -
> > -Optional properties:
> > -- vqmmc-supply: phandle to the regulator device tree node, mentioned
> > -  as the VCCQ/VDD_IO supply in the eMMC/SD specs.
> > -- fujitsu,cmd-dat-delay-select: boolean property indicating that this host
> > -  requires the CMD_DAT_DELAY control to be enabled.
> > -
> > -Example:
> > -
> > -       sdhci1: mmc@36600000 {
> > -               compatible = "fujitsu,mb86s70-sdhci-3.0";
> > -               reg = <0 0x36600000 0x1000>;
> > -               interrupts = <0 172 0x4>,
> > -                            <0 173 0x4>;
> > -               bus-width = <4>;
> > -               vqmmc-supply = <&vccq_sdhci1>;
> > -               clocks = <&clock 2 2 0>, <&clock 2 3 0>;
> > -               clock-names = "iface", "core";
> > -       };
> > --
> > 2.35.1
> >
Kunihiko Hayashi Dec. 12, 2022, 1:50 a.m. UTC | #3
Hi Rob,

On 2022/12/10 3:44, Ard Biesheuvel wrote:
> cc Jassi and Masahisa
> 
> On Fri, 9 Dec 2022 at 19:42, Rob Herring <robh@kernel.org> wrote:
>>
>> On Fri, Dec 9, 2022 at 11:16 AM Rob Herring <robh@kernel.org> wrote:
>>>
>>> Convert the Fujitsu SDHCI binding to DT schema format.
>>>
>>> The interrupts were not documented. The driver only uses the first
>>> interrupt, but the DT and example have 2 interrupts. The 2nd one is
>>> unknown. "dma-coherent" was also not documented, but is used.
>>>
>>> The "socionext,synquacer-sdhci" compatible was not documented, but it is
>>> compatible with "fujitsu,mb86s70-sdhci-3.0.yaml" and is in use (in
>>> u-boot Synquacer dts).
>>>
>>> Signed-off-by: Rob Herring <robh@kernel.org>
>>> ---
>>>   .../mmc/fujitsu,mb86s70-sdhci-3.0.yaml        | 67 +++++++++++++++++++
>>>   .../devicetree/bindings/mmc/sdhci-fujitsu.txt | 32 ---------
>>>   2 files changed, 67 insertions(+), 32 deletions(-)
>>>   create mode 100644 Documentation/devicetree/bindings/mmc/fujitsu,mb86s70-sdhci-3.0.yaml
>>>   delete mode 100644 Documentation/devicetree/bindings/mmc/sdhci-fujitsu.txt
>>>
>>> diff --git a/Documentation/devicetree/bindings/mmc/fujitsu,mb86s70-sdhci-3.0.yaml b/Documentation/devicetree/bindings/mmc/fujitsu,mb86s70-sdhci-3.0.yaml
>>> new file mode 100644
>>> index 000000000000..0218a6ce4b2f
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/mmc/fujitsu,mb86s70-sdhci-3.0.yaml
>>> @@ -0,0 +1,67 @@
>>> +# SPDX-License-Identifier: GPL-2.0-only
>>> +%YAML 1.2
>>> +---
>>> +$id: http://devicetree.org/schemas/mmc/fujitsu,mb86s70-sdhci-3.0.yaml#
>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>> +
>>> +title: Fujitsu SDHCI controller
>>> +
>>> +maintainers:
>>> +  - Vincent Yang <Vincent.Yang@tw.fujitsu.com>
>>
>> Bounces. Any other volunteers?
>>
>>> +
>>> +allOf:
>>> +  - $ref: mmc-controller.yaml#
>>> +
>>> +properties:
>>> +  compatible:
>>> +    oneOf:
>>> +      - items:
>>> +          - const: socionext,synquacer-sdhci
>>> +          - const: fujitsu,mb86s70-sdhci-3.0
>>> +      - const: fujitsu,mb86s70-sdhci-3.0
>>> +
>>> +  reg:
>>> +    maxItems: 1
>>> +
>>> +  clocks:
>>> +    items:
>>> +      - description: Core clock
>>> +      - description: Interface clock
>>> +
>>> +  clock-names:
>>> +    items:
>>> +      - const: core
>>> +      - const: iface
>>> +
>>> +  dma-coherent: true
>>> +
>>> +  interrupts:
>>> +    maxItems: 2
>>> +
>>> +  fujitsu,cmd-dat-delay-select:
>>> +    type: boolean
>>> +    description: Indicating that the host requires the CMD_DAT_DELAY control
>>> +      to be enabled.
>>> +
>>> +required:
>>> +  - compatible
>>> +  - reg
>>> +  - clocks
>>> +  - clock-names
>>> +  - interrupts
>>> +
>>> +unevaluatedProperties: false
>>> +
>>> +examples:
>>> +  - |
>>> +    mmc@36600000 {
>>> +        compatible = "fujitsu,mb86s70-sdhci-3.0";
>>> +        reg = <0x36600000 0x1000>;
>>> +        interrupts = <0 172 0x4>,
>>> +               <0 173 0x4>;
>>> +        bus-width = <4>;
>>> +        vqmmc-supply = <&vccq_sdhci1>;
>>> +        clocks = <&clock 2 2 0>, <&clock 2 3 0>;
>>> +        clock-names = "core", "iface";
>>> +    };
>>> +...
>>> diff --git a/Documentation/devicetree/bindings/mmc/sdhci-fujitsu.txt b/Documentation/devicetree/bindings/mmc/sdhci-fujitsu.txt
>>> deleted file mode 100644
>>> index 3ee9263adf73..000000000000
>>> --- a/Documentation/devicetree/bindings/mmc/sdhci-fujitsu.txt
>>> +++ /dev/null
>>> @@ -1,32 +0,0 @@
>>> -* Fujitsu SDHCI controller
>>> -
>>> -This file documents differences between the core properties in mmc.txt
>>> -and the properties used by the sdhci_f_sdh30 driver.
>>> -
>>> -Required properties:
>>> -- compatible: "fujitsu,mb86s70-sdhci-3.0"
>>> -- clocks: Must contain an entry for each entry in clock-names. It is a
>>> -  list of phandles and clock-specifier pairs.
>>> -  See ../clocks/clock-bindings.txt for details.
>>> -- clock-names: Should contain the following two entries:
>>> -       "iface" - clock used for sdhci interface
>>> -       "core"  - core clock for sdhci controller
>>> -
>>> -Optional properties:
>>> -- vqmmc-supply: phandle to the regulator device tree node, mentioned
>>> -  as the VCCQ/VDD_IO supply in the eMMC/SD specs.
>>> -- fujitsu,cmd-dat-delay-select: boolean property indicating that this host
>>> -  requires the CMD_DAT_DELAY control to be enabled.
>>> -
>>> -Example:
>>> -
>>> -       sdhci1: mmc@36600000 {
>>> -               compatible = "fujitsu,mb86s70-sdhci-3.0";
>>> -               reg = <0 0x36600000 0x1000>;
>>> -               interrupts = <0 172 0x4>,
>>> -                            <0 173 0x4>;
>>> -               bus-width = <4>;
>>> -               vqmmc-supply = <&vccq_sdhci1>;
>>> -               clocks = <&clock 2 2 0>, <&clock 2 3 0>;
>>> -               clock-names = "iface", "core";
>>> -       };
>>> --
>>> 2.35.1
>>>

I converted this dt-bindings as follows.

- [PATCH v2 1/6] dt-bindings: mmc: Convert sdhci-fujitsu to JSON schema
   https://marc.info/?l=linux-mmc&m=166815383930945

- [PATCH v2 3/6] dt-bindings: sdhci-fujitsu: Add compatible string for F_SDH30_E51
   https://marc.info/?l=linux-mmc&m=166815384730959

And this series has already merged by Ulf.
https://marc.info/?l=linux-mmc&m=166861511322498

Could you check it and update some diffs?

Thank you,

---
Best Regards
Kunihiko Hayashi
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mmc/fujitsu,mb86s70-sdhci-3.0.yaml b/Documentation/devicetree/bindings/mmc/fujitsu,mb86s70-sdhci-3.0.yaml
new file mode 100644
index 000000000000..0218a6ce4b2f
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/fujitsu,mb86s70-sdhci-3.0.yaml
@@ -0,0 +1,67 @@ 
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mmc/fujitsu,mb86s70-sdhci-3.0.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Fujitsu SDHCI controller
+
+maintainers:
+  - Vincent Yang <Vincent.Yang@tw.fujitsu.com>
+
+allOf:
+  - $ref: mmc-controller.yaml#
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - const: socionext,synquacer-sdhci
+          - const: fujitsu,mb86s70-sdhci-3.0
+      - const: fujitsu,mb86s70-sdhci-3.0
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    items:
+      - description: Core clock
+      - description: Interface clock
+
+  clock-names:
+    items:
+      - const: core
+      - const: iface
+
+  dma-coherent: true
+
+  interrupts:
+    maxItems: 2
+
+  fujitsu,cmd-dat-delay-select:
+    type: boolean
+    description: Indicating that the host requires the CMD_DAT_DELAY control
+      to be enabled.
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - clock-names
+  - interrupts
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    mmc@36600000 {
+        compatible = "fujitsu,mb86s70-sdhci-3.0";
+        reg = <0x36600000 0x1000>;
+        interrupts = <0 172 0x4>,
+               <0 173 0x4>;
+        bus-width = <4>;
+        vqmmc-supply = <&vccq_sdhci1>;
+        clocks = <&clock 2 2 0>, <&clock 2 3 0>;
+        clock-names = "core", "iface";
+    };
+...
diff --git a/Documentation/devicetree/bindings/mmc/sdhci-fujitsu.txt b/Documentation/devicetree/bindings/mmc/sdhci-fujitsu.txt
deleted file mode 100644
index 3ee9263adf73..000000000000
--- a/Documentation/devicetree/bindings/mmc/sdhci-fujitsu.txt
+++ /dev/null
@@ -1,32 +0,0 @@ 
-* Fujitsu SDHCI controller
-
-This file documents differences between the core properties in mmc.txt
-and the properties used by the sdhci_f_sdh30 driver.
-
-Required properties:
-- compatible: "fujitsu,mb86s70-sdhci-3.0"
-- clocks: Must contain an entry for each entry in clock-names. It is a
-  list of phandles and clock-specifier pairs.
-  See ../clocks/clock-bindings.txt for details.
-- clock-names: Should contain the following two entries:
-	"iface" - clock used for sdhci interface
-	"core"  - core clock for sdhci controller
-
-Optional properties:
-- vqmmc-supply: phandle to the regulator device tree node, mentioned
-  as the VCCQ/VDD_IO supply in the eMMC/SD specs.
-- fujitsu,cmd-dat-delay-select: boolean property indicating that this host
-  requires the CMD_DAT_DELAY control to be enabled.
-
-Example:
-
-	sdhci1: mmc@36600000 {
-		compatible = "fujitsu,mb86s70-sdhci-3.0";
-		reg = <0 0x36600000 0x1000>;
-		interrupts = <0 172 0x4>,
-			     <0 173 0x4>;
-		bus-width = <4>;
-		vqmmc-supply = <&vccq_sdhci1>;
-		clocks = <&clock 2 2 0>, <&clock 2 3 0>;
-		clock-names = "iface", "core";
-	};