]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/gnu/dts/arm/sun7i-a20-olimex-som204-evb.dts
MFV r337220: 8375 Kernel memory leak in nvpair code
[FreeBSD/FreeBSD.git] / sys / gnu / dts / arm / sun7i-a20-olimex-som204-evb.dts
1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2 /*
3  * Device Tree Source for A20-SOM204-EVB Board
4  *
5  * Copyright (C) 2018 Olimex Ltd.
6  *   Author: Stefan Mavrodiev <stefan@olimex.com>
7  */
8
9 /dts-v1/;
10 #include "sun7i-a20.dtsi"
11 #include "sunxi-common-regulators.dtsi"
12
13
14 #include <dt-bindings/gpio/gpio.h>
15 #include <dt-bindings/interrupt-controller/irq.h>
16 #include <dt-bindings/pwm/pwm.h>
17
18 / {
19         model = "Olimex A20-SOM204-EVB";
20         compatible = "olimex,a20-olimex-som204-evb", "allwinner,sun7i-a20";
21
22         aliases {
23                 serial0 = &uart0;
24                 serial1 = &uart4;
25                 serial2 = &uart7;
26                 spi0 = &spi1;
27                 spi1 = &spi2;
28                 ethernet1 = &rtl8723bs;
29         };
30
31         chosen {
32                 stdout-path = "serial0:115200n8";
33         };
34
35         hdmi-connector {
36                 compatible = "hdmi-connector";
37                 type = "a";
38
39                 port {
40                         hdmi_con_in: endpoint {
41                                 remote-endpoint = <&hdmi_out_con>;
42                         };
43                 };
44         };
45
46         leds {
47                 compatible = "gpio-leds";
48
49                 stat {
50                         label = "a20-som204-evb:green:stat";
51                         gpios = <&pio 8 0 GPIO_ACTIVE_HIGH>;
52                         default-state = "on";
53                 };
54
55                 led1 {
56                         label = "a20-som204-evb:green:led1";
57                         gpios = <&pio 8 10 GPIO_ACTIVE_HIGH>;
58                         default-state = "on";
59                 };
60
61                 led2 {
62                         label = "a20-som204-evb:yellow:led2";
63                         gpios = <&pio 8 11 GPIO_ACTIVE_HIGH>;
64                         default-state = "on";
65                 };
66         };
67
68         rtl_pwrseq: rtl_pwrseq {
69                 compatible = "mmc-pwrseq-simple";
70                 reset-gpios = <&pio 6 9 GPIO_ACTIVE_LOW>;
71         };
72 };
73
74 &ahci {
75         target-supply = <&reg_ahci_5v>;
76         status = "okay";
77 };
78
79 &can0 {
80         pinctrl-names = "default";
81         pinctrl-0 = <&can0_pins_a>;
82         status = "okay";
83 };
84
85 &codec {
86         status = "okay";
87 };
88
89 &cpu0 {
90         cpu-supply = <&reg_dcdc2>;
91 };
92
93 &de {
94         status = "okay";
95 };
96
97 &ehci0 {
98         status = "okay";
99 };
100
101 &ehci1 {
102         status = "okay";
103 };
104
105 &gmac {
106         pinctrl-names = "default";
107         pinctrl-0 = <&gmac_pins_rgmii_a>;
108         phy = <&phy3>;
109         phy-mode = "rgmii";
110         phy-supply = <&reg_vcc3v3>;
111
112         snps,reset-gpio = <&pio 0 17 GPIO_ACTIVE_HIGH>;
113         snps,reset-active-low;
114         snps,reset-delays-us = <0 10000 1000000>;
115         status = "okay";
116
117         phy3: ethernet-phy@3 {
118                 reg = <3>;
119         };
120 };
121
122 &hdmi {
123         status = "okay";
124 };
125
126 &hdmi_out {
127         hdmi_out_con: endpoint {
128                 remote-endpoint = <&hdmi_con_in>;
129         };
130 };
131
132 &i2c0 {
133         pinctrl-names = "default";
134         pinctrl-0 = <&i2c0_pins_a>;
135         status = "okay";
136
137         axp209: pmic@34 {
138                 reg = <0x34>;
139                 interrupt-parent = <&nmi_intc>;
140                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
141         };
142 };
143
144 /* Exposed to UEXT1 */
145 &i2c1 {
146         pinctrl-names = "default";
147         pinctrl-0 = <&i2c1_pins_a>;
148         status = "okay";
149
150         eeprom: eeprom@50 {
151                 compatible = "atmel,24c16";
152                 reg = <0x50>;
153                 pagesize = <16>;
154         };
155 };
156
157 /* Exposed to UEXT2 */
158 &i2c2 {
159         pinctrl-names = "default";
160         pinctrl-0 = <&i2c2_pins_a>;
161         status = "okay";
162 };
163
164 &ir0 {
165         pinctrl-names = "default";
166         pinctrl-0 = <&ir0_rx_pins_a>;
167         status = "okay";
168 };
169
170 &mmc0 {
171         pinctrl-names = "default";
172         pinctrl-0 = <&mmc0_pins_a>;
173         vmmc-supply = <&reg_vcc3v3>;
174         bus-width = <4>;
175         cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>;
176         cd-inverted;
177         status = "okay";
178 };
179
180 &mmc3 {
181         pinctrl-names = "default";
182         pinctrl-0 = <&mmc3_pins_a>;
183         vmmc-supply = <&reg_vcc3v3>;
184         mmc-pwrseq = <&rtl_pwrseq>;
185         bus-width = <4>;
186         non-removable;
187         status = "okay";
188
189         rtl8723bs: sdio_wifi@1 {
190                 reg = <1>;
191         };
192 };
193
194 &ohci0 {
195         status = "okay";
196 };
197
198 &ohci1 {
199         status = "okay";
200 };
201
202 &otg_sram {
203         status = "okay";
204 };
205
206 &pio {
207         bt_uart_pins: bt_uart_pins@0 {
208                 pins = "PG6", "PG7", "PG8";
209                 function = "uart3";
210         };
211 };
212
213 #include "axp209.dtsi"
214
215 &ac_power_supply {
216         status = "okay";
217 };
218
219 &battery_power_supply {
220         status = "okay";
221 };
222
223 &reg_ahci_5v {
224         gpio = <&pio 2 3 GPIO_ACTIVE_HIGH>;
225         status = "okay";
226 };
227
228 &reg_dcdc2 {
229         regulator-always-on;
230         regulator-min-microvolt = <1000000>;
231         regulator-max-microvolt = <1400000>;
232         regulator-name = "vdd-cpu";
233 };
234
235 &reg_dcdc3 {
236         regulator-always-on;
237         regulator-min-microvolt = <1000000>;
238         regulator-max-microvolt = <1400000>;
239         regulator-name = "vdd-int-dll";
240 };
241
242 &reg_ldo1 {
243         regulator-always-on;
244         regulator-min-microvolt = <1300000>;
245         regulator-max-microvolt = <1300000>;
246         regulator-name = "vdd-rtc";
247 };
248
249 &reg_ldo2 {
250         regulator-always-on;
251         regulator-min-microvolt = <3000000>;
252         regulator-max-microvolt = <3000000>;
253         regulator-name = "avcc";
254 };
255
256 &reg_ldo4 {
257         regulator-min-microvolt = <3300000>;
258         regulator-max-microvolt = <3300000>;
259         regulator-name = "vcc-pg";
260 };
261
262 &reg_usb0_vbus {
263         gpio = <&pio 2 17 GPIO_ACTIVE_HIGH>;
264         status = "okay";
265 };
266
267 &reg_usb1_vbus {
268         status = "okay";
269 };
270
271 &reg_usb2_vbus {
272         status = "okay";
273 };
274
275 /* Exposed to UEXT1 */
276 &spi1 {
277         pinctrl-names = "default";
278         pinctrl-0 = <&spi1_pins_a>,
279                     <&spi1_cs0_pins_a>;
280         status = "okay";
281 };
282
283 /* Exposed to UEXT2 */
284 &spi2 {
285         pinctrl-names = "default";
286         pinctrl-0 = <&spi2_pins_a>,
287                     <&spi2_cs0_pins_a>;
288         status = "okay";
289 };
290
291 &uart0 {
292         pinctrl-names = "default";
293         pinctrl-0 = <&uart0_pins_a>;
294         status = "okay";
295 };
296
297 /* Used for RTL8723BS bluetooth */
298 &uart3 {
299         pinctrl-names = "default";
300         pinctrl-0 = <&bt_uart_pins>;
301         status = "okay";
302 };
303
304 /* Exposed to UEXT1 */
305 &uart4 {
306         pinctrl-names = "default";
307         pinctrl-0 = <&uart4_pins_a>;
308         status = "okay";
309 };
310
311 /* Exposed to UEXT2 */
312 &uart7 {
313         pinctrl-names = "default";
314         pinctrl-0 = <&uart7_pins_a>;
315         status = "okay";
316 };
317
318 &usb_otg {
319         dr_mode = "otg";
320         status = "okay";
321 };
322
323 &usb_power_supply {
324         status = "okay";
325 };
326
327 &usbphy {
328         usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
329         usb0_vbus_det-gpio = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
330         usb0_vbus_power-supply = <&usb_power_supply>;
331         usb0_vbus-supply = <&reg_usb0_vbus>;
332         usb1_vbus-supply = <&reg_usb1_vbus>;
333         usb2_vbus-supply = <&reg_usb2_vbus>;
334         status = "okay";
335 };