rockchip: Enable OF_LIBFDT_OVERLAY by default
PATCH 1/1 rockchip: Enable OF_LIBFDT_OVERLAY by default
From: Chen-Yu Tsai <[email protected]>
Device tree overlays are immensely useful.
Enable it by default by implying it from ARCH_ROCKCHIP.
---
arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/Kconfig +1 -0
@@ -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
Signature · 1 line
2.39.5
Hi Chen-Yu,
Quoted 17 lines · Chen-Yu Tsai
From: Chen-Yu Tsai <[email protected]>
Device tree overlays are immensely useful.
Enable it by default by implying it from
ARCH_ROCKCHIP.Signed-off-by Chen-Yu Tsai <[email protected]>---
arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+)arch/arm/Kconfig +0
-0
arch/arm/Kconfig config ARCH_ROCKCHIP · line 2067
Quoted 7 lines
arch/arm/Kconfig +1
-0@@ -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/[email protected]/T/#t
At least it still boots even if fdtoverlay_addr_r isn't set so that's not too much of an issue.
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)
Cheers,
Quentin
Quoted 31 lines · Quentin Schulz
Hi Chen-Yu,
Quoted 17 lines · Chen-Yu Tsai
From: Chen-Yu Tsai <[email protected]>
Device tree overlays are immensely useful.
Enable it by default by implying it from
ARCH_ROCKCHIP.Signed-off-by Chen-Yu Tsai <[email protected]>---
arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+)arch/arm/Kconfig +0
-0arch/arm/Kconfig config ARCH_ROCKCHIP · line 2067
Quoted 7 lines
arch/arm/Kconfig +1
-0@@ -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_SIMPLEYes but not entirely enough right now.
Quoted 5 lines
See:
https://lore.kernel.org/u-boot/[email protected]/T/#tAt least it still boots even if
fdtoverlay_addr_risn'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.
Quoted 3 lines
Would be nice to check which SoCs do not have this
fdtoverlay_addr_rset 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...
ChenYu
Hi Chen-Yu,
Quoted 35 lines · Chen-Yu Tsai
Quoted 34 lines · Quentin Schulz
Hi Chen-Yu,
Quoted 17 lines · Chen-Yu Tsai
From: Chen-Yu Tsai <[email protected]>
Device tree overlays are immensely useful.
Enable it by default by implying it from
ARCH_ROCKCHIP.Signed-off-by Chen-Yu Tsai <[email protected]>---
arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+)arch/arm/Kconfig +0
-0arch/arm/Kconfig config ARCH_ROCKCHIP · line 2067
Quoted 7 lines
arch/arm/Kconfig +1
-0@@ -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_SIMPLEYes but not entirely enough right now.
Quoted 7 lines
Quoted 2 lines
At least it still boots even if
fdtoverlay_addr_risn't set so that's not too much of an issue.Sure. Though having it compiled in allows the user to set
fdtoverlay_addr_rmanually 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.
Quoted 6 lines
Quoted 3 lines
Would be nice to check which SoCs do not have this
fdtoverlay_addr_rset and actually set it as well, otherwise enabling this doesn't help much :) (at least with pxe/extlinux)A quick grep shows:
Quoted 9 lines
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.hinclude/configs/rk3036_common.hinclude/configs/rk3066_common.hinclude/configs/rk3128_common.hinclude/configs/rk3188_common.hinclude/configs/rk322x_common.hinclude/configs/rk3288_common.hinclude/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