xref: /freebsd/sys/contrib/device-tree/src/arm64/amlogic/meson-gxm-nexbox-a1.dts (revision ebacd8013fe5f7fdf9f6a5b286f6680dd2891036)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2016 BayLibre, SAS.
4 * Author: Neil Armstrong <narmstrong@baylibre.com>
5 *
6 * Copyright (c) 2016 Endless Computers, Inc.
7 * Author: Carlo Caione <carlo@endlessm.com>
8 */
9
10/dts-v1/;
11
12#include "meson-gxm.dtsi"
13#include <dt-bindings/sound/meson-aiu.h>
14
15/ {
16	compatible = "nexbox,a1", "amlogic,s912", "amlogic,meson-gxm";
17	model = "NEXBOX A1";
18
19	aliases {
20		serial0 = &uart_AO;
21		ethernet0 = &ethmac;
22	};
23
24	chosen {
25		stdout-path = "serial0:115200n8";
26	};
27
28	spdif_dit: audio-codec-0 {
29		#sound-dai-cells = <0>;
30		compatible = "linux,spdif-dit";
31		status = "okay";
32		sound-name-prefix = "DIT";
33	};
34
35	memory@0 {
36		device_type = "memory";
37		reg = <0x0 0x0 0x0 0x80000000>;
38	};
39
40	vddio_boot: regulator-vddio-boot {
41		compatible = "regulator-fixed";
42		regulator-name = "VDDIO_BOOT";
43		regulator-min-microvolt = <1800000>;
44		regulator-max-microvolt = <1800000>;
45	};
46
47	vddao_3v3: regulator-vddao-3v3 {
48		compatible = "regulator-fixed";
49		regulator-name = "VDDAO_3V3";
50		regulator-min-microvolt = <3300000>;
51		regulator-max-microvolt = <3300000>;
52	};
53
54	vcc_3v3: regulator-vcc-3v3 {
55		compatible = "regulator-fixed";
56		regulator-name = "VCC_3V3";
57		regulator-min-microvolt = <3300000>;
58		regulator-max-microvolt = <3300000>;
59	};
60
61	emmc_pwrseq: emmc-pwrseq {
62		compatible = "mmc-pwrseq-emmc";
63		reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
64	};
65
66	cvbs-connector {
67		compatible = "composite-video-connector";
68
69		port {
70			cvbs_connector_in: endpoint {
71				remote-endpoint = <&cvbs_vdac_out>;
72			};
73		};
74	};
75
76	hdmi-connector {
77		compatible = "hdmi-connector";
78		type = "a";
79
80		port {
81			hdmi_connector_in: endpoint {
82				remote-endpoint = <&hdmi_tx_tmds_out>;
83			};
84		};
85	};
86
87	sound {
88		compatible = "amlogic,gx-sound-card";
89		model = "NEXBOX-A1";
90		assigned-clocks = <&clkc CLKID_MPLL0>,
91				  <&clkc CLKID_MPLL1>,
92				  <&clkc CLKID_MPLL2>;
93		assigned-clock-parents = <0>, <0>, <0>;
94		assigned-clock-rates = <294912000>,
95				       <270950400>,
96				       <393216000>;
97		status = "okay";
98
99		dai-link-0 {
100			sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
101		};
102
103		dai-link-1 {
104			sound-dai = <&aiu AIU_CPU CPU_SPDIF_FIFO>;
105		};
106
107		dai-link-2 {
108			sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;
109			dai-format = "i2s";
110			mclk-fs = <256>;
111
112			codec-0 {
113				sound-dai = <&aiu AIU_HDMI CTRL_I2S>;
114			};
115		};
116
117		dai-link-3 {
118			sound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>;
119
120			codec-0 {
121				sound-dai = <&spdif_dit>;
122			};
123		};
124
125		dai-link-4 {
126			sound-dai = <&aiu AIU_HDMI CTRL_OUT>;
127
128			codec-0 {
129				sound-dai = <&hdmi_tx>;
130			};
131		};
132	};
133};
134
135&aiu {
136	status = "okay";
137	pinctrl-0 = <&spdif_out_h_pins>;
138	pinctrl-names = "default";
139};
140
141&cec_AO {
142	status = "okay";
143	pinctrl-0 = <&ao_cec_pins>;
144	pinctrl-names = "default";
145	hdmi-phandle = <&hdmi_tx>;
146};
147
148&cvbs_vdac_port {
149	cvbs_vdac_out: endpoint {
150		remote-endpoint = <&cvbs_connector_in>;
151	};
152};
153
154&ethmac {
155	status = "okay";
156
157	pinctrl-0 = <&eth_pins>;
158	pinctrl-names = "default";
159
160	/* Select external PHY by default */
161	phy-handle = <&external_phy>;
162
163	amlogic,tx-delay-ns = <2>;
164
165	/* External PHY is in RGMII */
166	phy-mode = "rgmii";
167};
168
169&external_mdio {
170	external_phy: ethernet-phy@0 {
171		/* Realtek RTL8211F (0x001cc916) */
172		reg = <0>;
173		max-speed = <1000>;
174
175		reset-assert-us = <10000>;
176		reset-deassert-us = <80000>;
177		reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
178	};
179};
180
181&hdmi_tx {
182	status = "okay";
183	pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
184	pinctrl-names = "default";
185};
186
187&hdmi_tx_tmds_port {
188	hdmi_tx_tmds_out: endpoint {
189		remote-endpoint = <&hdmi_connector_in>;
190	};
191};
192
193&ir {
194	status = "okay";
195	pinctrl-0 = <&remote_input_ao_pins>;
196	pinctrl-names = "default";
197};
198
199/* SD card */
200&sd_emmc_b {
201	status = "okay";
202	pinctrl-0 = <&sdcard_pins>;
203	pinctrl-1 = <&sdcard_clk_gate_pins>;
204	pinctrl-names = "default", "clk-gate";
205
206	bus-width = <4>;
207	cap-sd-highspeed;
208	max-frequency = <50000000>;
209	disable-wp;
210
211	cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
212
213	vmmc-supply = <&vddao_3v3>;
214	vqmmc-supply = <&vddio_boot>;
215};
216
217/* eMMC */
218&sd_emmc_c {
219	status = "okay";
220	pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
221	pinctrl-1 = <&emmc_clk_gate_pins>;
222	pinctrl-names = "default", "clk-gate";
223
224	bus-width = <8>;
225	cap-mmc-highspeed;
226	max-frequency = <200000000>;
227	non-removable;
228	disable-wp;
229	mmc-ddr-1_8v;
230	mmc-hs200-1_8v;
231
232	mmc-pwrseq = <&emmc_pwrseq>;
233	vmmc-supply = <&vcc_3v3>;
234	vqmmc-supply = <&vddio_boot>;
235};
236
237&uart_AO {
238	status = "okay";
239	pinctrl-0 = <&uart_ao_a_pins>;
240	pinctrl-names = "default";
241};
242
243&usb {
244	status = "okay";
245	dr_mode = "host";
246};
247