// SPDX-License-Identifier: (GPL-2.0+ OR MIT) /* * Copyright (c) 2020 Rockchip Electronics Co., Ltd. * */ #include "dt-bindings/usb/pd.h" #include "rk3566-evb2-lp4x-v10.dtsi" #include "rk3568-android.dtsi" &i2c0 { status = "okay"; //clock-frequency = <100000>; //pinctrl-0 = <&i2c2m1_xfer>; /*usbc0: husb311@4e { compatible = "hynetek,husb311"; reg = <0x4e>; interrupt-parent = <&gpio0>; interrupts = ; pinctrl-names = "default"; pinctrl-0 = <&husb0_int>; vbus-supply = <&otg_switch>; status = "disabled"; ports { #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; usbc0_role_sw: endpoint@0 { remote-endpoint = <&dwc3_role_switch>; }; }; }; usb_con: connector { compatible = "usb-c-connector"; label = "USB-C"; data-role = "dual"; power-role = "dual"; try-power-role = "sink"; op-sink-microwatt = <1000000>; sink-pdos = ; source-pdos = ; }; };*/ rk817: pmic@20 { compatible = "rockchip,rk817"; reg = <0x20>; interrupt-parent = <&gpio0>; interrupts = <3 IRQ_TYPE_LEVEL_LOW>; pinctrl-names = "default", "pmic-sleep", "pmic-power-off", "pmic-reset"; pinctrl-0 = <&pmic_int>; pinctrl-1 = <&soc_slppin_slp>, <&rk817_slppin_slp>; pinctrl-2 = <&soc_slppin_gpio>, <&rk817_slppin_pwrdn>; pinctrl-3 = <&soc_slppin_gpio>, <&rk817_slppin_rst>; rockchip,system-power-controller; wakeup-source; #clock-cells = <1>; clock-output-names = "rk808-clkout1", "rk808-clkout2"; //fb-inner-reg-idxs = <2>; /* 1: rst regs (default in codes), 0: rst the pmic */ pmic-reset-func = <0>; /* not save the PMIC_POWER_EN register in uboot */ not-save-power-en = <1>; vcc1-supply = <&vcc3v3_sys>; vcc2-supply = <&vcc3v3_sys>; vcc3-supply = <&vcc3v3_sys>; vcc4-supply = <&vcc3v3_sys>; vcc5-supply = <&vcc3v3_sys>; vcc6-supply = <&vcc3v3_sys>; vcc7-supply = <&vcc3v3_sys>; vcc8-supply = <&vcc3v3_sys>; vcc9-supply = <&dcdc_boost>; pwrkey { status = "okay"; }; pinctrl_rk8xx: pinctrl_rk8xx { gpio-controller; #gpio-cells = <2>; rk817_slppin_null: rk817_slppin_null { pins = "gpio_slp"; function = "pin_fun0"; }; rk817_slppin_slp: rk817_slppin_slp { pins = "gpio_slp"; function = "pin_fun1"; }; rk817_slppin_pwrdn: rk817_slppin_pwrdn { pins = "gpio_slp"; function = "pin_fun2"; }; rk817_slppin_rst: rk817_slppin_rst { pins = "gpio_slp"; function = "pin_fun3"; }; }; regulators { vdd_logic: DCDC_REG1 { regulator-always-on; regulator-boot-on; regulator-min-microvolt = <500000>; regulator-max-microvolt = <1350000>; regulator-init-microvolt = <900000>; regulator-ramp-delay = <6001>; regulator-initial-mode = <0x2>; regulator-name = "vdd_logic"; regulator-state-mem { regulator-off-in-suspend; regulator-suspend-microvolt = <900000>; }; }; vdd_gpu_npu: DCDC_REG2 { regulator-always-on; regulator-boot-on; regulator-min-microvolt = <500000>; regulator-max-microvolt = <1350000>; regulator-init-microvolt = <900000>; regulator-ramp-delay = <6001>; regulator-initial-mode = <0x2>; regulator-name = "vdd_gpu_npu"; regulator-state-mem { regulator-off-in-suspend; }; }; vcc_ddr: DCDC_REG3 { regulator-always-on; regulator-boot-on; regulator-initial-mode = <0x2>; regulator-name = "vcc_ddr"; regulator-state-mem { regulator-on-in-suspend; }; }; vcc_3v3: DCDC_REG4 { regulator-always-on; regulator-boot-on; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-initial-mode = <0x2>; regulator-name = "vcc_3v3"; regulator-state-mem { regulator-on-in-suspend; regulator-suspend-microvolt = <3300000>; }; }; vcca1v8_pmu: LDO_REG1 { regulator-always-on; regulator-boot-on; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; regulator-name = "vcca1v8_pmu"; regulator-state-mem { regulator-on-in-suspend; regulator-suspend-microvolt = <1800000>; }; }; vdda_0v9: LDO_REG2 { regulator-always-on; regulator-boot-on; regulator-min-microvolt = <900000>; regulator-max-microvolt = <900000>; regulator-name = "vdda_0v9"; regulator-state-mem { regulator-off-in-suspend; }; }; vdda0v9_pmu: LDO_REG3 { regulator-always-on; regulator-boot-on; regulator-min-microvolt = <900000>; regulator-max-microvolt = <900000>; regulator-name = "vdda0v9_pmu"; regulator-state-mem { regulator-on-in-suspend; regulator-suspend-microvolt = <900000>; }; }; vccio_acodec: LDO_REG4 { regulator-always-on; regulator-boot-on; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-name = "vccio_acodec"; regulator-state-mem { regulator-off-in-suspend; }; }; vccio_sd: LDO_REG5 { regulator-always-on; regulator-boot-on; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <3300000>; regulator-name = "vccio_sd"; regulator-state-mem { regulator-off-in-suspend; }; }; vcc3v3_pmu: LDO_REG6 { regulator-always-on; regulator-boot-on; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-name = "vcc3v3_pmu"; regulator-state-mem { regulator-on-in-suspend; regulator-suspend-microvolt = <3300000>; }; }; vcc_1v8: LDO_REG7 { regulator-always-on; regulator-boot-on; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; regulator-name = "vcc_1v8"; regulator-state-mem { regulator-off-in-suspend; }; }; vcc1v8_dvp: LDO_REG8 { regulator-always-on; regulator-boot-on; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; regulator-name = "vcc1v8_dvp"; regulator-state-mem { regulator-on-in-suspend; regulator-suspend-microvolt = <1800000>; }; }; vcc2v8_dvp: LDO_REG9 { regulator-always-on; regulator-boot-on; regulator-min-microvolt = <2800000>; regulator-max-microvolt = <2800000>; regulator-name = "vcc2v8_dvp"; regulator-state-mem { regulator-off-in-suspend; }; }; dcdc_boost: BOOST { regulator-always-on; regulator-boot-on; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; regulator-name = "boost"; regulator-state-mem { regulator-off-in-suspend; }; }; otg_switch: OTG_SWITCH { regulator-name = "otg_switch"; regulator-state-mem { regulator-off-in-suspend; }; }; }; battery { compatible = "rk817,battery"; ocv_table = <3400 3492 3535 3589 3640 3706 3755 3773 3776 3780 3798 3833 3885 3928 3972 4022 4080 4136 4192 4250 4322>; design_capacity = <6000>; design_qmax = <6500>; bat_res = <76>; sleep_enter_current = <150>; sleep_exit_current = <180>; sleep_filter_current = <100>; power_off_thresd = <3400>; zero_algorithm_vol = <3850>; max_soc_offset = <60>; monitor_sec = <5>; sample_res = <10>; virtual_power = <0>; }; charger { compatible = "rk817,charger"; min_input_voltage = <4500>; max_input_current = <3000>; max_chrg_current = <2000>; max_chrg_voltage = <4350>; chrg_term_mode = <0>; chrg_finish_cur = <300>; virtual_power = <0>; dc_det_adc = <0>; sample_res = <10>; // extcon = <&usbc0>; extcon = <&usb2phy0>; status = "okay"; }; rk817_codec: codec { #sound-dai-cells = <0>; compatible = "rockchip,rk817-codec"; clocks = <&cru I2S1_MCLKOUT>; clock-names = "mclk"; assigned-clocks = <&cru I2S1_MCLKOUT>, <&cru I2S1_MCLK_TX_IOE>; assigned-clock-rates = <12288000>; assigned-clock-parents = <&cru I2S1_MCLKOUT_TX>, <&cru I2S1_MCLKOUT_TX>; pinctrl-names = "default"; pinctrl-0 = <&i2s1m0_mclk>; hp-volume = <20>; spk-volume = <3>; out-l2spk-r2hp; spk-ctl-gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>; status = "okay"; }; }; /* rtc: rtc@51 { compatible = "nxp,pcf8563"; reg = <0x51>; #clock-cells = <0>; }; */ /* hym8563: hym8563@51 { compatible = "haoyu,hym8563"; reg = <0x51>; #clock-cells = <0>; clock-frequency = <32768>; clock-output-names = "xin32k"; //rtc_int is not connected }; */ }; &i2c2 { status = "okay"; clock-frequency = <100000>; pinctrl-0 = <&i2c2m1_xfer>; dw9714: dw9714@c { compatible = "dongwoon,dw9714"; status = "disabled"; reg = <0x0c>; rockchip,camera-module-index = <0>; rockchip,vcm-start-current = <10>; rockchip,vcm-rated-current = <85>; rockchip,vcm-step-mode = <5>; rockchip,camera-module-facing = "back"; }; /*gc02m2: gc02m2@37 { compatible = "galaxycore,gc02m2"; status = "disabled"; reg = <0x37>; clocks = <&cru CLK_CIF_OUT>; clock-names = "xvclk"; power-domains = <&power RK3568_PD_VI>; pinctrl-names = "rockchip,camera_default"; pinctrl-0 = <&cif_clk>; //reset pin control by hardware,used this pin switch to mipi input //1->2LANE(LANE 0&1) FRONT camera, 0->4LANE REAR camera reset-gpios = <&gpio4 RK_PB1 GPIO_ACTIVE_LOW>; pwdn-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_LOW>; rockchip,camera-module-index = <1>; rockchip,camera-module-facing = "front"; rockchip,camera-module-name = "default"; rockchip,camera-module-lens-name = "M216A"; port { gc02m2_out: endpoint { remote-endpoint = <&dphy2_in>; data-lanes = <1>; }; }; };*/ ov5648: ov5648@36 { status = "disabled"; compatible = "ovti,ov5647"; reg = <0x36>; clocks = <&cru CLK_CIF_OUT>; clock-names = "xvclk"; pinctrl-names = "rockchip,camera_default"; pinctrl-0 = <&cif_clk>; power-domains = <&power RK3568_PD_VI>; //pinctrl-names = "rockchip,camera_default", "rockchip,camera_sleep"; //pinctrl-0 = <&cam_clkout0>; //pinctrl-1 = <&cam_sleep>; //reset pin control by hardware,used this pin switch to mipi input //1->2LANE(LANE 0&1) FRONT camera, 0->4LANE REAR camera power-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>; pwdn-gpios = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>; rockchip,camera-module-index = <0>; rockchip,camera-module-facing = "BACK"; rockchip,camera-module-name = "THDS11073_Largan"; rockchip,camera-module-lens-name = "40122a1"; //flash-leds = <&flash_rgb13h>; //lens-focus = <&dw9714>; port { ov5648_out: endpoint { remote-endpoint = <&dphy1_in>; data-lanes = <1 2>; }; }; }; hym8563: hym8563@51 { compatible = "haoyu,hym8563"; reg = <0x51>; #clock-cells = <0>; clock-frequency = <32768>; clock-output-names = "hym8563"; //rtc_int is not connected //pinctrl-names = "default"; //pinctrl-0 = <&hym8563_int>; //interrupt-parent = <&gpio3>; //interrupts = ; //wakeup-source; }; }; /* &i2c5 { status = "okay"; sensor@18 { status = "disabled"; compatible = "gs_sc7a20"; reg = <0x18>; type = ; irq_enable = <0>; pinctrl-names = "default"; pinctrl-0 = <&sensor_gpio>; irq-gpio = <&gpio3 RK_PA2 IRQ_TYPE_EDGE_RISING>; poll_delay_ms = <10>; layout = <7>; }; }; */ &csi2_dphy_hw { status = "disabled"; }; &csi2_dphy1 { status = "disabled"; /* * dphy1 only used for split mode, 0/1 lane * can be used concurrently with dphy2 * full mode and split mode are mutually exclusive */ ports { #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; #address-cells = <1>; #size-cells = <0>; dphy1_in: endpoint@1 { reg = <1>; remote-endpoint = <&ov5648_out>; data-lanes = <1 2>; }; }; port@1 { reg = <1>; #address-cells = <1>; #size-cells = <0>; dphy1_out: endpoint@1 { reg = <1>; remote-endpoint = <&isp0_in>; }; }; }; }; &csi2_dphy2 { status = "disabled"; /* * dphy2 only used for split mode, 2/3 lane * can be used concurrently with dphy1 * full mode and split mode are mutually exclusive */ /* ports { #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; #address-cells = <1>; #size-cells = <0>; dphy2_in: endpoint@1 { reg = <1>; remote-endpoint = <&gc02m2_out>; data-lanes = <1>; }; }; port@1 { reg = <1>; #address-cells = <1>; #size-cells = <0>; dphy2_out: endpoint@1 { reg = <1>; remote-endpoint = <&isp0_in>; }; }; }; */ }; &rkisp_vir0 { status = "okay"; ports { #address-cells = <1>; #size-cells = <0>; /*port@0 { ret = <0> ; #address-cells = <1>; #size-cells = <0>; isp0_in: endpoint@0 { reg = <0>; remote-endpoint = <&dphy2_out>; }; };*/ port@0 { reg = <0>; #address-cells = <1>; #size-cells = <0>; isp0_in: endpoint@1 { reg = <1>; remote-endpoint = <&dphy1_out>; }; }; }; }; &rkisp { status = "okay"; }; &rkisp_mmu { status = "okay"; }; &combphy1_usq { status = "okay"; }; &combphy2_psq { status = "okay"; }; &u2phy0_otg { // phy-supply = <&otg_switch>; status = "okay"; }; &u2phy0_host { phy-supply = <&vcc5v0_usb2>; status = "okay"; }; &usb2phy0 { status = "okay"; }; &u2phy1_host { phy-supply = <&vcc5v0_usb2>; status = "okay"; }; &u2phy1_otg { status = "okay"; }; &usb2phy1 { status = "okay"; }; &usb_host0_ehci { status = "okay"; }; &usb_host0_ohci { status = "okay"; }; &usb_host1_ehci { status = "okay"; }; &usb_host1_ohci { status = "okay"; }; &usbdrd30 { status = "okay"; }; &usbdrd_dwc3 { status = "okay"; dr_mode = "otg"; /*usb-role-switch; port { #address-cells = <1>; #size-cells = <0>; dwc3_role_switch: endpoint@0 { reg = <0>; remote-endpoint = <&usbc0_role_sw>; }; };*/ }; &usbhost_dwc3 { status = "okay"; }; &usbhost30 { status = "okay"; }; &pinctrl { vcc_sd { vcc_sd_h: vcc-sd-h { rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; }; }; husb311 { husb0_int: husb0-int { rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>; }; }; tp { tp_gpio: tp-gpio { rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>, <0 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>; }; }; sensor { sensor_gpio: sensor-gpio { rockchip,pins = <3 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; }; }; //hym8563 { // hym8563_int: hym8563-int { // rockchip,pins = <3 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>; // }; //}; }; &i2c3 { status = "okay"; clock-frequency = <100000>; //i2c-scl-rising-time-ns = <138>; //i2c-scl-falling-time-ns = <4>; pinctrl-0 = <&i2c3m1_xfer>; gt9xx: gt9xx@14 { compatible = "goodix,gt9xx"; reg = <0x14>; touch-gpio = <&gpio0 RK_PB0 IRQ_TYPE_LEVEL_LOW>; reset-gpio = <&gpio0 RK_PC2 IRQ_TYPE_LEVEL_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&tp_gpio>; max-x = <800>; max-y = <1280>; tp-size = <911>; //tp-supply = <&vcc_3v3>; status = "disabled"; }; /* ft5406: focaltech@38 { status = "okay"; compatible = "edt,edt-ft5406"; reg = <0x38>; pinctrl-names = "default"; pinctrl-0 = <&tp_gpio>; //vdd-supply = <&vcc_tp>; //focaltech,reset-gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>; //focaltech,irq-gpio = <&gpio0 RK_PA6 IRQ_TYPE_EDGE_FALLING>; focaltech,max-touch-number = <1>; focaltech,display-coords = <0 0 480 800>; focaltech,have-key = <1>; focaltech,key-number = <1>; focaltech,key-x-coords = <480>; focaltech,key-y-coords = <800>; wakeup-source; }; */ tinker_mcu: tinker_mcu@45 { compatible = "tinker_mcu"; status = "disabled"; reg = <0x45>; }; tinker_ft5406: tinker_ft5406@38 { compatible = "tinker_ft5406"; status = "disabled"; reg = <0x38>; }; /* hym8563: hym8563@51 { compatible = "haoyu,hym8563"; reg = <0x51>; #clock-cells = <0>; clock-frequency = <32768>; clock-output-names = "hym8563"; //rtc_int is not connected }; */ }; &sfc { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&fspi_pins>; flash@0 { compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <25000000>; //spi-rx-bus-width = <4>; //spi-tx-bus-width = <1>; partitions { #address-cells = < 1 >; #size-cells = < 1 >; compatible = "fixed-partitions"; partition@0 { reg = <0 0x800000>; label = "partition0"; }; }; }; };