xref: /OK3568_Linux_fs/u-boot/arch/arm/dts/rk3288-phycore-rdk.dts (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun/*
2*4882a593Smuzhiyun * Device tree file for Phytec PCM-947 carrier board
3*4882a593Smuzhiyun * Copyright (C) 2017 PHYTEC Messtechnik GmbH
4*4882a593Smuzhiyun * Author: Wadim Egorov <w.egorov@phytec.de>
5*4882a593Smuzhiyun *
6*4882a593Smuzhiyun * This file is dual-licensed: you can use it either under the terms
7*4882a593Smuzhiyun * of the GPL or the X11 license, at your option. Note that this dual
8*4882a593Smuzhiyun * licensing only applies to this file, and not this project as a
9*4882a593Smuzhiyun * whole.
10*4882a593Smuzhiyun *
11*4882a593Smuzhiyun *  a) This file is free software; you can redistribute it and/or
12*4882a593Smuzhiyun *     modify it under the terms of the GNU General Public License as
13*4882a593Smuzhiyun *     published by the Free Software Foundation; either version 2 of the
14*4882a593Smuzhiyun *     License, or (at your option) any later version.
15*4882a593Smuzhiyun *
16*4882a593Smuzhiyun *     This file is distributed in the hope that it will be useful,
17*4882a593Smuzhiyun *     but WITHOUT ANY WARRANTY; without even the implied warranty of
18*4882a593Smuzhiyun *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19*4882a593Smuzhiyun *     GNU General Public License for more details.
20*4882a593Smuzhiyun *
21*4882a593Smuzhiyun * Or, alternatively,
22*4882a593Smuzhiyun *
23*4882a593Smuzhiyun *  b) Permission is hereby granted, free of charge, to any person
24*4882a593Smuzhiyun *     obtaining a copy of this software and associated documentation
25*4882a593Smuzhiyun *     files (the "Software"), to deal in the Software without
26*4882a593Smuzhiyun *     restriction, including without limitation the rights to use,
27*4882a593Smuzhiyun *     copy, modify, merge, publish, distribute, sublicense, and/or
28*4882a593Smuzhiyun *     sell copies of the Software, and to permit persons to whom the
29*4882a593Smuzhiyun *     Software is furnished to do so, subject to the following
30*4882a593Smuzhiyun *     conditions:
31*4882a593Smuzhiyun *
32*4882a593Smuzhiyun *     The above copyright notice and this permission notice shall be
33*4882a593Smuzhiyun *     included in all copies or substantial portions of the Software.
34*4882a593Smuzhiyun *
35*4882a593Smuzhiyun *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
36*4882a593Smuzhiyun *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
37*4882a593Smuzhiyun *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
38*4882a593Smuzhiyun *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
39*4882a593Smuzhiyun *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
40*4882a593Smuzhiyun *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
41*4882a593Smuzhiyun *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
42*4882a593Smuzhiyun *     OTHER DEALINGS IN THE SOFTWARE.
43*4882a593Smuzhiyun */
44*4882a593Smuzhiyun
45*4882a593Smuzhiyun/dts-v1/;
46*4882a593Smuzhiyun
47*4882a593Smuzhiyun#include <dt-bindings/input/input.h>
48*4882a593Smuzhiyun#include "rk3288-phycore-som.dtsi"
49*4882a593Smuzhiyun
50*4882a593Smuzhiyun/ {
51*4882a593Smuzhiyun	model = "Phytec RK3288 PCM-947";
52*4882a593Smuzhiyun	compatible = "phytec,rk3288-pcm-947", "phytec,rk3288-phycore-som", "rockchip,rk3288";
53*4882a593Smuzhiyun
54*4882a593Smuzhiyun	chosen {
55*4882a593Smuzhiyun		stdout-path = &uart2;
56*4882a593Smuzhiyun		u-boot,spl-boot-order = &emmc;
57*4882a593Smuzhiyun	};
58*4882a593Smuzhiyun
59*4882a593Smuzhiyun	user_buttons: user-buttons {
60*4882a593Smuzhiyun		compatible = "gpio-keys";
61*4882a593Smuzhiyun		pinctrl-names = "default";
62*4882a593Smuzhiyun		pinctrl-0 = <&user_button_pins>;
63*4882a593Smuzhiyun
64*4882a593Smuzhiyun		button@0 {
65*4882a593Smuzhiyun			label = "home";
66*4882a593Smuzhiyun			linux,code = <KEY_HOME>;
67*4882a593Smuzhiyun			gpios = <&gpio8 0 GPIO_ACTIVE_HIGH>;
68*4882a593Smuzhiyun			wakeup-source;
69*4882a593Smuzhiyun		};
70*4882a593Smuzhiyun
71*4882a593Smuzhiyun		button@1 {
72*4882a593Smuzhiyun			label = "menu";
73*4882a593Smuzhiyun			linux,code = <KEY_MENU>;
74*4882a593Smuzhiyun			gpios = <&gpio8 3 GPIO_ACTIVE_HIGH>;
75*4882a593Smuzhiyun			wakeup-source;
76*4882a593Smuzhiyun		};
77*4882a593Smuzhiyun	};
78*4882a593Smuzhiyun
79*4882a593Smuzhiyun	vcc_host0_5v: usb-host0-regulator {
80*4882a593Smuzhiyun		compatible = "regulator-fixed";
81*4882a593Smuzhiyun		gpio = <&gpio2 13 GPIO_ACTIVE_HIGH>;
82*4882a593Smuzhiyun		pinctrl-names = "default";
83*4882a593Smuzhiyun		pinctrl-0 = <&host0_vbus_drv>;
84*4882a593Smuzhiyun		regulator-name = "vcc_host0_5v";
85*4882a593Smuzhiyun		regulator-min-microvolt = <5000000>;
86*4882a593Smuzhiyun		regulator-max-microvolt = <5000000>;
87*4882a593Smuzhiyun		regulator-always-on;
88*4882a593Smuzhiyun		vin-supply = <&vdd_in_otg_out>;
89*4882a593Smuzhiyun	};
90*4882a593Smuzhiyun
91*4882a593Smuzhiyun	vcc_host1_5v: usb-host1-regulator {
92*4882a593Smuzhiyun		compatible = "regulator-fixed";
93*4882a593Smuzhiyun		gpio = <&gpio2 0 GPIO_ACTIVE_HIGH>;
94*4882a593Smuzhiyun		pinctrl-names = "default";
95*4882a593Smuzhiyun		pinctrl-0 = <&host1_vbus_drv>;
96*4882a593Smuzhiyun		regulator-name = "vcc_host1_5v";
97*4882a593Smuzhiyun		regulator-min-microvolt = <5000000>;
98*4882a593Smuzhiyun		regulator-max-microvolt = <5000000>;
99*4882a593Smuzhiyun		regulator-always-on;
100*4882a593Smuzhiyun		vin-supply = <&vdd_in_otg_out>;
101*4882a593Smuzhiyun	};
102*4882a593Smuzhiyun
103*4882a593Smuzhiyun	vcc_otg_5v: usb-otg-regulator {
104*4882a593Smuzhiyun		compatible = "regulator-fixed";
105*4882a593Smuzhiyun		gpio = <&gpio2 12 GPIO_ACTIVE_HIGH>;
106*4882a593Smuzhiyun		pinctrl-names = "default";
107*4882a593Smuzhiyun		pinctrl-0 = <&otg_vbus_drv>;
108*4882a593Smuzhiyun		regulator-name = "vcc_otg_5v";
109*4882a593Smuzhiyun		regulator-min-microvolt = <5000000>;
110*4882a593Smuzhiyun		regulator-max-microvolt = <5000000>;
111*4882a593Smuzhiyun		regulator-always-on;
112*4882a593Smuzhiyun		vin-supply = <&vdd_in_otg_out>;
113*4882a593Smuzhiyun	};
114*4882a593Smuzhiyun};
115*4882a593Smuzhiyun
116*4882a593Smuzhiyun&dmc {
117*4882a593Smuzhiyun	rockchip,num-channels = <2>;
118*4882a593Smuzhiyun	rockchip,pctl-timing = <0x29a 0xc8 0x1f8 0x42 0x4e 0x4 0xea 0xa
119*4882a593Smuzhiyun		0x5 0x0 0xa 0x7 0x19 0x24 0xa 0x7
120*4882a593Smuzhiyun		0x5 0xa 0x5 0x200 0x5 0x10 0x40 0x0
121*4882a593Smuzhiyun		0x1 0x7 0x7 0x4 0xc 0x43 0x100 0x0
122*4882a593Smuzhiyun		0x5 0x0>;
123*4882a593Smuzhiyun	rockchip,phy-timing = <0x48f9aab4 0xea0910 0x1002c200
124*4882a593Smuzhiyun		0xa60 0x40 0x10 0x0>;
125*4882a593Smuzhiyun	rockchip,sdram-channel = /bits/ 8 <0x1 0xa 0x3 0x2 0x1 0x0 0xe 0xe>;
126*4882a593Smuzhiyun	rockchip,sdram-params = <0x30B25564 0x627 3 666000000 3 5 1>;
127*4882a593Smuzhiyun};
128*4882a593Smuzhiyun
129*4882a593Smuzhiyun&gmac {
130*4882a593Smuzhiyun	status = "okay";
131*4882a593Smuzhiyun};
132*4882a593Smuzhiyun
133*4882a593Smuzhiyun&hdmi {
134*4882a593Smuzhiyun	status = "okay";
135*4882a593Smuzhiyun};
136*4882a593Smuzhiyun
137*4882a593Smuzhiyun&i2c1 {
138*4882a593Smuzhiyun	status = "okay";
139*4882a593Smuzhiyun
140*4882a593Smuzhiyun	touchscreen@44 {
141*4882a593Smuzhiyun		compatible = "st,stmpe811";
142*4882a593Smuzhiyun		reg = <0x44>;
143*4882a593Smuzhiyun	};
144*4882a593Smuzhiyun
145*4882a593Smuzhiyun	adc@64 {
146*4882a593Smuzhiyun		compatible = "maxim,max1037";
147*4882a593Smuzhiyun		reg = <0x64>;
148*4882a593Smuzhiyun	};
149*4882a593Smuzhiyun
150*4882a593Smuzhiyun	i2c_rtc: rtc@68 {
151*4882a593Smuzhiyun		compatible = "rv4162";
152*4882a593Smuzhiyun		reg = <0x68>;
153*4882a593Smuzhiyun		pinctrl-names = "default";
154*4882a593Smuzhiyun		pinctrl-0 = <&i2c_rtc_int>;
155*4882a593Smuzhiyun		interrupt-parent = <&gpio5>;
156*4882a593Smuzhiyun		interrupts = <10 0>;
157*4882a593Smuzhiyun	};
158*4882a593Smuzhiyun};
159*4882a593Smuzhiyun
160*4882a593Smuzhiyun&i2c3 {
161*4882a593Smuzhiyun	status = "okay";
162*4882a593Smuzhiyun
163*4882a593Smuzhiyun	i2c_eeprom_cb: eeprom@51 {
164*4882a593Smuzhiyun		compatible = "atmel,24c32";
165*4882a593Smuzhiyun		reg = <0x51>;
166*4882a593Smuzhiyun		pagesize = <32>;
167*4882a593Smuzhiyun	};
168*4882a593Smuzhiyun};
169*4882a593Smuzhiyun
170*4882a593Smuzhiyun&i2c4 {
171*4882a593Smuzhiyun	status = "okay";
172*4882a593Smuzhiyun};
173*4882a593Smuzhiyun
174*4882a593Smuzhiyun&i2c5 {
175*4882a593Smuzhiyun	status = "okay";
176*4882a593Smuzhiyun};
177*4882a593Smuzhiyun
178*4882a593Smuzhiyun&pinctrl {
179*4882a593Smuzhiyun	u-boot,dm-pre-reloc;
180*4882a593Smuzhiyun
181*4882a593Smuzhiyun	pcfg_pull_up_drv_12ma: pcfg-pull-up-drv-12ma {
182*4882a593Smuzhiyun		bias-pull-up;
183*4882a593Smuzhiyun		drive-strength = <12>;
184*4882a593Smuzhiyun	};
185*4882a593Smuzhiyun
186*4882a593Smuzhiyun	buttons {
187*4882a593Smuzhiyun		user_button_pins: user-button-pins {
188*4882a593Smuzhiyun			/* button 1 */
189*4882a593Smuzhiyun			rockchip,pins = <8 3 RK_FUNC_GPIO &pcfg_pull_up>,
190*4882a593Smuzhiyun			/* button 2 */
191*4882a593Smuzhiyun					<8 0 RK_FUNC_GPIO &pcfg_pull_up>;
192*4882a593Smuzhiyun		};
193*4882a593Smuzhiyun	};
194*4882a593Smuzhiyun
195*4882a593Smuzhiyun	rv4162 {
196*4882a593Smuzhiyun		i2c_rtc_int: i2c-rtc-int {
197*4882a593Smuzhiyun			rockchip,pins = <5 10 RK_FUNC_GPIO &pcfg_pull_up>;
198*4882a593Smuzhiyun		};
199*4882a593Smuzhiyun	};
200*4882a593Smuzhiyun
201*4882a593Smuzhiyun	sdmmc {
202*4882a593Smuzhiyun		/*
203*4882a593Smuzhiyun		 * Default drive strength isn't enough to achieve even
204*4882a593Smuzhiyun		 * high-speed mode on pcm-947 board so bump up to 12 mA.
205*4882a593Smuzhiyun		 */
206*4882a593Smuzhiyun		sdmmc_bus4: sdmmc-bus4 {
207*4882a593Smuzhiyun			rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up_drv_12ma>,
208*4882a593Smuzhiyun					<6 17 RK_FUNC_1 &pcfg_pull_up_drv_12ma>,
209*4882a593Smuzhiyun					<6 18 RK_FUNC_1 &pcfg_pull_up_drv_12ma>,
210*4882a593Smuzhiyun					<6 19 RK_FUNC_1 &pcfg_pull_up_drv_12ma>;
211*4882a593Smuzhiyun		};
212*4882a593Smuzhiyun
213*4882a593Smuzhiyun		sdmmc_clk: sdmmc-clk {
214*4882a593Smuzhiyun			rockchip,pins = <6 20 RK_FUNC_1 &pcfg_pull_none_12ma>;
215*4882a593Smuzhiyun		};
216*4882a593Smuzhiyun
217*4882a593Smuzhiyun		sdmmc_cmd: sdmmc-cmd {
218*4882a593Smuzhiyun			rockchip,pins = <6 21 RK_FUNC_1 &pcfg_pull_up_drv_12ma>;
219*4882a593Smuzhiyun		};
220*4882a593Smuzhiyun
221*4882a593Smuzhiyun		sdmmc_pwr: sdmmc-pwr {
222*4882a593Smuzhiyun			rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
223*4882a593Smuzhiyun		};
224*4882a593Smuzhiyun	};
225*4882a593Smuzhiyun
226*4882a593Smuzhiyun	touchscreen {
227*4882a593Smuzhiyun		ts_irq_pin: ts-irq-pin {
228*4882a593Smuzhiyun			rockchip,pins = <5 15 RK_FUNC_GPIO &pcfg_pull_none>;
229*4882a593Smuzhiyun		};
230*4882a593Smuzhiyun	};
231*4882a593Smuzhiyun
232*4882a593Smuzhiyun	usb_host {
233*4882a593Smuzhiyun		host0_vbus_drv: host0-vbus-drv {
234*4882a593Smuzhiyun			rockchip,pins = <2 13 RK_FUNC_GPIO &pcfg_pull_none>;
235*4882a593Smuzhiyun		};
236*4882a593Smuzhiyun
237*4882a593Smuzhiyun		host1_vbus_drv: host1-vbus-drv {
238*4882a593Smuzhiyun			rockchip,pins = <2 0 RK_FUNC_GPIO &pcfg_pull_none>;
239*4882a593Smuzhiyun		};
240*4882a593Smuzhiyun	};
241*4882a593Smuzhiyun
242*4882a593Smuzhiyun	usb_otg {
243*4882a593Smuzhiyun		otg_vbus_drv: otg-vbus-drv {
244*4882a593Smuzhiyun			rockchip,pins = <2 12 RK_FUNC_GPIO &pcfg_pull_none>;
245*4882a593Smuzhiyun		};
246*4882a593Smuzhiyun	};
247*4882a593Smuzhiyun};
248*4882a593Smuzhiyun
249*4882a593Smuzhiyun&sdmmc {
250*4882a593Smuzhiyun	u-boot,dm-pre-reloc;
251*4882a593Smuzhiyun
252*4882a593Smuzhiyun	bus-width = <4>;
253*4882a593Smuzhiyun	cap-mmc-highspeed;
254*4882a593Smuzhiyun	cap-sd-highspeed;
255*4882a593Smuzhiyun	card-detect-delay = <200>;
256*4882a593Smuzhiyun	disable-wp;
257*4882a593Smuzhiyun	num-slots = <1>;
258*4882a593Smuzhiyun	pinctrl-names = "default";
259*4882a593Smuzhiyun	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
260*4882a593Smuzhiyun	vmmc-supply = <&vdd_io_sd>;
261*4882a593Smuzhiyun	vqmmc-supply = <&vdd_io_sd>;
262*4882a593Smuzhiyun	status = "okay";
263*4882a593Smuzhiyun};
264*4882a593Smuzhiyun
265*4882a593Smuzhiyun&uart0 {
266*4882a593Smuzhiyun	pinctrl-names = "default";
267*4882a593Smuzhiyun	pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
268*4882a593Smuzhiyun	status = "okay";
269*4882a593Smuzhiyun};
270*4882a593Smuzhiyun
271*4882a593Smuzhiyun&uart2 {
272*4882a593Smuzhiyun	u-boot,dm-pre-reloc;
273*4882a593Smuzhiyun	status = "okay";
274*4882a593Smuzhiyun};
275*4882a593Smuzhiyun
276*4882a593Smuzhiyun&usbphy {
277*4882a593Smuzhiyun	status = "okay";
278*4882a593Smuzhiyun};
279*4882a593Smuzhiyun
280*4882a593Smuzhiyun&usb_host0_ehci {
281*4882a593Smuzhiyun	status = "okay";
282*4882a593Smuzhiyun};
283*4882a593Smuzhiyun
284*4882a593Smuzhiyun&usb_host1 {
285*4882a593Smuzhiyun	status = "okay";
286*4882a593Smuzhiyun};
287*4882a593Smuzhiyun
288*4882a593Smuzhiyun&usb_otg {
289*4882a593Smuzhiyun	status = "okay";
290*4882a593Smuzhiyun};
291