blob: c053070c096a677b552b7292a2ab4e47399548b6 [file] [log] [blame]
/* Copyright (c) 2017-2018, 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.
*/
#include "msm8909-qrd.dtsi"
#include "msm8905.dtsi"
#include "msm8905-camera-sensor-skub.dtsi"
&soc {
matrix_keypad: matrix_keypad@0 {
compatible = "gpio-matrix-keypad";
input-name = "matrix_keypad";
debounce-delay-ms = <5>;
col-scan-delay-us = <2>;
pinctrl-names = "tlmm_gpio_key_active","tlmm_gpio_key_suspend";
pinctrl-0 = <&gpio_key_active>;
pinctrl-1 = <&gpio_key_suspend>;
row-gpios = <&msm_gpio 97 0
&msm_gpio 96 0
&msm_gpio 95 0
&msm_gpio 94 0>;
col-gpios = <&msm_gpio 52 0
&msm_gpio 56 0
&msm_gpio 7 0
&msm_gpio 99 0
&msm_gpio 6 0>;
linux,keymap = <0x000000e7 /* (0,0) KEY_DIAL */
0x00010004 /* (1,0) KEY_3 */
0x00020007 /* (2,0) KEY_6 */
0x0003000A /* (3,0) KEY_9 */
0x0004020b /* (4,0) KEY_NUMERIC_POUND */
0x01000069 /* (0,1) KEY_LEFT */
0x01010003 /* (1,1) KEY_2 */
0x01020006 /* (2,1) KEY_5 */
0x01030009 /* (3,1) KEY_8 */
0x0104000b /* (4,1) KEY_0 */
0x0200008b /* (0,2) KEY_MENU */
0x02010002 /* (1,2) KEY_1 */
0x02020005 /* (2,2) KEY_4 */
0x02030008 /* (3,2) KEY_7 */
0x0204020a /* (4,2) KEY_NUMERIC_STAR */
0x03000160 /* (0,3) KEY_OK */
0x0301006A /* (1,3) KEY_RIGHT */
0x0302009e>; /* (3,3) KEY_BACK */
};
gpio_keys {
compatible = "gpio-keys";
input-name = "gpio-keys";
pinctrl-names =
"tlmm_gpio_key_active","tlmm_gpio_key_suspend";
pinctrl-0 = <&gpio_key_active>;
pinctrl-1 = <&gpio_key_suspend>;
vol_up {
label = "volume_up";
gpios = <&msm_gpio 90 0x1>;
linux,input-type = <1>;
linux,code = <103>;
gpio-key,wakeup;
debounce-interval = <15>;
};
};
};
&pm8909_chg {
status = "ok";
};
&usb_otg {
extcon = <&pm8909_chg>;
};
&msm_gpio {
tlmm_gpio_key {
qcom,pin-func = <0>;
qcom,num-grp-pins = <5>;
label = "tlmm_gpio_key";
gpio_key_active: gpio_key_active {
mux {
pins = "gpio52", "gpio56", "gpio7",
"gpio99", "gpio6";
drive-strength = <2>;
bias-pull-up;
};
};
gpio_key_suspend: gpio_key_suspend {
mux {
pins = "gpio52", "gpio56", "gpio7",
"gpio99", "gpio6";
drive-strength = <2>;
bias-pull-up;
};
};
};
};
&spmi_bus {
qcom,pm8909@0 {
pm8909_pon: qcom,power-on@800 {
compatible = "qcom,qpnp-power-on";
reg = <0x800 0x100>;
interrupts = <0x0 0x8 0x0 0x0>,
<0x0 0x8 0x1 0x0>;
interrupt-names = "kpdpwr", "resin";
qcom,pon-dbc-delay = <15625>;
qcom,system-reset;
qcom,clear-warm-reset;
qcom,pon_1 {
qcom,pon-type = <0>;
qcom,pull-up = <1>;
linux,code = <116>;
};
qcom,pon_2 {
qcom,pon-type = <1>;
qcom,pull-up = <1>;
linux,code = <108>;
};
};
};
};
&pm8909_vadc {
chan@30 {
qcom,scale-function = <6>;
};
};
&spmi_bus {
qcom,pm8909@0 {
qcom,leds@c000 {
compatible = "qcom,leds-qpnp";
reg = <0xc000 0x100>;
status = "okay";
qcom,led_gpio_1 {
label = "gpio";
linux,name = "button-backlight";
qcom,max-current = <40>;
qcom,id = <8>;
linux,default-trigger = "none";
qcom,default-state = "on";
qcom,turn-off-delay-ms = <1000>;
qcom,source-sel = <1>;
qcom,mode-ctrl = <0x10>;
qcom,vin-ctrl = <0x02>;
};
};
};
};
&pm8909_chg {
qcom,cool-bat-mv = <4000>;
qcom,warm-bat-mv = <4000>;
qcom,ibatmax-warm-ma = <500>;
qcom,ibatmax-cool-ma = <500>;
qcom,batt-hot-percentage = <35>;
qcom,batt-cold-percentage = <70>;
qcom,chgr-led-support;
status = "okay";
};
/ {
qrd_batterydata: qcom,battery-data {
qcom,rpull-up-kohm = <0>;
qcom,vref-batt-therm = <1800000>;
#include "batterydata-qrd-skub-4v2-2000mah.dtsi"
};
};
&pm8909_bms {
status = "okay";
qcom,resume-soc = <95>;
qcom,use-reported-soc;
qcom,force-bms-active-on-charger;
qcom,battery-data = <&qrd_batterydata>;
};
&sdhc_2 {
qcom,nonremovable;
interrupts = <0 1>;
interrupt-map = <0 &intc 0 125 0
1 &intc 0 221 0>;
interrupt-names = "hc_irq", "pwr_irq";
/delete-property/ cd-gpios;
pinctrl-names = "active", "sleep";
pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on>;
pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off>;
};
&pm8909_mpps {
mpp@a300 { /* MPP 4 */
/* CASE_THERM config */
qcom,mode = <4>; /* AIN input */
qcom,invert = <1>; /* Enable MPP */
qcom,ain-route = <3>; /* AMUX 8 */
qcom,master-en = <1>;
qcom,src-sel = <0>; /* Function constant */
};
};
&pm8909_vadc {
chan@30 {
qcom,scale-function = <12>;
};
chan@13 {
label = "case_therm";
reg = <0x13>;
qcom,decimation = <0>;
qcom,pre-div-channel-scaling = <0>;
qcom,calibration-type = "ratiometric";
qcom,scale-function = <2>;
qcom,hw-settle-time = <2>;
qcom,fast-avg-setup = <0>;
/*qcom,vadc-thermal-node;*/
};
};
&soc {
qcom,msm-audio-apr {
compatible = "qcom,msm-audio-apr";
msm_audio_apr_dummy {
compatible = "qcom,msm-audio-apr-dummy";
};
};
sound {
compatible = "qcom,msm8952-audio-codec";
qcom,model = "msm8909-skub-snd-card";
reg = <0x7702000 0x4>,
<0x7702004 0x4>,
<0x7702008 0x4>;
reg-names = "csr_gp_io_mux_mic_ctl",
"csr_gp_io_mux_spkr_ctl",
"csr_gp_io_lpaif_pri_pcm_pri_mode_muxsel";
qcom,msm-snd-card-id = <0>;
qcom,msm-codec-type = "internal";
qcom,msm-ext-pa = "primary";
qcom,msm-mclk-freq = <9600000>;
qcom,msm-mbhc-hphl-swh = <1>;
qcom,msm-mbhc-gnd-swh = <0>;
qcom,msm-hs-micbias-type = "internal";
qcom,msm-micbias1-ext-cap;
qcom,msm-micbias2-ext-cap;
qcom,audio-routing =
"RX_BIAS", "MCLK",
"SPK_RX_BIAS", "MCLK",
"INT_LDO_H", "MCLK",
"MIC BIAS Internal1", "Handset Mic",
"MIC BIAS Internal2", "Headset Mic",
"AMIC1", "MIC BIAS Internal1",
"AMIC2", "MIC BIAS Internal2";
qcom,pri-mi2s-gpios = <&cdc_pri_mi2s_gpios>;
asoc-platform = <&pcm0>, <&pcm1>, <&pcm2>,
<&voip>, <&voice>,
<&loopback>, <&compress>, <&hostless>,
<&afe>, <&lsm>, <&routing>, <&pcm_noirq>;
asoc-platform-names = "msm-pcm-dsp.0", "msm-pcm-dsp.1",
"msm-pcm-dsp.2",
"msm-voip-dsp", "msm-pcm-voice",
"msm-pcm-loopback", "msm-compress-dsp",
"msm-pcm-hostless", "msm-pcm-afe",
"msm-lsm-client", "msm-pcm-routing",
"msm-pcm-dsp-noirq";
asoc-cpu = <&dai_pri_auxpcm>, <&dai_hdmi>,
<&dai_mi2s0>, <&dai_mi2s1>,
<&dai_mi2s2>, <&dai_mi2s3>,
<&dai_mi2s4>, <&dai_mi2s5>,
<&sb_0_rx>, <&sb_0_tx>,
<&sb_1_rx>, <&sb_1_tx>,
<&sb_3_rx>, <&sb_3_tx>,
<&sb_4_rx>, <&sb_4_tx>,
<&bt_sco_rx>, <&bt_sco_tx>,
<&bt_a2dp_rx>, <&int_fm_rx>, <&int_fm_tx>,
<&afe_pcm_rx>, <&afe_pcm_tx>,
<&afe_proxy_rx>, <&afe_proxy_tx>,
<&incall_record_rx>, <&incall_record_tx>,
<&incall_music_rx>, <&incall_music_2_rx>;
asoc-cpu-names = "msm-dai-q6-auxpcm.1", "msm-dai-q6-hdmi.8",
"msm-dai-q6-mi2s.0", "msm-dai-q6-mi2s.1",
"msm-dai-q6-mi2s.2", "msm-dai-q6-mi2s.3",
"msm-dai-q6-mi2s.4", "msm-dai-q6-mi2s.6",
"msm-dai-q6-dev.16384", "msm-dai-q6-dev.16385",
"msm-dai-q6-dev.16386", "msm-dai-q6-dev.16387",
"msm-dai-q6-dev.16390", "msm-dai-q6-dev.16391",
"msm-dai-q6-dev.16392", "msm-dai-q6-dev.16393",
"msm-dai-q6-dev.12288", "msm-dai-q6-dev.12289",
"msm-dai-q6-dev.12290",
"msm-dai-q6-dev.12292", "msm-dai-q6-dev.12293",
"msm-dai-q6-dev.224", "msm-dai-q6-dev.225",
"msm-dai-q6-dev.241", "msm-dai-q6-dev.240",
"msm-dai-q6-dev.32771", "msm-dai-q6-dev.32772",
"msm-dai-q6-dev.32773", "msm-dai-q6-dev.32770";
asoc-codec = <&stub_codec>, <&msm_digital_codec>,
<&pmic_analog_codec>;
asoc-codec-names = "msm-stub-codec.1", "msm-dig-codec",
"analog-codec";
};
cdc_pri_mi2s_gpios: msm_cdc_pinctrl_pri {
compatible = "qcom,msm-cdc-pinctrl";
pinctrl-names = "aud_active", "aud_sleep";
pinctrl-0 = <&cdc_pdm_lines_act>;
pinctrl-1 = <&cdc_pdm_lines_sus>;
};
spi@78b9000 { /* BLSP1 QUP5 */
status = "okay";
qcom,shared;
mdss_spi_client {
reg = <0>;
compatible = "qcom,mdss-spi-client";
label = "MDSS SPI QUP5 CLIENT";
spi-max-frequency = <50000000>;
};
};
i2c@78b9000 {/* BLSP1 QUP5 */
status = "disabled";
};
mdss_spi: qcom,mdss_spi {
compatible = "qcom,mdss-spi-display";
label = "mdss spi panel";
qcom,mdss-fb-map = <&mdss_fb0>;
qcom,mdss-mdp = <&mdss_mdp>;
vdd-supply = <&pm8909_l17>;
vddio-supply = <&pm8909_l6>;
qcom,panel-supply-entries {
#address-cells = <1>;
#size-cells = <0>;
qcom,panel-supply-entry@0 {
reg = <0>;
qcom,supply-name = "vdd";
qcom,supply-min-voltage = <2850000>;
qcom,supply-max-voltage = <2850000>;
qcom,supply-enable-load = <100000>;
qcom,supply-disable-load = <100>;
};
qcom,panel-supply-entry@1 {
reg = <1>;
qcom,supply-name = "vddio";
qcom,supply-min-voltage = <1800000>;
qcom,supply-max-voltage = <1800000>;
qcom,supply-enable-load = <100000>;
qcom,supply-disable-load = <100>;
};
};
};
};
&pm8909_1 {
pmic_analog_codec: analog-codec@f100 {
status = "okay";
compatible = "qcom,pmic-analog-codec";
reg = <0xf000 0x200>;
#address-cells = <2>;
#size-cells = <0>;
interrupt-parent = <&spmi_bus>;
interrupts =
<0x1 0xf0 0x0 IRQ_TYPE_NONE>,
<0x1 0xf0 0x1 IRQ_TYPE_NONE>,
<0x1 0xf0 0x2 IRQ_TYPE_NONE>,
<0x1 0xf0 0x3 IRQ_TYPE_NONE>,
<0x1 0xf0 0x4 IRQ_TYPE_NONE>,
<0x1 0xf0 0x5 IRQ_TYPE_NONE>,
<0x1 0xf0 0x6 IRQ_TYPE_NONE>,
<0x1 0xf0 0x7 IRQ_TYPE_NONE>,
<0x1 0xf1 0x0 IRQ_TYPE_NONE>,
<0x1 0xf1 0x1 IRQ_TYPE_NONE>,
<0x1 0xf1 0x2 IRQ_TYPE_NONE>,
<0x1 0xf1 0x3 IRQ_TYPE_NONE>,
<0x1 0xf1 0x4 IRQ_TYPE_NONE>,
<0x1 0xf1 0x5 IRQ_TYPE_NONE>;
interrupt-names =
"spk_cnp_int",
"spk_clip_int",
"spk_ocp_int",
"ins_rem_det1",
"but_rel_det",
"but_press_det",
"ins_rem_det",
"mbhc_int",
"ear_ocp_int",
"hphr_ocp_int",
"hphl_ocp_det",
"ear_cnp_int",
"hphr_cnp_int",
"hphl_cnp_int";
cdc-vdda-cp-supply = <&pm8909_s2>;
qcom,cdc-vdda-cp-voltage = <1800000 2200000>;
qcom,cdc-vdda-cp-current = <500000>;
cdc-vdda-h-supply = <&pm8909_l5>;
qcom,cdc-vdda-h-voltage = <1800000 1800000>;
qcom,cdc-vdda-h-current = <5000>;
cdc-vdd-px-supply = <&pm8909_l5>;
qcom,cdc-vdd-px-voltage = <1800000 1800000>;
qcom,cdc-vdd-px-current = <5000>;
cdc-vdd-pa-supply = <&pm8909_s2>;
qcom,cdc-vdd-pa-voltage = <1800000 2200000>;
qcom,cdc-vdd-pa-current = <260000>;
cdc-vdd-mic-bias-supply = <&pm8909_l13>;
qcom,cdc-vdd-mic-bias-voltage = <3075000 3075000>;
qcom,cdc-vdd-mic-bias-current = <5000>;
qcom,cdc-mclk-clk-rate = <9600000>;
qcom,cdc-static-supplies =
"cdc-vdda-h",
"cdc-vdd-px",
"cdc-vdd-pa",
"cdc-vdda-cp";
qcom,cdc-on-demand-supplies = "cdc-vdd-mic-bias";
msm_digital_codec: msm-dig-codec@f000 {
compatible = "qcom,msm-digital-codec";
reg = <0x771c000 0x100>;
};
};
};
&pm8909_mpps {
mpp@a100 { /* MPP 2 */
/* Backlight PWM */
qcom,mode = <1>; /* Digital output */
qcom,invert = <0>; /* Disable invert */
qcom,src-sel = <4>; /* DTEST1 */
qcom,vin-sel = <0>; /* VPH_PWR */
qcom,master-en = <1>; /* Enable MPP */
};
};
#include "spi-panel-gc9305-qvga-cmd.dtsi"
&mdss_mdp {
qcom,mdss-pref-prim-intf = "spi";
};
&spi_gc9305_qvga_cmd {
qcom,mdss-spi-bl-pmic-control-type = "bl_ctrl_pwm";
qcom,mdss-spi-bl-pmic-pwm-frequency = <100>;
qcom,mdss-spi-bl-pmic-bank-select = <0>;
qcom,mdss-spi-pwm-gpio = <&pm8909_mpps 2 0>;
qcom,cont-splash-enabled;
};
&msm_gpio {
pmx_mdss_te {
mdss_te_active: mdss_te_active {
mux {
pins = "gpio24";
};
config {
pins = "gpio24";
};
};
mdss_te_suspend: mdss_te_suspend {
mux {
pins = "gpio24";
};
config {
pins = "gpio24";
};
};
};
};
&mdss_spi {
qcom,spi-pref-prim-pan = <&spi_gc9305_qvga_cmd>;
pinctrl-names = "mdss_default", "mdss_sleep";
pinctrl-0 = <&mdss_te_active>;
pinctrl-1 = <&mdss_te_suspend>;
qcom,platform-te-gpio = <&msm_gpio 24 0>;
qcom,platform-reset-gpio = <&msm_gpio 25 0>;
qcom,platform-spi-dc-gpio = <&msm_gpio 110 0>;
vdd-supply = <&pm8909_l17>;
vddio-supply = <&pm8909_l6>;
};
&pm8909_gpios {
/* GPIO 2 (NFC_CLK_REQ) */
nfc-clk {
nfc_clk_default: nfc_clk_default {
pins = "gpio2";
function = "normal";
input-enable;
power-source = <1>;
};
};
/* GPIO 4 (FLASH ENABLE GPIO CONFIG) */
flash_en {
flash_en_default: flash_en_default{
pins = "gpio4";
function = "normal";
input-disable;
output-enable;
status = "okay";
};
};
};
&i2c_2 {
status = "okay";
nq@28 {
compatible = "qcom,nq-nci";
reg = <0x28>;
qcom,nq-irq = <&msm_gpio 21 0x00>;
qcom,nq-ven = <&msm_gpio 20 0x00>;
qcom,nq-firm = <&msm_gpio 23 0x00>;
qcom,nq-clkreq = <&pm8909_gpios 2 0x00>;
qcom,nq-esepwr = <&msm_gpio 31 0x00>;
interrupt-parent = <&msm_gpio>;
qcom,clk-src = "BBCLK2";
interrupts = <21 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_rpm clk_bb_clk2_pin>;
clock-names = "ref_clk";
};
};
&vendor_fstab {
status = "disabled";
};
&system_fstab {
status = "disabled";
};
&blsp1_uart1 {
status = "ok";
};
&blsp1_uart2 {
status = "ok";
};
&actuator0 {
status = "disabled";
};
&pm8909_conga_dig {
status = "disabled";
};
&pm8909_conga_analog {
status = "disabled";
};
&mdss_dsi {
vdda-supply = <&pm8909_l2>;
vddio-supply = <&pm8909_l6>;
qcom,mdss_dsi_ctrl0@1ac8000 {
vdd-supply = <&pm8909_l17>;
vddio-supply = <&pm8909_l6>;
};
};