1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 /* 2 /* 3 * Copyright (c) 2019 Shenzhen Wesion Technolo 3 * Copyright (c) 2019 Shenzhen Wesion Technology Co., Ltd. 4 * (https://www.khadas.com) 4 * (https://www.khadas.com) 5 */ 5 */ 6 6 7 /dts-v1/; 7 /dts-v1/; 8 #include <dt-bindings/input/linux-event-codes. 8 #include <dt-bindings/input/linux-event-codes.h> 9 #include <dt-bindings/interrupt-controller/irq 9 #include <dt-bindings/interrupt-controller/irq.h> 10 #include <dt-bindings/pwm/pwm.h> 10 #include <dt-bindings/pwm/pwm.h> 11 #include "rk3399.dtsi" 11 #include "rk3399.dtsi" >> 12 #include "rk3399-opp.dtsi" 12 13 13 / { 14 / { 14 aliases { 15 aliases { 15 mmc0 = &sdio0; 16 mmc0 = &sdio0; 16 mmc1 = &sdmmc; 17 mmc1 = &sdmmc; 17 mmc2 = &sdhci; 18 mmc2 = &sdhci; 18 }; 19 }; 19 20 20 chosen { 21 chosen { 21 stdout-path = "serial2:1500000 22 stdout-path = "serial2:1500000n8"; 22 }; 23 }; 23 24 24 clkin_gmac: external-gmac-clock { 25 clkin_gmac: external-gmac-clock { 25 compatible = "fixed-clock"; 26 compatible = "fixed-clock"; 26 clock-frequency = <125000000>; 27 clock-frequency = <125000000>; 27 clock-output-names = "clkin_gm 28 clock-output-names = "clkin_gmac"; 28 #clock-cells = <0>; 29 #clock-cells = <0>; 29 }; 30 }; 30 31 31 sdio_pwrseq: sdio-pwrseq { 32 sdio_pwrseq: sdio-pwrseq { 32 compatible = "mmc-pwrseq-simpl 33 compatible = "mmc-pwrseq-simple"; 33 clocks = <&rk808 1>; 34 clocks = <&rk808 1>; 34 clock-names = "ext_clock"; 35 clock-names = "ext_clock"; 35 pinctrl-names = "default"; 36 pinctrl-names = "default"; 36 pinctrl-0 = <&wifi_enable_h>; 37 pinctrl-0 = <&wifi_enable_h>; 37 38 38 /* 39 /* 39 * On the module itself this i 40 * On the module itself this is one of these (depending 40 * on the actual card populate 41 * on the actual card populated): 41 * - SDIO_RESET_L_WL_REG_ON 42 * - SDIO_RESET_L_WL_REG_ON 42 * - PDN (power down when low) 43 * - PDN (power down when low) 43 */ 44 */ 44 reset-gpios = <&gpio2 RK_PD4 G 45 reset-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_LOW>; 45 }; 46 }; 46 47 47 /* switched by pmic_sleep */ 48 /* switched by pmic_sleep */ 48 vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 { 49 vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 { 49 compatible = "regulator-fixed" 50 compatible = "regulator-fixed"; 50 regulator-name = "vcc1v8_s3"; 51 regulator-name = "vcc1v8_s3"; 51 regulator-always-on; 52 regulator-always-on; 52 regulator-boot-on; 53 regulator-boot-on; 53 regulator-min-microvolt = <180 54 regulator-min-microvolt = <1800000>; 54 regulator-max-microvolt = <180 55 regulator-max-microvolt = <1800000>; 55 vin-supply = <&vcc_1v8>; 56 vin-supply = <&vcc_1v8>; 56 }; 57 }; 57 58 58 vcc3v3_pcie: vcc3v3-pcie-regulator { 59 vcc3v3_pcie: vcc3v3-pcie-regulator { 59 compatible = "regulator-fixed" 60 compatible = "regulator-fixed"; 60 regulator-name = "vcc3v3_pcie" 61 regulator-name = "vcc3v3_pcie"; 61 regulator-always-on; 62 regulator-always-on; 62 regulator-boot-on; 63 regulator-boot-on; 63 regulator-min-microvolt = <330 64 regulator-min-microvolt = <3300000>; 64 regulator-max-microvolt = <330 65 regulator-max-microvolt = <3300000>; 65 vin-supply = <&vsys_3v3>; 66 vin-supply = <&vsys_3v3>; 66 }; 67 }; 67 68 68 /* Actually 3 regulators (host0, 1, 2) 69 /* Actually 3 regulators (host0, 1, 2) controlled by the same gpio */ 69 vcc5v0_host: vcc5v0-host-regulator { 70 vcc5v0_host: vcc5v0-host-regulator { 70 compatible = "regulator-fixed" 71 compatible = "regulator-fixed"; 71 enable-active-high; 72 enable-active-high; 72 gpio = <&gpio4 RK_PD1 GPIO_ACT 73 gpio = <&gpio4 RK_PD1 GPIO_ACTIVE_HIGH>; 73 pinctrl-names = "default"; 74 pinctrl-names = "default"; 74 pinctrl-0 = <&vcc5v0_host_en>; 75 pinctrl-0 = <&vcc5v0_host_en>; 75 regulator-name = "vcc5v0_host" 76 regulator-name = "vcc5v0_host"; 76 regulator-always-on; 77 regulator-always-on; 77 vin-supply = <&vsys_5v0>; 78 vin-supply = <&vsys_5v0>; 78 }; 79 }; 79 80 80 vdd_log: vdd-log { 81 vdd_log: vdd-log { 81 compatible = "pwm-regulator"; 82 compatible = "pwm-regulator"; 82 pwms = <&pwm2 0 25000 1>; 83 pwms = <&pwm2 0 25000 1>; 83 pwm-supply = <&vsys_3v3>; 84 pwm-supply = <&vsys_3v3>; 84 regulator-name = "vdd_log"; 85 regulator-name = "vdd_log"; 85 regulator-always-on; 86 regulator-always-on; 86 regulator-boot-on; 87 regulator-boot-on; 87 regulator-min-microvolt = <800 88 regulator-min-microvolt = <800000>; 88 regulator-max-microvolt = <140 89 regulator-max-microvolt = <1400000>; 89 }; 90 }; 90 91 91 vsys: vsys { 92 vsys: vsys { 92 compatible = "regulator-fixed" 93 compatible = "regulator-fixed"; 93 regulator-name = "vsys"; 94 regulator-name = "vsys"; 94 regulator-always-on; 95 regulator-always-on; 95 regulator-boot-on; 96 regulator-boot-on; 96 }; 97 }; 97 98 98 vsys_3v3: vsys-3v3 { 99 vsys_3v3: vsys-3v3 { 99 compatible = "regulator-fixed" 100 compatible = "regulator-fixed"; 100 regulator-name = "vsys_3v3"; 101 regulator-name = "vsys_3v3"; 101 regulator-always-on; 102 regulator-always-on; 102 regulator-boot-on; 103 regulator-boot-on; 103 regulator-min-microvolt = <330 104 regulator-min-microvolt = <3300000>; 104 regulator-max-microvolt = <330 105 regulator-max-microvolt = <3300000>; 105 vin-supply = <&vsys>; 106 vin-supply = <&vsys>; 106 }; 107 }; 107 108 108 vsys_5v0: vsys-5v0 { 109 vsys_5v0: vsys-5v0 { 109 compatible = "regulator-fixed" 110 compatible = "regulator-fixed"; 110 regulator-name = "vsys_5v0"; 111 regulator-name = "vsys_5v0"; 111 regulator-always-on; 112 regulator-always-on; 112 regulator-boot-on; 113 regulator-boot-on; 113 regulator-min-microvolt = <500 114 regulator-min-microvolt = <5000000>; 114 regulator-max-microvolt = <500 115 regulator-max-microvolt = <5000000>; 115 vin-supply = <&vsys>; 116 vin-supply = <&vsys>; 116 }; 117 }; 117 118 118 adc-keys { 119 adc-keys { 119 compatible = "adc-keys"; 120 compatible = "adc-keys"; 120 io-channels = <&saradc 1>; 121 io-channels = <&saradc 1>; 121 io-channel-names = "buttons"; 122 io-channel-names = "buttons"; 122 keyup-threshold-microvolt = <1 123 keyup-threshold-microvolt = <1800000>; 123 poll-interval = <100>; 124 poll-interval = <100>; 124 125 125 button-recovery { !! 126 recovery { 126 label = "Recovery"; 127 label = "Recovery"; 127 linux,code = <KEY_VEND 128 linux,code = <KEY_VENDOR>; 128 press-threshold-microv 129 press-threshold-microvolt = <18000>; 129 }; 130 }; 130 }; 131 }; 131 132 132 gpio-keys { 133 gpio-keys { 133 compatible = "gpio-keys"; 134 compatible = "gpio-keys"; 134 autorepeat; 135 autorepeat; 135 pinctrl-names = "default"; 136 pinctrl-names = "default"; 136 pinctrl-0 = <&pwrbtn>; 137 pinctrl-0 = <&pwrbtn>; 137 138 138 key-power { !! 139 power { 139 debounce-interval = <1 140 debounce-interval = <100>; 140 gpios = <&gpio0 RK_PA5 141 gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>; 141 label = "GPIO Key Powe 142 label = "GPIO Key Power"; 142 linux,code = <KEY_POWE 143 linux,code = <KEY_POWER>; 143 wakeup-source; 144 wakeup-source; 144 }; 145 }; 145 }; 146 }; 146 147 147 ir-receiver { 148 ir-receiver { 148 compatible = "gpio-ir-receiver 149 compatible = "gpio-ir-receiver"; 149 gpios = <&gpio1 RK_PB6 GPIO_AC 150 gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>; 150 linux,rc-map-name = "rc-khadas 151 linux,rc-map-name = "rc-khadas"; 151 pinctrl-names = "default"; 152 pinctrl-names = "default"; 152 pinctrl-0 = <&ir_rx>; 153 pinctrl-0 = <&ir_rx>; 153 }; 154 }; 154 155 155 leds { 156 leds { 156 compatible = "gpio-leds"; 157 compatible = "gpio-leds"; 157 pinctrl-names = "default"; 158 pinctrl-names = "default"; 158 pinctrl-0 = <&sys_led_pin>, <& 159 pinctrl-0 = <&sys_led_pin>, <&user_led_pin>; 159 160 160 sys_led: led-0 { 161 sys_led: led-0 { 161 label = "sys_led"; 162 label = "sys_led"; 162 linux,default-trigger 163 linux,default-trigger = "heartbeat"; 163 gpios = <&gpio0 RK_PA6 164 gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>; 164 }; 165 }; 165 166 166 user_led: led-1 { 167 user_led: led-1 { 167 label = "user_led"; 168 label = "user_led"; 168 default-state = "off"; 169 default-state = "off"; 169 gpios = <&gpio4 RK_PD0 170 gpios = <&gpio4 RK_PD0 GPIO_ACTIVE_HIGH>; 170 }; 171 }; 171 }; 172 }; 172 173 173 fan: pwm-fan { 174 fan: pwm-fan { 174 compatible = "pwm-fan"; 175 compatible = "pwm-fan"; 175 cooling-levels = <0 150 200 25 176 cooling-levels = <0 150 200 255>; 176 #cooling-cells = <2>; 177 #cooling-cells = <2>; 177 fan-supply = <&vsys_5v0>; 178 fan-supply = <&vsys_5v0>; 178 pwms = <&pwm0 0 40000 0>; 179 pwms = <&pwm0 0 40000 0>; 179 }; 180 }; 180 }; 181 }; 181 182 182 &cpu_l0 { 183 &cpu_l0 { 183 cpu-supply = <&vdd_cpu_l>; 184 cpu-supply = <&vdd_cpu_l>; 184 }; 185 }; 185 186 186 &cpu_l1 { 187 &cpu_l1 { 187 cpu-supply = <&vdd_cpu_l>; 188 cpu-supply = <&vdd_cpu_l>; 188 }; 189 }; 189 190 190 &cpu_l2 { 191 &cpu_l2 { 191 cpu-supply = <&vdd_cpu_l>; 192 cpu-supply = <&vdd_cpu_l>; 192 }; 193 }; 193 194 194 &cpu_l3 { 195 &cpu_l3 { 195 cpu-supply = <&vdd_cpu_l>; 196 cpu-supply = <&vdd_cpu_l>; 196 }; 197 }; 197 198 198 &cpu_b0 { 199 &cpu_b0 { 199 cpu-supply = <&vdd_cpu_b>; 200 cpu-supply = <&vdd_cpu_b>; 200 }; 201 }; 201 202 202 &cpu_b1 { 203 &cpu_b1 { 203 cpu-supply = <&vdd_cpu_b>; 204 cpu-supply = <&vdd_cpu_b>; 204 }; 205 }; 205 206 206 &cpu_thermal { 207 &cpu_thermal { 207 trips { 208 trips { 208 cpu_warm: cpu_warm { 209 cpu_warm: cpu_warm { 209 temperature = <55000>; 210 temperature = <55000>; 210 hysteresis = <2000>; 211 hysteresis = <2000>; 211 type = "active"; 212 type = "active"; 212 }; 213 }; 213 214 214 cpu_hot: cpu_hot { 215 cpu_hot: cpu_hot { 215 temperature = <65000>; 216 temperature = <65000>; 216 hysteresis = <2000>; 217 hysteresis = <2000>; 217 type = "active"; 218 type = "active"; 218 }; 219 }; 219 }; 220 }; 220 221 221 cooling-maps { 222 cooling-maps { 222 map2 { 223 map2 { 223 trip = <&cpu_warm>; 224 trip = <&cpu_warm>; 224 cooling-device = <&fan 225 cooling-device = <&fan THERMAL_NO_LIMIT 1>; 225 }; 226 }; 226 227 227 map3 { 228 map3 { 228 trip = <&cpu_hot>; 229 trip = <&cpu_hot>; 229 cooling-device = <&fan 230 cooling-device = <&fan 2 THERMAL_NO_LIMIT>; 230 }; 231 }; 231 }; 232 }; 232 }; 233 }; 233 234 234 &emmc_phy { 235 &emmc_phy { 235 status = "okay"; 236 status = "okay"; 236 }; 237 }; 237 238 238 &gmac { 239 &gmac { 239 assigned-clocks = <&cru SCLK_RMII_SRC> 240 assigned-clocks = <&cru SCLK_RMII_SRC>; 240 assigned-clock-parents = <&clkin_gmac> 241 assigned-clock-parents = <&clkin_gmac>; 241 clock_in_out = "input"; 242 clock_in_out = "input"; 242 phy-supply = <&vcc_lan>; 243 phy-supply = <&vcc_lan>; 243 phy-mode = "rgmii"; 244 phy-mode = "rgmii"; 244 pinctrl-names = "default"; 245 pinctrl-names = "default"; 245 pinctrl-0 = <&rgmii_pins>; 246 pinctrl-0 = <&rgmii_pins>; 246 snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ 247 snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; 247 snps,reset-active-low; 248 snps,reset-active-low; 248 snps,reset-delays-us = <0 10000 50000> 249 snps,reset-delays-us = <0 10000 50000>; 249 tx_delay = <0x28>; 250 tx_delay = <0x28>; 250 rx_delay = <0x11>; 251 rx_delay = <0x11>; 251 }; 252 }; 252 253 253 &gpu { 254 &gpu { 254 mali-supply = <&vdd_gpu>; 255 mali-supply = <&vdd_gpu>; 255 status = "okay"; 256 status = "okay"; 256 }; 257 }; 257 258 258 &gpu_thermal { 259 &gpu_thermal { 259 trips { 260 trips { 260 gpu_warm: gpu_warm { 261 gpu_warm: gpu_warm { 261 temperature = <55000>; 262 temperature = <55000>; 262 hysteresis = <2000>; 263 hysteresis = <2000>; 263 type = "active"; 264 type = "active"; 264 }; 265 }; 265 266 266 gpu_hot: gpu_hot { 267 gpu_hot: gpu_hot { 267 temperature = <65000>; 268 temperature = <65000>; 268 hysteresis = <2000>; 269 hysteresis = <2000>; 269 type = "active"; 270 type = "active"; 270 }; 271 }; 271 }; 272 }; 272 273 273 cooling-maps { 274 cooling-maps { 274 map1 { 275 map1 { 275 trip = <&gpu_warm>; 276 trip = <&gpu_warm>; 276 cooling-device = <&fan 277 cooling-device = <&fan THERMAL_NO_LIMIT 1>; 277 }; 278 }; 278 279 279 map2 { 280 map2 { 280 trip = <&gpu_hot>; 281 trip = <&gpu_hot>; 281 cooling-device = <&fan 282 cooling-device = <&fan 2 THERMAL_NO_LIMIT>; 282 }; 283 }; 283 }; 284 }; 284 }; 285 }; 285 286 286 &hdmi { 287 &hdmi { 287 ddc-i2c-bus = <&i2c3>; 288 ddc-i2c-bus = <&i2c3>; 288 pinctrl-names = "default"; 289 pinctrl-names = "default"; 289 pinctrl-0 = <&hdmi_cec>; 290 pinctrl-0 = <&hdmi_cec>; 290 status = "okay"; 291 status = "okay"; 291 }; 292 }; 292 293 293 &hdmi_sound { 294 &hdmi_sound { 294 status = "okay"; 295 status = "okay"; 295 }; 296 }; 296 297 297 &i2c3 { 298 &i2c3 { 298 i2c-scl-rising-time-ns = <450>; 299 i2c-scl-rising-time-ns = <450>; 299 i2c-scl-falling-time-ns = <15>; 300 i2c-scl-falling-time-ns = <15>; 300 status = "okay"; 301 status = "okay"; 301 }; 302 }; 302 303 303 &i2c4 { 304 &i2c4 { 304 clock-frequency = <400000>; 305 clock-frequency = <400000>; 305 i2c-scl-rising-time-ns = <168>; 306 i2c-scl-rising-time-ns = <168>; 306 i2c-scl-falling-time-ns = <4>; 307 i2c-scl-falling-time-ns = <4>; 307 status = "okay"; 308 status = "okay"; 308 309 309 rk808: pmic@1b { 310 rk808: pmic@1b { 310 compatible = "rockchip,rk808"; 311 compatible = "rockchip,rk808"; 311 reg = <0x1b>; 312 reg = <0x1b>; 312 interrupt-parent = <&gpio1>; 313 interrupt-parent = <&gpio1>; 313 interrupts = <RK_PC6 IRQ_TYPE_ 314 interrupts = <RK_PC6 IRQ_TYPE_LEVEL_LOW>; 314 #clock-cells = <1>; 315 #clock-cells = <1>; 315 clock-output-names = "xin32k", 316 clock-output-names = "xin32k", "rk808-clkout2"; 316 pinctrl-names = "default"; 317 pinctrl-names = "default"; 317 pinctrl-0 = <&pmic_int_l>; 318 pinctrl-0 = <&pmic_int_l>; 318 rockchip,system-power-controll 319 rockchip,system-power-controller; 319 wakeup-source; 320 wakeup-source; 320 321 321 vcc1-supply = <&vsys_3v3>; 322 vcc1-supply = <&vsys_3v3>; 322 vcc2-supply = <&vsys_3v3>; 323 vcc2-supply = <&vsys_3v3>; 323 vcc3-supply = <&vsys_3v3>; 324 vcc3-supply = <&vsys_3v3>; 324 vcc4-supply = <&vsys_3v3>; 325 vcc4-supply = <&vsys_3v3>; 325 vcc6-supply = <&vsys_3v3>; 326 vcc6-supply = <&vsys_3v3>; 326 vcc7-supply = <&vsys_3v3>; 327 vcc7-supply = <&vsys_3v3>; 327 vcc8-supply = <&vsys_3v3>; 328 vcc8-supply = <&vsys_3v3>; 328 vcc9-supply = <&vsys_3v3>; 329 vcc9-supply = <&vsys_3v3>; 329 vcc10-supply = <&vsys_3v3>; 330 vcc10-supply = <&vsys_3v3>; 330 vcc11-supply = <&vsys_3v3>; 331 vcc11-supply = <&vsys_3v3>; 331 vcc12-supply = <&vsys_3v3>; 332 vcc12-supply = <&vsys_3v3>; 332 vddio-supply = <&vcc_1v8>; 333 vddio-supply = <&vcc_1v8>; 333 334 334 regulators { 335 regulators { 335 vdd_center: DCDC_REG1 336 vdd_center: DCDC_REG1 { 336 regulator-name 337 regulator-name = "vdd_center"; 337 regulator-alwa 338 regulator-always-on; 338 regulator-boot 339 regulator-boot-on; 339 regulator-min- 340 regulator-min-microvolt = <750000>; 340 regulator-max- 341 regulator-max-microvolt = <1350000>; 341 regulator-ramp 342 regulator-ramp-delay = <6001>; 342 343 343 regulator-stat 344 regulator-state-mem { 344 regula 345 regulator-off-in-suspend; 345 }; 346 }; 346 }; 347 }; 347 348 348 vdd_cpu_l: DCDC_REG2 { 349 vdd_cpu_l: DCDC_REG2 { 349 regulator-name 350 regulator-name = "vdd_cpu_l"; 350 regulator-alwa 351 regulator-always-on; 351 regulator-boot 352 regulator-boot-on; 352 regulator-min- 353 regulator-min-microvolt = <750000>; 353 regulator-max- 354 regulator-max-microvolt = <1350000>; 354 regulator-ramp 355 regulator-ramp-delay = <6001>; 355 356 356 regulator-stat 357 regulator-state-mem { 357 regula 358 regulator-off-in-suspend; 358 }; 359 }; 359 }; 360 }; 360 361 361 vcc_ddr: DCDC_REG3 { 362 vcc_ddr: DCDC_REG3 { 362 regulator-name 363 regulator-name = "vcc_ddr"; 363 regulator-alwa 364 regulator-always-on; 364 regulator-boot 365 regulator-boot-on; 365 366 366 regulator-stat 367 regulator-state-mem { 367 regula 368 regulator-on-in-suspend; 368 }; 369 }; 369 }; 370 }; 370 371 371 vcc_1v8: DCDC_REG4 { 372 vcc_1v8: DCDC_REG4 { 372 regulator-name 373 regulator-name = "vcc_1v8"; 373 regulator-alwa 374 regulator-always-on; 374 regulator-boot 375 regulator-boot-on; 375 regulator-min- 376 regulator-min-microvolt = <1800000>; 376 regulator-max- 377 regulator-max-microvolt = <1800000>; 377 378 378 regulator-stat 379 regulator-state-mem { 379 regula 380 regulator-on-in-suspend; 380 regula 381 regulator-suspend-microvolt = <1800000>; 381 }; 382 }; 382 }; 383 }; 383 384 384 vcc1v8_apio2: LDO_REG1 385 vcc1v8_apio2: LDO_REG1 { 385 regulator-name 386 regulator-name = "vcc1v8_apio2"; 386 regulator-alwa 387 regulator-always-on; 387 regulator-boot 388 regulator-boot-on; 388 regulator-min- 389 regulator-min-microvolt = <1800000>; 389 regulator-max- 390 regulator-max-microvolt = <1800000>; 390 391 391 regulator-stat 392 regulator-state-mem { 392 regula 393 regulator-off-in-suspend; 393 }; 394 }; 394 }; 395 }; 395 396 396 vcc_vldo2: LDO_REG2 { 397 vcc_vldo2: LDO_REG2 { 397 regulator-name 398 regulator-name = "vcc_vldo2"; 398 regulator-alwa 399 regulator-always-on; 399 regulator-boot 400 regulator-boot-on; 400 regulator-min- 401 regulator-min-microvolt = <3000000>; 401 regulator-max- 402 regulator-max-microvolt = <3000000>; 402 403 403 regulator-stat 404 regulator-state-mem { 404 regula 405 regulator-off-in-suspend; 405 }; 406 }; 406 }; 407 }; 407 408 408 vcc1v8_pmupll: LDO_REG 409 vcc1v8_pmupll: LDO_REG3 { 409 regulator-name 410 regulator-name = "vcc1v8_pmupll"; 410 regulator-alwa 411 regulator-always-on; 411 regulator-boot 412 regulator-boot-on; 412 regulator-min- 413 regulator-min-microvolt = <1800000>; 413 regulator-max- 414 regulator-max-microvolt = <1800000>; 414 415 415 regulator-stat 416 regulator-state-mem { 416 regula 417 regulator-on-in-suspend; 417 regula 418 regulator-suspend-microvolt = <1800000>; 418 }; 419 }; 419 }; 420 }; 420 421 421 vccio_sd: LDO_REG4 { 422 vccio_sd: LDO_REG4 { 422 regulator-name 423 regulator-name = "vccio_sd"; 423 regulator-alwa 424 regulator-always-on; 424 regulator-boot 425 regulator-boot-on; 425 regulator-min- 426 regulator-min-microvolt = <1800000>; 426 regulator-max- 427 regulator-max-microvolt = <3000000>; 427 428 428 regulator-stat 429 regulator-state-mem { 429 regula 430 regulator-on-in-suspend; 430 regula 431 regulator-suspend-microvolt = <3000000>; 431 }; 432 }; 432 }; 433 }; 433 434 434 vcc_vldo5: LDO_REG5 { 435 vcc_vldo5: LDO_REG5 { 435 regulator-name 436 regulator-name = "vcc_vldo5"; 436 regulator-alwa 437 regulator-always-on; 437 regulator-boot 438 regulator-boot-on; 438 regulator-min- 439 regulator-min-microvolt = <3000000>; 439 regulator-max- 440 regulator-max-microvolt = <3000000>; 440 441 441 regulator-stat 442 regulator-state-mem { 442 regula 443 regulator-off-in-suspend; 443 }; 444 }; 444 }; 445 }; 445 446 446 vcc_1v5: LDO_REG6 { 447 vcc_1v5: LDO_REG6 { 447 regulator-name 448 regulator-name = "vcc_1v5"; 448 regulator-alwa 449 regulator-always-on; 449 regulator-boot 450 regulator-boot-on; 450 regulator-min- 451 regulator-min-microvolt = <1500000>; 451 regulator-max- 452 regulator-max-microvolt = <1500000>; 452 453 453 regulator-stat 454 regulator-state-mem { 454 regula 455 regulator-on-in-suspend; 455 regula 456 regulator-suspend-microvolt = <1500000>; 456 }; 457 }; 457 }; 458 }; 458 459 459 vcc1v8_codec: LDO_REG7 460 vcc1v8_codec: LDO_REG7 { 460 regulator-name 461 regulator-name = "vcc1v8_codec"; 461 regulator-alwa 462 regulator-always-on; 462 regulator-boot 463 regulator-boot-on; 463 regulator-min- 464 regulator-min-microvolt = <1800000>; 464 regulator-max- 465 regulator-max-microvolt = <1800000>; 465 466 466 regulator-stat 467 regulator-state-mem { 467 regula 468 regulator-off-in-suspend; 468 }; 469 }; 469 }; 470 }; 470 471 471 vcc_3v0: LDO_REG8 { 472 vcc_3v0: LDO_REG8 { 472 regulator-name 473 regulator-name = "vcc_3v0"; 473 regulator-alwa 474 regulator-always-on; 474 regulator-boot 475 regulator-boot-on; 475 regulator-min- 476 regulator-min-microvolt = <3000000>; 476 regulator-max- 477 regulator-max-microvolt = <3000000>; 477 478 478 regulator-stat 479 regulator-state-mem { 479 regula 480 regulator-on-in-suspend; 480 regula 481 regulator-suspend-microvolt = <3000000>; 481 }; 482 }; 482 }; 483 }; 483 484 484 vcc3v3_s3: vcc_lan: SW 485 vcc3v3_s3: vcc_lan: SWITCH_REG1 { 485 regulator-name 486 regulator-name = "vcc3v3_s3"; 486 regulator-alwa 487 regulator-always-on; 487 regulator-boot 488 regulator-boot-on; 488 489 489 regulator-stat 490 regulator-state-mem { 490 regula 491 regulator-off-in-suspend; 491 }; 492 }; 492 }; 493 }; 493 494 494 vcc3v3_s0: SWITCH_REG2 495 vcc3v3_s0: SWITCH_REG2 { 495 regulator-name 496 regulator-name = "vcc3v3_s0"; 496 regulator-alwa 497 regulator-always-on; 497 regulator-boot 498 regulator-boot-on; 498 499 499 regulator-stat 500 regulator-state-mem { 500 regula 501 regulator-off-in-suspend; 501 }; 502 }; 502 }; 503 }; 503 }; 504 }; 504 }; 505 }; 505 506 506 vdd_cpu_b: regulator@40 { 507 vdd_cpu_b: regulator@40 { 507 compatible = "silergy,syr827"; 508 compatible = "silergy,syr827"; 508 reg = <0x40>; 509 reg = <0x40>; 509 fcs,suspend-voltage-selector = 510 fcs,suspend-voltage-selector = <1>; 510 pinctrl-names = "default"; 511 pinctrl-names = "default"; 511 pinctrl-0 = <&cpu_b_sleep>; 512 pinctrl-0 = <&cpu_b_sleep>; 512 regulator-name = "vdd_cpu_b"; 513 regulator-name = "vdd_cpu_b"; 513 regulator-min-microvolt = <712 514 regulator-min-microvolt = <712500>; 514 regulator-max-microvolt = <150 515 regulator-max-microvolt = <1500000>; 515 regulator-ramp-delay = <1000>; 516 regulator-ramp-delay = <1000>; 516 regulator-always-on; 517 regulator-always-on; 517 regulator-boot-on; 518 regulator-boot-on; 518 vin-supply = <&vsys_3v3>; 519 vin-supply = <&vsys_3v3>; 519 520 520 regulator-state-mem { 521 regulator-state-mem { 521 regulator-off-in-suspe 522 regulator-off-in-suspend; 522 }; 523 }; 523 }; 524 }; 524 525 525 vdd_gpu: regulator@41 { 526 vdd_gpu: regulator@41 { 526 compatible = "silergy,syr828"; 527 compatible = "silergy,syr828"; 527 reg = <0x41>; 528 reg = <0x41>; 528 fcs,suspend-voltage-selector = 529 fcs,suspend-voltage-selector = <1>; 529 pinctrl-names = "default"; 530 pinctrl-names = "default"; 530 pinctrl-0 = <&gpu_sleep>; 531 pinctrl-0 = <&gpu_sleep>; 531 regulator-name = "vdd_gpu"; 532 regulator-name = "vdd_gpu"; 532 regulator-min-microvolt = <712 533 regulator-min-microvolt = <712500>; 533 regulator-max-microvolt = <150 534 regulator-max-microvolt = <1500000>; 534 regulator-ramp-delay = <1000>; 535 regulator-ramp-delay = <1000>; 535 regulator-always-on; 536 regulator-always-on; 536 regulator-boot-on; 537 regulator-boot-on; 537 vin-supply = <&vsys_3v3>; 538 vin-supply = <&vsys_3v3>; 538 539 539 regulator-state-mem { 540 regulator-state-mem { 540 regulator-off-in-suspe 541 regulator-off-in-suspend; 541 }; 542 }; 542 }; 543 }; 543 }; 544 }; 544 545 545 &i2c8 { 546 &i2c8 { 546 clock-frequency = <400000>; 547 clock-frequency = <400000>; 547 i2c-scl-rising-time-ns = <160>; 548 i2c-scl-rising-time-ns = <160>; 548 i2c-scl-falling-time-ns = <30>; 549 i2c-scl-falling-time-ns = <30>; 549 status = "okay"; 550 status = "okay"; 550 }; 551 }; 551 552 552 &i2s0 { 553 &i2s0 { 553 rockchip,playback-channels = <8>; 554 rockchip,playback-channels = <8>; 554 rockchip,capture-channels = <8>; 555 rockchip,capture-channels = <8>; 555 status = "okay"; 556 status = "okay"; 556 }; 557 }; 557 558 558 &i2s1 { 559 &i2s1 { 559 rockchip,playback-channels = <2>; 560 rockchip,playback-channels = <2>; 560 rockchip,capture-channels = <2>; 561 rockchip,capture-channels = <2>; 561 status = "okay"; 562 status = "okay"; 562 }; 563 }; 563 564 564 &i2s2 { 565 &i2s2 { 565 status = "okay"; 566 status = "okay"; 566 }; 567 }; 567 568 568 &io_domains { 569 &io_domains { 569 bt656-supply = <&vcc1v8_apio2>; 570 bt656-supply = <&vcc1v8_apio2>; 570 audio-supply = <&vcc1v8_codec>; 571 audio-supply = <&vcc1v8_codec>; 571 sdmmc-supply = <&vccio_sd>; 572 sdmmc-supply = <&vccio_sd>; 572 gpio1830-supply = <&vcc_3v0>; 573 gpio1830-supply = <&vcc_3v0>; 573 status = "okay"; 574 status = "okay"; 574 }; 575 }; 575 576 576 &pmu_io_domains { 577 &pmu_io_domains { 577 pmu1830-supply = <&vcc_1v8>; 578 pmu1830-supply = <&vcc_1v8>; 578 status = "okay"; 579 status = "okay"; 579 }; 580 }; 580 581 581 &pinctrl { 582 &pinctrl { 582 bt { 583 bt { 583 bt_host_wake_l: bt-host-wake-l 584 bt_host_wake_l: bt-host-wake-l { 584 rockchip,pins = <0 RK_ 585 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>; 585 }; 586 }; 586 587 587 bt_reg_on_h: bt-reg-on-h { 588 bt_reg_on_h: bt-reg-on-h { 588 rockchip,pins = <2 RK_ 589 rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>; 589 }; 590 }; 590 591 591 bt_wake_l: bt-wake-l { 592 bt_wake_l: bt-wake-l { 592 rockchip,pins = <2 RK_ 593 rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>; 593 }; 594 }; 594 }; 595 }; 595 596 596 buttons { 597 buttons { 597 pwrbtn: pwrbtn { 598 pwrbtn: pwrbtn { 598 rockchip,pins = <0 RK_ 599 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>; 599 }; 600 }; 600 }; 601 }; 601 602 602 ir { 603 ir { 603 ir_rx: ir-rx { 604 ir_rx: ir-rx { 604 rockchip,pins = <1 RK_PB6 605 rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>; 605 }; 606 }; 606 }; 607 }; 607 608 608 leds { 609 leds { 609 sys_led_pin: sys-led-pin { 610 sys_led_pin: sys-led-pin { 610 rockchip,pins = <0 RK_ 611 rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>; 611 }; 612 }; 612 613 613 user_led_pin: user-led-pin { 614 user_led_pin: user-led-pin { 614 rockchip,pins = <4 RK_ 615 rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>; 615 }; 616 }; 616 }; 617 }; 617 618 618 pmic { 619 pmic { 619 pmic_int_l: pmic-int-l { 620 pmic_int_l: pmic-int-l { 620 rockchip,pins = <1 RK_ 621 rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>; 621 }; 622 }; 622 623 623 cpu_b_sleep: cpu-b-sleep { 624 cpu_b_sleep: cpu-b-sleep { 624 rockchip,pins = <1 RK_ 625 rockchip,pins = <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_down>; 625 }; 626 }; 626 627 627 gpu_sleep: gpu-sleep { 628 gpu_sleep: gpu-sleep { 628 rockchip,pins = <0 RK_ 629 rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_down>; 629 }; 630 }; 630 }; 631 }; 631 632 632 sdio-pwrseq { 633 sdio-pwrseq { 633 wifi_enable_h: wifi-enable-h { 634 wifi_enable_h: wifi-enable-h { 634 rockchip,pins = <2 RK_ 635 rockchip,pins = <2 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>; 635 }; 636 }; 636 }; 637 }; 637 638 638 usb2 { 639 usb2 { 639 vcc5v0_host_en: vcc5v0-host-en 640 vcc5v0_host_en: vcc5v0-host-en { 640 rockchip,pins = <4 RK_ 641 rockchip,pins = <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>; 641 }; 642 }; 642 }; 643 }; 643 644 644 wifi { 645 wifi { 645 wifi_host_wake_l: wifi-host-wa 646 wifi_host_wake_l: wifi-host-wake-l { 646 rockchip,pins = <0 RK_ 647 rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>; 647 }; 648 }; 648 }; 649 }; 649 }; 650 }; 650 651 651 &pwm0 { 652 &pwm0 { 652 status = "okay"; 653 status = "okay"; 653 }; 654 }; 654 655 655 &pwm2 { 656 &pwm2 { 656 status = "okay"; 657 status = "okay"; 657 }; 658 }; 658 659 659 &saradc { 660 &saradc { 660 vref-supply = <&vcca1v8_s3>; 661 vref-supply = <&vcca1v8_s3>; 661 status = "okay"; 662 status = "okay"; 662 }; 663 }; 663 664 664 &sdio0 { 665 &sdio0 { 665 /* WiFi & BT combo module Ampak AP6356 666 /* WiFi & BT combo module Ampak AP6356S */ 666 bus-width = <4>; 667 bus-width = <4>; 667 cap-sdio-irq; 668 cap-sdio-irq; 668 cap-sd-highspeed; 669 cap-sd-highspeed; 669 keep-power-in-suspend; 670 keep-power-in-suspend; 670 mmc-pwrseq = <&sdio_pwrseq>; 671 mmc-pwrseq = <&sdio_pwrseq>; 671 non-removable; 672 non-removable; 672 pinctrl-names = "default"; 673 pinctrl-names = "default"; 673 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &s 674 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>; 674 sd-uhs-sdr104; 675 sd-uhs-sdr104; 675 vqmmc-supply = <&vcc1v8_s3>; 676 vqmmc-supply = <&vcc1v8_s3>; 676 vmmc-supply = <&vccio_sd>; 677 vmmc-supply = <&vccio_sd>; 677 #address-cells = <1>; 678 #address-cells = <1>; 678 #size-cells = <0>; 679 #size-cells = <0>; 679 status = "okay"; 680 status = "okay"; 680 681 681 brcmf: wifi@1 { 682 brcmf: wifi@1 { 682 reg = <1>; 683 reg = <1>; 683 compatible = "brcm,bcm4329-fma 684 compatible = "brcm,bcm4329-fmac"; 684 interrupt-parent = <&gpio0>; 685 interrupt-parent = <&gpio0>; 685 interrupts = <RK_PA3 IRQ_TYPE_ 686 interrupts = <RK_PA3 IRQ_TYPE_LEVEL_HIGH>; 686 interrupt-names = "host-wake"; 687 interrupt-names = "host-wake"; 687 brcm,drive-strength = <5>; 688 brcm,drive-strength = <5>; 688 pinctrl-names = "default"; 689 pinctrl-names = "default"; 689 pinctrl-0 = <&wifi_host_wake_l 690 pinctrl-0 = <&wifi_host_wake_l>; 690 }; 691 }; 691 }; 692 }; 692 693 693 &sdmmc { 694 &sdmmc { 694 bus-width = <4>; 695 bus-width = <4>; 695 cap-mmc-highspeed; 696 cap-mmc-highspeed; 696 cap-sd-highspeed; 697 cap-sd-highspeed; 697 cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_ 698 cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>; 698 disable-wp; 699 disable-wp; 699 max-frequency = <150000000>; 700 max-frequency = <150000000>; 700 pinctrl-names = "default"; 701 pinctrl-names = "default"; 701 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sd 702 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>; 702 status = "okay"; 703 status = "okay"; 703 }; 704 }; 704 705 705 &sdhci { 706 &sdhci { 706 bus-width = <8>; 707 bus-width = <8>; 707 mmc-hs400-1_8v; 708 mmc-hs400-1_8v; 708 non-removable; 709 non-removable; 709 status = "okay"; 710 status = "okay"; 710 }; 711 }; 711 712 712 &spi1 { 713 &spi1 { 713 status = "okay"; 714 status = "okay"; 714 715 715 spiflash: flash@0 { 716 spiflash: flash@0 { 716 compatible = "winbond,w25q128f 717 compatible = "winbond,w25q128fw", "jedec,spi-nor"; 717 reg = <0>; 718 reg = <0>; 718 spi-max-frequency = <104000000 719 spi-max-frequency = <104000000>; 719 }; 720 }; 720 }; 721 }; 721 722 722 &tcphy0 { 723 &tcphy0 { 723 status = "okay"; 724 status = "okay"; 724 }; 725 }; 725 726 726 &tcphy1 { 727 &tcphy1 { 727 status = "okay"; 728 status = "okay"; 728 }; 729 }; 729 730 730 &tsadc { 731 &tsadc { 731 /* tshut mode 0:CRU 1:GPIO */ 732 /* tshut mode 0:CRU 1:GPIO */ 732 rockchip,hw-tshut-mode = <1>; 733 rockchip,hw-tshut-mode = <1>; 733 /* tshut polarity 0:LOW 1:HIGH */ 734 /* tshut polarity 0:LOW 1:HIGH */ 734 rockchip,hw-tshut-polarity = <1>; 735 rockchip,hw-tshut-polarity = <1>; 735 status = "okay"; 736 status = "okay"; 736 }; 737 }; 737 738 738 &u2phy0 { 739 &u2phy0 { 739 status = "okay"; 740 status = "okay"; 740 741 741 u2phy0_otg: otg-port { 742 u2phy0_otg: otg-port { 742 status = "okay"; 743 status = "okay"; 743 }; 744 }; 744 745 745 u2phy0_host: host-port { 746 u2phy0_host: host-port { 746 phy-supply = <&vcc5v0_host>; 747 phy-supply = <&vcc5v0_host>; 747 status = "okay"; 748 status = "okay"; 748 }; 749 }; 749 }; 750 }; 750 751 751 &u2phy1 { 752 &u2phy1 { 752 status = "okay"; 753 status = "okay"; 753 754 754 u2phy1_otg: otg-port { 755 u2phy1_otg: otg-port { 755 status = "okay"; 756 status = "okay"; 756 }; 757 }; 757 758 758 u2phy1_host: host-port { 759 u2phy1_host: host-port { 759 phy-supply = <&vcc5v0_host>; 760 phy-supply = <&vcc5v0_host>; 760 status = "okay"; 761 status = "okay"; 761 }; 762 }; 762 }; 763 }; 763 764 764 &uart0 { 765 &uart0 { 765 pinctrl-names = "default"; 766 pinctrl-names = "default"; 766 pinctrl-0 = <&uart0_xfer &uart0_rts &u 767 pinctrl-0 = <&uart0_xfer &uart0_rts &uart0_cts>; 767 status = "okay"; 768 status = "okay"; 768 769 769 bluetooth { 770 bluetooth { 770 compatible = "brcm,bcm43438-bt 771 compatible = "brcm,bcm43438-bt"; 771 clocks = <&rk808 1>; 772 clocks = <&rk808 1>; 772 clock-names = "lpo"; 773 clock-names = "lpo"; 773 device-wakeup-gpios = <&gpio2 774 device-wakeup-gpios = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>; 774 host-wakeup-gpios = <&gpio0 RK 775 host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>; 775 shutdown-gpios = <&gpio2 RK_PD 776 shutdown-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>; 776 max-speed = <4000000>; 777 max-speed = <4000000>; 777 pinctrl-names = "default"; 778 pinctrl-names = "default"; 778 pinctrl-0 = <&bt_reg_on_h &bt_ 779 pinctrl-0 = <&bt_reg_on_h &bt_host_wake_l &bt_wake_l>; 779 vbat-supply = <&vsys_3v3>; 780 vbat-supply = <&vsys_3v3>; 780 vddio-supply = <&vcc_1v8>; 781 vddio-supply = <&vcc_1v8>; 781 }; 782 }; 782 }; 783 }; 783 784 784 &uart2 { 785 &uart2 { 785 status = "okay"; 786 status = "okay"; 786 }; 787 }; 787 788 788 &usb_host0_ehci { 789 &usb_host0_ehci { 789 status = "okay"; 790 status = "okay"; 790 }; 791 }; 791 792 792 &usb_host0_ohci { 793 &usb_host0_ohci { 793 status = "okay"; 794 status = "okay"; 794 }; 795 }; 795 796 796 &usb_host1_ehci { 797 &usb_host1_ehci { 797 status = "okay"; 798 status = "okay"; 798 }; 799 }; 799 800 800 &usb_host1_ohci { 801 &usb_host1_ohci { 801 status = "okay"; 802 status = "okay"; 802 }; 803 }; 803 804 804 &usbdrd3_0 { 805 &usbdrd3_0 { 805 status = "okay"; 806 status = "okay"; 806 }; 807 }; 807 808 808 &usbdrd_dwc3_0 { 809 &usbdrd_dwc3_0 { 809 status = "okay"; 810 status = "okay"; 810 dr_mode = "otg"; 811 dr_mode = "otg"; 811 }; 812 }; 812 813 813 &usbdrd3_1 { 814 &usbdrd3_1 { 814 status = "okay"; 815 status = "okay"; 815 }; 816 }; 816 817 817 &usbdrd_dwc3_1 { 818 &usbdrd_dwc3_1 { 818 status = "okay"; 819 status = "okay"; 819 dr_mode = "host"; 820 dr_mode = "host"; 820 }; 821 }; 821 822 822 &vopb { 823 &vopb { 823 status = "okay"; 824 status = "okay"; 824 }; 825 }; 825 826 826 &vopb_mmu { 827 &vopb_mmu { 827 status = "okay"; 828 status = "okay"; 828 }; 829 }; 829 830 830 &vopl { 831 &vopl { 831 status = "okay"; 832 status = "okay"; 832 }; 833 }; 833 834 834 &vopl_mmu { 835 &vopl_mmu { 835 status = "okay"; 836 status = "okay"; 836 }; 837 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.