diff mbox series

[3/3] arm64: apple: add uart gate clocks

Message ID 20210524182745.22923-4-sven@svenpeter.dev (mailing list archive)
State New, archived
Headers show
Series Apple M1 clock gate driver | expand

Commit Message

Sven Peter May 24, 2021, 6:27 p.m. UTC
Now that we have a driver for gate clocks add the proper topology for the
UART. These are already enabled by the bootloader but are part of the
clock topology used by devices yet to be implemented.

Signed-off-by: Sven Peter <sven@svenpeter.dev>
---
 arch/arm64/boot/dts/apple/t8103.dtsi | 36 +++++++++++++++++++++++++++-
 1 file changed, 35 insertions(+), 1 deletion(-)

Comments

Stephen Boyd May 26, 2021, 3:10 a.m. UTC | #1
Quoting Sven Peter (2021-05-24 11:27:45)
> Now that we have a driver for gate clocks add the proper topology for the
> UART. These are already enabled by the bootloader but are part of the
> clock topology used by devices yet to be implemented.
> 
> Signed-off-by: Sven Peter <sven@svenpeter.dev>
> ---
>  arch/arm64/boot/dts/apple/t8103.dtsi | 36 +++++++++++++++++++++++++++-
>  1 file changed, 35 insertions(+), 1 deletion(-)

Mostly an FYI; I will not pick up these dts patches in the clk tree. If
you can send these in a different series it makes my life easier because
then I can apply the whole thread without having to manually kick out
the dts bits from the mbox.
Sven Peter May 30, 2021, 11:11 a.m. UTC | #2
Hi,


On Wed, May 26, 2021, at 05:10, Stephen Boyd wrote:
> Quoting Sven Peter (2021-05-24 11:27:45)
> > Now that we have a driver for gate clocks add the proper topology for the
> > UART. These are already enabled by the bootloader but are part of the
> > clock topology used by devices yet to be implemented.
> > 
> > Signed-off-by: Sven Peter <sven@svenpeter.dev>
> > ---
> >  arch/arm64/boot/dts/apple/t8103.dtsi | 36 +++++++++++++++++++++++++++-
> >  1 file changed, 35 insertions(+), 1 deletion(-)
> 
> Mostly an FYI; I will not pick up these dts patches in the clk tree. If
> you can send these in a different series it makes my life easier because
> then I can apply the whole thread without having to manually kick out
> the dts bits from the mbox.
> 

Sure, I'll split the last patch from this series and send it as a one-off patch
once the rest has been reviewed and is acceptable :)

Thanks,

Sven
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/apple/t8103.dtsi b/arch/arm64/boot/dts/apple/t8103.dtsi
index a1e22a2ea2e5..b7c85b800efd 100644
--- a/arch/arm64/boot/dts/apple/t8103.dtsi
+++ b/arch/arm64/boot/dts/apple/t8103.dtsi
@@ -120,7 +120,7 @@  serial0: serial@235200000 {
 			 * TODO: figure out the clocking properly, there may
 			 * be a third selectable clock.
 			 */
-			clocks = <&clk24>, <&clk24>;
+			clocks = <&clock_uart0>, <&clk24>;
 			clock-names = "uart", "clk_uart_baud0";
 			status = "disabled";
 		};
@@ -131,5 +131,39 @@  aic: interrupt-controller@23b100000 {
 			interrupt-controller;
 			reg = <0x2 0x3b100000 0x0 0x8000>;
 		};
+
+		clock_sio_busif: clock-sio-busif@23b7001c0 {
+			compatible = "apple,t8103-gate-clock";
+			#clock-cells = <0>;
+			reg = <0x2 0x3b7001c0 0x0 0x4>;
+			clock-output-names = "clock_sio_busif";
+		};
+
+		clock_sio: clock-sio@23b7001c8 {
+			compatible = "apple,t8103-gate-clock";
+			#clock-cells = <0>;
+			reg = <0x2 0x3b7001c8 0x0 0x4>;
+			clocks = <&clock_sio_busif>;
+			clock-names = "clock_sio_busif";
+			clock-output-names = "clock_sio";
+		};
+
+		clock_uart_p: clock-uart-p@23b700220 {
+			reg = <0x2 0x3b700220 0 4>;
+			compatible = "apple,t8103-gate-clock";
+			#clock-cells = <0>;
+			clock-output-names = "clock_uart_p";
+			clocks = <&clock_sio>;
+			clock-names = "clock_sio";
+		};
+
+		clock_uart0: clock-uart0@23b700270 {
+			reg = <0x2 0x3b700270 0 4>;
+			compatible = "apple,t8103-gate-clock";
+			#clock-cells = <0>;
+			clock-output-names = "clock_uart0";
+			clocks = <&clock_uart_p>;
+			clock-names = "clock_uart_p";
+		};
 	};
 };