From 32309f812469c59f6aa639236468aeb3d2a28036 Mon Sep 17 00:00:00 2001 From: Federico Di Gregorio Date: Fri, 18 Oct 2024 17:54:05 +0200 Subject: [PATCH] boards: opta: device tree cleanup Some changes to cleanup and clarify some device tree nodes: * removed wrong sdram2 definition * added all internal flash slots accessible from M4 * added all internal flash slots accessible from M7 * removed CONFIG_UART_LINE_CTRL because not needed by USB CDC ACM Signed-off-by: Federico Di Gregorio --- .../arduino/opta/arduino_opta_stm32h747xx_m4.dts | 9 +++++++-- .../arduino/opta/arduino_opta_stm32h747xx_m7.dts | 14 ++++++-------- .../opta/arduino_opta_stm32h747xx_m7_defconfig | 1 - 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/boards/arduino/opta/arduino_opta_stm32h747xx_m4.dts b/boards/arduino/opta/arduino_opta_stm32h747xx_m4.dts index e2825752ddc..ea586872b63 100644 --- a/boards/arduino/opta/arduino_opta_stm32h747xx_m4.dts +++ b/boards/arduino/opta/arduino_opta_stm32h747xx_m4.dts @@ -18,7 +18,7 @@ chosen { zephyr,sram = &sram1; zephyr,flash = &flash1; - zephyr,code-partition = &slot0_partition; + zephyr,code-partition = &slot1_partition; }; }; @@ -28,7 +28,12 @@ #address-cells = <1>; #size-cells = <1>; - slot0_partition: partition@80000 { + slot0_partition: partition@0 { + label = "unused"; + reg = <0x00000000 DT_SIZE_K(512)>; + }; + + slot1_partition: partition@80000 { label = "image-0"; reg = <0x00080000 DT_SIZE_K(512)>; }; diff --git a/boards/arduino/opta/arduino_opta_stm32h747xx_m7.dts b/boards/arduino/opta/arduino_opta_stm32h747xx_m7.dts index 7ddf514eff5..cc408d4daf2 100644 --- a/boards/arduino/opta/arduino_opta_stm32h747xx_m7.dts +++ b/boards/arduino/opta/arduino_opta_stm32h747xx_m7.dts @@ -23,14 +23,6 @@ zephyr,flash = &flash0; zephyr,code-partition = &slot0_partition; }; - - sdram2: sdram@d0000000 { - compatible = "zephyr,memory-region", "mmio-sram"; - device_type = "memory"; - reg = <0xd0000000 DT_SIZE_M(32)>; - zephyr,memory-region = "SDRAM2"; - zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_RAM) )>; - }; }; zephyr_udc0: &usbotg_fs { @@ -86,6 +78,12 @@ zephyr_udc0: &usbotg_fs { #address-cells = <1>; #size-cells = <1>; + boot_partition: partition@0 { + label = "mcu-boot"; + reg = <0x00000000 DT_SIZE_K(256)>; + read-only; + }; + slot0_partition: partition@40000 { label = "image-0"; reg = <0x00040000 DT_SIZE_K(768)>; diff --git a/boards/arduino/opta/arduino_opta_stm32h747xx_m7_defconfig b/boards/arduino/opta/arduino_opta_stm32h747xx_m7_defconfig index dcb6d1edc87..7440b2163e3 100644 --- a/boards/arduino/opta/arduino_opta_stm32h747xx_m7_defconfig +++ b/boards/arduino/opta/arduino_opta_stm32h747xx_m7_defconfig @@ -27,7 +27,6 @@ CONFIG_STM32H7_BOOT_M4_AT_INIT=n CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -CONFIG_UART_LINE_CTRL=y # Enable USB Stack (needed for the console to work) CONFIG_USB_DEVICE_STACK=y