blob: 3c452781dcbea7cb47fb09757c2759de5dc85dfd [file] [log] [blame]
Erwan Gouriou84fce262017-07-24 15:44:26 +02001/*
2 * Copyright (c) 2017 Linaro Limited
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
Erwan Gouriou9bd248f2017-07-25 09:27:44 +02007#include <st/stm32l4-pinctrl.dtsi>
8
Erwan Gouriou84fce262017-07-24 15:44:26 +02009#include <arm/armv7-m.dtsi>
10#include <st/mem.h>
11#include <dt-bindings/clock/stm32_clock.h>
Kumar Gala99c19c62017-08-10 11:59:14 -050012#include <dt-bindings/i2c/i2c.h>
Erwan Gouriou84fce262017-07-24 15:44:26 +020013
14/ {
15 cpus {
16 #address-cells = <1>;
17 #size-cells = <0>;
18
19 cpu@0 {
20 device_type = "cpu";
21 compatible = "arm,cortex-m4f";
22 reg = <0>;
23 };
24 };
25
Erwan Gouriou84fce262017-07-24 15:44:26 +020026 sram0: memory@20000000 {
27 device_type = "memory";
28 compatible = "mmio-sram";
29 reg = <0x20000000 DT_SRAM_SIZE>;
30 };
31
32 soc {
Kumar Gala4ddb81f2018-01-23 12:52:50 -060033 flash-controller@40022000 {
34 compatible = "st,stm32l4-flash-controller";
35 label = "FLASH_CTRL";
36 reg = <0x40022000 0x400>;
37 interrupts = <4 0>;
38
39 #address-cells = <1>;
40 #size-cells = <1>;
41
42 flash0: flash@8000000 {
43 compatible = "soc-nv-flash";
44 label = "FLASH_STM32";
45 reg = <0x08000000 DT_FLASH_SIZE>;
46
47 write-block-size = <8>;
48 };
49 };
50
Erwan Gouriou84fce262017-07-24 15:44:26 +020051 rcc: rcc@40021000 {
52 compatible = "st,stm32-rcc";
53 clocks-controller;
54 #clocks-cells = <2>;
55 reg = <0x40021000 0x400>;
56 label = "STM32_CLK_RCC";
57 };
58
Erwan Gouriou9bd248f2017-07-25 09:27:44 +020059 pinctrl: pin-controller {
60 compatible = "st,stm32-pinmux";
61 #address-cells = <1>;
62 #size-cells = <1>;
63 reg = <0x48000000 0x2000>;
Erwan Gourioua78adcd2017-11-23 13:39:20 +010064
65 gpioa: gpio@48000000 {
66 compatible = "st,stm32-gpio";
67 gpio-controller;
68 #gpio-cells = <2>;
69 reg = <0x48000000 0x400>;
70 clocks = <&rcc STM32_CLOCK_BUS_AHB2 0x00000001>;
71 label = "GPIOA";
72 };
73
74 gpiob: gpio@48000400 {
75 compatible = "st,stm32-gpio";
76 gpio-controller;
77 #gpio-cells = <2>;
78 reg = <0x48000400 0x400>;
79 clocks = <&rcc STM32_CLOCK_BUS_AHB2 0x00000002>;
80 label = "GPIOB";
81 };
82
83 gpioc: gpio@48000800 {
84 compatible = "st,stm32-gpio";
85 gpio-controller;
86 #gpio-cells = <2>;
87 reg = <0x48000800 0x400>;
88 clocks = <&rcc STM32_CLOCK_BUS_AHB2 0x00000004>;
89 label = "GPIOC";
90 };
91
92 gpioh: gpio@480001c00 {
93 compatible = "st,stm32-gpio";
94 gpio-controller;
95 #gpio-cells = <2>;
96 reg = <0x48001c00 0x400>;
97 clocks = <&rcc STM32_CLOCK_BUS_AHB2 0x00000080>;
98 label = "GPIOH";
99 };
Erwan Gouriou9bd248f2017-07-25 09:27:44 +0200100 };
101
Erwan Gouriou84fce262017-07-24 15:44:26 +0200102 usart1: serial@40013800 {
103 compatible = "st,stm32-usart", "st,stm32-uart";
104 reg = <0x40013800 0x400>;
105 clocks = <&rcc STM32_CLOCK_BUS_APB2 0x00004000>;
106 interrupts = <37 0>;
107 status = "disabled";
108 label = "UART_1";
109 };
110
111 usart2: serial@40004400 {
112 compatible = "st,stm32-usart", "st,stm32-uart";
113 reg = <0x40004400 0x400>;
114 clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00020000>;
115 interrupts = <38 0>;
116 status = "disabled";
117 label = "UART_2";
118 };
119
120 usart3: serial@40004800 {
121 compatible = "st,stm32-usart", "st,stm32-uart";
122 reg = <0x40004800 0x400>;
123 clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00040000>;
124 interrupts = <39 0>;
125 status = "disabled";
126 label = "UART_3";
127 };
128
129 i2c1: i2c@40005400 {
130 compatible = "st,stm32-i2c-v2";
Kumar Gala99c19c62017-08-10 11:59:14 -0500131 clock-frequency = <I2C_BITRATE_STANDARD>;
Erwan Gouriou84fce262017-07-24 15:44:26 +0200132 #address-cells = <1>;
133 #size-cells = <0>;
134 reg = <0x40005400 0x400>;
135 interrupts = <31 0>, <32 0>;
136 interrupt-names = "event", "error";
137 status = "disabled";
138 label= "I2C_1";
139 };
Erwan Gouriouade121d2017-10-17 10:49:48 +0200140
141 i2c2: i2c@40005800 {
142 compatible = "st,stm32-i2c-v2";
143 clock-frequency = <I2C_BITRATE_STANDARD>;
144 #address-cells = <1>;
145 #size-cells = <0>;
146 reg = <0x40005800 0x400>;
147 interrupts = <33 0>, <34 0>;
148 interrupt-names = "event", "error";
149 status = "disabled";
150 label= "I2C_2";
151 };
Yannis Damigos2e398352018-01-05 19:51:35 +0200152
153 spi1: spi@40013000 {
154 compatible = "st,stm32-spi-fifo";
155 #address-cells = <1>;
156 #size-cells = <0>;
157 reg = <0x40013000 0x400>;
158 interrupts = <35 5>;
159 status = "disabled";
160 label = "SPI_1";
161 };
162
163 spi2: spi@40003800 {
164 compatible = "st,stm32-spi-fifo";
165 #address-cells = <1>;
166 #size-cells = <0>;
167 reg = <0x40003800 0x400>;
168 interrupts = <36 5>;
169 status = "disabled";
170 label = "SPI_2";
171 };
Erwan Gouriou84fce262017-07-24 15:44:26 +0200172 };
173};
174
175&nvic {
176 arm,num-irq-priority-bits = <4>;
177};