1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * Copyright (c) 2019 BayLibre, SAS
4 * Author: Neil Armstrong <narmstrong@baylibre.com>
5 * Copyright (c) 2019 Christian Hewitt <christianshewitt@gmail.com>
8 #include <dt-bindings/input/input.h>
9 #include <dt-bindings/gpio/meson-g12a-gpio.h>
18 stdout-path = "serial0:115200n8";
22 device_type = "memory";
23 reg = <0x0 0x0 0x0 0x80000000>;
27 compatible = "adc-keys";
28 io-channels = <&saradc 2>;
29 io-channel-names = "buttons";
30 keyup-threshold-microvolt = <1710000>;
34 linux,code = <KEY_FN>;
35 press-threshold-microvolt = <10000>;
40 compatible = "gpio-leds";
43 label = "vim3:white:sys";
44 gpios = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_LOW>;
45 linux,default-trigger = "heartbeat";
50 gpios = <&gpio_expander 5 GPIO_ACTIVE_LOW>;
54 emmc_pwrseq: emmc-pwrseq {
55 compatible = "mmc-pwrseq-emmc";
56 reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
60 compatible = "gpio-keys-polled";
61 poll-interval = <100>;
65 linux,code = <KEY_POWER>;
66 gpios = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_LOW>;
70 sdio_pwrseq: sdio-pwrseq {
71 compatible = "mmc-pwrseq-simple";
72 reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
74 clock-names = "ext_clock";
77 dc_in: regulator-dc_in {
78 compatible = "regulator-fixed";
79 regulator-name = "DC_IN";
80 regulator-min-microvolt = <5000000>;
81 regulator-max-microvolt = <5000000>;
85 vcc_5v: regulator-vcc_5v {
86 compatible = "regulator-fixed";
87 regulator-name = "VCC_5V";
88 regulator-min-microvolt = <5000000>;
89 regulator-max-microvolt = <5000000>;
90 vin-supply = <&dc_in>;
92 gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>;
96 vcc_1v8: regulator-vcc_1v8 {
97 compatible = "regulator-fixed";
98 regulator-name = "VCC_1V8";
99 regulator-min-microvolt = <1800000>;
100 regulator-max-microvolt = <1800000>;
101 vin-supply = <&vcc_3v3>;
105 vcc_3v3: regulator-vcc_3v3 {
106 compatible = "regulator-fixed";
107 regulator-name = "VCC_3V3";
108 regulator-min-microvolt = <3300000>;
109 regulator-max-microvolt = <3300000>;
110 vin-supply = <&vsys_3v3>;
112 /* FIXME: actually controlled by VDDCPU_B_EN */
115 vddao_1v8: regulator-vddao_1v8 {
116 compatible = "regulator-fixed";
117 regulator-name = "VDDIO_AO1V8";
118 regulator-min-microvolt = <1800000>;
119 regulator-max-microvolt = <1800000>;
120 vin-supply = <&vsys_3v3>;
124 emmc_1v8: regulator-emmc_1v8 {
125 compatible = "regulator-fixed";
126 regulator-name = "EMMC_AO1V8";
127 regulator-min-microvolt = <1800000>;
128 regulator-max-microvolt = <1800000>;
129 vin-supply = <&vcc_3v3>;
133 vsys_3v3: regulator-vsys_3v3 {
134 compatible = "regulator-fixed";
135 regulator-name = "VSYS_3V3";
136 regulator-min-microvolt = <3300000>;
137 regulator-max-microvolt = <3300000>;
138 vin-supply = <&dc_in>;
142 usb_pwr: regulator-usb_pwr {
143 compatible = "regulator-fixed";
144 regulator-name = "USB_PWR";
145 regulator-min-microvolt = <5000000>;
146 regulator-max-microvolt = <5000000>;
147 vin-supply = <&vcc_5v>;
149 gpio = <&gpio GPIOA_6 GPIO_ACTIVE_HIGH>;
154 compatible = "hdmi-connector";
158 hdmi_connector_in: endpoint {
159 remote-endpoint = <&hdmi_tx_tmds_out>;
165 compatible = "pwm-clock";
167 clock-frequency = <32768>;
168 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
173 pinctrl-0 = <&cec_ao_a_h_pins>;
174 pinctrl-names = "default";
176 hdmi-phandle = <&hdmi_tx>;
180 pinctrl-0 = <&cec_ao_b_h_pins>;
181 pinctrl-names = "default";
183 hdmi-phandle = <&hdmi_tx>;
188 cpu_active: cpu-active {
189 temperature = <80000>; /* millicelsius */
190 hysteresis = <2000>; /* millicelsius */
197 trip = <&cpu_active>;
198 cooling-device = <&khadas_mcu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
204 external_phy: ethernet-phy@0 {
205 /* Realtek RTL8211F (0x001cc916) */
209 interrupt-parent = <&gpio_intc>;
210 /* MAC_INTR on GPIOZ_14 */
211 interrupts = <26 IRQ_TYPE_LEVEL_LOW>;
216 pinctrl-0 = <ð_pins>, <ð_rgmii_pins>;
217 pinctrl-names = "default";
220 phy-handle = <&external_phy>;
221 amlogic,tx-delay-ns = <2>;
226 pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
227 pinctrl-names = "default";
228 hdmi-supply = <&vcc_5v>;
232 hdmi_tx_tmds_out: endpoint {
233 remote-endpoint = <&hdmi_connector_in>;
239 pinctrl-0 = <&i2c_ao_sck_pins>, <&i2c_ao_sda_pins>;
240 pinctrl-names = "default";
242 khadas_mcu: system-controller@18 {
243 compatible = "khadas,mcu";
245 #cooling-cells = <2>;
248 gpio_expander: gpio-controller@20 {
249 compatible = "ti,tca6408";
251 vcc-supply = <&vcc_3v3>;
257 compatible = "haoyu,hym8563";
265 pinctrl-0 = <&remote_input_ao_pins>;
266 pinctrl-names = "default";
267 linux,rc-map-name = "rc-khadas";
271 reset-gpios = <&gpio GPIOA_8 GPIO_ACTIVE_LOW>;
276 pinctrl-0 = <&pwm_e_pins>;
277 pinctrl-names = "default";
282 vref-supply = <&vddao_1v8>;
288 pinctrl-0 = <&sdio_pins>;
289 pinctrl-1 = <&sdio_clk_gate_pins>;
290 pinctrl-names = "default", "clk-gate";
291 #address-cells = <1>;
296 max-frequency = <100000000>;
301 /* WiFi firmware requires power to be kept while in suspend */
302 keep-power-in-suspend;
304 mmc-pwrseq = <&sdio_pwrseq>;
306 vmmc-supply = <&vsys_3v3>;
307 vqmmc-supply = <&vddao_1v8>;
311 compatible = "brcm,bcm4329-fmac";
318 pinctrl-0 = <&sdcard_c_pins>;
319 pinctrl-1 = <&sdcard_clk_gate_c_pins>;
320 pinctrl-names = "default", "clk-gate";
324 max-frequency = <50000000>;
327 cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
328 vmmc-supply = <&vsys_3v3>;
329 vqmmc-supply = <&vsys_3v3>;
335 pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
336 pinctrl-1 = <&emmc_clk_gate_pins>;
337 pinctrl-names = "default", "clk-gate";
343 max-frequency = <200000000>;
346 mmc-pwrseq = <&emmc_pwrseq>;
347 vmmc-supply = <&vcc_3v3>;
348 vqmmc-supply = <&emmc_1v8>;
352 * EMMC_D4, EMMC_D5, EMMC_D6 and EMMC_D7 pins are shared between SPI NOR CS
353 * and eMMC Data 4 to 7 pins.
354 * Replace emmc_data_8b_pins to emmc_data_4b_pins from sd_emmc_c pinctrl-0,
355 * and change bus-width to 4 then spifc can be enabled.
359 pinctrl-0 = <&nor_pins>;
360 pinctrl-names = "default";
362 w25q128: spi-flash@0 {
363 #address-cells = <1>;
365 compatible = "winbond,w25q128fw", "jedec,spi-nor";
367 spi-max-frequency = <104000000>;
373 pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
374 pinctrl-names = "default";
378 compatible = "brcm,bcm43438-bt";
379 shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
380 max-speed = <2000000>;
388 pinctrl-0 = <&uart_ao_a_pins>;
389 pinctrl-names = "default";
393 phy-supply = <&dc_in>;
397 phy-supply = <&usb_pwr>;
401 phy-supply = <&usb_pwr>;
406 dr_mode = "peripheral";