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>
10 #include "meson-g12b.dtsi"
11 #include "meson-g12b-s922x.dtsi"
12 #include <dt-bindings/input/input.h>
13 #include <dt-bindings/gpio/meson-g12a-gpio.h>
14 #include <dt-bindings/sound/meson-g12a-tohdmitx.h>
17 compatible = "ugoos,am6", "amlogic,g12b";
26 stdout-path = "serial0:115200n8";
30 device_type = "memory";
31 reg = <0x0 0x0 0x0 0x40000000>;
34 emmc_pwrseq: emmc-pwrseq {
35 compatible = "mmc-pwrseq-emmc";
36 reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
39 sdio_pwrseq: sdio-pwrseq {
40 compatible = "mmc-pwrseq-simple";
41 reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
43 clock-names = "ext_clock";
46 spdif_dit: audio-codec-1 {
47 #sound-dai-cells = <0>;
48 compatible = "linux,spdif-dit";
50 sound-name-prefix = "DIT";
53 flash_1v8: regulator-flash_1v8 {
54 compatible = "regulator-fixed";
55 regulator-name = "FLASH_1V8";
56 regulator-min-microvolt = <1800000>;
57 regulator-max-microvolt = <1800000>;
58 vin-supply = <&vcc_3v3>;
62 main_12v: regulator-main_12v {
63 compatible = "regulator-fixed";
64 regulator-name = "12V";
65 regulator-min-microvolt = <12000000>;
66 regulator-max-microvolt = <12000000>;
70 vcc_5v: regulator-vcc_5v {
71 compatible = "regulator-fixed";
72 regulator-name = "VCC_5V";
73 regulator-min-microvolt = <5000000>;
74 regulator-max-microvolt = <5000000>;
75 vin-supply = <&main_12v>;
77 gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>;
81 vcc_1v8: regulator-vcc_1v8 {
82 compatible = "regulator-fixed";
83 regulator-name = "VCC_1V8";
84 regulator-min-microvolt = <1800000>;
85 regulator-max-microvolt = <1800000>;
86 vin-supply = <&vcc_3v3>;
90 vcc_3v3: regulator-vcc_3v3 {
91 compatible = "regulator-fixed";
92 regulator-name = "VCC_3V3";
93 regulator-min-microvolt = <3300000>;
94 regulator-max-microvolt = <3300000>;
95 vin-supply = <&vddao_3v3>;
97 /* FIXME: actually controlled by VDDCPU_B_EN */
100 vddcpu_a: regulator-vddcpu-a {
104 compatible = "pwm-regulator";
106 regulator-name = "VDDCPU_A";
107 regulator-min-microvolt = <721000>;
108 regulator-max-microvolt = <1022000>;
110 vin-supply = <&main_12v>;
112 pwms = <&pwm_ab 0 1250 0>;
113 pwm-dutycycle-range = <100 0>;
119 vddcpu_b: regulator-vddcpu-b {
123 compatible = "pwm-regulator";
125 regulator-name = "VDDCPU_B";
126 regulator-min-microvolt = <721000>;
127 regulator-max-microvolt = <1022000>;
129 vin-supply = <&main_12v>;
131 pwms = <&pwm_AO_cd 1 1250 0>;
132 pwm-dutycycle-range = <100 0>;
138 usb1_pow: regulator-usb1-pow {
139 compatible = "regulator-fixed";
140 regulator-name = "USB1_POW";
141 regulator-min-microvolt = <5000000>;
142 regulator-max-microvolt = <5000000>;
143 vin-supply = <&vcc_5v>;
145 /* connected to SY6280A Power Switch */
146 gpio = <&gpio GPIOA_8 GPIO_ACTIVE_HIGH>;
150 usb_pwr_en: regulator-usb-pwr-en {
151 compatible = "regulator-fixed";
152 regulator-name = "USB_PWR_EN";
153 regulator-min-microvolt = <5000000>;
154 regulator-max-microvolt = <5000000>;
155 vin-supply = <&vcc_5v>;
157 /* Connected to USB3 Type-A Port power enable */
158 gpio = <&gpio GPIOAO_7 GPIO_ACTIVE_HIGH>;
162 vddao_1v8: regulator-vddao-1v8 {
163 compatible = "regulator-fixed";
164 regulator-name = "VDDAO_1V8";
165 regulator-min-microvolt = <1800000>;
166 regulator-max-microvolt = <1800000>;
167 vin-supply = <&vddao_3v3>;
171 vddao_3v3: regulator-vddao-3v3 {
172 compatible = "regulator-fixed";
173 regulator-name = "VDDAO_3V3";
174 regulator-min-microvolt = <3300000>;
175 regulator-max-microvolt = <3300000>;
176 vin-supply = <&main_12v>;
181 compatible = "composite-video-connector";
184 cvbs_connector_in: endpoint {
185 remote-endpoint = <&cvbs_vdac_out>;
191 compatible = "hdmi-connector";
195 hdmi_connector_in: endpoint {
196 remote-endpoint = <&hdmi_tx_tmds_out>;
202 compatible = "amlogic,axg-sound-card";
203 model = "G12B-UGOOS-AM6";
204 audio-aux-devs = <&tdmout_b>;
205 audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
206 "TDMOUT_B IN 1", "FRDDR_B OUT 1",
207 "TDMOUT_B IN 2", "FRDDR_C OUT 1",
208 "TDM_B Playback", "TDMOUT_B OUT",
209 "SPDIFOUT IN 0", "FRDDR_A OUT 3",
210 "SPDIFOUT IN 1", "FRDDR_B OUT 3",
211 "SPDIFOUT IN 2", "FRDDR_C OUT 3";
213 assigned-clocks = <&clkc CLKID_MPLL2>,
216 assigned-clock-parents = <0>, <0>, <0>;
217 assigned-clock-rates = <294912000>,
223 sound-dai = <&frddr_a>;
227 sound-dai = <&frddr_b>;
231 sound-dai = <&frddr_c>;
234 /* 8ch hdmi interface */
236 sound-dai = <&tdmif_b>;
238 dai-tdm-slot-tx-mask-0 = <1 1>;
239 dai-tdm-slot-tx-mask-1 = <1 1>;
240 dai-tdm-slot-tx-mask-2 = <1 1>;
241 dai-tdm-slot-tx-mask-3 = <1 1>;
245 sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
249 /* spdif hdmi or toslink interface */
251 sound-dai = <&spdifout>;
254 sound-dai = <&spdif_dit>;
258 sound-dai = <&tohdmitx TOHDMITX_SPDIF_IN_A>;
262 /* spdif hdmi interface */
264 sound-dai = <&spdifout_b>;
267 sound-dai = <&tohdmitx TOHDMITX_SPDIF_IN_B>;
273 sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
276 sound-dai = <&hdmi_tx>;
282 compatible = "pwm-clock";
284 clock-frequency = <32768>;
285 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
294 pinctrl-0 = <&cec_ao_a_h_pins>;
295 pinctrl-names = "default";
297 hdmi-phandle = <&hdmi_tx>;
301 pinctrl-0 = <&cec_ao_b_h_pins>;
302 pinctrl-names = "default";
304 hdmi-phandle = <&hdmi_tx>;
312 cpu-supply = <&vddcpu_b>;
313 operating-points-v2 = <&cpu_opp_table_0>;
314 clocks = <&clkc CLKID_CPU_CLK>;
315 clock-latency = <50000>;
319 cpu-supply = <&vddcpu_b>;
320 operating-points-v2 = <&cpu_opp_table_0>;
321 clocks = <&clkc CLKID_CPU_CLK>;
322 clock-latency = <50000>;
326 cpu-supply = <&vddcpu_a>;
327 operating-points-v2 = <&cpub_opp_table_1>;
328 clocks = <&clkc CLKID_CPUB_CLK>;
329 clock-latency = <50000>;
333 cpu-supply = <&vddcpu_a>;
334 operating-points-v2 = <&cpub_opp_table_1>;
335 clocks = <&clkc CLKID_CPUB_CLK>;
336 clock-latency = <50000>;
340 cpu-supply = <&vddcpu_a>;
341 operating-points-v2 = <&cpub_opp_table_1>;
342 clocks = <&clkc CLKID_CPUB_CLK>;
343 clock-latency = <50000>;
347 cpu-supply = <&vddcpu_a>;
348 operating-points-v2 = <&cpub_opp_table_1>;
349 clocks = <&clkc CLKID_CPUB_CLK>;
350 clock-latency = <50000>;
354 cvbs_vdac_out: endpoint {
355 remote-endpoint = <&cvbs_connector_in>;
360 external_phy: ethernet-phy@0 {
361 /* Realtek RTL8211F (0x001cc916) */
365 reset-assert-us = <10000>;
366 reset-deassert-us = <30000>;
367 reset-gpios = <&gpio GPIOZ_15 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;
369 interrupt-parent = <&gpio_intc>;
370 /* MAC_INTR on GPIOZ_14 */
371 interrupts = <26 IRQ_TYPE_LEVEL_LOW>;
376 pinctrl-0 = <ð_pins>, <ð_rgmii_pins>;
377 pinctrl-names = "default";
380 phy-handle = <&external_phy>;
381 amlogic,tx-delay-ns = <2>;
398 pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
399 pinctrl-names = "default";
400 hdmi-supply = <&vcc_5v>;
404 hdmi_tx_tmds_out: endpoint {
405 remote-endpoint = <&hdmi_connector_in>;
411 pinctrl-0 = <&remote_input_ao_pins>;
412 pinctrl-names = "default";
413 linux,rc-map-name = "rc-khadas";
417 pinctrl-0 = <&pwm_a_e_pins>;
418 pinctrl-names = "default";
420 clock-names = "clkin0";
425 pinctrl-0 = <&pwm_ao_d_e_pins>;
426 pinctrl-names = "default";
428 clock-names = "clkin1";
433 pinctrl-0 = <&pwm_e_pins>;
434 pinctrl-names = "default";
436 clock-names = "clkin0";
443 pinctrl-0 = <&sdio_pins>;
444 pinctrl-1 = <&sdio_clk_gate_pins>;
445 pinctrl-names = "default", "clk-gate";
446 #address-cells = <1>;
452 max-frequency = <100000000>;
457 mmc-pwrseq = <&sdio_pwrseq>;
459 vmmc-supply = <&vddao_3v3>;
460 vqmmc-supply = <&vddao_1v8>;
464 compatible = "brcm,bcm4329-fmac";
471 pinctrl-0 = <&sdcard_c_pins>;
472 pinctrl-1 = <&sdcard_clk_gate_c_pins>;
473 pinctrl-names = "default", "clk-gate";
477 max-frequency = <50000000>;
480 cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
481 vmmc-supply = <&vddao_3v3>;
482 vqmmc-supply = <&vddao_3v3>;
488 pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
489 pinctrl-1 = <&emmc_clk_gate_pins>;
490 pinctrl-names = "default", "clk-gate";
494 max-frequency = <100000000>;
497 mmc-pwrseq = <&emmc_pwrseq>;
498 vmmc-supply = <&vcc_3v3>;
499 vqmmc-supply = <&flash_1v8>;
503 pinctrl-0 = <&spdif_out_h_pins>;
504 pinctrl-names = "default";
526 pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
527 pinctrl-names = "default";
531 compatible = "brcm,bcm43438-bt";
532 shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
533 max-speed = <2000000>;
541 pinctrl-0 = <&uart_ao_a_pins>;
542 pinctrl-names = "default";
548 vbus-regulator = <&usb_pwr_en>;
552 phy-supply = <&usb1_pow>;
556 phy-supply = <&usb1_pow>;