]>
Commit | Line | Data |
---|---|---|
bbedc1f1 MB |
1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
2 | /* | |
3 | * Copyright (c) 2018 Martin Blumenstingl <martin.blumenstingl@googlemail.com>. | |
4 | */ | |
5 | ||
6 | /dts-v1/; | |
7 | ||
8 | #include <dt-bindings/gpio/gpio.h> | |
9 | #include <dt-bindings/input/input.h> | |
10 | ||
11 | #include "meson8b.dtsi" | |
12 | ||
13 | / { | |
14 | model = "Endless Computers Endless Mini"; | |
15 | compatible = "endless,ec100", "amlogic,meson8b"; | |
16 | ||
17 | aliases { | |
18 | serial0 = &uart_AO; | |
19 | }; | |
20 | ||
21 | chosen { | |
22 | stdout-path = "serial0:115200n8"; | |
23 | }; | |
24 | ||
25 | memory { | |
abe60a3a | 26 | device_type = "memory"; |
bbedc1f1 MB |
27 | reg = <0x40000000 0x40000000>; |
28 | }; | |
29 | ||
30 | gpio-keys { | |
31 | compatible = "gpio-keys-polled"; | |
32 | #address-cells = <1>; | |
33 | #size-cells = <0>; | |
34 | poll-interval = <100>; | |
35 | ||
36 | pal-switch { | |
37 | label = "pal"; | |
38 | linux,input-type = <EV_SW>; | |
39 | linux,code = <KEY_SWITCHVIDEOMODE>; | |
40 | gpios = <&gpio GPIOH_7 GPIO_ACTIVE_LOW>; | |
41 | }; | |
42 | ||
43 | ntsc-switch { | |
44 | label = "ntsc"; | |
45 | linux,input-type = <EV_SW>; | |
46 | linux,code = <KEY_SWITCHVIDEOMODE>; | |
47 | gpios = <&gpio GPIOH_8 GPIO_ACTIVE_HIGH>; | |
48 | }; | |
49 | ||
50 | power-button { | |
51 | label = "power"; | |
52 | linux,code = <KEY_POWER>; | |
53 | gpios = <&gpio GPIOH_9 GPIO_ACTIVE_LOW>; | |
54 | }; | |
55 | }; | |
56 | ||
57 | gpio-poweroff { | |
58 | compatible = "gpio-poweroff"; | |
59 | /* | |
60 | * shutdown is managed by the EC (embedded micro-controller) | |
61 | * which is configured through GPIOAO_2 (poweroff GPIO) and | |
62 | * GPIOAO_7 (power LED, which has to go LOW as well). | |
63 | */ | |
64 | gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>; | |
65 | timeout-ms = <20000>; | |
66 | }; | |
67 | ||
1a4f28ab MB |
68 | iio-hwmon { |
69 | compatible = "iio-hwmon"; | |
70 | io-channels = <&saradc 8>; | |
71 | }; | |
72 | ||
bbedc1f1 MB |
73 | leds { |
74 | compatible = "gpio-leds"; | |
75 | ||
76 | power { | |
77 | label = "ec100:red:power"; | |
78 | /* | |
79 | * Needs to go LOW (together with the poweroff GPIO) | |
80 | * during shutdown to allow the EC (embedded | |
81 | * micro-controller) to shutdown the system. Setting | |
82 | * the output to LOW signals the EC to start a | |
83 | * "breathing"/pulsing effect until the power is fully | |
84 | * turned off. | |
85 | */ | |
86 | gpios = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_HIGH>; | |
87 | default-state = "on"; | |
88 | }; | |
89 | }; | |
90 | ||
6ffdc473 MB |
91 | rtc32k_xtal: rtc32k-xtal-clk { |
92 | /* X2 in the schematics */ | |
93 | compatible = "fixed-clock"; | |
94 | clock-frequency = <32768>; | |
95 | clock-output-names = "RTC32K"; | |
96 | #clock-cells = <0>; | |
97 | }; | |
98 | ||
bbedc1f1 | 99 | usb_vbus: regulator-usb-vbus { |
3e7db1c1 MB |
100 | /* |
101 | * Silergy SY6288CCAC-GP 2A Power Distribution Switch. | |
102 | */ | |
bbedc1f1 MB |
103 | compatible = "regulator-fixed"; |
104 | ||
105 | regulator-name = "USB_VBUS"; | |
106 | ||
107 | regulator-min-microvolt = <5000000>; | |
108 | regulator-max-microvolt = <5000000>; | |
109 | ||
3e7db1c1 MB |
110 | vin-supply = <&vcc_5v>; |
111 | ||
112 | /* | |
113 | * signal name from the schematics: USB_PWR_EN | |
114 | */ | |
bbedc1f1 MB |
115 | gpio = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>; |
116 | enable-active-high; | |
117 | }; | |
118 | ||
119 | vcc_5v: regulator-vcc5v { | |
3e7db1c1 MB |
120 | /* |
121 | * supplied by the main power input which called PWR_5V_STB | |
122 | * in the schematics | |
123 | */ | |
bbedc1f1 MB |
124 | compatible = "regulator-fixed"; |
125 | ||
126 | regulator-name = "VCC5V"; | |
127 | ||
128 | regulator-min-microvolt = <5000000>; | |
129 | regulator-max-microvolt = <5000000>; | |
130 | ||
3e7db1c1 MB |
131 | /* |
132 | * signal name from the schematics: 3V3_5V_EN | |
133 | */ | |
bbedc1f1 MB |
134 | gpio = <&gpio GPIODV_29 GPIO_ACTIVE_LOW>; |
135 | ||
136 | regulator-boot-on; | |
137 | regulator-always-on; | |
138 | }; | |
139 | ||
140 | vcck: regulator-vcck { | |
3e7db1c1 MB |
141 | /* |
142 | * Silergy SY8089AAC-GP 2A continuous, 3A peak, 1MHz | |
143 | * Synchronous Step Down Regulator. | |
144 | */ | |
bbedc1f1 MB |
145 | compatible = "pwm-regulator"; |
146 | ||
147 | regulator-name = "VCCK"; | |
148 | regulator-min-microvolt = <860000>; | |
149 | regulator-max-microvolt = <1140000>; | |
150 | ||
3e7db1c1 MB |
151 | vin-supply = <&vcc_5v>; |
152 | ||
bbedc1f1 MB |
153 | pwms = <&pwm_cd 0 1148 0>; |
154 | pwm-dutycycle-range = <100 0>; | |
155 | ||
156 | regulator-boot-on; | |
157 | regulator-always-on; | |
158 | }; | |
159 | ||
160 | vcc_1v8: regulator-vcc1v8 { | |
3e7db1c1 MB |
161 | /* |
162 | * ABLIC S-1339D18-M5001-GP | |
163 | */ | |
bbedc1f1 MB |
164 | compatible = "regulator-fixed"; |
165 | ||
166 | regulator-name = "VCC1V8"; | |
167 | regulator-min-microvolt = <1800000>; | |
168 | regulator-max-microvolt = <1800000>; | |
3e7db1c1 MB |
169 | |
170 | vin-supply = <&vcc_3v3>; | |
bbedc1f1 MB |
171 | }; |
172 | ||
173 | vcc_3v3: regulator-vcc3v3 { | |
3e7db1c1 MB |
174 | /* |
175 | * Silergy SY8089AAC-GP 2A continuous, 3A peak, 1MHz | |
176 | * Synchronous Step Down Regulator. Also called | |
177 | * VDDIO_AO3.3V in the schematics. | |
178 | */ | |
bbedc1f1 MB |
179 | compatible = "regulator-fixed"; |
180 | ||
181 | regulator-name = "VCC3V3"; | |
182 | regulator-min-microvolt = <3300000>; | |
183 | regulator-max-microvolt = <3300000>; | |
3e7db1c1 MB |
184 | |
185 | vin-supply = <&vcc_5v>; | |
186 | }; | |
187 | ||
188 | vcc_ddr3: regulator-vcc-ddr3 { | |
189 | /* | |
190 | * Silergy SY8089AAC-GP 2A continuous, 3A peak, 1MHz | |
191 | * Synchronous Step Down Regulator. Also called | |
192 | * DDR3_1.5V in the schematics. | |
193 | */ | |
194 | compatible = "regulator-fixed"; | |
195 | ||
196 | regulator-name = "VCC_DDR3_1V5"; | |
197 | regulator-min-microvolt = <1500000>; | |
198 | regulator-max-microvolt = <1500000>; | |
199 | ||
200 | vin-supply = <&vcc_5v>; | |
201 | ||
202 | regulator-boot-on; | |
203 | regulator-always-on; | |
204 | }; | |
205 | ||
206 | vcc_rtc: regulator-vcc-rtc { | |
207 | /* | |
208 | * Global Mixed-mode Technology Inc. G918T12U-GP | |
209 | */ | |
210 | compatible = "regulator-fixed"; | |
211 | ||
212 | regulator-name = "VCC_RTC"; | |
213 | regulator-min-microvolt = <900000>; | |
214 | regulator-max-microvolt = <900000>; | |
215 | ||
216 | /* | |
217 | * When the board is powered then the input is VCC3V3, | |
218 | * otherwise power is taken from the coin cell battery. | |
219 | */ | |
220 | vin-supply = <&vcc_3v3>; | |
bbedc1f1 MB |
221 | }; |
222 | }; | |
223 | ||
224 | &cpu0 { | |
225 | cpu-supply = <&vcck>; | |
226 | }; | |
227 | ||
228 | ðmac { | |
229 | status = "okay"; | |
230 | ||
231 | pinctrl-0 = <ð_rmii_pins>; | |
232 | pinctrl-names = "default"; | |
233 | ||
234 | phy-handle = <ð_phy0>; | |
235 | phy-mode = "rmii"; | |
236 | ||
bbedc1f1 MB |
237 | mdio { |
238 | compatible = "snps,dwmac-mdio"; | |
239 | #address-cells = <1>; | |
240 | #size-cells = <0>; | |
241 | ||
242 | eth_phy0: ethernet-phy@0 { | |
243 | /* IC Plus IP101A/G (0x02430c54) */ | |
244 | reg = <0>; | |
a2c6e82e MB |
245 | |
246 | reset-assert-us = <10000>; | |
247 | reset-deassert-us = <10000>; | |
248 | reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>; | |
249 | ||
b7d10841 MB |
250 | icplus,select-interrupt; |
251 | interrupt-parent = <&gpio_intc>; | |
252 | /* GPIOH_3 */ | |
253 | interrupts = <17 IRQ_TYPE_LEVEL_LOW>; | |
bbedc1f1 MB |
254 | }; |
255 | }; | |
256 | }; | |
257 | ||
258 | &i2c_A { | |
259 | status = "okay"; | |
260 | pinctrl-0 = <&i2c_a_pins>; | |
261 | pinctrl-names = "default"; | |
262 | ||
263 | rt5640: codec@1c { | |
264 | compatible = "realtek,rt5640"; | |
265 | reg = <0x1c>; | |
266 | interrupt-parent = <&gpio_intc>; | |
267 | interrupts = <13 IRQ_TYPE_EDGE_BOTH>; /* GPIOAO_13 */ | |
268 | realtek,in1-differential; | |
269 | }; | |
270 | }; | |
271 | ||
272 | &saradc { | |
273 | status = "okay"; | |
274 | vref-supply = <&vcc_1v8>; | |
275 | }; | |
276 | ||
277 | &sdio { | |
278 | status = "okay"; | |
279 | ||
280 | pinctrl-0 = <&sd_b_pins>; | |
281 | pinctrl-names = "default"; | |
282 | ||
283 | /* SD card */ | |
284 | sd_card_slot: slot@1 { | |
285 | compatible = "mmc-slot"; | |
286 | reg = <1>; | |
287 | status = "okay"; | |
288 | ||
289 | bus-width = <4>; | |
290 | no-sdio; | |
291 | cap-mmc-highspeed; | |
292 | cap-sd-highspeed; | |
293 | disable-wp; | |
294 | ||
c8bfe65f | 295 | cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>; |
bbedc1f1 MB |
296 | |
297 | vmmc-supply = <&vcc_3v3>; | |
298 | }; | |
299 | }; | |
300 | ||
99f0619b MB |
301 | &gpio_ao { |
302 | gpio-line-names = "Linux_TX", "Linux_RX", | |
303 | "SLP_S5_N", "USB2_OC_FLAG#", | |
304 | "HUB_RST", "USB_PWR_EN", | |
305 | "I2S_IN", "SLP_S1_N", | |
306 | "TCK", "TMS", "TDI", "TDO", | |
307 | "HDMI_CEC", "5640_IRQ", | |
308 | "MUTE", "S805_TEST#"; | |
309 | }; | |
310 | ||
311 | &gpio { | |
312 | gpio-line-names = /* Bank GPIOX */ | |
313 | "WIFI_SD_D0", "WIFI_SD_D1", "WIFI_SD_D2", | |
314 | "WIFI_SD_D3", "BTPCM_DOUT", "BTPCM_DIN", | |
315 | "BTPCM_SYNC", "BTPCM_CLK", "WIFI_SD_CLK", | |
316 | "WIFI_SD_CMD", "WIFI_32K", "WIFI_PWREN", | |
317 | "UART_B_TX", "UART_B_RX", "UART_B_CTS_N", | |
318 | "UART_B_RTS_N", "BT_EN", "WIFI_WAKE_HOST", | |
319 | /* Bank GPIOY */ | |
320 | "", "", "", "", "", "", "", "", "", "", | |
321 | "", "", | |
322 | /* Bank GPIODV */ | |
323 | "VCCK_PWM_C", "I2C_SDA_A", "I2C_SCL_A", | |
324 | "I2C_SDA_B", "I2C_SCL_B", "VDDEE_PWM_D", | |
325 | "VDDEE_PWM 3V3_5V_EN", | |
326 | /* Bank GPIOH */ | |
327 | "HDMI_HPD", "HDMI_I2C_SDA", "HDMI_I2C_SCL", | |
328 | "RMII_IRQ", "RMII_RST#", "RMII_TXD1", | |
329 | "RMII_TXD0", "AV_select_1", "AV_select_2", | |
330 | "MCU_Control_S", | |
331 | /* Bank CARD */ | |
332 | "SD_D1_B", "SD_D0_B", "SD_CLK_8726MX", | |
333 | "SD_CMD_8726MX", "SD_D3_B", "SD_D2_B", | |
334 | "CARD_EN_DET (CARD_DET)", | |
335 | /* Bank BOOT */ | |
336 | "NAND_D0 (EMMC)", "NAND_D1 (EMMC)", | |
337 | "NAND_D2 (EMMC)", "NAND_D3 (EMMC)", | |
338 | "NAND_D4 (EMMC)", "NAND_D5 (EMMC)", | |
339 | "NAND_D6 (EMMC)", "NAND_D7 (EMMC)", | |
340 | "NAND_CS1 (EMMC)", "NAND_CS2 iNAND_RS1 (EMMC)", | |
341 | "NAND_nR/B iNAND_CMD (EMMC)", "NAND_ALE (EMMC)", | |
342 | "NAND_CLE (EMMC)", "nRE_S1 NAND_nRE (EMMC)", | |
343 | "nWE_S1 NAND_nWE (EMMC)", "", "", "SPI_CS", | |
344 | /* Bank DIF */ | |
345 | "RMII_RXD1", "RMII_RXD0", "RMII_CRS_DV", | |
346 | "RMII_50M_IN", "GPIODIF_4", "GPIODIF_5", | |
347 | "RMII_TXEN", "CPUETH_25MOUT", "RMII_MDC", | |
348 | "RMII_MDIO"; | |
349 | }; | |
350 | ||
bbedc1f1 MB |
351 | &pwm_cd { |
352 | status = "okay"; | |
353 | pinctrl-0 = <&pwm_c1_pins>; | |
354 | pinctrl-names = "default"; | |
355 | clocks = <&clkc CLKID_XTAL>; | |
356 | clock-names = "clkin0"; | |
357 | }; | |
358 | ||
6ffdc473 MB |
359 | &rtc { |
360 | status = "okay"; | |
361 | clocks = <&rtc32k_xtal>; | |
362 | vdd-supply = <&vcc_rtc>; | |
363 | }; | |
364 | ||
bbedc1f1 MB |
365 | /* exposed through the pin headers labeled "URDUG1" on the top of the PCB */ |
366 | &uart_AO { | |
367 | status = "okay"; | |
368 | pinctrl-0 = <&uart_ao_a_pins>; | |
369 | pinctrl-names = "default"; | |
370 | }; | |
371 | ||
372 | /* | |
373 | * connected to the Bluetooth part of the RTL8723BS SDIO wifi / Bluetooth | |
374 | * combo chip. This is only available on the variant with 2GB RAM. | |
375 | */ | |
376 | &uart_B { | |
377 | status = "okay"; | |
378 | pinctrl-0 = <&uart_b0_pins>, <&uart_b0_cts_rts_pins>; | |
379 | pinctrl-names = "default"; | |
380 | uart-has-rtscts; | |
381 | }; | |
382 | ||
383 | &usb1 { | |
384 | status = "okay"; | |
385 | vbus-supply = <&usb_vbus>; | |
386 | }; | |
387 | ||
388 | &usb1_phy { | |
389 | status = "okay"; | |
390 | }; |