]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blame - arch/arm/boot/dts/meson8b-ec100.dts
Merge tag 'omap-for-v5.1/dt-cpsw-phy' of git://git.kernel.org/pub/scm/linux/kernel...
[mirror_ubuntu-hirsute-kernel.git] / arch / arm / boot / dts / meson8b-ec100.dts
CommitLineData
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
91 usb_vbus: regulator-usb-vbus {
3e7db1c1
MB
92 /*
93 * Silergy SY6288CCAC-GP 2A Power Distribution Switch.
94 */
bbedc1f1
MB
95 compatible = "regulator-fixed";
96
97 regulator-name = "USB_VBUS";
98
99 regulator-min-microvolt = <5000000>;
100 regulator-max-microvolt = <5000000>;
101
3e7db1c1
MB
102 vin-supply = <&vcc_5v>;
103
104 /*
105 * signal name from the schematics: USB_PWR_EN
106 */
bbedc1f1
MB
107 gpio = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
108 enable-active-high;
109 };
110
111 vcc_5v: regulator-vcc5v {
3e7db1c1
MB
112 /*
113 * supplied by the main power input which called PWR_5V_STB
114 * in the schematics
115 */
bbedc1f1
MB
116 compatible = "regulator-fixed";
117
118 regulator-name = "VCC5V";
119
120 regulator-min-microvolt = <5000000>;
121 regulator-max-microvolt = <5000000>;
122
3e7db1c1
MB
123 /*
124 * signal name from the schematics: 3V3_5V_EN
125 */
bbedc1f1
MB
126 gpio = <&gpio GPIODV_29 GPIO_ACTIVE_LOW>;
127
128 regulator-boot-on;
129 regulator-always-on;
130 };
131
132 vcck: regulator-vcck {
3e7db1c1
MB
133 /*
134 * Silergy SY8089AAC-GP 2A continuous, 3A peak, 1MHz
135 * Synchronous Step Down Regulator.
136 */
bbedc1f1
MB
137 compatible = "pwm-regulator";
138
139 regulator-name = "VCCK";
140 regulator-min-microvolt = <860000>;
141 regulator-max-microvolt = <1140000>;
142
3e7db1c1
MB
143 vin-supply = <&vcc_5v>;
144
bbedc1f1
MB
145 pwms = <&pwm_cd 0 1148 0>;
146 pwm-dutycycle-range = <100 0>;
147
148 regulator-boot-on;
149 regulator-always-on;
150 };
151
152 vcc_1v8: regulator-vcc1v8 {
3e7db1c1
MB
153 /*
154 * ABLIC S-1339D18-M5001-GP
155 */
bbedc1f1
MB
156 compatible = "regulator-fixed";
157
158 regulator-name = "VCC1V8";
159 regulator-min-microvolt = <1800000>;
160 regulator-max-microvolt = <1800000>;
3e7db1c1
MB
161
162 vin-supply = <&vcc_3v3>;
bbedc1f1
MB
163 };
164
165 vcc_3v3: regulator-vcc3v3 {
3e7db1c1
MB
166 /*
167 * Silergy SY8089AAC-GP 2A continuous, 3A peak, 1MHz
168 * Synchronous Step Down Regulator. Also called
169 * VDDIO_AO3.3V in the schematics.
170 */
bbedc1f1
MB
171 compatible = "regulator-fixed";
172
173 regulator-name = "VCC3V3";
174 regulator-min-microvolt = <3300000>;
175 regulator-max-microvolt = <3300000>;
3e7db1c1
MB
176
177 vin-supply = <&vcc_5v>;
178 };
179
180 vcc_ddr3: regulator-vcc-ddr3 {
181 /*
182 * Silergy SY8089AAC-GP 2A continuous, 3A peak, 1MHz
183 * Synchronous Step Down Regulator. Also called
184 * DDR3_1.5V in the schematics.
185 */
186 compatible = "regulator-fixed";
187
188 regulator-name = "VCC_DDR3_1V5";
189 regulator-min-microvolt = <1500000>;
190 regulator-max-microvolt = <1500000>;
191
192 vin-supply = <&vcc_5v>;
193
194 regulator-boot-on;
195 regulator-always-on;
196 };
197
198 vcc_rtc: regulator-vcc-rtc {
199 /*
200 * Global Mixed-mode Technology Inc. G918T12U-GP
201 */
202 compatible = "regulator-fixed";
203
204 regulator-name = "VCC_RTC";
205 regulator-min-microvolt = <900000>;
206 regulator-max-microvolt = <900000>;
207
208 /*
209 * When the board is powered then the input is VCC3V3,
210 * otherwise power is taken from the coin cell battery.
211 */
212 vin-supply = <&vcc_3v3>;
bbedc1f1
MB
213 };
214};
215
216&cpu0 {
217 cpu-supply = <&vcck>;
218};
219
220&ethmac {
221 status = "okay";
222
223 pinctrl-0 = <&eth_rmii_pins>;
224 pinctrl-names = "default";
225
226 phy-handle = <&eth_phy0>;
227 phy-mode = "rmii";
228
229 snps,reset-gpio = <&gpio GPIOH_4 0>;
230 snps,reset-delays-us = <0 10000 1000000>;
231 snps,reset-active-low;
232
233 mdio {
234 compatible = "snps,dwmac-mdio";
235 #address-cells = <1>;
236 #size-cells = <0>;
237
238 eth_phy0: ethernet-phy@0 {
239 /* IC Plus IP101A/G (0x02430c54) */
240 reg = <0>;
b7d10841
MB
241 icplus,select-interrupt;
242 interrupt-parent = <&gpio_intc>;
243 /* GPIOH_3 */
244 interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
bbedc1f1
MB
245 };
246 };
247};
248
249&i2c_A {
250 status = "okay";
251 pinctrl-0 = <&i2c_a_pins>;
252 pinctrl-names = "default";
253
254 rt5640: codec@1c {
255 compatible = "realtek,rt5640";
256 reg = <0x1c>;
257 interrupt-parent = <&gpio_intc>;
258 interrupts = <13 IRQ_TYPE_EDGE_BOTH>; /* GPIOAO_13 */
259 realtek,in1-differential;
260 };
261};
262
263&saradc {
264 status = "okay";
265 vref-supply = <&vcc_1v8>;
266};
267
268&sdio {
269 status = "okay";
270
271 pinctrl-0 = <&sd_b_pins>;
272 pinctrl-names = "default";
273
274 /* SD card */
275 sd_card_slot: slot@1 {
276 compatible = "mmc-slot";
277 reg = <1>;
278 status = "okay";
279
280 bus-width = <4>;
281 no-sdio;
282 cap-mmc-highspeed;
283 cap-sd-highspeed;
284 disable-wp;
285
286 cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
287 cd-inverted;
288
289 vmmc-supply = <&vcc_3v3>;
290 };
291};
292
99f0619b
MB
293&gpio_ao {
294 gpio-line-names = "Linux_TX", "Linux_RX",
295 "SLP_S5_N", "USB2_OC_FLAG#",
296 "HUB_RST", "USB_PWR_EN",
297 "I2S_IN", "SLP_S1_N",
298 "TCK", "TMS", "TDI", "TDO",
299 "HDMI_CEC", "5640_IRQ",
300 "MUTE", "S805_TEST#";
301};
302
303&gpio {
304 gpio-line-names = /* Bank GPIOX */
305 "WIFI_SD_D0", "WIFI_SD_D1", "WIFI_SD_D2",
306 "WIFI_SD_D3", "BTPCM_DOUT", "BTPCM_DIN",
307 "BTPCM_SYNC", "BTPCM_CLK", "WIFI_SD_CLK",
308 "WIFI_SD_CMD", "WIFI_32K", "WIFI_PWREN",
309 "UART_B_TX", "UART_B_RX", "UART_B_CTS_N",
310 "UART_B_RTS_N", "BT_EN", "WIFI_WAKE_HOST",
311 /* Bank GPIOY */
312 "", "", "", "", "", "", "", "", "", "",
313 "", "",
314 /* Bank GPIODV */
315 "VCCK_PWM_C", "I2C_SDA_A", "I2C_SCL_A",
316 "I2C_SDA_B", "I2C_SCL_B", "VDDEE_PWM_D",
317 "VDDEE_PWM 3V3_5V_EN",
318 /* Bank GPIOH */
319 "HDMI_HPD", "HDMI_I2C_SDA", "HDMI_I2C_SCL",
320 "RMII_IRQ", "RMII_RST#", "RMII_TXD1",
321 "RMII_TXD0", "AV_select_1", "AV_select_2",
322 "MCU_Control_S",
323 /* Bank CARD */
324 "SD_D1_B", "SD_D0_B", "SD_CLK_8726MX",
325 "SD_CMD_8726MX", "SD_D3_B", "SD_D2_B",
326 "CARD_EN_DET (CARD_DET)",
327 /* Bank BOOT */
328 "NAND_D0 (EMMC)", "NAND_D1 (EMMC)",
329 "NAND_D2 (EMMC)", "NAND_D3 (EMMC)",
330 "NAND_D4 (EMMC)", "NAND_D5 (EMMC)",
331 "NAND_D6 (EMMC)", "NAND_D7 (EMMC)",
332 "NAND_CS1 (EMMC)", "NAND_CS2 iNAND_RS1 (EMMC)",
333 "NAND_nR/B iNAND_CMD (EMMC)", "NAND_ALE (EMMC)",
334 "NAND_CLE (EMMC)", "nRE_S1 NAND_nRE (EMMC)",
335 "nWE_S1 NAND_nWE (EMMC)", "", "", "SPI_CS",
336 /* Bank DIF */
337 "RMII_RXD1", "RMII_RXD0", "RMII_CRS_DV",
338 "RMII_50M_IN", "GPIODIF_4", "GPIODIF_5",
339 "RMII_TXEN", "CPUETH_25MOUT", "RMII_MDC",
340 "RMII_MDIO";
341};
342
bbedc1f1
MB
343&pwm_cd {
344 status = "okay";
345 pinctrl-0 = <&pwm_c1_pins>;
346 pinctrl-names = "default";
347 clocks = <&clkc CLKID_XTAL>;
348 clock-names = "clkin0";
349};
350
351/* exposed through the pin headers labeled "URDUG1" on the top of the PCB */
352&uart_AO {
353 status = "okay";
354 pinctrl-0 = <&uart_ao_a_pins>;
355 pinctrl-names = "default";
356};
357
358/*
359 * connected to the Bluetooth part of the RTL8723BS SDIO wifi / Bluetooth
360 * combo chip. This is only available on the variant with 2GB RAM.
361 */
362&uart_B {
363 status = "okay";
364 pinctrl-0 = <&uart_b0_pins>, <&uart_b0_cts_rts_pins>;
365 pinctrl-names = "default";
366 uart-has-rtscts;
367};
368
369&usb1 {
370 status = "okay";
371 vbus-supply = <&usb_vbus>;
372};
373
374&usb1_phy {
375 status = "okay";
376};