1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2018 BayLibre, SAS.
4 * Author: Neil Armstrong <narmstrong@baylibre.com>
5 * Author: Jerome Brunet <jbrunet@baylibre.com>
6 */
7
8/dts-v1/;
9
10#include <dt-bindings/input/input.h>
11
12#include "meson-gxl-s905x.dtsi"
13
14/ {
15	compatible = "amlogic,p241", "amlogic,s805x", "amlogic,meson-gxl";
16	model = "Amlogic Meson GXL (S805X) P241 Development Board";
17
18	aliases {
19		serial0 = &uart_AO;
20		serial1 = &uart_A;
21		ethernet0 = &ethmac;
22	};
23
24	chosen {
25		stdout-path = "serial0:115200n8";
26	};
27
28	cvbs-connector {
29		compatible = "composite-video-connector";
30
31		port {
32			cvbs_connector_in: endpoint {
33				remote-endpoint = <&cvbs_vdac_out>;
34			};
35		};
36	};
37
38	emmc_pwrseq: emmc-pwrseq {
39		compatible = "mmc-pwrseq-emmc";
40		reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
41	};
42
43	hdmi-connector {
44		compatible = "hdmi-connector";
45		type = "a";
46
47		port {
48			hdmi_connector_in: endpoint {
49				remote-endpoint = <&hdmi_tx_tmds_out>;
50			};
51		};
52	};
53
54	memory@0 {
55		device_type = "memory";
56		reg = <0x0 0x0 0x0 0x20000000>;
57	};
58
59	vddio_boot: regulator-vddio_boot {
60		compatible = "regulator-fixed";
61		regulator-name = "VDDIO_BOOT";
62		regulator-min-microvolt = <1800000>;
63		regulator-max-microvolt = <1800000>;
64	};
65
66	vddao_3v3: regulator-vddao_3v3 {
67		compatible = "regulator-fixed";
68		regulator-name = "VDDAO_3V3";
69		regulator-min-microvolt = <3300000>;
70		regulator-max-microvolt = <3300000>;
71	};
72
73	vddio_ao18: regulator-vddio_ao18 {
74		compatible = "regulator-fixed";
75		regulator-name = "VDDIO_AO18";
76		regulator-min-microvolt = <1800000>;
77		regulator-max-microvolt = <1800000>;
78	};
79
80	vcc_3v3: regulator-vcc_3v3 {
81		compatible = "regulator-fixed";
82		regulator-name = "VCC_3V3";
83		regulator-min-microvolt = <3300000>;
84		regulator-max-microvolt = <3300000>;
85	};
86
87	emmc_pwrseq: emmc-pwrseq {
88		compatible = "mmc-pwrseq-emmc";
89		reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
90	};
91
92	wifi32k: wifi32k {
93		compatible = "pwm-clock";
94		#clock-cells = <0>;
95		clock-frequency = <32768>;
96		pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
97	};
98
99	sdio_pwrseq: sdio-pwrseq {
100		compatible = "mmc-pwrseq-simple";
101		reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
102		clocks = <&wifi32k>;
103		clock-names = "ext_clock";
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&internal_phy {
125	pinctrl-0 = <&eth_link_led_pins>, <&eth_act_led_pins>;
126	pinctrl-names = "default";
127};
128
129&ir {
130	status = "okay";
131	pinctrl-0 = <&remote_input_ao_pins>;
132	pinctrl-names = "default";
133};
134
135&hdmi_tx {
136	status = "okay";
137	pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
138	pinctrl-names = "default";
139};
140
141&hdmi_tx_tmds_port {
142	hdmi_tx_tmds_out: endpoint {
143		remote-endpoint = <&hdmi_connector_in>;
144	};
145};
146
147&saradc {
148	status = "okay";
149	vref-supply = <&vddio_ao18>;
150};
151
152/* Wireless SDIO Module */
153&sd_emmc_a {
154	status = "okay";
155	pinctrl-0 = <&sdio_pins>;
156	pinctrl-1 = <&sdio_clk_gate_pins>;
157	pinctrl-names = "default", "clk-gate";
158	#address-cells = <1>;
159	#size-cells = <0>;
160
161	bus-width = <4>;
162	cap-sd-highspeed;
163	max-frequency = <100000000>;
164
165	non-removable;
166	disable-wp;
167
168	mmc-pwrseq = <&sdio_pwrseq>;
169
170	vmmc-supply = <&vddao_3v3>;
171	vqmmc-supply = <&vddio_boot>;
172};
173
174/* eMMC */
175&sd_emmc_c {
176	status = "okay";
177	pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
178	pinctrl-1 = <&emmc_clk_gate_pins>;
179	pinctrl-names = "default", "clk-gate";
180
181	bus-width = <8>;
182	cap-mmc-highspeed;
183	max-frequency = <200000000>;
184	non-removable;
185	disable-wp;
186	mmc-ddr-1_8v;
187	mmc-hs200-1_8v;
188
189	mmc-pwrseq = <&emmc_pwrseq>;
190	vmmc-supply = <&vcc_3v3>;
191	vqmmc-supply = <&vddio_boot>;
192};
193
194&pwm_ef {
195	status = "okay";
196	pinctrl-0 = <&pwm_e_pins>;
197	pinctrl-names = "default";
198	clocks = <&clkc CLKID_FCLK_DIV4>;
199	clock-names = "clkin0";
200};
201
202/* This is connected to the Bluetooth module: */
203&uart_A {
204	status = "okay";
205	pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
206	pinctrl-names = "default";
207	uart-has-rtscts;
208};
209
210&uart_AO {
211	status = "okay";
212	pinctrl-0 = <&uart_ao_a_pins>;
213	pinctrl-names = "default";
214};
215
216&usb0 {
217	status = "okay";
218};
219