1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2016 Andreas Färber
4 */
5
6#include "meson-gxbb.dtsi"
7
8/ {
9	compatible = "tronsmart,vega-s95", "amlogic,meson-gxbb";
10
11	aliases {
12		serial0 = &uart_AO;
13		ethernet0 = &ethmac;
14	};
15
16	chosen {
17		stdout-path = "serial0:115200n8";
18	};
19
20	leds {
21		compatible = "gpio-leds";
22
23		blue {
24			label = "vega-s95:blue:on";
25			gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_HIGH>;
26			default-state = "on";
27			panic-indicator;
28		};
29	};
30
31	usb_pwr: regulator-usb-pwrs {
32		compatible = "regulator-fixed";
33
34		regulator-name = "USB_PWR";
35
36		regulator-min-microvolt = <5000000>;
37		regulator-max-microvolt = <5000000>;
38
39		gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
40		enable-active-high;
41	};
42
43	vddio_boot: regulator-vddio_boot {
44		compatible = "regulator-fixed";
45		regulator-name = "VDDIO_BOOT";
46		regulator-min-microvolt = <1800000>;
47		regulator-max-microvolt = <1800000>;
48	};
49
50	vddao_3v3: regulator-vddao_3v3 {
51		compatible = "regulator-fixed";
52		regulator-name = "VDDAO_3V3";
53		regulator-min-microvolt = <3300000>;
54		regulator-max-microvolt = <3300000>;
55	};
56
57	vcc_3v3: regulator-vcc_3v3 {
58		compatible = "regulator-fixed";
59		regulator-name = "VCC_3V3";
60		regulator-min-microvolt = <3300000>;
61		regulator-max-microvolt = <3300000>;
62	};
63
64	emmc_pwrseq: emmc-pwrseq {
65		compatible = "mmc-pwrseq-emmc";
66		reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
67	};
68
69	wifi32k: wifi32k {
70		compatible = "pwm-clock";
71		#clock-cells = <0>;
72		clock-frequency = <32768>;
73		pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
74	};
75
76	sdio_pwrseq: sdio-pwrseq {
77		compatible = "mmc-pwrseq-simple";
78		reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>,
79				<&gpio GPIOX_20 GPIO_ACTIVE_LOW>;
80		clocks = <&wifi32k>;
81		clock-names = "ext_clock";
82	};
83};
84
85&ethmac {
86	status = "okay";
87	pinctrl-0 = <&eth_rgmii_pins>;
88	pinctrl-names = "default";
89
90	phy-handle = <&eth_phy0>;
91	phy-mode = "rgmii";
92
93	amlogic,tx-delay-ns = <2>;
94
95	snps,reset-gpio = <&gpio GPIOZ_14 0>;
96	snps,reset-delays-us = <0 10000 1000000>;
97	snps,reset-active-low;
98
99	mdio {
100		compatible = "snps,dwmac-mdio";
101		#address-cells = <1>;
102		#size-cells = <0>;
103
104		eth_phy0: ethernet-phy@0 {
105			/* Realtek RTL8211F (0x001cc916) */
106			reg = <0>;
107		};
108	};
109};
110
111&ir {
112	status = "okay";
113	pinctrl-0 = <&remote_input_ao_pins>;
114	pinctrl-names = "default";
115};
116
117&pwm_ef {
118	status = "okay";
119	pinctrl-0 = <&pwm_e_pins>;
120	pinctrl-names = "default";
121	clocks = <&clkc CLKID_FCLK_DIV4>;
122	clock-names = "clkin0";
123};
124
125/* Wireless SDIO Module */
126&sd_emmc_a {
127	status = "okay";
128	pinctrl-0 = <&sdio_pins &sdio_irq_pins>;
129	pinctrl-1 = <&sdio_clk_gate_pins>;
130	pinctrl-names = "default", "clk-gate";
131	#address-cells = <1>;
132	#size-cells = <0>;
133
134	bus-width = <4>;
135	cap-sd-highspeed;
136	max-frequency = <50000000>;
137
138	non-removable;
139	disable-wp;
140
141	mmc-pwrseq = <&sdio_pwrseq>;
142
143	vmmc-supply = <&vddao_3v3>;
144	vqmmc-supply = <&vddio_boot>;
145
146	brcmf: wifi@1 {
147		reg = <1>;
148		compatible = "brcm,bcm4329-fmac";
149	};
150};
151
152/* SD card */
153&sd_emmc_b {
154	status = "okay";
155	pinctrl-0 = <&sdcard_pins>;
156	pinctrl-1 = <&sdcard_clk_gate_pins>;
157	pinctrl-names = "default", "clk-gate";
158
159	bus-width = <4>;
160	cap-sd-highspeed;
161	max-frequency = <50000000>;
162	disable-wp;
163
164	cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
165
166	vmmc-supply = <&vddao_3v3>;
167	vqmmc-supply = <&vcc_3v3>;
168};
169
170/* eMMC */
171&sd_emmc_c {
172	status = "okay";
173	pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
174	pinctrl-1 = <&emmc_clk_gate_pins>;
175	pinctrl-names = "default", "clk-gate";
176
177	bus-width = <8>;
178	cap-mmc-highspeed;
179	max-frequency = <200000000>;
180	non-removable;
181	disable-wp;
182	mmc-ddr-1_8v;
183	mmc-hs200-1_8v;
184
185	mmc-pwrseq = <&emmc_pwrseq>;
186	vmmc-supply = <&vcc_3v3>;
187	vqmmc-supply = <&vddio_boot>;
188};
189
190&uart_AO {
191	status = "okay";
192	pinctrl-0 = <&uart_ao_a_pins>;
193	pinctrl-names = "default";
194};
195
196&usb0_phy {
197	status = "okay";
198	phy-supply = <&usb_pwr>;
199};
200
201&usb1_phy {
202	status = "okay";
203};
204
205&usb0 {
206	status = "okay";
207};
208
209&usb1 {
210	status = "okay";
211};
212