arm/arm64: Backport DTB support for Raspberry Pi Compute Module 3 to 4.19.y
Subsystems (5)
PATCH 1/3 ARM: dts: add Raspberry Pi Compute Module 3 and IO board
In reply to Cyril BruleboisFrom: Stefan Wahren <[email protected]>
commit a54fe8a6cf66828499b121c3c39c194b43b8ed94 upstream.
The Raspberry Pi Compute Module 3 (CM3) and the Raspberry Pi Compute Module 3 Lite (CM3L) are SoMs which contains a BCM2837 processor, 1 GB RAM and a GPIO expander. The CM3 has a 4 GB eMMC, but on the CM3L the eMMC is unpopulated and it's up to the user to connect their own SD/MMC device. The dtsi file is designed to work for both modules. There is also a matching carrier board which is called Compute Module IO Board V3.
--- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dts | 87 +++++++++++++++++++++++++++++++ arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi | 52 ++++++++++++++++++ 3 files changed, 140 insertions(+) create mode 100644 arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dts create mode 100644 arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi
arch/arm/boot/dts/Makefile +1 -0
@@ -81,6 +81,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += \ bcm2836-rpi-2-b.dtb \ bcm2837-rpi-3-b.dtb \ bcm2837-rpi-3-b-plus.dtb \ + bcm2837-rpi-cm3-io3.dtb \ bcm2835-rpi-zero.dtb \ bcm2835-rpi-zero-w.dtb dtb-$(CONFIG_ARCH_BCM_5301X) += \
arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dts new file +87 -0
87 lines not on this page · raw message
arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi new file +52 -0
52 lines not on this page · raw message
Signature · 1 line
2.11.0
PATCH 3/3 arm64: dts: broadcom: Use the .dtb name in the rule, rather than .dts
In reply to Cyril BruleboisFrom: Liviu Dudau <[email protected]>
commit 74cf77e8be35795b4cc57b7010bc348295e421b9 upstream.
Commit a7eb26392b893 ("arm64: dts: broadcom: Add reference to Compute Module IO Board V3") adds the bcm2837-rpi-cm3-io3.dts file as a target in the Makefile, rather than the .dtb name. This will skip the generation of the .dtb file at compile time and will fail the dtbs_install target.
--- arch/arm64/boot/dts/broadcom/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/broadcom/Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 dtb-$(CONFIG_ARCH_BCM2835) += bcm2837-rpi-3-b.dtb \ bcm2837-rpi-3-b-plus.dtb \ - bcm2837-rpi-cm3-io3.dts + bcm2837-rpi-cm3-io3.dtb subdir-y += northstar2 subdir-y += stingray
Signature · 1 line
2.11.0
cover arm/arm64: Backport DTB support for Raspberry Pi Compute Module 3 to 4.19.y
The Raspberry Pi Compute Module 3 gathers components that are already supported in 4.19.y kernels except there's no DTB for it. This small series of patches backports:
1. the DTB addition on the arm platform
2. the extension of this addition to the arm64 platform
3. the correction of this extension.
I chose to backport patch 2 and 3 separately instead of squashing them together but I can resubmit with patches 2 and 3 merged if that's desirable.
This was successfully tested on bare metal, in 64-bit mode, with an extra patch to the raspi3-firmware packages to get the DTB installed in the right place, under the right name (bcm2710-rpi-cm3.dtb) so that the bootloader finds it. The base kernel was 4.19.37-5 as packaged in Debian.
The summary of changes follows.
Liviu Dudau (1):
arm64: dts: broadcom: Use the .dtb name in the rule, rather than .dts
Stefan Wahren (2):
ARM: dts: add Raspberry Pi Compute Module 3 and IO board
arm64: dts: broadcom: Add reference to Compute Module IO Board V3
arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dts | 87 ++++++++++++++++++++++ arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi | 52 +++++++++++++ arch/arm64/boot/dts/broadcom/Makefile | 3 +- .../boot/dts/broadcom/bcm2837-rpi-cm3-io3.dts | 2 + 5 files changed, 144 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dts create mode 100644 arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi create mode 100644 arch/arm64/boot/dts/broadcom/bcm2837-rpi-cm3-io3.dts
PATCH 2/3 arm64: dts: broadcom: Add reference to Compute Module IO Board V3
From: Stefan Wahren <[email protected]>
commit a7eb26392b893bff92b1eb6483f4af3d2eb19510 upstream.
This adds a reference to the dts of the Compute Module IO Board V3 in arm, so we don't need to maintain the content in arm64.
--- arch/arm64/boot/dts/broadcom/Makefile | 3 ++- arch/arm64/boot/dts/broadcom/bcm2837-rpi-cm3-io3.dts | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 arch/arm64/boot/dts/broadcom/bcm2837-rpi-cm3-io3.dts
arch/arm64/boot/dts/broadcom/Makefile +2 -1
@@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 dtb-$(CONFIG_ARCH_BCM2835) += bcm2837-rpi-3-b.dtb \ - bcm2837-rpi-3-b-plus.dtb + bcm2837-rpi-3-b-plus.dtb \ + bcm2837-rpi-cm3-io3.dts subdir-y += northstar2 subdir-y += stingray
arch/arm64/boot/dts/broadcom/bcm2837-rpi-cm3-io3.dts new file +2 -0
@@ -0,0 +1,2 @@ +// SPDX-License-Identifier: GPL-2.0 +#include "arm/bcm2837-rpi-cm3-io3.dts"
Signature · 1 line
2.11.0
Re: [PATCH 1/3] ARM: dts: add Raspberry Pi Compute Module 3 and IO board
In reply to Cyril BruleboisHi Cyril,
Quoted 11 lines · Cyril Brulebois
From: Stefan Wahren <[email protected]>
commit
a54fe8a6cf66828499b121c3c39c194b43b8ed94upstream.The Raspberry Pi Compute Module 3 (CM3) and the Raspberry Pi Compute Module 3 Lite (CM3L) are SoMs which contains a BCM2837 processor, 1 GB RAM and a GPIO expander. The CM3 has a 4 GB eMMC, but on the CM3L the eMMC is unpopulated and it's up to the user to connect their own SD/MMC device. The dtsi file is designed to work for both modules. There is also a matching carrier board which is called Compute Module IO Board V3.
this patch series doesn't apply to the stable kernel rules.
Regards
Stefan
Re: [PATCH 1/3] ARM: dts: add Raspberry Pi Compute Module 3 and IO board
Quoted 15 lines · Stefan Wahren
Hi Cyril,
Quoted 11 lines · Cyril Brulebois
From: Stefan Wahren <[email protected]>
commit
a54fe8a6cf66828499b121c3c39c194b43b8ed94upstream.The Raspberry Pi Compute Module 3 (CM3) and the Raspberry Pi Compute Module 3 Lite (CM3L) are SoMs which contains a BCM2837 processor, 1 GB RAM and a GPIO expander. The CM3 has a 4 GB eMMC, but on the CM3L the eMMC is unpopulated and it's up to the user to connect their own SD/MMC device. The dtsi file is designed to work for both modules. There is also a matching carrier board which is called Compute Module IO Board V3.
Quoted 1 line
this patch series doesn't apply to the stable kernel rules.
I'm with Stefan. Cyril, how do you think this matches up with what:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
says?
thanks,
greg k-h
Re: [PATCH 1/3] ARM: dts: add Raspberry Pi Compute Module 3 and IO board
Hi Greg, Stefan,
Greg KH <[email protected]> (2019-07-16):
Quoted 16 lines · Stefan Wahren
Quoted 15 lines
Hi Cyril,
Quoted 11 lines · Cyril Brulebois
From: Stefan Wahren <[email protected]>
commit
a54fe8a6cf66828499b121c3c39c194b43b8ed94upstream.The Raspberry Pi Compute Module 3 (CM3) and the Raspberry Pi Compute Module 3 Lite (CM3L) are SoMs which contains a BCM2837 processor, 1 GB RAM and a GPIO expander. The CM3 has a 4 GB eMMC, but on the CM3L the eMMC is unpopulated and it's up to the user to connect their own SD/MMC device. The dtsi file is designed to work for both modules. There is also a matching carrier board which is called Compute Module IO Board V3.
Quoted 5 lines
Quoted 1 line
this patch series doesn't apply to the stable kernel rules.
I'm with Stefan. Cyril, how do you think this matches up with what:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
says?
First off, I'm sorry to have wasted everyone's time with this attempt at getting the DTB addition upstream'd so that other distributions/users could benefit from it as well; it's now been included downstream instead.
stable-kernel-rules has this entry that made me think this would be acceptable:
- New device IDs and quirks are also accepted.
To my non-expert eyes, a DTB looked similar to a bunch of device IDs, mapping specific hardware to the right modules and parameters. I thought that allowing device IDs to be added, mapping new HW to existing and known-to-be-working modules, was similar to what's happening with a DTB.
In hindsight, looking at say 4.9 or 4.19 (baselines for Debian kernels), I see that DTBs were fixed but never added. Maybe having an extra “(DTBs don't qualify)” in the documentation might prevent others from making the same mistake?
Cheers,
Signature · 1 line
Cyril Brulebois -- Debian Consultant @ DEBAMAX -- https://debamax.com/
Re: [PATCH 1/3] ARM: dts: add Raspberry Pi Compute Module 3 and IO board
Quoted 42 lines · Cyril Brulebois
Hi Greg, Stefan,
Greg KH <[email protected]> (2019-07-16):
Quoted 16 lines · Stefan Wahren
Quoted 15 lines
Hi Cyril,
Quoted 11 lines · Cyril Brulebois
From: Stefan Wahren <[email protected]>
commit
a54fe8a6cf66828499b121c3c39c194b43b8ed94upstream.The Raspberry Pi Compute Module 3 (CM3) and the Raspberry Pi Compute Module 3 Lite (CM3L) are SoMs which contains a BCM2837 processor, 1 GB RAM and a GPIO expander. The CM3 has a 4 GB eMMC, but on the CM3L the eMMC is unpopulated and it's up to the user to connect their own SD/MMC device. The dtsi file is designed to work for both modules. There is also a matching carrier board which is called Compute Module IO Board V3.
Quoted 5 lines
Quoted 1 line
this patch series doesn't apply to the stable kernel rules.
I'm with Stefan. Cyril, how do you think this matches up with what:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
says?First off, I'm sorry to have wasted everyone's time with this attempt at getting the DTB addition upstream'd so that other distributions/users could benefit from it as well; it's now been included downstream instead.
stable-kernel-rules has this entry that made me think this would be acceptable:
- New device IDs and quirks are also accepted.
To my non-expert eyes, a DTB looked similar to a bunch of device IDs, mapping specific hardware to the right modules and parameters. I thought that allowing device IDs to be added, mapping new HW to existing and known-to-be-working modules, was similar to what's happening with a DTB.
Quoted 4 lines
In hindsight, looking at say 4.9 or 4.19 (baselines for Debian kernels), I see that DTBs were fixed but never added. Maybe having an extra “(DTBs don't qualify)” in the documentation might prevent others from making the same mistake?
I don't think that anyone has made that same mistake in the past 5+ years that I can recall at the moment, so adding more text to the file probably will not really save us many issues like this :)
thanks,
greg k-h