xref: /linux/scripts/dtc/include-prefixes/arm/rockchip/rk3288-rock2-square.dts (revision 724ba6751532055db75992fc6ae21c3e322e94a7)
1*724ba675SRob Herring// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2*724ba675SRob Herring
3*724ba675SRob Herring/dts-v1/;
4*724ba675SRob Herring#include <dt-bindings/input/input.h>
5*724ba675SRob Herring#include "rk3288-rock2-som.dtsi"
6*724ba675SRob Herring
7*724ba675SRob Herring/ {
8*724ba675SRob Herring	model = "Radxa Rock 2 Square";
9*724ba675SRob Herring	compatible = "radxa,rock2-square", "rockchip,rk3288";
10*724ba675SRob Herring
11*724ba675SRob Herring	chosen {
12*724ba675SRob Herring		stdout-path = "serial2:115200n8";
13*724ba675SRob Herring	};
14*724ba675SRob Herring
15*724ba675SRob Herring	adc-keys {
16*724ba675SRob Herring		compatible = "adc-keys";
17*724ba675SRob Herring		io-channels = <&saradc 1>;
18*724ba675SRob Herring		io-channel-names = "buttons";
19*724ba675SRob Herring		keyup-threshold-microvolt = <1800000>;
20*724ba675SRob Herring
21*724ba675SRob Herring		button-recovery {
22*724ba675SRob Herring			label = "Recovery";
23*724ba675SRob Herring			linux,code = <KEY_VENDOR>;
24*724ba675SRob Herring			press-threshold-microvolt = <0>;
25*724ba675SRob Herring		};
26*724ba675SRob Herring	};
27*724ba675SRob Herring
28*724ba675SRob Herring	gpio-keys {
29*724ba675SRob Herring		compatible = "gpio-keys";
30*724ba675SRob Herring
31*724ba675SRob Herring		key-power {
32*724ba675SRob Herring			gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
33*724ba675SRob Herring			label = "GPIO Power";
34*724ba675SRob Herring			linux,code = <KEY_POWER>;
35*724ba675SRob Herring			pinctrl-names = "default";
36*724ba675SRob Herring			pinctrl-0 = <&pwr_key>;
37*724ba675SRob Herring			wakeup-source;
38*724ba675SRob Herring		};
39*724ba675SRob Herring	};
40*724ba675SRob Herring
41*724ba675SRob Herring	gpio-leds {
42*724ba675SRob Herring		compatible = "gpio-leds";
43*724ba675SRob Herring
44*724ba675SRob Herring		heartbeat_led: led-0 {
45*724ba675SRob Herring			gpios = <&gpio7 RK_PB7 GPIO_ACTIVE_LOW>;
46*724ba675SRob Herring			label = "rock2:green:state1";
47*724ba675SRob Herring			linux,default-trigger = "heartbeat";
48*724ba675SRob Herring		};
49*724ba675SRob Herring
50*724ba675SRob Herring		mmc_led: led-1 {
51*724ba675SRob Herring			gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_LOW>;
52*724ba675SRob Herring			label = "rock2:blue:state2";
53*724ba675SRob Herring			linux,default-trigger = "mmc0";
54*724ba675SRob Herring		};
55*724ba675SRob Herring	};
56*724ba675SRob Herring
57*724ba675SRob Herring	ir: ir-receiver {
58*724ba675SRob Herring		compatible = "gpio-ir-receiver";
59*724ba675SRob Herring		gpios = <&gpio8 RK_PA1 GPIO_ACTIVE_LOW>;
60*724ba675SRob Herring		pinctrl-names = "default";
61*724ba675SRob Herring		pinctrl-0 = <&ir_int>;
62*724ba675SRob Herring	};
63*724ba675SRob Herring
64*724ba675SRob Herring	sound {
65*724ba675SRob Herring		compatible = "simple-audio-card";
66*724ba675SRob Herring		simple-audio-card,name = "SPDIF";
67*724ba675SRob Herring		simple-audio-card,dai-link@1 {  /* S/PDIF - S/PDIF */
68*724ba675SRob Herring			cpu { sound-dai = <&spdif>; };
69*724ba675SRob Herring			codec { sound-dai = <&spdif_out>; };
70*724ba675SRob Herring		};
71*724ba675SRob Herring	};
72*724ba675SRob Herring
73*724ba675SRob Herring	sata_pwr: sata-prw-regulator {
74*724ba675SRob Herring		compatible = "regulator-fixed";
75*724ba675SRob Herring		enable-active-high;
76*724ba675SRob Herring		gpio = <&gpio0 13 GPIO_ACTIVE_HIGH>;
77*724ba675SRob Herring		pinctrl-names = "default";
78*724ba675SRob Herring		pinctrl-0 = <&sata_pwr_en>;
79*724ba675SRob Herring		/* Always turn on the 5V sata power connector */
80*724ba675SRob Herring		regulator-always-on;
81*724ba675SRob Herring		regulator-name = "sata_pwr";
82*724ba675SRob Herring	};
83*724ba675SRob Herring
84*724ba675SRob Herring	spdif_out: spdif-out {
85*724ba675SRob Herring		compatible = "linux,spdif-dit";
86*724ba675SRob Herring		#sound-dai-cells = <0>;
87*724ba675SRob Herring	};
88*724ba675SRob Herring
89*724ba675SRob Herring	sound-i2s {
90*724ba675SRob Herring		compatible = "rockchip,rk3288-hdmi-analog";
91*724ba675SRob Herring		pinctrl-names = "default";
92*724ba675SRob Herring		pinctrl-0 = <&phone_ctl>, <&hp_det>;
93*724ba675SRob Herring		rockchip,audio-codec = <&es8388>;
94*724ba675SRob Herring		rockchip,hp-det-gpios = <&gpio7 7 GPIO_ACTIVE_HIGH>;
95*724ba675SRob Herring		rockchip,hp-en-gpios = <&gpio8 0 GPIO_ACTIVE_HIGH>;
96*724ba675SRob Herring		rockchip,i2s-controller = <&i2s>;
97*724ba675SRob Herring		rockchip,model = "I2S";
98*724ba675SRob Herring		rockchip,routing = "Analog", "LOUT2",
99*724ba675SRob Herring				   "Analog", "ROUT2";
100*724ba675SRob Herring	};
101*724ba675SRob Herring
102*724ba675SRob Herring	sdio_pwrseq: sdio-pwrseq {
103*724ba675SRob Herring		compatible = "mmc-pwrseq-simple";
104*724ba675SRob Herring		clocks = <&hym8563>;
105*724ba675SRob Herring		clock-names = "ext_clock";
106*724ba675SRob Herring		pinctrl-names = "default";
107*724ba675SRob Herring		pinctrl-0 = <&wifi_enable>;
108*724ba675SRob Herring		reset-gpios = <&gpio4 RK_PD4 GPIO_ACTIVE_LOW>;
109*724ba675SRob Herring	};
110*724ba675SRob Herring
111*724ba675SRob Herring	vcc_usb_host: vcc-host-regulator {
112*724ba675SRob Herring		compatible = "regulator-fixed";
113*724ba675SRob Herring		enable-active-high;
114*724ba675SRob Herring		gpio = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
115*724ba675SRob Herring		pinctrl-names = "default";
116*724ba675SRob Herring		pinctrl-0 = <&host_vbus_drv>;
117*724ba675SRob Herring		regulator-name = "vcc_host";
118*724ba675SRob Herring	};
119*724ba675SRob Herring
120*724ba675SRob Herring	vcc_sd: sdmmc-regulator {
121*724ba675SRob Herring		compatible = "regulator-fixed";
122*724ba675SRob Herring		gpio = <&gpio7 RK_PB3 GPIO_ACTIVE_LOW>;
123*724ba675SRob Herring		pinctrl-names = "default";
124*724ba675SRob Herring		pinctrl-0 = <&sdmmc_pwr>;
125*724ba675SRob Herring		regulator-name = "vcc_sd";
126*724ba675SRob Herring		regulator-min-microvolt = <3300000>;
127*724ba675SRob Herring		regulator-max-microvolt = <3300000>;
128*724ba675SRob Herring		vin-supply = <&vcc_io>;
129*724ba675SRob Herring	};
130*724ba675SRob Herring};
131*724ba675SRob Herring
132*724ba675SRob Herring&sdio0 {
133*724ba675SRob Herring	bus-width = <4>;
134*724ba675SRob Herring	cap-sd-highspeed;
135*724ba675SRob Herring	cap-sdio-irq;
136*724ba675SRob Herring	mmc-pwrseq = <&sdio_pwrseq>;
137*724ba675SRob Herring	non-removable;
138*724ba675SRob Herring	pinctrl-names = "default";
139*724ba675SRob Herring	pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk &sdio0_int>;
140*724ba675SRob Herring	vmmc-supply = <&vcc_io>;
141*724ba675SRob Herring	vqmmc-supply = <&vcc_18>;
142*724ba675SRob Herring	status = "okay";
143*724ba675SRob Herring};
144*724ba675SRob Herring
145*724ba675SRob Herring&sdmmc {
146*724ba675SRob Herring	bus-width = <4>;
147*724ba675SRob Herring	cap-mmc-highspeed;
148*724ba675SRob Herring	cap-sd-highspeed;
149*724ba675SRob Herring	card-detect-delay = <200>;
150*724ba675SRob Herring	disable-wp;	/* wp not hooked up */
151*724ba675SRob Herring	pinctrl-names = "default";
152*724ba675SRob Herring	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
153*724ba675SRob Herring	vmmc-supply = <&vcc_sd>;
154*724ba675SRob Herring	vqmmc-supply = <&vccio_sd>;
155*724ba675SRob Herring	status = "okay";
156*724ba675SRob Herring};
157*724ba675SRob Herring
158*724ba675SRob Herring&gmac {
159*724ba675SRob Herring	status = "okay";
160*724ba675SRob Herring};
161*724ba675SRob Herring
162*724ba675SRob Herring&hdmi {
163*724ba675SRob Herring	ddc-i2c-bus = <&i2c5>;
164*724ba675SRob Herring	status = "okay";
165*724ba675SRob Herring};
166*724ba675SRob Herring
167*724ba675SRob Herring&i2c0 {
168*724ba675SRob Herring	hym8563: rtc@51 {
169*724ba675SRob Herring		compatible = "haoyu,hym8563";
170*724ba675SRob Herring		reg = <0x51>;
171*724ba675SRob Herring		#clock-cells = <0>;
172*724ba675SRob Herring		clock-output-names = "xin32k";
173*724ba675SRob Herring		interrupt-parent = <&gpio0>;
174*724ba675SRob Herring		interrupts = <RK_PA4 IRQ_TYPE_EDGE_FALLING>;
175*724ba675SRob Herring		pinctrl-names = "default";
176*724ba675SRob Herring		pinctrl-0 = <&pmic_int>;
177*724ba675SRob Herring
178*724ba675SRob Herring	};
179*724ba675SRob Herring};
180*724ba675SRob Herring
181*724ba675SRob Herring&i2c2 {
182*724ba675SRob Herring	status = "okay";
183*724ba675SRob Herring
184*724ba675SRob Herring	es8388: es8388@10 {
185*724ba675SRob Herring		compatible = "everest,es8388", "everest,es8328";
186*724ba675SRob Herring		reg = <0x10>;
187*724ba675SRob Herring		AVDD-supply = <&vccio_codec>;
188*724ba675SRob Herring		DVDD-supply = <&vccio_codec>;
189*724ba675SRob Herring		HPVDD-supply = <&vccio_codec>;
190*724ba675SRob Herring		PVDD-supply = <&vccio_codec>;
191*724ba675SRob Herring		clocks = <&cru SCLK_I2S0_OUT>;
192*724ba675SRob Herring	};
193*724ba675SRob Herring};
194*724ba675SRob Herring
195*724ba675SRob Herring&i2c5 {
196*724ba675SRob Herring	status = "okay";
197*724ba675SRob Herring};
198*724ba675SRob Herring
199*724ba675SRob Herring&i2s {
200*724ba675SRob Herring	status = "okay";
201*724ba675SRob Herring};
202*724ba675SRob Herring
203*724ba675SRob Herring&pinctrl {
204*724ba675SRob Herring	ir {
205*724ba675SRob Herring		ir_int: ir-int {
206*724ba675SRob Herring			rockchip,pins = <8 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
207*724ba675SRob Herring		};
208*724ba675SRob Herring	};
209*724ba675SRob Herring
210*724ba675SRob Herring	keys {
211*724ba675SRob Herring		pwr_key: pwr-key {
212*724ba675SRob Herring			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
213*724ba675SRob Herring		};
214*724ba675SRob Herring	};
215*724ba675SRob Herring
216*724ba675SRob Herring	pmic {
217*724ba675SRob Herring		pmic_int: pmic-int {
218*724ba675SRob Herring			rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
219*724ba675SRob Herring		};
220*724ba675SRob Herring	};
221*724ba675SRob Herring
222*724ba675SRob Herring	headphone {
223*724ba675SRob Herring		hp_det: hp-det {
224*724ba675SRob Herring			rockchip,pins = <7 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
225*724ba675SRob Herring		};
226*724ba675SRob Herring
227*724ba675SRob Herring		phone_ctl: phone-ctl {
228*724ba675SRob Herring			rockchip,pins = <8 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
229*724ba675SRob Herring		};
230*724ba675SRob Herring	};
231*724ba675SRob Herring
232*724ba675SRob Herring	usb {
233*724ba675SRob Herring		host_vbus_drv: host-vbus-drv {
234*724ba675SRob Herring			rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
235*724ba675SRob Herring		};
236*724ba675SRob Herring	};
237*724ba675SRob Herring
238*724ba675SRob Herring	sata {
239*724ba675SRob Herring		sata_pwr_en: sata-pwr-en {
240*724ba675SRob Herring			rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
241*724ba675SRob Herring		};
242*724ba675SRob Herring	};
243*724ba675SRob Herring
244*724ba675SRob Herring	sdmmc {
245*724ba675SRob Herring		sdmmc_pwr: sdmmc-pwr {
246*724ba675SRob Herring			rockchip,pins = <7 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
247*724ba675SRob Herring		};
248*724ba675SRob Herring	};
249*724ba675SRob Herring
250*724ba675SRob Herring	sdio {
251*724ba675SRob Herring		wifi_enable: wifi-enable {
252*724ba675SRob Herring			rockchip,pins = <4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
253*724ba675SRob Herring		};
254*724ba675SRob Herring	};
255*724ba675SRob Herring};
256*724ba675SRob Herring
257*724ba675SRob Herring&saradc {
258*724ba675SRob Herring	status = "okay";
259*724ba675SRob Herring};
260*724ba675SRob Herring
261*724ba675SRob Herring&spdif {
262*724ba675SRob Herring	status = "okay";
263*724ba675SRob Herring};
264*724ba675SRob Herring
265*724ba675SRob Herring&uart2 {
266*724ba675SRob Herring	status = "okay";
267*724ba675SRob Herring};
268*724ba675SRob Herring
269*724ba675SRob Herring&usbphy {
270*724ba675SRob Herring	status = "okay";
271*724ba675SRob Herring};
272*724ba675SRob Herring
273*724ba675SRob Herring&usbphy1 {
274*724ba675SRob Herring	vbus-supply = <&vcc_usb_host>;
275*724ba675SRob Herring};
276*724ba675SRob Herring
277*724ba675SRob Herring&usb_host0_ehci {
278*724ba675SRob Herring	status = "okay";
279*724ba675SRob Herring};
280*724ba675SRob Herring
281*724ba675SRob Herring&usb_host1 {
282*724ba675SRob Herring	status = "okay";
283*724ba675SRob Herring};
284*724ba675SRob Herring
285*724ba675SRob Herring&usb_otg {
286*724ba675SRob Herring	status = "okay";
287*724ba675SRob Herring};
288