]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
arm64: dts: allwinner: pine64: Prepare optional UART nodes with pinctrl
authorAndreas Färber <afaerber@suse.de>
Tue, 18 Apr 2017 19:25:38 +0000 (21:25 +0200)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Wed, 7 Jun 2017 13:25:44 +0000 (15:25 +0200)
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>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi

index 02b991df25dcacb202fe162b94c52fb8c2c15ba0..7c533b6d4ba9abb3c48ae7ce04e1e5fac0e647c3 100644 (file)
@@ -107,12 +107,41 @@ &ohci1 {
        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";
index 699afc53301a03785720534256c99111862f67c8..90dc4ec7948537d4618ddca8dfee9d7f50a01fff 100644 (file)
@@ -322,6 +322,21 @@ uart2_pins: uart2-pins {
                                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 {