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