blob: 3d2ff51e85c27e43ca5bb86dc29ceb83292ce17d [file] [log] [blame]
/*
* Copyright (c) 2018-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 "msm8937-mdss-panels.dtsi"
#include "sdm439-camera-sensor-qrd.dtsi"
&blsp1_uart2 {
status = "ok";
pinctrl-names = "default";
pinctrl-0 = <&uart_console_active>;
};
&sdhc_1 {
/* device core power supply */
vdd-supply = <&pm8953_l8>;
qcom,vdd-voltage-level = <2900000 2900000>;
qcom,vdd-current-level = <200 570000>;
/* device communication power supply */
vdd-io-supply = <&pm8953_l5>;
qcom,vdd-io-always-on;
qcom,vdd-io-lpm-sup;
qcom,vdd-io-voltage-level = <1800000 1800000>;
qcom,vdd-io-current-level = <200 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>;
qcom,clk-rates = <400000 20000000 25000000 50000000 100000000 192000000
384000000>;
qcom,nonremovable;
qcom,bus-speed-mode = "HS400_1p8v", "HS200_1p8v", "DDR_1p8v";
status = "ok";
};
&int_codec {
status = "okay";
qcom,model = "sdm439-sku1-snd-card";
qcom,msm-micbias1-ext-cap;
qcom,msm-micbias2-ext-cap;
qcom,msm-mbhc-hphl-swh = <1>;
qcom,msm-mbhc-gnd-swh = <0>;
qcom,msm-hs-micbias-type = "external";
/delete-property/ qcom,quin-mi2s-gpios;
};
&cdc_quin_mi2s_gpios {
status = "disabled";
};
&wsa881x_i2c_f {
status = "okay";
};
&wsa881x_i2c_45 {
status = "okay";
};
&pm8953_gpios {
nfc_clk {
nfc_clk_default: nfc_clk_default {
pins = "gpio2";
function = "normal";
input-enable;
power-source = <1>;
};
};
};
&i2c_5 { /* BLSP2 QUP1 (NFC) */
#address-cells = <1>;
#size-cells = <0>;
status = "ok";
nq@28 {
compatible = "qcom,nq-nci";
reg = <0x28>;
qcom,nq-irq = <&tlmm 17 0x00>;
qcom,nq-ven = <&tlmm 16 0x00>;
qcom,nq-firm = <&tlmm 130 0x00>;
qcom,nq-clkreq = <&pm8953_gpios 2 0x00>;
qcom,nq-esepwr = <&tlmm 93 0x00>;
interrupt-parent = <&tlmm>;
qcom,clk-src = "BBCLK2";
interrupts = <17 0>;
interrupt-names = "nfc_irq";
pinctrl-names = "nfc_active", "nfc_suspend";
pinctrl-0 = <&nfc_int_active &nfc_disable_active
&nfc_clk_default>;
pinctrl-1 = <&nfc_int_suspend &nfc_disable_suspend>;
clocks = <&clock_gcc clk_bb_clk2_pin>;
clock-names = "ref_clk";
};
};
&sdhc_2 {
/* device core power supply */
vdd-supply = <&pm8953_l11>;
qcom,vdd-voltage-level = <2950000 2950000>;
qcom,vdd-current-level = <15000 800000>;
/* device communication power supply */
vdd-io-supply = <&pm8953_l12>;
qcom,vdd-io-voltage-level = <1800000 2950000>;
qcom,vdd-io-current-level = <200 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>;
cd-gpios = <&tlmm 67 0x0>;
qcom,clk-rates = <400000 20000000 25000000 50000000 100000000
200000000>;
qcom,bus-speed-mode = "SDR12", "SDR25", "SDR50", "DDR50", "SDR104";
status = "ok";
};
&soc {
gpio_keys: gpio_keys {
compatible = "gpio-keys";
label = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&gpio_key_active>;
vol_up: vol_up {
label = "volume_up";
gpios = <&tlmm 91 0x1>;
linux,input-type = <1>;
linux,code = <115>;
debounce-interval = <15>;
linux,can-disable;
gpio-key,wakeup;
};
};
fpc1020 {
compatible = "fpc,fpc1020";
interrupt-parent = <&tlmm>;
interrupts = <48 0>;
fpc,gpio_rst = <&tlmm 124 0x0>;
fpc,gpio_irq = <&tlmm 48 0>;
vcc_spi-supply = <&pm8953_l5>;
vdd_io-supply = <&pm8953_l5>;
vdd_ana-supply = <&pm8953_l5>;
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>;
};
};
&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 = <&pm8953_l10>;
vcc_dig-supply = <&pm8953_l5>;
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>;
};
};
&tlmm {
pmx_mdss {
mdss_dsi_active: mdss_dsi_active {
mux {
pins = "gpio60";
};
config {
pins = "gpio60";
};
};
mdss_dsi_suspend: mdss_dsi_suspend {
mux {
pins = "gpio60";
};
config {
pins = "gpio60";
};
};
};
};
&dsi_panel_pwr_supply {
qcom,panel-supply-entry@0 {
reg = <0>;
qcom,supply-name = "bklight_en";
qcom,supply-min-voltage = <1800000>;
qcom,supply-max-voltage = <1800000>;
qcom,supply-enable-load = <100000>;
qcom,supply-disable-load = <100>;
};
qcom,panel-supply-entry@2 {
reg = <2>;
qcom,supply-name = "lab";
qcom,supply-min-voltage = <4600000>;
qcom,supply-max-voltage = <6000000>;
qcom,supply-enable-load = <100000>;
qcom,supply-disable-load = <100>;
};
qcom,panel-supply-entry@3 {
reg = <3>;
qcom,supply-name = "ibb";
qcom,supply-min-voltage = <4600000>;
qcom,supply-max-voltage = <6000000>;
qcom,supply-enable-load = <100000>;
qcom,supply-disable-load = <100>;
qcom,supply-post-on-sleep = <10>;
};
};
&mdss_dsi {
hw-config = "single_dsi";
};
&mdss_mdp {
qcom,mdss-pref-prim-intf = "dsi";
};
&mdss_dsi0 {
lab-supply = <&lcdb_ldo_vreg>;
ibb-supply = <&lcdb_ncp_vreg>;
bklight_en-supply = <&pm8953_l5>;
vddio-supply = <&pm8953_l6>;
qcom,dsi-pref-prim-pan = <&dsi_hx8399c_truly_vid>;
/delete-property/ qcom,platform-bklight-en-gpio;
pinctrl-names = "mdss_default", "mdss_sleep";
pinctrl-0 = <&mdss_dsi_active &mdss_te_active>;
pinctrl-1 = <&mdss_dsi_suspend &mdss_te_suspend>;
qcom,platform-te-gpio = <&tlmm 24 0>;
qcom,platform-reset-gpio = <&tlmm 60 0>;
};
&mdss_dsi1 {
status = "disabled";
};
&pm8953_pwm {
status = "ok";
};
&dsi_hx8399c_truly_vid {
qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_pwm";
qcom,mdss-dsi-bl-pmic-pwm-frequency = <100>;
qcom,mdss-dsi-bl-pmic-bank-select = <0>;
qcom,mdss-dsi-pwm-gpio = <&pm8953_gpios 8 0>;
qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
/delete-property/ qcom,mdss-dsi-panel-timings;
qcom,mdss-dsi-panel-timings-phy-12nm = [18 0a 10 06 03 08 06 0e];
qcom,mdss-dsi-t-clk-post = <0x02>;
qcom,mdss-dsi-t-clk-pre = <0x2d>;
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 = <0x9d 0x9d 0x9d 0x9d>;
qcom,mdss-dsi-panel-on-check-value = <0x9d 0x9d 0x9d 0x9d>;
qcom,mdss-dsi-panel-status-read-length = <4>;
qcom,mdss-dsi-panel-max-error-count = <3>;
qcom,mdss-dsi-min-refresh-rate = <48>;
qcom,mdss-dsi-max-refresh-rate = <60>;
qcom,mdss-dsi-pan-enable-dynamic-fps;
qcom,mdss-dsi-pan-fps-update =
"dfps_immediate_porch_mode_vfp";
};
&dsi_hx8399c_hd_vid {
/delete-property/ qcom,mdss-dsi-panel-timings;
qcom,mdss-dsi-panel-timings-phy-12nm = [09 06 0a 02 00 05 02 08];
qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_pwm";
qcom,mdss-dsi-bl-pmic-pwm-frequency = <100>;
qcom,mdss-dsi-bl-pmic-bank-select = <0>;
qcom,mdss-dsi-pwm-gpio = <&pm8953_gpios 8 0>;
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 = <0x9d 0x9d 0x9d 0x9d>;
qcom,mdss-dsi-panel-on-check-value = <0x9d 0x9d 0x9d 0x9d>;
qcom,mdss-dsi-panel-status-read-length = <4>;
qcom,mdss-dsi-panel-max-error-count = <3>;
qcom,mdss-dsi-min-refresh-rate = <48>;
qcom,mdss-dsi-max-refresh-rate = <60>;
qcom,mdss-dsi-pan-enable-dynamic-fps;
qcom,mdss-dsi-pan-fps-update =
"dfps_immediate_porch_mode_vfp";
};
&i2c_2 {
#address-cells = <1>;
#size-cells = <0>;
#include "smb1355.dtsi"
};
&pmi632_vadc {
chan@4a {
qcom,scale-function = <22>;
};
};
&pmi632_gpios {
smb_en {
smb_en_default: smb_en_default {
pins = "gpio2";
function = "func1";
output-enable;
};
};
pmi632_sense {
/* GPIO 7 and 8 are external-sense pins for PMI632 */
pmi632_sense_default: pmi632_sense_default {
pins = "gpio7", "gpio8";
bias-high-impedance; /* disable the GPIO */
bias-disable; /* no-pull */
};
};
pmi632_ctm {
/* Disable GPIO1 for h/w base mitigation */
pmi632_ctm_default: pmi632_ctm_default {
pins = "gpio1";
bias-high-impedance; /* disable the GPIO */
bias-disable; /* no-pull */
};
};
};
&tlmm {
smb_int_default: smb_int_default {
mux {
pins = "gpio61";
function = "gpio";
};
config {
pins = "gpio61";
drive-strength = <2>;
bias-pull-up;
input-enable;
};
};
};
&smb1355_0 {
pinctrl-names = "default";
pinctrl-0 = <&smb_int_default
&smb_en_default &pmi632_sense_default &pmi632_ctm_default>;
interrupt-parent = <&tlmm>;
interrupts = <61 IRQ_TYPE_LEVEL_LOW>;
smb1355_charger_0: qcom,smb1355-charger@1000 {
status ="ok";
/delete-property/ io-channels;
/delete-property/ io-channels-names;
qcom,parallel-mode = <1>;
qcom,disable-ctm;
qcom,hw-die-temp-mitigation;
};
};
&smb1355_1 {
pinctrl-names = "default";
pinctrl-0 = <&smb_int_default
&smb_en_default &pmi632_sense_default &pmi632_ctm_default>;
interrupt-parent = <&tlmm>;
interrupts = <61 IRQ_TYPE_LEVEL_LOW>;
smb1355_charger_1: qcom,smb1355-charger@1000 {
status ="ok";
/delete-property/ io-channels;
/delete-property/ io-channels-names;
qcom,parallel-mode = <1>;
qcom,disable-ctm;
qcom,hw-die-temp-mitigation;
};
};
&pmi632_charger {
qcom,thermal-mitigation = <4200000 3500000 3000000 2500000
2000000 1500000 1000000 500000>;
};