ARM: bcm283x: Define UART pinmuxing on board level
authorStefan Wahren <stefan.wahren@i2se.com>
Sun, 30 Jul 2017 17:10:32 +0000 (19:10 +0200)
committerEric Anholt <eric@anholt.net>
Wed, 2 Aug 2017 22:17:36 +0000 (15:17 -0700)
Until RPI 3 and Zero W the pl011 (uart0) was always on pin 14/15. So in
order to take care of them and other boards in the future,
we need to define UART pinmuxing on board level.

This work based on Eric Anholt's patch "ARM: bcm2385: Don't force pl011
onto pins 14/15." and Fabian Vogt's patch "ARM64: dts: bcm2837: assign
uart0 to BT and uart1 to pin headers".

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Eric Anholt <eric@anholt.net>
arch/arm/boot/dts/bcm2835-rpi-a-plus.dts
arch/arm/boot/dts/bcm2835-rpi-a.dts
arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
arch/arm/boot/dts/bcm2835-rpi-b.dts
arch/arm/boot/dts/bcm2835-rpi-zero.dts
arch/arm/boot/dts/bcm2835-rpi.dtsi
arch/arm/boot/dts/bcm2836-rpi-2-b.dts
arch/arm/boot/dts/bcm2837-rpi-3-b.dts

index d070454..9f86649 100644 (file)
@@ -99,3 +99,9 @@
 &hdmi {
        hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
 };
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_gpio14>;
+       status = "okay";
+};
index 46d078e..4b1af06 100644 (file)
@@ -94,3 +94,9 @@
 &hdmi {
        hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>;
 };
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_gpio14>;
+       status = "okay";
+};
index 432088e..a846f1e 100644 (file)
 &hdmi {
        hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
 };
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_gpio14>;
+       status = "okay";
+};
index 4133bc2..e860964 100644 (file)
@@ -94,3 +94,9 @@
 &hdmi {
        hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
 };
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_gpio14>;
+       status = "okay";
+};
index 4d56fe3..5d77f3f 100644 (file)
@@ -89,3 +89,9 @@
 &hdmi {
        hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>;
 };
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_gpio14>;
+       status = "okay";
+};
index 79a20d5..7036240 100644 (file)
 &hdmi {
        hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
 };
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_gpio14>;
+       status = "okay";
+};
index e55b362..e36c392 100644 (file)
@@ -39,7 +39,7 @@
        };
 
        alt0: alt0 {
-               brcm,pins = <4 5 7 8 9 10 11 14 15>;
+               brcm,pins = <4 5 7 8 9 10 11>;
                brcm,function = <BCM2835_FSEL_ALT0>;
        };
 };
index bf19e8c..e8de414 100644 (file)
@@ -39,3 +39,9 @@
 &hdmi {
        hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
 };
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_gpio14>;
+       status = "okay";
+};
index 972f14d..20725ca 100644 (file)
        };
 };
 
+/* uart0 communicates with the BT module */
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_gpio32 &gpclk2_gpio43>;
+       status = "okay";
+};
+
+/* uart1 is mapped to the pin header */
 &uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart1_gpio14>;
        status = "okay";
 };