1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * Copyright (c) 2023 BayLibre, SAS.
4 * Author: Jerome Brunet <jbrunet@baylibre.com>
7 #include <dt-bindings/clock/g12a-clkc.h>
8 #include <dt-bindings/input/input.h>
9 #include <dt-bindings/leds/common.h>
10 #include <dt-bindings/gpio/gpio.h>
11 #include <dt-bindings/gpio/meson-g12a-gpio.h>
12 #include <dt-bindings/sound/meson-g12a-toacodec.h>
13 #include <dt-bindings/sound/meson-g12a-tohdmitx.h>
23 device_type = "memory";
24 reg = <0x0 0x0 0x0 0x80000000>;
28 stdout-path = "serial0:115200n8";
31 dioo2133: audio-amplifier-0 {
32 compatible = "simple-audio-amplifier";
33 enable-gpios = <&gpio GPIOX_0 GPIO_ACTIVE_HIGH>;
34 VCC-supply = <&vcc_5v>;
35 sound-name-prefix = "10U2";
38 /* TOFIX: handle CVBS_DET on SARADC channel 0 */
40 compatible = "composite-video-connector";
43 cvbs_connector_in: endpoint {
44 remote-endpoint = <&cvbs_vdac_out>;
49 emmc_pwrseq: emmc-pwrseq {
50 compatible = "mmc-pwrseq-emmc";
51 reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
55 compatible = "hdmi-connector";
59 hdmi_connector_in: endpoint {
60 remote-endpoint = <&hdmi_tx_tmds_out>;
66 compatible = "pwm-leds";
69 color = <LED_COLOR_ID_BLUE>;
70 function = LED_FUNCTION_ACTIVITY;
71 linux,default-trigger = "heartbeat";
72 max-brightness = <255>;
73 pwms = <&pwm_ab 1 1250 0>;
79 compatible = "pwm-leds";
82 color = <LED_COLOR_ID_GREEN>;
83 function = LED_FUNCTION_STATUS;
84 linux,default-trigger = "default-on";
85 max-brightness = <255>;
86 pwms = <&pwm_cd 1 1250 0>;
92 compatible = "gpio-leds";
95 color = <LED_COLOR_ID_AMBER>;
96 function = LED_FUNCTION_STANDBY;
97 gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
102 dc_in: regulator-dc-in {
103 compatible = "regulator-fixed";
104 regulator-name = "5V_IN";
105 regulator-min-microvolt = <5000000>;
106 regulator-max-microvolt = <5000000>;
110 flash_1v8: regulator-flash-1v8 {
111 compatible = "regulator-fixed";
112 regulator-name = "FLASH_1V8";
113 regulator-min-microvolt = <1800000>;
114 regulator-max-microvolt = <1800000>;
116 vin-supply = <&vcc_3v3>;
119 vcc_card: regulator-vcc-card {
120 compatible = "regulator-fixed";
121 regulator-name = "VCC_CARD";
122 regulator-min-microvolt = <3300000>;
123 regulator-max-microvolt = <3300000>;
124 vin-supply = <&vddao_3v3>;
125 gpio = <&gpio GPIOX_2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
130 vcc_3v3: regulator-vcc-3v3 {
131 compatible = "regulator-fixed";
132 regulator-name = "VCC_3V3";
133 regulator-min-microvolt = <3300000>;
134 regulator-max-microvolt = <3300000>;
136 vin-supply = <&vddao_3v3>;
138 /* FIXME: controlled by TEST_N */
141 vcc_5v: regulator-vcc-5v {
142 compatible = "regulator-fixed";
143 regulator-name = "VCC_5V";
144 regulator-min-microvolt = <5000000>;
145 regulator-max-microvolt = <5000000>;
147 vin-supply = <&dc_in>;
148 gpio = <&gpio GPIOH_8 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
153 vddao_3v3: regulator-vddao_3v3 {
154 compatible = "regulator-fixed";
155 regulator-name = "VDDAO_3V3";
156 regulator-min-microvolt = <3300000>;
157 regulator-max-microvolt = <3300000>;
159 vin-supply = <&dc_in>;
162 vddcpu_b: regulator-vddcpu-b {
163 compatible = "pwm-regulator";
164 regulator-name = "VDDCPU_B";
165 regulator-min-microvolt = <730000>;
166 regulator-max-microvolt = <1011000>;
169 pwm-supply = <&dc_in>;
170 pwms = <&pwm_AO_cd 1 1250 0>;
171 pwm-dutycycle-range = <100 0>;
174 vddio_ao18: regulator-vddio_ao18 {
175 compatible = "regulator-fixed";
176 regulator-name = "VDDIO_AO18";
177 regulator-min-microvolt = <1800000>;
178 regulator-max-microvolt = <1800000>;
180 vin-supply = <&vddao_3v3>;
183 vddio_c: regulator-vddio_c {
184 compatible = "regulator-gpio";
185 regulator-name = "VDDIO_C";
186 regulator-min-microvolt = <1800000>;
187 regulator-max-microvolt = <3300000>;
188 regulator-settling-time-up-us = <200>;
189 regulator-settling-time-down-us = <50000>;
190 vin-supply = <&vddao_3v3>;
191 gpios = <&gpio GPIOX_4 GPIO_ACTIVE_HIGH>;
192 states = <3300000 0>,
197 compatible = "amlogic,axg-sound-card";
198 audio-widgets = "Line", "Lineout";
199 audio-aux-devs = <&tdmout_a>, <&tdmout_b>, <&tdmout_c>,
200 <&tdmin_a>, <&tdmin_b>, <&tdmin_c>,
203 assigned-clocks = <&clkc CLKID_MPLL2>,
206 assigned-clock-parents = <0>, <0>, <0>;
207 assigned-clock-rates = <294912000>,
212 sound-dai = <&frddr_a>;
216 sound-dai = <&frddr_b>;
220 sound-dai = <&frddr_c>;
224 sound-dai = <&toddr_a>;
228 sound-dai = <&toddr_b>;
232 sound-dai = <&toddr_c>;
236 * Audio setup: The 40 pins header provides access to 2 TDMs,
237 * SPDIF In/Out and PDM inputs.
248 * BCLK: 29/A1 or 8/AO8
249 * FS: 31/A2 or 11/AO7
251 * MCLK0: 15/A0 or 10/AO9
263 * TDM C is not usable on the 40 pins connector so it is
264 * setup for the HDMI 4 lanes i2s.
266 * No pinctrl is enabled by default to preserve the
267 * genericity of the 40 pins header. Many configurations are
268 * possible based on the desired use case. Please adjust TDM
269 * masks, clock setups and pinctrl accordingly.
273 sound-dai = <&tdmif_a>;
274 dai-format = "dsp_a";
275 dai-tdm-slot-tx-mask-0 = <1 1>;
279 sound-dai = <&tohdmitx TOHDMITX_I2S_IN_A>;
283 sound-dai = <&toacodec TOACODEC_IN_A>;
288 sound-dai = <&tdmif_b>;
290 dai-tdm-slot-tx-mask-0 = <1 1>;
291 dai-tdm-slot-rx-mask-1 = <1 1>;
295 sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
299 sound-dai = <&toacodec TOACODEC_IN_B>;
304 sound-dai = <&tdmif_c>;
306 dai-tdm-slot-tx-mask-0 = <1 1>;
307 dai-tdm-slot-tx-mask-1 = <1 1>;
308 dai-tdm-slot-tx-mask-2 = <1 1>;
309 dai-tdm-slot-tx-mask-3 = <1 1>;
313 sound-dai = <&tohdmitx TOHDMITX_I2S_IN_C>;
317 sound-dai = <&toacodec TOACODEC_IN_C>;
322 sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
325 sound-dai = <&hdmi_tx>;
330 sound-dai = <&toacodec TOACODEC_OUT>;
333 sound-dai = <&acodec>;
341 AVDD-supply = <&vddio_ao18>;
350 pinctrl-0 = <&cec_ao_b_h_pins>;
351 pinctrl-names = "default";
352 hdmi-phandle = <&hdmi_tx>;
360 cvbs_vdac_out: endpoint {
361 remote-endpoint = <&cvbs_connector_in>;
366 #address-cells = <1>;
370 compatible = "usb5e3,626";
372 reset-gpios = <&gpio GPIOC_7 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;
373 vdd-supply = <&vcc_5v>;
378 pinctrl-0 = <ð_pins>, <ð_rgmii_pins>, <ð_phy_irq_pins>;
379 pinctrl-names = "default";
382 phy-handle = <&external_phy>;
383 amlogic,tx-delay-ns = <2>;
387 external_phy: ethernet-phy@0 {
388 /* Realtek RTL8211F (0x001cc916) */
392 reset-assert-us = <100000>;
393 reset-deassert-us = <100000>;
394 reset-gpios = <&gpio GPIOZ_15 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;
396 interrupt-parent = <&gpio_intc>;
397 /* MAC_INTR on GPIOZ_14 */
398 interrupts = <26 IRQ_TYPE_LEVEL_LOW>;
416 pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
417 pinctrl-names = "default";
418 hdmi-supply = <&vcc_5v>;
422 hdmi_tx_tmds_out: endpoint {
423 remote-endpoint = <&hdmi_connector_in>;
429 pinctrl-0 = <&remote_input_ao_pins>;
430 pinctrl-names = "default";
434 spi_cs_disable_pins: spi-cs-disable {
437 function = "gpio_periphs";
443 eth_phy_irq_pins: eth-phy-irq {
446 function = "gpio_periphs";
455 pinctrl-0 = <&pwm_ao_d_e_pins>;
456 pinctrl-names = "default";
458 clock-names = "clkin1";
463 pinctrl-0 = <&pwm_b_x7_pins>;
464 pinctrl-names = "default";
466 clock-names = "clkin1";
471 pinctrl-0 = <&pwm_d_x3_pins>;
472 pinctrl-names = "default";
474 clock-names = "clkin1";
479 vref-supply = <&vddio_ao18>;
485 pinctrl-0 = <&sdcard_c_pins>;
486 pinctrl-1 = <&sdcard_clk_gate_c_pins>;
487 pinctrl-names = "default", "clk-gate";
495 max-frequency = <200000000>;
498 cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
499 vmmc-supply = <&vcc_card>;
500 vqmmc-supply = <&vddio_c>;
504 * EMMC_D4, EMMC_D5, EMMC_D6 and EMMC_D7 pins are shared between SPI NOR CS
505 * and eMMC Data 4 to 7 pins.
506 * Replace emmc_data_8b_pins to emmc_data_4b_pins from sd_emmc_c pinctrl-0,
507 * and change bus-width to 4 then spifc can be enabled.
511 pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>,
512 <&spi_cs_disable_pins>;
513 pinctrl-1 = <&emmc_clk_gate_pins>;
514 pinctrl-names = "default", "clk-gate";
519 max-frequency = <200000000>;
522 mmc-pwrseq = <&emmc_pwrseq>;
523 vmmc-supply = <&vcc_3v3>;
524 vqmmc-supply = <&flash_1v8>;
529 pinctrl-0 = <&nor_pins>;
530 pinctrl-names = "default";
531 cs-gpios = <&gpio BOOT_14 GPIO_ACTIVE_LOW>;
534 compatible = "jedec,spi-nor";
536 #address-cells = <1>;
538 spi-max-frequency = <80000000>;
600 pinctrl-0 = <&uart_ao_a_pins>;
601 pinctrl-names = "default";
605 phy-supply = <&dc_in>;
609 phy-supply = <&vcc_5v>;