1/* SPDX-License-Identifier: Apache-2.0 */
2
3#include <arm/armv6-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-m0+";
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 0x5c>;
31			interrupts = <15 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 = <1024>;
40			};
41		};
42
43		usart0: usart@4000c000 { /* USART0 */
44			compatible = "silabs,gecko-usart";
45			reg = <0x4000c000 0x400>;
46			interrupts = <17 0>, <18 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 = <8 0>, <9 0>;
56			interrupt-names = "rx", "tx";
57			peripheral-id = <1>;
58			status = "disabled";
59		};
60
61		leuart0: leuart@40084000 { /* LEUART0 */
62			compatible = "silabs,gecko-leuart";
63			reg = <0x40084000 0x400>;
64			interrupts = <10 0>;
65			peripheral-id = <0>;
66			status = "disabled";
67		};
68
69		i2c0: i2c@4000a000 {
70			compatible = "silabs,gecko-i2c";
71			clock-frequency = <I2C_BITRATE_STANDARD>;
72			#address-cells = <1>;
73			#size-cells = <0>;
74			reg = <0x4000a000 0x400>;
75			interrupts = <5 0>;
76			status = "disabled";
77		};
78
79		gpio@40006100 {
80			compatible = "silabs,gecko-gpio";
81			reg = <0x40006100 0xf00>;
82			interrupts = <1 0 6 0>;
83			interrupt-names = "GPIO_EVEN", "GPIO_ODD";
84
85			ranges;
86			#address-cells = <1>;
87			#size-cells = <1>;
88
89			gpioa: gpio@40006000 {
90				compatible = "silabs,gecko-gpio-port";
91				reg = <0x40006000 0x24>;
92				peripheral-id = <0>;
93				gpio-controller;
94				#gpio-cells = <2>;
95				status = "disabled";
96			};
97
98			gpiob: gpio@40006024 {
99				compatible = "silabs,gecko-gpio-port";
100				reg = <0x40006024 0x24>;
101				peripheral-id = <1>;
102				gpio-controller;
103				#gpio-cells = <2>;
104				status = "disabled";
105			};
106
107			gpioc: gpio@40006048 {
108				compatible = "silabs,gecko-gpio-port";
109				reg = <0x40006048 0x24>;
110				peripheral-id = <2>;
111				gpio-controller;
112				#gpio-cells = <2>;
113				status = "disabled";
114			};
115
116			gpiod: gpio@4000606c {
117				compatible = "silabs,gecko-gpio-port";
118				reg = <0x4000606c 0x24>;
119				peripheral-id = <3>;
120				gpio-controller;
121				#gpio-cells = <2>;
122				status = "disabled";
123			};
124
125			gpioe: gpio@40006090 {
126				compatible = "silabs,gecko-gpio-port";
127				reg = <0x40006090 0x24>;
128				peripheral-id = <4>;
129				gpio-controller;
130				#gpio-cells = <2>;
131				status = "disabled";
132			};
133
134			gpiof: gpio@400060b4 {
135				compatible = "silabs,gecko-gpio-port";
136				reg = <0x400060b4 0x24>;
137				peripheral-id = <5>;
138				gpio-controller;
139				#gpio-cells = <2>;
140				status = "disabled";
141			};
142		};
143
144		pinctrl: pin-controller {
145			/* Pin controller is a "virtual" device since SiLabs SoCs do pin
146			 * control in a distributed way (GPIO registers and PSEL
147			 * registers on each peripheral).
148			 */
149			compatible = "silabs,gecko-pinctrl";
150		};
151	};
152};
153
154&nvic {
155	arm,num-irq-priority-bits = <2>;
156};
157