From 0cd8a454e6ee9162a50b6fe916cff6b274e709b9 Mon Sep 17 00:00:00 2001 From: panyq6 Date: Fri, 18 Feb 2022 13:35:22 +0800 Subject: [PATCH] Rhode5g of india sku(rhodei) bringup: init rhodei dts files init rhodei dts based on rhodep Change-Id: I4aabb66b94a4903053f902876055006e4267c398 Reviewed-on: https://gerrit.mot.com/2193938 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Yuecai Liu Reviewed-by: Huosheng Liao Submit-Approved: panyq6 --- qcom/blair-moto-rhodei-base.dts | 45 +++ qcom/blair-rhodei-common-overlay.dtsi | 517 ++++++++++++++++++++++++++ qcom/blair-rhodei-dvt1-overlay.dts | 24 ++ qcom/blair-rhodei-dvt2-overlay.dts | 25 ++ qcom/blair-rhodei-evt1-overlay.dts | 24 ++ qcom/blair-rhodei-evt2-overlay.dts | 24 ++ qcom/discrete_charging_rhodei.dtsi | 222 +++++++++++ qcom/rhodei-display.dtsi | 484 ++++++++++++++++++++++++ qcom/rhodei-fps-overlay.dtsi | 182 +++++++++ qcom/rhodei-touchscreen.dtsi | 104 ++++++ qcom/rhodei-wl2868c.dtsi | 71 ++++ 11 files changed, 1722 insertions(+) create mode 100644 qcom/blair-moto-rhodei-base.dts create mode 100644 qcom/blair-rhodei-common-overlay.dtsi create mode 100644 qcom/blair-rhodei-dvt1-overlay.dts create mode 100644 qcom/blair-rhodei-dvt2-overlay.dts create mode 100644 qcom/blair-rhodei-evt1-overlay.dts create mode 100644 qcom/blair-rhodei-evt2-overlay.dts create mode 100644 qcom/discrete_charging_rhodei.dtsi create mode 100644 qcom/rhodei-display.dtsi create mode 100644 qcom/rhodei-fps-overlay.dtsi create mode 100755 qcom/rhodei-touchscreen.dtsi create mode 100644 qcom/rhodei-wl2868c.dtsi diff --git a/qcom/blair-moto-rhodei-base.dts b/qcom/blair-moto-rhodei-base.dts new file mode 100644 index 000000000000..e9b5f91a2ff2 --- /dev/null +++ b/qcom/blair-moto-rhodei-base.dts @@ -0,0 +1,45 @@ +/* Copyright (c) 2020, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/dts-v1/; + +#include "blair.dtsi" + +/ { + qcom,board-id = <0 0>; + channel-id-map = ""; +/* + * Some nodes need labels assigned to appear in __symbols__ + */ + chosen: chosen { }; + aliases: aliases { }; + reserved_memory: reserved-memory { }; + mot_batterydata: qcom,battery-data { }; + utags: utags { }; + hw: hw { }; +}; + +&reserved_memory { + /delete-node/ ramoops; +}; + +&tlmm { + /delete-node/ nfc; +}; + +&firmware { + /delete-node/ android; +}; + +&mdss_dsi_phy0 { + /delete-property/ qcom,dsi-pll-ssc-en; +}; diff --git a/qcom/blair-rhodei-common-overlay.dtsi b/qcom/blair-rhodei-common-overlay.dtsi new file mode 100644 index 000000000000..4631224b251b --- /dev/null +++ b/qcom/blair-rhodei-common-overlay.dtsi @@ -0,0 +1,517 @@ +/* Copyright (c) 2021, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ +#include "blair-nopmi-moto-common-overlay.dtsi" + +#include "blair-audio-wcd9370-aw882xx-acf-dual-overlay.dtsi" +#include +#include +#include "holi-pmic-overlay-pm6125.dtsi" +#include "holi-thermal-overlay-pm6125.dtsi" +#include "display/holi-sde-display-mtp-pm6125.dtsi" +#include "display/blair-sde-display-mtp.dtsi" +#include "rhodei-fps-overlay.dtsi" +#include "rhodei-display.dtsi" +#include "rhodei-touchscreen.dtsi" +#include "camera/blair-camera-sensor-mot-rhodei-overlay.dtsi" +#include "rhodei-wl2868c.dtsi" +#include "discrete_charging_rhodei.dtsi" + +&wcd937x_codec { + cdc-vdd-rxtx-supply = <&L9A>; + cdc-vddpx-supply = <&L9A>; + qcom,cdc-static-supplies = "cdc-vdd-rxtx", + "cdc-vddpx"; + /* + * Overriding cdc-vdd-mic-bias-supply to dummy value + * to avoid compilation errors as BOB is not definied + * for pm6125 + */ + cdc-vdd-mic-bias-supply = <>; +}; + + +&tlmm { + nfc { + nfc_int_active: nfc_int_active { + /* active state */ + mux { + /* GPIO 9: NFC Read Interrupt */ + pins = "gpio9"; + function = "gpio"; + }; + + config { + pins = "gpio9"; + drive-strength = <2>; /* 2 MA */ + bias-disable; + }; + }; + + nfc_int_suspend: nfc_int_suspend { + /* sleep state */ + mux { + /* GPIO 9: NFC Read Interrupt */ + pins = "gpio9"; + function = "gpio"; + }; + + config { + pins = "gpio9"; + drive-strength = <2>; /* 2 MA */ + bias-disable; + }; + }; + + nfc_enable_active: nfc_enable_active { + mux { + pins = "gpio48"; + function = "gpio"; + }; + + config { + pins = "gpio48"; + drive-strength = <2>; /* 2 MA */ + bias-disable; + }; + }; + + nfc_enable_suspend: nfc_enable_suspend { + mux { + pins = "gpio48"; + function = "gpio"; + }; + + config { + pins = "gpio48"; + drive-strength = <2>; /* 2 MA */ + bias-disable; + }; + }; + + + nfc_clk_req_active: nfc_clk_req_active { + /* active state */ + mux { + /* GPIO 7: NFC CLK Req*/ + pins = "gpio7"; + function = "gpio"; + }; + + config { + pins = "gpio7"; + drive-strength = <2>; /* 2 MA */ + bias-disable; + input-enable; + }; + }; + + nfc_clk_req_suspend: nfc_clk_req_suspend { + /* sleep state */ + mux { + /* GPIO 7: NFC CLK Req */ + pins = "gpi7"; + function = "gpio"; + }; + + config { + pins = "gpio7"; + drive-strength = <2>; /* 2 MA */ + bias-disable; + input-enable; + }; + }; + }; +}; + +/* Dummy LDO reference */ +&sdhc_1 { + status = "ok"; + + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&sdc1_on>; + pinctrl-1 = <&sdc1_off>; + + vdd-supply = <&L24A>; + qcom,vdd-voltage-level = <2960000 2960000>; + qcom,vdd-current-level = <0 570000>; + + vdd-io-supply = <&L11A>; + qcom,vdd-io-always-on; + qcom,vdd-io-lpm-sup; + qcom,vdd-io-voltage-level = <1800000 1800000>; + qcom,vdd-io-current-level = <0 325000>; +}; + +&sdhc_2 { + status = "ok"; + + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&sdc2_on>; + pinctrl-1 = <&sdc2_off>; + + vdd-supply = <&L22A>; + qcom,vdd-voltage-level = <2960000 2960000>; + qcom,vdd-current-level = <0 800000>; + + vdd-io-supply = <&L5A>; + qcom,vdd-io-voltage-level = <1800000 2960000>; + qcom,vdd-io-current-level = <0 22000>; + + cd-gpios = <&tlmm 94 GPIO_ACTIVE_HIGH>; +}; + +&ufsphy_mem { + compatible = "qcom,ufs-phy-qmp-v4-yupik"; + + vdda-phy-supply = <&L7A>; + vdda-pll-supply = <&L4A>; + vdda-phy-max-microamp = <85700>; + vdda-pll-max-microamp = <18300>; + + status = "ok"; +}; + +&ufshc_mem { + vdd-hba-supply = <&gcc_ufs_phy_gdsc>; + vdd-hba-fixed-regulator; + + vcc-supply = <&L24A>; + vcc-voltage-level = <2950000 2960000>; + vcc-max-microamp = <800000>; + + vccq2-supply = <&L11A>; + vccq2-max-microamp = <800000>; + vccq2-voltage-level = <1800000 1800000>; + + qcom,vddp-ref-clk-supply = <&L4A>; + qcom,vddp-ref-clk-max-microamp = <100>; + + status = "ok"; +}; + +&sx937x { + status = "disabled"; +}; + +&qupv3_se7_i2c_sleep { + config { + /delete-property/ bias-disable; + bias-pull-up; + input-enable; + }; +}; + +&qupv3_se7_i2c { + status = "ok"; + #address-cells = <1>; + #size-cells = <0>; + sec-nfc@27 { + compatible = "sec-nfc"; + reg = <0x27>; + mmi,status = "/chosen", "mmi,nfc", "samsung"; + sec-nfc,ven-gpio = <&tlmm 48 0x00>; + sec-nfc,firm-gpio = <&tlmm 8 0x00>; + sec-nfc,irq-gpio = <&tlmm 9 0x00>; + sec-nfc,clk_req-gpio = <&tlmm 7 0x00>; + interrupt-parent = <&tlmm>; + interrupts = <9 0>; + interrupt-names = "nfc_irq"; + pinctrl-names = "nfc_active", "nfc_suspend"; + pinctrl-0 = <&nfc_int_active &nfc_enable_active &nfc_clk_req_active>; + pinctrl-1 = <&nfc_int_suspend &nfc_enable_suspend &nfc_clk_req_suspend>; + }; + + sx937x_se7:sx937x@2c { + compatible = "Semtech,sx937x"; + reg = <0x2c>; + pinctrl-names = "default","sleep"; + pinctrl-0 = <&sar_int_default>; + pinctrl-1 = <&sar_int_sleep>; + interrupt-parent = <&tlmm>; + interrupts = <24 0x02>; + interrupt-names = "sx937x_irq"; + Semtech,nirq-gpio = <&tlmm 24 0x02>; + cap_vdd-supply = <&pm6125_l9>; + /*use PH4/5/6 as the reference sensor + set it to 0xff if the ref-phases-x is not used*/ + Semtech,ref-phases-a = <5>; + Semtech,ref-phases-b = <6>; + Semtech,ref-phases-c = <0xff>; + Semtech,button-flag = <0x1f>; + Semtech,reg-num = <54>; + Semtech,reg-init = < + 0x8024 0x7F00 + 0x4004 0x70 + 0x4008 0x8 + 0x8020 0x32 + 0x8028 0x886 /*AFE_PARAM_PH0*/ + 0x8034 0x886 /*AFE_PARAM_PH1*/ + 0x8040 0x886 /*AFE_PARAM_PH2*/ + 0x804C 0x886 /*AFE_PARAM_PH3*/ + 0x8058 0x886 /*AFE_PARAM_PH4*/ + 0x8064 0x886 /*AFE_PARAM_PH5*/ + 0x8070 0x886 /*AFE_PARAM_PH6*/ + 0x807C 0x85C /*AFE_PARAM_PH7*/ + /*set CS3 to hiz, because it used as IRQ pin*/ + 0x8030 0xFEF9FF /*REG_AFEPH_PH0, CS5, ANT0, Bottom center*/ + 0x803C 0xFFF9FD /*REG_AFEPH_PH1, CS0, ANT1/6, Top right*/ + 0x8048 0xFFD9FF /*REG_AFEPH_PH2, CS4, ANT2, Top center*/ + 0x8054 0xF7F9FF /*REG_AFEPH_PH3, CS6, ANT5, Bottom Right*/ + 0x8060 0xBFF9FF /*REG_AFEPH_PH4, CS7, ANT8, Top Left*/ + 0x806C 0xFFF97F /*REG_AFEPH_PH5, CS2, ANT0/5_REF, Bottom_Ref*/ + 0x8078 0xFFF9EF /*REG_AFEPH_PH6, CS1, ANT8 REF, Middle*/ + 0x8084 0xFFF9FF /*REG_AFEPH_PH7, NOT USE*/ + 0x8098 0x693F + 0x80B8 0x6932 + 0x80D8 0x3737 + 0x80F8 0x3C3C + 0x8118 0x4242 + 0x8138 0xFE + 0x8158 0xFE + 0x8188 0x8000015 + 0x818C 0x8000016 + 0x8090 0x64B45000 + 0x80B0 0x3CD05000 + 0x80D0 0x32D87000 + 0x80F0 0x3CD45000 + 0x8110 0x3CD47000 + 0x8130 0x54AC5000 + 0x8150 0x54AC5000 + 0x8170 0x54AC5000 + 0x8088 0x300000 + 0x80A8 0x300000 + 0x80C8 0x300000 + 0x80E8 0x300000 + 0x8108 0x300000 + 0x8128 0x600000 + 0x8148 0x600000 + 0x808C 0x60200030 + 0x80AC 0x60200030 + 0x80CC 0x60200018 + 0x80EC 0x60200030 + 0x810C 0x60200018 + 0x812C 0x60200030 + 0x814C 0x60200030 + 0x816C 0x60200030 + 0x8024 0x7F7F + 0x4280 0xF + >; + + status = "ok"; + }; +}; + +&pmk8350_vadc { + pmk8350_chg_therm { + reg = ; + label = "pmk8350_chg_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + + pmk8350_usb_conn_therm { + reg = ; + label = "pmk8350_ufs_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; +}; + +&pmk8350_adc_tm { + io-channels = <&pmk8350_vadc PMK8350_ADC7_AMUX_THM1_100K_PU>, + <&pmk8350_vadc PMK8350_ADC7_AMUX_THM2_100K_PU>, + <&pmk8350_vadc PMK8350_ADC7_AMUX_THM4_100K_PU>; + + chg_therm { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; + usb_conn_therm { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; +}; + +&thermal_zones { + sdm-skin-therm-usr { + status = "disabled"; + }; + rear-cam-therm-usr { + status = "disabled"; + }; + camera-therm-usr { + status = "disabled"; + }; + quiet-therm-usr { + status = "disabled"; + }; + pa-therm0-usr { + status = "disabled"; + }; + pa-therm1-usr { + status = "disabled"; + }; + xo-therm-usr { + status = "disabled"; + }; + chg_therm { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "user_space"; + thermal-sensors = <&pmk8350_adc_tm PMK8350_ADC7_AMUX_THM2_100K_PU>; + wake-capable-sensor; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + usb_conn_therm { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "user_space"; + thermal-sensors = <&pmk8350_adc_tm PMK8350_ADC7_AMUX_THM4_100K_PU>; + wake-capable-sensor; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + msm_therm { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "user_space"; + thermal-sensors = <&pm6125_adc_tm_iio ADC5_GPIO1_100K_PU>; + wake-capable-sensor; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + + rfc_camera_therm { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "user_space"; + thermal-sensors = <&pm6125_adc_tm_iio ADC5_GPIO2_100K_PU>; + wake-capable-sensor; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + cam_flash_therm { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "user_space"; + thermal-sensors = <&pm6125_adc_tm ADC5_GPIO3_100K_PU>; + wake-capable-sensor; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + pa_therm1 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "user_space"; + thermal-sensors = <&pm6125_adc_tm ADC5_GPIO4_100K_PU>; + wake-capable-sensor; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + pa_therm2 { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "user_space"; + thermal-sensors = <&pm6125_adc_tm ADC5_AMUX_THM1_100K_PU>; + wake-capable-sensor; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + quiet_therm { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "user_space"; + thermal-sensors = <&pm6125_adc_tm ADC5_AMUX_THM2_100K_PU>; + wake-capable-sensor; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; +}; + +&soc { + gpio_keys { + compatible = "gpio-keys"; + label = "gpio-keys"; + + pinctrl-names = "default"; + pinctrl-0 = <&key_vol_up_default>; + + vol_up { + label = "volume_up"; + gpios = <&pmr735a_gpios 1 GPIO_ACTIVE_LOW>; + linux,input-type = <1>; + linux,code = ; + gpio-key,wakeup; + debounce-interval = <15>; + linux,can-disable; + }; + }; + + ldo_vib { + compatible = "moto,vibrator-ldo"; + moto,vib-ldo-gpio = <&tlmm 100 0x0>; + status = "ok"; + }; +}; + diff --git a/qcom/blair-rhodei-dvt1-overlay.dts b/qcom/blair-rhodei-dvt1-overlay.dts new file mode 100644 index 000000000000..68d4becf6f86 --- /dev/null +++ b/qcom/blair-rhodei-dvt1-overlay.dts @@ -0,0 +1,24 @@ +/* Copyright (c) 2021, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/dts-v1/; +/plugin/; + +#include "blair-rhodei-common-overlay.dtsi" + +/ { + model = "rhodei"; + compatible = "qcom,blair-rhodei", "qcom,blair-moto", "qcom,blair"; + qcom,msm-id = <507 0x10000>; + qcom,board-id = <0x4D 0xB100>; +}; + diff --git a/qcom/blair-rhodei-dvt2-overlay.dts b/qcom/blair-rhodei-dvt2-overlay.dts new file mode 100644 index 000000000000..4381b1d4144c --- /dev/null +++ b/qcom/blair-rhodei-dvt2-overlay.dts @@ -0,0 +1,25 @@ +/* Copyright (c) 2021, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/dts-v1/; +/plugin/; + +#include "blair-rhodei-common-overlay.dtsi" +#include "camera/blair-camera-sensor-mot-rhodei-dvt2-overlay.dtsi" + +/ { + model = "rhodei"; + compatible = "qcom,blair-rhodei", "qcom,blair-moto", "qcom,blair"; + qcom,msm-id = <507 0x10000>; + qcom,board-id = <0x4D 0xB200>; +}; + diff --git a/qcom/blair-rhodei-evt1-overlay.dts b/qcom/blair-rhodei-evt1-overlay.dts new file mode 100644 index 000000000000..da9a3b8cbad0 --- /dev/null +++ b/qcom/blair-rhodei-evt1-overlay.dts @@ -0,0 +1,24 @@ +/* Copyright (c) 2021, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/dts-v1/; +/plugin/; + +#include "blair-rhodei-common-overlay.dtsi" + +/ { + model = "rhodei"; + compatible = "qcom,blair-rhodei", "qcom,blair-moto", "qcom,blair"; + qcom,msm-id = <507 0x10000>; + qcom,board-id = <0x4D 0xA100>; +}; + diff --git a/qcom/blair-rhodei-evt2-overlay.dts b/qcom/blair-rhodei-evt2-overlay.dts new file mode 100644 index 000000000000..7f9479603246 --- /dev/null +++ b/qcom/blair-rhodei-evt2-overlay.dts @@ -0,0 +1,24 @@ +/* Copyright (c) 2021, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/dts-v1/; +/plugin/; + +#include "blair-rhodei-common-overlay.dtsi" + +/ { + model = "rhodei"; + compatible = "qcom,blair-rhodei", "qcom,blair-moto", "qcom,blair"; + qcom,msm-id = <507 0x10000>; + qcom,board-id = <0x4D 0xA200>; +}; + diff --git a/qcom/discrete_charging_rhodei.dtsi b/qcom/discrete_charging_rhodei.dtsi new file mode 100644 index 000000000000..8624a804fa25 --- /dev/null +++ b/qcom/discrete_charging_rhodei.dtsi @@ -0,0 +1,222 @@ +/* Copyright (c) 2021, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ +#include +#include "sgm7220.dtsi" +#include "discrete-rt-pd-manger.dtsi" + +&pm6125_vadc { + gpio6_div3{ + reg = ; + label = "gpio3_div3"; + qcom,pre-scaling = <1 3>; + }; +}; + +&pm6125_gpios { + gpio6_adc{ + gpio6_adc_default:gpio6_adc_default{ + pins = "gpio6"; + function = "normal"; + bias-high-impedance; + }; + }; +}; + +&qupv3_se8_i2c { + status = "okay"; + cw2217@64 { + compatible = "cellwise,cw2217"; + reg = <0x64>; + status = "okay"; + + df-serialnum = "SB18D24973"; + #include "bat_setting/CW_nd50-atl-5000mah.dtsi" + #include "bat_setting/CW_nd50-jiade-5000mah.dtsi" + }; + + sm5602@71 { + compatible = "sm,sm5602"; + reg = <0x71>; + //interrupt-parent = <&tlmm>; + //interrupts = <38 2>; + //qcom,irq-gpio = <&tlmm 38 0x0>; + + sm,en_temp_ex; + //sm,en_temp_in; + sm,en_batt_det; + sm,iocv_man_mode; + sm,misc = <0x0800>; + sm,aging_ctrl = <0x0121>; + sm,cycle_cfg = <0x7000>; + sm,rsns = <1>; + sm,fg_irq_set = <0x07FF>; + sm,low_soc1 = <1>; + sm,low_soc2 = <15>; + sm,v_l_alarm = <3400>; + sm,v_h_alarm = <4450>; + sm,battery_table_num = <0>; + sm,param_version = <3>; + sm,t_l_alarm_in = <54>; + sm,t_h_alarm_in = <1>; + sm,t_l_alarm_ex = <0xD3D8>; + sm,t_h_alarm_ex = <0x9245>; + sm,shutdown-delay-enable; + + df-serialnum = "SB18D24973"; + #include "bat_setting/SM5602_ND50_ATL_Rhodec.dtsi" + #include "bat_setting/SM5602_ND50_JIADE_Rhodec.dtsi" + }; + + sgm4154x: sgm4154x@3B { + status = "okay"; + compatible = "sgm,sgm41542"; + reg = <0x3B>; + + pinctrl-names = "default"; + pinctrl-0 = <&gpio6_adc_default &chg_irq_default>; + io-channels = <&pm6125_vadc ADC5_GPIO3_DIV3>; + io-channel-names = "gpio3_div3"; + + interrupt-parent = <&tlmm>; + interrupts = <12 0>; //irq num base on hardware design + sgm,irq-gpio = <&tlmm 12 0>; //irq num base on hardware design + sgm,chg-en-gpio = <&tlmm 92 0>; //gpio num base on hardware design 1.MTK parent node name is pio 2.QUALCOMM parent node name is tlmm or other + + dpdm-supply = <&qusb_phy0>; + mmi,qc3-support; + + /* sw jeita parameter customer defined*/ + enable_sw_jeita; + jeita_temp_above_t4_cv = <0>; + jeita_temp_t3_to_t4_cv = <4100000>; + jeita_temp_t2_to_t3_cv = <4350000>; + jeita_temp_t1_to_t2_cv = <4350000>; + jeita_temp_t0_to_t1_cv = <0>; + jeita_temp_below_t0_cv = <0>; + + jeita_temp_above_t4_cc_current = <0>; + jeita_temp_t3_to_t4_cc_current = <1000000>; + jeita_temp_t2_to_t3_cc_current = <1250000>; + jeita_temp_t1_to_t2_cc_current = <1000000>; + jeita_temp_below_t0_cc_current = <0>; + + temp_t4_thres = <50>; + temp_t4_thres_minus_x_degree = <48>; + temp_t3_thres = <45>; + temp_t3_thres_minus_x_degree = <45>; + temp_t2_thres = <20>; + temp_t2_thres_plus_x_degree = <15>; + temp_t1_thres = <0>; + temp_t1_thres_plus_x_degree = <0>; + temp_t0_thres = <0>; + temp_t0_thres_plus_x_degree = <2>; + temp_neg_10_thres = <0>; + }; + + bq25890@6A { + status = "okay"; + compatible = "ti,bq2589x-1"; + reg = <0x6A>; + + pinctrl-names = "default"; + pinctrl-0 = <&bq2589x_irq &gpio6_adc_default>; + io-channels = <&pm6125_vadc ADC5_GPIO3_DIV3>; + io-channel-names = "gpio3_div3"; + + bq2589x_irq-gpio = <&tlmm 12 0>; + bq2589x_en-gpio = <&tlmm 92 0>; + dpdm-supply = <&qusb_phy0>; + + mmi,qc3-support; + ti,bq2589x,vbus-volt-high-level = <8700>;/* tune adapter to output 9v */ + ti,bq2589x,vbus-volt-low-level = <4400>;/* tune adapter to output 5v */ + ti,bq2589x,vbat-min-volt-to-tuneup = <3000>; + ti,bq2589x,charge-voltage = <4450>; + ti,bq2589x,charge-current = <3000>; + ti,bq2589x,term-current = <128>; + ti,bq2589x,enable-auto-dpdm; + ti,bq2589x,enable-termination; + ti,bq2589x,enable-ico; + ti,bq2589x,use-absolute-vindpm; + }; +}; + +&soc { + mmi_charger: mmi,charger { + status = "ok"; + compatible = "mmi,mmi-charger"; + mmi,enable-charging-limit; + mmi,upper-limit-capacity = <65>; + mmi,lower-limit-capacity = <60>; + mmi,heartbeat-interval = <5000>; + mmi,dcp-power-max = <10000>; + mmi,hvdcp-power-max = <15000>; + }; + + mmi_discrete_charger: mmi,discrete-charging { + status = "ok"; + compatible = "mmi,mmi-discrete-charger"; + #io-channel-cells = <1>; + battery-names = "battery"; + supplied-from = "mmi_battery"; + + mmi,chrg-iterm-ma = <243>; + mmi,fg-iterm-ma = <500>; + mmi,max-fv-mv = <4450>; + mmi,max-fcc-ma = <4000>; + mmi,demo-fv-mv = <4000>; + mmi,df-serialnum = "SB18D24973"; + mmi,mmi-temp-zones = <0 4200 1000 0>, + <10 4250 2500 1000>, + <15 0 2500 2500>, + <45 0 4000 4000>, + <60 4200 4000 0>; + + mmi,thermal-mitigation = <4000000 3000000 2500000 + 2000000 1500000 + 1200000 900000 + 600000 300000>; + }; +}; + + +&tlmm { + + chg_irq_default: chg_irq_default { + /* IRQ */ + mux { + pins = "gpio12"; + function = "gpio"; + }; + + config { + pins = "gpio12"; + bias-pull-up; + drive-strength = <2>; /* 2 MA */ + input-enable; + }; + }; + + bq2589x_irq: bq2589x_irq { + mux { + pins = "gpio12"; + function = "gpio"; + }; + + config { + pins = "gpio12"; + drive-strength = <2>; + bias-pull-up; + input-enable; + }; + }; +}; diff --git a/qcom/rhodei-display.dtsi b/qcom/rhodei-display.dtsi new file mode 100644 index 000000000000..2353bc044c90 --- /dev/null +++ b/qcom/rhodei-display.dtsi @@ -0,0 +1,484 @@ +#include "dsi-panel-mot-csot-nt37701-655-1080x2400-dsc-cmd-common.dtsi" +#include "dsi-panel-mot-csot-nt37701-655-1080x2400-dsc-cmd-common-v1.dtsi" +#include "dsi-panel-mot-tianma-nt37701-655-1080x2400-dsc-cmd-common.dtsi" +#include "dsi-panel-mot-tianma-nt37701-655-1080x2400-dsc-cmd-common-v1.dtsi" +#include "dsi-panel-mot-tianma-nt37701-655-1080x2400-dsc-cmd-common-v2.dtsi" +#include "dsi-panel-mot-dummy-qhd-video.dtsi" + +&display_panel_avdd { + /delete-property/ gpio; + /delete-property/ pinctrl-0; +}; + +&display_panel_avdd { + status = "disabled"; +}; + +&display_panel_ibb { + status = "disabled"; +}; + +&qupv3_se2_spi { + status = "disabled"; +}; + +&qupv3_se2_i2c { + status = "disabled"; +}; + +&tlmm { + panel_vci_en_default: panel_vci_en_default { + mux { + pins = "gpio46"; + function = "gpio"; + }; + + config { + pins = "gpio46"; + drive-strength = <8>; + bias-disable = <0>; + output-high; + }; + }; +}; + +&soc { + dsi_panel_pwr_supply_amoled: dsi_panel_pwr_supply_amoled { + #address-cells = <1>; + #size-cells = <0>; + + qcom,panel-supply-entry@0 { + reg = <0>; + qcom,supply-name = "vddio"; + qcom,supply-min-voltage = <1800000>; + qcom,supply-max-voltage = <1800000>; + qcom,supply-enable-load = <60700>; + qcom,supply-disable-load = <80>; + qcom,supply-post-on-sleep = <2>; + qcom,supply-post-off-sleep = <0>; + }; + + qcom,panel-supply-entry@1 { + reg = <1>; + qcom,supply-name = "dvdd"; + qcom,supply-min-voltage = <1250000>; + qcom,supply-max-voltage = <1250000>; + qcom,supply-enable-load = <60700>; + qcom,supply-disable-load = <10>; + qcom,supply-post-on-sleep = <2>; + qcom,supply-post-off-sleep = <2>; + }; + + qcom,panel-supply-entry@2 { + reg = <2>; + qcom,supply-name = "vci"; + qcom,supply-min-voltage = <3000000>; + qcom,supply-max-voltage = <3000000>; + qcom,supply-enable-load = <30000>; + qcom,supply-disable-load = <0>; + qcom,supply-post-on-sleep = <0>; + qcom,supply-post-off-sleep = <2>; + }; + }; + + panel_vci: panel_gpio_regulator@1 { + compatible = "qti-regulator-fixed"; + regulator-name = "panel_vci"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-enable-ramp-delay = <233>; + gpio = <&tlmm 46 0>; + enable-active-high; + regulator-boot-on; + proxy-supply = <&panel_vci>; + pinctrl-names = "default"; + pinctrl-0 = <&panel_vci_en_default>; + }; +}; + +&sde_dsi { + /delete-property/ lab-supply; + /delete-property/ ibb-supply; + /delete-property/ vddio-supply; + /delete-property/ qcom,dsi-default-panel; + /delete-property/ avdd-supply; + + vci-supply = <&panel_vci>; + vddio-supply = <&L13A>; + dvdd-supply = <&L3A>; + qcom,dsi-default-panel = <&mot_csot_nt37701_655_1080x2400_dsc_cmd_v0>; +}; + +&mot_csot_nt37701_655_1080x2400_dsc_cmd_v1 { + qcom,esd-check-enabled; + qcom,mdss-dsi-panel-status-check-mode = "te_chk_reg_rd"; + qcom,mdss-dsi-panel-status-command = [06 01 00 01 00 00 01 0a]; + qcom,mdss-dsi-panel-status-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-panel-status-value = <0x9c>; + qcom,mdss-dsi-panel-status-read-length = <1>; + + qcom,panel-supply-entries = <&dsi_panel_pwr_supply_amoled>; + qcom,mdss-dsi-no-panel-on-read-support; + qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_dcs"; + qcom,mdss-dsi-bl-min-level = <9>; + qcom,mdss-dsi-bl-max-level = <3514>; + qcom,mdss-dsi-bl-default-level = <1757>; + qcom,mdss-brightness-max-level = <3514>; + qcom,platform-te-gpio = <&tlmm 23 0>; + qcom,platform-reset-gpio = <&pmr735a_gpios 2 0>; + qcom,bl-dsc-cmd-state = "dsi_hs_mode"; + + /*qcom,mdss-dsi-panel-hdr-enabled; + qcom,mdss-dsi-panel-hdr-color-primaries = <14950 15750 34000 + 16000 13000 35500 7000 2500>; + qcom,mdss-dsi-panel-peak-brightness = <5000000>; + qcom,mdss-dsi-panel-blackness-level = <100>;*/ + + qcom,dsi-select-clocks = "mux_byte_clk0", "mux_pixel_clk0"; + + qcom,mdss-dsi-display-timings { + timing@0 { + //qcom,mdss-dsi-panel-clockrate = <320000000>; + qcom,display-topology = <1 1 1>; + qcom,default-topology-index = <0>; + qcom,mdss-dsi-panel-phy-drive-strength = <255>; + qcom,mdss-dsi-panel-phy-timings = [00 0D 03 03 10 1D 04 + 03 02 02 04 00 0C 08]; + }; + timing@1 { + //qcom,mdss-dsi-panel-clockrate = <400000000>; + qcom,display-topology = <1 1 1>; + qcom,default-topology-index = <0>; + qcom,mdss-dsi-panel-phy-drive-strength = <255>; + qcom,mdss-dsi-panel-phy-timings = [00 10 03 03 11 1E 04 + 04 03 02 04 00 0E 08]; + }; + timing@2 { + //qcom,mdss-dsi-panel-clockrate = <601000000>; + qcom,display-topology = <1 1 1>; + qcom,default-topology-index = <0>; + qcom,mdss-dsi-panel-phy-drive-strength = <255>; + qcom,mdss-dsi-panel-phy-timings = [00 16 05 05 14 1F 06 + 06 06 02 04 00 13 0A]; + }; + timing@3 { + //qcom,mdss-dsi-panel-clockrate = <801000000>; + qcom,display-topology = <1 1 1>; + qcom,default-topology-index = <0>; + qcom,mdss-dsi-panel-phy-drive-strength = <255>; + qcom,mdss-dsi-panel-phy-timings = [00 1C 07 07 17 15 07 + 07 08 02 04 00 18 0C]; + }; + /*timing@4 { + //qcom,mdss-dsi-panel-clockrate = <961000000>; + qcom,display-topology = <1 1 1>; + qcom,default-topology-index = <0>; + qcom,mdss-dsi-panel-phy-drive-strength = <255>; + qcom,mdss-dsi-panel-phy-timings = [00 21 08 08 19 17 08 + 08 09 02 04 00 1C 0D]; + };*/ + }; +}; + +&mot_tm_nt37701_655_1080x2400_dsc_cmd_v2 { + qcom,esd-check-enabled; + qcom,mdss-dsi-panel-status-check-mode = "te_chk_reg_rd"; + qcom,mdss-dsi-panel-status-command = [06 01 00 01 00 00 01 0a]; + qcom,mdss-dsi-panel-status-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-panel-status-value = <0x9c>; + qcom,mdss-dsi-panel-status-read-length = <1>; + + qcom,panel-supply-entries = <&dsi_panel_pwr_supply_amoled>; + qcom,mdss-dsi-no-panel-on-read-support; + qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_dcs"; + qcom,mdss-dsi-bl-min-level = <9>; + qcom,mdss-dsi-bl-max-level = <3514>; + qcom,mdss-dsi-bl-default-level = <1757>; + qcom,mdss-brightness-max-level = <3514>; + qcom,platform-te-gpio = <&tlmm 23 0>; + qcom,platform-reset-gpio = <&pmr735a_gpios 2 0>; + qcom,bl-dsc-cmd-state = "dsi_hs_mode"; + + /*qcom,mdss-dsi-panel-hdr-enabled; + qcom,mdss-dsi-panel-hdr-color-primaries = <14950 15750 34000 + 16000 13000 35500 7000 2500>; + qcom,mdss-dsi-panel-peak-brightness = <5000000>; + qcom,mdss-dsi-panel-blackness-level = <100>;*/ + + qcom,dsi-select-clocks = "mux_byte_clk0", "mux_pixel_clk0"; + + qcom,mdss-dsi-display-timings { + timing@0 { + //qcom,mdss-dsi-panel-clockrate = <320000000>; + qcom,display-topology = <1 1 1>; + qcom,default-topology-index = <0>; + qcom,mdss-dsi-panel-phy-drive-strength = <255>; + qcom,mdss-dsi-panel-phy-timings = [00 0D 03 03 10 1D 04 + 03 02 02 04 00 0C 08]; + }; + timing@1 { + //qcom,mdss-dsi-panel-clockrate = <400000000>; + qcom,display-topology = <1 1 1>; + qcom,default-topology-index = <0>; + qcom,mdss-dsi-panel-phy-drive-strength = <255>; + qcom,mdss-dsi-panel-phy-timings = [00 10 03 03 11 1E 04 + 04 03 02 04 00 0E 08]; + }; + timing@2 { + //qcom,mdss-dsi-panel-clockrate = <601000000>; + qcom,display-topology = <1 1 1>; + qcom,default-topology-index = <0>; + qcom,mdss-dsi-panel-phy-drive-strength = <255>; + qcom,mdss-dsi-panel-phy-timings = [00 16 05 05 14 1F 06 + 06 06 02 04 00 13 0A]; + }; + timing@3 { + //qcom,mdss-dsi-panel-clockrate = <801000000>; + qcom,display-topology = <1 1 1>; + qcom,default-topology-index = <0>; + qcom,mdss-dsi-panel-phy-drive-strength = <255>; + qcom,mdss-dsi-panel-phy-timings = [00 1C 07 07 17 15 07 + 07 08 02 04 00 18 0C]; + }; + /*timing@4 { + //qcom,mdss-dsi-panel-clockrate = <961000000>; + qcom,display-topology = <1 1 1>; + qcom,default-topology-index = <0>; + qcom,mdss-dsi-panel-phy-drive-strength = <255>; + qcom,mdss-dsi-panel-phy-timings = [00 21 08 08 19 17 08 + 08 09 02 04 00 1C 0D]; + };*/ + }; +}; + +&mot_tm_nt37701_655_1080x2400_dsc_cmd_v1 { + qcom,esd-check-enabled; + qcom,mdss-dsi-panel-status-check-mode = "te_chk_reg_rd"; + qcom,mdss-dsi-panel-status-command = [06 01 00 01 00 00 01 0a]; + qcom,mdss-dsi-panel-status-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-panel-status-value = <0x9c>; + qcom,mdss-dsi-panel-status-read-length = <1>; + + qcom,panel-supply-entries = <&dsi_panel_pwr_supply_amoled>; + qcom,mdss-dsi-no-panel-on-read-support; + qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_dcs"; + qcom,mdss-dsi-bl-min-level = <9>; + qcom,mdss-dsi-bl-max-level = <3514>; + qcom,mdss-dsi-bl-default-level = <1757>; + qcom,mdss-brightness-max-level = <3514>; + qcom,platform-te-gpio = <&tlmm 23 0>; + qcom,platform-reset-gpio = <&pmr735a_gpios 2 0>; + qcom,bl-dsc-cmd-state = "dsi_hs_mode"; + + /*qcom,mdss-dsi-panel-hdr-enabled; + qcom,mdss-dsi-panel-hdr-color-primaries = <14950 15750 34000 + 16000 13000 35500 7000 2500>; + qcom,mdss-dsi-panel-peak-brightness = <5000000>; + qcom,mdss-dsi-panel-blackness-level = <100>;*/ + + qcom,dsi-select-clocks = "mux_byte_clk0", "mux_pixel_clk0"; + + qcom,mdss-dsi-display-timings { + timing@0 { + //qcom,mdss-dsi-panel-clockrate = <320000000>; + qcom,display-topology = <1 1 1>; + qcom,default-topology-index = <0>; + qcom,mdss-dsi-panel-phy-drive-strength = <255>; + qcom,mdss-dsi-panel-phy-timings = [00 0D 03 03 10 1D 04 + 03 02 02 04 00 0C 08]; + }; + timing@1 { + //qcom,mdss-dsi-panel-clockrate = <400000000>; + qcom,display-topology = <1 1 1>; + qcom,default-topology-index = <0>; + qcom,mdss-dsi-panel-phy-drive-strength = <255>; + qcom,mdss-dsi-panel-phy-timings = [00 10 03 03 11 1E 04 + 04 03 02 04 00 0E 08]; + }; + timing@2 { + //qcom,mdss-dsi-panel-clockrate = <601000000>; + qcom,display-topology = <1 1 1>; + qcom,default-topology-index = <0>; + vqcom,mdss-dsi-panel-phy-drive-strength = <255>; + qcom,mdss-dsi-panel-phy-timings = [00 16 05 05 14 1F 06 + 06 06 02 04 00 13 0A]; + }; + timing@3 { + //qcom,mdss-dsi-panel-clockrate = <801000000>; + qcom,display-topology = <1 1 1>; + qcom,default-topology-index = <0>; + qcom,mdss-dsi-panel-phy-drive-strength = <255>; + qcom,mdss-dsi-panel-phy-timings = [00 1C 07 07 17 15 07 + 07 08 02 04 00 18 0C]; + }; + /*timing@4 { + //qcom,mdss-dsi-panel-clockrate = <961000000>; + qcom,display-topology = <1 1 1>; + qcom,default-topology-index = <0>; + qcom,mdss-dsi-panel-phy-drive-strength = <255>; + qcom,mdss-dsi-panel-phy-timings = [00 21 08 08 19 17 08 + 08 09 02 04 00 1C 0D]; + };*/ + }; +}; + +&mot_csot_nt37701_655_1080x2400_dsc_cmd_v0 { + qcom,esd-check-enabled; + qcom,mdss-dsi-panel-status-check-mode = "te_chk_reg_rd"; + qcom,mdss-dsi-panel-status-command = [06 01 00 01 00 00 01 0a]; + qcom,mdss-dsi-panel-status-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-panel-status-value = <0x9c>; + qcom,mdss-dsi-panel-status-read-length = <1>; + + qcom,panel-supply-entries = <&dsi_panel_pwr_supply_amoled>; + qcom,mdss-dsi-no-panel-on-read-support; + qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_dcs"; + qcom,mdss-dsi-bl-min-level = <9>; + qcom,mdss-dsi-bl-max-level = <3514>; + qcom,mdss-dsi-bl-default-level = <1757>; + qcom,mdss-brightness-max-level = <3514>; + qcom,platform-te-gpio = <&tlmm 23 0>; + qcom,platform-reset-gpio = <&pmr735a_gpios 2 0>; + qcom,bl-dsc-cmd-state = "dsi_hs_mode"; + + /*qcom,mdss-dsi-panel-hdr-enabled; + qcom,mdss-dsi-panel-hdr-color-primaries = <14950 15750 34000 + 16000 13000 35500 7000 2500>; + qcom,mdss-dsi-panel-peak-brightness = <5000000>; + qcom,mdss-dsi-panel-blackness-level = <100>;*/ + + qcom,dsi-select-clocks = "mux_byte_clk0", "mux_pixel_clk0"; + + qcom,mdss-dsi-display-timings { + timing@0 { + //qcom,mdss-dsi-panel-clockrate = <320000000>; + qcom,display-topology = <1 1 1>; + qcom,default-topology-index = <0>; + qcom,mdss-dsi-panel-phy-drive-strength = <255>; + qcom,mdss-dsi-panel-phy-timings = [00 0D 03 03 10 1D 04 + 03 02 02 04 00 0C 08]; + }; + timing@1 { + //qcom,mdss-dsi-panel-clockrate = <400000000>; + qcom,display-topology = <1 1 1>; + qcom,default-topology-index = <0>; + qcom,mdss-dsi-panel-phy-drive-strength = <255>; + qcom,mdss-dsi-panel-phy-timings = [00 10 03 03 11 1E 04 + 04 03 02 04 00 0E 08]; + }; + timing@2 { + //qcom,mdss-dsi-panel-clockrate = <601000000>; + qcom,display-topology = <1 1 1>; + qcom,default-topology-index = <0>; + qcom,mdss-dsi-panel-phy-drive-strength = <255>; + qcom,mdss-dsi-panel-phy-timings = [00 16 05 05 14 1F 06 + 06 06 02 04 00 13 0A]; + }; + timing@3 { + //qcom,mdss-dsi-panel-clockrate = <801000000>; + qcom,display-topology = <1 1 1>; + qcom,default-topology-index = <0>; + qcom,mdss-dsi-panel-phy-drive-strength = <255>; + qcom,mdss-dsi-panel-phy-timings = [00 1C 07 07 17 15 07 + 07 08 02 04 00 18 0C]; + }; + /*timing@4 { + //qcom,mdss-dsi-panel-clockrate = <961000000>; + qcom,display-topology = <1 1 1>; + qcom,default-topology-index = <0>; + qcom,mdss-dsi-panel-phy-drive-strength = <255>; + qcom,mdss-dsi-panel-phy-timings = [00 21 08 08 19 17 08 + 08 09 02 04 00 1C 0D]; + };*/ + }; +}; + +&mot_tm_nt37701_655_1080x2400_dsc_cmd_v0 { + qcom,esd-check-enabled; + qcom,mdss-dsi-panel-status-check-mode = "te_chk_reg_rd"; + qcom,mdss-dsi-panel-status-command = [06 01 00 01 00 00 01 0a]; + qcom,mdss-dsi-panel-status-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-panel-status-value = <0x9c>; + qcom,mdss-dsi-panel-status-read-length = <1>; + + qcom,panel-supply-entries = <&dsi_panel_pwr_supply_amoled>; + qcom,mdss-dsi-no-panel-on-read-support; + qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_dcs"; + qcom,mdss-dsi-bl-min-level = <9>; + qcom,mdss-dsi-bl-max-level = <3514>; + qcom,mdss-dsi-bl-default-level = <1757>; + qcom,mdss-brightness-max-level = <3514>; + qcom,platform-te-gpio = <&tlmm 23 0>; + qcom,platform-reset-gpio = <&pmr735a_gpios 2 0>; + qcom,bl-dsc-cmd-state = "dsi_hs_mode"; + + /*qcom,mdss-dsi-panel-hdr-enabled; + qcom,mdss-dsi-panel-hdr-color-primaries = <14950 15750 34000 + 16000 13000 35500 7000 2500>; + qcom,mdss-dsi-panel-peak-brightness = <5000000>; + qcom,mdss-dsi-panel-blackness-level = <100>;*/ + + qcom,dsi-select-clocks = "mux_byte_clk0", "mux_pixel_clk0"; + + qcom,mdss-dsi-display-timings { + timing@0 { + //qcom,mdss-dsi-panel-clockrate = <320000000>; + qcom,display-topology = <1 1 1>; + qcom,default-topology-index = <0>; + qcom,mdss-dsi-panel-phy-drive-strength = <255>; + qcom,mdss-dsi-panel-phy-timings = [00 0D 03 03 10 1D 04 + 03 02 02 04 00 0C 08]; + }; + timing@1 { + //qcom,mdss-dsi-panel-clockrate = <400000000>; + qcom,display-topology = <1 1 1>; + qcom,default-topology-index = <0>; + qcom,mdss-dsi-panel-phy-drive-strength = <255>; + qcom,mdss-dsi-panel-phy-timings = [00 10 03 03 11 1E 04 + 04 03 02 04 00 0E 08]; + }; + timing@2 { + //qcom,mdss-dsi-panel-clockrate = <601000000>; + qcom,display-topology = <1 1 1>; + qcom,default-topology-index = <0>; + qcom,mdss-dsi-panel-phy-drive-strength = <255>; + qcom,mdss-dsi-panel-phy-timings = [00 16 05 05 14 1F 06 + 06 06 02 04 00 13 0A]; + }; + timing@3 { + //qcom,mdss-dsi-panel-clockrate = <801000000>; + qcom,display-topology = <1 1 1>; + qcom,default-topology-index = <0>; + qcom,mdss-dsi-panel-phy-drive-strength = <255>; + qcom,mdss-dsi-panel-phy-timings = [00 1C 07 07 17 15 07 + 07 08 02 04 00 18 0C]; + }; + /*timing@4 { + //qcom,mdss-dsi-panel-clockrate = <961000000>; + qcom,display-topology = <1 1 1>; + qcom,default-topology-index = <0>; + qcom,mdss-dsi-panel-phy-drive-strength = <255>; + qcom,mdss-dsi-panel-phy-timings = [00 21 08 08 19 17 08 + 08 09 02 04 00 1C 0D]; + };*/ + }; +}; + +&mot_dummy_vid_qhd { + qcom,platform-te-gpio = <&tlmm 23 0>; + qcom,platform-reset-gpio = <&pmr735a_gpios 2 0>; + + qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_dummy"; + + qcom,dsi-select-clocks = "mux_byte_clk0", "mux_pixel_clk0"; + + qcom,mdss-dsi-display-timings { + timing@0 { + qcom,mdss-dsi-panel-phy-timings = [00 0B 02 02 1C 1C 03 + 02 01 02 04 00 0C 12]; + qcom,display-topology = <1 0 1>; + qcom,default-topology-index = <0>; + }; + }; +}; + diff --git a/qcom/rhodei-fps-overlay.dtsi b/qcom/rhodei-fps-overlay.dtsi new file mode 100644 index 000000000000..a6d68b415f87 --- /dev/null +++ b/qcom/rhodei-fps-overlay.dtsi @@ -0,0 +1,182 @@ +&tlmm { + ets_irq_active: egis_irq_active { + /* INTERRUPT */ + mux { + pins = "gpio17"; + function = "gpio"; + }; + + config { + pins = "gpio17"; + drive-strength = <2>; /* 2 MA */ + input-enable; + }; + }; + + ets_rst_high: ets_rst_high { + /* INTERRUPT */ + mux { + pins = "gpio18"; + function = "gpio"; + }; + + config { + pins = "gpio18"; + drive-strength = <2>; /* 2 MA */ + output-high; + }; + }; + + ets_rst_low: ets_rst_low { + /* INTERRUPT */ + mux { + pins = "gpio18"; + function = "gpio"; + }; + + config { + pins = "gpio18"; + drive-strength = <2>; /* 2 MA */ + output-low; + }; + }; + + ets_vcc_high: ets_vcc_high { + /* INTERRUPT */ + mux { + pins = "gpio6"; + function = "gpio"; + }; + + config { + pins = "gpio6"; + drive-strength = <2>; /* 2 MA */ + output-high; + }; + }; + + ets_vcc_low: ets_vcc_low { + /* INTERRUPT */ + mux { + pins = "gpio6"; + function = "gpio"; + }; + + config { + pins = "gpio6"; + drive-strength = <2>; /* 2 MA */ + output-low; + }; + }; + + ft_power_high: ft_power_high { + mux { + pins = "gpio6"; + function = "gpio"; + }; + + config { + pins = "gpio6"; + drive-strength = <2>; + bias-disable; + output-high; + }; + }; + + ft_power_low: ft_power_low { + mux { + pins = "gpio6"; + function = "gpio"; + }; + + config { + pins = "gpio6"; + drive-strength = <2>; + bias-disable; + output-low; + }; + }; + + ft_eint_as_int: ft_eint_as_int { + mux { + pins = "gpio17"; + function = "gpio"; + }; + + config { + pins = "gpio17"; + drive-strength = <2>; + bias-disable; + input-enable; + }; + }; + + ft_reset_high: ft_reset_high { + mux { + pins = "gpio18"; + function = "gpio"; + }; + + config { + pins = "gpio18"; + drive-strength = <2>; + bias-disable; + output-high; + }; + }; + + ft_reset_low: ft_reset_low { + mux { + pins = "gpio18"; + function = "gpio"; + }; + + config { + pins = "gpio18"; + drive-strength = <2>; + bias-disable; + output-low; + }; + }; +}; + +&soc { + et528: et528 { + compatible = "fp-egistec"; + status = "ok"; + reg = <0>; + interrupt-parent = <&tlmm>; + interrupts = <17 0x0>; + fp-ctrl-power; + fp-gpio-vcc-enable; + egistec,gpio_vcc_en = <&tlmm 6 0x0>; + egistec,gpio_irq = <&tlmm 17 0x0>; + egistec,gpio_reset = <&tlmm 18 0x0>; + pinctrl-names = "egis_rst_high", "egis_rst_low", "egis_irq_active", + "egis_vcc_high", "egis_vcc_low"; + pinctrl-0 = <&ets_rst_high>; + pinctrl-1 = <&ets_rst_low>; + pinctrl-2 = <&ets_irq_active>; + pinctrl-3 = <&ets_vcc_high>; + pinctrl-4 = <&ets_vcc_low>; + }; + + ft9362: ft9362 { + status = "ok"; + compatible = "focaltech,fingerprint"; + interrupt-parent = <&tlmm>; + interrupts = <17 0x0>; + fp,reset_gpio = <&tlmm 18 0>; + fp,irq_gpio = <&tlmm 17 0>; + fp,vdd_gpio = <&tlmm 6 0>; + + pinctrl-names = "fpsensor_finger_power_high","fpsensor_finger_power_low", + "fpsensor_finger_rst_low","fpsensor_finger_rst_high", + "fpsensor_eint_as_int"; + pinctrl-0 = <&ft_power_high>; + pinctrl-1 = <&ft_power_low>; + pinctrl-2 = <&ft_reset_low>; + pinctrl-3 = <&ft_reset_high>; + pinctrl-4 = <&ft_eint_as_int>; + }; +}; diff --git a/qcom/rhodei-touchscreen.dtsi b/qcom/rhodei-touchscreen.dtsi new file mode 100755 index 000000000000..adabc15c907d --- /dev/null +++ b/qcom/rhodei-touchscreen.dtsi @@ -0,0 +1,104 @@ +/* + * Copyright (c) 2019, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +&qupv3_se0_i2c { + status = "disabled"; +}; + +&qupv3_se0_spi_pins { + qupv3_se0_spi_active: qupv3_se0_spi_active { + mux { + pins = "gpio0", "gpio1", "gpio2"; + function = "qup00"; + }; + + config { + pins = "gpio0", "gpio1", "gpio2"; + drive-strength = <10>; + bias-disable; + }; + }; + + qupv3_se0_spi_sleep: qupv3_se0_spi_sleep { + mux { + pins = "gpio0", "gpio1", "gpio2"; + function = "gpio"; + }; + + config { + pins = "gpio0", "gpio1", "gpio2"; + drive-strength = <10>; + bias-disable; + }; + }; + + qupv3_se0_spi_cs_active: qupv3_se0_spi_cs_active { + mux { + pins = "gpio3"; + function = "qup00"; + }; + + config { + pins = "gpio3"; + drive-strength = <10>; + bias-disable; + }; + }; + + qupv3_se0_spi_cs_sleep: qupv3_se0_spi_cs_sleep { + mux { + pins = "gpio3"; + function = "gpio"; + }; + + config { + pins = "gpio3"; + drive-strength = <10>; + bias-pull-up; + }; + }; +}; + +&qupv3_se0_spi { + status = "ok"; + pinctrl-0 = <&qupv3_se0_spi_active &qupv3_se0_spi_cs_active>; + pinctrl-1 = <&qupv3_se0_spi_sleep &qupv3_se0_spi_cs_sleep>; + + goodix_ts_spi@0 { + status = "ok"; + compatible = "goodix,gt9916S"; + reg = <0x0>; + mmi,status = "/chosen","mmi,panel_name","contains","nt37701"; + spi-max-frequency = <9600000>; /* 4800000,9600000,15000000,19200000 */ + goodix,reset-gpio = <&tlmm 21 0x0>; + goodix,irq-gpio = <&tlmm 22 0x2002>; + goodix,avdd-gpio = <&tlmm 92 0x0>; + goodix,irq-flags = <0x2002>; /* 1:trigger rising, 2:trigger falling;*/ + goodix,panel-max-id = <10>; + goodix,panel-max-x = <1080>; + goodix,panel-max-y = <2400>; + goodix,panel-max-w = <255>; + goodix,panel-max-p = <4096>; + panel = <&mot_csot_nt37701_655_1080x2400_dsc_cmd_v0 + &mot_csot_nt37701_655_1080x2400_dsc_cmd_v1 + &mot_tm_nt37701_655_1080x2400_dsc_cmd_v1 + &mot_tm_nt37701_655_1080x2400_dsc_cmd_v0>; + pinctrl-names = "pmx_ts_active", "pmx_ts_suspend", "pmx_ts_release"; + pinctrl-0 = <&ts_active>; + pinctrl-1 = <&ts_int_suspend &ts_reset_suspend>; + pinctrl-2 = <&pmx_ts_release>; + mmi,power-off-suspend; + mmi,enable-gestures; + mmi,usb-charger-detection; + }; +}; diff --git a/qcom/rhodei-wl2868c.dtsi b/qcom/rhodei-wl2868c.dtsi new file mode 100644 index 000000000000..c2ed59b88da4 --- /dev/null +++ b/qcom/rhodei-wl2868c.dtsi @@ -0,0 +1,71 @@ +&tlmm{ + pmic_en_default: pmic_en_default { + mux { + pins = "gpio33"; + function = "gpio"; + }; + config { + pins = "gpio33"; + drive-strength = <2>; + bias-pull-up; + output-high; + }; + }; +}; + +&qupv3_se7_i2c { + status = "ok"; + + cam_pmic: wl2868c@2F{ + compatible = "semi,wl2868c"; + reg = <0x2F>; + semi,cs-gpios = <&tlmm 33 1>; + pinctrl-names = "default"; + pinctrl-0 = <&pmic_en_default>; + vin1-supply = <&S6A>; + + regulators { + cam_pmic_ldo1: ldo1 { + regulator-name = "ldo1"; + regulator-min-microvolt = <600000>; + regulator-max-microvolt = <1800000>; + }; + + cam_pmic_ldo2: ldo2 { + regulator-name = "ldo2"; + regulator-min-microvolt = <600000>; + regulator-max-microvolt = <1800000>; + }; + + cam_pmic_ldo3: ldo3 { + regulator-name = "ldo3"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <4300000>; + }; + + cam_pmic_ldo4: ldo4 { + regulator-name = "ldo4"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <4300000>; + }; + + cam_pmic_ldo5: ldo5 { + regulator-name = "ldo5"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <4300000>; + }; + + cam_pmic_ldo6: ldo6 { + regulator-name = "ldo6"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <4300000>; + }; + + cam_pmic_ldo7: ldo7 { + regulator-name = "ldo7"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <4300000>; + }; + }; + }; +};