From c58b999f3bb2f475547251b4f926af5081d53cc5 Mon Sep 17 00:00:00 2001 From: gaoyx9 Date: Tue, 19 Oct 2021 11:27:18 +0800 Subject: [PATCH] arm64/dt: initial rhodep dts files initial dts files cloned from milanf Change-Id: I1ede668cc2b0f1f557c3f6d2c81ed0f8678d3f62 Reviewed-on: https://gerrit.mot.com/2092928 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: gaoyx9 Submit-Approved: gaoyx9 Tested-by: gaoyx9 Reviewed-by: Huosheng Liao --- qcom/Makefile | 10 + qcom/blair-nopmi-rhodep-common-overlay.dtsi | 36 ++ qcom/blair-pm6125-rhodep-common-overlay.dtsi | 21 + qcom/blair-rhodep-common-overlay.dtsi | 450 +++++++++++++++++++ qcom/blair-rhodep-dvt1-overlay.dts | 24 + qcom/blair-rhodep-evb1-overlay.dts | 24 + qcom/blair-rhodep-evb2-overlay.dts | 24 + qcom/rhodep-display.dtsi | 232 ++++++++++ qcom/rhodep-fps-overlay.dtsi | 164 +++++++ qcom/rhodep-sensors.dtsi | 51 +++ qcom/rhodep-touchscreen.dtsi | 91 ++++ qcom/rhodep-wl286xx.dtsi | 70 +++ 12 files changed, 1197 insertions(+) create mode 100644 qcom/blair-nopmi-rhodep-common-overlay.dtsi create mode 100644 qcom/blair-pm6125-rhodep-common-overlay.dtsi create mode 100644 qcom/blair-rhodep-common-overlay.dtsi create mode 100644 qcom/blair-rhodep-dvt1-overlay.dts create mode 100644 qcom/blair-rhodep-evb1-overlay.dts create mode 100644 qcom/blair-rhodep-evb2-overlay.dts create mode 100644 qcom/rhodep-display.dtsi create mode 100644 qcom/rhodep-fps-overlay.dtsi create mode 100755 qcom/rhodep-sensors.dtsi create mode 100755 qcom/rhodep-touchscreen.dtsi create mode 100644 qcom/rhodep-wl286xx.dtsi diff --git a/qcom/Makefile b/qcom/Makefile index b7d508d389f8..8f6252b9e453 100644 --- a/qcom/Makefile +++ b/qcom/Makefile @@ -91,6 +91,16 @@ blair-milanf-evb1-overlay.dtbo-base := blair-moto-base.dtb blair-milanf-evb2-overlay.dtbo-base := blair-moto-base.dtb blair-milanf-dvt1-overlay.dtbo-base := blair-moto-base.dtb +dtbo-$(CONFIG_RHODEP_DTB) += \ + blair-rhodep-evb1-overlay.dtbo \ + blair-rhodep-evb2-overlay.dtbo \ + blair-rhodep-dvt1-overlay.dtbo + +blair-rhodep-evb1-overlay.dtbo-base := blair-moto-base.dtb +blair-rhodep-evb2-overlay.dtbo-base := blair-moto-base.dtb +blair-rhodep-dvt1-overlay.dtbo-base := blair-moto-base.dtb + + else ifneq ($(CONFIG_ARCH_QTI_VM), y) ifeq ($(CONFIG_BUILD_ARM64_DT_OVERLAY),y) diff --git a/qcom/blair-nopmi-rhodep-common-overlay.dtsi b/qcom/blair-nopmi-rhodep-common-overlay.dtsi new file mode 100644 index 000000000000..375110d2af50 --- /dev/null +++ b/qcom/blair-nopmi-rhodep-common-overlay.dtsi @@ -0,0 +1,36 @@ +/* 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-rhodep-common-overlay.dtsi" +#include "blair-nopmi-moto-common-overlay.dtsi" +#include "tcpc_config.dtsi" +#include "sgm7220.dtsi" +#include "rt9426a.dtsi" +#include "discrete_charging.dtsi" + +&usb0 { + qcom,force-adb-enable; +}; + + +&qupv3_se8_i2c { + status = "okay"; + cw2217@64 { + compatible = "cellwise,cw2217"; + reg = <0x64>; + status = "okay"; + + df-serialnum = "SB18D33989"; + #include "bat_setting/CW_md50-scud-5000mah.dtsi" + #include "bat_setting/CW_md50-amperex-5000mah.dtsi" + }; +}; + diff --git a/qcom/blair-pm6125-rhodep-common-overlay.dtsi b/qcom/blair-pm6125-rhodep-common-overlay.dtsi new file mode 100644 index 000000000000..e0bc0a29bae0 --- /dev/null +++ b/qcom/blair-pm6125-rhodep-common-overlay.dtsi @@ -0,0 +1,21 @@ +/* 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-rhodep-common-overlay.dtsi" +#include "blair-pm6125-moto-common-overlay.dtsi" + +&pm7250b_charger { + dpdm-supply = <&usb2_phy0>; +}; + +&smb1394 { + status = "disabled"; +}; diff --git a/qcom/blair-rhodep-common-overlay.dtsi b/qcom/blair-rhodep-common-overlay.dtsi new file mode 100644 index 000000000000..458d113c8c74 --- /dev/null +++ b/qcom/blair-rhodep-common-overlay.dtsi @@ -0,0 +1,450 @@ +/* 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 "holi-audio-wcd9370-aw882xx-acf-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 "rhodep-fps-overlay.dtsi" +#include "rhodep-display.dtsi" +#include "rhodep-touchscreen.dtsi" +#include "rhodep-sensors.dtsi" +#include "camera/blair-camera-sensor-mot-rhodep-overlay.dtsi" +#include "rhodep-wl286xx.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 = "gpio6"; + function = "gpio"; + }; + + config { + pins = "gpio6"; + drive-strength = <2>; /* 2 MA */ + bias-disable; + }; + }; + + nfc_enable_suspend: nfc_enable_suspend { + mux { + pins = "gpio6"; + function = "gpio"; + }; + + config { + pins = "gpio6"; + 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"; +}; + +&pmk8350_vadc { + pmk8350_qtm_n_therm { + reg = ; + label = "pmk8350_qtm_n_therm"; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + qcom,pre-scaling = <1 1>; + }; + pmk8350_qtm_e_therm { + reg = ; + label = "pmk8350_qtm_e_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>; + + qtm_n__therm { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; + qtm_e_therm { + reg = ; + qcom,ratiometric; + qcom,hw-settle-time = <200>; + }; +}; + +&qupv3_se7_i2c { + status = "ok"; + #address-cells = <1>; + #size-cells = <0>; + st21nfc@8 { + compatible = "st,st21nfc"; + mmi,status = "/chosen", "mmi,nfc", "st"; + status = "ok"; + reg = <0x08>; + st,irq_gpio = <&tlmm 9 0x00>; + st,reset_gpio = <&tlmm 6 0x00>; + st,clkreq_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>; + }; +}; + +&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"; + }; + 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"; + }; + }; + }; + + chg_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_therm2 { + 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_therm1 { + 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"; + }; + + active-config1 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + + xo_therm { + polling-delay-passive = <0>; + polling-delay = <0>; + thermal-governor = "user_space"; + thermal-sensors = <&pmk8350_adc_tm PMK8350_ADC7_AMUX_THM1_100K_PU>; + wake-capable-sensor; + trips { + active-config0 { + temperature = <125000>; + hysteresis = <1000>; + type = "passive"; + }; + }; + }; + qtm_n_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"; + }; + }; + }; + + qtm_e_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"; + }; + }; + }; +}; + +&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-rhodep-dvt1-overlay.dts b/qcom/blair-rhodep-dvt1-overlay.dts new file mode 100644 index 000000000000..888b505195b2 --- /dev/null +++ b/qcom/blair-rhodep-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-nopmi-rhodep-common-overlay.dtsi" + +/ { + model = "rhodep"; + compatible = "qcom,blair-rhodep", "qcom,blair-moto", "qcom,blair"; + qcom,msm-id = <507 0x10000>; + qcom,board-id = <0x49 0xB100>; +}; + diff --git a/qcom/blair-rhodep-evb1-overlay.dts b/qcom/blair-rhodep-evb1-overlay.dts new file mode 100644 index 000000000000..5a2b1da5c7ef --- /dev/null +++ b/qcom/blair-rhodep-evb1-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-pm6125-rhodep-common-overlay.dtsi" + +/ { + model = "rhodep"; + compatible = "qcom,blair-rhodep", "qcom,blair-moto", "qcom,blair"; + qcom,msm-id = <507 0x10000>; + qcom,board-id = <0x49 0xA100>; +}; + diff --git a/qcom/blair-rhodep-evb2-overlay.dts b/qcom/blair-rhodep-evb2-overlay.dts new file mode 100644 index 000000000000..a034d114bb21 --- /dev/null +++ b/qcom/blair-rhodep-evb2-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-nopmi-rhodep-common-overlay.dtsi" + +/ { + model = "rhodep"; + compatible = "qcom,blair-rhodep", "qcom,blair-moto", "qcom,blair"; + qcom,msm-id = <507 0x10000>; + qcom,board-id = <0x49 0xA200>; +}; + diff --git a/qcom/rhodep-display.dtsi b/qcom/rhodep-display.dtsi new file mode 100644 index 000000000000..f0fe93701d03 --- /dev/null +++ b/qcom/rhodep-display.dtsi @@ -0,0 +1,232 @@ +#include "dsi-panel-mot-dummy-qhd-video.dtsi" +#include "dsi-panel-mot-tm-nt36672e-678-1080x2460-video.dtsi" + +&display_panel_avdd { + /delete-property/ gpio; + /delete-property/ pinctrl-0; +}; + + +&tlmm { + lcd_bias_vsp_en_default: lcd_bias_vsp_en_default { + mux { + pins = "gpio85"; + function = "gpio"; + }; + + config { + pins = "gpio85"; + drive-strength = <8>; + bias-disable = <0>; + output-high; + }; + }; + + lcd_bias_vsn_en_default: lcd_bias_vsn_en_default { + mux { + pins = "gpio86"; + function = "gpio"; + }; + + config { + pins = "gpio86"; + drive-strength = <8>; + bias-disable = <0>; + output-high; + }; + }; +}; + +&soc { + lcd_panel_avdd: lcd_gpio_regulator@1 { + compatible = "qti-regulator-fixed"; + regulator-name = "lcd_panel_avdd"; + regulator-min-microvolt = <5500000>; + regulator-max-microvolt = <5500000>; + regulator-enable-ramp-delay = <233>; + gpio = <&tlmm 85 0>; + enable-active-high; + regulator-boot-on; + proxy-supply = <&lcd_panel_avdd>; + pinctrl-names = "default"; + pinctrl-0 = <&lcd_bias_vsp_en_default>; + }; + + lcd_panel_avee: lcd_gpio_regulator@2 { + compatible = "qti-regulator-fixed"; + regulator-name = "lcd_panel_avee"; + regulator-min-microvolt = <5500000>; + regulator-max-microvolt = <5500000>; + regulator-enable-ramp-delay = <233>; + gpio = <&tlmm 86 0>; + enable-active-high; + regulator-boot-on; + proxy-supply = <&lcd_panel_avee>; + pinctrl-names = "default"; + pinctrl-0 = <&lcd_bias_vsn_en_default>; + }; + + dsi_panel_pwr_supply_ext_bias: dsi_panel_pwr_supply_ext_bias { + #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 = <62000>; + qcom,supply-disable-load = <80>; + }; + + qcom,panel-supply-entry@1 { + reg = <1>; + qcom,supply-name = "lab"; + qcom,supply-min-voltage = <5500000>; + qcom,supply-max-voltage = <6000000>; + qcom,supply-enable-load = <100000>; + qcom,supply-disable-load = <100>; + }; + + qcom,panel-supply-entry@2 { + reg = <2>; + qcom,supply-name = "ibb"; + qcom,supply-min-voltage = <5500000>; + qcom,supply-max-voltage = <6000000>; + qcom,supply-enable-load = <100000>; + qcom,supply-disable-load = <100>; + qcom,supply-post-on-sleep = <10>; + }; + }; +}; + +&sde_dsi { + /delete-property/ lab-supply; + /delete-property/ ibb-supply; + /delete-property/ vddio-supply; + /delete-property/ qcom,dsi-default-panel; + /delete-property/ avdd-supply; + + vddio-supply = <&L13A>; + lab-supply = <&lcd_panel_avdd>; + ibb-supply = <&lcd_panel_avee>; + + qcom,dsi-default-panel = <&dsi_nt36672e_fhd_plus_144_video>; +}; + +&dsi_tm_nt36672e_678_fhdp_120_video { + qcom,platform-te-gpio = <&tlmm 23 0>; + qcom,platform-reset-gpio = <&pmr735a_gpios 2 0>; + + qcom,panel-supply-entries = <&dsi_panel_pwr_supply_ext_bias>; + + qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_i2c"; + qcom,mdss-dsi-bl-min-level = <1>; + qcom,mdss-dsi-bl-max-level = <2047>; + qcom,mdss-dsi-bl-default-level = <1024>; + qcom,mdss-brightness-max-level = <2047>; + + qcom,dsi-supported-dfps-list = <120 90 60>; + qcom,mdss-dsi-pan-enable-dynamic-fps; + qcom,mdss-dsi-pan-fps-update = "dfps_immediate_porch_mode_vfp"; + + qcom,esd-check-enabled; + qcom,mdss-dsi-panel-status-check-mode = "reg_read"; + 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,mdss-dsi-no-panel-on-read-support; + qcom,mdss-dsi-panel-supplier = "tm"; + + qcom,tp_state_check_enable; + + qcom,mdss-dsi-hbm-on-command = [39 01 00 00 00 00 02 51 FF]; + qcom,mdss-dsi-hbm-on-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-hbm-off-command = [39 01 00 00 00 00 02 51 CC]; + qcom,mdss-dsi-hbm-off-command-state = "dsi_lp_mode"; + qcom,mdss-dsi-hbm-type = "lcd-dcs-wled"; + + qcom,dsi-select-clocks = "mux_byte_clk0", "mux_pixel_clk0"; + + qcom,mdss-dsi-display-timings { + timing@0 { + qcom,mdss-dsi-panel-clockrate = <900000000>; + qcom,mdss-dsi-panel-phy-timings = [00 1A 07 06 22 21 07 + 07 07 02 04 00 1A 0C]; + qcom,display-topology = <1 1 1>; + qcom,default-topology-index = <0>; + }; + }; +}; + +&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>; + }; + }; +}; + + +&qupv3_se10_i2c { + status = "ok"; + + lcd_backlight@36 { + compatible = "awinic,aw99703-bl","ti,lm3697"; + reg = <0x36>; + + /* Awinic, aw99703 */ + aw99703,hwen-gpio = <&tlmm 13 0>; + aw99703,bl-map = <3>; /* brightness map level 1:256,2:1024,3:2048 */ + aw99703,using-lsb; + aw99703,ovp-level = <2>; /* 31V */ + aw99703,ocp-level = <1>; /* 1.8A */ + aw99703,switch-freq = <1>; /* 1000kHz(default) */ + aw99703,auto-freq-high = <0x10>; + aw99703,auto-freq-low = <0x05>; + aw99703,bl-fscal-led = <0x19>; /* 24.8mA */ + aw99703,bl-channel = <3>; + aw99703,turn-on-ramp = <0x09>; /* 256ms */ + aw99703,turn-off-ramp = <0x04>; /* 8ms */ + aw99703,pwm-trans-dim = <0>; /* 2ms */ + aw99703,i2c-trans-dim = <0x07>; /* 512ms */ + aw99703,pwm-mode = <1>; /* 1 pwm enable,0 PWM disable */ + aw99703,map-type = <1>; /* linear */ + aw99703,work-mode = <1>; /* backlight */ + + /* TI, lm3697*/ + enable-gpios = <&tlmm 13 0>; + backlight { + compatible = "ti,lm3697-backlight"; + lcd { + led-sources = <0 1 2>; + ramp-up-msec = <200>; + ramp-down-msec = <200>; + pwm-period = <0>; + current-mode = <2>; /*2: 25mA*/ + boost-ovp = <2>; /*0:16v 1:24v 2:32v 3:40v*/ + boost-freq = <1>; /*0:500Khz 1:1Mhz*/ + default-brightness-level = <255>; + }; + }; + }; +}; + +&qupv3_se10_i2c_sleep { + config { + /delete-property/ bias-disable; + bias-pull-up; + input-enable; + }; +}; diff --git a/qcom/rhodep-fps-overlay.dtsi b/qcom/rhodep-fps-overlay.dtsi new file mode 100644 index 000000000000..364d5a440a08 --- /dev/null +++ b/qcom/rhodep-fps-overlay.dtsi @@ -0,0 +1,164 @@ +&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 = "gpio38"; + function = "gpio"; + }; + + config { + pins = "gpio38"; + drive-strength = <2>; /* 2 MA */ + output-high; + }; + }; + + ets_vcc_low: ets_vcc_low { + /* INTERRUPT */ + mux { + pins = "gpio38"; + function = "gpio"; + }; + + config { + pins = "gpio38"; + drive-strength = <2>; /* 2 MA */ + output-low; + }; + }; + + fps_rst_active: fps_rst_active { + /* active state */ + mux { + pins = "gpio18"; + function = "gpio"; + }; + + config { + pins = "gpio18"; + drive-strength = <2>; /* 2 MA */ + output-low; + }; + }; + + fps_rst_suspend: fps_rst_suspend { + /* sleep state */ + mux { + pins = "gpio18"; + function = "gpio"; + }; + + config { + pins = "gpio18"; + drive-strength = <2>; /* 2 MA */ + }; + }; + + fps_int_active: fps_int_active { + /* active state */ + mux { + pins = "gpio17"; + function = "gpio"; + }; + + config { + pins = "gpio17"; + drive-strength = <2>; /* 2 MA */ + bias-disable; + input-enable; + }; + }; + + fps_int_suspend: fps_int_suspend { + /* sleep state */ + mux { + pins = "gpio17"; + function = "gpio"; + }; + + config { + pins = "gpio17"; + drive-strength = <2>; /* 2 MA */ + bias-disable; + input-enable; + }; + }; +}; + +&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 38 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>; + }; + + silead: silead { + compatible = "sil,silead_fp"; + status = "ok"; + reg = <0>; + interrupt-parent = <&tlmm>; + interrupts = <17 0x0>; + avdd-gpios = <&tlmm 38 0x0>; + irq-gpios = <&tlmm 17 0x0>; + rst-gpios = <&tlmm 18 0x0>; + pinctrl-names = "default", "suspend"; + pinctrl-0 = <&fps_rst_active &fps_int_active>; + pinctrl-1 = <&fps_rst_suspend &fps_int_suspend>; + }; +}; diff --git a/qcom/rhodep-sensors.dtsi b/qcom/rhodep-sensors.dtsi new file mode 100755 index 000000000000..f3426b6eb2ab --- /dev/null +++ b/qcom/rhodep-sensors.dtsi @@ -0,0 +1,51 @@ +/* + * 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. + */ + +&tlmm { + pen_int_default: pen_int_default { + mux { + pins = "gpio84"; + function = "gpio"; + }; + config { + pins = "gpio84"; + num-grp-pins = <1>; + drive-strength = <2>; + bias-no-pull; + }; + }; + + pen_int_sleep: pen_int_sleep { + mux { + pins = "gpio84"; + function = "gpio"; + }; + config { + pins = "gpio84"; + num-grp-pins = <1>; + drive-strength = <2>; + bias-no-pull; + }; + }; +}; + +&soc { + pen_detect{ + compatible = "rohm,bu520xx_pen_detect"; + pinctrl-names = "default","sleep"; + pinctrl-0 = <&pen_int_default>; + pinctrl-1 = <&pen_int_sleep>; + rohm,nirq-gpio=<&tlmm 84 0x02>; + }; +}; + diff --git a/qcom/rhodep-touchscreen.dtsi b/qcom/rhodep-touchscreen.dtsi new file mode 100755 index 000000000000..b384e8cb0171 --- /dev/null +++ b/qcom/rhodep-touchscreen.dtsi @@ -0,0 +1,91 @@ +/* + * 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 = <6>; + bias-disable; + }; + }; + + qupv3_se0_spi_sleep: qupv3_se0_spi_sleep { + mux { + pins = "gpio0", "gpio1", "gpio2"; + function = "gpio"; + }; + + config { + pins = "gpio0", "gpio1", "gpio2"; + drive-strength = <6>; + bias-disable; + }; + }; + + qupv3_se0_spi_cs_active: qupv3_se0_spi_cs_active { + mux { + pins = "gpio3"; + function = "qup00"; + }; + + config { + pins = "gpio3"; + drive-strength = <6>; + bias-disable; + }; + }; + + qupv3_se0_spi_cs_sleep: qupv3_se0_spi_cs_sleep { + mux { + pins = "gpio3"; + function = "gpio"; + }; + + config { + pins = "gpio3"; + drive-strength = <6>; + 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>; + novatek@0{ + compatible = "novatek,NVT-ts-spi"; + reg = <0x0>; + spi-max-frequency = <9600000>; /* 4800000,9600000,15000000,19200000 */ + novatek,reset-gpio = <&tlmm 21 0x00>; + novatek,irq-gpio = <&tlmm 22 0x2001>; + novatek,def-max-resolution = <1080 2460>; + novatek,swrst-n8-addr = <0x03F0FE>; + novatek,spi-rd-fast-addr = <0x03F310>; + novatek,report_gesture_key; + novatek,usb_charger; + panel = <&dsi_tm_nt36672e_678_fhdp_120_video>; + status = "ok"; + }; + +}; diff --git a/qcom/rhodep-wl286xx.dtsi b/qcom/rhodep-wl286xx.dtsi new file mode 100644 index 000000000000..4327781f6b12 --- /dev/null +++ b/qcom/rhodep-wl286xx.dtsi @@ -0,0 +1,70 @@ +&tlmm{ + pmic1_en_default: pmic1_en_default { + mux { + pins = "gpio33"; + function = "gpio"; + }; + config { + pins = "gpio33"; + drive-strength = <2>; + bias-pull-down; + }; + }; +}; + +&qupv3_se10_i2c { + status = "ok"; + + cam_pmic1: wl2864c@29{ + compatible = "semi,wl2864c"; + reg = <0x29>; + semi,cs-gpios = <&tlmm 33 0>; + pinctrl-names = "default"; + pinctrl-0 = <&pmic1_en_default>; + vin1-supply = <&S6A>; + + regulators { + cam_pmic1_ldo1_dvdd1: ldo1 { + regulator-name = "ldo1"; + regulator-min-microvolt = <600000>; + regulator-max-microvolt = <1800000>; + }; + + cam_pmic1_ldo2_dvdd2: ldo2 { + regulator-name = "ldo2"; + regulator-min-microvolt = <600000>; + regulator-max-microvolt = <1800000>; + }; + + cam_pmic1_ldo3_avdd1: ldo3 { + regulator-name = "ldo3"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <4300000>; + }; + + cam_pmic1_ldo4_avdd2: ldo4 { + regulator-name = "ldo4"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <4300000>; + }; + + cam_pmic1_ldo5_vddaf: ldo5 { + regulator-name = "ldo5"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <4300000>; + }; + + cam_pmic1_ldo6_vddois: ldo6 { + regulator-name = "ldo6"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <4300000>; + }; + + cam_pmic1_ldo7_vddio: ldo7 { + regulator-name = "ldo7"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <4300000>; + }; + }; + }; +};