ARM: dts: bcm283x: Fix PWM pin assignment
authorStefan Wahren <stefan.wahren@i2se.com>
Sat, 21 Apr 2018 11:28:34 +0000 (13:28 +0200)
committerEric Anholt <eric@anholt.net>
Mon, 23 Apr 2018 20:00:36 +0000 (13:00 -0700)
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 <baruch@tkos.co.il>
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.dtsi
arch/arm/boot/dts/bcm2836-rpi-2-b.dts
arch/arm/boot/dts/bcm2837-rpi-3-b.dts

index aa1fc7b..2cd9c5e 100644 (file)
        hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
 };
 
+&pwm {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio45>;
+       status = "okay";
+};
+
 &uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_gpio14>;
index 425f6b0..067d1f0 100644 (file)
        hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>;
 };
 
+&pwm {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio45>;
+       status = "okay";
+};
+
 &uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_gpio14>;
index effa195..cfbdaac 100644 (file)
        hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
 };
 
+&pwm {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio45>;
+       status = "okay";
+};
+
 &uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_gpio14>;
index 772ec3b..5641d16 100644 (file)
        hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
 };
 
+&pwm {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio45>;
+       status = "okay";
+};
+
 &uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_gpio14>;
index 434483d..31ff602 100644 (file)
        hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>;
 };
 
+&pwm {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio45>;
+       status = "okay";
+};
+
 &uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_gpio14>;
index 6c3cfaa..cb2d6d7 100644 (file)
        bus-width = <4>;
 };
 
-&pwm {
-       pinctrl-names = "default";
-       pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio45>;
-       status = "okay";
-};
-
 &usb {
        power-domains = <&power RPI_POWER_DOMAIN_USB>;
 };
index 5c339ad..2fef70a 100644 (file)
        hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
 };
 
+&pwm {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio45>;
+       status = "okay";
+};
+
 &uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_gpio14>;
index 0b31d99..cc39b6f 100644 (file)
        };
 };
 
+&pwm {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio41>;
+       status = "okay";
+};
+
 /* uart0 communicates with the BT module */
 &uart0 {
        pinctrl-names = "default";