1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2018 Amlogic, Inc. All rights reserved.
4 */
5
6/dts-v1/;
7
8#include "meson-g12a.dtsi"
9#include <dt-bindings/gpio/gpio.h>
10#include <dt-bindings/gpio/meson-g12a-gpio.h>
11
12/ {
13	compatible = "amlogic,u200", "amlogic,g12a";
14	model = "Amlogic Meson G12A U200 Development Board";
15
16	aliases {
17		serial0 = &uart_AO;
18	};
19
20	chosen {
21		stdout-path = "serial0:115200n8";
22	};
23
24	cvbs-connector {
25		compatible = "composite-video-connector";
26
27		port {
28			cvbs_connector_in: endpoint {
29				remote-endpoint = <&cvbs_vdac_out>;
30			};
31		};
32	};
33
34	emmc_pwrseq: emmc-pwrseq {
35		compatible = "mmc-pwrseq-emmc";
36		reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
37	};
38
39	hdmi-connector {
40		compatible = "hdmi-connector";
41		type = "a";
42
43		port {
44			hdmi_connector_in: endpoint {
45				remote-endpoint = <&hdmi_tx_tmds_out>;
46			};
47		};
48	};
49
50	memory@0 {
51		device_type = "memory";
52		reg = <0x0 0x0 0x0 0x40000000>;
53	};
54
55	flash_1v8: regulator-flash_1v8 {
56		compatible = "regulator-fixed";
57		regulator-name = "FLASH_1V8";
58		regulator-min-microvolt = <1800000>;
59		regulator-max-microvolt = <1800000>;
60		vin-supply = <&vcc_3v3>;
61		regulator-always-on;
62	};
63
64	main_12v: regulator-main_12v {
65		compatible = "regulator-fixed";
66		regulator-name = "12V";
67		regulator-min-microvolt = <12000000>;
68		regulator-max-microvolt = <12000000>;
69		regulator-always-on;
70	};
71
72	usb_pwr_en: regulator-usb_pwr_en {
73		compatible = "regulator-fixed";
74		regulator-name = "USB_PWR_EN";
75		regulator-min-microvolt = <5000000>;
76		regulator-max-microvolt = <5000000>;
77		vin-supply = <&vcc_5v>;
78
79		gpio = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>;
80		enable-active-high;
81	};
82
83	vcc_1v8: regulator-vcc_1v8 {
84		compatible = "regulator-fixed";
85		regulator-name = "VCC_1V8";
86		regulator-min-microvolt = <1800000>;
87		regulator-max-microvolt = <1800000>;
88		vin-supply = <&vcc_3v3>;
89		regulator-always-on;
90	};
91
92	vcc_3v3: regulator-vcc_3v3 {
93		compatible = "regulator-fixed";
94		regulator-name = "VCC_3V3";
95		regulator-min-microvolt = <3300000>;
96		regulator-max-microvolt = <3300000>;
97		vin-supply = <&vddao_3v3>;
98		regulator-always-on;
99		/* FIXME: actually controlled by VDDCPU_B_EN */
100	};
101
102	vcc_5v: regulator-vcc_5v {
103		compatible = "regulator-fixed";
104		regulator-name = "VCC_5V";
105		regulator-min-microvolt = <5000000>;
106		regulator-max-microvolt = <5000000>;
107		vin-supply = <&main_12v>;
108
109		gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>;
110		enable-active-high;
111	};
112
113	vddao_1v8: regulator-vddao_1v8 {
114		compatible = "regulator-fixed";
115		regulator-name = "VDDAO_1V8";
116		regulator-min-microvolt = <1800000>;
117		regulator-max-microvolt = <1800000>;
118		vin-supply = <&vddao_3v3>;
119		regulator-always-on;
120	};
121
122	vddao_3v3: regulator-vddao_3v3 {
123		compatible = "regulator-fixed";
124		regulator-name = "VDDAO_3V3";
125		regulator-min-microvolt = <3300000>;
126		regulator-max-microvolt = <3300000>;
127		vin-supply = <&main_12v>;
128		regulator-always-on;
129	};
130
131};
132
133&cec_AO {
134	pinctrl-0 = <&cec_ao_a_h_pins>;
135	pinctrl-names = "default";
136	status = "disabled";
137	hdmi-phandle = <&hdmi_tx>;
138};
139
140&cecb_AO {
141	pinctrl-0 = <&cec_ao_b_h_pins>;
142	pinctrl-names = "default";
143	status = "okay";
144	hdmi-phandle = <&hdmi_tx>;
145};
146
147&cvbs_vdac_port {
148	cvbs_vdac_out: endpoint {
149		remote-endpoint = <&cvbs_connector_in>;
150	};
151};
152
153&hdmi_tx {
154	status = "okay";
155	pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
156	pinctrl-names = "default";
157	hdmi-supply = <&vcc_5v>;
158};
159
160&hdmi_tx_tmds_port {
161	hdmi_tx_tmds_out: endpoint {
162		remote-endpoint = <&hdmi_connector_in>;
163	};
164};
165
166&ir {
167	status = "okay";
168	pinctrl-0 = <&remote_input_ao_pins>;
169	pinctrl-names = "default";
170};
171
172/* i2c Touch */
173&i2c0 {
174	status = "okay";
175	pinctrl-0 = <&i2c0_sda_z0_pins>, <&i2c0_sck_z1_pins>;
176	pinctrl-names = "default";
177};
178
179/* i2c CM */
180&i2c2 {
181	status = "okay";
182	pinctrl-0 = <&i2c2_sda_z_pins>, <&i2c2_sck_z_pins>;
183	pinctrl-names = "default";
184};
185
186/* i2c Audio */
187&i2c3 {
188	status = "okay";
189	pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
190	pinctrl-names = "default";
191};
192
193/* SD card */
194&sd_emmc_b {
195	status = "okay";
196	pinctrl-0 = <&sdcard_c_pins>;
197	pinctrl-1 = <&sdcard_clk_gate_c_pins>;
198	pinctrl-names = "default", "clk-gate";
199
200	bus-width = <4>;
201	cap-sd-highspeed;
202	max-frequency = <50000000>;
203	disable-wp;
204
205	cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
206	vmmc-supply = <&vddao_3v3>;
207	vqmmc-supply = <&vddao_3v3>;
208};
209
210/* eMMC */
211&sd_emmc_c {
212	status = "okay";
213	pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
214	pinctrl-1 = <&emmc_clk_gate_pins>;
215	pinctrl-names = "default", "clk-gate";
216
217	bus-width = <8>;
218	cap-mmc-highspeed;
219	mmc-ddr-1_8v;
220	mmc-hs200-1_8v;
221	max-frequency = <200000000>;
222	non-removable;
223	disable-wp;
224
225	mmc-pwrseq = <&emmc_pwrseq>;
226	vmmc-supply = <&vcc_3v3>;
227	vqmmc-supply = <&flash_1v8>;
228};
229
230&uart_AO {
231	status = "okay";
232	pinctrl-0 = <&uart_ao_a_pins>;
233	pinctrl-names = "default";
234};
235
236&usb {
237	status = "okay";
238	vbus-supply = <&usb_pwr_en>;
239};
240
241&usb2_phy0 {
242	phy-supply = <&vcc_5v>;
243};
244
245&usb2_phy1 {
246	phy-supply = <&vcc_5v>;
247};
248