Skip to contentSkip to conversation

ARM: bcm2835: Add devicetree for the Raspberry Pi 3, for arm (32)

PATCH In review Gerd Hoffmann 4 participants 9 messages Jan 19, 2017 – Feb 8, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: bcm2835: Add devicetree for the Raspberry Pi 3, for arm (32)

---
 arch/arm/boot/dts/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/boot/dts/Makefile +2 -1
index 7327250..82a760d 100644
@@ -70,7 +70,8 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
 	bcm2835-rpi-b-plus.dtb \
 	bcm2835-rpi-a-plus.dtb \
 	bcm2836-rpi-2-b.dtb \
-	bcm2835-rpi-zero.dtb
+	bcm2835-rpi-zero.dtb \
+	../../../arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dtb
 dtb-$(CONFIG_ARCH_BCM_5301X) += \
 	bcm4708-asus-rt-ac56u.dtb \
 	bcm4708-asus-rt-ac68u.dtb \
Signature · 1 line
1.8.3.1
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Gerd Hoffmann
---
 arch/arm/boot/dts/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/boot/dts/Makefile +0 -0
index 7327250..82a760d 100644

arch/arm/boot/dts/Makefile dtb-$(CONFIG_ARCH_BCM2835) += \ · line 77

Quoted 9 lines
arch/arm/boot/dts/Makefile +2 -1
@@ -70,7 +70,8 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
 	bcm2835-rpi-b-plus.dtb \
 	bcm2835-rpi-a-plus.dtb \
 	bcm2836-rpi-2-b.dtb \
-	bcm2835-rpi-zero.dtb
+	bcm2835-rpi-zero.dtb \
+	../../../arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dtb
 dtb-$(CONFIG_ARCH_BCM_5301X) += \
 	bcm4708-asus-rt-ac56u.dtb \
 	bcm4708-asus-rt-ac68u.dtb \

This would be really nice to have.

ARM upstream folks, do you have any issues with this?
-------------- 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/20170121/dfd2ed71/attachment.sig>

#2 lore raw
Quoted 25 lines · Eric Anholt

[ Unknown signature status ]

Quoted 10 lines · Gerd Hoffmann
---
 arch/arm/boot/dts/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/boot/dts/Makefile +0 -0
index 7327250..82a760d 100644

arch/arm/boot/dts/Makefile dtb-$(CONFIG_ARCH_BCM2835) += \ · line 77

Quoted 9 lines
arch/arm/boot/dts/Makefile +2 -1
@@ -70,7 +70,8 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
 	bcm2835-rpi-b-plus.dtb \
 	bcm2835-rpi-a-plus.dtb \
 	bcm2836-rpi-2-b.dtb \
-	bcm2835-rpi-zero.dtb
+	bcm2835-rpi-zero.dtb \
+	../../../arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dtb
 dtb-$(CONFIG_ARCH_BCM_5301X) += \
 	bcm4708-asus-rt-ac56u.dtb \
 	bcm4708-asus-rt-ac68u.dtb \

This would be really nice to have.

Quoted 3 lines

ARM upstream folks, do you have any issues with this?

Absent any feedback from ARM maintainers, I think we're about ready to go with this.

Unfortunately, I just remembered yesterday that one of the requirements is that we not use these sorts of ../../../ references in the DT tree. Instead we have to use symlinks -- see arch/arm64/boot/dts/broadcom/ for how we did the last round of this.

I think just having links from arch/arm64/boot/dts/broadcom/bcm2837*.dts* to arch/arm/boot/dts/ would be the solution, then this Makefile could just reference bcm2837-rpi-3-b.dtb.

Would you be able to respin this?
-------------- 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/20170131/fc61b52e/attachment.sig>

#3 lore raw
Quoted 8 lines
Quoted 3 lines

arch/arm/boot/dts/Makefile dtb-$(CONFIG_ARCH_BCM2835) += \ · line 74

Quoted 3 lines
arch/arm/boot/dts/Makefile +2 -1
-	bcm2835-rpi-zero.dtb
+	bcm2835-rpi-zero.dtb \
+	../../../arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dtb

Unfortunately, I just remembered yesterday that one of the requirements is that we not use these sorts of ../../../ references in the DT tree. Instead we have to use symlinks -- see arch/arm64/boot/dts/broadcom/ for how we did the last round of this.

Yes, we did that with the *.dtsi include files. Not fully sure this is a requirement for the Makefile too.

Quoted 4 lines

I think just having links from arch/arm64/boot/dts/broadcom/bcm2837*.dts* to arch/arm/boot/dts/ would be the solution, then this Makefile could just reference bcm2837-rpi-3-b.dtb.

I suspect it is not that easy, last time I tried it didn't work. Will try again though.

cheers,
Gerd

#4 lore raw
Quoted 7 lines
Quoted 4 lines

I think just having links from arch/arm64/boot/dts/broadcom/bcm2837*.dts* to arch/arm/boot/dts/ would be the solution, then this Makefile could just reference bcm2837-rpi-3-b.dtb.

I suspect it is not that easy, last time I tried it didn't work. Will try again though.

Yep, dtbs_install fails:

[ ... ]
INSTALL arch/arm/boot/dts/bcm2835-rpi-b-plus.dtb INSTALL arch/arm/boot/dts/bcm2835-rpi-a-plus.dtb INSTALL arch/arm/boot/dts/bcm2836-rpi-2-b.dtb
INSTALL
cp: missing destination file operand after '/boot/dtbs/4.10.0-rc5+' Try 'cp --help' for more information. /root/linux/scripts/Makefile.dtbinst:41: recipe for target 'bcm2837-rpi-3-b.dts' failed
make[3]: *** [bcm2837-rpi-3-b.dts] Error 1 arch/arm/Makefile:348: recipe for target 'dtbs_install' failed make[2]: *** [dtbs_install] Error 2
Makefile:150: recipe for target 'sub-make' failed make[1]: *** [sub-make] Error 2
Makefile:24: recipe for target '__sub-make' failed
make: *** [__sub-make] Error 2

cheers,
Gerd

#5 lore raw
Quoted 11 lines · Gerd Hoffmann
Quoted 8 lines
Quoted 5 lines

I think just having links from arch/arm64/boot/dts/broadcom/bcm2837*.dts* to arch/arm/boot/dts/ would
be the solution, then this Makefile could just reference bcm2837-rpi-3-b.dtb.

I suspect it is not that easy, last time I tried it didn't work. Will try again though.

Yep, dtbs_install fails:

Quoted 15 lines

[ ... ]
? INSTALL arch/arm/boot/dts/bcm2835-rpi-b-plus.dtb
? INSTALL arch/arm/boot/dts/bcm2835-rpi-a-plus.dtb
? INSTALL arch/arm/boot/dts/bcm2836-rpi-2-b.dtb
? INSTALL?
cp: missing destination file operand after '/boot/dtbs/4.10.0-rc5+' Try 'cp --help' for more information. /root/linux/scripts/Makefile.dtbinst:41: recipe for target 'bcm2837-rpi-3-b.dts' failed
make[3]: *** [bcm2837-rpi-3-b.dts] Error 1 arch/arm/Makefile:348: recipe for target 'dtbs_install' failed make[2]: *** [dtbs_install] Error 2
Makefile:150: recipe for target 'sub-make' failed make[1]: *** [sub-make] Error 2
Makefile:24: recipe for target '__sub-make' failed

This is actually a problem I had to deal with way in the begging of ARM64. What was done in the github tree was to have the one of the DTS
files(in this case 64) #include the 32 bit dts. That way it's not
needed to have the symbolic link and install should work.

I know it's ulgy, but it works...

Take a look at:
https://github.com/raspberrypi/linux/blob/rpi-4.10.y/arch/arm64/boot/dt
s/broadcom/bcm2710-rpi-3-b.dts

Here is what the file contains:
#define RPI364

#include "../../../../arm/boot/dts/bcm2710-rpi-3-b.dts"

#6 lore raw

Am 02.02.2017 um 09:37 schrieb Michael Zoran:

Quoted 7 lines

This is actually a problem I had to deal with way in the begging of ARM64. What was done in the github tree was to have the one of the DTS
files(in this case 64) #include the 32 bit dts. That way it's not
needed to have the symbolic link and install should work.

I know it's ulgy, but it works...

Quoted 11 lines

Take a look at:
https://github.com/raspberrypi/linux/blob/rpi-4.10.y/arch/arm64/boot/dt
s/broadcom/bcm2710-rpi-3-b.dts

Here is what the file contains:
#define RPI364

#include "../../../../arm/boot/dts/bcm2710-rpi-3-b.dts"

This do not work in the context of the split device-tree repository [0] (where the directory structure differs).

[0]
https://git.kernel.org/cgit/linux/kernel/git/devicetree/devicetree-rebasing.git/

#7 lore raw
Quoted 23 lines · Stefan Wahren

Am 02.02.2017 um 09:37 schrieb Michael Zoran:

Quoted 14 lines

This is actually a problem I had to deal with way in the begging of ARM64.? What was done in the github tree was to have the one of the DTS
?? files(in this case 64) #include the 32 bit dts.? That way it's not
needed to have the symbolic link and install should work.

I know it's ulgy, but it works...

Take a look at:
https://github.com/raspberrypi/linux/blob/rpi-4.10.y/arch/arm64/boo
t/dt
s/broadcom/bcm2710-rpi-3-b.dts

Quoted 7 lines

Here is what the file contains:
#define RPI364

#include "../../../../arm/boot/dts/bcm2710-rpi-3-b.dts"

Quoted 7 lines

This do not work in the context of the split device-tree repository [0]?
(where the directory structure differs).

[0]?
https://git.kernel.org/cgit/linux/kernel/git/devicetree/devicetree-re
basing.git/

Well, two other options would be to simply duplicate the device tree files. I know that's a pain...

The other option is choose one or the other(arm64 vs. arm32), I would guess pick arm32. It works... And at this time, arm64 doesn't have a whole bunch of benefit on the RPI 3. Perhaps maybe a RPI 4 will come out someday and we will see more of a gain.

#8 lore raw
In reply to Gerd Hoffmann
Quoted 10 lines · Gerd Hoffmann
Quoted 7 lines
Quoted 4 lines

I think just having links from arch/arm64/boot/dts/broadcom/bcm2837*.dts* to arch/arm/boot/dts/ would be the solution, then this Makefile could just reference bcm2837-rpi-3-b.dtb.

I suspect it is not that easy, last time I tried it didn't work. Will try again though.

Yep, dtbs_install fails:

Quoted 16 lines

[ ... ]
INSTALL arch/arm/boot/dts/bcm2835-rpi-b-plus.dtb INSTALL arch/arm/boot/dts/bcm2835-rpi-a-plus.dtb INSTALL arch/arm/boot/dts/bcm2836-rpi-2-b.dtb
INSTALL
cp: missing destination file operand after '/boot/dtbs/4.10.0-rc5+' Try 'cp --help' for more information. /root/linux/scripts/Makefile.dtbinst:41: recipe for target 'bcm2837-rpi-3-b.dts' failed
make[3]: *** [bcm2837-rpi-3-b.dts] Error 1 arch/arm/Makefile:348: recipe for target 'dtbs_install' failed make[2]: *** [dtbs_install] Error 2
Makefile:150: recipe for target 'sub-make' failed make[1]: *** [sub-make] Error 2
Makefile:24: recipe for target '__sub-make' failed
make: *** [__sub-make] Error 2

Huh, I didn't see this when I tried it. I just sent out that version of
the patch.
-------------- 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/20170208/d251880b/attachment.sig>