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#include <zephyr/dt-bindings/pwm/pwm.h>
8
9/ {
10	chosen {
11		zephyr,entropy = &trng0;
12		zephyr,flash-controller = &msc;
13	};
14
15	cpus {
16		#address-cells = <1>;
17		#size-cells = <0>;
18
19		cpu0: cpu@0 {
20			compatible = "arm,cortex-m4f";
21			reg = <0>;
22		};
23	};
24
25	sram0: memory@20000000 {
26		compatible = "mmio-sram";
27	};
28
29	soc {
30		msc: flash-controller@400e0000 {
31			compatible = "silabs,gecko-flash-controller";
32			reg = <0x400e0000 0x104>;
33			interrupts = <25 0>;
34
35			#address-cells = <1>;
36			#size-cells = <1>;
37
38			flash0: flash@0 {
39				compatible = "soc-nv-flash";
40				write-block-size = <4>;
41				erase-block-size = <2048>;
42			};
43		};
44
45		usart0: usart@40010000 { /* USART0 */
46			compatible = "silabs,gecko-usart";
47			reg = <0x40010000 0x400>;
48			interrupts = <12 0>, <13 0>;
49			interrupt-names = "rx", "tx";
50			peripheral-id = <0>;
51			status = "disabled";
52		};
53
54		usart1: usart@40010400 { /* USART1 */
55			compatible = "silabs,gecko-usart";
56			reg = <0x40010400 0x400>;
57			interrupts = <20 0>, <21 0>;
58			interrupt-names = "rx", "tx";
59			peripheral-id = <1>;
60			status = "disabled";
61		};
62
63		usart2: usart@40010800 { /* USART2 */
64			compatible = "silabs,gecko-usart";
65			reg = <0x40010800 0x400>;
66			interrupts = <40 0>, <41 0>;
67			interrupt-names = "rx", "tx";
68			peripheral-id = <2>;
69			status = "disabled";
70		};
71
72		usart3: usart@40010c00 { /* USART3 */
73			compatible = "silabs,gecko-usart";
74			reg = <0x40010c00 0x400>;
75			interrupts = <43 0>, <44 0>;
76			interrupt-names = "rx", "tx";
77			peripheral-id = <3>;
78			status = "disabled";
79		};
80
81		leuart0: leuart@4004a000 { /* LEUART0 */
82			compatible = "silabs,gecko-leuart";
83			reg = <0x4004a000 0x400>;
84			interrupts = <22 0>;
85			peripheral-id = <0>;
86			status = "disabled";
87		};
88
89		i2c0: i2c@4000c000 {
90			compatible = "silabs,gecko-i2c";
91			clock-frequency = <I2C_BITRATE_STANDARD>;
92			#address-cells = <1>;
93			#size-cells = <0>;
94			reg = <0x4000c000 0x400>;
95			interrupts = <17 0>;
96			status = "disabled";
97		};
98
99		i2c1: i2c@4000c400 {
100			compatible = "silabs,gecko-i2c";
101			clock-frequency = <I2C_BITRATE_STANDARD>;
102			#address-cells = <1>;
103			#size-cells = <0>;
104			reg = <0x4000c400 0x400>;
105			interrupts = <42 0>;
106			status = "disabled";
107		};
108
109		rtcc0: rtcc@40042000 {
110			compatible = "silabs,gecko-rtcc";
111			reg = <0x40042000 0x184>;
112			interrupts = <30 0>;
113			clock-frequency = <32768>;
114			prescaler = <1>;
115			status = "disabled";
116		};
117
118		gpio: gpio@4000a400 {
119			compatible = "silabs,gecko-gpio";
120			reg = <0x4000a400 0xc00>;
121			interrupts = <10 2 18 2>;
122			interrupt-names = "GPIO_EVEN", "GPIO_ODD";
123
124			ranges;
125			#address-cells = <1>;
126			#size-cells = <1>;
127
128			gpioa: gpio@4000a000 {
129				compatible = "silabs,gecko-gpio-port";
130				reg = <0x4000a000 0x30>;
131				peripheral-id = <0>;
132				gpio-controller;
133				#gpio-cells = <2>;
134				status = "disabled";
135			};
136
137			gpiob: gpio@4000a030 {
138				compatible = "silabs,gecko-gpio-port";
139				reg = <0x4000a030 0x30>;
140				peripheral-id = <1>;
141				gpio-controller;
142				#gpio-cells = <2>;
143				status = "disabled";
144			};
145
146			gpioc: gpio@4000a060 {
147				compatible = "silabs,gecko-gpio-port";
148				reg = <0x4000a060 0x30>;
149				peripheral-id = <2>;
150				gpio-controller;
151				#gpio-cells = <2>;
152				status = "disabled";
153			};
154
155			gpiod: gpio@4000a090 {
156				compatible = "silabs,gecko-gpio-port";
157				reg = <0x4000a090 0x30>;
158				peripheral-id = <3>;
159				gpio-controller;
160				#gpio-cells = <2>;
161				status = "disabled";
162			};
163
164			gpiof: gpio@4000a0f0 {
165				compatible = "silabs,gecko-gpio-port";
166				reg = <0x4000a0f0 0x30>;
167				peripheral-id = <5>;
168				gpio-controller;
169				#gpio-cells = <2>;
170				status = "disabled";
171			};
172
173			gpioi: gpio@4000a180 {
174				compatible = "silabs,gecko-gpio-port";
175				reg = <0x4000a180 0x30>;
176				peripheral-id = <8>;
177				gpio-controller;
178				#gpio-cells = <2>;
179				status = "disabled";
180			};
181
182			gpioj: gpio@4000a1b0 {
183				compatible = "silabs,gecko-gpio-port";
184				reg = <0x4000a1b0 0x30>;
185				peripheral-id = <9>;
186				gpio-controller;
187				#gpio-cells = <2>;
188				status = "disabled";
189			};
190
191			gpiok: gpio@4000a1e0 {
192				compatible = "silabs,gecko-gpio-port";
193				reg = <0x4000a1e0 0x30>;
194				peripheral-id = <10>;
195				gpio-controller;
196				#gpio-cells = <2>;
197				status = "disabled";
198			};
199		};
200
201		wdog0: wdog@40052000 {
202			compatible = "silabs,gecko-wdog";
203			reg = <0x40052000 0x2C>;
204			peripheral-id = <0>;
205			interrupts = <2 0>;
206			status = "disabled";
207		};
208
209		wdog1: wdog@40052400 {
210			compatible = "silabs,gecko-wdog";
211			reg = <0x40052400 0x2C>;
212			peripheral-id = <1>;
213			interrupts = <3 0>;
214			status = "disabled";
215		};
216
217		timer0: timer@40018000 {
218			compatible = "silabs,gecko-timers";
219			reg = <0x40018000 0x400>;
220			status = "disabled";
221
222			pwm {
223				compatible = "silabs,gecko-pwm";
224				status = "disabled";
225				#pwm-cells = <3>;
226			};
227		};
228
229		trng0: trng@4001d000 {
230			compatible = "silabs,gecko-trng";
231			reg = <0x4001d000 0x400>;
232			interrupts = <49 0>;
233			status = "disabled";
234		};
235	};
236
237	pinctrl: pin-controller {
238		/* Pin controller is a "virtual" device since SiLabs SoCs do pin
239		 * control in a distributed way (GPIO registers and PSEL
240		 * registers on each peripheral).
241		 */
242		compatible = "silabs,gecko-pinctrl";
243	};
244};
245
246&nvic {
247	arm,num-irq-priority-bits = <3>;
248};
249