* [PATCH 0/5] Extend UART support for Allwinner SoCs
@ 2013-03-06 15:29 Maxime Ripard
2013-03-06 15:29 ` [PATCH 1/5] ARM: sunxi: dt: Use clocks property instead of clock-frequency for the UARTs Maxime Ripard
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Maxime Ripard @ 2013-03-06 15:29 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
This patchset reworks a bit the UART support that is found in the DT
for Allwinner SoCs, which was quite limited until now.
It first switches to using the clocks property, then rework a bit the
DTSI to have only the UART available in the A10 and the A13 (the A10
has 8 UARTs, while A13 has only the uart1 and uart3).
Maxime Ripard (5):
ARM: sunxi: dt: Use clocks property instead of clock-frequency for
the UARTs
ARM: sunxi: dt: Move uart0 to sun4i-a10.dtsi
ARM: sunxi: dt: Add uart3 dt node
ARM: sunxi: dt: Add A10 UARTs to the dtsi.
ARM: sunxi: hackberry: Add UART muxing
arch/arm/boot/dts/sun4i-a10-hackberry.dts | 2 +
arch/arm/boot/dts/sun4i-a10.dtsi | 61 +++++++++++++++++++++++++++++
arch/arm/boot/dts/sunxi.dtsi | 14 +++----
3 files changed, 70 insertions(+), 7 deletions(-)
--
1.7.10.4
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/5] ARM: sunxi: dt: Use clocks property instead of clock-frequency for the UARTs
2013-03-06 15:29 [PATCH 0/5] Extend UART support for Allwinner SoCs Maxime Ripard
@ 2013-03-06 15:29 ` Maxime Ripard
2013-03-06 19:21 ` Emilio López
2013-03-06 15:29 ` [PATCH 2/5] ARM: sunxi: dt: Move uart0 to sun4i-a10.dtsi Maxime Ripard
` (3 subsequent siblings)
4 siblings, 1 reply; 7+ messages in thread
From: Maxime Ripard @ 2013-03-06 15:29 UTC (permalink / raw)
To: linux-arm-kernel
Commit 0bbeb3c3 ("of serial port driver - add clk_get_rate() support") made
possible to use directly a clock phandle instead of a raw frequency
specified in the clock frequency attribute, so let's use it.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
arch/arm/boot/dts/sunxi.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/sunxi.dtsi b/arch/arm/boot/dts/sunxi.dtsi
index 8b36abe..791c02a 100644
--- a/arch/arm/boot/dts/sunxi.dtsi
+++ b/arch/arm/boot/dts/sunxi.dtsi
@@ -65,7 +65,7 @@
interrupts = <1>;
reg-shift = <2>;
reg-io-width = <4>;
- clock-frequency = <24000000>;
+ clocks = <&osc>;
status = "disabled";
};
@@ -75,7 +75,7 @@
interrupts = <2>;
reg-shift = <2>;
reg-io-width = <4>;
- clock-frequency = <24000000>;
+ clocks = <&osc>;
status = "disabled";
};
};
--
1.7.10.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/5] ARM: sunxi: dt: Move uart0 to sun4i-a10.dtsi
2013-03-06 15:29 [PATCH 0/5] Extend UART support for Allwinner SoCs Maxime Ripard
2013-03-06 15:29 ` [PATCH 1/5] ARM: sunxi: dt: Use clocks property instead of clock-frequency for the UARTs Maxime Ripard
@ 2013-03-06 15:29 ` Maxime Ripard
2013-03-06 15:29 ` [PATCH 3/5] ARM: sunxi: dt: Add uart3 dt node Maxime Ripard
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Maxime Ripard @ 2013-03-06 15:29 UTC (permalink / raw)
To: linux-arm-kernel
The UART0 is only available on the Allwinner A10 SoCs, and not on the
A13, so move the uart0 node to sun4i-a10.dtsi.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
arch/arm/boot/dts/sun4i-a10.dtsi | 10 ++++++++++
arch/arm/boot/dts/sunxi.dtsi | 10 ----------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi
index 03d2b53..703e7cb 100644
--- a/arch/arm/boot/dts/sun4i-a10.dtsi
+++ b/arch/arm/boot/dts/sun4i-a10.dtsi
@@ -47,5 +47,15 @@
allwinner,pull = <0>;
};
};
+
+ uart0: uart at 01c28000 {
+ compatible = "snps,dw-apb-uart";
+ reg = <0x01c28000 0x400>;
+ interrupts = <1>;
+ reg-shift = <2>;
+ reg-io-width = <4>;
+ clocks = <&osc>;
+ status = "disabled";
+ };
};
};
diff --git a/arch/arm/boot/dts/sunxi.dtsi b/arch/arm/boot/dts/sunxi.dtsi
index 791c02a..4f78ef7 100644
--- a/arch/arm/boot/dts/sunxi.dtsi
+++ b/arch/arm/boot/dts/sunxi.dtsi
@@ -59,16 +59,6 @@
#interrupt-cells = <1>;
};
- uart0: uart at 01c28000 {
- compatible = "snps,dw-apb-uart";
- reg = <0x01c28000 0x400>;
- interrupts = <1>;
- reg-shift = <2>;
- reg-io-width = <4>;
- clocks = <&osc>;
- status = "disabled";
- };
-
uart1: uart at 01c28400 {
compatible = "snps,dw-apb-uart";
reg = <0x01c28400 0x400>;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/5] ARM: sunxi: dt: Add uart3 dt node
2013-03-06 15:29 [PATCH 0/5] Extend UART support for Allwinner SoCs Maxime Ripard
2013-03-06 15:29 ` [PATCH 1/5] ARM: sunxi: dt: Use clocks property instead of clock-frequency for the UARTs Maxime Ripard
2013-03-06 15:29 ` [PATCH 2/5] ARM: sunxi: dt: Move uart0 to sun4i-a10.dtsi Maxime Ripard
@ 2013-03-06 15:29 ` Maxime Ripard
2013-03-06 15:29 ` [PATCH 4/5] ARM: sunxi: dt: Add A10 UARTs to the dtsi Maxime Ripard
2013-03-06 15:29 ` [PATCH 5/5] ARM: sunxi: hackberry: Add UART muxing Maxime Ripard
4 siblings, 0 replies; 7+ messages in thread
From: Maxime Ripard @ 2013-03-06 15:29 UTC (permalink / raw)
To: linux-arm-kernel
Both A10 and A13 Allwinner SoCs have a Synopsys APB uart3 device
available, so add it to the sunxi.dtsi file
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
arch/arm/boot/dts/sunxi.dtsi | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/arm/boot/dts/sunxi.dtsi b/arch/arm/boot/dts/sunxi.dtsi
index 4f78ef7..b254ae1 100644
--- a/arch/arm/boot/dts/sunxi.dtsi
+++ b/arch/arm/boot/dts/sunxi.dtsi
@@ -68,5 +68,15 @@
clocks = <&osc>;
status = "disabled";
};
+
+ uart3: uart at 01c28c00 {
+ compatible = "snps,dw-apb-uart";
+ reg = <0x01c28c00 0x400>;
+ interrupts = <4>;
+ reg-shift = <2>;
+ reg-io-width = <4>;
+ clock-frequency = <24000000>;
+ status = "disabled";
+ };
};
};
--
1.7.10.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/5] ARM: sunxi: dt: Add A10 UARTs to the dtsi.
2013-03-06 15:29 [PATCH 0/5] Extend UART support for Allwinner SoCs Maxime Ripard
` (2 preceding siblings ...)
2013-03-06 15:29 ` [PATCH 3/5] ARM: sunxi: dt: Add uart3 dt node Maxime Ripard
@ 2013-03-06 15:29 ` Maxime Ripard
2013-03-06 15:29 ` [PATCH 5/5] ARM: sunxi: hackberry: Add UART muxing Maxime Ripard
4 siblings, 0 replies; 7+ messages in thread
From: Maxime Ripard @ 2013-03-06 15:29 UTC (permalink / raw)
To: linux-arm-kernel
The Allwinner A10 SoC has 8 available UARTs, which is 6 more than on the
A13, so add the missing UARTs to the sun4i-a10 dtsi.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
arch/arm/boot/dts/sun4i-a10.dtsi | 51 ++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi
index 703e7cb..0142ca0 100644
--- a/arch/arm/boot/dts/sun4i-a10.dtsi
+++ b/arch/arm/boot/dts/sun4i-a10.dtsi
@@ -57,5 +57,56 @@
clocks = <&osc>;
status = "disabled";
};
+
+ uart2: uart at 01c28800 {
+ compatible = "snps,dw-apb-uart";
+ reg = <0x01c28800 0x400>;
+ interrupts = <3>;
+ reg-shift = <2>;
+ reg-io-width = <4>;
+ clocks = <&osc>;
+ status = "disabled";
+ };
+
+
+ uart4: uart at 01c29000 {
+ compatible = "snps,dw-apb-uart";
+ reg = <0x01c29000 0x400>;
+ interrupts = <17>;
+ reg-shift = <2>;
+ reg-io-width = <4>;
+ clocks = <&osc>;
+ status = "disabled";
+ };
+
+ uart5: uart at 01c29400 {
+ compatible = "snps,dw-apb-uart";
+ reg = <0x01c29400 0x400>;
+ interrupts = <18>;
+ reg-shift = <2>;
+ reg-io-width = <4>;
+ clocks = <&osc>;
+ status = "disabled";
+ };
+
+ uart6: uart at 01c29800 {
+ compatible = "snps,dw-apb-uart";
+ reg = <0x01c29800 0x400>;
+ interrupts = <19>;
+ reg-shift = <2>;
+ reg-io-width = <4>;
+ clocks = <&osc>;
+ status = "disabled";
+ };
+
+ uart7: uart at 01c29c00 {
+ compatible = "snps,dw-apb-uart";
+ reg = <0x01c29c00 0x400>;
+ interrupts = <20>;
+ reg-shift = <2>;
+ reg-io-width = <4>;
+ clocks = <&osc>;
+ status = "disabled";
+ };
};
};
--
1.7.10.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 5/5] ARM: sunxi: hackberry: Add UART muxing
2013-03-06 15:29 [PATCH 0/5] Extend UART support for Allwinner SoCs Maxime Ripard
` (3 preceding siblings ...)
2013-03-06 15:29 ` [PATCH 4/5] ARM: sunxi: dt: Add A10 UARTs to the dtsi Maxime Ripard
@ 2013-03-06 15:29 ` Maxime Ripard
4 siblings, 0 replies; 7+ messages in thread
From: Maxime Ripard @ 2013-03-06 15:29 UTC (permalink / raw)
To: linux-arm-kernel
We previously relied on the bootloader to do the muxing of the UART for
the Hackberry. Don't rely on it anymore and use pinctrl.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
arch/arm/boot/dts/sun4i-a10-hackberry.dts | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/boot/dts/sun4i-a10-hackberry.dts b/arch/arm/boot/dts/sun4i-a10-hackberry.dts
index f84549a..97703fe 100644
--- a/arch/arm/boot/dts/sun4i-a10-hackberry.dts
+++ b/arch/arm/boot/dts/sun4i-a10-hackberry.dts
@@ -24,6 +24,8 @@
soc {
uart0: uart at 01c28000 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_pins_a>;
status = "okay";
};
};
--
1.7.10.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 1/5] ARM: sunxi: dt: Use clocks property instead of clock-frequency for the UARTs
2013-03-06 15:29 ` [PATCH 1/5] ARM: sunxi: dt: Use clocks property instead of clock-frequency for the UARTs Maxime Ripard
@ 2013-03-06 19:21 ` Emilio López
0 siblings, 0 replies; 7+ messages in thread
From: Emilio López @ 2013-03-06 19:21 UTC (permalink / raw)
To: linux-arm-kernel
Hello Maxime,
El 06/03/13 12:29, Maxime Ripard escribi?:
> Commit 0bbeb3c3 ("of serial port driver - add clk_get_rate() support") made
> possible to use directly a clock phandle instead of a raw frequency
> specified in the clock frequency attribute, so let's use it.
Aren't we using the 8250_dw driver since mainline's 1bea07f16d ("ARM:
sunxi: Use the Synosys APB UART instead of ns8250") though? That one
doesn't seem to have clock phandle support as of today.
I have two patches to add support to it and switch the UARTs to "clocks"
with a phandle as part of the clock gates series on my tree if you want
to have a look.
Emilio
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-03-06 19:21 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-06 15:29 [PATCH 0/5] Extend UART support for Allwinner SoCs Maxime Ripard
2013-03-06 15:29 ` [PATCH 1/5] ARM: sunxi: dt: Use clocks property instead of clock-frequency for the UARTs Maxime Ripard
2013-03-06 19:21 ` Emilio López
2013-03-06 15:29 ` [PATCH 2/5] ARM: sunxi: dt: Move uart0 to sun4i-a10.dtsi Maxime Ripard
2013-03-06 15:29 ` [PATCH 3/5] ARM: sunxi: dt: Add uart3 dt node Maxime Ripard
2013-03-06 15:29 ` [PATCH 4/5] ARM: sunxi: dt: Add A10 UARTs to the dtsi Maxime Ripard
2013-03-06 15:29 ` [PATCH 5/5] ARM: sunxi: hackberry: Add UART muxing Maxime Ripard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).