Skip to contentSkip to conversation

ARM: stm32: Align mtdparts with SPI NOR layout on DHSOM

PATCH In review Marek Vasut 4 participants 7 messages Oct 23, 2021 – Nov 10, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: stm32: Align mtdparts with SPI NOR layout on DHSOM

The DHSOM uses different SPI NOR layout than the ST devkit, stop pulling in the ST specific runtime mtdparts settings and adjust the mtdparts accordingly.

Cc Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>
---
 board/dhelectronics/dh_stm32mp1/Makefile | 1 -
 configs/stm32mp15_dhcom_basic_defconfig  | 3 ++-
 configs/stm32mp15_dhcor_basic_defconfig  | 2 ++
 3 files changed, 4 insertions(+), 2 deletions(-)
board/dhelectronics/dh_stm32mp1/Makefile +0 -1
index b368b396a46..30db1dee807 100644
@@ -5,5 +5,4 @@
 
 obj-y += ../../st/common/stpmic1.o board.o
 
-obj-$(CONFIG_SYS_MTDPARTS_RUNTIME) += ../../st/common/stm32mp_mtdparts.o
 obj-$(CONFIG_SET_DFU_ALT_INFO) += ../../st/common/stm32mp_dfu.o
configs/stm32mp15_dhcom_basic_defconfig +2 -1
index 5ecc91c7c1b..f51896ed472 100644
@@ -61,6 +61,8 @@ CONFIG_CMD_PMIC=y
 CONFIG_CMD_REGULATOR=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_MTDPARTS=y
+CONFIG_MTDIDS_DEFAULT="nor0=nor0"
+CONFIG_MTDPARTS_DEFAULT="mtdparts=nor0:256k(fsbl1),256k(fsbl2),1408k(uboot),64k(env1),64k(env2)"
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_ISO_PARTITION is not set
 # CONFIG_SPL_PARTITION_UUIDS is not set
@@ -102,7 +104,6 @@ CONFIG_SUPPORT_EMMC_BOOT=y
 CONFIG_STM32_SDMMC2=y
 CONFIG_MTD=y
 CONFIG_DM_MTD=y
-CONFIG_SYS_MTDPARTS_RUNTIME=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_SF_DEFAULT_SPEED=50000000
 CONFIG_SPI_FLASH_SFDP_SUPPORT=y
configs/stm32mp15_dhcor_basic_defconfig +2 -0
index 7c410b8224a..13e4553ac82 100644
@@ -59,6 +59,8 @@ CONFIG_CMD_PMIC=y
 CONFIG_CMD_REGULATOR=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_MTDPARTS=y
+CONFIG_MTDIDS_DEFAULT="nor0=nor0"
+CONFIG_MTDPARTS_DEFAULT="mtdparts=nor0:256k(fsbl1),256k(fsbl2),1408k(uboot),64k(env1),64k(env2)"
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_ISO_PARTITION is not set
 # CONFIG_SPL_PARTITION_UUIDS is not set
Signature · 1 line
2.33.0
Reviewed-by on v1 1/1
#1 lore raw

Hi Marek

Quoted 50 lines · Marek Vasut

The DHSOM uses different SPI NOR layout than the ST devkit, stop pulling in the ST specific runtime mtdparts settings and adjust the mtdparts accordingly.

Cc Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>
---
 board/dhelectronics/dh_stm32mp1/Makefile | 1 -
 configs/stm32mp15_dhcom_basic_defconfig  | 3 ++-
 configs/stm32mp15_dhcor_basic_defconfig  | 2 ++
 3 files changed, 4 insertions(+), 2 deletions(-)
board/dhelectronics/dh_stm32mp1/Makefile +0 -1
index b368b396a46..30db1dee807 100644
@@ -5,5 +5,4 @@
 
 obj-y += ../../st/common/stpmic1.o board.o
 
-obj-$(CONFIG_SYS_MTDPARTS_RUNTIME) += ../../st/common/stm32mp_mtdparts.o
 obj-$(CONFIG_SET_DFU_ALT_INFO) += ../../st/common/stm32mp_dfu.o
configs/stm32mp15_dhcom_basic_defconfig +2 -1
index 5ecc91c7c1b..f51896ed472 100644
@@ -61,6 +61,8 @@ CONFIG_CMD_PMIC=y
 CONFIG_CMD_REGULATOR=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_MTDPARTS=y
+CONFIG_MTDIDS_DEFAULT="nor0=nor0"
+CONFIG_MTDPARTS_DEFAULT="mtdparts=nor0:256k(fsbl1),256k(fsbl2),1408k(uboot),64k(env1),64k(env2)"
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_ISO_PARTITION is not set
 # CONFIG_SPL_PARTITION_UUIDS is not set
@@ -102,7 +104,6 @@ CONFIG_SUPPORT_EMMC_BOOT=y
 CONFIG_STM32_SDMMC2=y
 CONFIG_MTD=y
 CONFIG_DM_MTD=y
-CONFIG_SYS_MTDPARTS_RUNTIME=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_SF_DEFAULT_SPEED=50000000
 CONFIG_SPI_FLASH_SFDP_SUPPORT=y
configs/stm32mp15_dhcor_basic_defconfig +0 -0
index 7c410b8224a..13e4553ac82 100644

configs/stm32mp15_dhcor_basic_defconfig CONFIG_CMD_PMIC=y · line 66

Quoted 8 lines
configs/stm32mp15_dhcor_basic_defconfig +2 -0
@@ -59,6 +59,8 @@ CONFIG_CMD_PMIC=y
 CONFIG_CMD_REGULATOR=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_MTDPARTS=y
+CONFIG_MTDIDS_DEFAULT="nor0=nor0"
+CONFIG_MTDPARTS_DEFAULT="mtdparts=nor0:256k(fsbl1),256k(fsbl2),1408k(uboot),64k(env1),64k(env2)"
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_ISO_PARTITION is not set
 # CONFIG_SPL_PARTITION_UUIDS is not set

Thanks
Patrice

Reviewed-by on v1 1/1
#2 lore raw
In reply to Marek Vasut

Hi,

Quoted 4 lines · Marek Vasut

The DHSOM uses different SPI NOR layout than the ST devkit, stop pulling in the ST specific runtime mtdparts settings and adjust the mtdparts accordingly.

Quoted 9 lines
Cc Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>
---
  board/dhelectronics/dh_stm32mp1/Makefile | 1 -
  configs/stm32mp15_dhcom_basic_defconfig  | 3 ++-
  configs/stm32mp15_dhcor_basic_defconfig  | 2 ++
  3 files changed, 4 insertions(+), 2 deletions(-)

Thanks
Patrick

#3 lore raw

Hi Marek

Quoted 17 lines · Patrick DELAUNAY

Hi,

Quoted 4 lines · Marek Vasut

The DHSOM uses different SPI NOR layout than the ST devkit, stop pulling in the ST specific runtime mtdparts settings and adjust the mtdparts accordingly.

Quoted 9 lines
Cc Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>

---
  board/dhelectronics/dh_stm32mp1/Makefile | 1 - configs/stm32mp15_dhcom_basic_defconfig  | 3 ++- configs/stm32mp15_dhcor_basic_defconfig  | 2 ++

  3 files changed, 4 insertions(+), 2 deletions(-)
Quoted 7 lines

Thanks
Patrick

Applied on u-boot-stm/master
Thanks

#4 lore raw
Quoted 20 lines · Patrice CHOTARD

Hi Marek

Quoted 17 lines · Patrick DELAUNAY

Hi,

Quoted 13 lines · Marek Vasut

The DHSOM uses different SPI NOR layout than the ST devkit, stop pulling in the ST specific runtime mtdparts settings and adjust the mtdparts accordingly.

Cc Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>

---
  board/dhelectronics/dh_stm32mp1/Makefile | 1 - configs/stm32mp15_dhcom_basic_defconfig  | 3 ++- configs/stm32mp15_dhcor_basic_defconfig  | 2 ++

  3 files changed, 4 insertions(+), 2 deletions(-)
Quoted 4 lines
Quoted 2 lines

Applied on u-boot-stm/master
Thanks

Question and not saying don't send me a PR with it. Why aren't these in the per-board dts files with the fixed-partition binding? That's been long long supported in Linux and U-Boot parses it as well.

Signature · 1 line
Tom
#5 lore raw

Hi Tom

Quoted 21 lines · Tom Rini
Quoted 20 lines · Patrice CHOTARD

Hi Marek

Quoted 17 lines · Patrick DELAUNAY

Hi,

Quoted 13 lines · Marek Vasut

The DHSOM uses different SPI NOR layout than the ST devkit, stop pulling in the ST specific runtime mtdparts settings and adjust the mtdparts accordingly.

Cc Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>

---
  board/dhelectronics/dh_stm32mp1/Makefile | 1 - configs/stm32mp15_dhcom_basic_defconfig  | 3 ++- configs/stm32mp15_dhcor_basic_defconfig  | 2 ++

  3 files changed, 4 insertions(+), 2 deletions(-)
Quoted 9 lines
Quoted 4 lines
Quoted 2 lines

Applied on u-boot-stm/master
Thanks

Question and not saying don't send me a PR with it. Why aren't these in the per-board dts files with the fixed-partition binding? That's been long long supported in Linux and U-Boot parses it as well.

We have some constraints which need to be solved before switching on this bindings. Usage of fixed-partition bindings is on our todo list ;-)

Thanks
Patrice

#6 lore raw
Quoted 29 lines · Patrice CHOTARD

Hi Tom

Quoted 26 lines · Tom Rini
Quoted 24 lines · Patrice CHOTARD

Hi Marek

Quoted 17 lines · Patrick DELAUNAY

Hi,

Quoted 4 lines · Marek Vasut

The DHSOM uses different SPI NOR layout than the ST devkit, stop pulling in the ST specific runtime mtdparts settings and adjust the mtdparts accordingly.

Quoted 9 lines
Cc Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>

---
  board/dhelectronics/dh_stm32mp1/Makefile | 1 - configs/stm32mp15_dhcom_basic_defconfig  | 3 ++- configs/stm32mp15_dhcor_basic_defconfig  | 2 ++

  3 files changed, 4 insertions(+), 2 deletions(-)
Quoted 2 lines

Applied on u-boot-stm/master
Thanks

Quoted 7 lines
Quoted 4 lines

Question and not saying don't send me a PR with it. Why aren't these in the per-board dts files with the fixed-partition binding? That's been long long supported in Linux and U-Boot parses it as well.

We have some constraints which need to be solved before switching on this bindings. Usage of fixed-partition bindings is on our todo list ;-)

OK, thanks.

Signature · 1 line
Tom