[1/2] dt-bindings: arm: sti: addition of STi platform syscon

Message ID 20230211210500.9919-1-avolmat@me.com
State New
Headers
Series [1/2] dt-bindings: arm: sti: addition of STi platform syscon |

Commit Message

Alain Volmat Feb. 11, 2023, 9:04 p.m. UTC
  Addition of the various STi platform syscon node description.

Signed-off-by: Alain Volmat <avolmat@me.com>
---
 .../bindings/arm/sti/st,sti-syscon.yaml       | 46 +++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/sti/st,sti-syscon.yaml
  

Comments

Krzysztof Kozlowski Feb. 12, 2023, 4 p.m. UTC | #1
Thank you for your patch. There is something to discuss/improve. Few nits.

On 11/02/2023 22:04, Alain Volmat wrote:
> Addition of the various STi platform syscon node description.

Use imperative.
https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95

> 
> Signed-off-by: Alain Volmat <avolmat@me.com>
> ---
>  .../bindings/arm/sti/st,sti-syscon.yaml       | 46 +++++++++++++++++++
>  1 file changed, 46 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/arm/sti/st,sti-syscon.yaml
> 
> diff --git a/Documentation/devicetree/bindings/arm/sti/st,sti-syscon.yaml b/Documentation/devicetree/bindings/arm/sti/st,sti-syscon.yaml
> new file mode 100644
> index 000000000000..e4bbc90694b3
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/arm/sti/st,sti-syscon.yaml
> @@ -0,0 +1,46 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/arm/sti/st,sti-syscon.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: STMicroelectronics STi platform sysconfig entries


Drop "entries", does not look related to hardware.

> +
> +maintainers:
> +  - Patrice Chotard <patrice.chotard@foss.st.com>
> +
> +description: |
> +  Binding for the various sysconfig nodes used within the STi
> +  platform device-tree to point to some common configuration
> +  registers used by other nodes.
> +
> +properties:
> +  compatible:
> +    items:
> +      - enum:
> +          - st,stih407-sbc-syscfg
> +          - st,stih407-front-syscfg
> +          - st,stih407-rear-syscfg
> +          - st,stih407-flash-syscfg
> +          - st,stih407-sbc-reg-syscfg
> +          - st,stih407-core-syscfg
> +          - st,stih407-lpm-syscfg

How about putting them in some order?

> +      - const: syscon
> +
> +  reg:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    syscfg_sbc: sbc-syscfg@9620000 {

Generic node names, thus usually syscon or system-controller
> +...

Best regards,
Krzysztof
  
Krzysztof Kozlowski Feb. 12, 2023, 4:01 p.m. UTC | #2
On 11/02/2023 22:04, Alain Volmat wrote:
> Addition of the various STi platform syscon node description.
> 
> Signed-off-by: Alain Volmat <avolmat@me.com>
> ---
>  .../bindings/arm/sti/st,sti-syscon.yaml       | 46 +++++++++++++++++++
>  1 file changed, 46 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/arm/sti/st,sti-syscon.yaml

Ah, and one more - incorrect directory. This should be in soc, not arm.

Best regards,
Krzysztof
  
Alain Volmat Feb. 12, 2023, 8:09 p.m. UTC | #3
Thanks for the review.

On Sun, Feb 12, 2023 at 05:00:24PM +0100, Krzysztof Kozlowski wrote:
> Thank you for your patch. There is something to discuss/improve. Few nits.
> 
> On 11/02/2023 22:04, Alain Volmat wrote:
> > Addition of the various STi platform syscon node description.
> 
> Use imperative.
> https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95
> 
> > 
> > Signed-off-by: Alain Volmat <avolmat@me.com>
> > ---
> >  .../bindings/arm/sti/st,sti-syscon.yaml       | 46 +++++++++++++++++++
> >  1 file changed, 46 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/arm/sti/st,sti-syscon.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/arm/sti/st,sti-syscon.yaml b/Documentation/devicetree/bindings/arm/sti/st,sti-syscon.yaml
> > new file mode 100644
> > index 000000000000..e4bbc90694b3
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/arm/sti/st,sti-syscon.yaml
> > @@ -0,0 +1,46 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/arm/sti/st,sti-syscon.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: STMicroelectronics STi platform sysconfig entries
> 
> 
> Drop "entries", does not look related to hardware.
> 
> > +
> > +maintainers:
> > +  - Patrice Chotard <patrice.chotard@foss.st.com>
> > +
> > +description: |
> > +  Binding for the various sysconfig nodes used within the STi
> > +  platform device-tree to point to some common configuration
> > +  registers used by other nodes.
> > +
> > +properties:
> > +  compatible:
> > +    items:
> > +      - enum:
> > +          - st,stih407-sbc-syscfg
> > +          - st,stih407-front-syscfg
> > +          - st,stih407-rear-syscfg
> > +          - st,stih407-flash-syscfg
> > +          - st,stih407-sbc-reg-syscfg
> > +          - st,stih407-core-syscfg
> > +          - st,stih407-lpm-syscfg
> 
> How about putting them in some order?

Ok, changed to alphabet order

> 
> > +      - const: syscon
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    syscfg_sbc: sbc-syscfg@9620000 {
> 
> Generic node names, thus usually syscon or system-controller

Ok, changed to syscfg_sbc: syscon@9620000

I also move the file within bindings/soc/sti as mentioned in your other
reply.

> > +...
> 
> Best regards,
> Krzysztof
>
  

Patch

diff --git a/Documentation/devicetree/bindings/arm/sti/st,sti-syscon.yaml b/Documentation/devicetree/bindings/arm/sti/st,sti-syscon.yaml
new file mode 100644
index 000000000000..e4bbc90694b3
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/sti/st,sti-syscon.yaml
@@ -0,0 +1,46 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/sti/st,sti-syscon.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: STMicroelectronics STi platform sysconfig entries
+
+maintainers:
+  - Patrice Chotard <patrice.chotard@foss.st.com>
+
+description: |
+  Binding for the various sysconfig nodes used within the STi
+  platform device-tree to point to some common configuration
+  registers used by other nodes.
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - st,stih407-sbc-syscfg
+          - st,stih407-front-syscfg
+          - st,stih407-rear-syscfg
+          - st,stih407-flash-syscfg
+          - st,stih407-sbc-reg-syscfg
+          - st,stih407-core-syscfg
+          - st,stih407-lpm-syscfg
+      - const: syscon
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    syscfg_sbc: sbc-syscfg@9620000 {
+        compatible = "st,stih407-sbc-syscfg", "syscon";
+        reg = <0x9620000 0x1000>;
+    };
+
+...