feelslikeautumn
Posts: 262
Joined: Wed Aug 09, 2017 9:51 pm

Raspberry Pi 2 v1.2

Tue Apr 24, 2018 5:42 pm

What device tree blob does the pi 2 v 1.2 use? Looking at https://github.com/raspberrypi/linux/tr ... s/broadcom there doesn't seem to be a device tree for the pi 2? Yet it is arm64 capable too?

User avatar
sakaki
Posts: 115
Joined: Sun Jul 16, 2017 1:11 pm

Re: Raspberry Pi 2 v1.2

Tue Apr 24, 2018 5:53 pm

feelslikeautumn wrote: What device tree blob does the pi 2 v 1.2 use? Looking at https://github.com/raspberrypi/linux/tr ... s/broadcom there doesn't seem to be a device tree for the pi 2? Yet it is arm64 capable too?
Well, FWIW I have been informed by a gentoo-on-rpi3-64bit user that if you do:

Code: Select all

# cp /boot/bcm2710-rpi-3-b.dtb /boot/bcm2709-rpi-2-b.dtb
Then the image will boot on an RPi2 v1.2. Haven't verified this myself, but if true, should work for any 64-bit distro.

hth, sakaki

User avatar
sakaki
Posts: 115
Joined: Sun Jul 16, 2017 1:11 pm

Re: Raspberry Pi 2 v1.2

Tue Apr 24, 2018 8:32 pm

Update: given that there is a 32-bit bcm2709-rpi-2-b.dts in /arch/arm/boot/dts, and that the 64-bit versions just do (e.g., for arch/arm64/boot/dts/broadcom/bcm2710-rpi-3-b.dts):

Code: Select all

#define RPI364

#include "../../../../arm/boot/dts/bcm2710-rpi-3-b.dts"
I guess if you just added a file arch/arm64/boot/dts/broadcom/bcm2709-rpi-2-b.dts with contents:

Code: Select all

#define RPI364

#include "../../../../arm/boot/dts/bcm2709-rpi-2-b.dts"
and did the necessary Makefile edits to pull it in for dtc, you would get a legitimate version ^-^

Although... the current Makefile does just specify the bcm2710-rpi-3-b.dtb as the CONFIG_ARCH_BCM2709 variant:

Code: Select all

/Makefile#L9

# SPDX-License-Identifier: GPL-2.0
# Enable fixups to support overlays on BCM2835 platforms

ifeq ($(CONFIG_ARCH_BCM2835),y)
DTC_FLAGS ?= [email protected] -H epapr
endif

dtb-$(CONFIG_ARCH_BCM2835) += bcm2837-rpi-3-b.dtb
dtb-$(CONFIG_ARCH_BCM2709) += bcm2710-rpi-3-b.dtb
dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-3-b.dtb
dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-3-b-plus.dtb

dts-dirs += ../overlays

dts-dirs	+= stingray
always		:= $(dtb-y)
subdir-y	:= $(dts-dirs)
clean-files	:= *.dtb
so maybe just renaming is better. Pass ^-^

hth, sakaki

feelslikeautumn
Posts: 262
Joined: Wed Aug 09, 2017 9:51 pm

Re: Raspberry Pi 2 v1.2

Tue Apr 24, 2018 9:32 pm

Thanks sakaki for looking into this!

I think maybe I should of posted this in the device-tree section of the forum. Mods?

I thought the device tree blobs were the same in 32 bit and 64 bit and could be used interchangeably? Maybe that is just for the pi3? Interesting that the makefile points bcm2709 to the pi3 dtb. Surely that is describing the wrong hardware then?......there are bits on the pi3 that the pi2 doesn't have?

Return to “General discussion”