Debian Codegraph @

arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts

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