Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003  * Copyright (c) 2015 Caesar Wang <wxt@rock-chips.com>
0004  */
0005 
0006 #include <dt-bindings/input/input.h>
0007 #include <dt-bindings/pwm/pwm.h>
0008 #include "rk3368.dtsi"
0009 
0010 / {
0011         aliases {
0012                 mmc0 = &emmc;
0013         };
0014 
0015         chosen {
0016                 stdout-path = "serial2:115200n8";
0017         };
0018 
0019         memory {
0020                 device_type = "memory";
0021                 reg = <0x0 0x0 0x0 0x40000000>;
0022         };
0023 
0024         backlight: backlight {
0025                 compatible = "pwm-backlight";
0026                 brightness-levels = <
0027                           0   1   2   3   4   5   6   7
0028                           8   9  10  11  12  13  14  15
0029                          16  17  18  19  20  21  22  23
0030                          24  25  26  27  28  29  30  31
0031                          32  33  34  35  36  37  38  39
0032                          40  41  42  43  44  45  46  47
0033                          48  49  50  51  52  53  54  55
0034                          56  57  58  59  60  61  62  63
0035                          64  65  66  67  68  69  70  71
0036                          72  73  74  75  76  77  78  79
0037                          80  81  82  83  84  85  86  87
0038                          88  89  90  91  92  93  94  95
0039                          96  97  98  99 100 101 102 103
0040                         104 105 106 107 108 109 110 111
0041                         112 113 114 115 116 117 118 119
0042                         120 121 122 123 124 125 126 127
0043                         128 129 130 131 132 133 134 135
0044                         136 137 138 139 140 141 142 143
0045                         144 145 146 147 148 149 150 151
0046                         152 153 154 155 156 157 158 159
0047                         160 161 162 163 164 165 166 167
0048                         168 169 170 171 172 173 174 175
0049                         176 177 178 179 180 181 182 183
0050                         184 185 186 187 188 189 190 191
0051                         192 193 194 195 196 197 198 199
0052                         200 201 202 203 204 205 206 207
0053                         208 209 210 211 212 213 214 215
0054                         216 217 218 219 220 221 222 223
0055                         224 225 226 227 228 229 230 231
0056                         232 233 234 235 236 237 238 239
0057                         240 241 242 243 244 245 246 247
0058                         248 249 250 251 252 253 254 255>;
0059                 default-brightness-level = <128>;
0060                 enable-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
0061                 pinctrl-names = "default";
0062                 pinctrl-0 = <&bl_en>;
0063                 pwms = <&pwm0 0 1000000 PWM_POLARITY_INVERTED>;
0064                 pwm-delay-us = <10000>;
0065         };
0066 
0067         emmc_pwrseq: emmc-pwrseq {
0068                 compatible = "mmc-pwrseq-emmc";
0069                 pinctrl-0 = <&emmc_reset>;
0070                 pinctrl-names = "default";
0071                 reset-gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_HIGH>;
0072         };
0073 
0074         keys: gpio-keys {
0075                 compatible = "gpio-keys";
0076                 pinctrl-names = "default";
0077                 pinctrl-0 = <&pwr_key>;
0078 
0079                 key-power {
0080                         wakeup-source;
0081                         gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
0082                         label = "GPIO Power";
0083                         linux,code = <KEY_POWER>;
0084                 };
0085         };
0086 
0087         /* supplies both host and otg */
0088         vcc_host: vcc-host-regulator {
0089                 compatible = "regulator-fixed";
0090                 enable-active-high;
0091                 gpio = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
0092                 pinctrl-names = "default";
0093                 pinctrl-0 = <&host_vbus_drv>;
0094                 regulator-name = "vcc_host";
0095                 regulator-always-on;
0096                 regulator-boot-on;
0097                 vin-supply = <&vcc_sys>;
0098         };
0099 
0100         vcc_lan: vcc-lan-regulator {
0101                 compatible = "regulator-fixed";
0102                 regulator-name = "vcc_lan";
0103                 regulator-min-microvolt = <3300000>;
0104                 regulator-max-microvolt = <3300000>;
0105                 regulator-always-on;
0106                 regulator-boot-on;
0107                 vin-supply = <&vcc_io>;
0108         };
0109 
0110         vcc_sys: vcc-sys-regulator {
0111                 compatible = "regulator-fixed";
0112                 regulator-name = "vcc_sys";
0113                 regulator-min-microvolt = <5000000>;
0114                 regulator-max-microvolt = <5000000>;
0115                 regulator-always-on;
0116                 regulator-boot-on;
0117         };
0118 };
0119 
0120 &emmc {
0121         bus-width = <8>;
0122         cap-mmc-highspeed;
0123         mmc-pwrseq = <&emmc_pwrseq>;
0124         non-removable;
0125         pinctrl-names = "default";
0126         pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
0127         status = "okay";
0128 };
0129 
0130 &gmac {
0131         phy-supply = <&vcc_lan>;
0132         phy-mode = "rmii";
0133         clock_in_out = "output";
0134         snps,reset-gpio = <&gpio3 RK_PB4 GPIO_ACTIVE_HIGH>;
0135         snps,reset-active-low;
0136         snps,reset-delays-us = <0 10000 1000000>;
0137         pinctrl-names = "default";
0138         pinctrl-0 = <&rmii_pins>;
0139         tx_delay = <0x30>;
0140         rx_delay = <0x10>;
0141         status = "okay";
0142 };
0143 
0144 &i2c0 {
0145         status = "okay";
0146 };
0147 
0148 &pinctrl {
0149         pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
0150                 bias-disable;
0151                 drive-strength = <8>;
0152         };
0153 
0154         pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma {
0155                 bias-pull-up;
0156                 drive-strength = <8>;
0157         };
0158 
0159         backlight {
0160                 bl_en: bl-en {
0161                         rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
0162                 };
0163         };
0164 
0165         emmc {
0166                 emmc_bus8: emmc-bus8 {
0167                         rockchip,pins = <1 RK_PC2 2 &pcfg_pull_up_drv_8ma>,
0168                                         <1 RK_PC3 2 &pcfg_pull_up_drv_8ma>,
0169                                         <1 RK_PC4 2 &pcfg_pull_up_drv_8ma>,
0170                                         <1 RK_PC5 2 &pcfg_pull_up_drv_8ma>,
0171                                         <1 RK_PC6 2 &pcfg_pull_up_drv_8ma>,
0172                                         <1 RK_PC7 2 &pcfg_pull_up_drv_8ma>,
0173                                         <1 RK_PD0 2 &pcfg_pull_up_drv_8ma>,
0174                                         <1 RK_PD1 2 &pcfg_pull_up_drv_8ma>;
0175                 };
0176 
0177                 emmc-clk {
0178                         rockchip,pins = <2 RK_PA4 2 &pcfg_pull_none_drv_8ma>;
0179                 };
0180 
0181                 emmc-cmd {
0182                         rockchip,pins = <1 RK_PD2 2 &pcfg_pull_up_drv_8ma>;
0183                 };
0184 
0185                 emmc_reset: emmc-reset {
0186                         rockchip,pins = <2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
0187                 };
0188         };
0189 
0190         keys {
0191                 pwr_key: pwr-key {
0192                         rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
0193                 };
0194         };
0195 
0196         pmic {
0197                 pmic_int: pmic-int {
0198                         rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
0199                 };
0200         };
0201 
0202         sdio {
0203                 wifi_reg_on: wifi-reg-on {
0204                         rockchip,pins = <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
0205                 };
0206 
0207                 bt_rst: bt-rst {
0208                         rockchip,pins = <3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
0209                 };
0210         };
0211 
0212         usb {
0213                 host_vbus_drv: host-vbus-drv {
0214                         rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
0215                 };
0216         };
0217 };
0218 
0219 &pwm0 {
0220         status = "okay";
0221 };
0222 
0223 &tsadc {
0224         rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */
0225         rockchip,hw-tshut-polarity = <0>; /* tshut polarity 0:LOW 1:HIGH */
0226         status = "okay";
0227 };
0228 
0229 &uart2 {
0230         status = "okay";
0231 };
0232 
0233 &usb_host0_ehci {
0234         status = "okay";
0235 };
0236 
0237 &usb_otg {
0238         dr_mode = "host";
0239         status = "okay";
0240 };
0241 
0242 &wdt {
0243         status = "okay";
0244 };