Skip to content

Commit

Permalink
ARM: bcm283x: Define UART pinmuxing on board level
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stefan Wahren authored and Eric Anholt committed Aug 2, 2017
1 parent 3bfe25f commit 4188ea2
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 1 deletion.
6 changes: 6 additions & 0 deletions arch/arm/boot/dts/bcm2835-rpi-a-plus.dts
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,9 @@
&hdmi {
hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
};

&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_gpio14>;
status = "okay";
};
6 changes: 6 additions & 0 deletions arch/arm/boot/dts/bcm2835-rpi-a.dts
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,9 @@
&hdmi {
hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>;
};

&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_gpio14>;
status = "okay";
};
6 changes: 6 additions & 0 deletions arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,9 @@
&hdmi {
hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
};

&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_gpio14>;
status = "okay";
};
6 changes: 6 additions & 0 deletions arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,9 @@
&hdmi {
hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
};

&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_gpio14>;
status = "okay";
};
6 changes: 6 additions & 0 deletions arch/arm/boot/dts/bcm2835-rpi-b.dts
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,9 @@
&hdmi {
hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>;
};

&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_gpio14>;
status = "okay";
};
6 changes: 6 additions & 0 deletions arch/arm/boot/dts/bcm2835-rpi-zero.dts
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,9 @@
&hdmi {
hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
};

&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_gpio14>;
status = "okay";
};
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/bcm2835-rpi.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
};
};
Expand Down
6 changes: 6 additions & 0 deletions arch/arm/boot/dts/bcm2836-rpi-2-b.dts
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,9 @@
&hdmi {
hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
};

&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_gpio14>;
status = "okay";
};
10 changes: 10 additions & 0 deletions arch/arm/boot/dts/bcm2837-rpi-3-b.dts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,17 @@
};
};

/* 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";
};

Expand Down

0 comments on commit 4188ea2

Please sign in to comment.