ARM: bcm283x: RPi 3 B+ support and other improvements
Subsystems (5)
v2 cover ARM: bcm283x: RPi 3 B+ support and other improvements
The main focus of the patch series is to provide support for the new Raspberry Pi 3 B+ . The rest are parts which missed the merge window for 4.17.
Since there are still some issues with LAN78XX, also apply Dave Stevenson's patches [1] before testing. But they are not required for the function of this series.
Relevant to all RPis : Patch #1, #6
Relevant to RPi 3 B : Patch #2, #7, #8
Relevant to RPi 3 B+ : Patch #3, #4, #5, #7, #8, #9
[1] - https://github.com/raspberrypi/linux/pull/2502
Changes in V2:
- add Reviewed-by from Eric and Rob
- point out that the LAN7515 has a integrated USB HUB
- fix node names in bcm283x-rpi-lan7515.dtsi
Stefan Wahren (9):
ARM: dts: bcm283x: Fix PWM pin assignment
ARM: dts: bcm2837: Add missing GPIOs of Expander
dt-bindings: bcm: Add Raspberry Pi 3 B+
ARM: dts: bcm2837: Add Raspberry Pi 3 B+
ARM: bcm2835_defconfig: Enable LAN78XX driver
ARM: bcm2835_defconfig: Enable VCHIQ driver
ARM: multi_v7_defconfig: Enable LAN and BT for RPi 3 B+
arm64: defconfig: Enable LAN and BT support for RPi 3 B+
arm64: dts: broadcom: Add reference to Raspberry Pi 3 B+
.../devicetree/bindings/arm/bcm/brcm,bcm2835.txt | 4 + arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm2835-rpi-a-plus.dts | 6 ++ arch/arm/boot/dts/bcm2835-rpi-a.dts | 6 ++ arch/arm/boot/dts/bcm2835-rpi-b-plus.dts | 6 ++ arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts | 6 ++ arch/arm/boot/dts/bcm2835-rpi-b.dts | 6 ++ arch/arm/boot/dts/bcm2835-rpi.dtsi | 6 -- arch/arm/boot/dts/bcm2836-rpi-2-b.dts | 6 ++ arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts | 108 +++++++++++++++++++++ arch/arm/boot/dts/bcm2837-rpi-3-b.dts | 26 ++++- arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi | 27 ++++++ arch/arm/configs/bcm2835_defconfig | 2 + arch/arm/configs/multi_v7_defconfig | 4 + arch/arm64/boot/dts/broadcom/Makefile | 3 +- .../boot/dts/broadcom/bcm2837-rpi-3-b-plus.dts | 2 + arch/arm64/configs/defconfig | 2 + 17 files changed, 213 insertions(+), 8 deletions(-) create mode 100644 arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts create mode 100644 arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi create mode 100644 arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b-plus.dts
Signature · 1 line
2.7.4
PATCH v2 1/9 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
--- arch/arm/boot/dts/bcm2835-rpi-a-plus.dts | 6 ++++++ arch/arm/boot/dts/bcm2835-rpi-a.dts | 6 ++++++ arch/arm/boot/dts/bcm2835-rpi-b-plus.dts | 6 ++++++ arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts | 6 ++++++ arch/arm/boot/dts/bcm2835-rpi-b.dts | 6 ++++++ arch/arm/boot/dts/bcm2835-rpi.dtsi | 6 ------ arch/arm/boot/dts/bcm2836-rpi-2-b.dts | 6 ++++++ arch/arm/boot/dts/bcm2837-rpi-3-b.dts | 6 ++++++ 8 files changed, 42 insertions(+), 6 deletions(-)
arch/arm/boot/dts/bcm2835-rpi-a-plus.dts +6 -0
@@ -101,6 +101,12 @@ 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>;
arch/arm/boot/dts/bcm2835-rpi-a.dts +6 -0
@@ -96,6 +96,12 @@ 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>;
arch/arm/boot/dts/bcm2835-rpi-b-plus.dts +6 -0
@@ -103,6 +103,12 @@ 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>;
arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts +6 -0
@@ -96,6 +96,12 @@ 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>;
arch/arm/boot/dts/bcm2835-rpi-b.dts +6 -0
@@ -91,6 +91,12 @@ 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>;
arch/arm/boot/dts/bcm2835-rpi.dtsi +0 -6
@@ -83,12 +83,6 @@ bus-width = <4>; }; -&pwm { - pinctrl-names = "default"; - pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio45>; - status = "okay"; -}; - &usb { power-domains = <&power RPI_POWER_DOMAIN_USB>; };
arch/arm/boot/dts/bcm2836-rpi-2-b.dts +6 -0
@@ -41,6 +41,12 @@ 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>;
arch/arm/boot/dts/bcm2837-rpi-3-b.dts +6 -0
@@ -42,6 +42,12 @@ }; }; +&pwm { + pinctrl-names = "default"; + pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio41>; + status = "okay"; +}; + /* uart0 communicates with the BT module */ &uart0 { pinctrl-names = "default";
Signature · 1 line
2.7.4
PATCH v2 2/9 ARM: dts: bcm2837: Add missing GPIOs of Expander
In reply to Stefan WahrenAfter commit a98d90e7d588 ("gpio: raspberrypi-exp: Driver for RPi3 GPIO expander via mailbox service") we are able to control the rest of the GPIOs of the RPi 3. So add all the missing parts (ACT LED, Wifi & BT control, HDMI detect) to the DT.
--- arch/arm/boot/dts/bcm2837-rpi-3-b.dts | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-)
arch/arm/boot/dts/bcm2837-rpi-3-b.dts +19 -1
@@ -20,9 +20,14 @@ leds { act { - gpios = <&gpio 47 GPIO_ACTIVE_HIGH>; + gpios = <&expgpio 2 GPIO_ACTIVE_HIGH>; }; }; + + wifi_pwrseq: wifi-pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&expgpio 1 GPIO_ACTIVE_HIGH>; + }; }; &firmware {
@@ -48,6 +53,10 @@ status = "okay"; }; +&hdmi { + hpd-gpios = <&expgpio 4 GPIO_ACTIVE_LOW>; +}; + /* uart0 communicates with the BT module */ &uart0 { pinctrl-names = "default";
@@ -57,6 +66,7 @@ bluetooth { compatible = "brcm,bcm43438-bt"; max-speed = <2000000>; + shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>; }; };
@@ -69,11 +79,19 @@ /* SDHCI is used to control the SDIO for wireless */ &sdhci { + #address-cells = <1>; + #size-cells = <0>; pinctrl-names = "default"; pinctrl-0 = <&emmc_gpio34>; status = "okay"; bus-width = <4>; non-removable; + mmc-pwrseq = <&wifi_pwrseq>; + + brcmf: wifi at 1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + }; }; /* SDHOST is used to drive the SD card */
Signature · 1 line
2.7.4
PATCH v2 3/9 dt-bindings: bcm: Add Raspberry Pi 3 B+
In reply to Stefan WahrenThis adds the root properties for the Raspberry Pi 3 B+
--- Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt | 4 ++++ 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt +4 -0
@@ -34,6 +34,10 @@ Raspberry Pi 3 Model B Required root node properties: compatible = "raspberrypi,3-model-b", "brcm,bcm2837"; +Raspberry Pi 3 Model B+ +Required root node properties: +compatible = "raspberrypi,3-model-b-plus", "brcm,bcm2837"; + Raspberry Pi Compute Module Required root node properties: compatible = "raspberrypi,compute-module", "brcm,bcm2835";
Signature · 1 line
2.7.4
PATCH v2 4/9 ARM: dts: bcm2837: Add Raspberry Pi 3 B+
In reply to Stefan WahrenThe Raspberry Pi 3 B+ has the following major differences compared to the model 3 B:
* Microchip LAN7515 (Gigabit Ethernet with integrated USB 2.0 HUB)
* Cypress CYW43455 (802.11n/ac and BT 4.2)
We need to add the USB LAN chip so the bootloader can add the MAC address. This is necessary because there ain't an EEPROM or a valid OTP.
--- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts | 108 +++++++++++++++++++++++++++++ arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi | 27 ++++++++ 3 files changed, 136 insertions(+) create mode 100644 arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts create mode 100644 arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi
arch/arm/boot/dts/Makefile +1 -0
@@ -75,6 +75,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += \ bcm2835-rpi-a-plus.dtb \ bcm2836-rpi-2-b.dtb \ bcm2837-rpi-3-b.dtb \ + bcm2837-rpi-3-b-plus.dtb \ bcm2835-rpi-zero.dtb \ bcm2835-rpi-zero-w.dtb dtb-$(CONFIG_ARCH_BCM_5301X) += \
arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts new file +108 -0
108 lines not on this page · raw message
arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi new file +27 -0
@@ -0,0 +1,27 @@ +// SPDX-License-Identifier: GPL-2.0 +/ { + aliases { + ethernet0 = ðernet; + }; +}; + +&usb { + usb-port at 1 { + compatible = "usb424,2514"; + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + usb-port at 1 { + compatible = "usb424,2514"; + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + ethernet: ethernet at 1 { + compatible = "usb424,7800"; + reg = <1>; + }; + }; + }; +};
Signature · 1 line
2.7.4
PATCH v2 5/9 ARM: bcm2835_defconfig: Enable LAN78XX driver
In reply to Stefan WahrenThis patch enables the necessary driver for Raspberry Pi 3 B+, which has a LAN7515 chip.
--- arch/arm/configs/bcm2835_defconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/configs/bcm2835_defconfig +1 -0
@@ -64,6 +64,7 @@ CONFIG_BLK_DEV_SD=y CONFIG_SCSI_CONSTANTS=y CONFIG_SCSI_SCAN_ASYNC=y CONFIG_NETDEVICES=y +CONFIG_USB_LAN78XX=y CONFIG_USB_USBNET=y CONFIG_USB_NET_SMSC95XX=y CONFIG_BRCMFMAC=m
Signature · 1 line
2.7.4
PATCH v2 6/9 ARM: bcm2835_defconfig: Enable VCHIQ driver
In reply to Stefan WahrenIn order to gain more test coverage (e.g. Kernel CI) enable the VCHIQ driver.
--- arch/arm/configs/bcm2835_defconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/configs/bcm2835_defconfig +1 -0
@@ -128,6 +128,7 @@ CONFIG_LEDS_TRIGGER_CAMERA=y CONFIG_DMADEVICES=y CONFIG_DMA_BCM2835=y CONFIG_STAGING=y +CONFIG_BCM2835_VCHIQ=m CONFIG_MAILBOX=y CONFIG_BCM2835_MBOX=y # CONFIG_IOMMU_SUPPORT is not set
Signature · 1 line
2.7.4
PATCH v2 7/9 ARM: multi_v7_defconfig: Enable LAN and BT for RPi 3 B+
In reply to Stefan WahrenThe Raspberry Pi 3 B+ has a Microchip LAN7515 (connect via USB) and a Cypress CYW43455 (connect via UART). This patch enables the necessary drivers.
--- arch/arm/configs/multi_v7_defconfig | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/configs/multi_v7_defconfig +4 -0
@@ -187,6 +187,8 @@ CONFIG_B53_MMAP_DRIVER=m CONFIG_B53_SRAB_DRIVER=m CONFIG_CAN_SUN4I=y CONFIG_BT=m +CONFIG_BT_HCIUART=m +CONFIG_BT_HCIUART_BCM=y CONFIG_BT_MRVL=m CONFIG_BT_MRVL_SDIO=m CONFIG_CFG80211=m
@@ -280,6 +282,7 @@ CONFIG_FIXED_PHY=y CONFIG_ROCKCHIP_PHY=y CONFIG_USB_PEGASUS=y CONFIG_USB_RTL8152=m +CONFIG_USB_LAN78XX=m CONFIG_USB_USBNET=y CONFIG_USB_NET_SMSC75XX=y CONFIG_USB_NET_SMSC95XX=y
@@ -360,6 +363,7 @@ CONFIG_SERIAL_ST_ASC=y CONFIG_SERIAL_ST_ASC_CONSOLE=y CONFIG_SERIAL_STM32=y CONFIG_SERIAL_STM32_CONSOLE=y +CONFIG_SERIAL_DEV_BUS=y CONFIG_HVC_DRIVER=y CONFIG_VIRTIO_CONSOLE=y CONFIG_I2C_CHARDEV=y
Signature · 1 line
2.7.4
PATCH v2 8/9 arm64: defconfig: Enable LAN and BT support for RPi 3 B+
In reply to Stefan WahrenThe Raspberry Pi 3 B+ has a Microchip LAN7515 (connect via USB) and a Cypress CYW43455 (connect via UART). This patch enables the necessary drivers.
--- arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/configs/defconfig +2 -0
@@ -159,6 +159,7 @@ CONFIG_BT_LEDS=y # CONFIG_BT_DEBUGFS is not set CONFIG_BT_HCIUART=m CONFIG_BT_HCIUART_LL=y +CONFIG_BT_HCIUART_BCM=y CONFIG_CFG80211=m CONFIG_MAC80211=m CONFIG_MAC80211_LEDS=y
@@ -239,6 +240,7 @@ CONFIG_ROCKCHIP_PHY=y CONFIG_USB_PEGASUS=m CONFIG_USB_RTL8150=m CONFIG_USB_RTL8152=m +CONFIG_USB_LAN78XX=m CONFIG_USB_USBNET=m CONFIG_USB_NET_DM9601=m CONFIG_USB_NET_SR9800=m
Signature · 1 line
2.7.4
PATCH v2 9/9 arm64: dts: broadcom: Add reference to Raspberry Pi 3 B+
In reply to Stefan WahrenThis adds a reference to the dts of the Raspberry Pi 3 B+ in arm, so don't need to maintain the content in arm64.
--- arch/arm64/boot/dts/broadcom/Makefile | 3 ++- arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b-plus.dts | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b-plus.dts
arch/arm64/boot/dts/broadcom/Makefile +2 -1
@@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 -dtb-$(CONFIG_ARCH_BCM2835) += bcm2837-rpi-3-b.dtb +dtb-$(CONFIG_ARCH_BCM2835) += bcm2837-rpi-3-b.dtb \ + bcm2837-rpi-3-b-plus.dtb subdir-y += northstar2 subdir-y += stingray
arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b-plus.dts new file +2 -0
@@ -0,0 +1,2 @@ +// SPDX-License-Identifier: GPL-2.0 +#include "arm/bcm2837-rpi-3-b-plus.dts"
Signature · 1 line
2.7.4
v2 cover ARM: bcm283x: RPi 3 B+ support and other improvements
In reply to Stefan WahrenQuoted 2 lines · Stefan Wahren
The main focus of the patch series is to provide support for the new Raspberry Pi 3 B+ . The rest are parts which missed the merge window for 4.17.
I've merged this series to my -next branches, and once some kbuilds come
back clean, I'll send PRs up.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180423/39c557ba/attachment.sig>