diff --git a/arch/arm/soc/st_stm32/stm32f1/Kconfig.defconfig.series b/arch/arm/soc/st_stm32/stm32f1/Kconfig.defconfig.series index ad9ca348c3d..9a06045e878 100644 --- a/arch/arm/soc/st_stm32/stm32f1/Kconfig.defconfig.series +++ b/arch/arm/soc/st_stm32/stm32f1/Kconfig.defconfig.series @@ -12,12 +12,6 @@ source "arch/arm/soc/st_stm32/stm32f1/Kconfig.defconfig.stm32f1*" config SOC_SERIES default stm32f1 -if !HAS_DTS -config NUM_IRQ_PRIO_BITS - int - default 4 -endif # !HAS_DTS - if WATCHDOG config IWDG_STM32 diff --git a/arch/arm/soc/st_stm32/stm32f1/Kconfig.defconfig.stm32f103xb b/arch/arm/soc/st_stm32/stm32f1/Kconfig.defconfig.stm32f103xb index 2472b136c2e..f7c1da75182 100644 --- a/arch/arm/soc/st_stm32/stm32f1/Kconfig.defconfig.stm32f103xb +++ b/arch/arm/soc/st_stm32/stm32f1/Kconfig.defconfig.stm32f103xb @@ -11,14 +11,6 @@ config SOC string default stm32f103xb -if !HAS_DTS -config SRAM_SIZE - default 20 - -config FLASH_SIZE - default 128 -endif # !HAS_DTS - config NUM_IRQS int default 59 diff --git a/arch/arm/soc/st_stm32/stm32f1/Kconfig.defconfig.stm32f103xe b/arch/arm/soc/st_stm32/stm32f1/Kconfig.defconfig.stm32f103xe index 4ecf2f5ecec..a87b3d21f4e 100644 --- a/arch/arm/soc/st_stm32/stm32f1/Kconfig.defconfig.stm32f103xe +++ b/arch/arm/soc/st_stm32/stm32f1/Kconfig.defconfig.stm32f103xe @@ -11,12 +11,6 @@ config SOC string default stm32f103xe -config SRAM_SIZE - default 64 - -config FLASH_SIZE - default 512 - config NUM_IRQS int default 68 diff --git a/arch/arm/soc/st_stm32/stm32f1/Kconfig.defconfig.stm32f107xc b/arch/arm/soc/st_stm32/stm32f1/Kconfig.defconfig.stm32f107xc index 28b88abd763..0ca6b621197 100644 --- a/arch/arm/soc/st_stm32/stm32f1/Kconfig.defconfig.stm32f107xc +++ b/arch/arm/soc/st_stm32/stm32f1/Kconfig.defconfig.stm32f107xc @@ -11,12 +11,6 @@ config SOC string default stm32f107xc -config SRAM_SIZE - default 64 - -config FLASH_SIZE - default 256 - config NUM_IRQS int default 68 diff --git a/boards/arm/nucleo_f103rb/nucleo_f103rb_defconfig b/boards/arm/nucleo_f103rb/nucleo_f103rb_defconfig index 360e2b6adae..dc74074673c 100644 --- a/boards/arm/nucleo_f103rb/nucleo_f103rb_defconfig +++ b/boards/arm/nucleo_f103rb/nucleo_f103rb_defconfig @@ -12,7 +12,6 @@ CONFIG_SERIAL=y CONFIG_UART_STM32=y # enable USART2 - passthrough to STLINK v2 connector CONFIG_UART_STM32_PORT_2=y -CONFIG_UART_STM32_PORT_2_BAUD_RATE=115200 # enable console on this port by default CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y @@ -49,3 +48,6 @@ CONFIG_CLOCK_STM32F10X_APB2_PRESCALER=0 CONFIG_PWM=y CONFIG_PWM_STM32=y CONFIG_PWM_STM32_1=y + +#enable DTS +CONFIG_HAS_DTS=y diff --git a/boards/arm/olimexino_stm32/olimexino_stm32_defconfig b/boards/arm/olimexino_stm32/olimexino_stm32_defconfig index be715337d97..0b5583c8d54 100644 --- a/boards/arm/olimexino_stm32/olimexino_stm32_defconfig +++ b/boards/arm/olimexino_stm32/olimexino_stm32_defconfig @@ -12,7 +12,6 @@ CONFIG_SERIAL=y CONFIG_UART_STM32=y # enable USART1 CONFIG_UART_STM32_PORT_1=y -CONFIG_UART_STM32_PORT_1_BAUD_RATE=115200 # enable console on this port by default CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y diff --git a/boards/arm/stm3210c_eval/stm3210c_eval_defconfig b/boards/arm/stm3210c_eval/stm3210c_eval_defconfig index 8b7a87be541..ea801aefecc 100644 --- a/boards/arm/stm3210c_eval/stm3210c_eval_defconfig +++ b/boards/arm/stm3210c_eval/stm3210c_eval_defconfig @@ -24,7 +24,6 @@ CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_UART_STM32=y # enable USART2 - passthrough to STLINK v2 connector CONFIG_UART_STM32_PORT_2=y -CONFIG_UART_STM32_PORT_2_BAUD_RATE=115200 # enable console on this port by default CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y @@ -59,3 +58,6 @@ CONFIG_CLOCK_STM32F10X_CONN_LINE_AHB_PRESCALER=0 # APB1 clock must not to exceed 36MHz limit CONFIG_CLOCK_STM32F10X_CONN_LINE_APB1_PRESCALER=2 CONFIG_CLOCK_STM32F10X_CONN_LINE_APB2_PRESCALER=0 + +#enable DTS +CONFIG_HAS_DTS=y diff --git a/boards/arm/stm32_mini_a15/stm32_mini_a15_defconfig b/boards/arm/stm32_mini_a15/stm32_mini_a15_defconfig index d6ab3ba4ecd..db152e81fdc 100644 --- a/boards/arm/stm32_mini_a15/stm32_mini_a15_defconfig +++ b/boards/arm/stm32_mini_a15/stm32_mini_a15_defconfig @@ -11,7 +11,6 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000 CONFIG_SERIAL=y CONFIG_UART_STM32=y CONFIG_UART_STM32_PORT_1=y -CONFIG_UART_STM32_PORT_1_BAUD_RATE=115200 # enable pinmux CONFIG_PINMUX=y @@ -38,3 +37,6 @@ CONFIG_CLOCK_STM32F10X_APB2_PRESCALER=0 # console CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y + +#enable DTS +CONFIG_HAS_DTS=y diff --git a/dts/arm/Makefile b/dts/arm/Makefile index 9dd3bf85c66..9a1a500e16a 100644 --- a/dts/arm/Makefile +++ b/dts/arm/Makefile @@ -9,6 +9,9 @@ dtb-$(CONFIG_BOARD_OLIMEXINO_STM32) = olimexino_stm32.dts_compiled dtb-$(CONFIG_BOARD_96B_CARBON) = 96b_carbon.dts_compiled dtb-$(CONFIG_BOARD_NUCLEO_F401RE) = nucleo_f401re.dts_compiled dtb-$(CONFIG_BOARD_NUCLEO_F411RE) = nucleo_f411re.dts_compiled +dtb-$(CONFIG_BOARD_NUCLEO_F103RB) = nucleo_f103rb.dts_compiled +dtb-$(CONFIG_BOARD_STM3210C_EVAL) = stm3210c_eval.dts_compiled +dtb-$(CONFIG_BOARD_STM32_MINI_A15) = stm32_mini_a15.dts_compiled always := $(dtb-y) endif diff --git a/dts/arm/nucleo_f103rb.dts b/dts/arm/nucleo_f103rb.dts index 9b82bba1b1e..b98bc107b55 100644 --- a/dts/arm/nucleo_f103rb.dts +++ b/dts/arm/nucleo_f103rb.dts @@ -5,7 +5,7 @@ */ /dts-v1/; -#include +#include / { model = "STMicroelectronics STM32F103RB-NUCLEO board"; diff --git a/dts/arm/nucleo_f103rb.fixup b/dts/arm/nucleo_f103rb.fixup new file mode 100644 index 00000000000..4b3ec44ea99 --- /dev/null +++ b/dts/arm/nucleo_f103rb.fixup @@ -0,0 +1,13 @@ +/* This file is a temporary workaround for mapping of the generated information + * to the current driver definitions. This will be removed when the drivers + * are modified to handle the generated information, or the mapping of + * generated data matches the driver definitions. + */ + + +#define CONFIG_NUM_IRQ_PRIO_BITS ARM_V7M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS + +#define CONFIG_UART_STM32_PORT_2_BASE_ADDRESS ST_STM32_USART_40004400_BASE_ADDRESS +#define CONFIG_UART_STM32_PORT_2_BAUD_RATE ST_STM32_USART_40004400_BAUD_RATE +#define CONFIG_UART_STM32_PORT_2_IRQ_PRI ST_STM32_USART_40004400_IRQ_0_PRIORITY +#define PORT_2_IRQ ST_STM32_USART_40004400_IRQ_0 diff --git a/dts/arm/olimexino_stm32.dts b/dts/arm/olimexino_stm32.dts index 5e78de632a0..b0a0383badc 100644 --- a/dts/arm/olimexino_stm32.dts +++ b/dts/arm/olimexino_stm32.dts @@ -5,11 +5,11 @@ */ /dts-v1/; -#include +#include / { model = "Olimex OLIMEXINO-STM32 board"; - compatible = "st,olimexino_stm32", "st,stm32f103xb"; + compatible = "st,olimexino_stm32", "st,stm32f103rb"; chosen { zephyr,console = &usart1; diff --git a/dts/arm/st/stm32f103xe.dtsi b/dts/arm/st/stm32f103Xb.dtsi similarity index 88% rename from dts/arm/st/stm32f103xe.dtsi rename to dts/arm/st/stm32f103Xb.dtsi index 1b98a7c0db9..f70a8f3ee31 100644 --- a/dts/arm/st/stm32f103xe.dtsi +++ b/dts/arm/st/stm32f103Xb.dtsi @@ -1,6 +1,9 @@ /* * Copyright (c) 2017 I-SENSE group of ICCS * + * SoC device tree include for STM32F103xB SoCs + * where 'x' is replaced for specific SoCs like {C,R,T,V} + * * SPDX-License-Identifier: Apache-2.0 */ diff --git a/dts/arm/st/stm32f103xb.dtsi b/dts/arm/st/stm32f103Xe.dtsi similarity index 88% rename from dts/arm/st/stm32f103xb.dtsi rename to dts/arm/st/stm32f103Xe.dtsi index 1b98a7c0db9..04efc99cbdf 100644 --- a/dts/arm/st/stm32f103xb.dtsi +++ b/dts/arm/st/stm32f103Xe.dtsi @@ -1,6 +1,9 @@ /* * Copyright (c) 2017 I-SENSE group of ICCS * + * SoC device tree include for STM32F103xE SoCs + * where 'x' is replaced for specific SoCs like {R,V,Z} + * * SPDX-License-Identifier: Apache-2.0 */ diff --git a/dts/arm/stm3210c_eval.fixup b/dts/arm/stm3210c_eval.fixup new file mode 100644 index 00000000000..4b3ec44ea99 --- /dev/null +++ b/dts/arm/stm3210c_eval.fixup @@ -0,0 +1,13 @@ +/* This file is a temporary workaround for mapping of the generated information + * to the current driver definitions. This will be removed when the drivers + * are modified to handle the generated information, or the mapping of + * generated data matches the driver definitions. + */ + + +#define CONFIG_NUM_IRQ_PRIO_BITS ARM_V7M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS + +#define CONFIG_UART_STM32_PORT_2_BASE_ADDRESS ST_STM32_USART_40004400_BASE_ADDRESS +#define CONFIG_UART_STM32_PORT_2_BAUD_RATE ST_STM32_USART_40004400_BAUD_RATE +#define CONFIG_UART_STM32_PORT_2_IRQ_PRI ST_STM32_USART_40004400_IRQ_0_PRIORITY +#define PORT_2_IRQ ST_STM32_USART_40004400_IRQ_0 diff --git a/dts/arm/stm32_mini_a15.dts b/dts/arm/stm32_mini_a15.dts index 00d11db171f..39ed058625b 100644 --- a/dts/arm/stm32_mini_a15.dts +++ b/dts/arm/stm32_mini_a15.dts @@ -5,11 +5,11 @@ */ /dts-v1/; -#include +#include / { model = "STM32 MINI A15 board"; - compatible = "st,stm32_mini_a15", "st,stm32f103xe"; + compatible = "st,stm32_mini_a15", "st,stm32f103ve"; chosen { zephyr,console = &usart1; diff --git a/dts/arm/stm32_mini_a15.fixup b/dts/arm/stm32_mini_a15.fixup new file mode 100644 index 00000000000..cb4f5bfc123 --- /dev/null +++ b/dts/arm/stm32_mini_a15.fixup @@ -0,0 +1,13 @@ +/* This file is a temporary workaround for mapping of the generated information + * to the current driver definitions. This will be removed when the drivers + * are modified to handle the generated information, or the mapping of + * generated data matches the driver definitions. + */ + + +#define CONFIG_NUM_IRQ_PRIO_BITS ARM_V7M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS + +#define CONFIG_UART_STM32_PORT_1_BASE_ADDRESS ST_STM32_USART_40013800_BASE_ADDRESS +#define CONFIG_UART_STM32_PORT_1_BAUD_RATE ST_STM32_USART_40013800_BAUD_RATE +#define CONFIG_UART_STM32_PORT_1_IRQ_PRI ST_STM32_USART_40013800_IRQ_0_PRIORITY +#define PORT_1_IRQ ST_STM32_USART_40013800_IRQ_0