ARM: dts: bcm2835: Add Raspberry Pi Zero
Subsystems (4)
v3 cover ARM: dts: bcm2835: Add Raspberry Pi Zero
This patch series add support for Raspberry Pi Zero with USB host mode. It's based on the patch "ARM64: dts: bcm: Use a symlink to R-Pi dtsi files from arch=arm" from Ian Campbell. Currently there is a bug [1] which needs to fixed before because after applying these patch series the bug isn't reproducible anymore but not fixed.
The patches 1-3 fixes the USB DT settings for bcm283x. Patch 3 is only compile tested, so it would be nice if someone with a RPi 3 could test it. The last patch based on the work of Lubomir Rintel [2] and Noralf Tr?nnes [3].
Note: Patch 3 can't be cherry-picked because it depends on Patch 2.
Changes since V2:
- rebase on "ARM64: dts: bcm: Use a symlink to R-Pi dtsi files from arch=arm"
- add dtsi file to easily specify host mode for bcm283x boards
- drop all dwc2 changes (incl. USB otg/gadget support) because of known issues [4]
- add copyright and license to new dts file
Changes since V1:
- rebase to current linux-next
- add patches 1 - 4 for otg/gadget support
- add patch 5 with model compatible
- use polarity define for ACT LED
[1] - http://lists.infradead.org/pipermail/linux-rpi-kernel/2016-August/004216.html
[2] - http://lists.infradead.org/pipermail/linux-rpi-kernel/2016-February/003221.html
[3] - https://github.com/raspberrypi/linux/pull/1239/
[4] - http://lists.infradead.org/pipermail/linux-rpi-kernel/2016-August/004197.html
Stefan Wahren (5):
ARM: dts: bcm283x: Add missing USB clock
ARM: dts: bcm283x: Add dtsi for USB host mode
ARM64: dts: bcm283x: Use dtsi for USB host mode
DT: bindings: bcm: Add Raspberry Pi Zero
ARM: dts: bcm2835: Add Raspberry Pi Zero
.../devicetree/bindings/arm/bcm/brcm,bcm2835.txt | 4 ++ arch/arm/boot/dts/Makefile | 3 +- arch/arm/boot/dts/bcm2835-rpi-a-plus.dts | 1 + arch/arm/boot/dts/bcm2835-rpi-a.dts | 1 + arch/arm/boot/dts/bcm2835-rpi-b-plus.dts | 1 + arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts | 1 + arch/arm/boot/dts/bcm2835-rpi-b.dts | 1 + arch/arm/boot/dts/bcm2835-rpi-zero.dts | 40 ++++++++++++++++++++ arch/arm/boot/dts/bcm2836-rpi-2-b.dts | 1 + arch/arm/boot/dts/bcm283x-rpi-usb-host.dtsi | 3 ++ arch/arm/boot/dts/bcm283x.dtsi | 9 +++++ arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts | 1 + .../boot/dts/broadcom/bcm283x-rpi-usb-host.dtsi | 1 + 13 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boot/dts/bcm2835-rpi-zero.dts create mode 100644 arch/arm/boot/dts/bcm283x-rpi-usb-host.dtsi create mode 120000 arch/arm64/boot/dts/broadcom/bcm283x-rpi-usb-host.dtsi
Signature · 1 line
1.7.9.5
PATCH v3 1/5 ARM: dts: bcm283x: Add missing USB clock
According to the DWC2 binding an appropriate clock is required. This clock isn't handled by bcm2835 clock driver, so add a fixed clock to the bcm283x DT.
--- arch/arm/boot/dts/bcm283x.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+)
arch/arm/boot/dts/bcm283x.dtsi +9 -0
@@ -290,6 +290,8 @@ interrupts = <1 9>; #address-cells = <1>; #size-cells = <0>; + clocks = <&clk_usb>; + clock-names = "otg"; }; v3d: v3d at 7ec00000 {
@@ -317,5 +319,12 @@ clock-frequency = <19200000>; }; + clk_usb: clock at 4 { + compatible = "fixed-clock"; + reg = <4>; + #clock-cells = <0>; + clock-output-names = "otg"; + clock-frequency = <480000000>; + }; }; };
Signature · 1 line
1.7.9.5
PATCH v3 2/5 ARM: dts: bcm283x: Add dtsi for USB host mode
In reply to Stefan WahrenIn case dr_mode isn't passed via DT, the dwc2 defaults to OTG mode. But all Raspberry Pi boards here are designed only for host mode. So fix this issue by providing a dtsi file which set the dr_mode to host.
--- arch/arm/boot/dts/bcm2835-rpi-a-plus.dts | 1 + arch/arm/boot/dts/bcm2835-rpi-a.dts | 1 + arch/arm/boot/dts/bcm2835-rpi-b-plus.dts | 1 + arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts | 1 + arch/arm/boot/dts/bcm2835-rpi-b.dts | 1 + arch/arm/boot/dts/bcm2836-rpi-2-b.dts | 1 + arch/arm/boot/dts/bcm283x-rpi-usb-host.dtsi | 3 +++ 7 files changed, 9 insertions(+) create mode 100644 arch/arm/boot/dts/bcm283x-rpi-usb-host.dtsi
arch/arm/boot/dts/bcm2835-rpi-a-plus.dts +1 -0
@@ -1,6 +1,7 @@ /dts-v1/; #include "bcm2835.dtsi" #include "bcm2835-rpi.dtsi" +#include "bcm283x-rpi-usb-host.dtsi" / { compatible = "raspberrypi,model-a-plus", "brcm,bcm2835";
arch/arm/boot/dts/bcm2835-rpi-a.dts +1 -0
@@ -1,6 +1,7 @@ /dts-v1/; #include "bcm2835.dtsi" #include "bcm2835-rpi.dtsi" +#include "bcm283x-rpi-usb-host.dtsi" / { compatible = "raspberrypi,model-a", "brcm,bcm2835";
arch/arm/boot/dts/bcm2835-rpi-b-plus.dts +1 -0
@@ -2,6 +2,7 @@ #include "bcm2835.dtsi" #include "bcm2835-rpi.dtsi" #include "bcm283x-rpi-smsc9514.dtsi" +#include "bcm283x-rpi-usb-host.dtsi" / { compatible = "raspberrypi,model-b-plus", "brcm,bcm2835";
arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts +1 -0
@@ -2,6 +2,7 @@ #include "bcm2835.dtsi" #include "bcm2835-rpi.dtsi" #include "bcm283x-rpi-smsc9512.dtsi" +#include "bcm283x-rpi-usb-host.dtsi" / { compatible = "raspberrypi,model-b-rev2", "brcm,bcm2835";
arch/arm/boot/dts/bcm2835-rpi-b.dts +1 -0
@@ -2,6 +2,7 @@ #include "bcm2835.dtsi" #include "bcm2835-rpi.dtsi" #include "bcm283x-rpi-smsc9512.dtsi" +#include "bcm283x-rpi-usb-host.dtsi" / { compatible = "raspberrypi,model-b", "brcm,bcm2835";
arch/arm/boot/dts/bcm2836-rpi-2-b.dts +1 -0
@@ -2,6 +2,7 @@ #include "bcm2836.dtsi" #include "bcm2835-rpi.dtsi" #include "bcm283x-rpi-smsc9514.dtsi" +#include "bcm283x-rpi-usb-host.dtsi" / { compatible = "raspberrypi,2-model-b", "brcm,bcm2836";
arch/arm/boot/dts/bcm283x-rpi-usb-host.dtsi new file +3 -0
@@ -0,0 +1,3 @@ +&usb { + dr_mode = "host"; +};
Signature · 1 line
1.7.9.5
PATCH v3 2/5 ARM: dts: bcm283x: Add dtsi for USB host mode
Quoted 4 lines · Stefan Wahren
In case
dr_modeisn't passed via DT, the dwc2 defaults to OTG mode. But all Raspberry Pi boards here are designed only for host mode. So fix this issue by providing a dtsi file which set thedr_modeto host.
Can you explain what change this should cause for these boards? Is it just going to drop this message from dmesg:
dwc2 3f980000.usb: Configuration mismatch. dr_mode forced to host
or something else?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 800 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160822/7c8ce84d/attachment.sig>
PATCH v3 2/5 ARM: dts: bcm283x: Add dtsi for USB host mode
Hi Eric,
Quoted 10 lines
Eric Anholt <[email protected]> hat am 22. August 2016 um 19:57 geschrieben:
Quoted 4 lines · Stefan Wahren
In case
dr_modeisn't passed via DT, the dwc2 defaults to OTG mode. But all Raspberry Pi boards here are designed only for host mode. So fix this issue by providing a dtsi file which set thedr_modeto host.
Quoted 4 lines
Can you explain what change this should cause for these boards? Is it just going to drop this message from dmesg:
dwc2 3f980000.usb: Configuration mismatch.
dr_modeforced to host
IMO it isn't a message which could be ignored. The dwc2 tries to detected the USB role from compile configuration and hardware capabilities, but according to the decision table [1] we should provide the correct dr_mode which is import for FIFO configuration and so on.
Another problem that i see is that the USB behavior is influenced by compile settings in a unexpected way. With arm/configs/bcm2835_defconfig the driver is forced to host, but in a multiplatform config like arm64/configs/defconfig not. I would expect a more stable dr_mode.
At the end the dwc2 can't reliable detect the dr_mode because it depends on the board design.
Any concerns?
Stefan
Quoted 6 lines
or something else?
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH v3 3/5 ARM64: dts: bcm283x: Use dtsi for USB host mode
In reply to Stefan WahrenIn case dr_mode isn't passed via DT, the dwc2 driver defaults to OTG mode. But the Raspberry Pi 3 is designed only for host mode. So fix this issue by linking to the dtsi file which set the dr_mode to host.
--- arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts | 1 + .../boot/dts/broadcom/bcm283x-rpi-usb-host.dtsi | 1 + 2 files changed, 2 insertions(+) create mode 120000 arch/arm64/boot/dts/broadcom/bcm283x-rpi-usb-host.dtsi
arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts +1 -0
@@ -2,6 +2,7 @@ #include "bcm2837.dtsi" #include "bcm2835-rpi.dtsi" #include "bcm283x-rpi-smsc9514.dtsi" +#include "bcm283x-rpi-usb-host.dtsi" / { compatible = "raspberrypi,3-model-b", "brcm,bcm2837";
arch/arm64/boot/dts/broadcom/bcm283x-rpi-usb-host.dtsi new file +1 -0
@@ -0,0 +1 @@ +../../../../arm/boot/dts/bcm283x-rpi-usb-host.dtsi
Signature · 1 line
1.7.9.5
PATCH v3 3/5 ARM64: dts: bcm283x: Use dtsi for USB host mode
Hi Gerd,
Am 21.08.2016 um 17:10 schrieb Stefan Wahren:
Quoted 4 lines
In case
dr_modeisn't passed via DT, the dwc2 driver defaults to OTG mode. But the Raspberry Pi 3 is designed only for host mode. So fix this issue by linking to the dtsi file which set thedr_modeto host.
this patch is pending and the rest has been merged. Since i don't have a RPi 3 it's only compile tested.
Could you please test it (requires patch 1 and 2 of this series) on your RPi 3?
Regards
Stefan
Quoted 28 lines
Signed-off-by Stefan Wahren <[email protected]>--- arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts | 1 + .../boot/dts/broadcom/bcm283x-rpi-usb-host.dtsi | 1 + 2 files changed, 2 insertions(+) create mode 120000 arch/arm64/boot/dts/broadcom/bcm283x-rpi-usb-host.dtsiarch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts +1
-0@@ -2,6 +2,7 @@ #include "bcm2837.dtsi" #include "bcm2835-rpi.dtsi" #include "bcm283x-rpi-smsc9514.dtsi" +#include "bcm283x-rpi-usb-host.dtsi" / { compatible = "raspberrypi,3-model-b", "brcm,bcm2837";arch/arm64/boot/dts/broadcom/bcm283x-rpi-usb-host.dtsi new file +1
-0@@ -0,0 +1 @@ +../../../../arm/boot/dts/bcm283x-rpi-usb-host.dtsi
PATCH v3 3/5 ARM64: dts: bcm283x: Use dtsi for USB host mode
Quoted 8 lines · Stefan Wahren
Hi Gerd,
Am 21.08.2016 um 17:10 schrieb Stefan Wahren:
Quoted 4 lines
In case
dr_modeisn't passed via DT, the dwc2 driver defaults to OTG mode. But the Raspberry Pi 3 is designed only for host mode. So fix this issue by linking to the dtsi file which set thedr_modeto host.
Quoted 5 lines
this patch is pending and the rest has been merged. Since i don't have a RPi 3 it's only compile tested.
Could you please test it (requires patch 1 and 2 of this series) on your RPi 3?
Have a git tree to test? Patch doesn't apply cleanly (using 4.8-rc5 with eric's for-next branch which already has 1+2), seems to depend on more device tree changes.
Also usb is working fine for me on the rpi3 even without this, so why is this needed? Is dwc2 defaulting to otg mode a recent change?
cheers,
Gerd
PATCH v3 3/5 ARM64: dts: bcm283x: Use dtsi for USB host mode
Hi Gerd,
Am 07.09.2016 um 12:59 schrieb Gerd Hoffmann:
Quoted 8 lines · Stefan Wahren
Quoted 7 lines
Hi Gerd,
Am 21.08.2016 um 17:10 schrieb Stefan Wahren:
Quoted 4 lines
In case
dr_modeisn't passed via DT, the dwc2 driver defaults to OTG mode. But the Raspberry Pi 3 is designed only for host mode. So fix this issue by linking to the dtsi file which set thedr_modeto host.
Quoted 8 lines
Quoted 5 lines
this patch is pending and the rest has been merged. Since i don't have a RPi 3 it's only compile tested.
Could you please test it (requires patch 1 and 2 of this series) on your RPi 3?
Have a git tree to test? Patch doesn't apply cleanly (using 4.8-rc5 with eric's for-next branch which already has 1+2), seems to depend on more device tree changes.
as i wrote in the changelog the patch series based on Ian Campbell's patches
ARM: dts: Remove use of skeleton.dtsi from bcm283x.dtsi
ARM64: dts: bcm: Use a symlink to R-Pi dtsi files from arch=arm
Unfortunately i don't have a repo well prepared with this patch series. My development repo doesn't contain the final series V3 [1], but the master already has the necessary DT patches above.
Quoted 2 lines
Also usb is working fine for me on the rpi3 even without this, so why is this needed?
In case of a multiplatform config with following settings the driver isn't able to "detect" the role:
CONFIG_USB=yCONFIG_USB_OTG=yCONFIG_USB_DWC2=yCONFIG_USB_DWC2_DUAL_ROLE=yCONFIG_USB_PHY=yCONFIG_NOP_USB_XCEIV=yCONFIG_USB_GADGET=yCONFIG_USB_ZERO=y
Also please refer to my answer here [2] and this bug [3].
Quoted 1 line
Is dwc2 defaulting to otg mode a recent change?
No, it's a default for all OTG host controller in case no dr_mode is defined.
Regards
Stefan
[1] - https://github.com/lategoodbye/rpi-zero
[2] -
http://lists.infradead.org/pipermail/linux-rpi-kernel/2016-August/004242.html
[3] - http://marc.info/?l=linux-usb&m=147169822213074&w=2
Quoted 9 lines
cheers,
Gerd_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH v3 3/5 ARM64: dts: bcm283x: Use dtsi for USB host mode
Hi,
Quoted 2 lines
ARM: dts: Remove use of
skeleton.dtsifrombcm283x.dtsi
ARM64: dts: bcm: Use a symlink to R-Pi dtsi files from arch=arm
Picked them up.
Quoted 11 lines
In case of a multiplatform config with following settings the driver isn't able to "detect" the role:
CONFIG_USB=yCONFIG_USB_OTG=yCONFIG_USB_DWC2=yCONFIG_USB_DWC2_DUAL_ROLE=yCONFIG_USB_PHY=yCONFIG_NOP_USB_XCEIV=yCONFIG_USB_GADGET=yCONFIG_USB_ZERO=y
Configured my kernel that way so the test actually tests something ;)
And ... everything looks fine. usb ethernet works, and so does the usb keyboard. /proc/device-tree/soc/usb at 7e980000/dr_mode exists and contains "host".
cheers,
Gerd
PATCH v3 3/5 ARM64: dts: bcm283x: Use dtsi for USB host mode
Am 07.09.2016 um 16:17 schrieb Gerd Hoffmann:
Quoted 17 lines
Hi,
Quoted 2 lines
ARM: dts: Remove use of
skeleton.dtsifrombcm283x.dtsi
ARM64: dts: bcm: Use a symlink to R-Pi dtsi files from arch=armPicked them up.
Quoted 11 lines
In case of a multiplatform config with following settings the driver isn't able to "detect" the role:
CONFIG_USB=yCONFIG_USB_OTG=yCONFIG_USB_DWC2=yCONFIG_USB_DWC2_DUAL_ROLE=yCONFIG_USB_PHY=yCONFIG_NOP_USB_XCEIV=yCONFIG_USB_GADGET=yCONFIG_USB_ZERO=y
Quoted 8 lines
Configured my kernel that way so the test actually tests something ;)
And ... everything looks fine. usb ethernet works, and so does the usb keyboard.
/proc/device-tree/soc/usbat 7e980000/dr_mode exists and contains "host".Tested-by Gerd Hoffmann <[email protected]>
This patch hasn't been merged yet. Is there something wrong?
Stefan
PATCH v3 3/5 ARM64: dts: bcm283x: Use dtsi for USB host mode
Quoted 20 lines · Stefan Wahren
Am 07.09.2016 um 16:17 schrieb Gerd Hoffmann:
Quoted 19 lines
Hi,
Quoted 2 lines
ARM: dts: Remove use of
skeleton.dtsifrombcm283x.dtsi
ARM64: dts: bcm: Use a symlink to R-Pi dtsi files from arch=armPicked them up.
Quoted 11 lines
In case of a multiplatform config with following settings the driver isn't able to "detect" the role:
CONFIG_USB=yCONFIG_USB_OTG=yCONFIG_USB_DWC2=yCONFIG_USB_DWC2_DUAL_ROLE=yCONFIG_USB_PHY=yCONFIG_NOP_USB_XCEIV=yCONFIG_USB_GADGET=yCONFIG_USB_ZERO=yConfigured my kernel that way so the test actually tests something ;)
Quoted 8 lines
Quoted 6 lines
And ... everything looks fine. usb ethernet works, and so does the usb keyboard.
/proc/device-tree/soc/usbat 7e980000/dr_mode exists and contains "host".Tested-by Gerd Hoffmann <[email protected]>This patch hasn't been merged yet. Is there something wrong?
I hadn't bumped it back to todo from RFT. Also, is this a priority
patch, since submitting merges is a pain? Does USB break in some way
without it?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 800 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160923/c5dd2a13/attachment.sig>
PATCH v3 3/5 ARM64: dts: bcm283x: Use dtsi for USB host mode
Am 23.09.2016 um 10:15 schrieb Eric Anholt:
Quoted 26 lines
Quoted 24 lines · Stefan Wahren
Am 07.09.2016 um 16:17 schrieb Gerd Hoffmann:
Quoted 23 lines
Hi,
Quoted 2 lines
ARM: dts: Remove use of
skeleton.dtsifrombcm283x.dtsi
ARM64: dts: bcm: Use a symlink to R-Pi dtsi files from arch=armPicked them up.
Quoted 11 lines
In case of a multiplatform config with following settings the driver isn't able to "detect" the role:
CONFIG_USB=yCONFIG_USB_OTG=yCONFIG_USB_DWC2=yCONFIG_USB_DWC2_DUAL_ROLE=yCONFIG_USB_PHY=yCONFIG_NOP_USB_XCEIV=yCONFIG_USB_GADGET=yCONFIG_USB_ZERO=yConfigured my kernel that way so the test actually tests something ;)
And ... everything looks fine. usb ethernet works, and so does the usb keyboard.
/proc/device-tree/soc/usbat 7e980000/dr_mode exists and contains "host".
Quoted 5 lines
Quoted 3 lines
Quoted 2 lines
Tested-by Gerd Hoffmann <[email protected]>This patch hasn't been merged yet. Is there something wrong?
I hadn't bumped it back to todo from RFT. Also, is this a priority patch, since submitting merges is a pain?
No
Quoted 2 lines
Does USB break in some way
without it?
No. I only want know if this is still in queue and does someone care about this patch.
Thanks
Stefan
PATCH v3 3/5 ARM64: dts: bcm283x: Use dtsi for USB host mode
Quoted 30 lines · Stefan Wahren
Am 23.09.2016 um 10:15 schrieb Eric Anholt:
Quoted 29 lines
Quoted 27 lines · Stefan Wahren
Am 07.09.2016 um 16:17 schrieb Gerd Hoffmann:
Quoted 17 lines
Hi,
Quoted 2 lines
ARM: dts: Remove use of
skeleton.dtsifrombcm283x.dtsi
ARM64: dts: bcm: Use a symlink to R-Pi dtsi files from arch=armPicked them up.
Quoted 11 lines
In case of a multiplatform config with following settings the driver isn't able to "detect" the role:
CONFIG_USB=yCONFIG_USB_OTG=yCONFIG_USB_DWC2=yCONFIG_USB_DWC2_DUAL_ROLE=yCONFIG_USB_PHY=yCONFIG_NOP_USB_XCEIV=yCONFIG_USB_GADGET=yCONFIG_USB_ZERO=yQuoted 8 lines
Configured my kernel that way so the test actually tests something ;)
And ... everything looks fine. usb ethernet works, and so does the usb keyboard.
/proc/device-tree/soc/usbat 7e980000/dr_mode exists and contains "host".Tested-by Gerd Hoffmann <[email protected]>This patch hasn't been merged yet. Is there something wrong?
Quoted 8 lines
Quoted 2 lines
I hadn't bumped it back to todo from RFT. Also, is this a priority patch, since submitting merges is a pain?
No
Quoted 2 lines
Does USB break in some way
without it?No. I only want know if this is still in queue and does someone care about this patch.
It's in my queue now. Sorry for missing it!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 800 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160923/03281913/attachment.sig>
PATCH v3 3/5 ARM64: dts: bcm283x: Use dtsi for USB host mode
In reply to Stefan WahrenQuoted 6 lines · Stefan Wahren
In case
dr_modeisn't passed via DT, the dwc2 driver defaults to OTG mode. But the Raspberry Pi 3 is designed only for host mode. So fix this issue by linking to the dtsi file which set thedr_modeto host.Signed-off-by Stefan Wahren <[email protected]>
Applied Gerd's Tested-by and merged to bcm2835-dt-64-next.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 800 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20161017/1eb7a5d5/attachment.sig>
PATCH v3 4/5 DT: bindings: bcm: Add Raspberry Pi Zero
In reply to Stefan Wahren--- .../devicetree/bindings/arm/bcm/brcm,bcm2835.txt | 4 ++++ 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt +4 -0
@@ -38,6 +38,10 @@ Raspberry Pi Compute Module Required root node properties: compatible = "raspberrypi,compute-module", "brcm,bcm2835"; +Raspberry Pi Zero +Required root node properties: +compatible = "raspberrypi,model-zero", "brcm,bcm2835"; + Generic BCM2835 board Required root node properties: compatible = "brcm,bcm2835";
Signature · 1 line
1.7.9.5
PATCH v3 5/5 ARM: dts: bcm2835: Add Raspberry Pi Zero
In reply to Stefan WahrenThe Raspberry Pi Zero is a minified version of model A+. It's notable there is no PWR LED and the ACT LED is inverted. Additionally the Pi Zero is capable of the USB peripheral mode.
--- arch/arm/boot/dts/Makefile | 3 ++- arch/arm/boot/dts/bcm2835-rpi-zero.dts | 40 ++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boot/dts/bcm2835-rpi-zero.dts
arch/arm/boot/dts/Makefile +2 -1
@@ -69,7 +69,8 @@ dtb-$(CONFIG_ARCH_BCM2835) += \ bcm2835-rpi-b-rev2.dtb \ bcm2835-rpi-b-plus.dtb \ bcm2835-rpi-a-plus.dtb \ - bcm2836-rpi-2-b.dtb + bcm2836-rpi-2-b.dtb \ + bcm2835-rpi-zero.dtb dtb-$(CONFIG_ARCH_BCM_5301X) += \ bcm4708-asus-rt-ac56u.dtb \ bcm4708-asus-rt-ac68u.dtb \
arch/arm/boot/dts/bcm2835-rpi-zero.dts new file +40 -0
@@ -0,0 +1,40 @@ +/* + * Copyright (C) 2016 Stefan Wahren <[email protected]> + * + * The code contained herein is licensed under the GNU General Public + * License. You may obtain a copy of the GNU General Public License + * Version 2 or later at the following locations: + * + * http://www.opensource.org/licenses/gpl-license.html + * http://www.gnu.org/copyleft/gpl.html + */ + +/dts-v1/; +#include "bcm2835.dtsi" +#include "bcm2835-rpi.dtsi" +#include "bcm283x-rpi-usb-host.dtsi" + +/ { + compatible = "raspberrypi,model-zero", "brcm,bcm2835"; + model = "Raspberry Pi Zero"; + + leds { + act { + gpios = <&gpio 47 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&gpio { + pinctrl-0 = <&gpioout &alt0 &i2s_alt0 &alt3>; + + /* I2S interface */ + i2s_alt0: i2s_alt0 { + brcm,pins = <18 19 20 21>; + brcm,function = <BCM2835_FSEL_ALT0>; + }; +}; + +&hdmi { + hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>; +};
Signature · 1 line
1.7.9.5
v3 cover ARM: dts: bcm2835: Add Raspberry Pi Zero
In reply to Stefan WahrenQuoted 11 lines · Stefan Wahren
This patch series add support for Raspberry Pi Zero with USB host mode. It's based on the patch "ARM64: dts: bcm: Use a symlink to R-Pi dtsi files from arch=arm" from Ian Campbell. Currently there is a bug [1] which needs to fixed before because after applying these patch series the bug isn't reproducible anymore but not fixed.
The patches 1-3 fixes the USB DT settings for bcm283x. Patch 3 is only compile tested, so it would be nice if someone with a RPi 3 could test it. The last patch based on the work of Lubomir Rintel [2] and Noralf Tr?nnes [3].
Note: Patch 3 can't be cherry-picked because it depends on Patch 2.
All looks reasonable to me at a quick glance. I didn't validate any of the GPIO values etc.
The series,
v3 cover ARM: dts: bcm2835: Add Raspberry Pi Zero
In reply to Stefan WahrenQuoted 11 lines · Stefan Wahren
This patch series add support for Raspberry Pi Zero with USB host mode. It's based on the patch "ARM64: dts: bcm: Use a symlink to R-Pi dtsi files from arch=arm" from Ian Campbell. Currently there is a bug [1] which needs to fixed before because after applying these patch series the bug isn't reproducible anymore but not fixed.
The patches 1-3 fixes the USB DT settings for bcm283x. Patch 3 is only compile tested, so it would be nice if someone with a RPi 3 could test it. The last patch based on the work of Lubomir Rintel [2] and Noralf Tr?nnes [3].
Note: Patch 3 can't be cherry-picked because it depends on Patch 2.
Pulled this series minus the arm64 patch to bcm2835-dt-next. My Pi3
setup is down currently so I wasn't able to test it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 800 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160825/7609b790/attachment.sig>