1/*
2 * Copyright (c) 2019 Interay Solutions B.V.
3 * Copyright (c) 2019 Oane Kingma
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 */
7
8/dts-v1/;
9#include <silabs/efm32gg11b820f2048gl192.dtsi>
10#include <zephyr/dt-bindings/input/input-event-codes.h>
11#include "efm32gg_stk3701a-pinctrl.dtsi"
12
13/ {
14	model = "Silicon Labs EFM32GG STK3701A board";
15	compatible = "silabs,efm32gg_stk3701a", "silabs,efm32gg11b";
16
17	chosen {
18		zephyr,console = &usart4;
19		zephyr,shell-uart = &usart4;
20		zephyr,sram = &sram0;
21		zephyr,flash = &flash0;
22	};
23
24	/* These aliases are provided for compatibility with samples */
25	aliases {
26		led0 = &led0;
27		led1 = &led1;
28		sw0 = &button0;
29		sw1 = &button1;
30		watchdog0 = &wdog0;
31	};
32
33	leds {
34		compatible = "gpio-leds";
35		led0: led_0 {
36			gpios = <&gpioh 10 0>;
37			label = "LED 0";
38		};
39		led1: led_1 {
40			gpios = <&gpioh 13 0>;
41			label = "LED 1";
42		};
43	};
44
45	buttons {
46		compatible = "gpio-keys";
47		button0: button_0 {
48			/* gpio flags need validation */
49			gpios = <&gpioc 8 GPIO_ACTIVE_LOW>;
50			label = "User Push Button 0";
51			zephyr,code = <INPUT_KEY_0>;
52		};
53		button1: button_1 {
54			/* gpio flags need validation */
55			gpios = <&gpioc 9 GPIO_ACTIVE_LOW>;
56			label = "User Push Button 1";
57			zephyr,code = <INPUT_KEY_1>;
58		};
59	};
60};
61
62&usart0 {
63	current-speed = <115200>;
64	pinctrl-0 = <&usart0_default>;
65	pinctrl-names = "default";
66	status = "okay";
67};
68
69&usart4 {
70	current-speed = <115200>;
71	pinctrl-0 = <&usart4_default>;
72	pinctrl-names = "default";
73	status = "okay";
74};
75
76&leuart0 {
77	current-speed = <9600>;
78	location-rx = <GECKO_LOCATION(18) GECKO_PORT_D GECKO_PIN(11)>;
79	location-tx = <GECKO_LOCATION(18) GECKO_PORT_D GECKO_PIN(10)>;
80	status = "okay";
81};
82
83&i2c0 {
84	location-sda = <GECKO_LOCATION(4) GECKO_PORT_C GECKO_PIN(0)>;
85	location-scl = <GECKO_LOCATION(4) GECKO_PORT_C GECKO_PIN(1)>;
86	status = "okay";
87};
88
89&i2c1 {
90	location-sda = <GECKO_LOCATION(0) GECKO_PORT_C GECKO_PIN(4)>;
91	location-scl = <GECKO_LOCATION(0) GECKO_PORT_C GECKO_PIN(5)>;
92	status = "okay";
93};
94
95&rtcc0 {
96	prescaler = <1>;
97	status = "okay";
98};
99
100&gpio {
101	location-swo = <0>;
102	status = "okay";
103};
104
105&gpioa {
106	status = "okay";
107};
108
109&gpiob {
110	status = "okay";
111};
112
113&gpioc {
114	status = "okay";
115};
116
117&gpiod {
118	status = "okay";
119};
120
121&gpioe {
122	status = "okay";
123
124	board-controller-enable {
125		gpio-hog;
126		gpios = <1 GPIO_ACTIVE_HIGH>;
127		output-high;
128	};
129};
130
131&gpiof {
132	status = "okay";
133};
134
135&gpiog {
136	status = "okay";
137};
138
139&gpioh {
140	status = "okay";
141};
142
143&gpioi {
144	status = "okay";
145};
146
147&eth0 {
148	/* PHY address = 0 */
149	phy-address = <0>;
150
151	/* PHY management pins */
152	location-mdio        = <GECKO_LOCATION(1)>;
153	location-phy_mdc     = <GECKO_LOCATION(1) GECKO_PORT_D GECKO_PIN(14)>;
154	location-phy_mdio    = <GECKO_LOCATION(1) GECKO_PORT_D GECKO_PIN(13)>;
155
156	/* RMII interface pins */
157	location-rmii        = <GECKO_LOCATION(1)>;
158	location-rmii_refclk = <GECKO_LOCATION(5) GECKO_PORT_D GECKO_PIN(10)>;
159	location-rmii_crs_dv = <GECKO_LOCATION(1) GECKO_PORT_D GECKO_PIN(11)>;
160	location-rmii_txd0   = <GECKO_LOCATION(1) GECKO_PORT_F GECKO_PIN(7)>;
161	location-rmii_txd1   = <GECKO_LOCATION(1) GECKO_PORT_F GECKO_PIN(6)>;
162	location-rmii_tx_en  = <GECKO_LOCATION(1) GECKO_PORT_F GECKO_PIN(8)>;
163	location-rmii_rxd0   = <GECKO_LOCATION(1) GECKO_PORT_D GECKO_PIN(9)>;
164	location-rmii_rxd1   = <GECKO_LOCATION(1) GECKO_PORT_F GECKO_PIN(9)>;
165	location-rmii_rx_er  = <GECKO_LOCATION(1) GECKO_PORT_D GECKO_PIN(12)>;
166
167	status = "okay";
168};
169
170&flash0 {
171
172	partitions {
173		compatible = "fixed-partitions";
174		#address-cells = <1>;
175		#size-cells = <1>;
176
177		/* Set 12Kb of storage at the end of the 2048Kb of flash */
178		storage_partition: partition@1fd000 {
179			label = "storage";
180			reg = <0x001fd000 0x00003000>;
181		};
182	};
183};
184
185&wdog0 {
186	status = "okay";
187};
188
189&trng0 {
190	status = "okay";
191};
192
193&cpu0 {
194	clock-frequency = <72000000>;
195};
196