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>
10 #include <dt-bindings/sound/meson-g12a-tohdmitx.h>
19 stdout-path = "serial0:115200n8";
23 device_type = "memory";
24 reg = <0x0 0x0 0x0 0x80000000>;
28 compatible = "adc-keys";
29 io-channels = <&saradc 2>;
30 io-channel-names = "buttons";
31 keyup-threshold-microvolt = <1710000>;
35 linux,code = <KEY_FN>;
36 press-threshold-microvolt = <10000>;
41 compatible = "gpio-leds";
44 label = "vim3:white:sys";
45 gpios = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_HIGH>;
46 linux,default-trigger = "heartbeat";
51 gpios = <&gpio_expander 5 GPIO_ACTIVE_HIGH>;
55 emmc_pwrseq: emmc-pwrseq {
56 compatible = "mmc-pwrseq-emmc";
57 reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
61 compatible = "gpio-keys-polled";
62 poll-interval = <100>;
66 linux,code = <KEY_POWER>;
67 gpios = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_LOW>;
71 sdio_pwrseq: sdio-pwrseq {
72 compatible = "mmc-pwrseq-simple";
73 reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
75 clock-names = "ext_clock";
78 dc_in: regulator-dc_in {
79 compatible = "regulator-fixed";
80 regulator-name = "DC_IN";
81 regulator-min-microvolt = <5000000>;
82 regulator-max-microvolt = <5000000>;
86 vcc_5v: regulator-vcc_5v {
87 compatible = "regulator-fixed";
88 regulator-name = "VCC_5V";
89 regulator-min-microvolt = <5000000>;
90 regulator-max-microvolt = <5000000>;
91 vin-supply = <&dc_in>;
93 gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>;
97 vcc_1v8: regulator-vcc_1v8 {
98 compatible = "regulator-fixed";
99 regulator-name = "VCC_1V8";
100 regulator-min-microvolt = <1800000>;
101 regulator-max-microvolt = <1800000>;
102 vin-supply = <&vcc_3v3>;
106 vcc_3v3: regulator-vcc_3v3 {
107 compatible = "regulator-fixed";
108 regulator-name = "VCC_3V3";
109 regulator-min-microvolt = <3300000>;
110 regulator-max-microvolt = <3300000>;
111 vin-supply = <&vsys_3v3>;
113 /* FIXME: actually controlled by VDDCPU_B_EN */
116 vddao_1v8: regulator-vddao_1v8 {
117 compatible = "regulator-fixed";
118 regulator-name = "VDDIO_AO1V8";
119 regulator-min-microvolt = <1800000>;
120 regulator-max-microvolt = <1800000>;
121 vin-supply = <&vsys_3v3>;
125 emmc_1v8: regulator-emmc_1v8 {
126 compatible = "regulator-fixed";
127 regulator-name = "EMMC_AO1V8";
128 regulator-min-microvolt = <1800000>;
129 regulator-max-microvolt = <1800000>;
130 vin-supply = <&vcc_3v3>;
134 vsys_3v3: regulator-vsys_3v3 {
135 compatible = "regulator-fixed";
136 regulator-name = "VSYS_3V3";
137 regulator-min-microvolt = <3300000>;
138 regulator-max-microvolt = <3300000>;
139 vin-supply = <&dc_in>;
143 usb_pwr: regulator-usb_pwr {
144 compatible = "regulator-fixed";
145 regulator-name = "USB_PWR";
146 regulator-min-microvolt = <5000000>;
147 regulator-max-microvolt = <5000000>;
148 vin-supply = <&vcc_5v>;
150 gpio = <&gpio GPIOA_6 GPIO_ACTIVE_HIGH>;
155 compatible = "hdmi-connector";
159 hdmi_connector_in: endpoint {
160 remote-endpoint = <&hdmi_tx_tmds_out>;
167 compatible = "amlogic,axg-sound-card";
168 model = "G12B-KHADAS-VIM3";
169 audio-aux-devs = <&tdmout_a>;
170 audio-routing = "TDMOUT_A IN 0", "FRDDR_A OUT 0",
171 "TDMOUT_A IN 1", "FRDDR_B OUT 0",
172 "TDMOUT_A IN 2", "FRDDR_C OUT 0",
173 "TDM_A Playback", "TDMOUT_A OUT";
175 assigned-clocks = <&clkc CLKID_MPLL2>,
178 assigned-clock-parents = <0>, <0>, <0>;
179 assigned-clock-rates = <294912000>,
185 sound-dai = <&frddr_a>;
189 sound-dai = <&frddr_b>;
193 sound-dai = <&frddr_c>;
196 /* 8ch hdmi interface */
198 sound-dai = <&tdmif_a>;
200 dai-tdm-slot-tx-mask-0 = <1 1>;
201 dai-tdm-slot-tx-mask-1 = <1 1>;
202 dai-tdm-slot-tx-mask-2 = <1 1>;
203 dai-tdm-slot-tx-mask-3 = <1 1>;
207 sound-dai = <&tohdmitx TOHDMITX_I2S_IN_A>;
213 sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
216 sound-dai = <&hdmi_tx>;
222 compatible = "pwm-clock";
224 clock-frequency = <32768>;
225 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
238 pinctrl-0 = <&cec_ao_a_h_pins>;
239 pinctrl-names = "default";
241 hdmi-phandle = <&hdmi_tx>;
245 pinctrl-0 = <&cec_ao_b_h_pins>;
246 pinctrl-names = "default";
248 hdmi-phandle = <&hdmi_tx>;
253 cpu_active: cpu-active {
254 temperature = <80000>; /* millicelsius */
255 hysteresis = <2000>; /* millicelsius */
262 trip = <&cpu_active>;
263 cooling-device = <&khadas_mcu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
269 external_phy: ethernet-phy@0 {
270 /* Realtek RTL8211F (0x001cc916) */
274 interrupt-parent = <&gpio_intc>;
275 /* MAC_INTR on GPIOZ_14 */
276 interrupts = <26 IRQ_TYPE_LEVEL_LOW>;
281 pinctrl-0 = <ð_pins>, <ð_rgmii_pins>;
282 pinctrl-names = "default";
285 phy-handle = <&external_phy>;
286 amlogic,tx-delay-ns = <2>;
303 pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
304 pinctrl-names = "default";
305 hdmi-supply = <&vcc_5v>;
309 hdmi_tx_tmds_out: endpoint {
310 remote-endpoint = <&hdmi_connector_in>;
316 pinctrl-0 = <&i2c_ao_sck_pins>, <&i2c_ao_sda_pins>;
317 pinctrl-names = "default";
319 khadas_mcu: system-controller@18 {
320 compatible = "khadas,mcu";
322 #cooling-cells = <2>;
325 gpio_expander: gpio-controller@20 {
326 compatible = "ti,tca6408";
328 vcc-supply = <&vcc_3v3>;
334 compatible = "haoyu,hym8563";
342 pinctrl-0 = <&remote_input_ao_pins>;
343 pinctrl-names = "default";
344 linux,rc-map-name = "rc-khadas";
348 reset-gpios = <&gpio GPIOA_8 GPIO_ACTIVE_LOW>;
353 pinctrl-0 = <&pwm_e_pins>;
354 pinctrl-names = "default";
359 vref-supply = <&vddao_1v8>;
365 pinctrl-0 = <&sdio_pins>;
366 pinctrl-1 = <&sdio_clk_gate_pins>;
367 pinctrl-names = "default", "clk-gate";
368 #address-cells = <1>;
373 max-frequency = <100000000>;
378 /* WiFi firmware requires power to be kept while in suspend */
379 keep-power-in-suspend;
381 mmc-pwrseq = <&sdio_pwrseq>;
383 vmmc-supply = <&vsys_3v3>;
384 vqmmc-supply = <&vddao_1v8>;
388 compatible = "brcm,bcm4329-fmac";
395 pinctrl-0 = <&sdcard_c_pins>;
396 pinctrl-1 = <&sdcard_clk_gate_c_pins>;
397 pinctrl-names = "default", "clk-gate";
401 max-frequency = <50000000>;
404 cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
405 vmmc-supply = <&vsys_3v3>;
406 vqmmc-supply = <&vsys_3v3>;
412 pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
413 pinctrl-1 = <&emmc_clk_gate_pins>;
414 pinctrl-names = "default", "clk-gate";
420 max-frequency = <200000000>;
423 mmc-pwrseq = <&emmc_pwrseq>;
424 vmmc-supply = <&vcc_3v3>;
425 vqmmc-supply = <&emmc_1v8>;
429 * EMMC_D4, EMMC_D5, EMMC_D6 and EMMC_D7 pins are shared between SPI NOR CS
430 * and eMMC Data 4 to 7 pins.
431 * Replace emmc_data_8b_pins to emmc_data_4b_pins from sd_emmc_c pinctrl-0,
432 * and change bus-width to 4 then spifc can be enabled.
436 pinctrl-0 = <&nor_pins>;
437 pinctrl-names = "default";
439 w25q128: spi-flash@0 {
440 #address-cells = <1>;
442 compatible = "winbond,w25q128fw", "jedec,spi-nor";
444 spi-max-frequency = <104000000>;
463 pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
464 pinctrl-names = "default";
468 compatible = "brcm,bcm43438-bt";
469 shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
470 max-speed = <2000000>;
478 pinctrl-0 = <&uart_ao_a_pins>;
479 pinctrl-names = "default";
483 phy-supply = <&dc_in>;
487 phy-supply = <&usb_pwr>;
491 phy-supply = <&usb_pwr>;
496 dr_mode = "peripheral";