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/* SD card */
173&sd_emmc_b {
174	status = "okay";
175	pinctrl-0 = <&sdcard_c_pins>;
176	pinctrl-1 = <&sdcard_clk_gate_c_pins>;
177	pinctrl-names = "default", "clk-gate";
178
179	bus-width = <4>;
180	cap-sd-highspeed;
181	max-frequency = <50000000>;
182	disable-wp;
183
184	cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
185	vmmc-supply = <&vddao_3v3>;
186	vqmmc-supply = <&vddao_3v3>;
187};
188
189/* eMMC */
190&sd_emmc_c {
191	status = "okay";
192	pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
193	pinctrl-1 = <&emmc_clk_gate_pins>;
194	pinctrl-names = "default", "clk-gate";
195
196	bus-width = <8>;
197	cap-mmc-highspeed;
198	mmc-ddr-1_8v;
199	mmc-hs200-1_8v;
200	max-frequency = <200000000>;
201	non-removable;
202	disable-wp;
203
204	mmc-pwrseq = <&emmc_pwrseq>;
205	vmmc-supply = <&vcc_3v3>;
206	vqmmc-supply = <&flash_1v8>;
207};
208
209&uart_AO {
210	status = "okay";
211	pinctrl-0 = <&uart_ao_a_pins>;
212	pinctrl-names = "default";
213};
214
215&usb {
216	status = "okay";
217	vbus-supply = <&usb_pwr_en>;
218};
219
220&usb2_phy0 {
221	phy-supply = <&vcc_5v>;
222};
223
224&usb2_phy1 {
225	phy-supply = <&vcc_5v>;
226};
227