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>
6 * Copyright (c) 2022 Radxa Limited
7 * Author: Yuntian Zhang <yt@radxa.com>
12 #include "meson-g12b-a311d.dtsi"
13 #include <dt-bindings/input/input.h>
14 #include <dt-bindings/leds/common.h>
15 #include <dt-bindings/gpio/meson-g12a-gpio.h>
16 #include <dt-bindings/sound/meson-g12a-tohdmitx.h>
19 compatible = "radxa,zero2", "amlogic,a311d", "amlogic,g12b";
20 model = "Radxa Zero2";
28 stdout-path = "serial0:115200n8";
32 device_type = "memory";
33 reg = <0x0 0x0 0x0 0x80000000>;
37 compatible = "gpio-keys-polled";
38 poll-interval = <100>;
41 linux,code = <KEY_POWER>;
42 gpios = <&gpio_ao GPIOAO_3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
47 compatible = "gpio-leds";
50 color = <LED_COLOR_ID_GREEN>;
51 function = LED_FUNCTION_STATUS;
52 gpios = <&gpio GPIOA_12 GPIO_ACTIVE_HIGH>;
53 linux,default-trigger = "heartbeat";
58 compatible = "hdmi-connector";
62 hdmi_connector_in: endpoint {
63 remote-endpoint = <&hdmi_tx_tmds_out>;
68 emmc_pwrseq: emmc-pwrseq {
69 compatible = "mmc-pwrseq-emmc";
70 reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
73 sdio_pwrseq: sdio-pwrseq {
74 compatible = "mmc-pwrseq-simple";
75 reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
77 clock-names = "ext_clock";
80 ao_5v: regulator-ao-5v {
81 compatible = "regulator-fixed";
82 regulator-name = "AO_5V";
83 regulator-min-microvolt = <5000000>;
84 regulator-max-microvolt = <5000000>;
88 vcc_1v8: regulator-vcc-1v8 {
89 compatible = "regulator-fixed";
90 regulator-name = "VCC_1V8";
91 regulator-min-microvolt = <1800000>;
92 regulator-max-microvolt = <1800000>;
93 vin-supply = <&vcc_3v3>;
97 vcc_3v3: regulator-vcc-3v3 {
98 compatible = "regulator-fixed";
99 regulator-name = "VCC_3V3";
100 regulator-min-microvolt = <3300000>;
101 regulator-max-microvolt = <3300000>;
102 vin-supply = <&vddao_3v3>;
104 /* FIXME: actually controlled by VDDCPU_B_EN */
107 vddao_1v8: regulator-vddao-1v8 {
108 compatible = "regulator-fixed";
109 regulator-name = "VDDIO_AO1V8";
110 regulator-min-microvolt = <1800000>;
111 regulator-max-microvolt = <1800000>;
112 vin-supply = <&vddao_3v3>;
116 vddao_3v3: regulator-vddao-3v3 {
117 compatible = "regulator-fixed";
118 regulator-name = "VDDAO_3V3";
119 regulator-min-microvolt = <3300000>;
120 regulator-max-microvolt = <3300000>;
121 vin-supply = <&ao_5v>;
125 vddcpu_a: regulator-vddcpu-a {
127 * MP8756GD Regulator.
129 compatible = "pwm-regulator";
131 regulator-name = "VDDCPU_A";
132 regulator-min-microvolt = <730000>;
133 regulator-max-microvolt = <1022000>;
135 pwm-supply = <&ao_5v>;
137 pwms = <&pwm_ab 0 1250 0>;
138 pwm-dutycycle-range = <100 0>;
144 vddcpu_b: regulator-vddcpu-b {
146 * Silergy SY8120B1ABC Regulator.
148 compatible = "pwm-regulator";
150 regulator-name = "VDDCPU_B";
151 regulator-min-microvolt = <730000>;
152 regulator-max-microvolt = <1022000>;
154 pwm-supply = <&ao_5v>;
156 pwms = <&pwm_AO_cd 1 1250 0>;
157 pwm-dutycycle-range = <100 0>;
164 compatible = "amlogic,axg-sound-card";
165 model = "RADXA-ZERO2";
166 audio-aux-devs = <&tdmout_b>;
167 audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
168 "TDMOUT_B IN 1", "FRDDR_B OUT 1",
169 "TDMOUT_B IN 2", "FRDDR_C OUT 1",
170 "TDM_B Playback", "TDMOUT_B OUT";
172 assigned-clocks = <&clkc CLKID_MPLL2>,
175 assigned-clock-parents = <0>, <0>, <0>;
176 assigned-clock-rates = <294912000>,
181 sound-dai = <&frddr_a>;
185 sound-dai = <&frddr_b>;
189 sound-dai = <&frddr_c>;
192 /* 8ch hdmi interface */
194 sound-dai = <&tdmif_b>;
196 dai-tdm-slot-tx-mask-0 = <1 1>;
197 dai-tdm-slot-tx-mask-1 = <1 1>;
198 dai-tdm-slot-tx-mask-2 = <1 1>;
199 dai-tdm-slot-tx-mask-3 = <1 1>;
203 sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
209 sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
212 sound-dai = <&hdmi_tx>;
218 compatible = "pwm-clock";
220 clock-frequency = <32768>;
221 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
230 pinctrl-0 = <&cec_ao_a_h_pins>;
231 pinctrl-names = "default";
233 hdmi-phandle = <&hdmi_tx>;
237 pinctrl-0 = <&cec_ao_b_h_pins>;
238 pinctrl-names = "default";
240 hdmi-phandle = <&hdmi_tx>;
248 cpu-supply = <&vddcpu_b>;
249 operating-points-v2 = <&cpu_opp_table_0>;
250 clocks = <&clkc CLKID_CPU_CLK>;
251 clock-latency = <50000>;
255 cpu-supply = <&vddcpu_b>;
256 operating-points-v2 = <&cpu_opp_table_0>;
257 clocks = <&clkc CLKID_CPU_CLK>;
258 clock-latency = <50000>;
262 cpu-supply = <&vddcpu_a>;
263 operating-points-v2 = <&cpub_opp_table_1>;
264 clocks = <&clkc CLKID_CPUB_CLK>;
265 clock-latency = <50000>;
269 cpu-supply = <&vddcpu_a>;
270 operating-points-v2 = <&cpub_opp_table_1>;
271 clocks = <&clkc CLKID_CPUB_CLK>;
272 clock-latency = <50000>;
276 cpu-supply = <&vddcpu_a>;
277 operating-points-v2 = <&cpub_opp_table_1>;
278 clocks = <&clkc CLKID_CPUB_CLK>;
279 clock-latency = <50000>;
283 cpu-supply = <&vddcpu_a>;
284 operating-points-v2 = <&cpub_opp_table_1>;
285 clocks = <&clkc CLKID_CPUB_CLK>;
286 clock-latency = <50000>;
304 "PIN_27", "PIN_28", "PIN_7", "PIN_11", "PIN_13", "PIN_15", "PIN_18", "PIN_40",
305 "", "", "", "", "", "", "", "",
307 "", "", "", "", "PIN_19", "PIN_21", "PIN_24", "PIN_23",
310 "", "", "", "", "", "", "", "",
311 "", "", "", "", "EMMC_PWRSEQ", "", "", "",
313 "", "", "", "", "", "", "SD_CD", "PIN_36",
315 "PIN_32", "PIN_12", "PIN_35", "", "", "PIN_38", "", "",
316 "", "", "", "", "LED_GREEN", "PIN_31", "PIN_3", "PIN_5",
318 "", "", "", "", "", "", "SDIO_PWRSEQ", "",
319 "", "", "", "", "", "", "", "",
320 "", "BT_SHUTDOWN", "", "";
326 "PIN_8", "PIN_10", "", "BTN_POWER", "", "", "", "PIN_29",
327 "PIN_33", "PIN_37", "FAN", "",
334 pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
335 pinctrl-names = "default";
336 hdmi-supply = <&ao_5v>;
340 hdmi_tx_tmds_out: endpoint {
341 remote-endpoint = <&hdmi_connector_in>;
347 pinctrl-0 = <&remote_input_ao_pins>;
348 pinctrl-names = "default";
352 pinctrl-0 = <&pwm_a_e_pins>;
353 pinctrl-names = "default";
355 clock-names = "clkin0";
360 pinctrl-0 = <&pwm_e_pins>;
361 pinctrl-names = "default";
363 clock-names = "clkin0";
368 pinctrl-0 = <&pwm_ao_a_pins>;
369 pinctrl-names = "default";
371 clock-names = "clkin0";
376 pinctrl-0 = <&pwm_ao_d_e_pins>;
377 pinctrl-names = "default";
379 clock-names = "clkin1";
385 vref-supply = <&vddao_1v8>;
391 pinctrl-0 = <&sdio_pins>;
392 pinctrl-1 = <&sdio_clk_gate_pins>;
393 pinctrl-names = "default", "clk-gate";
394 #address-cells = <1>;
399 max-frequency = <100000000>;
404 /* WiFi firmware requires power to be kept while in suspend */
405 keep-power-in-suspend;
407 mmc-pwrseq = <&sdio_pwrseq>;
409 vmmc-supply = <&vddao_3v3>;
410 vqmmc-supply = <&vddao_1v8>;
414 compatible = "brcm,bcm4329-fmac";
421 pinctrl-0 = <&sdcard_c_pins>;
422 pinctrl-1 = <&sdcard_clk_gate_c_pins>;
423 pinctrl-names = "default", "clk-gate";
427 max-frequency = <50000000>;
430 cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
431 vmmc-supply = <&vddao_3v3>;
432 vqmmc-supply = <&vddao_3v3>;
438 pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
439 pinctrl-1 = <&emmc_clk_gate_pins>;
440 pinctrl-names = "default", "clk-gate";
446 max-frequency = <200000000>;
449 mmc-pwrseq = <&emmc_pwrseq>;
450 vmmc-supply = <&vcc_3v3>;
451 vqmmc-supply = <&vcc_1v8>;
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";