0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003 * Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd
0004 *
0005 */
0006
0007 /dts-v1/;
0008 #include <dt-bindings/input/input.h>
0009 #include "rk3308.dtsi"
0010
0011 / {
0012 model = "Rockchip RK3308 EVB";
0013 compatible = "rockchip,rk3308-evb", "rockchip,rk3308";
0014
0015 chosen {
0016 stdout-path = "serial4:1500000n8";
0017 };
0018
0019 adc-keys0 {
0020 compatible = "adc-keys";
0021 io-channels = <&saradc 0>;
0022 io-channel-names = "buttons";
0023 poll-interval = <100>;
0024 keyup-threshold-microvolt = <1800000>;
0025
0026 func-key {
0027 linux,code = <KEY_FN>;
0028 label = "function";
0029 press-threshold-microvolt = <18000>;
0030 };
0031 };
0032
0033 adc-keys1 {
0034 compatible = "adc-keys";
0035 io-channels = <&saradc 1>;
0036 io-channel-names = "buttons";
0037 poll-interval = <100>;
0038 keyup-threshold-microvolt = <1800000>;
0039
0040 esc-key {
0041 linux,code = <KEY_MICMUTE>;
0042 label = "micmute";
0043 press-threshold-microvolt = <1130000>;
0044 };
0045
0046 home-key {
0047 linux,code = <KEY_MODE>;
0048 label = "mode";
0049 press-threshold-microvolt = <901000>;
0050 };
0051
0052 menu-key {
0053 linux,code = <KEY_PLAY>;
0054 label = "play";
0055 press-threshold-microvolt = <624000>;
0056 };
0057
0058 vol-down-key {
0059 linux,code = <KEY_VOLUMEDOWN>;
0060 label = "volume down";
0061 press-threshold-microvolt = <300000>;
0062 };
0063
0064 vol-up-key {
0065 linux,code = <KEY_VOLUMEUP>;
0066 label = "volume up";
0067 press-threshold-microvolt = <18000>;
0068 };
0069 };
0070
0071 gpio-keys {
0072 compatible = "gpio-keys";
0073 autorepeat;
0074
0075 pinctrl-names = "default";
0076 pinctrl-0 = <&pwr_key>;
0077
0078 key-power {
0079 gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
0080 linux,code = <KEY_POWER>;
0081 label = "GPIO Key Power";
0082 debounce-interval = <100>;
0083 wakeup-source;
0084 };
0085 };
0086
0087 vcc12v_dcin: vcc12v-dcin {
0088 compatible = "regulator-fixed";
0089 regulator-name = "vcc12v_dcin";
0090 regulator-min-microvolt = <12000000>;
0091 regulator-max-microvolt = <12000000>;
0092 regulator-always-on;
0093 regulator-boot-on;
0094 };
0095
0096 vcc5v0_sys: vcc5v0-sys {
0097 compatible = "regulator-fixed";
0098 regulator-name = "vcc5v0_sys";
0099 regulator-min-microvolt = <5000000>;
0100 regulator-max-microvolt = <5000000>;
0101 regulator-always-on;
0102 regulator-boot-on;
0103 vin-supply = <&vcc12v_dcin>;
0104 };
0105
0106 vccio_sdio: vcc_1v8: vcc-1v8 {
0107 compatible = "regulator-fixed";
0108 regulator-name = "vcc_1v8";
0109 regulator-min-microvolt = <1800000>;
0110 regulator-max-microvolt = <1800000>;
0111 regulator-always-on;
0112 regulator-boot-on;
0113 vin-supply = <&vcc_io>;
0114 };
0115
0116 vcc_ddr: vcc-ddr {
0117 compatible = "regulator-fixed";
0118 regulator-name = "vcc_ddr";
0119 regulator-min-microvolt = <1500000>;
0120 regulator-max-microvolt = <1500000>;
0121 regulator-always-on;
0122 regulator-boot-on;
0123 vin-supply = <&vcc5v0_sys>;
0124 };
0125
0126 vcc_io: vcc-io {
0127 compatible = "regulator-fixed";
0128 regulator-name = "vcc_io";
0129 regulator-min-microvolt = <3300000>;
0130 regulator-max-microvolt = <3300000>;
0131 regulator-always-on;
0132 regulator-boot-on;
0133 vin-supply = <&vcc5v0_sys>;
0134 };
0135
0136 vccio_flash: vccio-flash {
0137 compatible = "regulator-fixed";
0138 regulator-name = "vccio_flash";
0139 regulator-min-microvolt = <3300000>;
0140 regulator-max-microvolt = <3300000>;
0141 regulator-always-on;
0142 regulator-boot-on;
0143 vin-supply = <&vcc_io>;
0144 };
0145
0146 vcc5v0_host: vcc5v0-host {
0147 compatible = "regulator-fixed";
0148 gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
0149 enable-active-high;
0150 pinctrl-names = "default";
0151 pinctrl-0 = <&usb_drv>;
0152 regulator-name = "vbus_host";
0153 vin-supply = <&vcc5v0_sys>;
0154 };
0155
0156 vdd_core: vdd-core {
0157 compatible = "pwm-regulator";
0158 pwms = <&pwm0 0 5000 1>;
0159 regulator-name = "vdd_core";
0160 regulator-min-microvolt = <827000>;
0161 regulator-max-microvolt = <1340000>;
0162 regulator-always-on;
0163 regulator-boot-on;
0164 regulator-settling-time-up-us = <250>;
0165 pwm-supply = <&vcc5v0_sys>;
0166 };
0167
0168 vdd_log: vdd-log {
0169 compatible = "regulator-fixed";
0170 regulator-name = "vdd_log";
0171 regulator-min-microvolt = <1050000>;
0172 regulator-max-microvolt = <1050000>;
0173 regulator-always-on;
0174 regulator-boot-on;
0175 vin-supply = <&vcc5v0_sys>;
0176 };
0177
0178 vdd_1v0: vdd-1v0 {
0179 compatible = "regulator-fixed";
0180 regulator-name = "vdd_1v0";
0181 regulator-min-microvolt = <1000000>;
0182 regulator-max-microvolt = <1000000>;
0183 regulator-always-on;
0184 regulator-boot-on;
0185 vin-supply = <&vcc5v0_sys>;
0186 };
0187 };
0188
0189 &cpu0 {
0190 cpu-supply = <&vdd_core>;
0191 };
0192
0193 &saradc {
0194 status = "okay";
0195 vref-supply = <&vcc_1v8>;
0196 };
0197
0198 &pinctrl {
0199 pinctrl-names = "default";
0200 pinctrl-0 = <&rtc_32k>;
0201
0202 buttons {
0203 pwr_key: pwr-key {
0204 rockchip,pins = <0 RK_PA6 0 &pcfg_pull_up>;
0205 };
0206 };
0207
0208 usb {
0209 usb_drv: usb-drv {
0210 rockchip,pins = <0 RK_PC5 0 &pcfg_pull_none>;
0211 };
0212 };
0213
0214 sdio-pwrseq {
0215 wifi_enable_h: wifi-enable-h {
0216 rockchip,pins = <0 RK_PA2 0 &pcfg_pull_none>;
0217 };
0218 };
0219 };
0220
0221 &pwm0 {
0222 status = "okay";
0223 pinctrl-0 = <&pwm0_pin_pull_down>;
0224 };
0225
0226 &uart4 {
0227 pinctrl-names = "default";
0228 pinctrl-0 = <&uart4_xfer>;
0229 status = "okay";
0230 };