Hi Chen-Yu,
On 2/4/25 6:53 PM, Chen-Yu Tsai wrote:
On Wed, Feb 5, 2025 at 1:49 AM Quentin Schulz <quentin.sch...@cherry.de> wrote:
Hi Chen-Yu,
On 2/4/25 6:21 PM, Chen-Yu Tsai wrote:
From: Chen-Yu Tsai <w...@csie.org>
Device tree overlays are immensely useful.
Enable it by default by implying it from ARCH_ROCKCHIP.
Signed-off-by: Chen-Yu Tsai <w...@csie.org>
---
arch/arm/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index f504d7d07601..2797030d3501 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -2061,6 +2061,7 @@ config ARCH_ROCKCHIP
imply DEBUG_UART_BOARD_INIT
imply BOOTSTD_DEFAULTS
imply FAT_WRITE
+ imply OF_LIBFDT_OVERLAY
imply SARADC_ROCKCHIP
imply SPL_SYSRESET
imply SPL_SYS_MALLOC_SIMPLE
Yes but not entirely enough right now.
See:
https://lore.kernel.org/u-boot/20250129-px30-overlay-v1-0-4729b3fcb...@cherry.de/T/#t
At least it still boots even if fdtoverlay_addr_r isn't set so that's
not too much of an issue.
Sure. Though having it compiled in allows the user to set fdtoverlay_addr_r
manually on the command line or through a script to be able to use overlays.
Not having to rebuild the bootloader is already a huge improvement.
At the very least add in the commit log we still need to set
fdtoverlay_addr_r for it to be useful.
Would be nice to check which SoCs do not have this fdtoverlay_addr_r set
and actually set it as well, otherwise enabling this doesn't help much
:) (at least with pxe/extlinux)
A quick grep shows:
include/configs/rk3308_common.h: "fdtoverlay_addr_r=0x01f00000\0"
include/configs/rk3328_common.h: "fdtoverlay_addr_r=0x01f00000\0"
include/configs/rk3399_common.h: "fdtoverlay_addr_r=0x12100000\0"
include/configs/rk3568_common.h: "fdtoverlay_addr_r=0x12100000\0"
include/configs/rk3588_common.h: "fdtoverlay_addr_r=0x12100000\0"
include/configs/rv1126_common.h: "fdtoverlay_addr_r=0x02000000\0"
I don't have any devices with the SoCs that aren't on this list though...
I believe, those would be:
include/configs/px30_common.h
include/configs/rk3036_common.h
include/configs/rk3066_common.h
include/configs/rk3128_common.h
include/configs/rk3188_common.h
include/configs/rk322x_common.h
include/configs/rk3288_common.h
include/configs/rk3368_common.h
I also have none of those (except PX30, but that's already being tackled).
We usually have the overlay 0x100000 after the FDT address. But that
seems to be the gap between FDT and kernel load address on RK3036,
RK3066, RK3128, RK3188, RK322x, RK3288. On PX30 and RK3368, it should be
possible. On RK3036 and RK3066, there seems to be something odd with the
FDT since relocation is disabled, so not sure how this would work with
overlays.
Another issue is that there aren't many upstream overlays today, so a
bit harder to test (though one could create a very simple overlay to
enable/disable some node and check it's properly applied by U-Boot when
booting.
Cheers,
Quentin