You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
182 lines
4.0 KiB
182 lines
4.0 KiB
/*
|
|
* 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 <dt-bindings/gpio/gpio.h>
|
|
#include <dt-bindings/input/input.h>
|
|
|
|
&pm6125_gpios {
|
|
key_vol_up {
|
|
key_vol_up_default: key_vol_up_default {
|
|
pins = "gpio5";
|
|
function = "normal";
|
|
input-enable;
|
|
bias-pull-up;
|
|
power-source = <0>;
|
|
};
|
|
};
|
|
};
|
|
|
|
&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 = "gpio21";
|
|
function = "gpio";
|
|
};
|
|
config {
|
|
pins = "gpio21";
|
|
drive-strength = <2>;
|
|
bias-pull-up;
|
|
input-enable;
|
|
};
|
|
};
|
|
};
|
|
|
|
&soc {
|
|
gpio_keys {
|
|
compatible = "gpio-keys";
|
|
label = "gpio-keys";
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&key_vol_up_default>;
|
|
|
|
vol_up {
|
|
label = "volume_up";
|
|
gpios = <&pm6125_gpios 5 GPIO_ACTIVE_LOW>;
|
|
linux,input-type = <1>;
|
|
linux,code = <KEY_VOLUMEUP>;
|
|
linux,can-disable;
|
|
debounce-interval = <15>;
|
|
gpio-key,wakeup;
|
|
};
|
|
};
|
|
|
|
mtp_batterydata: qcom,battery-data {
|
|
qcom,batt-id-range-pct = <15>;
|
|
#include "qg-batterydata-ascent-3450mah.dtsi"
|
|
#include "qg-batterydata-mlp356477-2800mah.dtsi"
|
|
};
|
|
};
|
|
|
|
&qupv3_se1_i2c {
|
|
status = "ok";
|
|
#include "smb1355.dtsi"
|
|
};
|
|
|
|
&smb1355 {
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&smb_int_default>;
|
|
interrupt-parent = <&tlmm>;
|
|
interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
|
|
status = "ok";
|
|
};
|
|
|
|
&smb1355_charger {
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&smb_en_default &pmi632_sense_default &pmi632_ctm_default>;
|
|
qcom,parallel-mode = <1>;
|
|
qcom,disable-ctm;
|
|
qcom,hw-die-temp-mitigation;
|
|
status = "ok";
|
|
};
|
|
|
|
&pmi632_qg {
|
|
qcom,battery-data = <&mtp_batterydata>;
|
|
qcom,qg-iterm-ma = <100>;
|
|
qcom,hold-soc-while-full;
|
|
qcom,linearize-soc;
|
|
};
|
|
|
|
&pmi632_charger {
|
|
qcom,battery-data = <&mtp_batterydata>;
|
|
qcom,suspend-input-on-debug-batt;
|
|
qcom,sw-jeita-enable;
|
|
/* SMB1355 only */
|
|
qcom,sec-charger-config = <2>;
|
|
dpdm-supply = <&qusb_phy0>;
|
|
qcom,charger-temp-max = <800>;
|
|
qcom,smb-temp-max = <800>;
|
|
qcom,auto-recharge-soc = <98>;
|
|
qcom,flash-disable-soc = <10>;
|
|
qcom,hw-die-temp-mitigation;
|
|
qcom,hw-connector-mitigation;
|
|
qcom,connector-internal-pull-kohm = <100>;
|
|
qcom,thermal-mitigation = <3000000 2500000
|
|
2000000 1500000 1000000 500000>;
|
|
};
|
|
|
|
&qupv3_se1_i2c {
|
|
status = "ok";
|
|
synaptics_tcm@20 {
|
|
compatible = "synaptics,tcm-i2c";
|
|
reg = <0x20>;
|
|
interrupt-parent = <&tlmm>;
|
|
interrupts = <89 0x2008>;
|
|
synaptics,bus-reg-name = "vdd";
|
|
synaptics,pwr-reg-name = "avdd";
|
|
pinctrl-names = "pmx_ts_active","pmx_ts_suspend",
|
|
"pmx_ts_release";
|
|
pinctrl-0 = <&ts_int_active &ts_reset_active>;
|
|
pinctrl-1 = <&ts_int_suspend &ts_reset_suspend>;
|
|
pinctrl-2 = <&ts_release>;
|
|
synaptics,irq-gpio = <&tlmm 89 0x2008>;
|
|
synaptics,irq-on-state = <0>;
|
|
synaptics,reset-gpio = <&tlmm 88 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>;
|
|
synaptics,y-flip;
|
|
};
|
|
};
|
|
|
|
&pmi632_vadc {
|
|
bat_therm {
|
|
qcom,lut-index = <0>;
|
|
};
|
|
|
|
bat_therm_30k {
|
|
qcom,lut-index = <0>;
|
|
};
|
|
|
|
bat_therm_400k {
|
|
qcom,lut-index = <0>;
|
|
};
|
|
};
|
|
|