[v2,01/16] dt-bindings: clock: Fix node descriptions in uniphier-clock example

Message ID 20221207055405.30940-2-hayashi.kunihiko@socionext.com
State New
Headers
Series dt-bindings: soc: Introduce UniPhier miscellaneous register blocks and fix examples |

Commit Message

Kunihiko Hayashi Dec. 7, 2022, 5:53 a.m. UTC
  Prior to adding dt-bindings for SoC-dependent controllers, rename the
clock nodes their parent nodes to the generic names in the example.

And also fix the missing compatible string.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
---
 .../clock/socionext,uniphier-clock.yaml       | 21 +++++++++++--------
 1 file changed, 12 insertions(+), 9 deletions(-)
  

Comments

Krzysztof Kozlowski Dec. 8, 2022, 8:06 a.m. UTC | #1
On 07/12/2022 06:53, Kunihiko Hayashi wrote:
> Prior to adding dt-bindings for SoC-dependent controllers, rename the
> clock nodes their parent nodes to the generic names in the example.
> 
> And also fix the missing compatible string.
> 
> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
> ---
>  .../clock/socionext,uniphier-clock.yaml       | 21 +++++++++++--------
>  1 file changed, 12 insertions(+), 9 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/clock/socionext,uniphier-clock.yaml b/Documentation/devicetree/bindings/clock/socionext,uniphier-clock.yaml
> index 9a0cc7341630..672450a1ecda 100644
> --- a/Documentation/devicetree/bindings/clock/socionext,uniphier-clock.yaml
> +++ b/Documentation/devicetree/bindings/clock/socionext,uniphier-clock.yaml
> @@ -61,11 +61,12 @@ required:
>  
>  examples:
>    - |
> -    sysctrl@61840000 {
> -        compatible = "socionext,uniphier-sysctrl", "simple-mfd", "syscon";
> +    syscon@61840000 {
> +        compatible = "socionext,uniphier-ld11-sysctrl",
> +                     "simple-mfd", "syscon";
>          reg = <0x61840000 0x4000>;
>  
> -        clock {
> +        clock-controller {
>              compatible = "socionext,uniphier-ld11-clock";
>              #clock-cells = <1>;
>          };
> @@ -74,11 +75,12 @@ examples:
>      };
>  
>    - |
> -    mioctrl@59810000 {
> -        compatible = "socionext,uniphier-mioctrl", "simple-mfd", "syscon";
> +    syscon@59810000 {
> +        compatible = "socionext,uniphier-ld11-mioctrl",
> +                     "simple-mfd", "syscon";
>          reg = <0x59810000 0x800>;
>  
> -        clock {
> +        clock-controller {
>              compatible = "socionext,uniphier-ld11-mio-clock";
>              #clock-cells = <1>;
>          };
> @@ -87,11 +89,12 @@ examples:
>      };
>  
>    - |
> -    perictrl@59820000 {
> -        compatible = "socionext,uniphier-perictrl", "simple-mfd", "syscon";
> +    syscon@59820000 {
> +        compatible = "socionext,uniphier-ld11-perictrl",
> +                     "simple-mfd", "syscon";
>          reg = <0x59820000 0x200>;
>  
> -        clock {

These are all three same examples (no differences except compatibles),
so you can as well keep only one. You can also skip parent node,
otherwise you might keep getting warnings for this schema. The parent is
not that relevant here and its bindings (e.g.
socionext,uniphier-sysctrl.yaml) should include complete example -
parent with all the children.

Best regards,
Krzysztof
  
Kunihiko Hayashi Dec. 8, 2022, 3:09 p.m. UTC | #2
On 2022/12/08 17:06, Krzysztof Kozlowski wrote:
> On 07/12/2022 06:53, Kunihiko Hayashi wrote:
>> Prior to adding dt-bindings for SoC-dependent controllers, rename the
>> clock nodes their parent nodes to the generic names in the example.
>>
>> And also fix the missing compatible string.
>>
>> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
>> ---
>>   .../clock/socionext,uniphier-clock.yaml       | 21 +++++++++++--------
>>   1 file changed, 12 insertions(+), 9 deletions(-)
>>
>> diff --git
>> a/Documentation/devicetree/bindings/clock/socionext,uniphier-clock.yaml
>> b/Documentation/devicetree/bindings/clock/socionext,uniphier-clock.yaml
>> index 9a0cc7341630..672450a1ecda 100644
>> ---
>> a/Documentation/devicetree/bindings/clock/socionext,uniphier-clock.yaml
>> +++
>> b/Documentation/devicetree/bindings/clock/socionext,uniphier-clock.yaml
>> @@ -61,11 +61,12 @@ required:
>>
>>   examples:
>>     - |
>> -    sysctrl@61840000 {
>> -        compatible = "socionext,uniphier-sysctrl", "simple-mfd",
>> "syscon";
>> +    syscon@61840000 {
>> +        compatible = "socionext,uniphier-ld11-sysctrl",
>> +                     "simple-mfd", "syscon";
>>           reg = <0x61840000 0x4000>;
>>
>> -        clock {
>> +        clock-controller {
>>               compatible = "socionext,uniphier-ld11-clock";
>>               #clock-cells = <1>;
>>           };
>> @@ -74,11 +75,12 @@ examples:
>>       };
>>
>>     - |
>> -    mioctrl@59810000 {
>> -        compatible = "socionext,uniphier-mioctrl", "simple-mfd",
>> "syscon";
>> +    syscon@59810000 {
>> +        compatible = "socionext,uniphier-ld11-mioctrl",
>> +                     "simple-mfd", "syscon";
>>           reg = <0x59810000 0x800>;
>>
>> -        clock {
>> +        clock-controller {
>>               compatible = "socionext,uniphier-ld11-mio-clock";
>>               #clock-cells = <1>;
>>           };
>> @@ -87,11 +89,12 @@ examples:
>>       };
>>
>>     - |
>> -    perictrl@59820000 {
>> -        compatible = "socionext,uniphier-perictrl", "simple-mfd",
>> "syscon";
>> +    syscon@59820000 {
>> +        compatible = "socionext,uniphier-ld11-perictrl",
>> +                     "simple-mfd", "syscon";
>>           reg = <0x59820000 0x200>;
>>
>> -        clock {
> 
> These are all three same examples (no differences except compatibles),
> so you can as well keep only one. You can also skip parent node,
> otherwise you might keep getting warnings for this schema. The parent is
> not that relevant here and its bindings (e.g.
> socionext,uniphier-sysctrl.yaml) should include complete example -
> parent with all the children.
I understand.
I'll keep one and drop the parent node from the example.

Thank you,

---
Best Regards
Kunihiko Hayashi
  

Patch

diff --git a/Documentation/devicetree/bindings/clock/socionext,uniphier-clock.yaml b/Documentation/devicetree/bindings/clock/socionext,uniphier-clock.yaml
index 9a0cc7341630..672450a1ecda 100644
--- a/Documentation/devicetree/bindings/clock/socionext,uniphier-clock.yaml
+++ b/Documentation/devicetree/bindings/clock/socionext,uniphier-clock.yaml
@@ -61,11 +61,12 @@  required:
 
 examples:
   - |
-    sysctrl@61840000 {
-        compatible = "socionext,uniphier-sysctrl", "simple-mfd", "syscon";
+    syscon@61840000 {
+        compatible = "socionext,uniphier-ld11-sysctrl",
+                     "simple-mfd", "syscon";
         reg = <0x61840000 0x4000>;
 
-        clock {
+        clock-controller {
             compatible = "socionext,uniphier-ld11-clock";
             #clock-cells = <1>;
         };
@@ -74,11 +75,12 @@  examples:
     };
 
   - |
-    mioctrl@59810000 {
-        compatible = "socionext,uniphier-mioctrl", "simple-mfd", "syscon";
+    syscon@59810000 {
+        compatible = "socionext,uniphier-ld11-mioctrl",
+                     "simple-mfd", "syscon";
         reg = <0x59810000 0x800>;
 
-        clock {
+        clock-controller {
             compatible = "socionext,uniphier-ld11-mio-clock";
             #clock-cells = <1>;
         };
@@ -87,11 +89,12 @@  examples:
     };
 
   - |
-    perictrl@59820000 {
-        compatible = "socionext,uniphier-perictrl", "simple-mfd", "syscon";
+    syscon@59820000 {
+        compatible = "socionext,uniphier-ld11-perictrl",
+                     "simple-mfd", "syscon";
         reg = <0x59820000 0x200>;
 
-        clock {
+        clock-controller {
             compatible = "socionext,uniphier-ld11-peri-clock";
             #clock-cells = <1>;
         };