From 17545c17a508fff54e0f937a76b6abc938c60c44 Mon Sep 17 00:00:00 2001 From: Tomi Fontanilles Date: Wed, 4 Sep 2024 11:17:01 +0300 Subject: [PATCH] dts: arm: st: h7: fix flash on M4 board targets The flash controller is nowadays supported on the M4 core. Add the bank2-flash-size property to the board definitions as required by the STM32 H7 flash driver. Signed-off-by: Tomi Fontanilles --- dts/arm/st/h7/stm32h745Xi_m4.dtsi | 6 +----- dts/arm/st/h7/stm32h747Xi_m4.dtsi | 6 +----- dts/arm/st/h7/stm32h755Xi_m4.dtsi | 1 + .../boards/stm32h745i_disco_stm32h745xx_m4.overlay | 9 --------- .../boards/stm32h747i_disco_stm32h747xx_m4.overlay | 3 --- samples/drivers/flash_shell/sample.yaml | 5 ----- .../mgmt/mcumgr/fs_mgmt_hash_supported/testcase.yaml | 7 ------- 7 files changed, 3 insertions(+), 34 deletions(-) delete mode 100644 samples/drivers/flash_shell/boards/stm32h745i_disco_stm32h745xx_m4.overlay delete mode 100644 samples/drivers/flash_shell/boards/stm32h747i_disco_stm32h747xx_m4.overlay diff --git a/dts/arm/st/h7/stm32h745Xi_m4.dtsi b/dts/arm/st/h7/stm32h745Xi_m4.dtsi index bc926292af9ab1..3847b2aba7a4b0 100644 --- a/dts/arm/st/h7/stm32h745Xi_m4.dtsi +++ b/dts/arm/st/h7/stm32h745Xi_m4.dtsi @@ -10,11 +10,6 @@ /delete-node/ &flash0; / { - chosen { - /* Flash controller support is not yet supported on M4 core */ - /delete-property/ zephyr,flash-controller; - }; - cpus { /delete-node/ cpu@0; }; @@ -23,6 +18,7 @@ flash-controller@52002000 { flash1: flash@8100000 { reg = <0x08100000 DT_SIZE_K(1024)>; + bank2-flash-size = <1024>; }; }; diff --git a/dts/arm/st/h7/stm32h747Xi_m4.dtsi b/dts/arm/st/h7/stm32h747Xi_m4.dtsi index bf4bdfa8f2ec82..e8a77592bf96ca 100644 --- a/dts/arm/st/h7/stm32h747Xi_m4.dtsi +++ b/dts/arm/st/h7/stm32h747Xi_m4.dtsi @@ -10,11 +10,6 @@ /delete-node/ &flash0; / { - chosen { - /* Flash controller support is not yet supported on M4 core */ - /delete-property/ zephyr,flash-controller; - }; - cpus { /delete-node/ cpu@0; }; @@ -23,6 +18,7 @@ flash-controller@52002000 { flash1: flash@8100000 { reg = <0x08100000 DT_SIZE_K(1024)>; + bank2-flash-size = <1024>; }; }; diff --git a/dts/arm/st/h7/stm32h755Xi_m4.dtsi b/dts/arm/st/h7/stm32h755Xi_m4.dtsi index 4d72f6944f5de2..81d3d3da2fc8be 100644 --- a/dts/arm/st/h7/stm32h755Xi_m4.dtsi +++ b/dts/arm/st/h7/stm32h755Xi_m4.dtsi @@ -18,6 +18,7 @@ flash-controller@52002000 { flash1: flash@8100000 { reg = <0x08100000 DT_SIZE_K(1024)>; + bank2-flash-size = <1024>; }; }; diff --git a/samples/drivers/flash_shell/boards/stm32h745i_disco_stm32h745xx_m4.overlay b/samples/drivers/flash_shell/boards/stm32h745i_disco_stm32h745xx_m4.overlay deleted file mode 100644 index db2302831f2e26..00000000000000 --- a/samples/drivers/flash_shell/boards/stm32h745i_disco_stm32h745xx_m4.overlay +++ /dev/null @@ -1,9 +0,0 @@ -/ { - chosen { - zephyr,flash-controller = &flash; - }; -}; - -&flash1 { - bank2-flash-size = <1024>; -}; diff --git a/samples/drivers/flash_shell/boards/stm32h747i_disco_stm32h747xx_m4.overlay b/samples/drivers/flash_shell/boards/stm32h747i_disco_stm32h747xx_m4.overlay deleted file mode 100644 index 89eb6d64a729c2..00000000000000 --- a/samples/drivers/flash_shell/boards/stm32h747i_disco_stm32h747xx_m4.overlay +++ /dev/null @@ -1,3 +0,0 @@ -&flash1 { - bank2-flash-size = <1024>; -}; diff --git a/samples/drivers/flash_shell/sample.yaml b/samples/drivers/flash_shell/sample.yaml index 239169d2162100..ed75923bc9d1ef 100644 --- a/samples/drivers/flash_shell/sample.yaml +++ b/samples/drivers/flash_shell/sample.yaml @@ -8,13 +8,8 @@ tests: - shell filter: CONFIG_FLASH_HAS_DRIVER_ENABLED platform_exclude: - - nucleo_h745zi_q/stm32h745xx/m4 - stm32h7s78_dk - gd32f350r_eval - - arduino_portenta_h7/stm32h747xx/m4 - - arduino_nicla_vision/stm32h747xx/m4 - - arduino_giga_r1/stm32h747xx/m4 - - nucleo_h755zi_q/stm32h755xx/m4 harness: keyboard min_ram: 12 integration_platforms: diff --git a/tests/subsys/mgmt/mcumgr/fs_mgmt_hash_supported/testcase.yaml b/tests/subsys/mgmt/mcumgr/fs_mgmt_hash_supported/testcase.yaml index 37bd14e53bddd6..b7aeddd6c05ba5 100644 --- a/tests/subsys/mgmt/mcumgr/fs_mgmt_hash_supported/testcase.yaml +++ b/tests/subsys/mgmt/mcumgr/fs_mgmt_hash_supported/testcase.yaml @@ -11,19 +11,12 @@ common: integration_platforms: - native_sim platform_exclude: - - arduino_giga_r1/stm32h747xx/m4 - - arduino_nicla_vision/stm32h747xx/m4 - - arduino_portenta_h7/stm32h747xx/m4 - lpcxpresso51u68 - - nucleo_h745zi_q/stm32h745xx/m4 - - nucleo_h755zi_q/stm32h755xx/m4 - - stm32h747i_disco/stm32h747xx/m4 - lpcxpresso55s69/lpc55s69/cpu1 - mpfs_icicle/polarfire/u54 - mpfs_icicle/polarfire/u54/smp - mpfs_icicle/polarfire/e51 - apollo4p_evb - - stm32h745i_disco/stm32h745xx/m4 - cyw920829m2evk_02 tests: mgmt.mcumgr.fs.mgmt.hash.supported.crc32: