Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1623793 > unrolled thread
| Started by | Andreas Färber <afaerber@suse.de> |
|---|---|
| First post | 2017-04-14 19:20 +0200 |
| Last post | 2017-04-18 21:40 +0200 |
| Articles | 5 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] arm64: dts: allwinner: a64: Add UART2 pin nodes Andreas Färber <afaerber@suse.de> - 2017-04-14 19:20 +0200
Re: [PATCH] arm64: dts: allwinner: a64: Add UART2 pin nodes Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-04-18 07:40 +0200
[PATCH] arm64: dts: allwinner: pine64: Prepare optional UART nodes with pinctrl Andreas Färber <afaerber@suse.de> - 2017-04-18 21:30 +0200
Re: [PATCH] arm64: dts: allwinner: pine64: Prepare optional UART nodes with pinctrl Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-04-19 17:00 +0200
Re: [PATCH] arm64: dts: allwinner: a64: Add UART2 pin nodes Andreas Färber <afaerber@suse.de> - 2017-04-18 21:40 +0200
| From | Andreas Färber <afaerber@suse.de> |
|---|---|
| Date | 2017-04-14 19:20 +0200 |
| Subject | [PATCH] arm64: dts: allwinner: a64: Add UART2 pin nodes |
| Message-ID | <twd33-3Pv-15@gated-at.bofh.it> |
UART2 is exposed on the Pi connector of Pine64. Make a pinctrl node
available at the SoC level, to simplify enabling UART2 via DT overlay.
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 1c64ea2d23f9..61d3a19659bf 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -285,6 +285,11 @@
pins = "PG8", "PG9";
function = "uart1";
};
+
+ uart2_pins: uart2-pins {
+ pins = "PB0", "PB1";
+ function = "uart2";
+ };
};
uart0: serial@1c28000 {
--
2.10.2
[toc] | [next] | [standalone]
| From | Maxime Ripard <maxime.ripard@free-electrons.com> |
|---|---|
| Date | 2017-04-18 07:40 +0200 |
| Message-ID | <txu1P-2go-1@gated-at.bofh.it> |
| In reply to | #1623793 |
[Multipart message — attachments visible in raw view] — view raw
On Fri, Apr 14, 2017 at 07:13:20PM +0200, Andreas Färber wrote: > UART2 is exposed on the Pi connector of Pine64. Make a pinctrl node > available at the SoC level, to simplify enabling UART2 via DT overlay. > > Signed-off-by: Andreas Färber <afaerber@suse.de> Applied, thanks! Could you also create the node in the pine64 DTS (with an explicit status = "disabled" in there) so that the overlay would be even easier to make ? Thanks, Maxime -- Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
[toc] | [prev] | [next] | [standalone]
| From | Andreas Färber <afaerber@suse.de> |
|---|---|
| Date | 2017-04-18 21:30 +0200 |
| Subject | [PATCH] arm64: dts: allwinner: pine64: Prepare optional UART nodes with pinctrl |
| Message-ID | <txGZ3-1zP-7@gated-at.bofh.it> |
| In reply to | #1625030 |
Pine64 exposes all A64 UARTs, not just UART0.
Since the pins can be used as GPIO, don't enable the new UART nodes by
default, but prepare the pinctrl settings to aid in activating them via
overlays, i.e., overriding the status property of &uartX nodes.
For UART4 (Euler) the safer route of not including RTS/CTS pins is chosen,
whereas for UART1 (Bluetooth) they are included.
Add the corresponding pinctrl nodes where missing.
Suggested-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
.../arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 29 ++++++++++++++++++++++
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 15 +++++++++++
2 files changed, 44 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
index db6c0f36999e..260fb12ac3fc 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
@@ -99,12 +99,41 @@
status = "okay";
};
+/* On Exp and Euler connectors */
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins_a>;
status = "okay";
};
+/* On Wifi/BT connector, with RTS/CTS */
+&uart1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
+ status = "disabled";
+};
+
+/* On Pi-2 connector */
+&uart2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart2_pins>;
+ status = "disabled";
+};
+
+/* On Euler connector */
+&uart3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart3_pins>;
+ status = "disabled";
+};
+
+/* On Euler connector, RTS/CTS optional */
+&uart4 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart4_pins>;
+ status = "disabled";
+};
+
&usb_otg {
dr_mode = "host";
status = "okay";
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 133810df06b9..c172c62447e8 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -292,6 +292,21 @@
pins = "PB0", "PB1";
function = "uart2";
};
+
+ uart3_pins: uart3-pins {
+ pins = "PD0", "PD1";
+ function = "uart3";
+ };
+
+ uart4_pins: uart4-pins {
+ pins = "PD2", "PD3";
+ function = "uart4";
+ };
+
+ uart4_rts_cts_pins: uart4-rts-cts-pins {
+ pins = "PD4", "PD5";
+ function = "uart4";
+ };
};
uart0: serial@1c28000 {
--
2.10.2
[toc] | [prev] | [next] | [standalone]
| From | Maxime Ripard <maxime.ripard@free-electrons.com> |
|---|---|
| Date | 2017-04-19 17:00 +0200 |
| Subject | Re: [PATCH] arm64: dts: allwinner: pine64: Prepare optional UART nodes with pinctrl |
| Message-ID | <txZfm-4Gn-81@gated-at.bofh.it> |
| In reply to | #1625565 |
[Multipart message — attachments visible in raw view] — view raw
On Tue, Apr 18, 2017 at 09:25:38PM +0200, Andreas Färber wrote: > Pine64 exposes all A64 UARTs, not just UART0. > > Since the pins can be used as GPIO, don't enable the new UART nodes by > default, but prepare the pinctrl settings to aid in activating them via > overlays, i.e., overriding the status property of &uartX nodes. > > For UART4 (Euler) the safer route of not including RTS/CTS pins is chosen, > whereas for UART1 (Bluetooth) they are included. > > Add the corresponding pinctrl nodes where missing. > > Suggested-by: Maxime Ripard <maxime.ripard@free-electrons.com> > Signed-off-by: Andreas Färber <afaerber@suse.de> Applied, thanks! Maxime -- Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
[toc] | [prev] | [next] | [standalone]
| From | Andreas Färber <afaerber@suse.de> |
|---|---|
| Date | 2017-04-18 21:40 +0200 |
| Message-ID | <txH8L-1CQ-17@gated-at.bofh.it> |
| In reply to | #1625030 |
Am 18.04.2017 um 07:34 schrieb Maxime Ripard: > On Fri, Apr 14, 2017 at 07:13:20PM +0200, Andreas Färber wrote: >> UART2 is exposed on the Pi connector of Pine64. Make a pinctrl node >> available at the SoC level, to simplify enabling UART2 via DT overlay. >> >> Signed-off-by: Andreas Färber <afaerber@suse.de> > > Applied, thanks! Thanks, that was fast. > Could you also create the node in the pine64 DTS (with an explicit > status = "disabled" in there) so that the overlay would be even easier > to make ? Makes sense. I went ahead and did it for all UART nodes then - careful, final patch is neither build- nor runtime-tested yet. Cheers, Andreas -- SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web