Skip to content

Commit

Permalink
dts: arm: st: Remove use of CONFIG_SOC_* from STM32 F1 dts files
Browse files Browse the repository at this point in the history
To move forward and remove use of Kconfig in dts files lets just create
SoC specific dtsi files that the boards can include.  We also seperate
out the F1 dtsi files into their own dir.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
  • Loading branch information
galak committed Sep 27, 2018
1 parent bded528 commit aecc4c5
Show file tree
Hide file tree
Showing 12 changed files with 90 additions and 13 deletions.
2 changes: 1 addition & 1 deletion boards/arm/nucleo_f103rb/nucleo_f103rb.dts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

/dts-v1/;
#include <st/stm32f103Xb.dtsi>
#include <st/f1/stm32f103Xb.dtsi>

/ {
model = "STMicroelectronics STM32F103RB-NUCLEO board";
Expand Down
2 changes: 1 addition & 1 deletion boards/arm/olimexino_stm32/olimexino_stm32.dts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

/dts-v1/;
#include <st/stm32f103Xb.dtsi>
#include <st/f1/stm32f103Xb.dtsi>

/ {
model = "Olimex OLIMEXINO-STM32 board";
Expand Down
2 changes: 1 addition & 1 deletion boards/arm/stm3210c_eval/stm3210c_eval.dts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

/dts-v1/;
#include <st/stm32f107.dtsi>
#include <st/f1/stm32f107Xc.dtsi>

/ {
model = "STMicroelectronics STM3210C-EVAL board";
Expand Down
4 changes: 2 additions & 2 deletions boards/arm/stm32_min_dev/stm32_min_dev.dts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
*/

/dts-v1/;
#include <st/stm32f103Xb.dtsi>
#include <st/f1/stm32f103X8.dtsi>

/ {
model = "STM32 Minimum Development Board";
compatible = "st,stm32_min_dev", "st,stm32f103rb";
compatible = "st,stm32_min_dev", "st,stm32f103c8";

chosen {
zephyr,console = &usart1;
Expand Down
2 changes: 1 addition & 1 deletion boards/arm/stm32_mini_a15/stm32_mini_a15.dts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

/dts-v1/;
#include <st/stm32f103Xe.dtsi>
#include <st/f1/stm32f103Xe.dtsi>

/ {
model = "STM32 MINI A15 board";
Expand Down
File renamed without changes.
5 changes: 1 addition & 4 deletions dts/arm/st/stm32f1.dtsi → dts/arm/st/f1/stm32f1.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <st/stm32f1-pinctrl.dtsi>
#include <st/f1/stm32f1-pinctrl.dtsi>
#include <arm/armv7-m.dtsi>
#include <st/mem.h>
#include <dt-bindings/clock/stm32_clock.h>
#include <dt-bindings/i2c/i2c.h>
#include <dt-bindings/gpio/gpio.h>
Expand All @@ -26,13 +25,11 @@
flash0: flash@8000000 {
compatible = "soc-nv-flash";
label = "FLASH_STM32";
reg = <0x08000000 DT_FLASH_SIZE>;
};

sram0: memory@20000000 {
device_type = "memory";
compatible = "mmio-sram";
reg = <0x20000000 DT_SRAM_SIZE>;
};

soc {
Expand Down
45 changes: 45 additions & 0 deletions dts/arm/st/f1/stm32f103X8.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Copyright (c) 2018 Linaro Limited
*
* SPDX-License-Identifier: Apache-2.0
*/

#include <mem.h>
#include <st/f1/stm32f1.dtsi>

/ {
flash0: flash@8000000 {
reg = <0x08000000 DT_SIZE_K(64)>;
};

sram0: memory@20000000 {
reg = <0x20000000 DT_SIZE_K(20)>;
};

soc {
/* spi2 is present on all STM32F103x8 SoCs except
* STM32F103T8. Delete node in stm32f103t8.dtsi.
*/
spi2: spi@40003800 {
compatible = "st,stm32-spi";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x40003800 0x400>;
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00004000>;
interrupts = <36 5>;
status = "disabled";
label = "SPI_2";
};

usb: usb@40005c00 {
compatible = "st,stm32-usb";
reg = <0x40005c00 0x400>;
interrupts = <20 0>;
interrupt-names = "usb";
num-bidir-endpoints = <8>;
ram-size = <512>;
status = "disabled";
label= "USB";
};
};
};
10 changes: 9 additions & 1 deletion dts/arm/st/stm32f103Xb.dtsi → dts/arm/st/f1/stm32f103Xb.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,17 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <st/stm32f1.dtsi>
#include <mem.h>
#include <st/f1/stm32f1.dtsi>

/ {
flash0: flash@8000000 {
reg = <0x08000000 DT_SIZE_K(128)>;
};

sram0: memory@20000000 {
reg = <0x20000000 DT_SIZE_K(20)>;
};
soc {
/* spi2 is present on all STM32F103xB SoCs except
* STM32F103TB. Delete node in stm32f103tb.dtsi.
Expand Down
11 changes: 10 additions & 1 deletion dts/arm/st/stm32f103Xe.dtsi → dts/arm/st/f1/stm32f103Xe.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,18 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <st/stm32f103Xb.dtsi>
#include <mem.h>
#include <st/f1/stm32f103Xb.dtsi>

/ {
flash0: flash@8000000 {
reg = <0x08000000 DT_SIZE_K(512)>;
};

sram0: memory@20000000 {
reg = <0x20000000 DT_SIZE_K(64)>;
};

soc {
uart4: serial@40004c00 {
compatible = "st,stm32-uart";
Expand Down
2 changes: 1 addition & 1 deletion dts/arm/st/stm32f107.dtsi → dts/arm/st/f1/stm32f107.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <st/stm32f1.dtsi>
#include <st/f1/stm32f1.dtsi>

/ {
soc {
Expand Down
18 changes: 18 additions & 0 deletions dts/arm/st/f1/stm32f107Xc.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright (c) 2018 Linaro Limited
*
* SPDX-License-Identifier: Apache-2.0
*/

#include <mem.h>
#include <st/f1/stm32f107.dtsi>

/ {
flash0: flash@8000000 {
reg = <0x08000000 DT_SIZE_K(256)>;
};

sram0: memory@20000000 {
reg = <0x20000000 DT_SIZE_K(64)>;
};
};

0 comments on commit aecc4c5

Please sign in to comment.