xref: /linux/scripts/dtc/include-prefixes/arm/rockchip/rk3288-rock2-square.dts (revision c34e9ab9a612ee8b18273398ef75c207b01f516d)
1724ba675SRob Herring// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2724ba675SRob Herring
3724ba675SRob Herring/dts-v1/;
4724ba675SRob Herring#include <dt-bindings/input/input.h>
5724ba675SRob Herring#include "rk3288-rock2-som.dtsi"
6724ba675SRob Herring
7724ba675SRob Herring/ {
8724ba675SRob Herring	model = "Radxa Rock 2 Square";
9724ba675SRob Herring	compatible = "radxa,rock2-square", "rockchip,rk3288";
10724ba675SRob Herring
11724ba675SRob Herring	chosen {
12724ba675SRob Herring		stdout-path = "serial2:115200n8";
13724ba675SRob Herring	};
14724ba675SRob Herring
15724ba675SRob Herring	adc-keys {
16724ba675SRob Herring		compatible = "adc-keys";
17724ba675SRob Herring		io-channels = <&saradc 1>;
18724ba675SRob Herring		io-channel-names = "buttons";
19724ba675SRob Herring		keyup-threshold-microvolt = <1800000>;
20724ba675SRob Herring
21724ba675SRob Herring		button-recovery {
22724ba675SRob Herring			label = "Recovery";
23724ba675SRob Herring			linux,code = <KEY_VENDOR>;
24724ba675SRob Herring			press-threshold-microvolt = <0>;
25724ba675SRob Herring		};
26724ba675SRob Herring	};
27724ba675SRob Herring
28724ba675SRob Herring	gpio-keys {
29724ba675SRob Herring		compatible = "gpio-keys";
30724ba675SRob Herring
31724ba675SRob Herring		key-power {
32724ba675SRob Herring			gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
33724ba675SRob Herring			label = "GPIO Power";
34724ba675SRob Herring			linux,code = <KEY_POWER>;
35724ba675SRob Herring			pinctrl-names = "default";
36724ba675SRob Herring			pinctrl-0 = <&pwr_key>;
37724ba675SRob Herring			wakeup-source;
38724ba675SRob Herring		};
39724ba675SRob Herring	};
40724ba675SRob Herring
41724ba675SRob Herring	gpio-leds {
42724ba675SRob Herring		compatible = "gpio-leds";
43724ba675SRob Herring
44724ba675SRob Herring		heartbeat_led: led-0 {
45724ba675SRob Herring			gpios = <&gpio7 RK_PB7 GPIO_ACTIVE_LOW>;
46724ba675SRob Herring			label = "rock2:green:state1";
47724ba675SRob Herring			linux,default-trigger = "heartbeat";
48724ba675SRob Herring		};
49724ba675SRob Herring
50724ba675SRob Herring		mmc_led: led-1 {
51724ba675SRob Herring			gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_LOW>;
52724ba675SRob Herring			label = "rock2:blue:state2";
53724ba675SRob Herring			linux,default-trigger = "mmc0";
54724ba675SRob Herring		};
55724ba675SRob Herring	};
56724ba675SRob Herring
57724ba675SRob Herring	ir: ir-receiver {
58724ba675SRob Herring		compatible = "gpio-ir-receiver";
59724ba675SRob Herring		gpios = <&gpio8 RK_PA1 GPIO_ACTIVE_LOW>;
60724ba675SRob Herring		pinctrl-names = "default";
61724ba675SRob Herring		pinctrl-0 = <&ir_int>;
62724ba675SRob Herring	};
63724ba675SRob Herring
64724ba675SRob Herring	sound {
65724ba675SRob Herring		compatible = "simple-audio-card";
66724ba675SRob Herring		simple-audio-card,name = "SPDIF";
67724ba675SRob Herring		simple-audio-card,dai-link@1 {  /* S/PDIF - S/PDIF */
68724ba675SRob Herring			cpu { sound-dai = <&spdif>; };
69724ba675SRob Herring			codec { sound-dai = <&spdif_out>; };
70724ba675SRob Herring		};
71724ba675SRob Herring	};
72724ba675SRob Herring
73*2c3944d9SJohan Jonker	sata_pwr: regulator-sata-prw {
74724ba675SRob Herring		compatible = "regulator-fixed";
75724ba675SRob Herring		enable-active-high;
76724ba675SRob Herring		gpio = <&gpio0 13 GPIO_ACTIVE_HIGH>;
77724ba675SRob Herring		pinctrl-names = "default";
78724ba675SRob Herring		pinctrl-0 = <&sata_pwr_en>;
79724ba675SRob Herring		/* Always turn on the 5V sata power connector */
80724ba675SRob Herring		regulator-always-on;
81724ba675SRob Herring		regulator-name = "sata_pwr";
82724ba675SRob Herring	};
83724ba675SRob Herring
84724ba675SRob Herring	spdif_out: spdif-out {
85724ba675SRob Herring		compatible = "linux,spdif-dit";
86724ba675SRob Herring		#sound-dai-cells = <0>;
87724ba675SRob Herring	};
88724ba675SRob Herring
89724ba675SRob Herring	sound-i2s {
90724ba675SRob Herring		compatible = "rockchip,rk3288-hdmi-analog";
91724ba675SRob Herring		pinctrl-names = "default";
92724ba675SRob Herring		pinctrl-0 = <&phone_ctl>, <&hp_det>;
93724ba675SRob Herring		rockchip,audio-codec = <&es8388>;
94724ba675SRob Herring		rockchip,hp-det-gpios = <&gpio7 7 GPIO_ACTIVE_HIGH>;
95724ba675SRob Herring		rockchip,hp-en-gpios = <&gpio8 0 GPIO_ACTIVE_HIGH>;
96724ba675SRob Herring		rockchip,i2s-controller = <&i2s>;
97724ba675SRob Herring		rockchip,model = "I2S";
98724ba675SRob Herring		rockchip,routing = "Analog", "LOUT2",
99724ba675SRob Herring				   "Analog", "ROUT2";
100724ba675SRob Herring	};
101724ba675SRob Herring
102724ba675SRob Herring	sdio_pwrseq: sdio-pwrseq {
103724ba675SRob Herring		compatible = "mmc-pwrseq-simple";
104724ba675SRob Herring		clocks = <&hym8563>;
105724ba675SRob Herring		clock-names = "ext_clock";
106724ba675SRob Herring		pinctrl-names = "default";
107724ba675SRob Herring		pinctrl-0 = <&wifi_enable>;
108724ba675SRob Herring		reset-gpios = <&gpio4 RK_PD4 GPIO_ACTIVE_LOW>;
109724ba675SRob Herring	};
110724ba675SRob Herring
111*2c3944d9SJohan Jonker	vcc_usb_host: regulator-vcc-host {
112724ba675SRob Herring		compatible = "regulator-fixed";
113724ba675SRob Herring		enable-active-high;
114724ba675SRob Herring		gpio = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
115724ba675SRob Herring		pinctrl-names = "default";
116724ba675SRob Herring		pinctrl-0 = <&host_vbus_drv>;
117724ba675SRob Herring		regulator-name = "vcc_host";
118724ba675SRob Herring	};
119724ba675SRob Herring
120*2c3944d9SJohan Jonker	vcc_sd: regulator-sdmmc {
121724ba675SRob Herring		compatible = "regulator-fixed";
122724ba675SRob Herring		gpio = <&gpio7 RK_PB3 GPIO_ACTIVE_LOW>;
123724ba675SRob Herring		pinctrl-names = "default";
124724ba675SRob Herring		pinctrl-0 = <&sdmmc_pwr>;
125724ba675SRob Herring		regulator-name = "vcc_sd";
126724ba675SRob Herring		regulator-min-microvolt = <3300000>;
127724ba675SRob Herring		regulator-max-microvolt = <3300000>;
128724ba675SRob Herring		vin-supply = <&vcc_io>;
129724ba675SRob Herring	};
130724ba675SRob Herring};
131724ba675SRob Herring
132724ba675SRob Herring&sdio0 {
133724ba675SRob Herring	bus-width = <4>;
134724ba675SRob Herring	cap-sd-highspeed;
135724ba675SRob Herring	cap-sdio-irq;
136724ba675SRob Herring	mmc-pwrseq = <&sdio_pwrseq>;
137724ba675SRob Herring	non-removable;
138724ba675SRob Herring	pinctrl-names = "default";
139724ba675SRob Herring	pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk &sdio0_int>;
140724ba675SRob Herring	vmmc-supply = <&vcc_io>;
141724ba675SRob Herring	vqmmc-supply = <&vcc_18>;
142724ba675SRob Herring	status = "okay";
143724ba675SRob Herring};
144724ba675SRob Herring
145724ba675SRob Herring&sdmmc {
146724ba675SRob Herring	bus-width = <4>;
147724ba675SRob Herring	cap-mmc-highspeed;
148724ba675SRob Herring	cap-sd-highspeed;
149724ba675SRob Herring	card-detect-delay = <200>;
150724ba675SRob Herring	disable-wp;	/* wp not hooked up */
151724ba675SRob Herring	pinctrl-names = "default";
152724ba675SRob Herring	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
153724ba675SRob Herring	vmmc-supply = <&vcc_sd>;
154724ba675SRob Herring	vqmmc-supply = <&vccio_sd>;
155724ba675SRob Herring	status = "okay";
156724ba675SRob Herring};
157724ba675SRob Herring
158724ba675SRob Herring&gmac {
159724ba675SRob Herring	status = "okay";
160724ba675SRob Herring};
161724ba675SRob Herring
162724ba675SRob Herring&hdmi {
163724ba675SRob Herring	ddc-i2c-bus = <&i2c5>;
164724ba675SRob Herring	status = "okay";
165724ba675SRob Herring};
166724ba675SRob Herring
167724ba675SRob Herring&i2c0 {
168724ba675SRob Herring	hym8563: rtc@51 {
169724ba675SRob Herring		compatible = "haoyu,hym8563";
170724ba675SRob Herring		reg = <0x51>;
171724ba675SRob Herring		#clock-cells = <0>;
172724ba675SRob Herring		clock-output-names = "xin32k";
173724ba675SRob Herring		interrupt-parent = <&gpio0>;
174724ba675SRob Herring		interrupts = <RK_PA4 IRQ_TYPE_EDGE_FALLING>;
175724ba675SRob Herring		pinctrl-names = "default";
176724ba675SRob Herring		pinctrl-0 = <&pmic_int>;
177724ba675SRob Herring
178724ba675SRob Herring	};
179724ba675SRob Herring};
180724ba675SRob Herring
181724ba675SRob Herring&i2c2 {
182724ba675SRob Herring	status = "okay";
183724ba675SRob Herring
184724ba675SRob Herring	es8388: es8388@10 {
185724ba675SRob Herring		compatible = "everest,es8388", "everest,es8328";
186724ba675SRob Herring		reg = <0x10>;
187724ba675SRob Herring		AVDD-supply = <&vccio_codec>;
188724ba675SRob Herring		DVDD-supply = <&vccio_codec>;
189724ba675SRob Herring		HPVDD-supply = <&vccio_codec>;
190724ba675SRob Herring		PVDD-supply = <&vccio_codec>;
191724ba675SRob Herring		clocks = <&cru SCLK_I2S0_OUT>;
192724ba675SRob Herring	};
193724ba675SRob Herring};
194724ba675SRob Herring
195724ba675SRob Herring&i2c5 {
196724ba675SRob Herring	status = "okay";
197724ba675SRob Herring};
198724ba675SRob Herring
199724ba675SRob Herring&i2s {
200724ba675SRob Herring	status = "okay";
201724ba675SRob Herring};
202724ba675SRob Herring
203724ba675SRob Herring&pinctrl {
204724ba675SRob Herring	ir {
205724ba675SRob Herring		ir_int: ir-int {
206724ba675SRob Herring			rockchip,pins = <8 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
207724ba675SRob Herring		};
208724ba675SRob Herring	};
209724ba675SRob Herring
210724ba675SRob Herring	keys {
211724ba675SRob Herring		pwr_key: pwr-key {
212724ba675SRob Herring			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
213724ba675SRob Herring		};
214724ba675SRob Herring	};
215724ba675SRob Herring
216724ba675SRob Herring	pmic {
217724ba675SRob Herring		pmic_int: pmic-int {
218724ba675SRob Herring			rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
219724ba675SRob Herring		};
220724ba675SRob Herring	};
221724ba675SRob Herring
222724ba675SRob Herring	headphone {
223724ba675SRob Herring		hp_det: hp-det {
224724ba675SRob Herring			rockchip,pins = <7 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
225724ba675SRob Herring		};
226724ba675SRob Herring
227724ba675SRob Herring		phone_ctl: phone-ctl {
228724ba675SRob Herring			rockchip,pins = <8 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
229724ba675SRob Herring		};
230724ba675SRob Herring	};
231724ba675SRob Herring
232724ba675SRob Herring	usb {
233724ba675SRob Herring		host_vbus_drv: host-vbus-drv {
234724ba675SRob Herring			rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
235724ba675SRob Herring		};
236724ba675SRob Herring	};
237724ba675SRob Herring
238724ba675SRob Herring	sata {
239724ba675SRob Herring		sata_pwr_en: sata-pwr-en {
240724ba675SRob Herring			rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
241724ba675SRob Herring		};
242724ba675SRob Herring	};
243724ba675SRob Herring
244724ba675SRob Herring	sdmmc {
245724ba675SRob Herring		sdmmc_pwr: sdmmc-pwr {
246724ba675SRob Herring			rockchip,pins = <7 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
247724ba675SRob Herring		};
248724ba675SRob Herring	};
249724ba675SRob Herring
250724ba675SRob Herring	sdio {
251724ba675SRob Herring		wifi_enable: wifi-enable {
252724ba675SRob Herring			rockchip,pins = <4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
253724ba675SRob Herring		};
254724ba675SRob Herring	};
255724ba675SRob Herring};
256724ba675SRob Herring
257724ba675SRob Herring&saradc {
258724ba675SRob Herring	status = "okay";
259724ba675SRob Herring};
260724ba675SRob Herring
261724ba675SRob Herring&spdif {
262724ba675SRob Herring	status = "okay";
263724ba675SRob Herring};
264724ba675SRob Herring
265724ba675SRob Herring&uart2 {
266724ba675SRob Herring	status = "okay";
267724ba675SRob Herring};
268724ba675SRob Herring
269724ba675SRob Herring&usbphy {
270724ba675SRob Herring	status = "okay";
271724ba675SRob Herring};
272724ba675SRob Herring
273724ba675SRob Herring&usbphy1 {
274724ba675SRob Herring	vbus-supply = <&vcc_usb_host>;
275724ba675SRob Herring};
276724ba675SRob Herring
277724ba675SRob Herring&usb_host0_ehci {
278724ba675SRob Herring	status = "okay";
279724ba675SRob Herring};
280724ba675SRob Herring
281724ba675SRob Herring&usb_host1 {
282724ba675SRob Herring	status = "okay";
283724ba675SRob Herring};
284724ba675SRob Herring
285724ba675SRob Herring&usb_otg {
286724ba675SRob Herring	status = "okay";
287724ba675SRob Herring};
288