1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2/* 3 * Copyright (c) 2020 Rockchip Electronics Co., Ltd. 4 */ 5 6/dts-v1/; 7#include "rv1126.dtsi" 8#include "rv1126-bat-ipc.dtsi" 9#include "rv1126-thunder-boot-emmc.dtsi" 10#include <dt-bindings/input/input.h> 11 12/ { 13 model = "Rockchip RV1126 BAT IPC V10 Board"; 14 compatible = "rockchip,rv1126-bat-ipc-v10", "rockchip,rv1126"; 15 16 adc-keys { 17 compatible = "adc-keys"; 18 io-channels = <&saradc 0>; 19 io-channel-names = "buttons"; 20 poll-interval = <100>; 21 keyup-threshold-microvolt = <1800000>; 22 23 recovery { 24 label = "Volum_up"; 25 linux,code = <KEY_VOLUMEUP>; 26 press-threshold-microvolt = <0>; 27 }; 28 }; 29 30 cam_ircut0: cam_ircut { 31 status = "okay"; 32 compatible = "ap1511a,ircut"; 33 pinctrl-names = "default"; 34 pinctrl-0 = <&ir_cut_en>; 35 ircut-open-gpios = <&gpio2 RK_PD5 GPIO_ACTIVE_HIGH>; 36 led-gpios = <&gpio2 RK_PB2 GPIO_ACTIVE_HIGH>; 37 rockchip,camera-module-index = <1>; 38 rockchip,camera-module-facing = "front"; 39 }; 40 41 charger { 42 compatible = "gpio-charger"; 43 pinctrl-names = "default"; 44 pinctrl-0 = <&charger_io>; 45 gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>; 46 charger-type = "usb-dcp"; 47 charge-status-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_LOW>; 48 charge-current-limit-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>, 49 <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>; 50 charge-current-limit-mapping = <2000000 0x03>, <500000 0x00>; 51 extcon = <&u2phy0>; 52 }; 53 54 gpio-poweroff { 55 compatible = "gpio-poweroff"; 56 gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>; 57 pinctrl-names = "default"; 58 pinctrl-0 = <&power_hold>; 59 }; 60 61 i2s0_sound: i2s0-sound { 62 status = "okay"; 63 compatible = "simple-audio-card"; 64 simple-audio-card,format = "i2s"; 65 simple-audio-card,mclk-fs = <256>; 66 simple-audio-card,name = "rockchip,i2s0-sound"; 67 simple-audio-card,cpu { 68 sound-dai = <&i2s0_8ch>; 69 }; 70 simple-audio-card,codec { 71 sound-dai = <&es8311>; 72 }; 73 }; 74 75 leds { 76 compatible = "pwm-leds"; 77 blue { 78 label = "blue"; 79 pwms = <&pwm3 0 50000 0>; 80 max-brightness = <255>; 81 }; 82 83 red { 84 label = "red"; 85 pwms = <&pwm2 0 50000 0>; 86 max-brightness = <255>; 87 linux,default-trigger = "heartbeat"; 88 }; 89 }; 90 91 pir { 92 compatible = "aschip,pir"; 93 pulse-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_LOW>; 94 }; 95 96 vcc1v2_dvdd: vcc1v8_dovdd: vcc2v8_avdd: vcc-camera { 97 compatible = "regulator-fixed"; 98 regulator-name = "vcc_camera"; 99 regulator-boot-on; 100 gpio = <&gpio0 RK_PA7 GPIO_ACTIVE_HIGH>; 101 enable-active-high; 102 }; 103 104 vcc_1v8: vcc-1v8 { 105 compatible = "regulator-fixed"; 106 regulator-name = "vcc_1v8"; 107 regulator-always-on; 108 regulator-boot-on; 109 regulator-min-microvolt = <1800000>; 110 regulator-max-microvolt = <1800000>; 111 }; 112 113 vccio_flash: vccio-flash { 114 compatible = "regulator-fixed"; 115 regulator-name = "vccio_flash"; 116 regulator-always-on; 117 regulator-boot-on; 118 regulator-min-microvolt = <1800000>; 119 regulator-max-microvolt = <1800000>; 120 vin-supply = <&vcc_1v8>; 121 }; 122 123 vccio_sd: vccio-sd { 124 compatible = "regulator-gpio"; 125 regulator-name = "vccio_sd"; 126 regulator-min-microvolt = <1800000>; 127 regulator-max-microvolt = <3300000>; 128 gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>; 129 states = <3300000 1 130 1800000 0>; 131 }; 132 133 vdd_npu_vepu: vdd-npu-vepu { 134 compatible = "pwm-regulator"; 135 pwms = <&pwm1 0 5000 1>; 136 regulator-name = "vdd_npu_vepu"; 137 regulator-min-microvolt = <720000>; 138 regulator-max-microvolt = <1000000>; 139 regulator-init-microvolt = <824000>; 140 regulator-always-on; 141 regulator-boot-on; 142 regulator-settling-time-up-us = <250>; 143 pwm-supply = <&vcc_3v3>; 144 }; 145 146 wireless-wlan { 147 compatible = "wlan-platdata"; 148 rockchip,grf = <&grf>; 149 pinctrl-names = "default"; 150 pinctrl-0 = <&wifi_wake_host>; 151 wifi_chip_type = "ap6203"; 152 WIFI,poweren_gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>; 153 WIFI,host_wake_irq = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>; 154 status = "okay"; 155 }; 156}; 157 158&csi_dphy0 { 159 status = "okay"; 160 161 ports { 162 #address-cells = <1>; 163 #size-cells = <0>; 164 port@0 { 165 reg = <0>; 166 #address-cells = <1>; 167 #size-cells = <0>; 168 169 mipi_in_ucam0: endpoint@1 { 170 reg = <1>; 171 remote-endpoint = <&ucam_out0>; 172 data-lanes = <1 2>; 173 }; 174 }; 175 port@1 { 176 reg = <1>; 177 #address-cells = <1>; 178 #size-cells = <0>; 179 180 csidphy0_out: endpoint@0 { 181 reg = <0>; 182 remote-endpoint = <&isp_in>; 183 }; 184 }; 185 }; 186}; 187 188&emmc { 189 bus-width = <8>; 190 cap-mmc-highspeed; 191 non-removable; 192 mmc-hs200-1_8v; 193 rockchip,default-sample-phase = <90>; 194 no-sdio; 195 no-sd; 196 /delete-property/ pinctrl-names; 197 /delete-property/ pinctrl-0; 198 status = "okay"; 199}; 200 201&i2c0 { 202 status = "okay"; 203 clock-frequency = <100000>; 204 205 CW2015@62 { 206 compatible = "cw201x"; 207 reg = <0x62>; 208 bat_low_gpio = <&gpio2 RK_PD7 GPIO_ACTIVE_LOW>; 209 bat_config_info = <0x15 0x7E 0x7A 0x6E 0x6A 0x67 0x63 0x62 0x62 0x61 0x5E 210 0x59 0x56 0x57 0x51 0x3C 0x30 0x27 0x29 0x29 0x2E 0x3A 211 0x49 0x57 0x64 0x57 0x0B 0x85 0x30 0x50 0x60 0x67 0x6A 212 0x6C 0x6A 0x6C 0x39 0x14 0x64 0x0E 0x04 0x2A 0x4E 0x81 213 0x8E 0x90 0x90 0x43 0x64 0x83 0x96 0xA5 0x80 0x86 0xAC 214 0xCB 0x2F 0x00 0x64 0xA5 0xB5 0x00 0xF8 0x31>; 215 monitor_sec = <5>; 216 virtual_power = <0>; 217 }; 218 219 pcf8563: pcf8563@51 { 220 compatible = "pcf8563"; 221 reg = <0x51>; 222 interrupt-parent = <&gpio0>; 223 interrupts = <2 IRQ_TYPE_EDGE_FALLING>; 224 pinctrl-names = "default"; 225 pinctrl-0 = <&rtc_int>; 226 #clock-cells = <0>; 227 clock-frequency = <32768>; 228 clock-output-names = "xin32k"; 229 }; 230}; 231 232&i2c1 { 233 status = "okay"; 234 235 sc210iot: sc210iot@32 { 236 compatible = "smartsens,sc210iot"; 237 reg = <0x32>; 238 clocks = <&cru CLK_MIPICSI_OUT>; 239 clock-names = "xvclk"; 240 power-domains = <&power RV1126_PD_VI>; 241 avdd-supply = <&vcc2v8_avdd>; 242 dovdd-supply = <&vcc1v8_dovdd>; 243 dvdd-supply = <&vcc1v2_dvdd>; 244 pwdn-gpios = <&gpio1 RK_PD4 GPIO_ACTIVE_HIGH>; 245 reset-gpios = <&gpio1 RK_PD5 GPIO_ACTIVE_LOW>; 246 rockchip,camera-module-index = <1>; 247 rockchip,camera-module-facing = "front"; 248 rockchip,camera-module-name = "YT-SC210-V2"; 249 rockchip,camera-module-lens-name = "M12-30IRC-2MP-F18"; 250 ir-cut = <&cam_ircut0>; 251 252 port { 253 ucam_out0: endpoint { 254 remote-endpoint = <&mipi_in_ucam0>; 255 data-lanes = <1 2>; 256 }; 257 }; 258 }; 259}; 260 261&i2c4 { 262 status = "okay"; 263 clock-frequency = <400000>; 264 pinctrl-0 = <&i2c4m1_xfer>; 265 266 es8311: es8311@18 { 267 compatible = "everest,es8311"; 268 reg = <0x18>; 269 clocks = <&cru MCLK_I2S0_TX_OUT2IO>; 270 clock-names = "mclk"; 271 adc-pga-gain = <6>; /* 18dB */ 272 adc-volume = <0xbf>; /* 0dB */ 273 dac-volume = <0xbf>; /* 0dB */ 274 aec-mode = "dac left, adc right"; 275 pinctrl-names = "default"; 276 pinctrl-0 = <&i2s0m0_mclk &spk_ctl>; 277 assigned-clocks = <&cru MCLK_I2S0_TX_OUT2IO>; 278 assigned-clock-parents = <&cru MCLK_I2S0_TX>; 279 spk-ctl-gpios = <&gpio2 RK_PA5 GPIO_ACTIVE_HIGH>; 280 #sound-dai-cells = <0>; 281 }; 282}; 283 284&i2s0_8ch { 285 status = "okay"; 286 #sound-dai-cells = <0>; 287 rockchip,clk-trcm = <1>; 288 rockchip,i2s-rx-route = <3 0 1 2>; 289 pinctrl-0 = <&i2s0m0_sclk_tx 290 &i2s0m0_lrck_tx 291 &i2s0m0_sdo0 292 &i2s0m0_sdo1_sdi3>; 293}; 294 295&isp_reserved { 296 size = <0x02400000>; 297}; 298 299&npu { 300 npu-supply = <&vdd_npu_vepu>; 301}; 302 303&pinctrl { 304 charger { 305 /omit-if-no-ref/ 306 charger_io: charger-io { 307 rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>, 308 <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>; 309 }; 310 }; 311 es8311 { 312 spk_ctl: spk-ctl { 313 rockchip,pins = <2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; 314 }; 315 }; 316 ir-cut { 317 /omit-if-no-ref/ 318 ir_cut_en: ir-cut-en { 319 rockchip,pins = <2 RK_PD4 RK_FUNC_GPIO &pcfg_output_low>; 320 }; 321 }; 322 regulator { 323 /omit-if-no-ref/ 324 power_hold: power-hold { 325 rockchip,pins = 326 <0 RK_PA0 RK_FUNC_GPIO &pcfg_output_high>; 327 }; 328 }; 329 rtc { 330 /omit-if-no-ref/ 331 rtc_int: rtc-int { 332 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>; 333 }; 334 }; 335 wireless-wlan { 336 /omit-if-no-ref/ 337 wifi_wake_host: wifi-wake-host { 338 rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_down>; 339 }; 340 }; 341}; 342 343&pmu_io_domains { 344 status = "okay"; 345 346 pmuio0-supply = <&vcc_1v8>; 347 pmuio1-supply = <&vcc_3v3>; 348 vccio2-supply = <&vccio_sd>; 349 vccio3-supply = <&vcc_1v8>; 350 vccio4-supply = <&vcc_1v8>; 351 vccio5-supply = <&vcc_3v3>; 352 vccio7-supply = <&vcc_3v3>; 353}; 354 355&pwm1 { 356 status = "okay"; 357 pinctrl-names = "active"; 358 pinctrl-0 = <&pwm1m0_pins_pull_down>; 359}; 360 361&pwm2 { 362 status = "okay"; 363 pinctrl-names = "active"; 364 pinctrl-0 = <&pwm2m1_pins_pull_down>; 365}; 366 367&pwm3 { 368 status = "okay"; 369 pinctrl-names = "active"; 370 pinctrl-0 = <&pwm3m1_pins_pull_down>; 371}; 372 373&rkisp_thunderboot { 374 reg = <0x08000000 (32 * 0x00100000)>; 375}; 376 377&rkisp_vir0 { 378 ports { 379 port@0 { 380 reg = <0>; 381 #address-cells = <1>; 382 #size-cells = <0>; 383 384 isp_in: endpoint@0 { 385 reg = <0>; 386 remote-endpoint = <&csidphy0_out>; 387 }; 388 }; 389 }; 390}; 391 392&rkvenc { 393 venc-supply = <&vdd_npu_vepu>; 394}; 395 396&rkvenc_mmu { 397 status = "okay"; 398}; 399 400&mpp_srv { 401 status = "okay"; 402}; 403 404&rockchip_suspend { 405 status = "okay"; 406 rockchip,sleep-debug-en = <1>; 407 rockchip,sleep-mode-config = < 408 (0 409 | RKPM_SLP_ARMOFF 410 | RKPM_SLP_PMU_PMUALIVE_32K 411 | RKPM_SLP_PMU_DIS_OSC 412 ) 413 >; 414}; 415 416&saradc { 417 status = "okay"; 418 vref-supply = <&vcc_1v8>; 419}; 420 421&sdio { 422 max-frequency = <50000000>; 423 bus-width = <4>; 424 cap-sd-highspeed; 425 cap-sdio-irq; 426 keep-power-in-suspend; 427 rockchip,default-sample-phase = <90>; 428 no-sd; 429 no-mmc; 430 supports-chip-alive; 431 logic-remove-card; 432 status = "okay"; 433}; 434 435&sdmmc { 436 bus-width = <4>; 437 cap-mmc-highspeed; 438 cap-sd-highspeed; 439 card-detect-delay = <200>; 440 rockchip,default-sample-phase = <90>; 441 no-sdio; 442 no-mmc; 443 sd-uhs-sdr12; 444 sd-uhs-sdr25; 445 sd-uhs-sdr104; 446 vqmmc-supply = <&vccio_sd>; 447 status = "okay"; 448}; 449 450&u2phy0 { 451 vup-gpios = <&gpio0 RK_PC1 GPIO_ACTIVE_LOW>; 452}; 453