1/* SPDX-License-Identifier: Apache-2.0 */
2
3#include <arm/armv7-m.dtsi>
4#include <zephyr/dt-bindings/gpio/gpio.h>
5#include <zephyr/dt-bindings/i2c/i2c.h>
6#include "gpio_gecko.h"
7
8/ {
9	chosen {
10		zephyr,flash-controller = &msc;
11	};
12
13	cpus {
14		#address-cells = <1>;
15		#size-cells = <0>;
16
17		cpu0: cpu@0 {
18			compatible = "arm,cortex-m4f";
19			reg = <0>;
20		};
21	};
22
23	sram0: memory@20000000 {
24		compatible = "mmio-sram";
25	};
26
27	soc {
28		msc: flash-controller@400c0000 {
29			compatible = "silabs,gecko-flash-controller";
30			reg = <0x400c0000 0x78>;
31			interrupts = <35 0>;
32
33			#address-cells = <1>;
34			#size-cells = <1>;
35
36			flash0: flash@0 {
37				compatible = "soc-nv-flash";
38				write-block-size = <4>;
39				erase-block-size = <2048>;
40			};
41		};
42
43		usart0: usart@4000c000 { /* USART0 */
44			compatible = "silabs,gecko-usart";
45			reg = <0x4000c000 0x400>;
46			interrupts = <3 0>, <4 0>;
47			interrupt-names = "rx", "tx";
48			peripheral-id = <0>;
49			status = "disabled";
50		};
51
52		usart1: usart@4000c400 { /* USART1 */
53			compatible = "silabs,gecko-usart";
54			reg = <0x4000c400 0x400>;
55			interrupts = <15 0>, <16 0>;
56			interrupt-names = "rx", "tx";
57			peripheral-id = <1>;
58			status = "disabled";
59		};
60
61		usart2: usart@4000c800 { /* USART2 */
62			compatible = "silabs,gecko-usart";
63			reg = <0x4000c800 0x400>;
64			interrupts = <18 0>, <19 0>;
65			interrupt-names = "rx", "tx";
66			peripheral-id = <2>;
67			status = "disabled";
68		};
69
70		uart0: uart@4000e000 { /* UART0 */
71			compatible = "silabs,gecko-uart";
72			reg = <0x4000e000 0x400>;
73			interrupts = <20 0>, <21 0>;
74			interrupt-names = "rx", "tx";
75			peripheral-id = <0>;
76			status = "disabled";
77		};
78
79		uart1: uart@4000e400 { /* UART1 */
80			compatible = "silabs,gecko-uart";
81			reg = <0x4000e400 0x400>;
82			interrupts = <22 0>, <23 0>;
83			interrupt-names = "rx", "tx";
84			peripheral-id = <1>;
85			status = "disabled";
86		};
87
88		leuart0: leuart@40084000 { /* LEUART0 */
89			compatible = "silabs,gecko-leuart";
90			reg = <0x40084000 0x400>;
91			interrupts = <24 0>;
92			peripheral-id = <0>;
93			status = "disabled";
94		};
95
96		leuart1: leuart@40084400 { /* LEUART1 */
97			compatible = "silabs,gecko-leuart";
98			reg = <0x40084400 0x400>;
99			interrupts = <25 0>;
100			peripheral-id = <1>;
101			status = "disabled";
102		};
103
104		i2c0: i2c@4000a000 {
105			compatible = "silabs,gecko-i2c";
106			clock-frequency = <I2C_BITRATE_STANDARD>;
107			#address-cells = <1>;
108			#size-cells = <0>;
109			reg = <0x4000a000 0x400>;
110			interrupts = <9 0>;
111			status = "disabled";
112		};
113
114		i2c1: i2c@4000a400 {
115			compatible = "silabs,gecko-i2c";
116			clock-frequency = <I2C_BITRATE_STANDARD>;
117			#address-cells = <1>;
118			#size-cells = <0>;
119			reg = <0x4000a400 0x400>;
120			interrupts = <10 0>;
121			status = "disabled";
122		};
123
124		gpio@40006100 {
125			compatible = "silabs,gecko-gpio";
126			reg = <0x40006100 0xf00>;
127			interrupts = <1 2 11 2>;
128			interrupt-names = "GPIO_EVEN", "GPIO_ODD";
129
130			ranges;
131			#address-cells = <1>;
132			#size-cells = <1>;
133
134			gpioa: gpio@40006000 {
135				compatible = "silabs,gecko-gpio-port";
136				reg = <0x40006000 0x24>;
137				peripheral-id = <0>;
138				gpio-controller;
139				#gpio-cells = <2>;
140				status = "disabled";
141			};
142
143			gpiob: gpio@40006024 {
144				compatible = "silabs,gecko-gpio-port";
145				reg = <0x40006024 0x24>;
146				peripheral-id = <1>;
147				gpio-controller;
148				#gpio-cells = <2>;
149				status = "disabled";
150			};
151
152			gpioc: gpio@40006048 {
153				compatible = "silabs,gecko-gpio-port";
154				reg = <0x40006048 0x24>;
155				peripheral-id = <2>;
156				gpio-controller;
157				#gpio-cells = <2>;
158				status = "disabled";
159			};
160
161			gpiod: gpio@4000606c {
162				compatible = "silabs,gecko-gpio-port";
163				reg = <0x4000606c 0x24>;
164				peripheral-id = <3>;
165				gpio-controller;
166				#gpio-cells = <2>;
167				status = "disabled";
168			};
169
170			gpioe: gpio@40006090 {
171				compatible = "silabs,gecko-gpio-port";
172				reg = <0x40006090 0x24>;
173				peripheral-id = <4>;
174				gpio-controller;
175				#gpio-cells = <2>;
176				status = "disabled";
177			};
178
179			gpiof: gpio@400060b4 {
180				compatible = "silabs,gecko-gpio-port";
181				reg = <0x400060b4 0x24>;
182				peripheral-id = <5>;
183				gpio-controller;
184				#gpio-cells = <2>;
185				status = "disabled";
186			};
187		};
188
189		pinctrl: pin-controller {
190			/* Pin controller is a "virtual" device since SiLabs SoCs do pin
191			 * control in a distributed way (GPIO registers and PSEL
192			 * registers on each peripheral).
193			 */
194			compatible = "silabs,gecko-pinctrl";
195		};
196	};
197};
198
199&nvic {
200	arm,num-irq-priority-bits = <3>;
201};
202