blob: 74df32534231897f61aab3cc5ab88d96e3235573 [file] [log] [blame]
Tom Rini53633a82024-02-29 12:33:36 -05001// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2016 Andreas Färber
4 */
5
6#include "meson-gxbb.dtsi"
7#include <dt-bindings/sound/meson-aiu.h>
8
9/ {
10 compatible = "tronsmart,vega-s95", "amlogic,meson-gxbb";
11
12 aliases {
13 serial0 = &uart_AO;
14 ethernet0 = &ethmac;
15 };
16
17 chosen {
18 stdout-path = "serial0:115200n8";
19 };
20
21 spdif_dit: audio-codec-0 {
22 #sound-dai-cells = <0>;
23 compatible = "linux,spdif-dit";
Tom Rini53633a82024-02-29 12:33:36 -050024 sound-name-prefix = "DIT";
25 };
26
27 leds {
28 compatible = "gpio-leds";
29
30 led-blue {
31 label = "vega-s95:blue:on";
32 gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_HIGH>;
33 default-state = "on";
34 panic-indicator;
35 };
36 };
37
38 usb_pwr: regulator-usb-pwrs {
39 compatible = "regulator-fixed";
40
41 regulator-name = "USB_PWR";
42
43 regulator-min-microvolt = <5000000>;
44 regulator-max-microvolt = <5000000>;
45
46 gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
47 enable-active-high;
48 };
49
50 vddio_boot: regulator-vddio_boot {
51 compatible = "regulator-fixed";
52 regulator-name = "VDDIO_BOOT";
53 regulator-min-microvolt = <1800000>;
54 regulator-max-microvolt = <1800000>;
55 };
56
57 vddao_3v3: regulator-vddao_3v3 {
58 compatible = "regulator-fixed";
59 regulator-name = "VDDAO_3V3";
60 regulator-min-microvolt = <3300000>;
61 regulator-max-microvolt = <3300000>;
62 };
63
64 vddio_ao18: regulator-vddio_ao18 {
65 compatible = "regulator-fixed";
66 regulator-name = "VDDIO_AO18";
67 regulator-min-microvolt = <1800000>;
68 regulator-max-microvolt = <1800000>;
69 };
70
71 vcc_3v3: regulator-vcc_3v3 {
72 compatible = "regulator-fixed";
73 regulator-name = "VCC_3V3";
74 regulator-min-microvolt = <3300000>;
75 regulator-max-microvolt = <3300000>;
76 };
77
78 emmc_pwrseq: emmc-pwrseq {
79 compatible = "mmc-pwrseq-emmc";
80 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
81 };
82
83 wifi32k: wifi32k {
84 compatible = "pwm-clock";
85 #clock-cells = <0>;
86 clock-frequency = <32768>;
87 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
88 };
89
90 hdmi-connector {
91 compatible = "hdmi-connector";
92 type = "a";
93
94 port {
95 hdmi_connector_in: endpoint {
96 remote-endpoint = <&hdmi_tx_tmds_out>;
97 };
98 };
99 };
100
101 sdio_pwrseq: sdio-pwrseq {
102 compatible = "mmc-pwrseq-simple";
103 reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
104 clocks = <&wifi32k>;
105 clock-names = "ext_clock";
106 };
107
108 sound {
109 compatible = "amlogic,gx-sound-card";
110 model = "VEGA-S95";
111 assigned-clocks = <&clkc CLKID_MPLL0>,
112 <&clkc CLKID_MPLL1>,
113 <&clkc CLKID_MPLL2>;
114 assigned-clock-parents = <0>, <0>, <0>;
115 assigned-clock-rates = <294912000>,
116 <270950400>,
117 <393216000>;
118
119 dai-link-0 {
120 sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
121 };
122
123 dai-link-1 {
124 sound-dai = <&aiu AIU_CPU CPU_SPDIF_FIFO>;
125 };
126
127 dai-link-2 {
128 sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;
129 dai-format = "i2s";
130 mclk-fs = <256>;
131
132 codec-0 {
133 sound-dai = <&aiu AIU_HDMI CTRL_I2S>;
134 };
135 };
136
137 dai-link-3 {
138 sound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>;
139
140 codec-0 {
141 sound-dai = <&spdif_dit>;
142 };
143 };
144
145 dai-link-4 {
146 sound-dai = <&aiu AIU_HDMI CTRL_OUT>;
147
148 codec-0 {
149 sound-dai = <&hdmi_tx>;
150 };
151 };
152 };
153};
154
155&aiu {
156 status = "okay";
157 pinctrl-0 = <&spdif_out_y_pins>;
158 pinctrl-names = "default";
159};
160
161&cec_AO {
162 status = "okay";
163 pinctrl-0 = <&ao_cec_pins>;
164 pinctrl-names = "default";
165 hdmi-phandle = <&hdmi_tx>;
166};
167
168&ethmac {
169 status = "okay";
170 pinctrl-0 = <&eth_rgmii_pins>;
171 pinctrl-names = "default";
172
173 phy-handle = <&eth_phy0>;
174 phy-mode = "rgmii";
175
176 amlogic,tx-delay-ns = <2>;
177
178 mdio {
179 compatible = "snps,dwmac-mdio";
180 #address-cells = <1>;
181 #size-cells = <0>;
182
183 eth_phy0: ethernet-phy@0 {
184 /* Realtek RTL8211F (0x001cc916) */
185 reg = <0>;
186
187 reset-assert-us = <10000>;
188 reset-deassert-us = <80000>;
189 reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
190
191 interrupt-parent = <&gpio_intc>;
192 /* MAC_INTR on GPIOZ_15 */
193 interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
194 };
195 };
196};
197
198&hdmi_tx {
199 status = "okay";
200 pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
201 pinctrl-names = "default";
202};
203
204&hdmi_tx_tmds_port {
205 hdmi_tx_tmds_out: endpoint {
206 remote-endpoint = <&hdmi_connector_in>;
207 };
208};
209
210&ir {
211 status = "okay";
212 pinctrl-0 = <&remote_input_ao_pins>;
213 pinctrl-names = "default";
214 linux,rc-map-name = "rc-vega-s9x";
215};
216
217&pwm_ef {
218 status = "okay";
219 pinctrl-0 = <&pwm_e_pins>;
220 pinctrl-names = "default";
221 clocks = <&clkc CLKID_FCLK_DIV4>;
222 clock-names = "clkin0";
223};
224
225&saradc {
226 status = "okay";
227 vref-supply = <&vddio_ao18>;
228};
229
230/* Wireless SDIO Module */
231&sd_emmc_a {
232 status = "okay";
233 pinctrl-0 = <&sdio_pins>;
234 pinctrl-1 = <&sdio_clk_gate_pins>;
235 pinctrl-names = "default", "clk-gate";
236 #address-cells = <1>;
237 #size-cells = <0>;
238
239 bus-width = <4>;
240 cap-sd-highspeed;
241 max-frequency = <50000000>;
242
243 non-removable;
244 disable-wp;
245
246 /* WiFi firmware requires power to be kept while in suspend */
247 keep-power-in-suspend;
248
249 mmc-pwrseq = <&sdio_pwrseq>;
250
251 vmmc-supply = <&vddao_3v3>;
252 vqmmc-supply = <&vddio_boot>;
253
254 brcmf: wifi@1 {
255 reg = <1>;
256 compatible = "brcm,bcm4329-fmac";
257 };
258};
259
260/* SD card */
261&sd_emmc_b {
262 status = "okay";
263 pinctrl-0 = <&sdcard_pins>;
264 pinctrl-1 = <&sdcard_clk_gate_pins>;
265 pinctrl-names = "default", "clk-gate";
266
267 bus-width = <4>;
268 cap-sd-highspeed;
269 max-frequency = <50000000>;
270 disable-wp;
271
272 cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
273
274 vmmc-supply = <&vddao_3v3>;
275 vqmmc-supply = <&vcc_3v3>;
276};
277
278/* eMMC */
279&sd_emmc_c {
280 status = "okay";
281 pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
282 pinctrl-1 = <&emmc_clk_gate_pins>;
283 pinctrl-names = "default", "clk-gate";
284
285 bus-width = <8>;
286 cap-mmc-highspeed;
287 max-frequency = <200000000>;
288 non-removable;
289 disable-wp;
290 mmc-ddr-1_8v;
291 mmc-hs200-1_8v;
292
293 mmc-pwrseq = <&emmc_pwrseq>;
294 vmmc-supply = <&vcc_3v3>;
295 vqmmc-supply = <&vddio_boot>;
296};
297
298/* This is connected to the Bluetooth module: */
299&uart_A {
300 status = "okay";
301 pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
302 pinctrl-names = "default";
303
304 bluetooth {
305 compatible = "brcm,bcm43438-bt";
306 shutdown-gpios = <&gpio GPIOX_20 GPIO_ACTIVE_HIGH>;
307 max-speed = <2000000>;
308 clocks = <&wifi32k>;
309 clock-names = "lpo";
310 };
311};
312
313/* This UART is brought out to the DB9 connector */
314&uart_AO {
315 status = "okay";
316 pinctrl-0 = <&uart_ao_a_pins>;
317 pinctrl-names = "default";
318};
319
320&usb0_phy {
321 status = "okay";
322 phy-supply = <&usb_pwr>;
323};
324
325&usb1_phy {
326 status = "okay";
327};
328
329&usb0 {
330 status = "okay";
331};
332
333&usb1 {
334 status = "okay";
335};