xref: /linux/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi (revision e9f0878c4b2004ac19581274c1ae4c61ae3ca70e)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2016 Endless Computers, Inc.
4 * Author: Carlo Caione <carlo@endlessm.com>
5 */
6
7/* Common DTSI for same Amlogic Q200/Q201 and P230/P231 boards using either
8 * the pin-compatible S912 (GXM) or S905D (GXL) SoCs.
9 */
10
11/ {
12	aliases {
13		serial0 = &uart_AO;
14		ethernet0 = &ethmac;
15	};
16
17	chosen {
18		stdout-path = "serial0:115200n8";
19	};
20
21	memory@0 {
22		device_type = "memory";
23		reg = <0x0 0x0 0x0 0x80000000>;
24	};
25
26	hdmi_5v: regulator-hdmi-5v {
27		compatible = "regulator-fixed";
28
29		regulator-name = "HDMI_5V";
30		regulator-min-microvolt = <5000000>;
31		regulator-max-microvolt = <5000000>;
32
33		gpio = <&gpio GPIOH_3 GPIO_ACTIVE_HIGH>;
34		enable-active-high;
35		regulator-always-on;
36	};
37
38	vddio_ao18: regulator-vddio_ao18 {
39		compatible = "regulator-fixed";
40		regulator-name = "VDDIO_AO18";
41		regulator-min-microvolt = <1800000>;
42		regulator-max-microvolt = <1800000>;
43	};
44
45	vddio_boot: regulator-vddio_boot {
46		compatible = "regulator-fixed";
47		regulator-name = "VDDIO_BOOT";
48		regulator-min-microvolt = <1800000>;
49		regulator-max-microvolt = <1800000>;
50	};
51
52	vddao_3v3: regulator-vddao_3v3 {
53		compatible = "regulator-fixed";
54		regulator-name = "VDDAO_3V3";
55		regulator-min-microvolt = <3300000>;
56		regulator-max-microvolt = <3300000>;
57	};
58
59	vcc_3v3: regulator-vcc_3v3 {
60		compatible = "regulator-fixed";
61		regulator-name = "VCC_3V3";
62		regulator-min-microvolt = <3300000>;
63		regulator-max-microvolt = <3300000>;
64	};
65
66	emmc_pwrseq: emmc-pwrseq {
67		compatible = "mmc-pwrseq-emmc";
68		reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
69	};
70
71	wifi32k: wifi32k {
72		compatible = "pwm-clock";
73		#clock-cells = <0>;
74		clock-frequency = <32768>;
75		pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
76	};
77
78	sdio_pwrseq: sdio-pwrseq {
79		compatible = "mmc-pwrseq-simple";
80		reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
81		clocks = <&wifi32k>;
82		clock-names = "ext_clock";
83	};
84
85	cvbs-connector {
86		compatible = "composite-video-connector";
87
88		port {
89			cvbs_connector_in: endpoint {
90				remote-endpoint = <&cvbs_vdac_out>;
91			};
92		};
93	};
94
95	hdmi-connector {
96		compatible = "hdmi-connector";
97		type = "a";
98
99		port {
100			hdmi_connector_in: endpoint {
101				remote-endpoint = <&hdmi_tx_tmds_out>;
102			};
103		};
104	};
105};
106
107&cec_AO {
108	status = "okay";
109	pinctrl-0 = <&ao_cec_pins>;
110	pinctrl-names = "default";
111	hdmi-phandle = <&hdmi_tx>;
112};
113
114&cvbs_vdac_port {
115	cvbs_vdac_out: endpoint {
116		remote-endpoint = <&cvbs_connector_in>;
117	};
118};
119
120&ethmac {
121	status = "okay";
122};
123
124&hdmi_tx {
125	status = "okay";
126	pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
127	pinctrl-names = "default";
128};
129
130&hdmi_tx_tmds_port {
131	hdmi_tx_tmds_out: endpoint {
132		remote-endpoint = <&hdmi_connector_in>;
133	};
134};
135
136&ir {
137	status = "okay";
138	pinctrl-0 = <&remote_input_ao_pins>;
139	pinctrl-names = "default";
140};
141
142&pwm_ef {
143	status = "okay";
144	pinctrl-0 = <&pwm_e_pins>;
145	pinctrl-names = "default";
146	clocks = <&clkc CLKID_FCLK_DIV4>;
147	clock-names = "clkin0";
148};
149
150&saradc {
151	status = "okay";
152	vref-supply = <&vddio_ao18>;
153};
154
155/* Wireless SDIO Module */
156&sd_emmc_a {
157	status = "okay";
158	pinctrl-0 = <&sdio_pins>;
159	pinctrl-1 = <&sdio_clk_gate_pins>;
160	pinctrl-names = "default", "clk-gate";
161	#address-cells = <1>;
162	#size-cells = <0>;
163
164	bus-width = <4>;
165	cap-sd-highspeed;
166	max-frequency = <100000000>;
167
168	non-removable;
169	disable-wp;
170
171	mmc-pwrseq = <&sdio_pwrseq>;
172
173	vmmc-supply = <&vddao_3v3>;
174	vqmmc-supply = <&vddio_boot>;
175};
176
177/* SD card */
178&sd_emmc_b {
179	status = "okay";
180	pinctrl-0 = <&sdcard_pins>;
181	pinctrl-1 = <&sdcard_clk_gate_pins>;
182	pinctrl-names = "default", "clk-gate";
183
184	bus-width = <4>;
185	cap-sd-highspeed;
186	max-frequency = <100000000>;
187	disable-wp;
188
189	cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
190	cd-inverted;
191
192	vmmc-supply = <&vddao_3v3>;
193	vqmmc-supply = <&vddio_boot>;
194};
195
196/* eMMC */
197&sd_emmc_c {
198	status = "okay";
199	pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
200	pinctrl-1 = <&emmc_clk_gate_pins>;
201	pinctrl-names = "default", "clk-gate";
202
203	bus-width = <8>;
204	cap-mmc-highspeed;
205	max-frequency = <200000000>;
206	non-removable;
207	disable-wp;
208	mmc-ddr-1_8v;
209	mmc-hs200-1_8v;
210
211	mmc-pwrseq = <&emmc_pwrseq>;
212	vmmc-supply = <&vcc_3v3>;
213	vqmmc-supply = <&vddio_boot>;
214};
215
216/* This UART is brought out to the DB9 connector */
217&uart_AO {
218	status = "okay";
219	pinctrl-0 = <&uart_ao_a_pins>;
220	pinctrl-names = "default";
221};
222
223&usb0 {
224	status = "okay";
225};
226