linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] arm/arm64: dts: Enable device-tree overlay support for RPi devices
@ 2022-04-10 22:59 Aurelien Jarno
  2022-04-10 22:59 ` [PATCH 1/2] arm64: dts: broadcom: " Aurelien Jarno
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Aurelien Jarno @ 2022-04-10 22:59 UTC (permalink / raw)
  To: linux-kernel
  Cc: Aurelien Jarno, Arnd Bergmann, Krzysztof Kozlowski,
	Olof Johansson, Rob Herring, devicetree, linux-arm-kernel,
	linux-rpi-kernel, soc

This patchset changes the generation of the Raspberry Pi devices DTB
files to improve the support for out-of-tree device-tree overlays, like
it has recently been done for the Nvidia SoCs.

I personally only need that for arm64, but I have added a similar patch
to do the same on arm.

Aurelien Jarno (2):
  arm64: dts: broadcom: Enable device-tree overlay support for RPi
    devices
  arm: dts: Enable device-tree overlay support for RPi devices

 arch/arm/boot/dts/Makefile            | 18 ++++++++++++++++++
 arch/arm64/boot/dts/broadcom/Makefile | 11 +++++++++++
 2 files changed, 29 insertions(+)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] arm64: dts: broadcom: Enable device-tree overlay support for RPi devices
  2022-04-10 22:59 [PATCH 0/2] arm/arm64: dts: Enable device-tree overlay support for RPi devices Aurelien Jarno
@ 2022-04-10 22:59 ` Aurelien Jarno
  2023-05-25  7:36   ` Uwe Kleine-König
  2022-04-10 22:59 ` [PATCH 2/2] arm: dts: " Aurelien Jarno
  2023-05-22  6:22 ` [PATCH 0/2] arm/arm64: " Uwe Kleine-König
  2 siblings, 1 reply; 5+ messages in thread
From: Aurelien Jarno @ 2022-04-10 22:59 UTC (permalink / raw)
  To: linux-kernel
  Cc: Aurelien Jarno, Arnd Bergmann, Krzysztof Kozlowski,
	Olof Johansson, Rob Herring, devicetree, linux-arm-kernel,
	linux-rpi-kernel, soc

Add the '-@' DTC option for the Raspberry Pi devices. This option
populates the '__symbols__' node that contains all the necessary symbols
for supporting device-tree overlays (for instance from the firmware or
the bootloader) on these devices.

The Rasbperry Pi devices are well known for their GPIO header, that
allow various "HATs" or other modules do be connected and this enables
users to create out-of-tree device-tree overlays for these modules.

Please note that this change does increase the size of the resulting DTB
by ~40%. For example, with v5.17 increase in size is as follows:

  bcm2711-rpi-400.dtb       26481 -> 36830 bytes
  bcm2711-rpi-4-b.dtb       26537 -> 36886 bytes
  bcm2711-rpi-cm4-io.dtb    26426 -> 36945 bytes
  bcm2837-rpi-3-a-plus.dtb  14133 -> 19740 bytes
  bcm2837-rpi-3-b.dtb       14310 -> 20006 bytes
  bcm2837-rpi-3-b-plus.dtb  14670 -> 20474 bytes
  bcm2837-rpi-cm3-io3.dtb   13680 -> 19266 bytes

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
 arch/arm64/boot/dts/broadcom/Makefile | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm64/boot/dts/broadcom/Makefile b/arch/arm64/boot/dts/broadcom/Makefile
index 5082fcd1fea5..0aa8ee2afdd5 100644
--- a/arch/arm64/boot/dts/broadcom/Makefile
+++ b/arch/arm64/boot/dts/broadcom/Makefile
@@ -1,4 +1,15 @@
 # SPDX-License-Identifier: GPL-2.0
+
+# Enables support for device-tree overlays
+DTC_FLAGS_bcm2711-rpi-400 := -@
+DTC_FLAGS_bcm2711-rpi-4-b := -@
+DTC_FLAGS_bcm2711-rpi-cm4-io := -@
+DTC_FLAGS_bcm2837-rpi-3-a-plus := -@
+DTC_FLAGS_bcm2837-rpi-3-b := -@
+DTC_FLAGS_bcm2837-rpi-3-b-plus := -@
+DTC_FLAGS_bcm2837-rpi-cm3-io3 := -@
+DTC_FLAGS_bcm2837-rpi-zero-2-w := -@
+
 dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-400.dtb \
 			      bcm2711-rpi-4-b.dtb \
 			      bcm2711-rpi-cm4-io.dtb \
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] arm: dts: Enable device-tree overlay support for RPi devices
  2022-04-10 22:59 [PATCH 0/2] arm/arm64: dts: Enable device-tree overlay support for RPi devices Aurelien Jarno
  2022-04-10 22:59 ` [PATCH 1/2] arm64: dts: broadcom: " Aurelien Jarno
@ 2022-04-10 22:59 ` Aurelien Jarno
  2023-05-22  6:22 ` [PATCH 0/2] arm/arm64: " Uwe Kleine-König
  2 siblings, 0 replies; 5+ messages in thread
From: Aurelien Jarno @ 2022-04-10 22:59 UTC (permalink / raw)
  To: linux-kernel
  Cc: Aurelien Jarno, Arnd Bergmann, Krzysztof Kozlowski,
	Olof Johansson, Rob Herring, devicetree, linux-arm-kernel,
	linux-rpi-kernel, soc

Add the '-@' DTC option for the Raspberry Pi devices. This option
populates the '__symbols__' node that contains all the necessary symbols
for supporting device-tree overlays (for instance from the firmware or
the bootloader) on these devices.

The Rasbperry Pi devices are well known for their GPIO header, that
allow various "HATs" or other modules do be connected and this enables
users to create out-of-tree device-tree overlays for these modules.

Please note that this change does increase the size of the resulting DTB
by ~40%. For example, with v5.17 increase in size is as follows:

  bcm2711-rpi-400.dtb       26481 -> 36830 bytes
  bcm2711-rpi-4-b.dtb       26537 -> 36886 bytes
  bcm2711-rpi-cm4-io.dtb    26426 -> 36945 bytes
  bcm2835-rpi-a.dtb         12641 -> 17852 bytes
  bcm2835-rpi-a-plus.dtb    12765 -> 17976 bytes
  bcm2835-rpi-b.dtb         12763 -> 17998 bytes
  bcm2835-rpi-b-plus.dtb    12979 -> 18263 bytes
  bcm2835-rpi-b-rev2.dtb    12847 -> 18131 bytes
  bcm2835-rpi-cm1-io1.dtb   12839 -> 18113 bytes
  bcm2835-rpi-zero.dtb      12681 -> 17924 bytes
  bcm2835-rpi-zero-w.dtb    13135 -> 18430 bytes
  bcm2836-rpi-2-b.dtb       13687 -> 19255 bytes
  bcm2837-rpi-3-a-plus.dtb  14133 -> 19740 bytes
  bcm2837-rpi-3-b.dtb       14310 -> 20006 bytes
  bcm2837-rpi-3-b-plus.dtb  14670 -> 20474 bytes
  bcm2837-rpi-cm3-io3.dtb   13680 -> 19266 bytes

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
 arch/arm/boot/dts/Makefile | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 7c16f8a2b738..85644149de44 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -81,6 +81,24 @@ dtb-$(CONFIG_SOC_SAMA7G5) += \
 	at91-sama7g5ek.dtb
 dtb-$(CONFIG_ARCH_AXXIA) += \
 	axm5516-amarillo.dtb
+# Enables support for device-tree overlays
+DTC_FLAGS_bcm2835-rpi-b := -@
+DTC_FLAGS_bcm2835-rpi-a := -@
+DTC_FLAGS_bcm2835-rpi-b-rev2 := -@
+DTC_FLAGS_bcm2835-rpi-b-plus := -@
+DTC_FLAGS_bcm2835-rpi-a-plus := -@
+DTC_FLAGS_bcm2835-rpi-cm1-io1 := -@
+DTC_FLAGS_bcm2836-rpi-2-b := -@
+DTC_FLAGS_bcm2837-rpi-3-a-plus := -@
+DTC_FLAGS_bcm2837-rpi-3-b := -@
+DTC_FLAGS_bcm2837-rpi-3-b-plus := -@
+DTC_FLAGS_bcm2837-rpi-cm3-io3 := -@
+DTC_FLAGS_bcm2837-rpi-zero-2-w := -@
+DTC_FLAGS_bcm2711-rpi-400 := -@
+DTC_FLAGS_bcm2711-rpi-4-b := -@
+DTC_FLAGS_bcm2711-rpi-cm4-io := -@
+DTC_FLAGS_bcm2835-rpi-zero := -@
+DTC_FLAGS_bcm2835-rpi-zero-w := -@
 dtb-$(CONFIG_ARCH_BCM2835) += \
 	bcm2835-rpi-b.dtb \
 	bcm2835-rpi-a.dtb \
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] arm/arm64: dts: Enable device-tree overlay support for RPi devices
  2022-04-10 22:59 [PATCH 0/2] arm/arm64: dts: Enable device-tree overlay support for RPi devices Aurelien Jarno
  2022-04-10 22:59 ` [PATCH 1/2] arm64: dts: broadcom: " Aurelien Jarno
  2022-04-10 22:59 ` [PATCH 2/2] arm: dts: " Aurelien Jarno
@ 2023-05-22  6:22 ` Uwe Kleine-König
  2 siblings, 0 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2023-05-22  6:22 UTC (permalink / raw)
  To: Aurelien Jarno
  Cc: linux-kernel, Arnd Bergmann, Krzysztof Kozlowski, Olof Johansson,
	Rob Herring, devicetree, linux-arm-kernel, linux-rpi-kernel, soc

[-- Attachment #1: Type: text/plain, Size: 965 bytes --]

Hello,

On Mon, Apr 11, 2022 at 12:59:38AM +0200, Aurelien Jarno wrote:
> This patchset changes the generation of the Raspberry Pi devices DTB
> files to improve the support for out-of-tree device-tree overlays, like
> it has recently been done for the Nvidia SoCs.
> 
> I personally only need that for arm64, but I have added a similar patch
> to do the same on arm.
> 
> Aurelien Jarno (2):
>   arm64: dts: broadcom: Enable device-tree overlay support for RPi
>     devices
>   arm: dts: Enable device-tree overlay support for RPi devices

I like these changes,

Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Given there was no feedback for >1 year now, I wonder if there are good
reasons against this change, or it just fell through the cracks?!

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] arm64: dts: broadcom: Enable device-tree overlay support for RPi devices
  2022-04-10 22:59 ` [PATCH 1/2] arm64: dts: broadcom: " Aurelien Jarno
@ 2023-05-25  7:36   ` Uwe Kleine-König
  0 siblings, 0 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2023-05-25  7:36 UTC (permalink / raw)
  To: Aurelien Jarno
  Cc: linux-kernel, Arnd Bergmann, Krzysztof Kozlowski, Olof Johansson,
	Rob Herring, devicetree, linux-arm-kernel, linux-rpi-kernel, soc,
	William Zhang, Florian Fainelli

[-- Attachment #1: Type: text/plain, Size: 2339 bytes --]

Hello,

[expanded Cc: to include William Zhang and Florian Fainelli]

On Mon, Apr 11, 2022 at 12:59:39AM +0200, Aurelien Jarno wrote:
> Add the '-@' DTC option for the Raspberry Pi devices. This option
> populates the '__symbols__' node that contains all the necessary symbols
> for supporting device-tree overlays (for instance from the firmware or
> the bootloader) on these devices.
> 
> The Rasbperry Pi devices are well known for their GPIO header, that
> allow various "HATs" or other modules do be connected and this enables
> users to create out-of-tree device-tree overlays for these modules.
> 
> Please note that this change does increase the size of the resulting DTB
> by ~40%. For example, with v5.17 increase in size is as follows:
> 
>   bcm2711-rpi-400.dtb       26481 -> 36830 bytes
>   bcm2711-rpi-4-b.dtb       26537 -> 36886 bytes
>   bcm2711-rpi-cm4-io.dtb    26426 -> 36945 bytes
>   bcm2837-rpi-3-a-plus.dtb  14133 -> 19740 bytes
>   bcm2837-rpi-3-b.dtb       14310 -> 20006 bytes
>   bcm2837-rpi-3-b-plus.dtb  14670 -> 20474 bytes
>   bcm2837-rpi-cm3-io3.dtb   13680 -> 19266 bytes
> 
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
>  arch/arm64/boot/dts/broadcom/Makefile | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/broadcom/Makefile b/arch/arm64/boot/dts/broadcom/Makefile
> index 5082fcd1fea5..0aa8ee2afdd5 100644
> --- a/arch/arm64/boot/dts/broadcom/Makefile
> +++ b/arch/arm64/boot/dts/broadcom/Makefile
> @@ -1,4 +1,15 @@
>  # SPDX-License-Identifier: GPL-2.0
> +
> +# Enables support for device-tree overlays
> +DTC_FLAGS_bcm2711-rpi-400 := -@
> +DTC_FLAGS_bcm2711-rpi-4-b := -@
> +DTC_FLAGS_bcm2711-rpi-cm4-io := -@
> +DTC_FLAGS_bcm2837-rpi-3-a-plus := -@
> +DTC_FLAGS_bcm2837-rpi-3-b := -@
> +DTC_FLAGS_bcm2837-rpi-3-b-plus := -@
> +DTC_FLAGS_bcm2837-rpi-cm3-io3 := -@
> +DTC_FLAGS_bcm2837-rpi-zero-2-w := -@

Instead of setting these all explicitly a single

DTC_FLAGS := -@

would work, too, without changing how the dts in subdirs are compiled.
IMHO this would be suiteable for arch/arm64/boot/dts/broadcom.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-05-25  7:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-10 22:59 [PATCH 0/2] arm/arm64: dts: Enable device-tree overlay support for RPi devices Aurelien Jarno
2022-04-10 22:59 ` [PATCH 1/2] arm64: dts: broadcom: " Aurelien Jarno
2023-05-25  7:36   ` Uwe Kleine-König
2022-04-10 22:59 ` [PATCH 2/2] arm: dts: " Aurelien Jarno
2023-05-22  6:22 ` [PATCH 0/2] arm/arm64: " Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).