Loading...
1/*
2 * Copyright (c) 2016 Andy Yan <andy.yan@rock-chips.com>
3 *
4 * This file is dual-licensed: you can use it either under the terms
5 * of the GPL or the X11 license, at your option. Note that this dual
6 * licensing only applies to this file, and not this project as a
7 * whole.
8 *
9 * a) This file is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of the
12 * License, or (at your option) any later version.
13 *
14 * This file is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * Or, alternatively,
20 *
21 * b) Permission is hereby granted, free of charge, to any person
22 * obtaining a copy of this software and associated documentation
23 * files (the "Software"), to deal in the Software without
24 * restriction, including without limitation the rights to use,
25 * copy, modify, merge, publish, distribute, sublicense, and/or
26 * sell copies of the Software, and to permit persons to whom the
27 * Software is furnished to do so, subject to the following
28 * conditions:
29 *
30 * The above copyright notice and this permission notice shall be
31 * included in all copies or substantial portions of the Software.
32 *
33 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
38 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40 * OTHER DEALINGS IN THE SOFTWARE.
41 */
42
43/dts-v1/;
44#include <dt-bindings/input/input.h>
45#include "rk3188.dtsi"
46
47/ {
48 model = "Rockchip PX3-EVB";
49 compatible = "rockchip,px3-evb", "rockchip,px3", "rockchip,rk3188";
50
51 chosen {
52 stdout-path = "serial2:115200n8";
53 };
54
55 memory@60000000 {
56 reg = <0x60000000 0x80000000>;
57 device_type = "memory";
58 };
59
60 gpio-keys {
61 compatible = "gpio-keys";
62 autorepeat;
63
64 power {
65 gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
66 linux,code = <KEY_POWER>;
67 label = "GPIO Key Power";
68 linux,input-type = <1>;
69 wakeup-source;
70 debounce-interval = <100>;
71 };
72 };
73
74 vcc_sys: vsys-regulator {
75 compatible = "regulator-fixed";
76 regulator-name = "vsys";
77 regulator-min-microvolt = <5000000>;
78 regulator-max-microvolt = <5000000>;
79 regulator-boot-on;
80 };
81};
82
83&cpu0 {
84 cpu0-supply = <&vdd_cpu>;
85};
86
87&emmc {
88 bus-width = <8>;
89 cap-mmc-highspeed;
90 disable-wp;
91 non-removable;
92 pinctrl-names = "default";
93 pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_rst>;
94 status = "okay";
95};
96
97&i2c0 {
98 status = "okay";
99
100 accelerometer@18 {
101 compatible = "bosch,bma250";
102 reg = <0x18>;
103 interrupt-parent = <&gpio0>;
104 interrupts = <RK_PB7 IRQ_TYPE_LEVEL_LOW>;
105 };
106};
107
108&i2c1 {
109 status = "okay";
110 clock-frequency = <400000>;
111
112 rk808: pmic@1c {
113 compatible = "rockchip,rk818";
114 reg = <0x1c>;
115 interrupt-parent = <&gpio0>;
116 interrupts = <RK_PB3 IRQ_TYPE_LEVEL_LOW>;
117 rockchip,system-power-controller;
118 wakeup-source;
119 #clock-cells = <1>;
120 clock-output-names = "xin32k", "rk808-clkout2";
121
122 vcc1-supply = <&vcc_sys>;
123 vcc2-supply = <&vcc_sys>;
124 vcc3-supply = <&vcc_sys>;
125 vcc4-supply = <&vcc_sys>;
126 vcc6-supply = <&vcc_sys>;
127 vcc7-supply = <&vcc_sys>;
128 vcc8-supply = <&vcc_io>;
129 vcc9-supply = <&vcc_io>;
130
131 regulators {
132 vdd_cpu: DCDC_REG1 {
133 regulator-always-on;
134 regulator-boot-on;
135 regulator-min-microvolt = <750000>;
136 regulator-max-microvolt = <1350000>;
137 regulator-name = "vdd_arm";
138 regulator-state-mem {
139 regulator-off-in-suspend;
140 };
141 };
142
143 vdd_gpu: DCDC_REG2 {
144 regulator-always-on;
145 regulator-boot-on;
146 regulator-min-microvolt = <850000>;
147 regulator-max-microvolt = <1250000>;
148 regulator-name = "vdd_gpu";
149 regulator-state-mem {
150 regulator-on-in-suspend;
151 regulator-suspend-microvolt = <1000000>;
152 };
153 };
154
155 vcc_ddr: DCDC_REG3 {
156 regulator-always-on;
157 regulator-boot-on;
158 regulator-name = "vcc_ddr";
159 regulator-state-mem {
160 regulator-on-in-suspend;
161 };
162 };
163
164 vcc_io: DCDC_REG4 {
165 regulator-always-on;
166 regulator-boot-on;
167 regulator-min-microvolt = <3300000>;
168 regulator-max-microvolt = <3300000>;
169 regulator-name = "vcc_io";
170 regulator-state-mem {
171 regulator-on-in-suspend;
172 regulator-suspend-microvolt = <3300000>;
173 };
174 };
175
176 vcc_cif: LDO_REG1 {
177 regulator-min-microvolt = <3300000>;
178 regulator-max-microvolt = <3300000>;
179 regulator-name = "vcc_cif";
180 };
181
182 vcc_jetta33: LDO_REG2 {
183 regulator-always-on;
184 regulator-boot-on;
185 regulator-min-microvolt = <3300000>;
186 regulator-max-microvolt = <3300000>;
187 regulator-name = "vcc_jetta33";
188 };
189
190 vdd_10: LDO_REG3 {
191 regulator-always-on;
192 regulator-boot-on;
193 regulator-min-microvolt = <1000000>;
194 regulator-max-microvolt = <1000000>;
195 regulator-name = "vdd_10";
196 regulator-state-mem {
197 regulator-on-in-suspend;
198 regulator-suspend-microvolt = <1000000>;
199 };
200 };
201
202 lvds_12: LDO_REG4 {
203 regulator-min-microvolt = <1800000>;
204 regulator-max-microvolt = <1800000>;
205 regulator-name = "lvds_12";
206 };
207
208 lvds_25: LDO_REG5 {
209 regulator-min-microvolt = <1800000>;
210 regulator-max-microvolt = <3300000>;
211 regulator-name = "lvds_25";
212 };
213
214 cif_18: LDO_REG6 {
215 regulator-min-microvolt = <1000000>;
216 regulator-max-microvolt = <1000000>;
217 regulator-name = "cif_18";
218 };
219
220 vcc_sd: LDO_REG7 {
221 regulator-min-microvolt = <1800000>;
222 regulator-max-microvolt = <3300000>;
223 regulator-name = "vcc_sd";
224 regulator-state-mem {
225 regulator-on-in-suspend;
226 regulator-suspend-microvolt = <3300000>;
227 };
228 };
229
230 wl_18: LDO_REG8 {
231 regulator-min-microvolt = <1800000>;
232 regulator-max-microvolt = <3300000>;
233 regulator-name = "wl_18";
234 };
235
236 lcd_33: SWITCH_REG1 {
237 regulator-name = "lcd_33";
238 };
239 };
240 };
241
242};
243
244&i2c2 {
245 gsl1680: touchscreen@40 {
246 compatible = "silead,gsl1680";
247 reg = <0x40>;
248 interrupt-parent = <&gpio1>;
249 interrupts = <RK_PB7 IRQ_TYPE_EDGE_FALLING>;
250 power-gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
251 touchscreen-size-x = <800>;
252 touchscreen-size-y = <1280>;
253 silead,max-fingers = <5>;
254 };
255};
256
257&mmc0 {
258 status = "okay";
259 pinctrl-names = "default";
260 pinctrl-0 = <&sd0_clk>, <&sd0_cmd>, <&sd0_cd>, <&sd0_bus4>;
261 vmmc-supply = <&vcc_sd>;
262
263 bus-width = <4>;
264 cap-mmc-highspeed;
265 cap-sd-highspeed;
266 disable-wp;
267};
268
269&pinctrl {
270 pcfg_output_low: pcfg-output-low {
271 output-low;
272 };
273
274 usb {
275 host_vbus_drv: host-vbus-drv {
276 rockchip,pins = <0 3 RK_FUNC_GPIO &pcfg_pull_none>;
277 };
278 otg_vbus_drv: otg-vbus-drv {
279 rockchip,pins = <2 31 RK_FUNC_GPIO &pcfg_pull_none>;
280 };
281 };
282};
283
284&pwm1 {
285 status = "okay";
286};
287
288&pwm2 {
289 status = "okay";
290};
291
292&pwm3 {
293 status = "okay";
294};
295
296&uart0 {
297 status = "okay";
298};
299
300&uart1 {
301 status = "okay";
302};
303
304&uart2 {
305 status = "okay";
306};
307
308&uart3 {
309 status = "okay";
310};
311
312&usbphy {
313 status = "okay";
314};
315
316&usb_host {
317 status = "okay";
318};
319
320&usb_otg {
321 status = "okay";
322};
323
324&wdt {
325 status = "okay";
326};
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2016 Andy Yan <andy.yan@rock-chips.com>
4 */
5
6/dts-v1/;
7#include <dt-bindings/input/input.h>
8#include "rk3188.dtsi"
9
10/ {
11 model = "Rockchip PX3-EVB";
12 compatible = "rockchip,px3-evb", "rockchip,px3", "rockchip,rk3188";
13
14 aliases {
15 mmc0 = &mmc0;
16 mmc1 = &emmc;
17 };
18
19 chosen {
20 stdout-path = "serial2:115200n8";
21 };
22
23 memory@60000000 {
24 reg = <0x60000000 0x80000000>;
25 device_type = "memory";
26 };
27
28 gpio-keys {
29 compatible = "gpio-keys";
30 autorepeat;
31
32 power {
33 gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
34 linux,code = <KEY_POWER>;
35 label = "GPIO Key Power";
36 linux,input-type = <1>;
37 wakeup-source;
38 debounce-interval = <100>;
39 };
40 };
41
42 vcc_sys: vsys-regulator {
43 compatible = "regulator-fixed";
44 regulator-name = "vsys";
45 regulator-min-microvolt = <5000000>;
46 regulator-max-microvolt = <5000000>;
47 regulator-boot-on;
48 };
49};
50
51&cpu0 {
52 cpu-supply = <&vdd_cpu>;
53};
54
55&cpu1 {
56 cpu-supply = <&vdd_cpu>;
57};
58
59&cpu2 {
60 cpu-supply = <&vdd_cpu>;
61};
62
63&cpu3 {
64 cpu-supply = <&vdd_cpu>;
65};
66
67&emmc {
68 bus-width = <8>;
69 cap-mmc-highspeed;
70 non-removable;
71 pinctrl-names = "default";
72 pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_rst>;
73 status = "okay";
74};
75
76&i2c0 {
77 status = "okay";
78
79 accelerometer@18 {
80 compatible = "bosch,bma250";
81 reg = <0x18>;
82 interrupt-parent = <&gpio0>;
83 interrupts = <RK_PB7 IRQ_TYPE_LEVEL_LOW>;
84 };
85};
86
87&i2c1 {
88 status = "okay";
89 clock-frequency = <400000>;
90
91 rk808: pmic@1c {
92 compatible = "rockchip,rk818";
93 reg = <0x1c>;
94 interrupt-parent = <&gpio0>;
95 interrupts = <RK_PB3 IRQ_TYPE_LEVEL_LOW>;
96 rockchip,system-power-controller;
97 wakeup-source;
98 #clock-cells = <1>;
99 clock-output-names = "xin32k", "rk808-clkout2";
100
101 vcc1-supply = <&vcc_sys>;
102 vcc2-supply = <&vcc_sys>;
103 vcc3-supply = <&vcc_sys>;
104 vcc4-supply = <&vcc_sys>;
105 vcc6-supply = <&vcc_sys>;
106 vcc7-supply = <&vcc_sys>;
107 vcc8-supply = <&vcc_io>;
108 vcc9-supply = <&vcc_io>;
109
110 regulators {
111 vdd_cpu: DCDC_REG1 {
112 regulator-always-on;
113 regulator-boot-on;
114 regulator-min-microvolt = <750000>;
115 regulator-max-microvolt = <1350000>;
116 regulator-name = "vdd_arm";
117 regulator-state-mem {
118 regulator-off-in-suspend;
119 };
120 };
121
122 vdd_gpu: DCDC_REG2 {
123 regulator-always-on;
124 regulator-boot-on;
125 regulator-min-microvolt = <850000>;
126 regulator-max-microvolt = <1250000>;
127 regulator-name = "vdd_gpu";
128 regulator-state-mem {
129 regulator-on-in-suspend;
130 regulator-suspend-microvolt = <1000000>;
131 };
132 };
133
134 vcc_ddr: DCDC_REG3 {
135 regulator-always-on;
136 regulator-boot-on;
137 regulator-name = "vcc_ddr";
138 regulator-state-mem {
139 regulator-on-in-suspend;
140 };
141 };
142
143 vcc_io: DCDC_REG4 {
144 regulator-always-on;
145 regulator-boot-on;
146 regulator-min-microvolt = <3300000>;
147 regulator-max-microvolt = <3300000>;
148 regulator-name = "vcc_io";
149 regulator-state-mem {
150 regulator-on-in-suspend;
151 regulator-suspend-microvolt = <3300000>;
152 };
153 };
154
155 vcc_cif: LDO_REG1 {
156 regulator-min-microvolt = <3300000>;
157 regulator-max-microvolt = <3300000>;
158 regulator-name = "vcc_cif";
159 };
160
161 vcc_jetta33: LDO_REG2 {
162 regulator-always-on;
163 regulator-boot-on;
164 regulator-min-microvolt = <3300000>;
165 regulator-max-microvolt = <3300000>;
166 regulator-name = "vcc_jetta33";
167 };
168
169 vdd_10: LDO_REG3 {
170 regulator-always-on;
171 regulator-boot-on;
172 regulator-min-microvolt = <1000000>;
173 regulator-max-microvolt = <1000000>;
174 regulator-name = "vdd_10";
175 regulator-state-mem {
176 regulator-on-in-suspend;
177 regulator-suspend-microvolt = <1000000>;
178 };
179 };
180
181 lvds_12: LDO_REG4 {
182 regulator-min-microvolt = <1800000>;
183 regulator-max-microvolt = <1800000>;
184 regulator-name = "lvds_12";
185 };
186
187 lvds_25: LDO_REG5 {
188 regulator-min-microvolt = <1800000>;
189 regulator-max-microvolt = <3300000>;
190 regulator-name = "lvds_25";
191 };
192
193 cif_18: LDO_REG6 {
194 regulator-min-microvolt = <1000000>;
195 regulator-max-microvolt = <1000000>;
196 regulator-name = "cif_18";
197 };
198
199 vcc_sd: LDO_REG7 {
200 regulator-min-microvolt = <1800000>;
201 regulator-max-microvolt = <3300000>;
202 regulator-name = "vcc_sd";
203 regulator-state-mem {
204 regulator-on-in-suspend;
205 regulator-suspend-microvolt = <3300000>;
206 };
207 };
208
209 wl_18: LDO_REG8 {
210 regulator-min-microvolt = <1800000>;
211 regulator-max-microvolt = <3300000>;
212 regulator-name = "wl_18";
213 };
214
215 lcd_33: SWITCH_REG1 {
216 regulator-name = "lcd_33";
217 };
218 };
219 };
220
221};
222
223&i2c2 {
224 gsl1680: touchscreen@40 {
225 compatible = "silead,gsl1680";
226 reg = <0x40>;
227 interrupt-parent = <&gpio1>;
228 interrupts = <RK_PB7 IRQ_TYPE_EDGE_FALLING>;
229 power-gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
230 touchscreen-size-x = <800>;
231 touchscreen-size-y = <1280>;
232 silead,max-fingers = <5>;
233 };
234};
235
236&mmc0 {
237 status = "okay";
238 pinctrl-names = "default";
239 pinctrl-0 = <&sd0_clk>, <&sd0_cmd>, <&sd0_cd>, <&sd0_bus4>;
240 vmmc-supply = <&vcc_sd>;
241
242 bus-width = <4>;
243 cap-mmc-highspeed;
244 cap-sd-highspeed;
245 disable-wp;
246};
247
248&pinctrl {
249 pcfg_output_low: pcfg-output-low {
250 output-low;
251 };
252
253 usb {
254 host_vbus_drv: host-vbus-drv {
255 rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
256 };
257 otg_vbus_drv: otg-vbus-drv {
258 rockchip,pins = <2 RK_PD7 RK_FUNC_GPIO &pcfg_pull_none>;
259 };
260 };
261};
262
263&pwm1 {
264 status = "okay";
265};
266
267&pwm2 {
268 status = "okay";
269};
270
271&pwm3 {
272 status = "okay";
273};
274
275&uart0 {
276 status = "okay";
277};
278
279&uart1 {
280 status = "okay";
281};
282
283&uart2 {
284 status = "okay";
285};
286
287&uart3 {
288 status = "okay";
289};
290
291&usbphy {
292 status = "okay";
293};
294
295&usb_host {
296 status = "okay";
297};
298
299&usb_otg {
300 status = "okay";
301};
302
303&wdt {
304 status = "okay";
305};