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) 2023 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>
21 stdout-path = "serial0:115200n8";
25 device_type = "memory";
26 reg = <0x0 0x0 0x0 0x80000000>; /* 2 GiB or 4 GiB */
30 compatible = "adc-keys";
31 io-channels = <&saradc 2>;
32 io-channel-names = "buttons";
33 keyup-threshold-microvolt = <1710000>;
37 linux,code = <KEY_POWER>;
38 press-threshold-microvolt = <10000>;
42 emmc_pwrseq: emmc-pwrseq {
43 compatible = "mmc-pwrseq-emmc";
44 reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
48 compatible = "pwm-fan";
50 cooling-levels = <0 120 170 220>;
51 pwms = <&pwm_cd 1 40000 0>;
55 compatible = "hdmi-connector";
59 hdmi_connector_in: endpoint {
60 remote-endpoint = <&hdmi_tx_tmds_out>;
66 compatible = "gpio-leds";
69 color = <LED_COLOR_ID_BLUE>;
70 function = LED_FUNCTION_STATUS;
71 gpios = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_LOW>;
72 linux,default-trigger = "heartbeat";
76 color = <LED_COLOR_ID_GREEN>;
77 function = LED_FUNCTION_STATUS;
78 gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;
82 sdio_pwrseq: sdio-pwrseq {
83 compatible = "mmc-pwrseq-simple";
84 reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
86 clock-names = "ext_clock";
90 compatible = "pwm-clock";
92 clock-frequency = <32768>;
93 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
96 dc_in: regulator-dc-in {
97 compatible = "regulator-fixed";
98 regulator-name = "DC_IN";
99 regulator-min-microvolt = <5000000>;
100 regulator-max-microvolt = <5000000>;
104 vcc_5v: regulator-vcc-5v {
105 compatible = "regulator-fixed";
106 regulator-name = "VCC_5V";
107 regulator-min-microvolt = <5000000>;
108 regulator-max-microvolt = <5000000>;
109 vin-supply = <&dc_in>;
111 gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>;
115 vcc_3v3: regulator-vcc-3v3 {
116 compatible = "regulator-fixed";
117 regulator-name = "VCC_3V3";
118 regulator-min-microvolt = <3300000>;
119 regulator-max-microvolt = <3300000>;
120 vin-supply = <&vsys_3v3>;
124 vcc_1v8: regulator-vcc-1v8 {
125 compatible = "regulator-fixed";
126 regulator-name = "VCC_1V8";
127 regulator-min-microvolt = <1800000>;
128 regulator-max-microvolt = <1800000>;
129 vin-supply = <&vcc_3v3>;
133 vddao_1v8: regulator-vddao-1v8 {
134 compatible = "regulator-fixed";
135 regulator-name = "VDDIO_AO1V8";
136 regulator-min-microvolt = <1800000>;
137 regulator-max-microvolt = <1800000>;
138 vin-supply = <&vsys_3v3>;
142 vddcpu_a: regulator-vddcpu-a {
143 compatible = "pwm-regulator";
144 regulator-name = "VDDCPU_A";
145 regulator-min-microvolt = <690000>;
146 regulator-max-microvolt = <1050000>;
147 pwm-supply = <&dc_in>;
148 pwms = <&pwm_ab 0 1250 0>;
149 pwm-dutycycle-range = <100 0>;
154 vddcpu_b: regulator-vddcpu-b {
155 compatible = "pwm-regulator";
156 regulator-name = "VDDCPU_B";
157 regulator-min-microvolt = <690000>;
158 regulator-max-microvolt = <1050000>;
159 pwm-supply = <&vsys_3v3>;
160 pwms = <&pwm_AO_cd 1 1250 0>;
161 pwm-dutycycle-range = <100 0>;
166 vsys_3v3: regulator-vsys-3v3 {
167 compatible = "regulator-fixed";
168 regulator-name = "VSYS_3V3";
169 regulator-min-microvolt = <3300000>;
170 regulator-max-microvolt = <3300000>;
171 vin-supply = <&dc_in>;
175 emmc_1v8: regulator-emmc-1v8 {
176 compatible = "regulator-fixed";
177 regulator-name = "EMMC_AO1V8";
178 regulator-min-microvolt = <1800000>;
179 regulator-max-microvolt = <1800000>;
180 vin-supply = <&vcc_3v3>;
184 usb_pwr: regulator-usb-pwr {
185 compatible = "regulator-fixed";
186 regulator-name = "USB_PWR";
187 regulator-min-microvolt = <5000000>;
188 regulator-max-microvolt = <5000000>;
189 vin-supply = <&vcc_5v>;
191 gpio = <&gpio GPIOA_6 GPIO_ACTIVE_HIGH>;
196 compatible = "amlogic,axg-sound-card";
198 audio-aux-devs = <&tdmout_b>;
199 audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
200 "TDMOUT_B IN 1", "FRDDR_B OUT 1",
201 "TDMOUT_B IN 2", "FRDDR_C OUT 1",
202 "TDM_B Playback", "TDMOUT_B OUT";
204 assigned-clocks = <&clkc CLKID_MPLL2>,
207 assigned-clock-parents = <0>, <0>, <0>;
208 assigned-clock-rates = <294912000>,
213 sound-dai = <&frddr_a>;
217 sound-dai = <&frddr_b>;
221 sound-dai = <&frddr_c>;
224 /* 8ch hdmi interface */
226 sound-dai = <&tdmif_b>;
228 dai-tdm-slot-tx-mask-0 = <1 1>;
229 dai-tdm-slot-tx-mask-1 = <1 1>;
230 dai-tdm-slot-tx-mask-2 = <1 1>;
231 dai-tdm-slot-tx-mask-3 = <1 1>;
235 sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
241 sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
244 sound-dai = <&hdmi_tx>;
259 pinctrl-0 = <&cec_ao_b_h_pins>;
260 pinctrl-names = "default";
262 hdmi-phandle = <&hdmi_tx>;
266 cpu-supply = <&vddcpu_b>;
267 operating-points-v2 = <&cpu_opp_table_0>;
268 clocks = <&clkc CLKID_CPU_CLK>;
269 clock-latency = <50000>;
273 cpu-supply = <&vddcpu_b>;
274 operating-points-v2 = <&cpu_opp_table_0>;
275 clocks = <&clkc CLKID_CPU_CLK>;
276 clock-latency = <50000>;
280 cpu-supply = <&vddcpu_a>;
281 operating-points-v2 = <&cpub_opp_table_1>;
282 clocks = <&clkc CLKID_CPUB_CLK>;
283 clock-latency = <50000>;
287 cpu-supply = <&vddcpu_a>;
288 operating-points-v2 = <&cpub_opp_table_1>;
289 clocks = <&clkc CLKID_CPUB_CLK>;
290 clock-latency = <50000>;
294 cpu-supply = <&vddcpu_a>;
295 operating-points-v2 = <&cpub_opp_table_1>;
296 clocks = <&clkc CLKID_CPUB_CLK>;
297 clock-latency = <50000>;
301 cpu-supply = <&vddcpu_a>;
302 operating-points-v2 = <&cpub_opp_table_1>;
303 clocks = <&clkc CLKID_CPUB_CLK>;
304 clock-latency = <50000>;
308 pinctrl-0 = <ð_pins>, <ð_rgmii_pins>;
309 pinctrl-names = "default";
312 phy-handle = <&external_phy>;
313 amlogic,tx-delay-ns = <2>;
317 external_phy: ethernet-phy@0 {
318 /* Realtek RTL8211F (0x001cc916) */
322 reset-assert-us = <10000>;
323 reset-deassert-us = <80000>;
324 reset-gpios = <&gpio GPIOZ_15 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;
326 interrupt-parent = <&gpio_intc>;
327 /* MAC_INTR on GPIOZ_14 */
328 interrupts = <IRQID_GPIOZ_14 IRQ_TYPE_LEVEL_LOW>;
346 pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
347 pinctrl-names = "default";
348 hdmi-supply = <&vcc_5v>;
352 hdmi_tx_tmds_out: endpoint {
353 remote-endpoint = <&hdmi_connector_in>;
360 pinctrl-0 = <&i2c2_sda_x_pins>, <&i2c2_sck_x_pins>;
361 pinctrl-names = "default";
366 reset-gpios = <&gpio GPIOA_8 GPIO_ACTIVE_LOW>;
371 pinctrl-0 = <&pwm_a_e_pins>;
372 pinctrl-names = "default";
374 clock-names = "clkin0";
379 pinctrl-0 = <&pwm_d_x6_pins>;
380 pinctrl-names = "default";
381 pwm-gpios = <&gpio GPIOAO_10 GPIO_ACTIVE_HIGH>;
386 pinctrl-0 = <&pwm_e_pins>;
387 pinctrl-names = "default";
391 pinctrl-0 = <&pwm_ao_d_e_pins>;
392 pinctrl-names = "default";
394 clock-names = "clkin1";
400 vref-supply = <&vddao_1v8>;
405 /* enable if WiFi/BT board connected */
407 pinctrl-0 = <&sdio_pins>;
408 pinctrl-1 = <&sdio_clk_gate_pins>;
409 pinctrl-names = "default", "clk-gate";
410 #address-cells = <1>;
415 max-frequency = <50000000>;
420 /* WiFi firmware requires power in suspend */
421 keep-power-in-suspend;
423 mmc-pwrseq = <&sdio_pwrseq>;
425 vmmc-supply = <&vsys_3v3>;
426 vqmmc-supply = <&vddao_1v8>;
436 pinctrl-0 = <&sdcard_c_pins>;
437 pinctrl-1 = <&sdcard_clk_gate_c_pins>;
438 pinctrl-names = "default", "clk-gate";
442 max-frequency = <50000000>;
445 cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
446 vmmc-supply = <&vsys_3v3>;
447 vqmmc-supply = <&vsys_3v3>;
453 pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
454 pinctrl-1 = <&emmc_clk_gate_pins>;
455 pinctrl-names = "default", "clk-gate";
461 max-frequency = <200000000>;
464 mmc-pwrseq = <&emmc_pwrseq>;
465 vmmc-supply = <&vcc_3v3>;
466 vqmmc-supply = <&emmc_1v8>;
482 /* enable if WiFi/BT board connected */
484 pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
485 pinctrl-names = "default";
489 compatible = "realtek,rtl8822cs-bt";
490 enable-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
491 host-wake-gpios = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>;
492 device-wake-gpios = <&gpio GPIOX_18 GPIO_ACTIVE_HIGH>;
498 pinctrl-0 = <&uart_ao_a_pins>;
499 pinctrl-names = "default";
503 phy-supply = <&dc_in>;
507 phy-supply = <&usb_pwr>;
511 phy-supply = <&usb_pwr>;
516 dr_mode = "peripheral";
517 phys = <&usb2_phy0>, <&usb2_phy1>;
518 phy-names = "usb2-phy0", "usb2-phy1";