1*f126890aSEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2*f126890aSEmmanuel Vadot/*
3*f126890aSEmmanuel Vadot * Device tree file for Phytec PCM-947 carrier board
4*f126890aSEmmanuel Vadot * Copyright (C) 2017 PHYTEC Messtechnik GmbH
5*f126890aSEmmanuel Vadot * Author: Wadim Egorov <w.egorov@phytec.de>
6*f126890aSEmmanuel Vadot */
7*f126890aSEmmanuel Vadot
8*f126890aSEmmanuel Vadot/dts-v1/;
9*f126890aSEmmanuel Vadot
10*f126890aSEmmanuel Vadot#include <dt-bindings/input/input.h>
11*f126890aSEmmanuel Vadot#include <dt-bindings/leds/leds-pca9532.h>
12*f126890aSEmmanuel Vadot#include "rk3288-phycore-som.dtsi"
13*f126890aSEmmanuel Vadot
14*f126890aSEmmanuel Vadot/ {
15*f126890aSEmmanuel Vadot	model = "Phytec RK3288 PCM-947";
16*f126890aSEmmanuel Vadot	compatible = "phytec,rk3288-pcm-947", "phytec,rk3288-phycore-som", "rockchip,rk3288";
17*f126890aSEmmanuel Vadot
18*f126890aSEmmanuel Vadot	user_buttons: user-buttons {
19*f126890aSEmmanuel Vadot		compatible = "gpio-keys";
20*f126890aSEmmanuel Vadot		pinctrl-names = "default";
21*f126890aSEmmanuel Vadot		pinctrl-0 = <&user_button_pins>;
22*f126890aSEmmanuel Vadot
23*f126890aSEmmanuel Vadot		button-0 {
24*f126890aSEmmanuel Vadot			label = "home";
25*f126890aSEmmanuel Vadot			linux,code = <KEY_HOME>;
26*f126890aSEmmanuel Vadot			gpios = <&gpio8 0 GPIO_ACTIVE_HIGH>;
27*f126890aSEmmanuel Vadot			wakeup-source;
28*f126890aSEmmanuel Vadot		};
29*f126890aSEmmanuel Vadot
30*f126890aSEmmanuel Vadot		button-1 {
31*f126890aSEmmanuel Vadot			label = "menu";
32*f126890aSEmmanuel Vadot			linux,code = <KEY_MENU>;
33*f126890aSEmmanuel Vadot			gpios = <&gpio8 3 GPIO_ACTIVE_HIGH>;
34*f126890aSEmmanuel Vadot			wakeup-source;
35*f126890aSEmmanuel Vadot		};
36*f126890aSEmmanuel Vadot	};
37*f126890aSEmmanuel Vadot
38*f126890aSEmmanuel Vadot	vcc_host0_5v: usb-host0-regulator {
39*f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
40*f126890aSEmmanuel Vadot		gpio = <&gpio2 13 GPIO_ACTIVE_HIGH>;
41*f126890aSEmmanuel Vadot		pinctrl-names = "default";
42*f126890aSEmmanuel Vadot		pinctrl-0 = <&host0_vbus_drv>;
43*f126890aSEmmanuel Vadot		regulator-name = "vcc_host0_5v";
44*f126890aSEmmanuel Vadot		regulator-min-microvolt = <5000000>;
45*f126890aSEmmanuel Vadot		regulator-max-microvolt = <5000000>;
46*f126890aSEmmanuel Vadot		regulator-always-on;
47*f126890aSEmmanuel Vadot		vin-supply = <&vdd_in_otg_out>;
48*f126890aSEmmanuel Vadot	};
49*f126890aSEmmanuel Vadot
50*f126890aSEmmanuel Vadot	vcc_host1_5v: usb-host1-regulator {
51*f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
52*f126890aSEmmanuel Vadot		gpio = <&gpio2 0 GPIO_ACTIVE_HIGH>;
53*f126890aSEmmanuel Vadot		pinctrl-names = "default";
54*f126890aSEmmanuel Vadot		pinctrl-0 = <&host1_vbus_drv>;
55*f126890aSEmmanuel Vadot		regulator-name = "vcc_host1_5v";
56*f126890aSEmmanuel Vadot		regulator-min-microvolt = <5000000>;
57*f126890aSEmmanuel Vadot		regulator-max-microvolt = <5000000>;
58*f126890aSEmmanuel Vadot		regulator-always-on;
59*f126890aSEmmanuel Vadot		vin-supply = <&vdd_in_otg_out>;
60*f126890aSEmmanuel Vadot	};
61*f126890aSEmmanuel Vadot
62*f126890aSEmmanuel Vadot	vcc_otg_5v: usb-otg-regulator {
63*f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
64*f126890aSEmmanuel Vadot		gpio = <&gpio2 12 GPIO_ACTIVE_HIGH>;
65*f126890aSEmmanuel Vadot		pinctrl-names = "default";
66*f126890aSEmmanuel Vadot		pinctrl-0 = <&otg_vbus_drv>;
67*f126890aSEmmanuel Vadot		regulator-name = "vcc_otg_5v";
68*f126890aSEmmanuel Vadot		regulator-min-microvolt = <5000000>;
69*f126890aSEmmanuel Vadot		regulator-max-microvolt = <5000000>;
70*f126890aSEmmanuel Vadot		regulator-always-on;
71*f126890aSEmmanuel Vadot		vin-supply = <&vdd_in_otg_out>;
72*f126890aSEmmanuel Vadot	};
73*f126890aSEmmanuel Vadot};
74*f126890aSEmmanuel Vadot
75*f126890aSEmmanuel Vadot&gmac {
76*f126890aSEmmanuel Vadot	status = "okay";
77*f126890aSEmmanuel Vadot};
78*f126890aSEmmanuel Vadot
79*f126890aSEmmanuel Vadot&hdmi {
80*f126890aSEmmanuel Vadot	status = "okay";
81*f126890aSEmmanuel Vadot};
82*f126890aSEmmanuel Vadot
83*f126890aSEmmanuel Vadot&i2c1 {
84*f126890aSEmmanuel Vadot	status = "okay";
85*f126890aSEmmanuel Vadot
86*f126890aSEmmanuel Vadot	touchscreen@44 {
87*f126890aSEmmanuel Vadot		compatible = "st,stmpe811";
88*f126890aSEmmanuel Vadot		reg = <0x44>;
89*f126890aSEmmanuel Vadot	};
90*f126890aSEmmanuel Vadot
91*f126890aSEmmanuel Vadot	adc@64 {
92*f126890aSEmmanuel Vadot		compatible = "maxim,max1037";
93*f126890aSEmmanuel Vadot		reg = <0x64>;
94*f126890aSEmmanuel Vadot	};
95*f126890aSEmmanuel Vadot
96*f126890aSEmmanuel Vadot	i2c_rtc: rtc@68 {
97*f126890aSEmmanuel Vadot		compatible = "rv4162";
98*f126890aSEmmanuel Vadot		reg = <0x68>;
99*f126890aSEmmanuel Vadot		pinctrl-names = "default";
100*f126890aSEmmanuel Vadot		pinctrl-0 = <&i2c_rtc_int>;
101*f126890aSEmmanuel Vadot		interrupt-parent = <&gpio5>;
102*f126890aSEmmanuel Vadot		interrupts = <10 0>;
103*f126890aSEmmanuel Vadot	};
104*f126890aSEmmanuel Vadot};
105*f126890aSEmmanuel Vadot
106*f126890aSEmmanuel Vadot&i2c3 {
107*f126890aSEmmanuel Vadot	status = "okay";
108*f126890aSEmmanuel Vadot
109*f126890aSEmmanuel Vadot	i2c_eeprom_cb: eeprom@51 {
110*f126890aSEmmanuel Vadot		compatible = "atmel,24c32";
111*f126890aSEmmanuel Vadot		reg = <0x51>;
112*f126890aSEmmanuel Vadot		pagesize = <32>;
113*f126890aSEmmanuel Vadot	};
114*f126890aSEmmanuel Vadot};
115*f126890aSEmmanuel Vadot
116*f126890aSEmmanuel Vadot&i2c4 {
117*f126890aSEmmanuel Vadot	status = "okay";
118*f126890aSEmmanuel Vadot
119*f126890aSEmmanuel Vadot	/* PCA9533 - 4-bit LED dimmer */
120*f126890aSEmmanuel Vadot	leddim: leddimmer@62 {
121*f126890aSEmmanuel Vadot		compatible = "nxp,pca9533";
122*f126890aSEmmanuel Vadot		reg = <0x62>;
123*f126890aSEmmanuel Vadot
124*f126890aSEmmanuel Vadot		led1 {
125*f126890aSEmmanuel Vadot			label = "red:user1";
126*f126890aSEmmanuel Vadot			linux,default-trigger = "none";
127*f126890aSEmmanuel Vadot			type = <PCA9532_TYPE_LED>;
128*f126890aSEmmanuel Vadot		};
129*f126890aSEmmanuel Vadot
130*f126890aSEmmanuel Vadot		led2 {
131*f126890aSEmmanuel Vadot			label = "green:user2";
132*f126890aSEmmanuel Vadot			linux,default-trigger = "none";
133*f126890aSEmmanuel Vadot			type = <PCA9532_TYPE_LED>;
134*f126890aSEmmanuel Vadot		};
135*f126890aSEmmanuel Vadot
136*f126890aSEmmanuel Vadot		led3 {
137*f126890aSEmmanuel Vadot			label = "blue:user3";
138*f126890aSEmmanuel Vadot			linux,default-trigger = "none";
139*f126890aSEmmanuel Vadot			type = <PCA9532_TYPE_LED>;
140*f126890aSEmmanuel Vadot		};
141*f126890aSEmmanuel Vadot
142*f126890aSEmmanuel Vadot		led4 {
143*f126890aSEmmanuel Vadot			label = "red:user4";
144*f126890aSEmmanuel Vadot			linux,default-trigger = "none";
145*f126890aSEmmanuel Vadot			type = <PCA9532_TYPE_LED>;
146*f126890aSEmmanuel Vadot		};
147*f126890aSEmmanuel Vadot	};
148*f126890aSEmmanuel Vadot};
149*f126890aSEmmanuel Vadot
150*f126890aSEmmanuel Vadot&i2c5 {
151*f126890aSEmmanuel Vadot	status = "okay";
152*f126890aSEmmanuel Vadot};
153*f126890aSEmmanuel Vadot
154*f126890aSEmmanuel Vadot&pinctrl {
155*f126890aSEmmanuel Vadot	pcfg_pull_up_drv_12ma: pcfg-pull-up-drv-12ma {
156*f126890aSEmmanuel Vadot		bias-pull-up;
157*f126890aSEmmanuel Vadot		drive-strength = <12>;
158*f126890aSEmmanuel Vadot	};
159*f126890aSEmmanuel Vadot
160*f126890aSEmmanuel Vadot	buttons {
161*f126890aSEmmanuel Vadot		user_button_pins: user-button-pins {
162*f126890aSEmmanuel Vadot			/* button 1 */
163*f126890aSEmmanuel Vadot			rockchip,pins = <8 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>,
164*f126890aSEmmanuel Vadot			/* button 2 */
165*f126890aSEmmanuel Vadot					<8 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
166*f126890aSEmmanuel Vadot		};
167*f126890aSEmmanuel Vadot	};
168*f126890aSEmmanuel Vadot
169*f126890aSEmmanuel Vadot	rv4162 {
170*f126890aSEmmanuel Vadot		i2c_rtc_int: i2c-rtc-int {
171*f126890aSEmmanuel Vadot			rockchip,pins = <5 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
172*f126890aSEmmanuel Vadot		};
173*f126890aSEmmanuel Vadot	};
174*f126890aSEmmanuel Vadot
175*f126890aSEmmanuel Vadot	sdmmc {
176*f126890aSEmmanuel Vadot		/*
177*f126890aSEmmanuel Vadot		 * Default drive strength isn't enough to achieve even
178*f126890aSEmmanuel Vadot		 * high-speed mode on pcm-947 board so bump up to 12 mA.
179*f126890aSEmmanuel Vadot		 */
180*f126890aSEmmanuel Vadot		sdmmc_bus4: sdmmc-bus4 {
181*f126890aSEmmanuel Vadot			rockchip,pins = <6 RK_PC0 1 &pcfg_pull_up_drv_12ma>,
182*f126890aSEmmanuel Vadot					<6 RK_PC1 1 &pcfg_pull_up_drv_12ma>,
183*f126890aSEmmanuel Vadot					<6 RK_PC2 1 &pcfg_pull_up_drv_12ma>,
184*f126890aSEmmanuel Vadot					<6 RK_PC3 1 &pcfg_pull_up_drv_12ma>;
185*f126890aSEmmanuel Vadot		};
186*f126890aSEmmanuel Vadot
187*f126890aSEmmanuel Vadot		sdmmc_clk: sdmmc-clk {
188*f126890aSEmmanuel Vadot			rockchip,pins = <6 RK_PC4 1 &pcfg_pull_none_12ma>;
189*f126890aSEmmanuel Vadot		};
190*f126890aSEmmanuel Vadot
191*f126890aSEmmanuel Vadot		sdmmc_cmd: sdmmc-cmd {
192*f126890aSEmmanuel Vadot			rockchip,pins = <6 RK_PC5 1 &pcfg_pull_up_drv_12ma>;
193*f126890aSEmmanuel Vadot		};
194*f126890aSEmmanuel Vadot
195*f126890aSEmmanuel Vadot		sdmmc_pwr: sdmmc-pwr {
196*f126890aSEmmanuel Vadot			rockchip,pins = <7 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
197*f126890aSEmmanuel Vadot		};
198*f126890aSEmmanuel Vadot	};
199*f126890aSEmmanuel Vadot
200*f126890aSEmmanuel Vadot	touchscreen {
201*f126890aSEmmanuel Vadot		ts_irq_pin: ts-irq-pin {
202*f126890aSEmmanuel Vadot			rockchip,pins = <5 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
203*f126890aSEmmanuel Vadot		};
204*f126890aSEmmanuel Vadot	};
205*f126890aSEmmanuel Vadot
206*f126890aSEmmanuel Vadot	usb_host {
207*f126890aSEmmanuel Vadot		host0_vbus_drv: host0-vbus-drv {
208*f126890aSEmmanuel Vadot			rockchip,pins = <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
209*f126890aSEmmanuel Vadot		};
210*f126890aSEmmanuel Vadot
211*f126890aSEmmanuel Vadot		host1_vbus_drv: host1-vbus-drv {
212*f126890aSEmmanuel Vadot			rockchip,pins = <2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
213*f126890aSEmmanuel Vadot		};
214*f126890aSEmmanuel Vadot	};
215*f126890aSEmmanuel Vadot
216*f126890aSEmmanuel Vadot	usb_otg {
217*f126890aSEmmanuel Vadot		otg_vbus_drv: otg-vbus-drv {
218*f126890aSEmmanuel Vadot			rockchip,pins = <2 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
219*f126890aSEmmanuel Vadot		};
220*f126890aSEmmanuel Vadot	};
221*f126890aSEmmanuel Vadot};
222*f126890aSEmmanuel Vadot
223*f126890aSEmmanuel Vadot&sdmmc {
224*f126890aSEmmanuel Vadot	bus-width = <4>;
225*f126890aSEmmanuel Vadot	cap-mmc-highspeed;
226*f126890aSEmmanuel Vadot	cap-sd-highspeed;
227*f126890aSEmmanuel Vadot	card-detect-delay = <200>;
228*f126890aSEmmanuel Vadot	disable-wp;
229*f126890aSEmmanuel Vadot	pinctrl-names = "default";
230*f126890aSEmmanuel Vadot	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
231*f126890aSEmmanuel Vadot	sd-uhs-sdr12;
232*f126890aSEmmanuel Vadot	sd-uhs-sdr25;
233*f126890aSEmmanuel Vadot	sd-uhs-sdr50;
234*f126890aSEmmanuel Vadot	sd-uhs-sdr104;
235*f126890aSEmmanuel Vadot	vmmc-supply = <&vdd_sd>;
236*f126890aSEmmanuel Vadot	vqmmc-supply = <&vdd_io_sd>;
237*f126890aSEmmanuel Vadot	status = "okay";
238*f126890aSEmmanuel Vadot};
239*f126890aSEmmanuel Vadot
240*f126890aSEmmanuel Vadot&uart0 {
241*f126890aSEmmanuel Vadot	pinctrl-names = "default";
242*f126890aSEmmanuel Vadot	pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
243*f126890aSEmmanuel Vadot	status = "okay";
244*f126890aSEmmanuel Vadot};
245*f126890aSEmmanuel Vadot
246*f126890aSEmmanuel Vadot&uart2 {
247*f126890aSEmmanuel Vadot	status = "okay";
248*f126890aSEmmanuel Vadot};
249*f126890aSEmmanuel Vadot
250*f126890aSEmmanuel Vadot&usbphy {
251*f126890aSEmmanuel Vadot	status = "okay";
252*f126890aSEmmanuel Vadot};
253*f126890aSEmmanuel Vadot
254*f126890aSEmmanuel Vadot&usb_host0_ehci {
255*f126890aSEmmanuel Vadot	status = "okay";
256*f126890aSEmmanuel Vadot};
257*f126890aSEmmanuel Vadot
258*f126890aSEmmanuel Vadot&usb_host1 {
259*f126890aSEmmanuel Vadot	status = "okay";
260*f126890aSEmmanuel Vadot};
261*f126890aSEmmanuel Vadot
262*f126890aSEmmanuel Vadot&usb_otg {
263*f126890aSEmmanuel Vadot	status = "okay";
264*f126890aSEmmanuel Vadot};
265