Message ID | 20240207000301.3270722-16-jonas@kwiboo.se |
---|---|
State | Superseded |
Delegated to: | Kever Yang |
Headers | show |
Series | rockchip: rk3328: Update defconfigs, DTs and enable boot from SPI | expand |
Hi Jonas, On Wed, Feb 7, 2024 at 8:14 AM Jonas Karlman <jonas@kwiboo.se> wrote: > > Add Kconfig options to enable support for booting from SPI NOR flash on > Orange Pi R1 Plus boards. > > The generated bootable u-boot-rockchip-spi.bin that can be written to > 0x0 of SPI NOR flash. The FIT image is loaded from 0x60000, same as on > RK35xx boards. > > Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Thanks for your great work! Reviewed-by: Tianling Shen <cnsztl@gmail.com> Best regards, Tianling. > --- > configs/orangepi-r1-plus-lts-rk3328_defconfig | 8 ++++++++ > configs/orangepi-r1-plus-rk3328_defconfig | 8 ++++++++ > 2 files changed, 16 insertions(+) > > diff --git a/configs/orangepi-r1-plus-lts-rk3328_defconfig b/configs/orangepi-r1-plus-lts-rk3328_defconfig > index 937ef003d85b..968110c8cd6f 100644 > --- a/configs/orangepi-r1-plus-lts-rk3328_defconfig > +++ b/configs/orangepi-r1-plus-lts-rk3328_defconfig > @@ -13,6 +13,7 @@ CONFIG_DEFAULT_DEVICE_TREE="rk3328-orangepi-r1-plus-lts" > CONFIG_DM_RESET=y > CONFIG_ROCKCHIP_RK3328=y > CONFIG_TPL_ROCKCHIP_COMMON_BOARD=y > +CONFIG_ROCKCHIP_SPI_IMAGE=y > CONFIG_TPL_LIBCOMMON_SUPPORT=y > CONFIG_TPL_LIBGENERIC_SUPPORT=y > CONFIG_SPL_STACK_R_ADDR=0x600000 > @@ -20,6 +21,8 @@ CONFIG_SPL_STACK=0x400000 > CONFIG_TPL_SYS_MALLOC_F_LEN=0x800 > CONFIG_DEBUG_UART_BASE=0xFF130000 > CONFIG_DEBUG_UART_CLOCK=24000000 > +CONFIG_SPL_SPI_FLASH_SUPPORT=y > +CONFIG_SPL_SPI=y > CONFIG_SYS_LOAD_ADDR=0x800800 > CONFIG_DEBUG_UART=y > # CONFIG_ANDROID_BOOT_IMAGE is not set > @@ -42,6 +45,8 @@ CONFIG_SPL_BSS_MAX_SIZE=0x2000 > CONFIG_SPL_STACK_R=y > CONFIG_SPL_I2C=y > CONFIG_SPL_POWER=y > +CONFIG_SPL_SPI_LOAD=y > +CONFIG_SYS_SPI_U_BOOT_OFFS=0x60000 > CONFIG_SPL_ATF=y > CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y > CONFIG_TPL_SYS_MALLOC_SIMPLE=y > @@ -76,7 +81,10 @@ CONFIG_MISC=y > CONFIG_ROCKCHIP_EFUSE=y > CONFIG_MMC_DW=y > CONFIG_MMC_DW_ROCKCHIP=y > +CONFIG_SPI_FLASH_SFDP_SUPPORT=y > CONFIG_SPI_FLASH_GIGADEVICE=y > +CONFIG_SPI_FLASH_MACRONIX=y > +CONFIG_SPI_FLASH_WINBOND=y > CONFIG_PHY_MOTORCOMM=y > CONFIG_PHY_REALTEK=y > CONFIG_DM_ETH_PHY=y > diff --git a/configs/orangepi-r1-plus-rk3328_defconfig b/configs/orangepi-r1-plus-rk3328_defconfig > index 563a1ac6ecd4..7038f09f202c 100644 > --- a/configs/orangepi-r1-plus-rk3328_defconfig > +++ b/configs/orangepi-r1-plus-rk3328_defconfig > @@ -13,6 +13,7 @@ CONFIG_DEFAULT_DEVICE_TREE="rk3328-orangepi-r1-plus" > CONFIG_DM_RESET=y > CONFIG_ROCKCHIP_RK3328=y > CONFIG_TPL_ROCKCHIP_COMMON_BOARD=y > +CONFIG_ROCKCHIP_SPI_IMAGE=y > CONFIG_TPL_LIBCOMMON_SUPPORT=y > CONFIG_TPL_LIBGENERIC_SUPPORT=y > CONFIG_SPL_STACK_R_ADDR=0x600000 > @@ -20,6 +21,8 @@ CONFIG_SPL_STACK=0x400000 > CONFIG_TPL_SYS_MALLOC_F_LEN=0x800 > CONFIG_DEBUG_UART_BASE=0xFF130000 > CONFIG_DEBUG_UART_CLOCK=24000000 > +CONFIG_SPL_SPI_FLASH_SUPPORT=y > +CONFIG_SPL_SPI=y > CONFIG_SYS_LOAD_ADDR=0x800800 > CONFIG_DEBUG_UART=y > # CONFIG_ANDROID_BOOT_IMAGE is not set > @@ -42,6 +45,8 @@ CONFIG_SPL_BSS_MAX_SIZE=0x2000 > CONFIG_SPL_STACK_R=y > CONFIG_SPL_I2C=y > CONFIG_SPL_POWER=y > +CONFIG_SPL_SPI_LOAD=y > +CONFIG_SYS_SPI_U_BOOT_OFFS=0x60000 > CONFIG_SPL_ATF=y > CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y > CONFIG_TPL_SYS_MALLOC_SIMPLE=y > @@ -76,7 +81,10 @@ CONFIG_MISC=y > CONFIG_ROCKCHIP_EFUSE=y > CONFIG_MMC_DW=y > CONFIG_MMC_DW_ROCKCHIP=y > +CONFIG_SPI_FLASH_SFDP_SUPPORT=y > CONFIG_SPI_FLASH_GIGADEVICE=y > +CONFIG_SPI_FLASH_MACRONIX=y > +CONFIG_SPI_FLASH_WINBOND=y > CONFIG_PHY_MOTORCOMM=y > CONFIG_PHY_REALTEK=y > CONFIG_DM_ETH_PHY=y > -- > 2.43.0 >
diff --git a/configs/orangepi-r1-plus-lts-rk3328_defconfig b/configs/orangepi-r1-plus-lts-rk3328_defconfig index 937ef003d85b..968110c8cd6f 100644 --- a/configs/orangepi-r1-plus-lts-rk3328_defconfig +++ b/configs/orangepi-r1-plus-lts-rk3328_defconfig @@ -13,6 +13,7 @@ CONFIG_DEFAULT_DEVICE_TREE="rk3328-orangepi-r1-plus-lts" CONFIG_DM_RESET=y CONFIG_ROCKCHIP_RK3328=y CONFIG_TPL_ROCKCHIP_COMMON_BOARD=y +CONFIG_ROCKCHIP_SPI_IMAGE=y CONFIG_TPL_LIBCOMMON_SUPPORT=y CONFIG_TPL_LIBGENERIC_SUPPORT=y CONFIG_SPL_STACK_R_ADDR=0x600000 @@ -20,6 +21,8 @@ CONFIG_SPL_STACK=0x400000 CONFIG_TPL_SYS_MALLOC_F_LEN=0x800 CONFIG_DEBUG_UART_BASE=0xFF130000 CONFIG_DEBUG_UART_CLOCK=24000000 +CONFIG_SPL_SPI_FLASH_SUPPORT=y +CONFIG_SPL_SPI=y CONFIG_SYS_LOAD_ADDR=0x800800 CONFIG_DEBUG_UART=y # CONFIG_ANDROID_BOOT_IMAGE is not set @@ -42,6 +45,8 @@ CONFIG_SPL_BSS_MAX_SIZE=0x2000 CONFIG_SPL_STACK_R=y CONFIG_SPL_I2C=y CONFIG_SPL_POWER=y +CONFIG_SPL_SPI_LOAD=y +CONFIG_SYS_SPI_U_BOOT_OFFS=0x60000 CONFIG_SPL_ATF=y CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y CONFIG_TPL_SYS_MALLOC_SIMPLE=y @@ -76,7 +81,10 @@ CONFIG_MISC=y CONFIG_ROCKCHIP_EFUSE=y CONFIG_MMC_DW=y CONFIG_MMC_DW_ROCKCHIP=y +CONFIG_SPI_FLASH_SFDP_SUPPORT=y CONFIG_SPI_FLASH_GIGADEVICE=y +CONFIG_SPI_FLASH_MACRONIX=y +CONFIG_SPI_FLASH_WINBOND=y CONFIG_PHY_MOTORCOMM=y CONFIG_PHY_REALTEK=y CONFIG_DM_ETH_PHY=y diff --git a/configs/orangepi-r1-plus-rk3328_defconfig b/configs/orangepi-r1-plus-rk3328_defconfig index 563a1ac6ecd4..7038f09f202c 100644 --- a/configs/orangepi-r1-plus-rk3328_defconfig +++ b/configs/orangepi-r1-plus-rk3328_defconfig @@ -13,6 +13,7 @@ CONFIG_DEFAULT_DEVICE_TREE="rk3328-orangepi-r1-plus" CONFIG_DM_RESET=y CONFIG_ROCKCHIP_RK3328=y CONFIG_TPL_ROCKCHIP_COMMON_BOARD=y +CONFIG_ROCKCHIP_SPI_IMAGE=y CONFIG_TPL_LIBCOMMON_SUPPORT=y CONFIG_TPL_LIBGENERIC_SUPPORT=y CONFIG_SPL_STACK_R_ADDR=0x600000 @@ -20,6 +21,8 @@ CONFIG_SPL_STACK=0x400000 CONFIG_TPL_SYS_MALLOC_F_LEN=0x800 CONFIG_DEBUG_UART_BASE=0xFF130000 CONFIG_DEBUG_UART_CLOCK=24000000 +CONFIG_SPL_SPI_FLASH_SUPPORT=y +CONFIG_SPL_SPI=y CONFIG_SYS_LOAD_ADDR=0x800800 CONFIG_DEBUG_UART=y # CONFIG_ANDROID_BOOT_IMAGE is not set @@ -42,6 +45,8 @@ CONFIG_SPL_BSS_MAX_SIZE=0x2000 CONFIG_SPL_STACK_R=y CONFIG_SPL_I2C=y CONFIG_SPL_POWER=y +CONFIG_SPL_SPI_LOAD=y +CONFIG_SYS_SPI_U_BOOT_OFFS=0x60000 CONFIG_SPL_ATF=y CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y CONFIG_TPL_SYS_MALLOC_SIMPLE=y @@ -76,7 +81,10 @@ CONFIG_MISC=y CONFIG_ROCKCHIP_EFUSE=y CONFIG_MMC_DW=y CONFIG_MMC_DW_ROCKCHIP=y +CONFIG_SPI_FLASH_SFDP_SUPPORT=y CONFIG_SPI_FLASH_GIGADEVICE=y +CONFIG_SPI_FLASH_MACRONIX=y +CONFIG_SPI_FLASH_WINBOND=y CONFIG_PHY_MOTORCOMM=y CONFIG_PHY_REALTEK=y CONFIG_DM_ETH_PHY=y
Add Kconfig options to enable support for booting from SPI NOR flash on Orange Pi R1 Plus boards. The generated bootable u-boot-rockchip-spi.bin that can be written to 0x0 of SPI NOR flash. The FIT image is loaded from 0x60000, same as on RK35xx boards. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> --- configs/orangepi-r1-plus-lts-rk3328_defconfig | 8 ++++++++ configs/orangepi-r1-plus-rk3328_defconfig | 8 ++++++++ 2 files changed, 16 insertions(+)