diff mbox series

[2/4] arm64: dts: airoha: Add EN7581 clock node

Message ID 8465b7562bcf53a0adfdd4ae01b3ed94d6d5bc54.1712160869.git.lorenzo@kernel.org (mailing list archive)
State New, archived
Headers show
Series Introduce clock support for Airoha EN7581 SoC | expand

Commit Message

Lorenzo Bianconi April 3, 2024, 4:20 p.m. UTC
Introduce the Airoha EN7581 clock node in Airoha EN7581 dtsi

Tested-by: Zhengping Zhang <zhengping.zhang@airoha.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 arch/arm64/boot/dts/airoha/en7581.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

AngeloGioacchino Del Regno April 4, 2024, 8:47 a.m. UTC | #1
Il 03/04/24 18:20, Lorenzo Bianconi ha scritto:
> Introduce the Airoha EN7581 clock node in Airoha EN7581 dtsi
> 
> Tested-by: Zhengping Zhang <zhengping.zhang@airoha.com>
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
>   arch/arm64/boot/dts/airoha/en7581.dtsi | 9 +++++++++
>   1 file changed, 9 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/airoha/en7581.dtsi b/arch/arm64/boot/dts/airoha/en7581.dtsi
> index 55eb1762fb11..a1daaaef0de0 100644
> --- a/arch/arm64/boot/dts/airoha/en7581.dtsi
> +++ b/arch/arm64/boot/dts/airoha/en7581.dtsi
> @@ -2,6 +2,7 @@
>   
>   #include <dt-bindings/interrupt-controller/irq.h>
>   #include <dt-bindings/interrupt-controller/arm-gic.h>
> +#include <dt-bindings/clock/en7523-clk.h>
>   
>   / {
>   	interrupt-parent = <&gic>;
> @@ -150,5 +151,13 @@ uart1: serial@1fbf0000 {
>   			interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
>   			clock-frequency = <1843200>;
>   		};
> +
> +		scu: system-controller@1fa20000 {

Uhm, why is this not a clock-controller but a system-controller?

Cheers,
Angelo

> +			compatible = "airoha,en7581-scu";
> +			reg = <0x0 0x1fa20000 0x0 0x400>,
> +			      <0x0 0x1fb00000 0x0 0x1000>,
> +			      <0x0 0x1fbe3400 0x0 0xfc>;
> +			#clock-cells = <1>;
> +		};
>   	};
>   };
Lorenzo Bianconi April 4, 2024, 8:57 a.m. UTC | #2
> Il 03/04/24 18:20, Lorenzo Bianconi ha scritto:
> > Introduce the Airoha EN7581 clock node in Airoha EN7581 dtsi
> > 
> > Tested-by: Zhengping Zhang <zhengping.zhang@airoha.com>
> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> > ---
> >   arch/arm64/boot/dts/airoha/en7581.dtsi | 9 +++++++++
> >   1 file changed, 9 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/airoha/en7581.dtsi b/arch/arm64/boot/dts/airoha/en7581.dtsi
> > index 55eb1762fb11..a1daaaef0de0 100644
> > --- a/arch/arm64/boot/dts/airoha/en7581.dtsi
> > +++ b/arch/arm64/boot/dts/airoha/en7581.dtsi
> > @@ -2,6 +2,7 @@
> >   #include <dt-bindings/interrupt-controller/irq.h>
> >   #include <dt-bindings/interrupt-controller/arm-gic.h>
> > +#include <dt-bindings/clock/en7523-clk.h>
> >   / {
> >   	interrupt-parent = <&gic>;
> > @@ -150,5 +151,13 @@ uart1: serial@1fbf0000 {
> >   			interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
> >   			clock-frequency = <1843200>;
> >   		};
> > +
> > +		scu: system-controller@1fa20000 {
> 
> Uhm, why is this not a clock-controller but a system-controller?

I used the same approach used for en7523.dtsi. I guess it is done
that way because the registers come from scu (system control unit)
regmap, but I guess we can use clock-controller instead.

Regards,
Lorenzo

> 
> Cheers,
> Angelo
> 
> > +			compatible = "airoha,en7581-scu";
> > +			reg = <0x0 0x1fa20000 0x0 0x400>,
> > +			      <0x0 0x1fb00000 0x0 0x1000>,
> > +			      <0x0 0x1fbe3400 0x0 0xfc>;
> > +			#clock-cells = <1>;
> > +		};
> >   	};
> >   };
> 
> 
>
AngeloGioacchino Del Regno April 4, 2024, 9:12 a.m. UTC | #3
Il 04/04/24 10:57, Lorenzo Bianconi ha scritto:
>> Il 03/04/24 18:20, Lorenzo Bianconi ha scritto:
>>> Introduce the Airoha EN7581 clock node in Airoha EN7581 dtsi
>>>
>>> Tested-by: Zhengping Zhang <zhengping.zhang@airoha.com>
>>> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
>>> ---
>>>    arch/arm64/boot/dts/airoha/en7581.dtsi | 9 +++++++++
>>>    1 file changed, 9 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/airoha/en7581.dtsi b/arch/arm64/boot/dts/airoha/en7581.dtsi
>>> index 55eb1762fb11..a1daaaef0de0 100644
>>> --- a/arch/arm64/boot/dts/airoha/en7581.dtsi
>>> +++ b/arch/arm64/boot/dts/airoha/en7581.dtsi
>>> @@ -2,6 +2,7 @@
>>>    #include <dt-bindings/interrupt-controller/irq.h>
>>>    #include <dt-bindings/interrupt-controller/arm-gic.h>
>>> +#include <dt-bindings/clock/en7523-clk.h>
>>>    / {
>>>    	interrupt-parent = <&gic>;
>>> @@ -150,5 +151,13 @@ uart1: serial@1fbf0000 {
>>>    			interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
>>>    			clock-frequency = <1843200>;
>>>    		};
>>> +
>>> +		scu: system-controller@1fa20000 {
>>
>> Uhm, why is this not a clock-controller but a system-controller?
> 
> I used the same approach used for en7523.dtsi. I guess it is done
> that way because the registers come from scu (system control unit)
> regmap, but I guess we can use clock-controller instead.
> 

Yeah, comes from there but you're actually defining a node for a clock-controller,
not a system-controller... makes sense to define this as

	scuclk: clock-controller@1fa20000

...or something along that line (for the phandle) so that, if another scu related
node appears for whatever reason, we distinguish between scuxyz and scuclk.

Cheers

> Regards,
> Lorenzo
> 
>>
>> Cheers,
>> Angelo
>>
>>> +			compatible = "airoha,en7581-scu";
>>> +			reg = <0x0 0x1fa20000 0x0 0x400>,
>>> +			      <0x0 0x1fb00000 0x0 0x1000>,
>>> +			      <0x0 0x1fbe3400 0x0 0xfc>;
>>> +			#clock-cells = <1>;
>>> +		};
>>>    	};
>>>    };
>>
>>
>>
Lorenzo Bianconi April 4, 2024, 9:20 a.m. UTC | #4
> Il 04/04/24 10:57, Lorenzo Bianconi ha scritto:
> > > Il 03/04/24 18:20, Lorenzo Bianconi ha scritto:
> > > > Introduce the Airoha EN7581 clock node in Airoha EN7581 dtsi
> > > > 
> > > > Tested-by: Zhengping Zhang <zhengping.zhang@airoha.com>
> > > > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> > > > ---
> > > >    arch/arm64/boot/dts/airoha/en7581.dtsi | 9 +++++++++
> > > >    1 file changed, 9 insertions(+)
> > > > 
> > > > diff --git a/arch/arm64/boot/dts/airoha/en7581.dtsi b/arch/arm64/boot/dts/airoha/en7581.dtsi
> > > > index 55eb1762fb11..a1daaaef0de0 100644
> > > > --- a/arch/arm64/boot/dts/airoha/en7581.dtsi
> > > > +++ b/arch/arm64/boot/dts/airoha/en7581.dtsi
> > > > @@ -2,6 +2,7 @@
> > > >    #include <dt-bindings/interrupt-controller/irq.h>
> > > >    #include <dt-bindings/interrupt-controller/arm-gic.h>
> > > > +#include <dt-bindings/clock/en7523-clk.h>
> > > >    / {
> > > >    	interrupt-parent = <&gic>;
> > > > @@ -150,5 +151,13 @@ uart1: serial@1fbf0000 {
> > > >    			interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
> > > >    			clock-frequency = <1843200>;
> > > >    		};
> > > > +
> > > > +		scu: system-controller@1fa20000 {
> > > 
> > > Uhm, why is this not a clock-controller but a system-controller?
> > 
> > I used the same approach used for en7523.dtsi. I guess it is done
> > that way because the registers come from scu (system control unit)
> > regmap, but I guess we can use clock-controller instead.
> > 
> 
> Yeah, comes from there but you're actually defining a node for a clock-controller,
> not a system-controller... makes sense to define this as
> 
> 	scuclk: clock-controller@1fa20000
> 
> ...or something along that line (for the phandle) so that, if another scu related
> node appears for whatever reason, we distinguish between scuxyz and scuclk.

ack, I agree. I will fix it.

Regards,
Lorenzo

> 
> Cheers
> 
> > Regards,
> > Lorenzo
> > 
> > > 
> > > Cheers,
> > > Angelo
> > > 
> > > > +			compatible = "airoha,en7581-scu";
> > > > +			reg = <0x0 0x1fa20000 0x0 0x400>,
> > > > +			      <0x0 0x1fb00000 0x0 0x1000>,
> > > > +			      <0x0 0x1fbe3400 0x0 0xfc>;
> > > > +			#clock-cells = <1>;
> > > > +		};
> > > >    	};
> > > >    };
> > > 
> > > 
> > > 
> 
>
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/airoha/en7581.dtsi b/arch/arm64/boot/dts/airoha/en7581.dtsi
index 55eb1762fb11..a1daaaef0de0 100644
--- a/arch/arm64/boot/dts/airoha/en7581.dtsi
+++ b/arch/arm64/boot/dts/airoha/en7581.dtsi
@@ -2,6 +2,7 @@ 
 
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/clock/en7523-clk.h>
 
 / {
 	interrupt-parent = <&gic>;
@@ -150,5 +151,13 @@  uart1: serial@1fbf0000 {
 			interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
 			clock-frequency = <1843200>;
 		};
+
+		scu: system-controller@1fa20000 {
+			compatible = "airoha,en7581-scu";
+			reg = <0x0 0x1fa20000 0x0 0x400>,
+			      <0x0 0x1fb00000 0x0 0x1000>,
+			      <0x0 0x1fbe3400 0x0 0xfc>;
+			#clock-cells = <1>;
+		};
 	};
 };