| /* Copyright (c) 2017-2018, 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 <dt-bindings/clock/qcom,rpmh.h> |
| #include <dt-bindings/gpio/gpio.h> |
| #include "sdm670-camera-sensor-qrd.dtsi" |
| #include "sdm670-pmic-overlay.dtsi" |
| #include "sdm670-sde-display.dtsi" |
| |
| &qupv3_se10_i2c { |
| #include "smb1355.dtsi" |
| }; |
| |
| &qupv3_se9_2uart { |
| status = "disabled"; |
| }; |
| |
| &qupv3_se12_2uart { |
| status = "ok"; |
| }; |
| |
| &qupv3_se8_spi { |
| status = "disabled"; |
| }; |
| |
| &qupv3_se3_i2c { |
| status = "ok"; |
| nq@28 { |
| compatible = "qcom,nq-nci"; |
| reg = <0x28>; |
| qcom,nq-irq = <&tlmm 44 0x00>; |
| qcom,nq-ven = <&tlmm 12 0x00>; |
| qcom,nq-firm = <&tlmm 43 0x00>; |
| qcom,nq-clkreq = <&pm660_gpios 4 0x00>; |
| qcom,nq-esepwr = <&tlmm 116 0x00>; |
| interrupt-parent = <&tlmm>; |
| qcom,clk-src = "BBCLK3"; |
| interrupts = <44 0>; |
| interrupt-names = "nfc_irq"; |
| pinctrl-names = "nfc_active", "nfc_suspend"; |
| pinctrl-0 = <&nfc_int_active |
| &nfc_enable_active |
| &nfc_clk_default>; |
| pinctrl-1 = <&nfc_int_suspend &nfc_enable_suspend>; |
| clocks = <&clock_rpmh RPMH_LN_BB_CLK3>; |
| clock-names = "ref_clk"; |
| }; |
| }; |
| |
| &qupv3_se10_i2c { |
| status = "ok"; |
| }; |
| |
| &qupv3_se6_4uart { |
| status = "ok"; |
| }; |
| |
| &vendor { |
| qrd_batterydata: qcom,battery-data { |
| qcom,batt-id-range-pct = <15>; |
| #include "fg-gen3-batterydata-mlp356477-2800mah.dtsi" |
| }; |
| }; |
| |
| &eud { |
| vdda33-supply = <&pm660l_l7>; |
| }; |
| |
| &pm660_fg { |
| qcom,battery-data = <&qrd_batterydata>; |
| qcom,fg-bmd-en-delay-ms = <300>; |
| qcom,fg-jeita-thresholds = <0 15 45 55>; |
| }; |
| |
| &pm660_charger { |
| qcom,thermal-mitigation = <4200000 3500000 3000000 2500000 |
| 2000000 1500000 1000000 500000>; |
| qcom,battery-data = <&qrd_batterydata>; |
| qcom,sw-jeita-enable; |
| }; |
| |
| &tlmm { |
| smb_int_default: smb_int_default { |
| mux { |
| pins = "gpio54"; |
| function = "gpio"; |
| }; |
| config { |
| pins = "gpio54"; |
| drive-strength = <2>; |
| bias-pull-up; |
| input-enable; |
| }; |
| }; |
| }; |
| |
| &smb1355_0 { |
| pinctrl-names = "default"; |
| pinctrl-0 = <&smb_int_default |
| &smb_shutdown_default>; |
| interrupt-parent = <&tlmm>; |
| interrupts = <54 IRQ_TYPE_LEVEL_LOW>; |
| smb1355_charger_0: qcom,smb1355-charger@1000 { |
| io-channels = <&pm660_rradc 2>, |
| <&pm660_rradc 12>; |
| io-channel-names = "charger_temp", |
| "charger_temp_max"; |
| status = "ok"; |
| }; |
| }; |
| |
| &smb1355_1 { |
| pinctrl-names = "default"; |
| pinctrl-0 = <&smb_int_default |
| &smb_shutdown_default>; |
| interrupt-parent = <&tlmm>; |
| interrupts = <54 IRQ_TYPE_LEVEL_LOW>; |
| smb1355_charger_1: qcom,smb1355-charger@1000 { |
| io-channels = <&pm660_rradc 2>, |
| <&pm660_rradc 12>; |
| io-channel-names = "charger_temp", |
| "charger_temp_max"; |
| status = "ok"; |
| }; |
| }; |
| |
| &soc { |
| gpio_keys { |
| compatible = "gpio-keys"; |
| label = "gpio-keys"; |
| pinctrl-names = "default"; |
| pinctrl-0 = <&key_vol_up_default>; |
| |
| vol_up { |
| label = "volume_up"; |
| gpios = <&pm660l_gpios 7 GPIO_ACTIVE_LOW>; |
| linux,input-type = <1>; |
| linux,code = <115>; |
| gpio-key,wakeup; |
| debounce-interval = <15>; |
| linux,can-disable; |
| }; |
| }; |
| }; |
| |
| &qusb_phy0 { |
| qcom,qusb-phy-init-seq = |
| /* <value reg_offset> */ |
| <0x23 0x210 /* PWR_CTRL1 */ |
| 0x03 0x04 /* PLL_ANALOG_CONTROLS_TWO */ |
| 0x7c 0x18c /* PLL_CLOCK_INVERTERS */ |
| 0x80 0x2c /* PLL_CMODE */ |
| 0x0a 0x184 /* PLL_LOCK_DELAY */ |
| 0x19 0xb4 /* PLL_DIGITAL_TIMERS_TWO */ |
| 0x40 0x194 /* PLL_BIAS_CONTROL_1 */ |
| 0x20 0x198 /* PLL_BIAS_CONTROL_2 */ |
| 0x21 0x214 /* PWR_CTRL2 */ |
| 0x00 0x220 /* IMP_CTRL1 */ |
| 0x1a 0x224 /* IMP_CTRL2 */ |
| 0x47 0x240 /* TUNE1 */ |
| 0x29 0x244 /* TUNE2 */ |
| 0xca 0x248 /* TUNE3 */ |
| 0x04 0x24c /* TUNE4 */ |
| 0x03 0x250 /* TUNE5 */ |
| 0x00 0x23c /* CHG_CTRL2 */ |
| 0x22 0x210>; /* PWR_CTRL1 */ |
| }; |
| |
| &pm660_haptics { |
| qcom,vmax-mv = <1800>; |
| qcom,wave-play-rate-us = <4255>; |
| qcom,lra-auto-mode; |
| status = "okay"; |
| }; |
| |
| &int_codec { |
| qcom,model = "sdm670-skuw-snd-card"; |
| qcom,msm-micbias1-ext-cap; |
| qcom,audio-routing = |
| "RX_BIAS", "INT_MCLK0", |
| "SPK_RX_BIAS", "INT_MCLK0", |
| "INT_LDO_H", "INT_MCLK0", |
| "MIC BIAS External2", "Headset Mic", |
| "AMIC2", "MIC BIAS External2", |
| "MIC BIAS External", "Handset Mic", |
| "AMIC1", "MIC BIAS External", |
| "MIC BIAS External", "Secondary Mic", |
| "AMIC3", "MIC BIAS External", |
| "MICBIAS_REGULATOR", "VDDA18_L10_REGULATOR", |
| "VDDA18_L10_REGULATOR", "VDD_L1_REGULATOR", |
| "SpkrLeft IN", "SPK1 OUT", |
| "PDM_IN_RX1", "PDM_OUT_RX1", |
| "PDM_IN_RX2", "PDM_OUT_RX2", |
| "PDM_IN_RX3", "PDM_OUT_RX3", |
| "ADC1_IN", "ADC1_OUT", |
| "ADC2_IN", "ADC2_OUT", |
| "ADC3_IN", "ADC3_OUT"; |
| qcom,wsa-max-devs = <1>; |
| qcom,wsa-devs = <&wsa881x_211_en>, <&wsa881x_213_en>; |
| qcom,wsa-aux-dev-prefix = "SpkrLeft", "SpkrLeft"; |
| }; |
| |
| &sdhc_1 { |
| vdd-supply = <&pm660l_l4>; |
| qcom,vdd-voltage-level = <2960000 2960000>; |
| qcom,vdd-current-level = <0 570000>; |
| |
| vdd-io-supply = <&pm660_l8>; |
| qcom,vdd-io-always-on; |
| qcom,vdd-io-lpm-sup; |
| qcom,vdd-io-voltage-level = <1800000 1800000>; |
| qcom,vdd-io-current-level = <0 325000>; |
| |
| pinctrl-names = "active", "sleep"; |
| pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on &sdc1_rclk_on>; |
| pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off &sdc1_rclk_off>; |
| |
| status = "ok"; |
| }; |
| |
| &sdhc_2 { |
| vdd-supply = <&pm660l_l5>; |
| qcom,vdd-voltage-level = <2960000 2960000>; |
| qcom,vdd-current-level = <0 800000>; |
| |
| vdd-io-supply = <&pm660l_l2>; |
| qcom,vdd-io-voltage-level = <1800000 2960000>; |
| qcom,vdd-io-current-level = <0 22000>; |
| |
| pinctrl-names = "active", "sleep"; |
| pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>; |
| pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>; |
| |
| cd-gpios = <&tlmm 96 0>; |
| |
| status = "ok"; |
| }; |
| |
| &tlmm { |
| pmx_ts_rst_active { |
| ts_rst_active: ts_rst_active { |
| mux { |
| pins = "gpio99"; |
| function = "gpio"; |
| }; |
| |
| config { |
| pins = "gpio99"; |
| drive-strength = <16>; |
| bias-pull-up; |
| }; |
| }; |
| }; |
| |
| pmx_ts_rst_suspend { |
| ts_rst_suspend: ts_rst_suspend { |
| mux { |
| pins = "gpio99"; |
| function = "gpio"; |
| }; |
| |
| config { |
| pins = "gpio99"; |
| drive-strength = <2>; |
| bias-pull-down; |
| }; |
| }; |
| }; |
| }; |
| |
| &soc { |
| hbtp { |
| compatible = "qcom,hbtp-input"; |
| pinctrl-names = "pmx_ts_active", "pmx_ts_suspend"; |
| pinctrl-0 = <&ts_rst_active>; |
| pinctrl-1 = <&ts_rst_suspend>; |
| vcc_ana-supply = <&pm660l_l3>; |
| vcc_dig-supply = <&pm660_l13>; |
| qcom,afe-load = <20000>; |
| qcom,afe-vtg-min = <3000000>; |
| qcom,afe-vtg-max = <3000000>; |
| qcom,dig-load = <40000>; |
| qcom,dig-vtg-min = <1800000>; |
| qcom,dig-vtg-max = <1800000>; |
| qcom,fb-resume-delay-us = <1000>; |
| qcom,afe-force-power-on; |
| qcom,afe-power-on-delay-us = <6>; |
| qcom,afe-power-off-delay-us = <6>; |
| }; |
| }; |
| |
| &dsi_dual_nt36850_truly_cmd { |
| qcom,panel-supply-entries = <&dsi_panel_pwr_supply>; |
| qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled"; |
| qcom,mdss-dsi-bl-min-level = <1>; |
| qcom,mdss-dsi-bl-max-level = <4095>; |
| qcom,panel-mode-gpio = <&tlmm 76 0>; |
| qcom,mdss-dsi-mode-sel-gpio-state = "dual_port"; |
| qcom,platform-reset-gpio = <&tlmm 75 0>; |
| qcom,platform-te-gpio = <&tlmm 10 0>; |
| }; |
| |
| &dsi_dual_nt36850_truly_cmd_display { |
| qcom,dsi-display-active; |
| }; |
| |
| &dsi_panel_pwr_supply { |
| qcom,panel-supply-entry@2 { |
| qcom,supply-post-off-sleep = <5>; |
| }; |
| }; |
| |
| &pm660l_wled { |
| status = "okay"; |
| qcom,led-strings-list = [00 01]; |
| }; |
| |
| &mdss_mdp { |
| #cooling-cells = <2>; |
| }; |