Skip to contentSkip to conversation

configs: turing-rk1: disable SPI flash by default

PATCH In review Sam Edwards 2 participants 2 messages Apr 13, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configs: turing-rk1: disable SPI flash by default

While the Turing RK1 board has a pad on the PCB for SPI flash, it is not populated at the factory: supporting SPI flash boot is a user modification, not an out-of-the-box feature. The defconfig for this board should therefore not be enabling the SPI flash image nor SPI support in the SPL, as it causes confusion among downstream users as to whether the SPI image needs to be distributed.

Fixes 153ac950a599 ("board: rockchip: Add the Turing RK1 SoM")
---
 configs/turing-rk1-rk3588_defconfig | 6 ------
 1 file changed, 6 deletions(-)
configs/turing-rk1-rk3588_defconfig +0 -6
index 07f7b84852..28c3e50ed4 100644
@@ -8,13 +8,10 @@ CONFIG_SF_DEFAULT_SPEED=24000000
 CONFIG_SF_DEFAULT_MODE=0x2000
 CONFIG_DEFAULT_DEVICE_TREE="rk3588-turing-rk1"
 CONFIG_ROCKCHIP_RK3588=y
-CONFIG_ROCKCHIP_SPI_IMAGE=y
 CONFIG_SPL_SERIAL=y
 CONFIG_TARGET_TURINGRK1_RK3588=y
 CONFIG_DEBUG_UART_BASE=0xFEBC0000
 CONFIG_DEBUG_UART_CLOCK=24000000
-CONFIG_SPL_SPI_FLASH_SUPPORT=y
-CONFIG_SPL_SPI=y
 CONFIG_SYS_LOAD_ADDR=0xc00800
 CONFIG_PCI=y
 CONFIG_DEBUG_UART=y
@@ -31,8 +28,6 @@ CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
 # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
-CONFIG_SPL_SPI_LOAD=y
-CONFIG_SYS_SPI_U_BOOT_OFFS=0x60000
 CONFIG_SPL_ATF=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_GPT=y
@@ -109,7 +104,6 @@ CONFIG_USB_ETHER_MCS7830=y
 CONFIG_USB_ETHER_RTL8152=y
 CONFIG_USB_ETHER_SMSC95XX=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_PRODUCT_NUM=0x350b
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_USB_FUNCTION_ROCKUSB=y
 CONFIG_ERRNO_STR=y
Signature · 1 line
2.43.2
Reviewed-by on v1 1/1
#1 lore raw

Hi Sam,

Quoted 20 lines · Sam Edwards

While the Turing RK1 board has a pad on the PCB for SPI flash, it is not populated at the factory: supporting SPI flash boot is a user modification, not an out-of-the-box feature. The defconfig for this board should therefore not be enabling the SPI flash image nor SPI support in the SPL, as it causes confusion among downstream users as to whether the SPI image needs to be distributed.

Fixes 153ac950a599 ("board: rockchip: Add the Turing RK1 SoM")
---
 configs/turing-rk1-rk3588_defconfig | 6 ------
 1 file changed, 6 deletions(-)
configs/turing-rk1-rk3588_defconfig +0 -0
index 07f7b84852..28c3e50ed4 100644

configs/turing-rk1-rk3588_defconfig CONFIG_SF_DEFAULT_SPEED=24000000 · line 11

Quoted 4 lines
configs/turing-rk1-rk3588_defconfig +0 -1
@@ -8,13 +8,10 @@ CONFIG_SF_DEFAULT_SPEED=24000000
 CONFIG_SF_DEFAULT_MODE=0x2000
 CONFIG_DEFAULT_DEVICE_TREE="rk3588-turing-rk1"
 CONFIG_ROCKCHIP_RK3588=y
-CONFIG_ROCKCHIP_SPI_IMAGE=y

The device tree synced from linux does not even enable the sfc node, so please either remove all related config options for spi flash or only remove the ROCKCHIP_SPI_IMAGE option if the sfc and a flash node will be enabled/added to upstream linux devicetree.

Additional options related to spi flash not removed in this patch:
- SF_DEFAULT_SPEED
- SF_DEFAULT_MODE
- SF_DEFAULT_BUS
- SPI_FLASH_SFDP_SUPPORT
- SPI_FLASH_MACRONIX
- SPI_FLASH_XMC
- SPI_FLASH_XTX
- ROCKCHIP_SFC

Quoted 19 lines
configs/turing-rk1-rk3588_defconfig +0 -4
 CONFIG_SPL_SERIAL=y
 CONFIG_TARGET_TURINGRK1_RK3588=y
 CONFIG_DEBUG_UART_BASE=0xFEBC0000
 CONFIG_DEBUG_UART_CLOCK=24000000
-CONFIG_SPL_SPI_FLASH_SUPPORT=y
-CONFIG_SPL_SPI=y
 CONFIG_SYS_LOAD_ADDR=0xc00800
 CONFIG_PCI=y
 CONFIG_DEBUG_UART=y
@@ -31,8 +28,6 @@ CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_SPL_MAX_SIZE=0x40000
 CONFIG_SPL_PAD_TO=0x7f8000
 # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
-CONFIG_SPL_SPI_LOAD=y
-CONFIG_SYS_SPI_U_BOOT_OFFS=0x60000
 CONFIG_SPL_ATF=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_GPT=y

configs/turing-rk1-rk3588_defconfig CONFIG_USB_ETHER_MCS7830=y · line 112

Quoted 4 lines
configs/turing-rk1-rk3588_defconfig +0 -1
@@ -109,7 +104,6 @@ CONFIG_USB_ETHER_MCS7830=y
 CONFIG_USB_ETHER_RTL8152=y
 CONFIG_USB_ETHER_SMSC95XX=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_PRODUCT_NUM=0x350b

This is an unrelated change that may cause apply issues if "rockchip:
rk35xx: DropUSB_GADGET_PRODUCT_NUM Kconfig option" [1] or is Tom make a sync defconfigs commit that is applied before this patch.

[1] https://patchwork.ozlabs.org/patch/1917934/

With above fixed,

Regards,
Jonas

Quoted 3 lines
configs/turing-rk1-rk3588_defconfig +0 -0
 CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_USB_FUNCTION_ROCKUSB=y
 CONFIG_ERRNO_STR=y