* [PATCH v2 0/2] Enable SPI NOR flash for SpacemiT K3 in main app
@ 2026-10-21 16:50 E Shattow
2026-10-21 16:50 ` [PATCH v2 1/2] configs: spacemit: k3: enable spi nor flash " E Shattow
2026-10-21 16:50 ` [PATCH v2 2/2] configs: spacemit: k3: enable mtdparts " E Shattow
0 siblings, 2 replies; 3+ messages in thread
From: E Shattow @ 2026-10-21 16:50 UTC (permalink / raw)
To: u-boot, Yixun Lan; +Cc: E Shattow
Enable SPI Flash command, mtd part names and locations, and store U-Boot
environment in SPI NOR flash. Selected for Winbond and GigaDevice parts.
Changes since v1:
- relocate imply SPI in SoC base config to enabled in board config
- enable GigaDevice SPI NOR flash used by board variant K3 CoM260
- relax commit messages to describe more than specific K3 Pico-ITX board
- drop advice from commit message of dependency on vendor SPL
- keep simple "spi0.0" mtdparts layout name pending some way to automate
E Shattow (2):
configs: spacemit: k3: enable spi nor flash in main app
configs: spacemit: k3: enable mtdparts in main app
configs/spacemit_k3_defconfig | 13 +++++++++++++
1 file changed, 13 insertions(+)
base-commit: 62c9805d8d57cad407f0295879cc9a6182da464a
--
2.53.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2 1/2] configs: spacemit: k3: enable spi nor flash in main app
2026-10-21 16:50 [PATCH v2 0/2] Enable SPI NOR flash for SpacemiT K3 in main app E Shattow
@ 2026-10-21 16:50 ` E Shattow
2026-10-21 16:50 ` [PATCH v2 2/2] configs: spacemit: k3: enable mtdparts " E Shattow
1 sibling, 0 replies; 3+ messages in thread
From: E Shattow @ 2026-10-21 16:50 UTC (permalink / raw)
To: u-boot, Yixun Lan, Tom Rini; +Cc: E Shattow
Enable sf command and env storage in SPI NOR flash. SPL is not yet
upstream so this is only in the main app.
Signed-off-by: E Shattow <e@freeshell.de>
---
configs/spacemit_k3_defconfig | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/configs/spacemit_k3_defconfig b/configs/spacemit_k3_defconfig
index 586305c62322..afe3a3b42939 100644
--- a/configs/spacemit_k3_defconfig
+++ b/configs/spacemit_k3_defconfig
@@ -4,6 +4,8 @@ CONFIG_SYS_MALLOC_F_LEN=0x80000
CONFIG_NR_DRAM_BANKS=2
CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x102300000
+CONFIG_ENV_SIZE=0x10000
+CONFIG_ENV_OFFSET=0xa0000
CONFIG_DM_GPIO=y
CONFIG_DEFAULT_DEVICE_TREE="spacemit/k3-pico-itx"
CONFIG_SYS_BOOTM_LEN=0xa000000
@@ -35,6 +37,8 @@ CONFIG_CMD_REGULATOR=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
CONFIG_DEVICE_TREE_INCLUDES="spacemit-k3-u-boot.dtsi"
+CONFIG_ENV_OVERWRITE=y
+CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_NET_LWIP=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SYSCON=y
@@ -44,6 +48,8 @@ CONFIG_SPACEMIT_GPIO=y
CONFIG_DM_I2C=y
CONFIG_SYS_I2C_SPACEMIT_K1=y
CONFIG_MISC=y
+CONFIG_SPI_FLASH_GIGADEVICE=y
+CONFIG_SPI_FLASH_WINBOND=y
CONFIG_PHY_GIGE=y
CONFIG_DWC_ETH_QOS=y
CONFIG_DWC_ETH_QOS_SPACEMIT=y
@@ -61,4 +67,6 @@ CONFIG_DEBUG_UART_SHIFT=2
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_SYS_NS16550=y
CONFIG_SYS_NS16550_MEM32=y
+CONFIG_SPI=y
+CONFIG_FSL_QSPI=y
CONFIG_TIMER_EARLY=y
--
2.53.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v2 2/2] configs: spacemit: k3: enable mtdparts in main app
2026-10-21 16:50 [PATCH v2 0/2] Enable SPI NOR flash for SpacemiT K3 in main app E Shattow
2026-10-21 16:50 ` [PATCH v2 1/2] configs: spacemit: k3: enable spi nor flash " E Shattow
@ 2026-10-21 16:50 ` E Shattow
1 sibling, 0 replies; 3+ messages in thread
From: E Shattow @ 2026-10-21 16:50 UTC (permalink / raw)
To: u-boot, Yixun Lan, Tom Rini; +Cc: E Shattow
add default mtdparts and mtdids consistent with k3-pico-itx.dts
Signed-off-by: E Shattow <e@freeshell.de>
---
configs/spacemit_k3_defconfig | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/configs/spacemit_k3_defconfig b/configs/spacemit_k3_defconfig
index afe3a3b42939..2be660820ab8 100644
--- a/configs/spacemit_k3_defconfig
+++ b/configs/spacemit_k3_defconfig
@@ -26,6 +26,7 @@ CONFIG_SYS_PBSIZE=276
CONFIG_HUSH_PARSER=y
CONFIG_CMD_GPIO=y
CONFIG_CMD_I2C=y
+CONFIG_CMD_MTD=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_DNS=y
CONFIG_CMD_MII=y
@@ -36,6 +37,9 @@ CONFIG_CMD_PMIC=y
CONFIG_CMD_REGULATOR=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_MTDPARTS=y
+CONFIG_MTDIDS_DEFAULT="nor0=spi0.0"
+CONFIG_MTDPARTS_DEFAULT="spi0.0:128k(bootinfo),512k(fsbl),64k(env),1024k(esos),384k(opensbi),-(uboot)"
CONFIG_DEVICE_TREE_INCLUDES="spacemit-k3-u-boot.dtsi"
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_SPI_FLASH=y
@@ -50,6 +54,7 @@ CONFIG_SYS_I2C_SPACEMIT_K1=y
CONFIG_MISC=y
CONFIG_SPI_FLASH_GIGADEVICE=y
CONFIG_SPI_FLASH_WINBOND=y
+CONFIG_SPI_FLASH_MTD=y
CONFIG_PHY_GIGE=y
CONFIG_DWC_ETH_QOS=y
CONFIG_DWC_ETH_QOS_SPACEMIT=y
--
2.53.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-10-21 16:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-21 16:50 [PATCH v2 0/2] Enable SPI NOR flash for SpacemiT K3 in main app E Shattow
2026-10-21 16:50 ` [PATCH v2 1/2] configs: spacemit: k3: enable spi nor flash " E Shattow
2026-10-21 16:50 ` [PATCH v2 2/2] configs: spacemit: k3: enable mtdparts " E Shattow
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox