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/leds/common.h>
10 #include <dt-bindings/gpio/meson-g12a-gpio.h>
11 #include <dt-bindings/sound/meson-g12a-tohdmitx.h>
22 stdout-path = "serial0:115200n8";
26 device_type = "memory";
27 reg = <0x0 0x0 0x0 0x80000000>;
31 compatible = "adc-keys";
32 io-channels = <&saradc 2>;
33 io-channel-names = "buttons";
34 keyup-threshold-microvolt = <1710000>;
38 linux,code = <KEY_FN>;
39 press-threshold-microvolt = <10000>;
44 compatible = "gpio-leds";
47 color = <LED_COLOR_ID_WHITE>;
48 function = LED_FUNCTION_STATUS;
49 gpios = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_HIGH>;
50 linux,default-trigger = "heartbeat";
54 color = <LED_COLOR_ID_RED>;
55 function = LED_FUNCTION_STATUS;
56 gpios = <&gpio_expander 5 GPIO_ACTIVE_HIGH>;
60 emmc_pwrseq: emmc-pwrseq {
61 compatible = "mmc-pwrseq-emmc";
62 reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
66 compatible = "gpio-keys-polled";
67 poll-interval = <100>;
71 linux,code = <KEY_POWER>;
72 gpios = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_LOW>;
76 sdio_pwrseq: sdio-pwrseq {
77 compatible = "mmc-pwrseq-simple";
78 reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
80 clock-names = "ext_clock";
83 dc_in: regulator-dc_in {
84 compatible = "regulator-fixed";
85 regulator-name = "DC_IN";
86 regulator-min-microvolt = <5000000>;
87 regulator-max-microvolt = <5000000>;
91 vcc_5v: regulator-vcc_5v {
92 compatible = "regulator-fixed";
93 regulator-name = "VCC_5V";
94 regulator-min-microvolt = <5000000>;
95 regulator-max-microvolt = <5000000>;
96 vin-supply = <&dc_in>;
98 gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>;
102 vcc_1v8: regulator-vcc_1v8 {
103 compatible = "regulator-fixed";
104 regulator-name = "VCC_1V8";
105 regulator-min-microvolt = <1800000>;
106 regulator-max-microvolt = <1800000>;
107 vin-supply = <&vcc_3v3>;
111 vcc_3v3: regulator-vcc_3v3 {
112 compatible = "regulator-fixed";
113 regulator-name = "VCC_3V3";
114 regulator-min-microvolt = <3300000>;
115 regulator-max-microvolt = <3300000>;
116 vin-supply = <&vsys_3v3>;
118 /* FIXME: actually controlled by VDDCPU_B_EN */
121 vddao_1v8: regulator-vddao_1v8 {
122 compatible = "regulator-fixed";
123 regulator-name = "VDDIO_AO1V8";
124 regulator-min-microvolt = <1800000>;
125 regulator-max-microvolt = <1800000>;
126 vin-supply = <&vsys_3v3>;
130 emmc_1v8: regulator-emmc_1v8 {
131 compatible = "regulator-fixed";
132 regulator-name = "EMMC_AO1V8";
133 regulator-min-microvolt = <1800000>;
134 regulator-max-microvolt = <1800000>;
135 vin-supply = <&vcc_3v3>;
139 vsys_3v3: regulator-vsys_3v3 {
140 compatible = "regulator-fixed";
141 regulator-name = "VSYS_3V3";
142 regulator-min-microvolt = <3300000>;
143 regulator-max-microvolt = <3300000>;
144 vin-supply = <&dc_in>;
148 usb_pwr: regulator-usb_pwr {
149 compatible = "regulator-fixed";
150 regulator-name = "USB_PWR";
151 regulator-min-microvolt = <5000000>;
152 regulator-max-microvolt = <5000000>;
153 vin-supply = <&vcc_5v>;
155 gpio = <&gpio GPIOA_6 GPIO_ACTIVE_HIGH>;
160 compatible = "hdmi-connector";
164 hdmi_connector_in: endpoint {
165 remote-endpoint = <&hdmi_tx_tmds_out>;
172 compatible = "amlogic,axg-sound-card";
173 model = "G12B-KHADAS-VIM3";
174 audio-aux-devs = <&tdmout_a>;
175 audio-routing = "TDMOUT_A IN 0", "FRDDR_A OUT 0",
176 "TDMOUT_A IN 1", "FRDDR_B OUT 0",
177 "TDMOUT_A IN 2", "FRDDR_C OUT 0",
178 "TDM_A Playback", "TDMOUT_A OUT";
180 assigned-clocks = <&clkc CLKID_MPLL2>,
183 assigned-clock-parents = <0>, <0>, <0>;
184 assigned-clock-rates = <294912000>,
190 sound-dai = <&frddr_a>;
194 sound-dai = <&frddr_b>;
198 sound-dai = <&frddr_c>;
201 /* 8ch hdmi interface */
203 sound-dai = <&tdmif_a>;
205 dai-tdm-slot-tx-mask-0 = <1 1>;
206 dai-tdm-slot-tx-mask-1 = <1 1>;
207 dai-tdm-slot-tx-mask-2 = <1 1>;
208 dai-tdm-slot-tx-mask-3 = <1 1>;
212 sound-dai = <&tohdmitx TOHDMITX_I2S_IN_A>;
218 sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
221 sound-dai = <&hdmi_tx>;
227 compatible = "pwm-clock";
229 clock-frequency = <32768>;
230 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
243 pinctrl-0 = <&cec_ao_a_h_pins>;
244 pinctrl-names = "default";
246 hdmi-phandle = <&hdmi_tx>;
250 pinctrl-0 = <&cec_ao_b_h_pins>;
251 pinctrl-names = "default";
253 hdmi-phandle = <&hdmi_tx>;
258 cpu_active: cpu-active {
259 temperature = <80000>; /* millicelsius */
260 hysteresis = <2000>; /* millicelsius */
267 trip = <&cpu_active>;
268 cooling-device = <&khadas_mcu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
274 external_phy: ethernet-phy@0 {
275 /* Realtek RTL8211F (0x001cc916) */
279 interrupt-parent = <&gpio_intc>;
280 /* MAC_INTR on GPIOZ_14 */
281 interrupts = <26 IRQ_TYPE_LEVEL_LOW>;
286 pinctrl-0 = <ð_pins>, <ð_rgmii_pins>;
287 pinctrl-names = "default";
290 phy-handle = <&external_phy>;
291 amlogic,tx-delay-ns = <2>;
308 pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
309 pinctrl-names = "default";
310 hdmi-supply = <&vcc_5v>;
314 hdmi_tx_tmds_out: endpoint {
315 remote-endpoint = <&hdmi_connector_in>;
321 pinctrl-0 = <&i2c_ao_sck_pins>, <&i2c_ao_sda_pins>;
322 pinctrl-names = "default";
324 khadas_mcu: system-controller@18 {
325 compatible = "khadas,mcu";
327 #cooling-cells = <2>;
330 gpio_expander: gpio-controller@20 {
331 compatible = "ti,tca6408";
333 vcc-supply = <&vcc_3v3>;
339 compatible = "haoyu,hym8563";
347 pinctrl-0 = <&remote_input_ao_pins>;
348 pinctrl-names = "default";
349 linux,rc-map-name = "rc-khadas";
353 reset-gpios = <&gpio GPIOA_8 GPIO_ACTIVE_LOW>;
358 pinctrl-0 = <&pwm_e_pins>;
359 pinctrl-names = "default";
364 vref-supply = <&vddao_1v8>;
370 pinctrl-0 = <&sdio_pins>;
371 pinctrl-1 = <&sdio_clk_gate_pins>;
372 pinctrl-names = "default", "clk-gate";
373 #address-cells = <1>;
378 max-frequency = <100000000>;
383 /* WiFi firmware requires power to be kept while in suspend */
384 keep-power-in-suspend;
386 mmc-pwrseq = <&sdio_pwrseq>;
388 vmmc-supply = <&vsys_3v3>;
389 vqmmc-supply = <&vddao_1v8>;
393 compatible = "brcm,bcm4329-fmac";
400 pinctrl-0 = <&sdcard_c_pins>;
401 pinctrl-1 = <&sdcard_clk_gate_c_pins>;
402 pinctrl-names = "default", "clk-gate";
406 max-frequency = <50000000>;
409 cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
410 vmmc-supply = <&vsys_3v3>;
411 vqmmc-supply = <&vsys_3v3>;
417 pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
418 pinctrl-1 = <&emmc_clk_gate_pins>;
419 pinctrl-names = "default", "clk-gate";
425 max-frequency = <200000000>;
428 mmc-pwrseq = <&emmc_pwrseq>;
429 vmmc-supply = <&vcc_3v3>;
430 vqmmc-supply = <&emmc_1v8>;
434 * EMMC_D4, EMMC_D5, EMMC_D6 and EMMC_D7 pins are shared between SPI NOR CS
435 * and eMMC Data 4 to 7 pins.
436 * Replace emmc_data_8b_pins to emmc_data_4b_pins from sd_emmc_c pinctrl-0,
437 * and change bus-width to 4 then spifc can be enabled.
441 pinctrl-0 = <&nor_pins>;
442 pinctrl-names = "default";
444 w25q128: spi-flash@0 {
445 #address-cells = <1>;
447 compatible = "winbond,w25q128fw", "jedec,spi-nor";
449 spi-max-frequency = <104000000>;
468 pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
469 pinctrl-names = "default";
473 compatible = "brcm,bcm43438-bt";
474 shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
475 max-speed = <2000000>;
483 pinctrl-0 = <&uart_ao_a_pins>;
484 pinctrl-names = "default";
488 phy-supply = <&dc_in>;
492 phy-supply = <&usb_pwr>;
496 phy-supply = <&usb_pwr>;
501 dr_mode = "peripheral";