xref: /linux/scripts/dtc/include-prefixes/arm/allwinner/sun8i-a33-vstar.dts (revision c34e9ab9a612ee8b18273398ef75c207b01f516d)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (C) 2024 Icenowy Zheng <uwu@icenowy.me>
4 */
5
6/dts-v1/;
7#include "sun8i-a33-vstar-core1.dtsi"
8
9#include <dt-bindings/gpio/gpio.h>
10#include <dt-bindings/input/input.h>
11
12/ {
13	model = "Rervision A33-Vstar";
14	compatible = "rervision,a33-vstar",
15		     "rervision,a33-core1",
16		     "allwinner,sun8i-a33";
17
18	aliases {
19		serial0 = &uart0;
20		ethernet0 = &r8152;
21	};
22
23	chosen {
24		stdout-path = "serial0:115200n8";
25	};
26
27	reg_usb1_vbus: regulator-usb1-vbus {
28		compatible = "regulator-fixed";
29		regulator-name = "usb1-vbus";
30		regulator-min-microvolt = <5000000>;
31		regulator-max-microvolt = <5000000>;
32		regulator-boot-on;
33		enable-active-high;
34		gpio = <&pio 1 2 GPIO_ACTIVE_HIGH>; /* PB2 */
35	};
36
37	wifi_pwrseq: pwrseq {
38		compatible = "mmc-pwrseq-simple";
39		reset-gpios = <&r_pio 0 6 GPIO_ACTIVE_LOW>; /* PL6 */
40		clocks = <&rtc CLK_OSC32K_FANOUT>;
41		clock-names = "ext_clock";
42	};
43};
44
45&ac_power_supply {
46	status = "okay";
47};
48
49&codec {
50	status = "okay";
51};
52
53&dai {
54	status = "okay";
55};
56
57&ehci0 {
58	#address-cells = <1>;
59	#size-cells = <0>;
60	status = "okay";
61
62	hub@1 {
63		/* Onboard GL850G hub which needs no extra power sequence */
64		compatible = "usb5e3,608";
65		reg = <1>;
66		#address-cells = <1>;
67		#size-cells = <0>;
68
69		r8152: ethernet@4 {
70			/*
71			 * Onboard Realtek RTL8152 USB Ethernet,
72			 * with no MAC address programmed
73			 */
74			compatible = "usbbda,8152";
75			reg = <4>;
76		};
77	};
78};
79
80&lradc {
81	vref-supply = <&reg_aldo3>;
82	status = "okay";
83
84	button-191 {
85		label = "V+";
86		linux,code = <KEY_VOLUMEUP>;
87		channel = <0>;
88		voltage = <191011>;
89	};
90
91	button-391 {
92		label = "V-";
93		linux,code = <KEY_VOLUMEDOWN>;
94		channel = <0>;
95		voltage = <391304>;
96	};
97
98	button-600 {
99		label = "BACK";
100		linux,code = <KEY_BACK>;
101		channel = <0>;
102		voltage = <600000>;
103	};
104};
105
106&mmc0 {
107	vmmc-supply = <&reg_dcdc1>;
108	bus-width = <4>;
109	cd-gpios = <&pio 1 4 GPIO_ACTIVE_LOW>; /* PB4 */
110	status = "okay";
111};
112
113&mmc1 {
114	pinctrl-names = "default";
115	pinctrl-0 = <&mmc1_pg_pins>;
116	vmmc-supply = <&reg_dldo1>;
117	mmc-pwrseq = <&wifi_pwrseq>;
118	bus-width = <4>;
119	non-removable;
120	status = "okay";
121
122	brcmf: wifi@1 {
123		reg = <1>;
124		compatible = "brcm,bcm4329-fmac";
125		interrupt-parent = <&r_pio>;
126		interrupts = <0 7 IRQ_TYPE_LEVEL_LOW>; /* PL7 */
127		interrupt-names = "host-wake";
128	};
129};
130
131/*
132 * Our WiFi chip needs both DLDO1 and DLDO2 to be powered at the same
133 * time, with the two being in sync. Since this is not really
134 * supported right now, just use the two as always on, and we will fix
135 * it later.
136 */
137&reg_dldo1 {
138	regulator-always-on;
139	regulator-min-microvolt = <3300000>;
140	regulator-max-microvolt = <3300000>;
141	regulator-name = "vcc-wifi0";
142};
143
144&reg_dldo2 {
145	regulator-always-on;
146	regulator-min-microvolt = <3300000>;
147	regulator-max-microvolt = <3300000>;
148	regulator-name = "vcc-wifi1";
149};
150
151&reg_drivevbus {
152	regulator-name = "usb0-vbus";
153	status = "okay";
154};
155
156&sound {
157	/* TODO: on-board microphone */
158
159	simple-audio-card,widgets = "Headphone", "Headphone Jack";
160	simple-audio-card,routing =
161		"Left DAC", "DACL",
162		"Right DAC", "DACR",
163		"Headphone Jack", "HP";
164	status = "okay";
165};
166
167&uart0 {
168	pinctrl-names = "default";
169	pinctrl-0 = <&uart0_pb_pins>;
170	status = "okay";
171};
172
173&uart1 {
174	pinctrl-names = "default";
175	pinctrl-0 = <&uart1_pg_pins>, <&uart1_cts_rts_pg_pins>;
176	uart-has-rtscts;
177	status = "okay";
178
179	bluetooth {
180		compatible = "brcm,bcm43438-bt";
181		clocks = <&rtc CLK_OSC32K_FANOUT>;
182		clock-names = "lpo";
183		vbat-supply = <&reg_dldo1>;
184		device-wakeup-gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */
185		host-wakeup-gpios = <&r_pio 0 9 GPIO_ACTIVE_HIGH>; /* PL9 */
186		shutdown-gpios = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
187	};
188};
189
190&usb_otg {
191	dr_mode = "otg";
192	status = "okay";
193};
194
195&usb_power_supply {
196	status = "okay";
197};
198
199&usbphy {
200	usb0_id_det-gpios = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */
201	usb0_vbus_power-supply = <&usb_power_supply>;
202	usb0_vbus-supply = <&reg_drivevbus>;
203	usb1_vbus-supply = <&reg_usb1_vbus>;
204	status = "okay";
205};
206