1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * Copyright (c) 2019 Hardkernel Co., Ltd
4 * Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH
5 * Copyright (c) 2022 Maya Matuszczyk <maccraft123mc@gmail.com>
9 #include <dt-bindings/gpio/gpio.h>
10 #include <dt-bindings/input/input.h>
11 #include <dt-bindings/leds/common.h>
12 #include <dt-bindings/pinctrl/rockchip.h>
13 #include "rk3326.dtsi"
21 stdout-path = "serial2:115200n8";
24 backlight: backlight {
25 compatible = "pwm-backlight";
26 power-supply = <&vcc_bl>;
27 pwms = <&pwm1 0 25000 0>;
30 builtin_gamepad: gpio-keys {
31 compatible = "gpio-keys";
32 pinctrl-names = "default";
33 pinctrl-0 = <&btn_pins>;
36 gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_LOW>;
38 linux,code = <BTN_DPAD_UP>;
41 gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_LOW>;
43 linux,code = <BTN_DPAD_DOWN>;
46 gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>;
48 linux,code = <BTN_DPAD_LEFT>;
51 gpios = <&gpio1 RK_PB7 GPIO_ACTIVE_LOW>;
53 linux,code = <BTN_DPAD_RIGHT>;
56 gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_LOW>;
58 linux,code = <BTN_EAST>;
61 gpios = <&gpio1 RK_PA5 GPIO_ACTIVE_LOW>;
63 linux,code = <BTN_SOUTH>;
66 gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_LOW>;
68 linux,code = <BTN_WEST>;
71 gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_LOW>;
73 linux,code = <BTN_NORTH>;
76 gpios = <&gpio2 RK_PA0 GPIO_ACTIVE_LOW>;
78 linux,code = <BTN_TRIGGER_HAPPY1>;
81 gpios = <&gpio2 RK_PA1 GPIO_ACTIVE_LOW>;
83 linux,code = <BTN_TRIGGER_HAPPY2>;
86 gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>;
88 linux,code = <BTN_TRIGGER_HAPPY3>;
91 gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_LOW>;
93 linux,code = <BTN_TRIGGER_HAPPY4>;
96 gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_LOW>;
98 linux,code = <BTN_TRIGGER_HAPPY5>;
100 btn_f6: button-sw14 {
101 gpios = <&gpio2 RK_PA5 GPIO_ACTIVE_LOW>;
103 linux,code = <BTN_TRIGGER_HAPPY6>;
106 gpios = <&gpio2 RK_PA6 GPIO_ACTIVE_LOW>;
108 linux,code = <BTN_TL>;
111 gpios = <&gpio2 RK_PA7 GPIO_ACTIVE_LOW>;
113 linux,code = <BTN_TR>;
117 /* led-1 is wired directly to output of always-on regulator */
119 gpio_led: gpio-leds {
120 compatible = "gpio-leds";
121 pinctrl-names = "default";
122 pinctrl-0 = <&red_led_pin>;
125 color = <LED_COLOR_ID_RED>;
126 gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
127 function = LED_FUNCTION_CHARGING;
131 pwm_led: led-controller {
132 compatible = "pwm-leds";
135 color = <LED_COLOR_ID_BLUE>;
136 function = LED_FUNCTION_STATUS;
137 linux,default-trigger = "heartbeat";
138 max-brightness = <255>;
139 pwms = <&pwm3 0 25000 0>;
144 compatible = "simple-audio-card";
145 simple-audio-card,name = "rk817_int";
146 simple-audio-card,format = "i2s";
147 simple-audio-card,hp-det-gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_HIGH>;
148 simple-audio-card,mclk-fs = <256>;
149 simple-audio-card,widgets =
150 "Microphone", "Mic Jack",
151 "Headphone", "Headphones",
152 "Speaker", "Speaker";
153 simple-audio-card,routing =
155 "Headphones", "HPOL",
156 "Headphones", "HPOR",
159 simple-audio-card,codec {
160 sound-dai = <&rk817>;
163 simple-audio-card,cpu {
164 sound-dai = <&i2s1_2ch>;
169 compatible = "regulator-fixed";
170 regulator-name = "vcc3v8_sys";
172 regulator-min-microvolt = <3800000>;
173 regulator-max-microvolt = <3800000>;
177 compatible = "regulator-fixed";
178 regulator-name = "vcc_host";
179 regulator-min-microvolt = <5000000>;
180 regulator-max-microvolt = <5000000>;
182 gpio = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
186 vin-supply = <&usb_midu>;
191 cpu-supply = <&vdd_arm>;
195 cpu-supply = <&vdd_arm>;
199 cpu-supply = <&vdd_arm>;
203 cpu-supply = <&vdd_arm>;
207 assigned-clocks = <&cru PLL_NPLL>,
208 <&cru ACLK_BUS_PRE>, <&cru ACLK_PERI_PRE>,
209 <&cru HCLK_BUS_PRE>, <&cru HCLK_PERI_PRE>,
210 <&cru PCLK_BUS_PRE>, <&cru SCLK_GPU>;
212 assigned-clock-rates = <1188000000>,
213 <200000000>, <200000000>,
214 <150000000>, <150000000>,
215 <100000000>, <200000000>;
229 mipi_out_panel: endpoint {
230 remote-endpoint = <&mipi_in_panel>;
235 internal_display: panel@0 {
237 backlight = <&backlight>;
238 reset-gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_LOW>;
242 mipi_in_panel: endpoint {
243 remote-endpoint = <&mipi_out_panel>;
254 mali-supply = <&vdd_logic>;
259 clock-frequency = <400000>;
260 i2c-scl-falling-time-ns = <16>;
261 i2c-scl-rising-time-ns = <280>;
265 compatible = "rockchip,rk817";
267 interrupt-parent = <&gpio0>;
268 interrupts = <RK_PB2 IRQ_TYPE_LEVEL_LOW>;
269 clock-output-names = "rk808-clkout1", "xin32k";
270 clock-names = "mclk";
271 clocks = <&cru SCLK_I2S1_OUT>;
272 pinctrl-names = "default";
273 pinctrl-0 = <&pmic_int>, <&i2s1_2ch_mclk>;
276 #sound-dai-cells = <0>;
278 vcc1-supply = <&vccsys>;
279 vcc2-supply = <&vccsys>;
280 vcc3-supply = <&vccsys>;
281 vcc4-supply = <&vccsys>;
282 vcc5-supply = <&vccsys>;
283 vcc6-supply = <&vccsys>;
284 vcc7-supply = <&vccsys>;
285 vcc8-supply = <&vccsys>;
288 vdd_logic: DCDC_REG1 {
289 regulator-name = "vdd_logic";
290 regulator-min-microvolt = <950000>;
291 regulator-max-microvolt = <1150000>;
292 regulator-ramp-delay = <6001>;
296 regulator-state-mem {
297 regulator-on-in-suspend;
298 regulator-suspend-microvolt = <950000>;
303 regulator-name = "vdd_arm";
304 regulator-min-microvolt = <950000>;
305 regulator-max-microvolt = <1350000>;
306 regulator-ramp-delay = <6001>;
310 regulator-state-mem {
311 regulator-off-in-suspend;
312 regulator-suspend-microvolt = <950000>;
317 regulator-name = "vcc_ddr";
321 regulator-state-mem {
322 regulator-on-in-suspend;
327 regulator-name = "vcc_3v3";
328 regulator-min-microvolt = <3300000>;
329 regulator-max-microvolt = <3300000>;
333 regulator-state-mem {
334 regulator-off-in-suspend;
335 regulator-suspend-microvolt = <3300000>;
340 regulator-name = "vcc_1v8";
341 regulator-min-microvolt = <1800000>;
342 regulator-max-microvolt = <1800000>;
346 regulator-state-mem {
347 regulator-on-in-suspend;
348 regulator-suspend-microvolt = <1800000>;
353 regulator-name = "vdd_1v0";
354 regulator-min-microvolt = <1000000>;
355 regulator-max-microvolt = <1000000>;
359 regulator-state-mem {
360 regulator-on-in-suspend;
361 regulator-suspend-microvolt = <1000000>;
365 vcc3v3_pmu: LDO_REG4 {
366 regulator-name = "vcc3v3_pmu";
367 regulator-min-microvolt = <3300000>;
368 regulator-max-microvolt = <3300000>;
372 regulator-state-mem {
373 regulator-on-in-suspend;
374 regulator-suspend-microvolt = <3300000>;
379 regulator-name = "vccio_sd";
380 regulator-min-microvolt = <1800000>;
381 regulator-max-microvolt = <3300000>;
385 regulator-state-mem {
386 regulator-on-in-suspend;
387 regulator-suspend-microvolt = <3300000>;
392 regulator-name = "vcc_sd";
393 regulator-min-microvolt = <3300000>;
394 regulator-max-microvolt = <3300000>;
397 regulator-state-mem {
398 regulator-on-in-suspend;
399 regulator-suspend-microvolt = <3300000>;
404 regulator-name = "vcc_bl";
405 regulator-min-microvolt = <3300000>;
406 regulator-max-microvolt = <3300000>;
408 regulator-state-mem {
409 regulator-off-in-suspend;
410 regulator-suspend-microvolt = <3300000>;
415 regulator-name = "vcc_lcd";
416 regulator-min-microvolt = <2800000>;
417 regulator-max-microvolt = <2800000>;
419 regulator-state-mem {
420 regulator-off-in-suspend;
421 regulator-suspend-microvolt = <2800000>;
430 regulator-name = "usb_midu";
431 regulator-min-microvolt = <5000000>;
432 regulator-max-microvolt = <5400000>;
438 rk817_charger: charger {
439 rockchip,resistor-sense-micro-ohms = <10000>;
440 rockchip,sleep-enter-current-microamp = <300000>;
441 rockchip,sleep-filter-current-microamp = <100000>;
445 rockchip,mic-in-differential;
450 /* EXT Header(P2): 7(SCL:GPIO0.C2), 8(SDA:GPIO0.C3) */
452 clock-frequency = <400000>;
456 /* I2S 1 Channel Used */
462 vccio1-supply = <&vcc_3v3>;
463 vccio2-supply = <&vccio_sd>;
464 vccio3-supply = <&vcc_3v3>;
465 vccio4-supply = <&vcc_3v3>;
466 vccio5-supply = <&vcc_3v3>;
467 vccio6-supply = <&vcc_3v3>;
472 pmuio1-supply = <&vcc3v3_pmu>;
473 pmuio2-supply = <&vcc3v3_pmu>;
486 vref-supply = <&vcc_1v8>;
492 card-detect-delay = <200>;
493 cd-gpios = <&gpio0 RK_PA3 GPIO_ACTIVE_LOW>; /*[> CD GPIO <]*/
498 vmmc-supply = <&vcc_sd>;
499 vqmmc-supply = <&vccio_sd>;
504 pinctrl-0 = <&sfc_clk &sfc_cs0 &sfc_bus2>;
505 pinctrl-names = "default";
506 #address-cells = <1>;
511 compatible = "jedec,spi-nor";
513 spi-max-frequency = <108000000>;
514 spi-rx-bus-width = <2>;
515 spi-tx-bus-width = <1>;
526 u2phy_host: host-port {
530 u2phy_otg: otg-port {
539 /* EXT Header(P2): 2(RXD:GPIO1.C0),3(TXD:.C1),4(CTS:.C2),5(RTS:.C3) */
541 pinctrl-names = "default";
542 pinctrl-0 = <&uart1_xfer &uart1_cts>;
547 pinctrl-names = "default";
548 pinctrl-0 = <&uart2m1_xfer>;
563 rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>,
564 <1 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>,
565 <1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>,
566 <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>,
567 <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>,
568 <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>,
569 <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>,
570 <1 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>,
571 <2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>,
572 <2 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>,
573 <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>,
574 <2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>,
575 <2 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>,
576 <2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>,
577 <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>,
578 <2 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>;
584 rockchip,pins = <2 RK_PC6 RK_FUNC_GPIO &pcfg_pull_down>;
589 red_led_pin: red-led-pin {
590 rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
596 rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
600 rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
603 soc_slppin_gpio: soc_slppin_gpio {
604 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_output_low>;
607 soc_slppin_rst: soc_slppin_rst {
608 rockchip,pins = <0 RK_PA4 2 &pcfg_pull_none>;
611 soc_slppin_slp: soc_slppin_slp {
612 rockchip,pins = <0 RK_PA4 1 &pcfg_pull_none>;