xref: /openbmc/linux/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi (revision c900529f3d9161bfde5cca0754f83b4d3c3e0220)
1114abfe1SNeil Armstrong// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2bb51b535SNeil Armstrong/*
3bb51b535SNeil Armstrong * Copyright (c) 2016 Endless Computers, Inc.
4bb51b535SNeil Armstrong * Author: Carlo Caione <carlo@endlessm.com>
5bb51b535SNeil Armstrong */
6bb51b535SNeil Armstrong
7bb51b535SNeil Armstrong/* Common DTSI for same Amlogic Q200/Q201 and P230/P231 boards using either
8bb51b535SNeil Armstrong * the pin-compatible S912 (GXM) or S905D (GXL) SoCs.
9bb51b535SNeil Armstrong */
10bb51b535SNeil Armstrong
113ffeb953SJerome Brunet#include <dt-bindings/sound/meson-aiu.h>
123ffeb953SJerome Brunet
13bb51b535SNeil Armstrong/ {
14bb51b535SNeil Armstrong	aliases {
15bb51b535SNeil Armstrong		serial0 = &uart_AO;
16059a58fcSJorge Ramirez-Ortiz		ethernet0 = &ethmac;
17bb51b535SNeil Armstrong	};
18bb51b535SNeil Armstrong
19f3c35382SJerome Brunet	dio2133: analog-amplifier {
20f3c35382SJerome Brunet		compatible = "simple-audio-amplifier";
21f3c35382SJerome Brunet		sound-name-prefix = "AU2";
22f3c35382SJerome Brunet		VCC-supply = <&hdmi_5v>;
23f3c35382SJerome Brunet		enable-gpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>;
24f3c35382SJerome Brunet	};
25f3c35382SJerome Brunet
263ffeb953SJerome Brunet	spdif_dit: audio-codec-0 {
273ffeb953SJerome Brunet		#sound-dai-cells = <0>;
283ffeb953SJerome Brunet		compatible = "linux,spdif-dit";
293ffeb953SJerome Brunet		status = "okay";
303ffeb953SJerome Brunet		sound-name-prefix = "DIT";
313ffeb953SJerome Brunet	};
323ffeb953SJerome Brunet
33bb51b535SNeil Armstrong	chosen {
34bb51b535SNeil Armstrong		stdout-path = "serial0:115200n8";
35bb51b535SNeil Armstrong	};
36bb51b535SNeil Armstrong
37bb51b535SNeil Armstrong	memory@0 {
38bb51b535SNeil Armstrong		device_type = "memory";
39bb51b535SNeil Armstrong		reg = <0x0 0x0 0x0 0x80000000>;
40bb51b535SNeil Armstrong	};
41bb51b535SNeil Armstrong
42b409f625SNeil Armstrong	hdmi_5v: regulator-hdmi-5v {
43b409f625SNeil Armstrong		compatible = "regulator-fixed";
44b409f625SNeil Armstrong
45b409f625SNeil Armstrong		regulator-name = "HDMI_5V";
46b409f625SNeil Armstrong		regulator-min-microvolt = <5000000>;
47b409f625SNeil Armstrong		regulator-max-microvolt = <5000000>;
48b409f625SNeil Armstrong
49b409f625SNeil Armstrong		gpio = <&gpio GPIOH_3 GPIO_ACTIVE_HIGH>;
50b409f625SNeil Armstrong		enable-active-high;
51b409f625SNeil Armstrong		regulator-always-on;
52b409f625SNeil Armstrong	};
53b409f625SNeil Armstrong
5441ed2e0dSMartin Blumenstingl	vddio_ao18: regulator-vddio_ao18 {
5541ed2e0dSMartin Blumenstingl		compatible = "regulator-fixed";
5641ed2e0dSMartin Blumenstingl		regulator-name = "VDDIO_AO18";
5741ed2e0dSMartin Blumenstingl		regulator-min-microvolt = <1800000>;
5841ed2e0dSMartin Blumenstingl		regulator-max-microvolt = <1800000>;
5941ed2e0dSMartin Blumenstingl	};
6041ed2e0dSMartin Blumenstingl
61bb51b535SNeil Armstrong	vddio_boot: regulator-vddio_boot {
62bb51b535SNeil Armstrong		compatible = "regulator-fixed";
63bb51b535SNeil Armstrong		regulator-name = "VDDIO_BOOT";
64bb51b535SNeil Armstrong		regulator-min-microvolt = <1800000>;
65bb51b535SNeil Armstrong		regulator-max-microvolt = <1800000>;
66bb51b535SNeil Armstrong	};
67bb51b535SNeil Armstrong
68bb51b535SNeil Armstrong	vddao_3v3: regulator-vddao_3v3 {
69bb51b535SNeil Armstrong		compatible = "regulator-fixed";
70bb51b535SNeil Armstrong		regulator-name = "VDDAO_3V3";
71bb51b535SNeil Armstrong		regulator-min-microvolt = <3300000>;
72bb51b535SNeil Armstrong		regulator-max-microvolt = <3300000>;
73bb51b535SNeil Armstrong	};
74bb51b535SNeil Armstrong
75bb51b535SNeil Armstrong	vcc_3v3: regulator-vcc_3v3 {
76bb51b535SNeil Armstrong		compatible = "regulator-fixed";
77bb51b535SNeil Armstrong		regulator-name = "VCC_3V3";
78bb51b535SNeil Armstrong		regulator-min-microvolt = <3300000>;
79bb51b535SNeil Armstrong		regulator-max-microvolt = <3300000>;
80bb51b535SNeil Armstrong	};
81bb51b535SNeil Armstrong
82bb51b535SNeil Armstrong	emmc_pwrseq: emmc-pwrseq {
83bb51b535SNeil Armstrong		compatible = "mmc-pwrseq-emmc";
84bb51b535SNeil Armstrong		reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
85bb51b535SNeil Armstrong	};
86bb51b535SNeil Armstrong
87bb51b535SNeil Armstrong	wifi32k: wifi32k {
88bb51b535SNeil Armstrong		compatible = "pwm-clock";
89bb51b535SNeil Armstrong		#clock-cells = <0>;
90bb51b535SNeil Armstrong		clock-frequency = <32768>;
91bb51b535SNeil Armstrong		pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
92bb51b535SNeil Armstrong	};
93bb51b535SNeil Armstrong
94bb51b535SNeil Armstrong	sdio_pwrseq: sdio-pwrseq {
95bb51b535SNeil Armstrong		compatible = "mmc-pwrseq-simple";
96bb51b535SNeil Armstrong		reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
97bb51b535SNeil Armstrong		clocks = <&wifi32k>;
98bb51b535SNeil Armstrong		clock-names = "ext_clock";
99bb51b535SNeil Armstrong	};
1006939db7eSNeil Armstrong
1016939db7eSNeil Armstrong	cvbs-connector {
1026939db7eSNeil Armstrong		compatible = "composite-video-connector";
1036939db7eSNeil Armstrong
1046939db7eSNeil Armstrong		port {
1056939db7eSNeil Armstrong			cvbs_connector_in: endpoint {
1066939db7eSNeil Armstrong				remote-endpoint = <&cvbs_vdac_out>;
1076939db7eSNeil Armstrong			};
1086939db7eSNeil Armstrong		};
1096939db7eSNeil Armstrong	};
1106939db7eSNeil Armstrong
1116939db7eSNeil Armstrong	hdmi-connector {
1126939db7eSNeil Armstrong		compatible = "hdmi-connector";
1136939db7eSNeil Armstrong		type = "a";
1146939db7eSNeil Armstrong
1156939db7eSNeil Armstrong		port {
1166939db7eSNeil Armstrong			hdmi_connector_in: endpoint {
1176939db7eSNeil Armstrong				remote-endpoint = <&hdmi_tx_tmds_out>;
1186939db7eSNeil Armstrong			};
1196939db7eSNeil Armstrong		};
1206939db7eSNeil Armstrong	};
1213ffeb953SJerome Brunet
1223ffeb953SJerome Brunet	sound {
1233ffeb953SJerome Brunet		compatible = "amlogic,gx-sound-card";
124*933b80edSChristian Hewitt		model = "P230-Q200";
125f3c35382SJerome Brunet		audio-aux-devs = <&dio2133>;
126f3c35382SJerome Brunet		audio-widgets = "Line", "Lineout";
127f3c35382SJerome Brunet		audio-routing = "AU2 INL", "ACODEC LOLP",
128f3c35382SJerome Brunet				"AU2 INR", "ACODEC LORP",
129f3c35382SJerome Brunet				"AU2 INL", "ACODEC LOLN",
130f3c35382SJerome Brunet				"AU2 INR", "ACODEC LORN",
131f3c35382SJerome Brunet				"Lineout", "AU2 OUTL",
132f3c35382SJerome Brunet				"Lineout", "AU2 OUTR";
1333ffeb953SJerome Brunet		assigned-clocks = <&clkc CLKID_MPLL0>,
1343ffeb953SJerome Brunet				  <&clkc CLKID_MPLL1>,
1353ffeb953SJerome Brunet				  <&clkc CLKID_MPLL2>;
1363ffeb953SJerome Brunet		assigned-clock-parents = <0>, <0>, <0>;
1373ffeb953SJerome Brunet		assigned-clock-rates = <294912000>,
1383ffeb953SJerome Brunet				       <270950400>,
1393ffeb953SJerome Brunet				       <393216000>;
1403ffeb953SJerome Brunet		dai-link-0 {
1413ffeb953SJerome Brunet			sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
1423ffeb953SJerome Brunet		};
1433ffeb953SJerome Brunet
1443ffeb953SJerome Brunet		dai-link-1 {
1453ffeb953SJerome Brunet			sound-dai = <&aiu AIU_CPU CPU_SPDIF_FIFO>;
1463ffeb953SJerome Brunet		};
1473ffeb953SJerome Brunet
1483ffeb953SJerome Brunet		dai-link-2 {
1493ffeb953SJerome Brunet			sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;
1503ffeb953SJerome Brunet			dai-format = "i2s";
1513ffeb953SJerome Brunet			mclk-fs = <256>;
1523ffeb953SJerome Brunet
1533ffeb953SJerome Brunet			codec-0 {
1543ffeb953SJerome Brunet				sound-dai = <&aiu AIU_HDMI CTRL_I2S>;
1553ffeb953SJerome Brunet			};
156f3c35382SJerome Brunet
157f3c35382SJerome Brunet			codec-1 {
158f3c35382SJerome Brunet				sound-dai = <&aiu AIU_ACODEC CTRL_I2S>;
159f3c35382SJerome Brunet			};
1603ffeb953SJerome Brunet		};
1613ffeb953SJerome Brunet
1623ffeb953SJerome Brunet		dai-link-3 {
1633ffeb953SJerome Brunet			sound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>;
1643ffeb953SJerome Brunet
1653ffeb953SJerome Brunet			codec-0 {
1663ffeb953SJerome Brunet				sound-dai = <&spdif_dit>;
1673ffeb953SJerome Brunet			};
1683ffeb953SJerome Brunet		};
1693ffeb953SJerome Brunet
1703ffeb953SJerome Brunet		dai-link-4 {
1713ffeb953SJerome Brunet			sound-dai = <&aiu AIU_HDMI CTRL_OUT>;
1723ffeb953SJerome Brunet
1733ffeb953SJerome Brunet			codec-0 {
1743ffeb953SJerome Brunet				sound-dai = <&hdmi_tx>;
1753ffeb953SJerome Brunet			};
1763ffeb953SJerome Brunet		};
177f3c35382SJerome Brunet
178f3c35382SJerome Brunet		dai-link-5 {
179f3c35382SJerome Brunet			sound-dai = <&aiu AIU_ACODEC CTRL_OUT>;
180f3c35382SJerome Brunet
181f3c35382SJerome Brunet			codec-0 {
182f3c35382SJerome Brunet				sound-dai = <&acodec>;
1833ffeb953SJerome Brunet			};
1843ffeb953SJerome Brunet		};
185f3c35382SJerome Brunet	};
186f3c35382SJerome Brunet};
187f3c35382SJerome Brunet
188f3c35382SJerome Brunet&acodec {
189f3c35382SJerome Brunet	AVDD-supply = <&vddio_ao18>;
190f3c35382SJerome Brunet	status = "okay";
191f3c35382SJerome Brunet};
1923ffeb953SJerome Brunet
1933ffeb953SJerome Brunet&aiu {
1943ffeb953SJerome Brunet	status = "okay";
1953ffeb953SJerome Brunet	pinctrl-0 = <&spdif_out_h_pins>;
1963ffeb953SJerome Brunet	pinctrl-names = "default";
1973ffeb953SJerome Brunet
198bb51b535SNeil Armstrong};
199bb51b535SNeil Armstrong
200b16c71c9SNeil Armstrong&cec_AO {
201b16c71c9SNeil Armstrong	status = "okay";
202b16c71c9SNeil Armstrong	pinctrl-0 = <&ao_cec_pins>;
203b16c71c9SNeil Armstrong	pinctrl-names = "default";
204b16c71c9SNeil Armstrong	hdmi-phandle = <&hdmi_tx>;
205b16c71c9SNeil Armstrong};
206b16c71c9SNeil Armstrong
207d5463d25SAndreas Färber&cvbs_vdac_port {
208d5463d25SAndreas Färber	cvbs_vdac_out: endpoint {
209d5463d25SAndreas Färber		remote-endpoint = <&cvbs_connector_in>;
210d5463d25SAndreas Färber	};
211d5463d25SAndreas Färber};
212d5463d25SAndreas Färber
213d5463d25SAndreas Färber&ethmac {
214bb51b535SNeil Armstrong	status = "okay";
215d5463d25SAndreas Färber};
216d5463d25SAndreas Färber
217d5463d25SAndreas Färber&hdmi_tx {
218d5463d25SAndreas Färber	status = "okay";
219d5463d25SAndreas Färber	pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
220bb51b535SNeil Armstrong	pinctrl-names = "default";
221e1f2163dSNeil Armstrong	hdmi-supply = <&hdmi_5v>;
222bb51b535SNeil Armstrong};
223bb51b535SNeil Armstrong
224d5463d25SAndreas Färber&hdmi_tx_tmds_port {
225d5463d25SAndreas Färber	hdmi_tx_tmds_out: endpoint {
226d5463d25SAndreas Färber		remote-endpoint = <&hdmi_connector_in>;
227d5463d25SAndreas Färber	};
228d5463d25SAndreas Färber};
229d5463d25SAndreas Färber
230bb51b535SNeil Armstrong&ir {
231bb51b535SNeil Armstrong	status = "okay";
232bb51b535SNeil Armstrong	pinctrl-0 = <&remote_input_ao_pins>;
233bb51b535SNeil Armstrong	pinctrl-names = "default";
234bb51b535SNeil Armstrong};
235bb51b535SNeil Armstrong
236d5463d25SAndreas Färber&pwm_ef {
237d5463d25SAndreas Färber	status = "okay";
238d5463d25SAndreas Färber	pinctrl-0 = <&pwm_e_pins>;
239d5463d25SAndreas Färber	pinctrl-names = "default";
240d5463d25SAndreas Färber	clocks = <&clkc CLKID_FCLK_DIV4>;
241d5463d25SAndreas Färber	clock-names = "clkin0";
242d5463d25SAndreas Färber};
243d5463d25SAndreas Färber
24441ed2e0dSMartin Blumenstingl&saradc {
24541ed2e0dSMartin Blumenstingl	status = "okay";
24641ed2e0dSMartin Blumenstingl	vref-supply = <&vddio_ao18>;
24741ed2e0dSMartin Blumenstingl};
24841ed2e0dSMartin Blumenstingl
249bb51b535SNeil Armstrong/* Wireless SDIO Module */
250bb51b535SNeil Armstrong&sd_emmc_a {
251bb51b535SNeil Armstrong	status = "okay";
252bb51b535SNeil Armstrong	pinctrl-0 = <&sdio_pins>;
25367e7607fSJerome Brunet	pinctrl-1 = <&sdio_clk_gate_pins>;
25467e7607fSJerome Brunet	pinctrl-names = "default", "clk-gate";
255bb51b535SNeil Armstrong	#address-cells = <1>;
256bb51b535SNeil Armstrong	#size-cells = <0>;
257bb51b535SNeil Armstrong
258bb51b535SNeil Armstrong	bus-width = <4>;
259bb51b535SNeil Armstrong	cap-sd-highspeed;
260adc52bf7SJerome Brunet	max-frequency = <50000000>;
261bb51b535SNeil Armstrong
262bb51b535SNeil Armstrong	non-removable;
263bb51b535SNeil Armstrong	disable-wp;
264bb51b535SNeil Armstrong
26586b8eaa2SNeil Armstrong	/* WiFi firmware requires power to be kept while in suspend */
26686b8eaa2SNeil Armstrong	keep-power-in-suspend;
26786b8eaa2SNeil Armstrong
268bb51b535SNeil Armstrong	mmc-pwrseq = <&sdio_pwrseq>;
269bb51b535SNeil Armstrong
270bb51b535SNeil Armstrong	vmmc-supply = <&vddao_3v3>;
271bb51b535SNeil Armstrong	vqmmc-supply = <&vddio_boot>;
272bb51b535SNeil Armstrong};
273bb51b535SNeil Armstrong
274bb51b535SNeil Armstrong/* SD card */
275bb51b535SNeil Armstrong&sd_emmc_b {
276bb51b535SNeil Armstrong	status = "okay";
277bb51b535SNeil Armstrong	pinctrl-0 = <&sdcard_pins>;
27867e7607fSJerome Brunet	pinctrl-1 = <&sdcard_clk_gate_pins>;
27967e7607fSJerome Brunet	pinctrl-names = "default", "clk-gate";
280bb51b535SNeil Armstrong
281bb51b535SNeil Armstrong	bus-width = <4>;
282bb51b535SNeil Armstrong	cap-sd-highspeed;
283adc52bf7SJerome Brunet	max-frequency = <50000000>;
284bb51b535SNeil Armstrong	disable-wp;
285bb51b535SNeil Armstrong
286f29200c8SLoys Ollivier	cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
287bb51b535SNeil Armstrong
288bb51b535SNeil Armstrong	vmmc-supply = <&vddao_3v3>;
289bb51b535SNeil Armstrong	vqmmc-supply = <&vddio_boot>;
290bb51b535SNeil Armstrong};
291bb51b535SNeil Armstrong
292bb51b535SNeil Armstrong/* eMMC */
293bb51b535SNeil Armstrong&sd_emmc_c {
294bb51b535SNeil Armstrong	status = "okay";
295ab36be66SNeil Armstrong	pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
29667e7607fSJerome Brunet	pinctrl-1 = <&emmc_clk_gate_pins>;
29767e7607fSJerome Brunet	pinctrl-names = "default", "clk-gate";
298bb51b535SNeil Armstrong
299bb51b535SNeil Armstrong	bus-width = <8>;
300bb51b535SNeil Armstrong	cap-mmc-highspeed;
301bb51b535SNeil Armstrong	max-frequency = <200000000>;
302bb51b535SNeil Armstrong	non-removable;
303bb51b535SNeil Armstrong	disable-wp;
304bb51b535SNeil Armstrong	mmc-ddr-1_8v;
305bb51b535SNeil Armstrong	mmc-hs200-1_8v;
306bb51b535SNeil Armstrong
307bb51b535SNeil Armstrong	mmc-pwrseq = <&emmc_pwrseq>;
308bb51b535SNeil Armstrong	vmmc-supply = <&vcc_3v3>;
309bb51b535SNeil Armstrong	vqmmc-supply = <&vddio_boot>;
310bb51b535SNeil Armstrong};
311bb51b535SNeil Armstrong
312d5463d25SAndreas Färber/* This UART is brought out to the DB9 connector */
313d5463d25SAndreas Färber&uart_AO {
314bb51b535SNeil Armstrong	status = "okay";
315d5463d25SAndreas Färber	pinctrl-0 = <&uart_ao_a_pins>;
316bb51b535SNeil Armstrong	pinctrl-names = "default";
3176939db7eSNeil Armstrong};
318972cd12aSMartin Blumenstingl
3192f9139c2SMartin Blumenstingl&usb {
320972cd12aSMartin Blumenstingl	status = "okay";
3212f9139c2SMartin Blumenstingl	dr_mode = "otg";
322972cd12aSMartin Blumenstingl};
323