0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002
0003 #include <dt-bindings/input/input.h>
0004 #include <dt-bindings/pwm/pwm.h>
0005 #include "rk3288.dtsi"
0006
0007 / {
0008 memory@0 {
0009 device_type = "memory";
0010 reg = <0x0 0x0 0x0 0x80000000>;
0011 };
0012
0013 adc-keys {
0014 compatible = "adc-keys";
0015 io-channels = <&saradc 1>;
0016 io-channel-names = "buttons";
0017 keyup-threshold-microvolt = <1800000>;
0018
0019 button-up {
0020 label = "Volume Up";
0021 linux,code = <KEY_VOLUMEUP>;
0022 press-threshold-microvolt = <100000>;
0023 };
0024
0025 button-down {
0026 label = "Volume Down";
0027 linux,code = <KEY_VOLUMEDOWN>;
0028 press-threshold-microvolt = <300000>;
0029 };
0030
0031 menu {
0032 label = "Menu";
0033 linux,code = <KEY_MENU>;
0034 press-threshold-microvolt = <640000>;
0035 };
0036
0037 esc {
0038 label = "Esc";
0039 linux,code = <KEY_ESC>;
0040 press-threshold-microvolt = <1000000>;
0041 };
0042
0043 home {
0044 label = "Home";
0045 linux,code = <KEY_HOME>;
0046 press-threshold-microvolt = <1300000>;
0047 };
0048 };
0049
0050 backlight: backlight {
0051 compatible = "pwm-backlight";
0052 brightness-levels = <
0053 0 1 2 3 4 5 6 7
0054 8 9 10 11 12 13 14 15
0055 16 17 18 19 20 21 22 23
0056 24 25 26 27 28 29 30 31
0057 32 33 34 35 36 37 38 39
0058 40 41 42 43 44 45 46 47
0059 48 49 50 51 52 53 54 55
0060 56 57 58 59 60 61 62 63
0061 64 65 66 67 68 69 70 71
0062 72 73 74 75 76 77 78 79
0063 80 81 82 83 84 85 86 87
0064 88 89 90 91 92 93 94 95
0065 96 97 98 99 100 101 102 103
0066 104 105 106 107 108 109 110 111
0067 112 113 114 115 116 117 118 119
0068 120 121 122 123 124 125 126 127
0069 128 129 130 131 132 133 134 135
0070 136 137 138 139 140 141 142 143
0071 144 145 146 147 148 149 150 151
0072 152 153 154 155 156 157 158 159
0073 160 161 162 163 164 165 166 167
0074 168 169 170 171 172 173 174 175
0075 176 177 178 179 180 181 182 183
0076 184 185 186 187 188 189 190 191
0077 192 193 194 195 196 197 198 199
0078 200 201 202 203 204 205 206 207
0079 208 209 210 211 212 213 214 215
0080 216 217 218 219 220 221 222 223
0081 224 225 226 227 228 229 230 231
0082 232 233 234 235 236 237 238 239
0083 240 241 242 243 244 245 246 247
0084 248 249 250 251 252 253 254 255>;
0085 default-brightness-level = <128>;
0086 enable-gpios = <&gpio7 RK_PA2 GPIO_ACTIVE_HIGH>;
0087 pinctrl-names = "default";
0088 pinctrl-0 = <&bl_en>;
0089 pwms = <&pwm0 0 1000000 PWM_POLARITY_INVERTED>;
0090 };
0091
0092 ext_gmac: external-gmac-clock {
0093 compatible = "fixed-clock";
0094 clock-frequency = <125000000>;
0095 clock-output-names = "ext_gmac";
0096 #clock-cells = <0>;
0097 };
0098
0099 panel: panel {
0100 compatible = "lg,lp079qx1-sp0v";
0101 backlight = <&backlight>;
0102 enable-gpios = <&gpio7 RK_PA4 GPIO_ACTIVE_HIGH>;
0103 pinctrl-0 = <&lcd_cs>;
0104
0105 ports {
0106 panel_in: port {
0107 panel_in_edp: endpoint {
0108 remote-endpoint = <&edp_out_panel>;
0109 };
0110 };
0111 };
0112 };
0113
0114 gpio-keys {
0115 compatible = "gpio-keys";
0116 autorepeat;
0117
0118 pinctrl-names = "default";
0119 pinctrl-0 = <&pwrbtn>;
0120
0121 key-power {
0122 gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
0123 linux,code = <KEY_POWER>;
0124 label = "GPIO Key Power";
0125 linux,input-type = <1>;
0126 wakeup-source;
0127 debounce-interval = <100>;
0128 };
0129 };
0130
0131 /* This turns on USB vbus for both host0 (ehci) and host1 (dwc2) */
0132 vcc_host: vcc-host-regulator {
0133 compatible = "regulator-fixed";
0134 enable-active-high;
0135 gpio = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
0136 pinctrl-names = "default";
0137 pinctrl-0 = <&host_vbus_drv>;
0138 regulator-name = "vcc_host";
0139 regulator-always-on;
0140 regulator-boot-on;
0141 };
0142
0143 vcc_phy: vcc-phy-regulator {
0144 compatible = "regulator-fixed";
0145 enable-active-high;
0146 gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
0147 pinctrl-names = "default";
0148 pinctrl-0 = <ð_phy_pwr>;
0149 regulator-name = "vcc_phy";
0150 regulator-min-microvolt = <3300000>;
0151 regulator-max-microvolt = <3300000>;
0152 regulator-always-on;
0153 regulator-boot-on;
0154 };
0155
0156 vcc_sys: vsys-regulator {
0157 compatible = "regulator-fixed";
0158 regulator-name = "vcc_sys";
0159 regulator-min-microvolt = <5000000>;
0160 regulator-max-microvolt = <5000000>;
0161 regulator-always-on;
0162 regulator-boot-on;
0163 };
0164
0165 /*
0166 * NOTE: vcc_sd isn't hooked up on v1.0 boards where power comes from
0167 * vcc_io directly. Those boards won't be able to power cycle SD cards
0168 * but it shouldn't hurt to toggle this pin there anyway.
0169 */
0170 vcc_sd: sdmmc-regulator {
0171 compatible = "regulator-fixed";
0172 gpio = <&gpio7 RK_PB3 GPIO_ACTIVE_LOW>;
0173 pinctrl-names = "default";
0174 pinctrl-0 = <&sdmmc_pwr>;
0175 regulator-name = "vcc_sd";
0176 regulator-min-microvolt = <3300000>;
0177 regulator-max-microvolt = <3300000>;
0178 startup-delay-us = <100000>;
0179 vin-supply = <&vcc_io>;
0180 };
0181 };
0182
0183 &cpu0 {
0184 cpu0-supply = <&vdd_cpu>;
0185 };
0186
0187 &edp {
0188 force-hpd;
0189 status = "okay";
0190
0191 ports {
0192 edp_out: port@1 {
0193 reg = <1>;
0194 #address-cells = <1>;
0195 #size-cells = <0>;
0196
0197 edp_out_panel: endpoint@0 {
0198 reg = <0>;
0199 remote-endpoint = <&panel_in_edp>;
0200 };
0201 };
0202 };
0203 };
0204
0205 &edp_phy {
0206 status = "okay";
0207 };
0208
0209 &emmc {
0210 bus-width = <8>;
0211 cap-mmc-highspeed;
0212 disable-wp;
0213 non-removable;
0214 pinctrl-names = "default";
0215 pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>;
0216 status = "okay";
0217 };
0218
0219 &saradc {
0220 vref-supply = <&vcc_18>;
0221 status = "okay";
0222 };
0223
0224 &sdmmc {
0225 bus-width = <4>;
0226 cap-mmc-highspeed;
0227 cap-sd-highspeed;
0228 card-detect-delay = <200>;
0229 disable-wp; /* wp not hooked up */
0230 pinctrl-names = "default";
0231 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
0232 status = "okay";
0233 vmmc-supply = <&vcc_sd>;
0234 vqmmc-supply = <&vccio_sd>;
0235 };
0236
0237 &gmac {
0238 phy-supply = <&vcc_phy>;
0239 phy-mode = "rgmii";
0240 clock_in_out = "input";
0241 snps,reset-gpio = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
0242 snps,reset-active-low;
0243 snps,reset-delays-us = <0 10000 1000000>;
0244 assigned-clocks = <&cru SCLK_MAC>;
0245 assigned-clock-parents = <&ext_gmac>;
0246 pinctrl-names = "default";
0247 pinctrl-0 = <&rgmii_pins>;
0248 tx_delay = <0x30>;
0249 rx_delay = <0x10>;
0250 status = "okay";
0251 };
0252
0253 &gpu {
0254 mali-supply = <&vdd_gpu>;
0255 status = "okay";
0256 };
0257
0258 &hdmi {
0259 ddc-i2c-bus = <&i2c5>;
0260 status = "okay";
0261 };
0262
0263 &i2c0 {
0264 status = "okay";
0265 };
0266
0267 &i2c5 {
0268 status = "okay";
0269 };
0270
0271 &wdt {
0272 status = "okay";
0273 };
0274
0275 &pwm0 {
0276 status = "okay";
0277 };
0278
0279 &uart0 {
0280 status = "okay";
0281 };
0282
0283 &uart1 {
0284 status = "okay";
0285 };
0286
0287 &uart2 {
0288 status = "okay";
0289 };
0290
0291 &uart3 {
0292 status = "okay";
0293 };
0294
0295 &uart4 {
0296 status = "okay";
0297 };
0298
0299 &tsadc {
0300 rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */
0301 rockchip,hw-tshut-polarity = <0>; /* tshut polarity 0:LOW 1:HIGH */
0302 status = "okay";
0303 };
0304
0305 &pinctrl {
0306 pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
0307 drive-strength = <8>;
0308 };
0309
0310 pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma {
0311 bias-pull-up;
0312 drive-strength = <8>;
0313 };
0314
0315 backlight {
0316 bl_en: bl-en {
0317 rockchip,pins = <7 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
0318 };
0319 };
0320
0321 buttons {
0322 pwrbtn: pwrbtn {
0323 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
0324 };
0325 };
0326
0327 lcd {
0328 lcd_cs: lcd-cs {
0329 rockchip,pins = <7 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
0330 };
0331 };
0332
0333 pmic {
0334 pmic_int: pmic-int {
0335 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
0336 };
0337 };
0338
0339 sdmmc {
0340 /*
0341 * Default drive strength isn't enough to achieve even
0342 * high-speed mode on EVB board so bump up to 8ma.
0343 */
0344 sdmmc_bus4: sdmmc-bus4 {
0345 rockchip,pins = <6 RK_PC0 1 &pcfg_pull_up_drv_8ma>,
0346 <6 RK_PC1 1 &pcfg_pull_up_drv_8ma>,
0347 <6 RK_PC2 1 &pcfg_pull_up_drv_8ma>,
0348 <6 RK_PC3 1 &pcfg_pull_up_drv_8ma>;
0349 };
0350
0351 sdmmc_clk: sdmmc-clk {
0352 rockchip,pins = <6 RK_PC4 1 &pcfg_pull_none_drv_8ma>;
0353 };
0354
0355 sdmmc_cmd: sdmmc-cmd {
0356 rockchip,pins = <6 RK_PC5 1 &pcfg_pull_up_drv_8ma>;
0357 };
0358
0359 sdmmc_pwr: sdmmc-pwr {
0360 rockchip,pins = <7 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
0361 };
0362 };
0363
0364 usb {
0365 host_vbus_drv: host-vbus-drv {
0366 rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
0367 };
0368 };
0369
0370 eth_phy {
0371 eth_phy_pwr: eth-phy-pwr {
0372 rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
0373 };
0374 };
0375 };
0376
0377 &usbphy {
0378 status = "okay";
0379 };
0380
0381 &usb_host0_ehci {
0382 status = "okay";
0383 };
0384
0385 &usb_host1 {
0386 status = "okay";
0387 };
0388
0389 &vopb {
0390 status = "okay";
0391 };
0392
0393 &vopb_mmu {
0394 status = "okay";
0395 };
0396
0397 &vopl {
0398 status = "okay";
0399 };
0400
0401 &vopl_mmu {
0402 status = "okay";
0403 };