diff mbox series

[1/7] dt-bindings: clock: airoha: update reg mapping for EN7581 SoC.

Message ID 20240831-clk-en7581-syscon-v1-1-5c2683541068@kernel.org (mailing list archive)
State Changes Requested, archived
Headers show
Series clk: en7523: Update register mapping for EN7581 | expand

Commit Message

Lorenzo Bianconi Aug. 31, 2024, 7:18 a.m. UTC
clk-en7523 driver for EN7581 SoC is mapping all the scu memory region
while it is configuring the chip-scu one via a syscon. Update the reg
mapping definition for this device. This patch does not introduce any
backward incompatibility since the dts for EN7581 SoC is not public yet.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 .../devicetree/bindings/clock/airoha,en7523-scu.yaml         | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

Comments

Conor Dooley Sept. 2, 2024, 8:19 a.m. UTC | #1
On Sat, Aug 31, 2024 at 09:18:43AM +0200, Lorenzo Bianconi wrote:
> clk-en7523 driver for EN7581 SoC is mapping all the scu memory region
> while it is configuring the chip-scu one via a syscon. Update the reg
> mapping definition for this device. This patch does not introduce any
> backward incompatibility since the dts for EN7581 SoC is not public yet.

What does "not public yet" mean? The bindings are public, so someone
could have built a dtb without whatever non-public dts you currently
have. Do you mean, has not yet made it into a released kernel?

Cheers,
Conor.

> 
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
>  .../devicetree/bindings/clock/airoha,en7523-scu.yaml         | 12 +++---------
>  1 file changed, 3 insertions(+), 9 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml b/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml
> index 84353fd09428..ca426c328535 100644
> --- a/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml
> +++ b/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml
> @@ -34,8 +34,8 @@ properties:
>            - airoha,en7581-scu
>  
>    reg:
> -    minItems: 2
> -    maxItems: 4
> +    minItems: 1
> +    maxItems: 2
>  
>    "#clock-cells":
>      description:
> @@ -75,9 +75,6 @@ allOf:
>          reg:
>            items:
>              - description: scu base address
> -            - description: misc scu base address
> -            - description: reset base address
> -            - description: pb scu base address
>  
>  additionalProperties: false
>  
> @@ -98,10 +95,7 @@ examples:
>  
>        scuclk: clock-controller@1fa20000 {
>          compatible = "airoha,en7581-scu";
> -        reg = <0x0 0x1fa20000 0x0 0x400>,
> -              <0x0 0x1fb00000 0x0 0x90>,
> -              <0x0 0x1fb00830 0x0 0x8>,
> -              <0x0 0x1fbe3400 0x0 0xfc>;
> +        reg = <0x0 0x1fb00000 0x0 0x970>;
>                #clock-cells = <1>;
>                #reset-cells = <1>;
>        };
> 
> -- 
> 2.46.0
>
Lorenzo Bianconi Sept. 2, 2024, 8:39 a.m. UTC | #2
> On Sat, Aug 31, 2024 at 09:18:43AM +0200, Lorenzo Bianconi wrote:
> > clk-en7523 driver for EN7581 SoC is mapping all the scu memory region
> > while it is configuring the chip-scu one via a syscon. Update the reg
> > mapping definition for this device. This patch does not introduce any
> > backward incompatibility since the dts for EN7581 SoC is not public yet.
> 
> What does "not public yet" mean? The bindings are public, so someone
> could have built a dtb without whatever non-public dts you currently
> have. Do you mean, has not yet made it into a released kernel?

I was not so clear on this point, sorry for that. What I mean is these devices
(clock, pinctrl, ethernet, pwm, ...) are not supported in the dts upstream (in
the kernel or other corss-compiling systems link OpenWrt). For EN7581 SoC we
have just basic support upstream at the moment [0].
Since we have this weird hw architecture, we agreed with Angelo to post the full
dts just when all drivers are merged in order to avoid possible backward
compatibility issues adding more devices support into the kernel.

Regards,
Lorenzo

[0] https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/airoha/en7581.dtsi

> 
> Cheers,
> Conor.
> 
> > 
> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> > ---
> >  .../devicetree/bindings/clock/airoha,en7523-scu.yaml         | 12 +++---------
> >  1 file changed, 3 insertions(+), 9 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml b/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml
> > index 84353fd09428..ca426c328535 100644
> > --- a/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml
> > +++ b/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml
> > @@ -34,8 +34,8 @@ properties:
> >            - airoha,en7581-scu
> >  
> >    reg:
> > -    minItems: 2
> > -    maxItems: 4
> > +    minItems: 1
> > +    maxItems: 2
> >  
> >    "#clock-cells":
> >      description:
> > @@ -75,9 +75,6 @@ allOf:
> >          reg:
> >            items:
> >              - description: scu base address
> > -            - description: misc scu base address
> > -            - description: reset base address
> > -            - description: pb scu base address
> >  
> >  additionalProperties: false
> >  
> > @@ -98,10 +95,7 @@ examples:
> >  
> >        scuclk: clock-controller@1fa20000 {
> >          compatible = "airoha,en7581-scu";
> > -        reg = <0x0 0x1fa20000 0x0 0x400>,
> > -              <0x0 0x1fb00000 0x0 0x90>,
> > -              <0x0 0x1fb00830 0x0 0x8>,
> > -              <0x0 0x1fbe3400 0x0 0xfc>;
> > +        reg = <0x0 0x1fb00000 0x0 0x970>;
> >                #clock-cells = <1>;
> >                #reset-cells = <1>;
> >        };
> > 
> > -- 
> > 2.46.0
> >
Rob Herring (Arm) Sept. 3, 2024, 3:04 p.m. UTC | #3
On Sat, Aug 31, 2024 at 09:18:43AM +0200, Lorenzo Bianconi wrote:
> clk-en7523 driver for EN7581 SoC is mapping all the scu memory region
> while it is configuring the chip-scu one via a syscon. Update the reg
> mapping definition for this device. This patch does not introduce any
> backward incompatibility since the dts for EN7581 SoC is not public yet.
> 
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
>  .../devicetree/bindings/clock/airoha,en7523-scu.yaml         | 12 +++---------
>  1 file changed, 3 insertions(+), 9 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml b/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml
> index 84353fd09428..ca426c328535 100644
> --- a/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml
> +++ b/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml
> @@ -34,8 +34,8 @@ properties:
>            - airoha,en7581-scu
>  
>    reg:
> -    minItems: 2
> -    maxItems: 4
> +    minItems: 1
> +    maxItems: 2

This should really have the 'items' list here instead of in the if/then 
schemas.
>  
>    "#clock-cells":
>      description:
> @@ -75,9 +75,6 @@ allOf:
>          reg:
>            items:
>              - description: scu base address
> -            - description: misc scu base address
> -            - description: reset base address
> -            - description: pb scu base address

And then this would be just 'maxItems: 1' and the other if 'minItems: 
2'.

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml b/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml
index 84353fd09428..ca426c328535 100644
--- a/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml
+++ b/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml
@@ -34,8 +34,8 @@  properties:
           - airoha,en7581-scu
 
   reg:
-    minItems: 2
-    maxItems: 4
+    minItems: 1
+    maxItems: 2
 
   "#clock-cells":
     description:
@@ -75,9 +75,6 @@  allOf:
         reg:
           items:
             - description: scu base address
-            - description: misc scu base address
-            - description: reset base address
-            - description: pb scu base address
 
 additionalProperties: false
 
@@ -98,10 +95,7 @@  examples:
 
       scuclk: clock-controller@1fa20000 {
         compatible = "airoha,en7581-scu";
-        reg = <0x0 0x1fa20000 0x0 0x400>,
-              <0x0 0x1fb00000 0x0 0x90>,
-              <0x0 0x1fb00830 0x0 0x8>,
-              <0x0 0x1fbe3400 0x0 0xfc>;
+        reg = <0x0 0x1fb00000 0x0 0x970>;
               #clock-cells = <1>;
               #reset-cells = <1>;
       };