1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2/* 3 * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd 4 */ 5 6/dts-v1/; 7 8#include <dt-bindings/input/input.h> 9#include "arm64/rockchip/rk3308.dtsi" 10 11/ { 12 model = "Rockchip RK3308 Dot Rk816-3 V10 (AArch32)"; 13 compatible = "rockchip,rk3308-dot-rk816-v10-aarch32", "rockchip,rk3308"; 14 15 chosen { 16 bootargs = "earlycon=uart8250,mmio32,0xff0c0000 console=ttyFIQ0 root=PARTUUID=614e0000-0000 rootfstype=squashfs rootwait snd_aloop.index=7 snd_aloop.use_raw_jiffies=1"; 17 }; 18 19 acodec_sound: acodec-sound { 20 compatible = "rockchip,multicodecs-card"; 21 rockchip,card-name = "rockchip,rk3308-acodec"; 22 rockchip,codec-hp-det; 23 rockchip,mclk-fs = <256>; 24 rockchip,cpu = <&i2s_8ch_2>; 25 rockchip,codec = <&acodec>; 26 status = "okay"; 27 }; 28 29 adc-keys { 30 compatible = "adc-keys"; 31 io-channels = <&saradc 1>; 32 io-channel-names = "buttons"; 33 poll-interval = <100>; 34 keyup-threshold-microvolt = <1800000>; 35 36 esc-key { 37 linux,code = <KEY_MICMUTE>; 38 label = "micmute"; 39 press-threshold-microvolt = <1130000>; 40 }; 41 42 menu-key { 43 linux,code = <KEY_PLAY>; 44 label = "play"; 45 press-threshold-microvolt = <624000>; 46 }; 47 48 vol-down-key { 49 linux,code = <KEY_VOLUMEDOWN>; 50 label = "volume down"; 51 press-threshold-microvolt = <300000>; 52 }; 53 54 vol-up-key { 55 linux,code = <KEY_VOLUMEUP>; 56 label = "volume up"; 57 press-threshold-microvolt = <18000>; 58 }; 59 }; 60 61 charge-animation { 62 compatible = "rockchip,uboot-charge"; 63 rockchip,uboot-charge-on = <1>; 64 rockchip,uboot-low-power-voltage = <3500>; 65 status = "okay"; 66 }; 67 68 dummy_codec: dummy-codec { 69 compatible = "rockchip,dummy-codec"; 70 #sound-dai-cells = <0>; 71 }; 72 73 leds { 74 status = "okay"; 75 compatible = "gpio-leds"; 76 77 blue-led { 78 gpios = <&gpio2 RK_PA1 GPIO_ACTIVE_LOW>; 79 label = "battery_full"; 80 default-state = "off"; 81 linux,default-trigger = "battery-full"; 82 }; 83 84 green-led { 85 gpios = <&gpio2 RK_PA0 GPIO_ACTIVE_LOW>; 86 label = "greenled"; 87 default-state = "off"; 88 linux,default-trigger = "default-off"; 89 }; 90 91 red-led { 92 gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>; 93 label = "battery_charging"; 94 default-state = "off"; 95 linux,default-trigger = "battery-charging"; 96 }; 97 }; 98 99 pcm_codec: pcm-codec { 100 compatible = "delta,dfbmcs320"; 101 #sound-dai-cells = <0>; 102 }; 103 104 sdio_pwrseq: sdio-pwrseq { 105 compatible = "mmc-pwrseq-simple"; 106 pinctrl-names = "default"; 107 pinctrl-0 = <&wifi_enable_h>; 108 109 /* 110 * On the module itself this is one of these (depending 111 * on the actual card populated): 112 * - SDIO_RESET_L_WL_REG_ON 113 * - PDN (power down when low) 114 */ 115 reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>; 116 }; 117 118 sound_pcm { 119 compatible = "simple-audio-card"; 120 simple-audio-card,format = "dsp_b"; 121 simple-audio-card,name = "rockchip,rk3308-pcm"; 122 simple-audio-card,mclk-fs = <256>; 123 simple-audio-card,cpu { 124 sound-dai = <&i2s_2ch_0>; 125 }; 126 simple-audio-card,codec { 127 sound-dai = <&pcm_codec>; 128 }; 129 }; 130 131 vad-sound { 132 status = "disabled"; 133 compatible = "rockchip,multicodecs-card"; 134 rockchip,card-name = "rockchip,rk3308-vad"; 135 rockchip,codec-hp-det; 136 rockchip,cpu = <&i2s_8ch_2>; 137 rockchip,codec = <&acodec>, <&vad>; 138 }; 139 140 vcc_sys: vcc-sys { 141 compatible = "regulator-fixed"; 142 regulator-name = "vcc_sys"; 143 regulator-min-microvolt = <4000000>; 144 regulator-max-microvolt = <4000000>; 145 regulator-always-on; 146 }; 147 148 wireless-bluetooth { 149 compatible = "bluetooth-platdata"; 150 uart_rts_gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_LOW>; 151 pinctrl-names = "default", "rts_gpio"; 152 pinctrl-0 = <&uart4_rts>; 153 pinctrl-1 = <&uart4_rts_gpio>; 154 BT,power_gpio = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>; 155 BT,wake_host_irq = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>; 156 status = "okay"; 157 }; 158 159 wireless-wlan { 160 compatible = "wlan-platdata"; 161 rockchip,grf = <&grf>; 162 clocks = <&cru SCLK_WIFI>; 163 clock-names = "clk_wifi"; 164 ref-clock-frequency = <24000000>; 165 pinctrl-names = "default"; 166 pinctrl-0 = <&wifi_wake_host>, <&rtc_32k>; 167 wifi_chip_type = "rtl8723ds"; 168 WIFI,host_wake_irq = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>; 169 status = "okay"; 170 }; 171}; 172 173&i2c1 { 174 status = "okay"; 175 clock-frequency = <400000>; 176 177 rk816: pmic@1a { 178 status = "okay"; 179 compatible = "rockchip,rk816"; 180 reg = <0x1a>; 181 interrupt-parent = <&gpio0>; 182 interrupts = <6 IRQ_TYPE_LEVEL_LOW>; 183 pinctrl-names = "default"; 184 pinctrl-0 = <&pmic_int_l>; 185 rockchip,system-power-controller; 186 wakeup-source; 187 gpio-controller; 188 #gpio-cells = <2>; 189 #clock-cells = <1>; 190 clock-output-names = "rk816-clkout1", "rk816-clkout2"; 191 extcon = <&u2phy>; 192 193 vcc1-supply = <&vcc_sys>; 194 vcc2-supply = <&vcc_sys>; 195 vcc3-supply = <&vcc_sys>; 196 vcc4-supply = <&vcc_sys>; 197 vcc5-supply = <&vcc_io>; 198 vcc6-supply = <&vcc_sys>; 199 200 pwrkey { 201 status = "okay"; 202 }; 203 204 gpio { 205 status = "okay"; 206 }; 207 208 rtc { 209 status = "okay"; 210 }; 211 212 battery { 213 compatible = "rk816-battery"; 214 ocv_table = <3400 3625 3685 3697 3718 3735 3748 215 3760 3774 3788 3802 3816 3834 3853 216 3877 3908 3946 3975 4018 4071 4106>; 217 design_capacity = <2750>; 218 design_qmax = <3000>; 219 bat_res = <110>; 220 max_input_current = <2000>; 221 max_chrg_current = <1800>; 222 max_chrg_voltage = <4200>; 223 sleep_enter_current = <300>; 224 sleep_exit_current = <300>; 225 sleep_filter_current = <100>; 226 power_off_thresd = <3400>; 227 zero_algorithm_vol = <3850>; 228 max_soc_offset = <80>; 229 monitor_sec = <5>; 230 virtual_power = <0>; 231 power_dc2otg = <0>; 232 dc_det_adc = <0>; 233 }; 234 235 regulators { 236 vdd_core: DCDC_REG1{ 237 regulator-name = "vdd_core"; 238 regulator-min-microvolt = <750000>; 239 regulator-max-microvolt = <1500000>; 240 regulator-ramp-delay = <6001>; 241 regulator-initial-mode = <1>; 242 regulator-always-on; 243 regulator-boot-on; 244 regulator-state-mem { 245 regulator-off-in-suspend; 246 }; 247 }; 248 249 vdd_log: DCDC_REG2 { 250 regulator-name = "vdd_logic"; 251 regulator-min-microvolt = <750000>; 252 regulator-max-microvolt = <1500000>; 253 regulator-ramp-delay = <6001>; 254 regulator-initial-mode = <1>; 255 regulator-always-on; 256 regulator-boot-on; 257 regulator-state-mem { 258 regulator-on-in-suspend; 259 regulator-suspend-microvolt = <1000000>; 260 }; 261 }; 262 263 vcc_ddr: DCDC_REG3 { 264 regulator-name = "vcc_ddr"; 265 regulator-always-on; 266 regulator-boot-on; 267 }; 268 269 vcc_io: DCDC_REG4 { 270 regulator-name = "vcc_io"; 271 regulator-min-microvolt = <3300000>; 272 regulator-max-microvolt = <3300000>; 273 regulator-initial-mode = <1>; 274 regulator-always-on; 275 regulator-boot-on; 276 regulator-state-mem { 277 regulator-on-in-suspend; 278 regulator-suspend-microvolt = <3000000>; 279 }; 280 }; 281 282 vcc_1v8_codec: LDO_REG1 { 283 regulator-name = "vcc_1v8_codec"; 284 regulator-min-microvolt = <1800000>; 285 regulator-max-microvolt = <1800000>; 286 regulator-always-on; 287 regulator-boot-on; 288 regulator-state-mem { 289 regulator-on-in-suspend; 290 regulator-suspend-microvolt = <1800000>; 291 }; 292 }; 293 294 vccio_sdio: vcc_1v8: LDO_REG2 { 295 regulator-name = "vcc_1v8"; 296 regulator-min-microvolt = <1800000>; 297 regulator-max-microvolt = <1800000>; 298 regulator-always-on; 299 regulator-boot-on; 300 regulator-state-mem { 301 regulator-on-in-suspend; 302 regulator-suspend-microvolt = <1800000>; 303 }; 304 }; 305 306 vdd_10: LDO_REG3 { 307 regulator-name = "vdd_10"; 308 regulator-min-microvolt = <1000000>; 309 regulator-max-microvolt = <1800000>; 310 regulator-state-mem { 311 regulator-off-in-suspend; 312 }; 313 }; 314 315 ldo4: LDO_REG4 { 316 regulator-name = "ldo4"; 317 regulator-min-microvolt = <1800000>; 318 regulator-max-microvolt = <3300000>; 319 regulator-state-mem { 320 regulator-off-in-suspend; 321 }; 322 }; 323 324 vccio_3v3: LDO_REG5 { 325 regulator-name = "vccio_3v3"; 326 regulator-min-microvolt = <1800000>; 327 regulator-max-microvolt = <3300000>; 328 regulator-state-mem { 329 regulator-off-in-suspend; 330 }; 331 }; 332 333 ldo6: LDO_REG6 { 334 regulator-name = "ldo6"; 335 regulator-min-microvolt = <1800000>; 336 regulator-max-microvolt = <3300000>; 337 regulator-state-mem { 338 regulator-off-in-suspend; 339 }; 340 }; 341 }; 342 }; 343}; 344 345&acodec { 346 status = "okay"; 347 rockchip,micbias1; 348 rockchip,micbias2; 349 rockchip,no-deep-low-power; 350 rockchip,no-hp-det; 351 rockchip,loopback-grp = <1>; 352 pa-drv-gpios = <&gpio0 RK_PC0 GPIO_ACTIVE_HIGH>; 353 rockchip,delay-pa-drv-ms = <5>; 354 spk-ctl-gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>; 355 /* ADC5-8 for 4ch capture, loopback to ADC3-4 */ 356 rockchip,adc-grps-route = <2 3 1 0>; 357}; 358 359&cpu0 { 360 cpu-supply = <&vdd_core>; 361}; 362 363&cpu0_opp_table { 364 opp-1200000000 { 365 status = "okay"; 366 }; 367}; 368 369&dmc { 370 center-supply = <&vdd_log>; 371 status = "okay"; 372}; 373 374&fiq_debugger { 375 status = "okay"; 376}; 377 378&i2s_2ch_0 { 379 status = "okay"; 380 #sound-dai-cells = <0>; 381}; 382 383&i2s_8ch_2 { 384 status = "okay"; 385}; 386 387&io_domains { 388 status = "okay"; 389 390 vccio0-supply = <&vcc_io>; 391 vccio1-supply = <&vcc_io>; 392 vccio2-supply = <&vcc_io>; 393 vccio3-supply = <&vcc_io>; 394 vccio4-supply = <&vccio_sdio>; 395 vccio5-supply = <&vcc_io>; 396}; 397 398&nandc { 399 status = "okay"; 400}; 401 402&pinctrl { 403 sdio-pwrseq { 404 wifi_enable_h: wifi-enable-h { 405 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; 406 }; 407 }; 408 409 wireless-wlan { 410 wifi_wake_host: wifi-wake-host { 411 rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>; 412 }; 413 }; 414 415 pmic { 416 pmic_int_l: pmic-int-l { 417 rockchip,pins = 418 <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>; 419 }; 420 }; 421}; 422 423&ramoops { 424 reg = <0x0 0x30000 0x0 0x20000>; 425 record-size = <0x00000>; 426 console-size = <0x20000>; 427}; 428 429&rockchip_suspend { 430 rockchip,sleep-mode-config = < 431 (0 432 | RKPM_ARMOFF 433 | RKPM_PMU_HW_PLLS_PD 434 ) 435 >; 436 437 status = "okay"; 438}; 439 440&saradc { 441 status = "okay"; 442 vref-supply = <&vcc_1v8>; 443}; 444 445&sdio { 446 max-frequency = <110000000>; 447 bus-width = <4>; 448 cap-sd-highspeed; 449 no-sd; 450 no-mmc; 451 ignore-pm-notify; 452 keep-power-in-suspend; 453 non-removable; 454 mmc-pwrseq = <&sdio_pwrseq>; 455 sd-uhs-sdr104; 456 status = "okay"; 457}; 458 459&sfc { 460 status = "okay"; 461}; 462 463&tsadc { 464 rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */ 465 rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */ 466 status = "okay"; 467}; 468 469&u2phy { 470 status = "okay"; 471 u2phy_otg: otg-port { 472 status = "okay"; 473 }; 474}; 475 476&uart4 { 477 pinctrl-names = "default"; 478 pinctrl-0 = <&uart4_xfer &uart4_cts>; 479 status = "okay"; 480}; 481 482&usb20_otg { 483 status = "okay"; 484}; 485 486&vad { 487 status = "disabled"; 488 rockchip,audio-src = <&i2s_8ch_2>; 489 rockchip,det-channel = <0>; 490 rockchip,mode = <1>; 491 rockchip,buffer-time-ms = <500>; 492 #sound-dai-cells = <0>; 493}; 494