diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index cae9fe1e198b..06008b35c35e 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -854,6 +854,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \ rv1126-ai-cam-ddr3-v1.dtb \ rv1126-ai-cam-ddr3-v1-spi-nand.dtb \ rv1126-ai-cam-plus.dtb \ + rv1126-bat-evb-v10.dtb \ rv1126-bat-ipc-v10.dtb \ rv1126-bat-ipc-4k-v10.dtb \ rv1126-evb-ddr3-v10.dtb \ diff --git a/arch/arm/boot/dts/rv1126-bat-evb-v10.dts b/arch/arm/boot/dts/rv1126-bat-evb-v10.dts new file mode 100644 index 000000000000..a15cbb7d3da4 --- /dev/null +++ b/arch/arm/boot/dts/rv1126-bat-evb-v10.dts @@ -0,0 +1,420 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2020 Rockchip Electronics Co., Ltd. + */ + +/dts-v1/; +#include "rv1126.dtsi" +#include "rv1126-bat-ipc.dtsi" +#include "rv1126-thunder-boot-emmc.dtsi" +#include + +/ { + model = "Rockchip RV1126 BAT EVB V10 Board"; + compatible = "rockchip,rv1126-bat-evb-v10", "rockchip,rv1126"; + + adc-keys { + compatible = "adc-keys"; + io-channels = <&saradc 0>; + io-channel-names = "buttons"; + poll-interval = <100>; + keyup-threshold-microvolt = <1800000>; + + recovery { + label = "Volum_up"; + linux,code = ; + press-threshold-microvolt = <0>; + }; + }; + + cam_ircut0: cam_ircut { + status = "okay"; + compatible = "ap1511a,ircut"; + pinctrl-names = "default"; + pinctrl-0 = <&ir_cut_en>; + ircut-open-gpios = <&gpio2 RK_PD5 GPIO_ACTIVE_HIGH>; + led-gpios = <&gpio2 RK_PB2 GPIO_ACTIVE_HIGH>; + rockchip,camera-module-index = <1>; + rockchip,camera-module-facing = "front"; + }; + + i2s0_sound: i2s0-sound { + status = "okay"; + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,mclk-fs = <256>; + simple-audio-card,name = "rockchip,i2s0-sound"; + simple-audio-card,cpu { + sound-dai = <&i2s0_8ch>; + }; + simple-audio-card,codec { + sound-dai = <&es8311>; + }; + }; + + leds { + compatible = "pwm-leds"; + + white { + label = "white"; + pwms = <&pwm2 0 50000 0>; + max-brightness = <255>; + }; + }; + + vcc1v2_dvdd: vcc1v8_dovdd: vcc2v8_avdd: vcc-camera { + compatible = "regulator-fixed"; + regulator-name = "vcc_camera"; + regulator-always-on; + regulator-boot-on; + gpio = <&gpio0 RK_PA7 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + vcc_1v8: vcc-1v8 { + compatible = "regulator-fixed"; + regulator-name = "vcc_1v8"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + vccio_flash: vccio-flash { + compatible = "regulator-fixed"; + regulator-name = "vccio_flash"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + vin-supply = <&vcc_1v8>; + }; + + vccio_sd: vccio-sd { + compatible = "regulator-gpio"; + regulator-name = "vccio_sd"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>; + states = <3300000 1 + 1800000 0>; + }; + + vdd_npu_vepu: vdd-npu-vepu { + compatible = "pwm-regulator"; + pwms = <&pwm1 0 5000 1>; + regulator-name = "vdd_npu_vepu"; + regulator-min-microvolt = <720000>; + regulator-max-microvolt = <1000000>; + regulator-init-microvolt = <824000>; + regulator-always-on; + regulator-boot-on; + regulator-settling-time-up-us = <250>; + pwm-supply = <&vcc_3v3>; + }; + + wireless-wlan { + compatible = "wlan-platdata"; + rockchip,grf = <&grf>; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_wake_host>; + wifi_chip_type = "cy43438"; + WIFI,poweren_gpio = <&gpio1 RK_PC7 GPIO_ACTIVE_LOW>; + WIFI,host_wake_irq = <&gpio1 RK_PD1 GPIO_ACTIVE_HIGH>; + status = "okay"; + }; +}; + +&csi_dphy0 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + mipi_in_ucam0: endpoint@1 { + reg = <1>; + remote-endpoint = <&ucam_out0>; + data-lanes = <1 2 3 4>; + }; + }; + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + csidphy0_out: endpoint@0 { + reg = <0>; + remote-endpoint = <&isp_in>; + }; + }; + }; +}; + +&emmc { + bus-width = <8>; + cap-mmc-highspeed; + non-removable; + mmc-hs200-1_8v; + rockchip,default-sample-phase = <90>; + supports-emmc; + /delete-property/ pinctrl-names; + /delete-property/ pinctrl-0; + status = "okay"; +}; + +&i2c0 { + status = "okay"; + + hym8563: hym8563@51 { + compatible = "haoyu,hym8563"; + reg = <0x51>; + #clock-cells = <0>; + }; +}; + +&i2c1 { + status = "okay"; + + os04c10: os04c10@36 { + compatible = "ovti,os04c10"; + reg = <0x36>; + clocks = <&cru CLK_MIPICSI_OUT>; + clock-names = "xvclk"; + power-domains = <&power RV1126_PD_VI>; + avdd-supply = <&vcc2v8_avdd>; + dovdd-supply = <&vcc1v8_dovdd>; + dvdd-supply = <&vcc1v2_dvdd>; + pwdn-gpios = <&gpio1 RK_PD4 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio1 RK_PD5 GPIO_ACTIVE_LOW>; + rockchip,camera-module-index = <1>; + rockchip,camera-module-facing = "front"; + rockchip,camera-module-name = "default"; + rockchip,camera-module-lens-name = "default"; + ir-cut = <&cam_ircut0>; + + port { + ucam_out0: endpoint { + remote-endpoint = <&mipi_in_ucam0>; + data-lanes = <1 2 3 4>; + }; + }; + }; +}; + +&i2c2 { + status = "okay"; + clock-frequency = <400000>; + + opt3001: opt3001@44 { + compatible = "ti,opt3001"; + reg = <0x44>; + }; +}; + +&i2c4 { + status = "okay"; + clock-frequency = <400000>; + pinctrl-0 = <&i2c4m1_xfer>; + + es8311: es8311@18 { + compatible = "everest,es8311"; + reg = <0x18>; + clocks = <&cru MCLK_I2S0_TX_OUT2IO>; + clock-names = "mclk"; + adc-pga-gain = <6>; /* 18dB */ + adc-volume = <0xbf>; /* 0dB */ + dac-volume = <0xbf>; /* 0dB */ + aec-mode = "dac left, adc right"; + pinctrl-names = "default"; + pinctrl-0 = <&i2s0m0_mclk &spk_ctl>; + assigned-clocks = <&cru MCLK_I2S0_TX_OUT2IO>; + assigned-clock-parents = <&cru MCLK_I2S0_TX>; + spk-ctl-gpios = <&gpio2 RK_PA4 GPIO_ACTIVE_HIGH>; + #sound-dai-cells = <0>; + }; +}; + +&i2c5 { + status = "okay"; + pinctrl-0 = <&i2c5m0_xfer>; + + CW2015@62 { + compatible = "cw201x"; + reg = <0x62>; + bat_config_info = <0x15 0x7E 0x7A 0x6E 0x6A 0x67 0x63 0x62 0x62 0x61 0x5E + 0x59 0x56 0x57 0x51 0x3C 0x30 0x27 0x29 0x29 0x2E 0x3A + 0x49 0x57 0x64 0x57 0x0B 0x85 0x30 0x50 0x60 0x67 0x6A + 0x6C 0x6A 0x6C 0x39 0x14 0x64 0x0E 0x04 0x2A 0x4E 0x81 + 0x8E 0x90 0x90 0x43 0x64 0x83 0x96 0xA5 0x80 0x86 0xAC + 0xCB 0x2F 0x00 0x64 0xA5 0xB5 0x00 0xF8 0x31>; + monitor_sec = <5>; + virtual_power = <0>; + }; +}; + +&i2s0_8ch { + status = "okay"; + #sound-dai-cells = <0>; + rockchip,clk-trcm = <1>; + rockchip,i2s-rx-route = <0 1 2 3>; + pinctrl-0 = <&i2s0m0_sclk_tx + &i2s0m0_lrck_tx + &i2s0m0_sdo0 + &i2s0m0_sdi0>; +}; + +&isp_reserved { + size = <0x02400000>; +}; + +&npu { + npu-supply = <&vdd_npu_vepu>; +}; + +&pinctrl { + es8311 { + spk_ctl: spk-ctl { + rockchip,pins = <2 RK_PA4 0 &pcfg_pull_none>; + }; + }; + ir-cut { + /omit-if-no-ref/ + ir_cut_en: ir-cut-en { + rockchip,pins = <2 RK_PD4 RK_FUNC_GPIO &pcfg_output_low>; + }; + }; + wireless-wlan { + /omit-if-no-ref/ + wifi_wake_host: wifi-wake-host { + rockchip,pins = <1 RK_PD1 RK_FUNC_GPIO &pcfg_pull_down>; + }; + }; +}; + +&pmu_io_domains { + status = "okay"; + + pmuio0-supply = <&vcc_3v3>; + pmuio1-supply = <&vcc_3v3>; + vccio2-supply = <&vccio_sd>; + vccio3-supply = <&vcc_1v8>; + vccio4-supply = <&vcc_1v8>; + vccio5-supply = <&vcc_3v3>; + vccio7-supply = <&vcc_3v3>; +}; + +&pwm1 { + status = "okay"; + pinctrl-names = "active"; + pinctrl-0 = <&pwm1m0_pins_pull_down>; +}; + +&pwm2 { + status = "okay"; + pinctrl-names = "active"; + pinctrl-0 = <&pwm2m1_pins_pull_down>; +}; + +&pwm3 { + status = "okay"; + pinctrl-names = "active"; + pinctrl-0 = <&pwm3m1_pins_pull_down>; +}; + +&rkisp_thunderboot { + reg = <0x08000000 (32 * 0x00100000)>; +}; + +&rkisp_vir0 { + ports { + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + isp_in: endpoint@0 { + reg = <0>; + remote-endpoint = <&csidphy0_out>; + }; + }; + }; +}; + +&rkisp_vir1 { + status = "okay"; +}; + +&rkispp_vir1 { + status = "okay"; +}; + +&rkvenc { + venc-supply = <&vdd_npu_vepu>; +}; + +&rkvenc_mmu { + status = "okay"; +}; + +&mpp_srv { + status = "okay"; +}; + +&rockchip_suspend { + status = "okay"; + rockchip,sleep-debug-en = <1>; + rockchip,sleep-mode-config = < + (0 + | RKPM_SLP_ARMOFF + | RKPM_SLP_PMU_PMUALIVE_32K + | RKPM_SLP_PMU_DIS_OSC + ) + >; +}; + +&saradc { + status = "okay"; + vref-supply = <&vcc_1v8>; +}; + +&sdio { + max-frequency = <50000000>; + bus-width = <4>; + cap-sd-highspeed; + cap-sdio-irq; + keep-power-in-suspend; + rockchip,default-sample-phase = <90>; + supports-sdio; + supports-chip-alive; + logic-remove-card; + status = "okay"; +}; + +&sdmmc { + bus-width = <4>; + cap-mmc-highspeed; + cap-sd-highspeed; + card-detect-delay = <200>; + rockchip,default-sample-phase = <90>; + supports-sd; + sd-uhs-sdr12; + sd-uhs-sdr25; + sd-uhs-sdr104; + vqmmc-supply = <&vccio_sd>; + status = "okay"; +}; + +&u2phy0 { + vup-gpios = <&gpio0 RK_PC1 GPIO_ACTIVE_LOW>; +}; + +&uart5 { + pinctrl-names = "default"; + pinctrl-0 = <&uart5m2_xfer>; + status = "okay"; +};