Skip to contentSkip to conversation

add Meson8/Meson8b serial core clock handling

PATCH Superseded Martin Blumenstingl 3 participants 5 messages Oct 28, 2017 – Dec 6, 2017

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Martin Blumenstingl

author reviewer
#0 lore raw

cover add Meson8/Meson8b serial core clock handling

This patchset adds the tty/serial core clock handling to the UARTs on Meson8 and Meson8b.

Basically this is the Meson8 and Meson8b version of a patchset from Helmut Klein and Neil Armstrong, who implemented this for Meson GX (see [0]). Back then I asked Neil to drop Meson8b from his patchset because I was working on the Meson8 clock controller at that time.

This also removes the last users that rely on the "amlogic,meson-uart" binding. Removing that binding from the meson_uart driver is not part of this series though.

[0] http://lists.infradead.org/pipermail/linux-amlogic/2017-June/004173.html

Martin Blumenstingl (2):
ARM: dts: meson8: use stable UART bindings with correct gate clock
ARM: dts: meson8b: use stable UART bindings with correct gate clock

 arch/arm/boot/dts/meson8.dtsi  | 16 ++++++++++++----
 arch/arm/boot/dts/meson8b.dtsi | 16 ++++++++++++----
 2 files changed, 24 insertions(+), 8 deletions(-)
Signature · 1 line
2.14.3
author reviewer
#1 lore raw

PATCH 1/2 ARM: dts: meson8: use stable UART bindings with correct gate clock

Switch to the stable UART bindings and add the correct gate clocks to the non-AO UART nodes.
This fixes the non-AO UARTs if the bootloader didn't un-gate the clocks.

---
 arch/arm/boot/dts/meson8.dtsi | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)
arch/arm/boot/dts/meson8.dtsi +12 -4
index 661287806ead..eb3f8161eef0 100644
@@ -337,19 +337,27 @@
 };
 
 &uart_AO {
-	clocks = <&clkc CLKID_CLK81>;
+	compatible = "amlogic,meson8-uart", "amlogic,meson-uart";
+	clocks = <&clkc CLKID_XTAL>, <&clkc CLKID_CLK81>, <&clkc CLKID_CLK81>;
+	clock-names = "xtal", "pclk", "baud";
 };
 
 &uart_A {
-	clocks = <&clkc CLKID_CLK81>;
+	compatible = "amlogic,meson8-uart", "amlogic,meson-uart";
+	clocks = <&clkc CLKID_XTAL>, <&clkc CLKID_UART0>, <&clkc CLKID_CLK81>;
+	clock-names = "xtal", "pclk", "baud";
 };
 
 &uart_B {
-	clocks = <&clkc CLKID_CLK81>;
+	compatible = "amlogic,meson8-uart", "amlogic,meson-uart";
+	clocks = <&clkc CLKID_XTAL>, <&clkc CLKID_UART1>, <&clkc CLKID_CLK81>;
+	clock-names = "xtal", "pclk", "baud";
 };
 
 &uart_C {
-	clocks = <&clkc CLKID_CLK81>;
+	compatible = "amlogic,meson8-uart", "amlogic,meson-uart";
+	clocks = <&clkc CLKID_XTAL>, <&clkc CLKID_UART2>, <&clkc CLKID_CLK81>;
+	clock-names = "xtal", "pclk", "baud";
 };
 
 &usb0 {
Signature · 1 line
2.14.3
author reviewer
#2 lore raw

PATCH 2/2 ARM: dts: meson8b: use stable UART bindings with correct gate clock

In reply to Martin Blumenstingl

Switch to the stable UART bindings and add the correct gate clocks to the non-AO UART nodes.
This fixes the non-AO UARTs if the bootloader didn't un-gate the clocks.

---
 arch/arm/boot/dts/meson8b.dtsi | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)
arch/arm/boot/dts/meson8b.dtsi +12 -4
index 15ed84441d8d..070a28ec293f 100644
@@ -242,19 +242,27 @@
 };
 
 &uart_AO {
-	clocks = <&clkc CLKID_CLK81>;
+	compatible = "amlogic,meson8b-uart", "amlogic,meson-uart";
+	clocks = <&clkc CLKID_XTAL>, <&clkc CLKID_CLK81>, <&clkc CLKID_CLK81>;
+	clock-names = "xtal", "pclk", "baud";
 };
 
 &uart_A {
-	clocks = <&clkc CLKID_CLK81>;
+	compatible = "amlogic,meson8b-uart", "amlogic,meson-uart";
+	clocks = <&clkc CLKID_XTAL>, <&clkc CLKID_UART0>, <&clkc CLKID_CLK81>;
+	clock-names = "xtal", "pclk", "baud";
 };
 
 &uart_B {
-	clocks = <&clkc CLKID_CLK81>;
+	compatible = "amlogic,meson8b-uart", "amlogic,meson-uart";
+	clocks = <&clkc CLKID_XTAL>, <&clkc CLKID_UART1>, <&clkc CLKID_CLK81>;
+	clock-names = "xtal", "pclk", "baud";
 };
 
 &uart_C {
-	clocks = <&clkc CLKID_CLK81>;
+	compatible = "amlogic,meson8b-uart", "amlogic,meson-uart";
+	clocks = <&clkc CLKID_XTAL>, <&clkc CLKID_UART2>, <&clkc CLKID_CLK81>;
+	clock-names = "xtal", "pclk", "baud";
 };
 
 &usb0 {
Signature · 1 line
2.14.3
reviewer
#3 lore raw

cover add Meson8/Meson8b serial core clock handling

In reply to Martin Blumenstingl
Quoted 8 lines · Martin Blumenstingl

This patchset adds the tty/serial core clock handling to the UARTs on Meson8 and Meson8b.

Basically this is the Meson8 and Meson8b version of a patchset from Helmut Klein and Neil Armstrong, who implemented this for Meson GX (see [0]). Back then I asked Neil to drop Meson8b from his patchset because I was working on the Meson8 clock controller at that time.

Quoted 7 lines

This also removes the last users that rely on the "amlogic,meson-uart" binding. Removing that binding from the meson_uart driver is not part of this series though.

[0] http://lists.infradead.org/pipermail/linux-amlogic/2017-June/004173.html

Quoted 8 lines

Martin Blumenstingl (2):
ARM: dts: meson8: use stable UART bindings with correct gate clock
ARM: dts: meson8b: use stable UART bindings with correct gate clock

 arch/arm/boot/dts/meson8.dtsi  | 16 ++++++++++++----
 arch/arm/boot/dts/meson8b.dtsi | 16 ++++++++++++----
 2 files changed, 24 insertions(+), 8 deletions(-)
maintainer Applied
#4 lore raw

cover add Meson8/Meson8b serial core clock handling

Quoted 14 lines · Jerome Brunet
Quoted 13 lines · Martin Blumenstingl

This patchset adds the tty/serial core clock handling to the UARTs on Meson8 and Meson8b.

Basically this is the Meson8 and Meson8b version of a patchset from Helmut Klein and Neil Armstrong, who implemented this for Meson GX (see [0]). Back then I asked Neil to drop Meson8b from his patchset because I was working on the Meson8 clock controller at that time.

This also removes the last users that rely on the "amlogic,meson-uart" binding. Removing that binding from the meson_uart driver is not part of this series though.

Quoted 4 lines
Quoted 2 lines

[0] http://lists.infradead.org/pipermail/linux-amlogic/2017-June/004173.html

Applied to v4.16/dt with Jerome's ack.

Kevin