blob: 400cbf9609e3707b7792139bba326c947df81fe8 [file] [log] [blame]
FUKAUMI Naoki11ff8c82015-01-25 21:39:36 +09001/*
2 * Copyright (c) 2014, 2015 FUKAUMI Naoki <naobsd@gmail.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/;
Heiko Stuebner8b30c892016-03-31 20:24:29 +020044#include <dt-bindings/input/input.h>
FUKAUMI Naoki11ff8c82015-01-25 21:39:36 +090045#include "rk3066a.dtsi"
46
47/ {
48 model = "Rayeager PX2";
49 compatible = "chipspark,rayeager-px2", "rockchip,rk3066a";
50
Javier Martinez Canillasadc9e3a2016-09-09 10:01:09 -040051 memory@60000000 {
Heiko Stuebner6158e6d2015-07-15 20:57:21 +020052 device_type = "memory";
FUKAUMI Naoki11ff8c82015-01-25 21:39:36 +090053 reg = <0x60000000 0x40000000>;
54 };
55
56 ir: ir-receiver {
57 compatible = "gpio-ir-receiver";
Andy Yane9e79d52016-10-22 20:54:55 +080058 gpios = <&gpio6 RK_PA1 GPIO_ACTIVE_LOW>;
FUKAUMI Naoki11ff8c82015-01-25 21:39:36 +090059 pinctrl-names = "default";
60 pinctrl-0 = <&ir_int>;
61 };
62
63 keys: gpio-keys {
64 compatible = "gpio-keys";
FUKAUMI Naoki11ff8c82015-01-25 21:39:36 +090065
Heiko Stuebner8b30c892016-03-31 20:24:29 +020066 power {
Sudeep Holla4f66f242016-02-08 21:55:12 +000067 wakeup-source;
Andy Yane9e79d52016-10-22 20:54:55 +080068 gpios = <&gpio6 RK_PA2 GPIO_ACTIVE_LOW>;
FUKAUMI Naoki11ff8c82015-01-25 21:39:36 +090069 label = "GPIO Power";
Heiko Stuebner8b30c892016-03-31 20:24:29 +020070 linux,code = <KEY_POWER>;
FUKAUMI Naoki11ff8c82015-01-25 21:39:36 +090071 pinctrl-names = "default";
72 pinctrl-0 = <&pwr_key>;
73 };
74 };
75
Andy Yanac79e0e2016-01-15 21:26:18 +080076 vdd_log: vdd-log {
77 compatible = "pwm-regulator";
78 pwms = <&pwm3 0 1000>;
79 regulator-name = "vdd_log";
80 regulator-min-microvolt = <1200000>;
81 regulator-max-microvolt = <1200000>;
82 regulator-always-on;
83 voltage-table = <1000000 100>,
84 <1200000 42>;
85 status = "okay";
86 };
87
FUKAUMI Naoki11ff8c82015-01-25 21:39:36 +090088 vsys: vsys-regulator {
89 compatible = "regulator-fixed";
90 regulator-name = "vsys";
91 regulator-min-microvolt = <5000000>;
92 regulator-max-microvolt = <5000000>;
93 regulator-always-on;
94 regulator-boot-on;
95 };
96
97 /* input for 5V_STDBY is VSYS or DC5V, selectable by jumper J4 */
98 vcc_stdby: 5v-stdby-regulator {
99 compatible = "regulator-fixed";
100 regulator-name = "5v_stdby";
101 regulator-min-microvolt = <5000000>;
102 regulator-max-microvolt = <5000000>;
103 regulator-always-on;
104 regulator-boot-on;
105 };
106
107 vcc_emmc: emmc-regulator {
108 compatible = "regulator-fixed";
109 regulator-name = "emmc_vccq";
110 regulator-min-microvolt = <3000000>;
111 regulator-max-microvolt = <3000000>;
112 vin-supply = <&vsys>;
113 };
114
115 vcc_sata: sata-regulator {
116 compatible = "regulator-fixed";
117 enable-active-high;
Andy Yane9e79d52016-10-22 20:54:55 +0800118 gpio = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>;
FUKAUMI Naoki11ff8c82015-01-25 21:39:36 +0900119 pinctrl-names = "default";
120 pinctrl-0 = <&sata_pwr>;
121 regulator-name = "usb_5v";
122 regulator-min-microvolt = <5000000>;
123 regulator-max-microvolt = <5000000>;
124 regulator-always-on;
125 vin-supply = <&vcc_stdby>;
126 };
127
128 vcc_sd: sdmmc-regulator {
129 compatible = "regulator-fixed";
Andy Yane9e79d52016-10-22 20:54:55 +0800130 gpio = <&gpio3 RK_PA7 GPIO_ACTIVE_LOW>;
FUKAUMI Naoki11ff8c82015-01-25 21:39:36 +0900131 pinctrl-names = "default";
132 pinctrl-0 = <&sdmmc_pwr>;
133 regulator-name = "vcc_sd";
134 regulator-min-microvolt = <3300000>;
135 regulator-max-microvolt = <3300000>;
136 startup-delay-us = <100000>;
137 vin-supply = <&vcc_io>;
138 };
139
140 vcc_host: usb-host-regulator {
141 compatible = "regulator-fixed";
142 enable-active-high;
Andy Yane9e79d52016-10-22 20:54:55 +0800143 gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
FUKAUMI Naoki11ff8c82015-01-25 21:39:36 +0900144 pinctrl-names = "default";
145 pinctrl-0 = <&host_drv>;
146 regulator-name = "host-pwr";
147 regulator-min-microvolt = <5000000>;
148 regulator-max-microvolt = <5000000>;
149 regulator-always-on;
150 vin-supply = <&vcc_stdby>;
151 };
152
153 vcc_otg: usb-otg-regulator {
154 compatible = "regulator-fixed";
155 enable-active-high;
Andy Yane9e79d52016-10-22 20:54:55 +0800156 gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
FUKAUMI Naoki11ff8c82015-01-25 21:39:36 +0900157 pinctrl-names = "default";
158 pinctrl-0 = <&otg_drv>;
159 regulator-name = "vcc_otg";
160 regulator-min-microvolt = <5000000>;
161 regulator-max-microvolt = <5000000>;
162 regulator-always-on;
163 vin-supply = <&vcc_stdby>;
164 };
165};
166
167&cpu0 {
168 cpu0-supply = <&vdd_arm>;
169};
170
171&emac {
172 pinctrl-names = "default";
173 pinctrl-0 = <&emac_xfer>, <&emac_mdio>, <&rmii_rst>;
174 phy = <&phy0>;
175 phy-supply = <&vcc_rmii>;
176 status = "okay";
177
178 phy0: ethernet-phy@0 {
179 reg = <0>;
180 };
181};
182
183&emmc {
FUKAUMI Naoki11ff8c82015-01-25 21:39:36 +0900184 bus-width = <8>;
185 cap-mmc-highspeed;
186 disable-wp;
187 non-removable;
FUKAUMI Naoki11ff8c82015-01-25 21:39:36 +0900188 pinctrl-names = "default";
189 pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_rst>;
190 vmmc-supply = <&vcc_emmc>;
191 vqmmc-supply = <&vcc_emmc>;
192 status = "okay";
193};
194
195&i2c0 {
196 clock-frequency = <400000>;
197 status = "okay";
198
199 ak8963: ak8963@0d {
200 compatible = "asahi-kasei,ak8975";
201 reg = <0x0d>;
202 interrupt-parent = <&gpio4>;
Andy Yane9e79d52016-10-22 20:54:55 +0800203 interrupts = <RK_PC1 IRQ_TYPE_EDGE_RISING>;
FUKAUMI Naoki11ff8c82015-01-25 21:39:36 +0900204 pinctrl-names = "default";
205 pinctrl-0 = <&comp_int>;
206 };
207
208 mma8452: mma8452@1d {
209 compatible = "fsl,mma8452";
210 reg = <0x1d>;
211 interrupt-parent = <&gpio4>;
Andy Yane9e79d52016-10-22 20:54:55 +0800212 interrupts = <RK_PC0 IRQ_TYPE_EDGE_RISING>;
FUKAUMI Naoki11ff8c82015-01-25 21:39:36 +0900213 pinctrl-names = "default";
214 pinctrl-0 = <&gsensor_int>;
215 };
216};
217
218&i2c1 {
219 clock-frequency = <400000>;
220 status = "okay";
221
222 tps: tps@2d {
223 reg = <0x2d>;
224 interrupt-parent = <&gpio6>;
Andy Yane9e79d52016-10-22 20:54:55 +0800225 interrupts = <RK_PA4 IRQ_TYPE_EDGE_RISING>;
FUKAUMI Naoki11ff8c82015-01-25 21:39:36 +0900226 pinctrl-names = "default";
227 pinctrl-0 = <&pmic_int>, <&pwr_hold>;
228
229 vcc1-supply = <&vsys>;
230 vcc2-supply = <&vsys>;
231 vcc3-supply = <&vsys>;
232 vcc4-supply = <&vsys>;
233 vcc5-supply = <&vcc_io>;
234 vcc6-supply = <&vcc_io>;
235 vcc7-supply = <&vsys>;
236 vccio-supply = <&vsys>;
237
238 regulators {
239 vcc_rtc: regulator@0 {
240 regulator-name = "vcc_rtc";
241 regulator-always-on;
242 };
243
244 vcc_io: regulator@1 {
245 regulator-name = "vcc_io";
246 regulator-min-microvolt = <3300000>;
247 regulator-max-microvolt = <3300000>;
248 regulator-always-on;
249 };
250
251 vdd_arm: regulator@2 {
252 regulator-name = "vdd_arm";
253 regulator-min-microvolt = <600000>;
254 regulator-max-microvolt = <1500000>;
255 regulator-always-on;
256 regulator-boot-on;
257 };
258
259 vcc_ddr: regulator@3 {
260 regulator-name = "vcc_ddr";
261 regulator-min-microvolt = <600000>;
262 regulator-max-microvolt = <1500000>;
263 regulator-always-on;
264 regulator-boot-on;
265 };
266
267 vcc18: regulator@5 {
268 regulator-name = "vcc18";
269 regulator-min-microvolt = <1800000>;
270 regulator-max-microvolt = <1800000>;
271 regulator-always-on;
272 };
273
274 vdd_11: regulator@6 {
275 regulator-name = "vdd_11";
276 regulator-min-microvolt = <1100000>;
277 regulator-max-microvolt = <1100000>;
278 regulator-always-on;
279 };
280
281 vcc_25: regulator@7 {
282 regulator-name = "vcc_25";
283 regulator-min-microvolt = <2500000>;
284 regulator-max-microvolt = <2500000>;
285 regulator-always-on;
286 };
287
288 vccio_wl: regulator@8 {
289 regulator-name = "vccio_wl";
290 regulator-min-microvolt = <1800000>;
291 regulator-max-microvolt = <1800000>;
292 };
293
294 vcc25_hdmi: regulator@9 {
295 regulator-name = "vcc25_hdmi";
296 regulator-min-microvolt = <2500000>;
297 regulator-max-microvolt = <2500000>;
298 };
299
300 vcca_33: regulator@10 {
301 regulator-name = "vcca_33";
302 regulator-min-microvolt = <3300000>;
303 regulator-max-microvolt = <3300000>;
304 };
305
306 vcc_rmii: regulator@11 {
307 regulator-name = "vcc_rmii";
308 regulator-min-microvolt = <3300000>;
309 regulator-max-microvolt = <3300000>;
310 };
311
312 vcc28_cif: regulator@12 {
313 regulator-name = "vcc28_cif";
314 regulator-min-microvolt = <2800000>;
315 regulator-max-microvolt = <2800000>;
316 };
317 };
318 };
319};
320
321#include "tps65910.dtsi"
322
323&i2c2 {
324 status = "okay";
325};
326
327&i2c3 {
328 status = "okay";
329};
330
331&i2c4 {
332 status = "okay";
333};
334
335&mmc0 {
336 bus-width = <4>;
337 disable-wp;
FUKAUMI Naoki11ff8c82015-01-25 21:39:36 +0900338 pinctrl-names = "default";
339 pinctrl-0 = <&sd0_clk>, <&sd0_cmd>, <&sd0_cd>, <&sd0_bus4>;
340 vmmc-supply = <&vcc_sd>;
Shawn Lin1d727ec2015-09-12 18:01:39 +0800341 cap-mmc-highspeed;
342 cap-sd-highspeed;
FUKAUMI Naoki11ff8c82015-01-25 21:39:36 +0900343 status = "okay";
344};
345
346&mmc1 {
FUKAUMI Naoki11ff8c82015-01-25 21:39:36 +0900347 bus-width = <4>;
348 disable-wp;
349 non-removable;
FUKAUMI Naoki11ff8c82015-01-25 21:39:36 +0900350 pinctrl-names = "default";
351 pinctrl-0 = <&sd1_clk>, <&sd1_cmd>, <&sd1_bus4>;
352 vmmc-supply = <&vccio_wl>;
353 status = "okay";
354};
355
356&pinctrl {
357 pcfg_output_high: pcfg-output-high {
358 output-high;
359 };
360
361 ak8963 {
362 comp_int: comp-int {
363 rockchip,pins = <4 17 RK_FUNC_GPIO &pcfg_pull_default>;
364 };
365 };
366
367 emac {
368 rmii_rst: rmii-rst {
369 rockchip,pins = <1 30 RK_FUNC_GPIO &pcfg_output_high>;
370 };
371 };
372
373 ir {
374 ir_int: ir-int {
375 rockchip,pins = <6 1 RK_FUNC_GPIO &pcfg_pull_default>;
376 };
377 };
378
379 keys {
380 pwr_key: pwr-key {
381 rockchip,pins = <6 2 RK_FUNC_GPIO &pcfg_pull_default>;
382 };
383 };
384
385 mma8452 {
386 gsensor_int: gsensor-int {
387 rockchip,pins = <4 16 RK_FUNC_GPIO &pcfg_pull_default>;
388 };
389 };
390
391 mmc {
392 sdmmc_pwr: sdmmc-pwr {
393 rockchip,pins = <3 7 RK_FUNC_GPIO &pcfg_pull_default>;
394 };
395 };
396
397 usb_host {
398 host_drv: host-drv {
399 rockchip,pins = <0 6 RK_FUNC_GPIO &pcfg_pull_default>;
400 };
401
402 hub_rst: hub-rst {
403 rockchip,pins = <1 31 RK_FUNC_GPIO &pcfg_output_high>;
404 };
405
406 sata_pwr: sata-pwr {
407 rockchip,pins = <4 22 RK_FUNC_GPIO &pcfg_pull_default>;
408 };
409
410 sata_reset: sata-reset {
411 rockchip,pins = <0 13 RK_FUNC_GPIO &pcfg_output_high>;
412 };
413 };
414
415 usb_otg {
416 otg_drv: otg-drv {
417 rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_default>;
418 };
419 };
420
421 tps {
422 pmic_int: pmic-int {
423 rockchip,pins = <6 4 RK_FUNC_GPIO &pcfg_pull_default>;
424 };
425
426 pwr_hold: pwr-hold {
427 rockchip,pins = <6 8 RK_FUNC_GPIO &pcfg_output_high>;
428 };
429 };
430};
431
432&pwm1 {
433 status = "okay";
434};
435
436&pwm2 {
437 status = "okay";
438};
439
Andy Yanac79e0e2016-01-15 21:26:18 +0800440&pwm3 {
441 status = "okay";
442};
443
FUKAUMI Naoki11ff8c82015-01-25 21:39:36 +0900444&saradc {
445 vref-supply = <&vcc_25>;
446 status = "okay";
447};
448
449&spi0 {
450 status = "okay";
451};
452
453&uart0 {
454 pinctrl-names = "default";
455 pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>;
456 status = "okay";
457};
458
459&uart2 {
460 status = "okay";
461};
462
463&uart3 {
464 pinctrl-names = "default";
465 pinctrl-0 = <&uart3_xfer>, <&uart3_cts>, <&uart3_rts>;
466 status = "okay";
467};
468
469&usb_host {
470 pinctrl-names = "default";
471 pinctrl-0 = <&hub_rst>, <&sata_reset>;
472 status = "okay";
473};
474
Heiko Stuebner760bb972015-08-01 20:28:36 +0200475&usbphy {
476 status = "okay";
477};
478
FUKAUMI Naoki11ff8c82015-01-25 21:39:36 +0900479&usb_otg {
480 status = "okay";
481};
482
483&wdt {
484 status = "okay";
485};