Skip to content

Commit c4bb978

Browse files
lategoodbyeanholt
authored andcommitted
ARM: dts: bcm283x: Fix PWM pin assignment
All RPi 1 and 2 boards used the PWM (audio out) on pin 40 and 45. So it was easy to define them in bcm2835-rpi.dtsi. Starting with RPi 3 this wont work anymore, because it uses pin 40 and 41. Furthermore the Zero variants doesn't have audio out. This patch fixes this pin conflict by moving the PWM node to the board-level. Change summary: RPi 3 B: PWM1 45 -> 41 Zero, Zero W: PWM disabled all other: no functional change Reported-by: Baruch Siach <[email protected]> Signed-off-by: Stefan Wahren <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Eric Anholt <[email protected]>
1 parent 60cc43f commit c4bb978

File tree

8 files changed

+42
-6
lines changed

8 files changed

+42
-6
lines changed

arch/arm/boot/dts/bcm2835-rpi-a-plus.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,12 @@
101101
hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
102102
};
103103

104+
&pwm {
105+
pinctrl-names = "default";
106+
pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio45>;
107+
status = "okay";
108+
};
109+
104110
&uart0 {
105111
pinctrl-names = "default";
106112
pinctrl-0 = <&uart0_gpio14>;

arch/arm/boot/dts/bcm2835-rpi-a.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@
9696
hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>;
9797
};
9898

99+
&pwm {
100+
pinctrl-names = "default";
101+
pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio45>;
102+
status = "okay";
103+
};
104+
99105
&uart0 {
100106
pinctrl-names = "default";
101107
pinctrl-0 = <&uart0_gpio14>;

arch/arm/boot/dts/bcm2835-rpi-b-plus.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@
103103
hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
104104
};
105105

106+
&pwm {
107+
pinctrl-names = "default";
108+
pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio45>;
109+
status = "okay";
110+
};
111+
106112
&uart0 {
107113
pinctrl-names = "default";
108114
pinctrl-0 = <&uart0_gpio14>;

arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@
9696
hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
9797
};
9898

99+
&pwm {
100+
pinctrl-names = "default";
101+
pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio45>;
102+
status = "okay";
103+
};
104+
99105
&uart0 {
100106
pinctrl-names = "default";
101107
pinctrl-0 = <&uart0_gpio14>;

arch/arm/boot/dts/bcm2835-rpi-b.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@
9191
hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>;
9292
};
9393

94+
&pwm {
95+
pinctrl-names = "default";
96+
pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio45>;
97+
status = "okay";
98+
};
99+
94100
&uart0 {
95101
pinctrl-names = "default";
96102
pinctrl-0 = <&uart0_gpio14>;

arch/arm/boot/dts/bcm2835-rpi.dtsi

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,6 @@
8383
bus-width = <4>;
8484
};
8585

86-
&pwm {
87-
pinctrl-names = "default";
88-
pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio45>;
89-
status = "okay";
90-
};
91-
9286
&usb {
9387
power-domains = <&power RPI_POWER_DOMAIN_USB>;
9488
};

arch/arm/boot/dts/bcm2836-rpi-2-b.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@
4141
hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
4242
};
4343

44+
&pwm {
45+
pinctrl-names = "default";
46+
pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio45>;
47+
status = "okay";
48+
};
49+
4450
&uart0 {
4551
pinctrl-names = "default";
4652
pinctrl-0 = <&uart0_gpio14>;

arch/arm/boot/dts/bcm2837-rpi-3-b.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@
4242
};
4343
};
4444

45+
&pwm {
46+
pinctrl-names = "default";
47+
pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio41>;
48+
status = "okay";
49+
};
50+
4551
/* uart0 communicates with the BT module */
4652
&uart0 {
4753
pinctrl-names = "default";

0 commit comments

Comments
 (0)