1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * Copyright (c) 2016 Endless Computers, Inc.
4 * Author: Carlo Caione <carlo@endlessm.com>
7 /* Common DTSI for same Amlogic Q200/Q201 and P230/P231 boards using either
8 * the pin-compatible S912 (GXM) or S905D (GXL) SoCs.
11 #include <dt-bindings/sound/meson-aiu.h>
19 dio2133: analog-amplifier {
20 compatible = "simple-audio-amplifier";
21 sound-name-prefix = "AU2";
22 VCC-supply = <&hdmi_5v>;
23 enable-gpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>;
26 spdif_dit: audio-codec-0 {
27 #sound-dai-cells = <0>;
28 compatible = "linux,spdif-dit";
30 sound-name-prefix = "DIT";
34 stdout-path = "serial0:115200n8";
38 device_type = "memory";
39 reg = <0x0 0x0 0x0 0x80000000>;
42 hdmi_5v: regulator-hdmi-5v {
43 compatible = "regulator-fixed";
45 regulator-name = "HDMI_5V";
46 regulator-min-microvolt = <5000000>;
47 regulator-max-microvolt = <5000000>;
49 gpio = <&gpio GPIOH_3 GPIO_ACTIVE_HIGH>;
54 vddio_ao18: regulator-vddio_ao18 {
55 compatible = "regulator-fixed";
56 regulator-name = "VDDIO_AO18";
57 regulator-min-microvolt = <1800000>;
58 regulator-max-microvolt = <1800000>;
61 vddio_boot: regulator-vddio_boot {
62 compatible = "regulator-fixed";
63 regulator-name = "VDDIO_BOOT";
64 regulator-min-microvolt = <1800000>;
65 regulator-max-microvolt = <1800000>;
68 vddao_3v3: regulator-vddao_3v3 {
69 compatible = "regulator-fixed";
70 regulator-name = "VDDAO_3V3";
71 regulator-min-microvolt = <3300000>;
72 regulator-max-microvolt = <3300000>;
75 vcc_3v3: regulator-vcc_3v3 {
76 compatible = "regulator-fixed";
77 regulator-name = "VCC_3V3";
78 regulator-min-microvolt = <3300000>;
79 regulator-max-microvolt = <3300000>;
82 emmc_pwrseq: emmc-pwrseq {
83 compatible = "mmc-pwrseq-emmc";
84 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
88 compatible = "pwm-clock";
90 clock-frequency = <32768>;
91 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
94 sdio_pwrseq: sdio-pwrseq {
95 compatible = "mmc-pwrseq-simple";
96 reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
98 clock-names = "ext_clock";
102 compatible = "composite-video-connector";
105 cvbs_connector_in: endpoint {
106 remote-endpoint = <&cvbs_vdac_out>;
112 compatible = "hdmi-connector";
116 hdmi_connector_in: endpoint {
117 remote-endpoint = <&hdmi_tx_tmds_out>;
123 compatible = "amlogic,gx-sound-card";
125 audio-aux-devs = <&dio2133>;
126 audio-widgets = "Line", "Lineout";
127 audio-routing = "AU2 INL", "ACODEC LOLP",
128 "AU2 INR", "ACODEC LORP",
129 "AU2 INL", "ACODEC LOLN",
130 "AU2 INR", "ACODEC LORN",
131 "Lineout", "AU2 OUTL",
132 "Lineout", "AU2 OUTR";
133 assigned-clocks = <&clkc CLKID_MPLL0>,
136 assigned-clock-parents = <0>, <0>, <0>;
137 assigned-clock-rates = <294912000>,
141 sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
145 sound-dai = <&aiu AIU_CPU CPU_SPDIF_FIFO>;
149 sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;
154 sound-dai = <&aiu AIU_HDMI CTRL_I2S>;
158 sound-dai = <&aiu AIU_ACODEC CTRL_I2S>;
163 sound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>;
166 sound-dai = <&spdif_dit>;
171 sound-dai = <&aiu AIU_HDMI CTRL_OUT>;
174 sound-dai = <&hdmi_tx>;
179 sound-dai = <&aiu AIU_ACODEC CTRL_OUT>;
182 sound-dai = <&acodec>;
189 AVDD-supply = <&vddio_ao18>;
195 pinctrl-0 = <&spdif_out_h_pins>;
196 pinctrl-names = "default";
202 pinctrl-0 = <&ao_cec_pins>;
203 pinctrl-names = "default";
204 hdmi-phandle = <&hdmi_tx>;
208 cvbs_vdac_out: endpoint {
209 remote-endpoint = <&cvbs_connector_in>;
219 pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
220 pinctrl-names = "default";
221 hdmi-supply = <&hdmi_5v>;
225 hdmi_tx_tmds_out: endpoint {
226 remote-endpoint = <&hdmi_connector_in>;
232 pinctrl-0 = <&remote_input_ao_pins>;
233 pinctrl-names = "default";
238 pinctrl-0 = <&pwm_e_pins>;
239 pinctrl-names = "default";
240 clocks = <&clkc CLKID_FCLK_DIV4>;
241 clock-names = "clkin0";
246 vref-supply = <&vddio_ao18>;
249 /* Wireless SDIO Module */
252 pinctrl-0 = <&sdio_pins>;
253 pinctrl-1 = <&sdio_clk_gate_pins>;
254 pinctrl-names = "default", "clk-gate";
255 #address-cells = <1>;
260 max-frequency = <50000000>;
265 /* WiFi firmware requires power to be kept while in suspend */
266 keep-power-in-suspend;
268 mmc-pwrseq = <&sdio_pwrseq>;
270 vmmc-supply = <&vddao_3v3>;
271 vqmmc-supply = <&vddio_boot>;
277 pinctrl-0 = <&sdcard_pins>;
278 pinctrl-1 = <&sdcard_clk_gate_pins>;
279 pinctrl-names = "default", "clk-gate";
283 max-frequency = <50000000>;
286 cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
288 vmmc-supply = <&vddao_3v3>;
289 vqmmc-supply = <&vddio_boot>;
295 pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
296 pinctrl-1 = <&emmc_clk_gate_pins>;
297 pinctrl-names = "default", "clk-gate";
301 max-frequency = <200000000>;
307 mmc-pwrseq = <&emmc_pwrseq>;
308 vmmc-supply = <&vcc_3v3>;
309 vqmmc-supply = <&vddio_boot>;
312 /* This UART is brought out to the DB9 connector */
315 pinctrl-0 = <&uart_ao_a_pins>;
316 pinctrl-names = "default";