blob: be8af24ba6dfe7d3a9c1566d69550294bf8c4f44 [file] [log] [blame]
/* 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.
*/
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
#include <dt-bindings/iio/qcom,spmi-vadc.h>
#include <dt-bindings/input/input.h>
#include "atoll-audio-overlay.dtsi"
#include "atoll-camera-sensor-qrd.dtsi"
#include "atoll-sde-display.dtsi"
#include "sdmmagpie-thermal-overlay.dtsi"
&tlmm {
fpc_reset_int: fpc_reset_int {
fpc_reset_low: reset_low {
mux {
pins = "gpio91";
function = "gpio";
};
config {
pins = "gpio91";
drive-strength = <2>;
bias-disable;
output-low;
};
};
fpc_reset_high: reset_high {
mux {
pins = "gpio91";
function = "gpio";
};
config {
pins = "gpio91";
drive-strength = <2>;
bias-disable;
output-high;
};
};
fpc_int_low: int_low {
mux {
pins = "gpio90";
function = "gpio";
};
config {
pins = "gpio90";
drive-strength = <2>;
bias-pull-down;
input-enable;
};
};
};
};
&soc {
qrd_batterydata: qcom,battery-data {
qcom,batt-id-range-pct = <15>;
#include "qg-batterydata-atl466271_3300mAh.dtsi"
};
fingerprint: fpc1020 {
compatible = "fpc,fpc1020";
interrupt-parent = <&tlmm>;
interrupts = <90 0>;
fpc,gpio_rst = <&tlmm 91 0>;
fpc,gpio_irq = <&tlmm 90 0>;
vcc_spi-supply = <&pm6150_l10>;
vdd_io-supply = <&pm6150_l10>;
vdd_ana-supply = <&pm6150_l10>;
fpc,enable-on-boot;
pinctrl-names = "fpc1020_reset_reset",
"fpc1020_reset_active",
"fpc1020_irq_active";
pinctrl-0 = <&fpc_reset_low>;
pinctrl-1 = <&fpc_reset_high>;
pinctrl-2 = <&fpc_int_low>;
};
};
&pm6150a_amoled {
status = "ok";
};
&pm6150_qg {
qcom,battery-data = <&qrd_batterydata>;
qcom,qg-iterm-ma = <100>;
qcom,hold-soc-while-full;
qcom,linearize-soc;
qcom,cl-feedback-on;
};
&pm6150_charger {
io-channels = <&pm6150_vadc ADC_USB_IN_V_16>,
<&pm6150_vadc ADC_USB_IN_I>,
<&pm6150_vadc ADC_CHG_TEMP>,
<&pm6150_vadc ADC_DIE_TEMP>,
<&pm6150_vadc ADC_AMUX_THM3_PU2>,
<&pm6150_vadc ADC_SBUx>,
<&pm6150_vadc ADC_VPH_PWR>;
io-channel-names = "usb_in_voltage",
"usb_in_current",
"chg_temp",
"die_temp",
"conn_temp",
"sbux_res",
"vph_voltage";
qcom,battery-data = <&qrd_batterydata>;
qcom,auto-recharge-soc = <98>;
qcom,step-charging-enable;
qcom,sw-jeita-enable;
qcom,fcc-stepping-enable;
qcom,suspend-input-on-debug-batt;
qcom,sec-charger-config = <1>;
qcom,thermal-mitigation = <4200000 3500000 3000000
2500000 2000000 1500000 1000000 500000>;
dpdm-supply = <&qusb_phy0>;
qcom,charger-temp-max = <800>;
qcom,smb-temp-max = <800>;
qcom,fcc-step-delay-ms = <100>;
qcom,fcc-step-size-ua = <100000>;
qcom,disable-sw-thermal-regulation;
qcom,disable-fcc-restriction;
qcom,smb-internal-pull-kohm = <0>;
};
&usb0 {
extcon = <&pm6150_pdphy>, <&pm6150_charger>, <&eud>;
};
&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 */
0x18 0x198 /* PLL_BIAS_CONTROL_2 */
0x21 0x214 /* PWR_CTRL2 */
0x08 0x220 /* IMP_CTRL1 */
0x58 0x224 /* IMP_CTRL2 */
0x47 0x240 /* TUNE1 */
0x28 0x244 /* TUNE2 */
0xca 0x248 /* TUNE3 */
0x04 0x24c /* TUNE4 */
0x03 0x250 /* TUNE5 */
0x30 0x23c /* CHG_CTRL2 */
0x22 0x210>; /* PWR_CTRL1 */
qcom,qusb-phy-host-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 */
0x18 0x198 /* PLL_BIAS_CONTROL_2 */
0x21 0x214 /* PWR_CTRL2 */
0x08 0x220 /* IMP_CTRL1 */
0x58 0x224 /* IMP_CTRL2 */
0x47 0x240 /* TUNE1 */
0x28 0x244 /* TUNE2 */
0xca 0x248 /* TUNE3 */
0x04 0x24c /* TUNE4 */
0x03 0x250 /* TUNE5 */
0x30 0x23c /* CHG_CTRL2 */
0x22 0x210>; /* PWR_CTRL1 */
};
&usb_qmp_dp_phy {
extcon = <&pm6150_pdphy>;
};
&pm6150_gpios {
smb_stat {
smb_stat_default: smb_stat_default {
pins = "gpio3";
function = "normal";
input-enable;
bias-pull-up;
qcom,pull-up-strength = <PMIC_GPIO_PULL_UP_30>;
power-source = <0>;
};
};
};
&qupv3_se9_i2c {
status = "ok";
#include "smb1390.dtsi"
};
&smb1390 {
/delete-property/ interrupts;
interrupts = <0x0 0xc2 0x0 IRQ_TYPE_LEVEL_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&smb_stat_default>;
status = "ok";
};
&smb1390_charger {
compatible = "qcom,smb1390-charger-psy";
io-channels = <&pm6150_vadc ADC_AMUX_THM2>;
io-channel-names = "cp_die_temp";
qcom,parallel-input-mode = <1>; /* USBIN */
qcom,parallel-output-mode = <2>; /* VBAT */
qcom,min-ilim-ua = <750000>;
status = "ok";
};
&smb1390_slave {
status = "ok";
};
&smb1390_slave_charger {
status = "ok";
};
&pm6150l_gpios {
key_vol_up {
key_vol_up_default: key_vol_up_default {
pins = "gpio2";
function = "normal";
input-enable;
bias-pull-up;
power-source = <0>;
};
};
};
&soc {
gpio_keys {
compatible = "gpio-keys";
label = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&key_vol_up_default>;
vol_up {
label = "volume_up";
gpios = <&pm6150l_gpios 2 GPIO_ACTIVE_LOW>;
linux,input-type = <1>;
linux,code = <KEY_VOLUMEUP>;
linux,can-disable;
debounce-interval = <15>;
gpio-key,wakeup;
};
};
};
&qupv3_se7_i2c {
status = "ok";
synaptics_tcm@20 {
compatible = "synaptics,tcm-i2c";
reg = <0x20>;
interrupt-parent = <&tlmm>;
interrupts = <9 0x2008>;
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 = <&ts_release>;
vdd-supply = <&pm6150_l10>;
avdd-supply = <&pm6150l_l7>;
synaptics,pwr-reg-name = "avdd";
synaptics,bus-reg-name = "vdd";
synaptics,irq-gpio = <&tlmm 9 0x2008>;
synaptics,irq-on-state = <0>;
synaptics,reset-gpio = <&tlmm 8 0x00>;
synaptics,reset-on-state = <0>;
synaptics,reset-active-ms = <20>;
synaptics,reset-delay-ms = <200>;
synaptics,power-delay-ms = <200>;
synaptics,ubl-i2c-addr = <0x20>;
};
};
&ufsphy_mem {
compatible = "qcom,ufs-phy-qmp-v3";
vdda-phy-supply = <&pm6150_l4>; /* 0.9v */
vdda-pll-supply = <&pm6150l_l3>; /* 1.2v */
vdda-phy-max-microamp = <62900>;
vdda-pll-max-microamp = <18300>;
status = "ok";
};
&ufshc_mem {
vdd-hba-supply = <&ufs_phy_gdsc>;
vdd-hba-fixed-regulator;
vcc-supply = <&pm6150_l19>;
vcc-voltage-level = <2960000 2960000>;
vcc-max-microamp = <600000>;
vccq2-supply = <&pm6150_l12>;
vccq2-voltage-level = <1750000 1950000>;
vccq2-max-microamp = <600000>;
qcom,vddp-ref-clk-supply = <&pm6150l_l3>; /* PX10 */
qcom,vddp-ref-clk-max-microamp = <100>;
status = "ok";
};
&sdhc_1 {
vdd-supply = <&pm6150_l19>;
qcom,vdd-voltage-level = <2960000 2960000>;
qcom,vdd-current-level = <0 570000>;
vdd-io-supply = <&pm6150_l12>;
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 = <&pm6150l_l9>;
qcom,vdd-voltage-level = <2960000 2960000>;
qcom,vdd-current-level = <0 800000>;
vdd-io-supply = <&pm6150l_l6>;
qcom,vdd-io-voltage-level = <1800000 2950000>;
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 69 GPIO_ACTIVE_LOW>;
status = "ok";
};
&atoll_snd {
qcom,model = "atoll-qrd-snd-card";
qcom,audio-routing =
"AMIC1", "MIC BIAS1",
"MIC BIAS1", "Analog Mic1",
"AMIC2", "MIC BIAS2",
"MIC BIAS2", "Analog Mic2",
"AMIC3", "MIC BIAS3",
"MIC BIAS3", "Analog Mic3",
"AMIC4", "MIC BIAS1",
"MIC BIAS1", "Analog Mic4",
"TX DMIC0", "MIC BIAS1",
"MIC BIAS1", "Digital Mic0",
"TX DMIC1", "MIC BIAS1",
"MIC BIAS1", "Digital Mic1",
"TX DMIC2", "MIC BIAS3",
"MIC BIAS3", "Digital Mic2",
"TX DMIC3", "MIC BIAS3",
"MIC BIAS3", "Digital Mic3",
"TX DMIC4", "MIC BIAS4",
"MIC BIAS4", "Digital Mic4",
"IN1_HPHL", "HPHL_OUT",
"IN2_HPHR", "HPHR_OUT",
"IN3_AUX", "AUX_OUT",
"TX SWR_ADC0", "ADC1_OUTPUT",
"TX SWR_ADC1", "ADC2_OUTPUT",
"TX SWR_ADC2", "ADC3_OUTPUT",
"TX SWR_ADC3", "ADC4_OUTPUT",
"TX SWR_DMIC0", "DMIC1_OUTPUT",
"TX SWR_DMIC1", "DMIC2_OUTPUT",
"TX SWR_DMIC2", "DMIC3_OUTPUT",
"TX SWR_DMIC3", "DMIC4_OUTPUT",
"TX SWR_DMIC4", "DMIC5_OUTPUT",
"TX SWR_DMIC5", "DMIC6_OUTPUT",
"TX SWR_DMIC6", "DMIC7_OUTPUT",
"TX SWR_DMIC7", "DMIC8_OUTPUT",
"WSA SRC0_INP", "SRC0",
"WSA_TX DEC0_INP", "TX DEC0 MUX",
"WSA_TX DEC1_INP", "TX DEC1 MUX",
"RX_TX DEC0_INP", "TX DEC0 MUX",
"RX_TX DEC1_INP", "TX DEC1 MUX",
"RX_TX DEC2_INP", "TX DEC2 MUX",
"RX_TX DEC3_INP", "TX DEC3 MUX",
"SpkrLeft IN", "WSA_SPK1 OUT",
"SpkrRight IN", "WSA_SPK2 OUT",
"VA MIC BIAS3", "Digital Mic0",
"VA MIC BIAS3", "Digital Mic1",
"VA MIC BIAS1", "Digital Mic2",
"VA MIC BIAS1", "Digital Mic3",
"VA MIC BIAS4", "Digital Mic4",
"VA MIC BIAS4", "Digital Mic5",
"VA DMIC0", "VA MIC BIAS3",
"VA DMIC1", "VA MIC BIAS3",
"VA DMIC2", "VA MIC BIAS1",
"VA DMIC3", "VA MIC BIAS1",
"VA DMIC4", "VA MIC BIAS4",
"VA DMIC5", "VA MIC BIAS4",
"VA SWR_ADC0", "VA_SWR_CLK",
"VA SWR_ADC1", "VA_SWR_CLK",
"VA SWR_ADC2", "VA_SWR_CLK",
"VA SWR_ADC3", "VA_SWR_CLK",
"VA SWR_MIC0", "VA_SWR_CLK",
"VA SWR_MIC1", "VA_SWR_CLK",
"VA SWR_MIC2", "VA_SWR_CLK",
"VA SWR_MIC3", "VA_SWR_CLK",
"VA SWR_MIC4", "VA_SWR_CLK",
"VA SWR_MIC5", "VA_SWR_CLK",
"VA SWR_MIC6", "VA_SWR_CLK",
"VA SWR_MIC7", "VA_SWR_CLK",
"VA SWR_ADC0", "ADC1_OUTPUT",
"VA SWR_ADC1", "ADC2_OUTPUT",
"VA SWR_ADC2", "ADC3_OUTPUT",
"VA SWR_ADC3", "ADC4_OUTPUT",
"VA SWR_MIC0", "DMIC1_OUTPUT",
"VA SWR_MIC1", "DMIC2_OUTPUT",
"VA SWR_MIC2", "DMIC3_OUTPUT",
"VA SWR_MIC3", "DMIC4_OUTPUT",
"VA SWR_MIC4", "DMIC5_OUTPUT",
"VA SWR_MIC5", "DMIC6_OUTPUT",
"VA SWR_MIC6", "DMIC7_OUTPUT",
"VA SWR_MIC7", "DMIC8_OUTPUT";
qcom,wsa-max-devs = <1>;
qcom,wsa-devs = <&wsa881x_0211>, <&wsa881x_0213>;
qcom,wsa-aux-dev-prefix = "SpkrLeft", "SpkrLeft";
};
&qupv3_se0_i2c {
status = "ok";
qcom,clk-freq-out = <1000000>;
#address-cells = <1>;
#size-cells = <0>;
nq@28 {
compatible = "qcom,nq-nci";
reg = <0x28>;
qcom,nq-irq = <&tlmm 37 0x00>;
qcom,nq-ven = <&tlmm 12 0x00>;
qcom,nq-firm = <&tlmm 36 0x00>;
qcom,nq-clkreq = <&tlmm 31 0x00>;
interrupt-parent = <&tlmm>;
interrupts = <37 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>;
};
};
&dsi_rm69299_visionox_amoled_video {
qcom,panel-supply-entries = <&dsi_panel_pwr_supply_labibb_amoled>;
qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_dcs";
qcom,mdss-dsi-bl-min-level = <1>;
qcom,mdss-dsi-bl-max-level = <255>;
qcom,platform-te-gpio = <&tlmm 10 0>;
qcom,platform-reset-gpio = <&pm6150l_gpios 3 0>;
};
&dsi_rm69299_visionox_amoled_cmd {
qcom,panel-supply-entries = <&dsi_panel_pwr_supply_labibb_amoled>;
qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_dcs";
qcom,mdss-dsi-bl-min-level = <1>;
qcom,mdss-dsi-bl-max-level = <255>;
qcom,platform-te-gpio = <&tlmm 10 0>;
qcom,platform-reset-gpio = <&pm6150l_gpios 3 0>;
};
&dsi_rm69299_visionox_amoled_vid_display {
qcom,dsi-display-active;
};
&sde_dp{
pinctrl-names = "mdss_dp_active", "mdss_dp_sleep", "default";
pinctrl-0 = <&sde_dp_aux_active &sde_dp_usbplug_cc_active>;
pinctrl-1 = <&sde_dp_aux_suspend &sde_dp_usbplug_cc_suspend>;
pinctrl-2 = <&sde_dp_aux_suspend>;
qcom,aux-en-gpio = <&tlmm 55 0>;
qcom,aux-sel-gpio = <&tlmm 33 0>;
qcom,dp-gpio-aux-switch;
};
&fsa4480{
status="disabled";
};