Add binding for Nuvoton NPCM SDHCI controller.
Signed-off-by: Tomer Maimon <tmaimon77@gmail.com>
---
.../devicetree/bindings/mmc/npcm,sdhci.yaml | 47 +++++++++++++++++++
1 file changed, 47 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mmc/npcm,sdhci.yaml
diff --git a/Documentation/devicetree/bindings/mmc/npcm,sdhci.yaml b/Documentation/devicetree/bindings/mmc/npcm,sdhci.yaml
new file mode 100644
index 000000000000..38409272807a
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/npcm,sdhci.yaml
@@ -0,0 +1,47 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mmc/npcm,sdhci.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NPCM SDHCI Controller
+
+maintainers:
+ - Tomer Maimon <tmaimon77@gmail.com>
+
+properties:
+ compatible:
+ enum:
+ - nuvoton,npcm750-sdhci
+ - nuvoton,npcm845-sdhci
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+patternProperties:
+ "^sdhci@[0-9a-f]+$":
+ type: object
+ $ref: mmc-controller.yaml
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ sdhci0: sdhci@f0840000 {
+ compatible = "nuvoton,npcm750-sdhci";
+ reg = <0xf0840000 0x200>;
+ interrupts = <0 27 4>;
+ clocks = <&clk 4>;
+ };
--
2.33.0
On Wed, Nov 30, 2022 at 05:08:56PM +0200, Tomer Maimon wrote:
> Add binding for Nuvoton NPCM SDHCI controller.
>
> Signed-off-by: Tomer Maimon <tmaimon77@gmail.com>
> ---
> .../devicetree/bindings/mmc/npcm,sdhci.yaml | 47 +++++++++++++++++++
> 1 file changed, 47 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/mmc/npcm,sdhci.yaml
>
> diff --git a/Documentation/devicetree/bindings/mmc/npcm,sdhci.yaml b/Documentation/devicetree/bindings/mmc/npcm,sdhci.yaml
> new file mode 100644
> index 000000000000..38409272807a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mmc/npcm,sdhci.yaml
> @@ -0,0 +1,47 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mmc/npcm,sdhci.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: NPCM SDHCI Controller
> +
> +maintainers:
> + - Tomer Maimon <tmaimon77@gmail.com>
> +
> +properties:
> + compatible:
> + enum:
> + - nuvoton,npcm750-sdhci
> + - nuvoton,npcm845-sdhci
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + clocks:
> + maxItems: 1
> +
> +patternProperties:
> + "^sdhci@[0-9a-f]+$":
> + type: object
sdhci is a child node of the nuvoton,npcm750-sdhci node?
> + $ref: mmc-controller.yaml
I think you want:
allOf:
- $ref: mmc-controller.yaml#
And then you will have some errors in the example to fix.
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - clocks
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + sdhci0: sdhci@f0840000 {
Drop unused labels.
Node name should be 'mmc'
> + compatible = "nuvoton,npcm750-sdhci";
Indent by 4 spaces.
> + reg = <0xf0840000 0x200>;
> + interrupts = <0 27 4>;
> + clocks = <&clk 4>;
> + };
> --
> 2.33.0
>
>
Hi Rob,
Thanks for your comments.
Your comments will be addressed next version.
On Fri, 2 Dec 2022 at 01:49, Rob Herring <robh@kernel.org> wrote:
>
> On Wed, Nov 30, 2022 at 05:08:56PM +0200, Tomer Maimon wrote:
> > Add binding for Nuvoton NPCM SDHCI controller.
> >
> > Signed-off-by: Tomer Maimon <tmaimon77@gmail.com>
> > ---
> > .../devicetree/bindings/mmc/npcm,sdhci.yaml | 47 +++++++++++++++++++
> > 1 file changed, 47 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/mmc/npcm,sdhci.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/mmc/npcm,sdhci.yaml b/Documentation/devicetree/bindings/mmc/npcm,sdhci.yaml
> > new file mode 100644
> > index 000000000000..38409272807a
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/mmc/npcm,sdhci.yaml
> > @@ -0,0 +1,47 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/mmc/npcm,sdhci.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: NPCM SDHCI Controller
> > +
> > +maintainers:
> > + - Tomer Maimon <tmaimon77@gmail.com>
> > +
> > +properties:
> > + compatible:
> > + enum:
> > + - nuvoton,npcm750-sdhci
> > + - nuvoton,npcm845-sdhci
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + interrupts:
> > + maxItems: 1
> > +
> > + clocks:
> > + maxItems: 1
> > +
> > +patternProperties:
> > + "^sdhci@[0-9a-f]+$":
> > + type: object
>
> sdhci is a child node of the nuvoton,npcm750-sdhci node?
No, will be removed
>
> > + $ref: mmc-controller.yaml
>
> I think you want:
>
> allOf:
> - $ref: mmc-controller.yaml#
>
> And then you will have some errors in the example to fix.
>
> > +
> > +required:
> > + - compatible
> > + - reg
> > + - interrupts
> > + - clocks
> > +
> > +unevaluatedProperties: false
> > +
> > +examples:
> > + - |
> > + sdhci0: sdhci@f0840000 {
>
> Drop unused labels.
>
> Node name should be 'mmc'
>
> > + compatible = "nuvoton,npcm750-sdhci";
>
> Indent by 4 spaces.
>
> > + reg = <0xf0840000 0x200>;
> > + interrupts = <0 27 4>;
> > + clocks = <&clk 4>;
> > + };
> > --
> > 2.33.0
> >
> >
Best regards,
Tomer
© 2016 - 2026 Red Hat, Inc.