blob: 184b84fdde075a751b063e4b7784eea77b7efec0 [file] [log] [blame]
Andy Yan02133dd2019-11-14 11:21:14 +08001// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd
4 *
5 */
6
7/dts-v1/;
8#include <dt-bindings/input/input.h>
9#include "rk3308.dtsi"
10
11/ {
12 model = "Rockchip RK3308 EVB";
13 compatible = "rockchip,rk3308-evb", "rockchip,rk3308";
14
15 chosen {
16 stdout-path = "serial4:1500000n8";
17 };
18
19 adc-keys0 {
20 compatible = "adc-keys";
21 io-channels = <&saradc 0>;
22 io-channel-names = "buttons";
23 poll-interval = <100>;
24 keyup-threshold-microvolt = <1800000>;
25
Jonas Karlmanc8c20092024-04-08 18:14:07 +000026 button-func {
Andy Yan02133dd2019-11-14 11:21:14 +080027 linux,code = <KEY_FN>;
28 label = "function";
29 press-threshold-microvolt = <18000>;
30 };
31 };
32
33 adc-keys1 {
34 compatible = "adc-keys";
35 io-channels = <&saradc 1>;
36 io-channel-names = "buttons";
37 poll-interval = <100>;
38 keyup-threshold-microvolt = <1800000>;
39
Jonas Karlmanc8c20092024-04-08 18:14:07 +000040 button-esc {
Andy Yan02133dd2019-11-14 11:21:14 +080041 linux,code = <KEY_MICMUTE>;
42 label = "micmute";
43 press-threshold-microvolt = <1130000>;
44 };
45
Jonas Karlmanc8c20092024-04-08 18:14:07 +000046 button-home {
Andy Yan02133dd2019-11-14 11:21:14 +080047 linux,code = <KEY_MODE>;
48 label = "mode";
49 press-threshold-microvolt = <901000>;
50 };
51
Jonas Karlmanc8c20092024-04-08 18:14:07 +000052 button-menu {
Andy Yan02133dd2019-11-14 11:21:14 +080053 linux,code = <KEY_PLAY>;
54 label = "play";
55 press-threshold-microvolt = <624000>;
56 };
57
Jonas Karlmanc8c20092024-04-08 18:14:07 +000058 button-down {
Andy Yan02133dd2019-11-14 11:21:14 +080059 linux,code = <KEY_VOLUMEDOWN>;
60 label = "volume down";
61 press-threshold-microvolt = <300000>;
62 };
63
Jonas Karlmanc8c20092024-04-08 18:14:07 +000064 button-up {
Andy Yan02133dd2019-11-14 11:21:14 +080065 linux,code = <KEY_VOLUMEUP>;
66 label = "volume up";
67 press-threshold-microvolt = <18000>;
68 };
69 };
70
71 gpio-keys {
72 compatible = "gpio-keys";
73 autorepeat;
74
75 pinctrl-names = "default";
76 pinctrl-0 = <&pwr_key>;
77
Jonas Karlmanc8c20092024-04-08 18:14:07 +000078 key-power {
Andy Yan02133dd2019-11-14 11:21:14 +080079 gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
80 linux,code = <KEY_POWER>;
81 label = "GPIO Key Power";
Andy Yan02133dd2019-11-14 11:21:14 +080082 debounce-interval = <100>;
Jonas Karlmanc8c20092024-04-08 18:14:07 +000083 wakeup-source;
Andy Yan02133dd2019-11-14 11:21:14 +080084 };
85 };
86
87 vcc12v_dcin: vcc12v-dcin {
88 compatible = "regulator-fixed";
89 regulator-name = "vcc12v_dcin";
Andy Yan02133dd2019-11-14 11:21:14 +080090 regulator-min-microvolt = <12000000>;
91 regulator-max-microvolt = <12000000>;
Jonas Karlmanc8c20092024-04-08 18:14:07 +000092 regulator-always-on;
93 regulator-boot-on;
Andy Yan02133dd2019-11-14 11:21:14 +080094 };
95
96 vcc5v0_sys: vcc5v0-sys {
97 compatible = "regulator-fixed";
98 regulator-name = "vcc5v0_sys";
Andy Yan02133dd2019-11-14 11:21:14 +080099 regulator-min-microvolt = <5000000>;
100 regulator-max-microvolt = <5000000>;
Andy Yan02133dd2019-11-14 11:21:14 +0800101 regulator-always-on;
102 regulator-boot-on;
Jonas Karlmanc8c20092024-04-08 18:14:07 +0000103 vin-supply = <&vcc12v_dcin>;
Andy Yan02133dd2019-11-14 11:21:14 +0800104 };
105
106 vccio_sdio: vcc_1v8: vcc-1v8 {
107 compatible = "regulator-fixed";
108 regulator-name = "vcc_1v8";
Andy Yan02133dd2019-11-14 11:21:14 +0800109 regulator-min-microvolt = <1800000>;
110 regulator-max-microvolt = <1800000>;
Jonas Karlmanc8c20092024-04-08 18:14:07 +0000111 regulator-always-on;
112 regulator-boot-on;
Andy Yan02133dd2019-11-14 11:21:14 +0800113 vin-supply = <&vcc_io>;
114 };
115
116 vcc_ddr: vcc-ddr {
117 compatible = "regulator-fixed";
118 regulator-name = "vcc_ddr";
Andy Yan02133dd2019-11-14 11:21:14 +0800119 regulator-min-microvolt = <1500000>;
120 regulator-max-microvolt = <1500000>;
Jonas Karlmanc8c20092024-04-08 18:14:07 +0000121 regulator-always-on;
122 regulator-boot-on;
Andy Yan02133dd2019-11-14 11:21:14 +0800123 vin-supply = <&vcc5v0_sys>;
124 };
125
126 vcc_io: vcc-io {
127 compatible = "regulator-fixed";
128 regulator-name = "vcc_io";
Andy Yan02133dd2019-11-14 11:21:14 +0800129 regulator-min-microvolt = <3300000>;
130 regulator-max-microvolt = <3300000>;
Jonas Karlmanc8c20092024-04-08 18:14:07 +0000131 regulator-always-on;
132 regulator-boot-on;
Andy Yan02133dd2019-11-14 11:21:14 +0800133 vin-supply = <&vcc5v0_sys>;
134 };
135
136 vccio_flash: vccio-flash {
137 compatible = "regulator-fixed";
138 regulator-name = "vccio_flash";
Andy Yan02133dd2019-11-14 11:21:14 +0800139 regulator-min-microvolt = <3300000>;
140 regulator-max-microvolt = <3300000>;
Jonas Karlmanc8c20092024-04-08 18:14:07 +0000141 regulator-always-on;
142 regulator-boot-on;
Andy Yan02133dd2019-11-14 11:21:14 +0800143 vin-supply = <&vcc_io>;
144 };
145
146 vcc5v0_host: vcc5v0-host {
147 compatible = "regulator-fixed";
Andy Yan02133dd2019-11-14 11:21:14 +0800148 gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
Jonas Karlmanc8c20092024-04-08 18:14:07 +0000149 enable-active-high;
Andy Yan02133dd2019-11-14 11:21:14 +0800150 pinctrl-names = "default";
151 pinctrl-0 = <&usb_drv>;
152 regulator-name = "vbus_host";
153 vin-supply = <&vcc5v0_sys>;
154 };
Jonas Karlmanc8c20092024-04-08 18:14:07 +0000155
156 vdd_core: vdd-core {
157 compatible = "pwm-regulator";
158 pwms = <&pwm0 0 5000 1>;
159 regulator-name = "vdd_core";
160 regulator-min-microvolt = <827000>;
161 regulator-max-microvolt = <1340000>;
162 regulator-always-on;
163 regulator-boot-on;
164 regulator-settling-time-up-us = <250>;
165 pwm-supply = <&vcc5v0_sys>;
166 };
167
168 vdd_log: vdd-log {
169 compatible = "regulator-fixed";
170 regulator-name = "vdd_log";
171 regulator-min-microvolt = <1050000>;
172 regulator-max-microvolt = <1050000>;
173 regulator-always-on;
174 regulator-boot-on;
175 vin-supply = <&vcc5v0_sys>;
176 };
177
178 vdd_1v0: vdd-1v0 {
179 compatible = "regulator-fixed";
180 regulator-name = "vdd_1v0";
181 regulator-min-microvolt = <1000000>;
182 regulator-max-microvolt = <1000000>;
183 regulator-always-on;
184 regulator-boot-on;
185 vin-supply = <&vcc5v0_sys>;
186 };
Andy Yan02133dd2019-11-14 11:21:14 +0800187};
188
189&cpu0 {
190 cpu-supply = <&vdd_core>;
191};
192
193&saradc {
194 status = "okay";
195 vref-supply = <&vcc_1v8>;
196};
197
198&pinctrl {
199 pinctrl-names = "default";
200 pinctrl-0 = <&rtc_32k>;
201
202 buttons {
203 pwr_key: pwr-key {
204 rockchip,pins = <0 RK_PA6 0 &pcfg_pull_up>;
205 };
206 };
207
208 usb {
209 usb_drv: usb-drv {
210 rockchip,pins = <0 RK_PC5 0 &pcfg_pull_none>;
211 };
212 };
213
214 sdio-pwrseq {
215 wifi_enable_h: wifi-enable-h {
216 rockchip,pins = <0 RK_PA2 0 &pcfg_pull_none>;
217 };
218 };
219};
220
221&pwm0 {
222 status = "okay";
223 pinctrl-0 = <&pwm0_pin_pull_down>;
224};
225
226&uart4 {
227 pinctrl-names = "default";
228 pinctrl-0 = <&uart4_xfer>;
229 status = "okay";
230};