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,flash-controller = &msc;
12	};
13
14	cpus {
15		#address-cells = <1>;
16		#size-cells = <0>;
17
18		cpu0: cpu@0 {
19			compatible = "arm,cortex-m4f";
20			reg = <0>;
21		};
22	};
23
24	sram0: memory@20000000 {
25		compatible = "mmio-sram";
26	};
27
28	soc {
29		msc: flash-controller@400e0000 {
30			compatible = "silabs,gecko-flash-controller";
31			reg = <0x400e0000 0x78>;
32			interrupts = <24 0>;
33
34			#address-cells = <1>;
35			#size-cells = <1>;
36
37			flash0: flash@0 {
38				compatible = "soc-nv-flash";
39				write-block-size = <4>;
40				erase-block-size = <2048>;
41			};
42		};
43
44		usart0: usart@40010000 { /* USART0 */
45			compatible = "silabs,gecko-usart";
46			reg = <0x40010000 0x400>;
47			interrupts = <11 0>, <12 0>;
48			interrupt-names = "rx", "tx";
49			peripheral-id = <0>;
50			status = "disabled";
51		};
52
53		usart1: usart@40010400 { /* USART1 */
54			compatible = "silabs,gecko-usart";
55			reg = <0x40010400 0x400>;
56			interrupts = <19 0>, <20 0>;
57			interrupt-names = "rx", "tx";
58			peripheral-id = <1>;
59			status = "disabled";
60		};
61
62		leuart0: leuart@4004a000 { /* LEUART0 */
63			compatible = "silabs,gecko-leuart";
64			reg = <0x4004a000 0x400>;
65			interrupts = <21 0>;
66			peripheral-id = <0>;
67			status = "disabled";
68		};
69
70		i2c0: i2c@4000c000 {
71			compatible = "silabs,gecko-i2c";
72			clock-frequency = <I2C_BITRATE_STANDARD>;
73			#address-cells = <1>;
74			#size-cells = <0>;
75			reg = <0x4000c000 0x400>;
76			interrupts = <16 0>;
77			status = "disabled";
78		};
79
80		rtcc0: rtcc@40042000 {
81			compatible = "silabs,gecko-rtcc";
82			reg = <0x40042000 0x184>;
83			interrupts = <29 0>;
84			clock-frequency = <32768>;
85			prescaler = <1>;
86			status = "disabled";
87		};
88
89		gpio: gpio@4000a400 {
90			compatible = "silabs,gecko-gpio";
91			reg = <0x4000a400 0xc00>;
92			interrupts = <9 2 17 2>;
93			interrupt-names = "GPIO_EVEN", "GPIO_ODD";
94
95			ranges;
96			#address-cells = <1>;
97			#size-cells = <1>;
98
99			gpioa: gpio@4000a000 {
100				compatible = "silabs,gecko-gpio-port";
101				reg = <0x4000a000 0x30>;
102				peripheral-id = <0>;
103				gpio-controller;
104				#gpio-cells = <2>;
105				status = "disabled";
106			};
107
108			gpiob: gpio@4000a030 {
109				compatible = "silabs,gecko-gpio-port";
110				reg = <0x4000a030 0x30>;
111				peripheral-id = <1>;
112				gpio-controller;
113				#gpio-cells = <2>;
114				status = "disabled";
115			};
116
117			gpioc: gpio@4000a060 {
118				compatible = "silabs,gecko-gpio-port";
119				reg = <0x4000a060 0x30>;
120				peripheral-id = <2>;
121				gpio-controller;
122				#gpio-cells = <2>;
123				status = "disabled";
124			};
125
126			gpiod: gpio@4000a090 {
127				compatible = "silabs,gecko-gpio-port";
128				reg = <0x4000a090 0x30>;
129				peripheral-id = <3>;
130				gpio-controller;
131				#gpio-cells = <2>;
132				status = "disabled";
133			};
134
135			gpioe: gpio@4000a0c0 {
136				compatible = "silabs,gecko-gpio-port";
137				reg = <0x4000a0c0 0x30>;
138				peripheral-id = <4>;
139				gpio-controller;
140				#gpio-cells = <2>;
141				status = "disabled";
142			};
143
144			gpiof: gpio@4000a0f0 {
145				compatible = "silabs,gecko-gpio-port";
146				reg = <0x4000a0f0 0x30>;
147				peripheral-id = <5>;
148				gpio-controller;
149				#gpio-cells = <2>;
150				status = "disabled";
151			};
152		};
153
154		wdog0: wdog@40052000 {
155			compatible = "silabs,gecko-wdog";
156			reg = <0x40052000 0x2C>;
157			peripheral-id = <0>;
158			interrupts = <2 0>;
159			status = "disabled";
160		};
161
162		timer0: timer@40018000 {
163			compatible = "silabs,gecko-timers";
164			reg = <0x40018000 0x400>;
165			status = "disabled";
166
167			pwm {
168				compatible = "silabs,gecko-pwm";
169				status = "disabled";
170				#pwm-cells = <3>;
171			};
172		};
173
174	};
175
176	pinctrl: pin-controller {
177		/* Pin controller is a "virtual" device since SiLabs SoCs do pin
178		 * control in a distributed way (GPIO registers and PSEL
179		 * registers on each peripheral).
180		 */
181		compatible = "silabs,gecko-pinctrl";
182	};
183};
184
185&nvic {
186	arm,num-irq-priority-bits = <3>;
187};
188