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