2021-06-02 12:06:01

by J. Neuschäfer

[permalink] [raw]
Subject: [PATCH 1/8] dt-bindings: arm/npcm: Add binding for global control registers (GCR)

A nuvoton,*-gcr node is present in nuvoton-common-npcm7xx.dtsi and will
be added to nuvoton-wpcm450.dtsi. It is necessary for the NPCM7xx and
WPCM450 pinctrl drivers, and may later be used to retrieve SoC model and
version information.

This patch adds a binding to describe this node.

Signed-off-by: Jonathan Neuschäfer <[email protected]>
---
.../bindings/arm/npcm/nuvoton,gcr.yaml | 38 +++++++++++++++++++
1 file changed, 38 insertions(+)
create mode 100644 Documentation/devicetree/bindings/arm/npcm/nuvoton,gcr.yaml

diff --git a/Documentation/devicetree/bindings/arm/npcm/nuvoton,gcr.yaml b/Documentation/devicetree/bindings/arm/npcm/nuvoton,gcr.yaml
new file mode 100644
index 0000000000000..3174279f7713a
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/npcm/nuvoton,gcr.yaml
@@ -0,0 +1,38 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/npcm/nuvoton,gcr.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Global Control Registers block in Nuvoton SoCs
+
+maintainers:
+ - Jonathan Neuschäfer <[email protected]>
+
+description: |
+ The Global Control Registers (GCR) are a block of registers in Nuvoton SoCs
+ that expose misc functionality such as chip model and version information or
+ pinmux settings.
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - nuvoton,wpcm450-gcr
+ - nuvoton,npcm750-gcr
+ - const: syscon
+ - const: simple-mfd
+ reg: true
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ gcr: gcr@800000 {
+ compatible = "nuvoton,npcm750-gcr", "syscon", "simple-mfd";
+ reg = <0x800000 0x1000>;
+ };
--
2.30.2


2021-06-04 08:03:50

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 1/8] dt-bindings: arm/npcm: Add binding for global control registers (GCR)

On Wed, Jun 2, 2021 at 2:04 PM Jonathan Neuschäfer
<[email protected]> wrote:

> A nuvoton,*-gcr node is present in nuvoton-common-npcm7xx.dtsi and will
> be added to nuvoton-wpcm450.dtsi. It is necessary for the NPCM7xx and
> WPCM450 pinctrl drivers, and may later be used to retrieve SoC model and
> version information.
>
> This patch adds a binding to describe this node.
>
> Signed-off-by: Jonathan Neuschäfer <[email protected]>

(...)

> + gcr: gcr@800000 {
> + compatible = "nuvoton,npcm750-gcr", "syscon", "simple-mfd";
> + reg = <0x800000 0x1000>;
> + };

gcr looks a bit idiomatic, isn't

syscon: syscon@... better?

Nitpicky though and looks good to me either way:
Reviewed-by: Linus Walleij <[email protected]>

Yours,
Linus Walleij

2021-06-13 09:22:43

by J. Neuschäfer

[permalink] [raw]
Subject: Re: [PATCH 1/8] dt-bindings: arm/npcm: Add binding for global control registers (GCR)

On Fri, Jun 04, 2021 at 10:00:18AM +0200, Linus Walleij wrote:
> On Wed, Jun 2, 2021 at 2:04 PM Jonathan Neuschäfer
> <[email protected]> wrote:
>
> > A nuvoton,*-gcr node is present in nuvoton-common-npcm7xx.dtsi and will
> > be added to nuvoton-wpcm450.dtsi. It is necessary for the NPCM7xx and
> > WPCM450 pinctrl drivers, and may later be used to retrieve SoC model and
> > version information.
> >
> > This patch adds a binding to describe this node.
> >
> > Signed-off-by: Jonathan Neuschäfer <[email protected]>
>
> (...)
>
> > + gcr: gcr@800000 {
> > + compatible = "nuvoton,npcm750-gcr", "syscon", "simple-mfd";
> > + reg = <0x800000 0x1000>;
> > + };
>
> gcr looks a bit idiomatic, isn't
>
> syscon: syscon@... better?

I think I'll go with syscon@..., because it's the right generic name,
but gcr for the label, matching current usage.

> Nitpicky though and looks good to me either way:
> Reviewed-by: Linus Walleij <[email protected]>

Thanks!


Jonathan Neuschäfer


Attachments:
(No filename) (1.03 kB)
signature.asc (849.00 B)
Download all attachments

2021-06-15 23:45:21

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 1/8] dt-bindings: arm/npcm: Add binding for global control registers (GCR)

On Wed, Jun 02, 2021 at 02:03:22PM +0200, Jonathan Neusch?fer wrote:
> A nuvoton,*-gcr node is present in nuvoton-common-npcm7xx.dtsi and will
> be added to nuvoton-wpcm450.dtsi. It is necessary for the NPCM7xx and
> WPCM450 pinctrl drivers, and may later be used to retrieve SoC model and
> version information.
>
> This patch adds a binding to describe this node.
>
> Signed-off-by: Jonathan Neusch?fer <[email protected]>
> ---
> .../bindings/arm/npcm/nuvoton,gcr.yaml | 38 +++++++++++++++++++
> 1 file changed, 38 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/arm/npcm/nuvoton,gcr.yaml
>
> diff --git a/Documentation/devicetree/bindings/arm/npcm/nuvoton,gcr.yaml b/Documentation/devicetree/bindings/arm/npcm/nuvoton,gcr.yaml
> new file mode 100644
> index 0000000000000..3174279f7713a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/arm/npcm/nuvoton,gcr.yaml
> @@ -0,0 +1,38 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/arm/npcm/nuvoton,gcr.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Global Control Registers block in Nuvoton SoCs
> +
> +maintainers:
> + - Jonathan Neusch?fer <[email protected]>
> +
> +description: |
> + The Global Control Registers (GCR) are a block of registers in Nuvoton SoCs
> + that expose misc functionality such as chip model and version information or
> + pinmux settings.
> +
> +properties:
> + compatible:
> + items:
> + - enum:
> + - nuvoton,wpcm450-gcr
> + - nuvoton,npcm750-gcr
> + - const: syscon
> + - const: simple-mfd

How is this a simple-mfd? There are no child nodes.

> + reg: true
> +
> +required:
> + - compatible
> + - reg
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + gcr: gcr@800000 {
> + compatible = "nuvoton,npcm750-gcr", "syscon", "simple-mfd";
> + reg = <0x800000 0x1000>;
> + };
> --
> 2.30.2

2021-06-19 20:26:26

by J. Neuschäfer

[permalink] [raw]
Subject: Re: [PATCH 1/8] dt-bindings: arm/npcm: Add binding for global control registers (GCR)

On Tue, Jun 15, 2021 at 05:43:21PM -0600, Rob Herring wrote:
> On Wed, Jun 02, 2021 at 02:03:22PM +0200, Jonathan Neuschäfer wrote:
> > A nuvoton,*-gcr node is present in nuvoton-common-npcm7xx.dtsi and will
> > be added to nuvoton-wpcm450.dtsi. It is necessary for the NPCM7xx and
> > WPCM450 pinctrl drivers, and may later be used to retrieve SoC model and
> > version information.
> >
> > This patch adds a binding to describe this node.
> >
> > Signed-off-by: Jonathan Neuschäfer <[email protected]>
> > ---
[...]
> > +properties:
> > + compatible:
> > + items:
> > + - enum:
> > + - nuvoton,wpcm450-gcr
> > + - nuvoton,npcm750-gcr
> > + - const: syscon
> > + - const: simple-mfd
>
> How is this a simple-mfd? There are no child nodes.

Some device trees, such as arch/arm/boot/dts/nuvoton-npcm730-gbs.dts,
have subnodes of the GCR node (specifically, they (ab)use mmio-mux to
set specific registers to specific values).

> > + reg: true
> > +
> > +required:
> > + - compatible
> > + - reg
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > + - |
> > + gcr: gcr@800000 {
> > + compatible = "nuvoton,npcm750-gcr", "syscon", "simple-mfd";
> > + reg = <0x800000 0x1000>;
> > + };

... I guess I should add a child node to the example, here.



Best regards,
Jonathan Neuschäfer


Attachments:
(No filename) (1.37 kB)
signature.asc (849.00 B)
Download all attachments