blob: 0d5129be09b411e6e872fcb435a8b372166a97ed [file] [log] [blame]
/* Copyright (c) 2016-2017, 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/spmi/spmi.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/msm/power-on.h>
&spmi_bus {
qcom,pm8998@0 {
compatible = "qcom,spmi-pmic";
reg = <0x0 SPMI_USID>;
#address-cells = <2>;
#size-cells = <0>;
pm8998_revid: qcom,revid@100 {
compatible = "qcom,qpnp-revid";
reg = <0x100 0x100>;
};
qcom,power-on@800 {
compatible = "qcom,qpnp-power-on";
reg = <0x800 0x100>;
interrupts = <0x0 0x8 0x0 IRQ_TYPE_NONE>,
<0x0 0x8 0x1 IRQ_TYPE_NONE>,
<0x0 0x8 0x4 IRQ_TYPE_NONE>,
<0x0 0x8 0x5 IRQ_TYPE_NONE>;
interrupt-names = "kpdpwr", "resin",
"resin-bark", "kpdpwr-resin-bark";
qcom,pon-dbc-delay = <15625>;
qcom,kpdpwr-sw-debounce;
qcom,system-reset;
qcom,store-hard-reset-reason;
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 = <114>;
};
qcom,pon_3 {
qcom,pon-type = <3>;
qcom,support-reset = <1>;
qcom,pull-up = <1>;
qcom,s1-timer = <6720>;
qcom,s2-timer = <2000>;
qcom,s2-type = <PON_POWER_OFF_DVDD_HARD_RESET>;
qcom,use-bark;
};
};
pm8998_tz: qcom,temp-alarm@2400 {
compatible = "qcom,qpnp-temp-alarm";
reg = <0x2400 0x100>;
interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
label = "pm8998_tz";
qcom,channel-num = <6>;
qcom,temp_alarm-vadc = <&pm8998_vadc>;
#thermal-sensor-cells = <0>;
};
pm8998_gpios: pinctrl@c000 {
compatible = "qcom,spmi-gpio";
reg = <0xc000 0x1a00>;
interrupts = <0x0 0xc0 0 IRQ_TYPE_NONE>,
<0x0 0xc1 0 IRQ_TYPE_NONE>,
<0x0 0xc3 0 IRQ_TYPE_NONE>,
<0x0 0xc4 0 IRQ_TYPE_NONE>,
<0x0 0xc5 0 IRQ_TYPE_NONE>,
<0x0 0xc6 0 IRQ_TYPE_NONE>,
<0x0 0xc7 0 IRQ_TYPE_NONE>,
<0x0 0xc8 0 IRQ_TYPE_NONE>,
<0x0 0xc9 0 IRQ_TYPE_NONE>,
<0x0 0xca 0 IRQ_TYPE_NONE>,
<0x0 0xcb 0 IRQ_TYPE_NONE>,
<0x0 0xcc 0 IRQ_TYPE_NONE>,
<0x0 0xcd 0 IRQ_TYPE_NONE>,
<0x0 0xcf 0 IRQ_TYPE_NONE>,
<0x0 0xd0 0 IRQ_TYPE_NONE>,
<0x0 0xd1 0 IRQ_TYPE_NONE>,
<0x0 0xd2 0 IRQ_TYPE_NONE>,
<0x0 0xd4 0 IRQ_TYPE_NONE>,
<0x0 0xd6 0 IRQ_TYPE_NONE>;
interrupt-names = "pm8998_gpio1", "pm8998_gpio2",
"pm8998_gpio4", "pm8998_gpio5",
"pm8998_gpio6", "pm8998_gpio7",
"pm8998_gpio8", "pm8998_gpio9",
"pm8998_gpio10", "pm8998_gpio11",
"pm8998_gpio12", "pm8998_gpio13",
"pm8998_gpio14", "pm8998_gpio16",
"pm8998_gpio17", "pm8998_gpio18",
"pm8998_gpio19", "pm8998_gpio21",
"pm8998_gpio23";
gpio-controller;
#gpio-cells = <2>;
qcom,gpios-disallowed = <3 15 20 22 24 25 26>;
};
pm8998_coincell: qcom,coincell@2800 {
compatible = "qcom,qpnp-coincell";
reg = <0x2800 0x100>;
};
pm8998_rtc: qcom,pm8998_rtc {
compatible = "qcom,qpnp-rtc";
#address-cells = <1>;
#size-cells = <1>;
qcom,qpnp-rtc-write = <0>;
qcom,qpnp-rtc-alarm-pwrup = <0>;
qcom,pm8998_rtc_rw@6000 {
reg = <0x6000 0x100>;
};
qcom,pm8998_rtc_alarm@6100 {
reg = <0x6100 0x100>;
interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;
};
};
pm8998_vadc: vadc@3100 {
compatible = "qcom,qpnp-vadc-hc";
reg = <0x3100 0x100>;
#address-cells = <1>;
#size-cells = <0>;
interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "eoc-int-en-set";
qcom,adc-vdd-reference = <1875>;
chan@6 {
label = "die_temp";
reg = <6>;
qcom,decimation = <2>;
qcom,pre-div-channel-scaling = <0>;
qcom,calibration-type = "absolute";
qcom,scale-function = <3>;
qcom,hw-settle-time = <0>;
qcom,fast-avg-setup = <0>;
qcom,cal-val = <0>;
};
chan@0 {
label = "ref_gnd";
reg = <0>;
qcom,decimation = <2>;
qcom,pre-div-channel-scaling = <0>;
qcom,calibration-type = "absolute";
qcom,scale-function = <0>;
qcom,hw-settle-time = <0>;
qcom,fast-avg-setup = <0>;
qcom,cal-val = <0>;
};
chan@1 {
label = "ref_1250v";
reg = <1>;
qcom,decimation = <2>;
qcom,pre-div-channel-scaling = <0>;
qcom,calibration-type = "absolute";
qcom,scale-function = <0>;
qcom,hw-settle-time = <0>;
qcom,fast-avg-setup = <0>;
qcom,cal-val = <0>;
};
};
pm8998_adc_tm: vadc@3400 {
compatible = "qcom,qpnp-adc-tm-hc";
reg = <0x3400 0x100>;
#address-cells = <1>;
#size-cells = <0>;
interrupts = <0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "eoc-int-en-set";
qcom,adc-vdd-reference = <1875>;
qcom,adc_tm-vadc = <&pm8998_vadc>;
qcom,decimation = <0>;
qcom,fast-avg-setup = <0>;
#thermal-sensor-cells = <1>;
};
pm8998_div_clk1: qcom,clkdiv@5b00 {
compatible = "qcom,qpnp-clkdiv";
reg = <0x5b00 0x100>;
#clock-cells = <1>;
qcom,cxo-freq = <19200000>;
qcom,clkdiv-id = <1>;
qcom,clkdiv-init-freq = <19200000>;
};
pm8998_div_clk2: qcom,clkdiv@5c00 {
compatible = "qcom,qpnp-clkdiv";
reg = <0x5c00 0x100>;
#clock-cells = <1>;
qcom,cxo-freq = <19200000>;
qcom,clkdiv-id = <2>;
qcom,clkdiv-init-freq = <19200000>;
};
pm8998_div_clk3: qcom,clkdiv@5d00 {
compatible = "qcom,qpnp-clkdiv";
reg = <0x5d00 0x100>;
#clock-cells = <1>;
qcom,cxo-freq = <19200000>;
qcom,clkdiv-id = <3>;
qcom,clkdiv-init-freq = <19200000>;
};
};
qcom,pm8998@1 {
compatible ="qcom,spmi-pmic";
reg = <0x1 SPMI_USID>;
#address-cells = <2>;
#size-cells = <0>;
};
};
&thermal_zones {
pm8998_temp_alarm: pm8998_tz {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-governor = "step_wise";
thermal-sensors = <&pm8998_tz>;
wake-capable-sensor;
trips {
pm8998_trip0: pm8998-trip0 {
temperature = <105000>;
hysteresis = <0>;
type = "passive";
};
pm8998_trip1: pm8998-trip1 {
temperature = <125000>;
hysteresis = <0>;
type = "passive";
};
pm8998_trip2: pm8998-trip2 {
temperature = <145000>;
hysteresis = <0>;
type = "passive";
};
};
};
};