blob: 3f82715392c6b8cc146ef9368e2080185c477c16 [file] [log] [blame]
Caleb Connollye5541ac2024-02-26 17:26:32 +00001// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/* Copyright 2018 Google LLC. */
3
4#include <dt-bindings/iio/qcom,spmi-vadc.h>
5#include <dt-bindings/input/linux-event-codes.h>
6#include <dt-bindings/interrupt-controller/irq.h>
7#include <dt-bindings/spmi/spmi.h>
8#include <dt-bindings/thermal/thermal.h>
9
10/ {
11 thermal-zones {
12 pm8998-thermal {
13 polling-delay-passive = <250>;
14 polling-delay = <1000>;
15
16 thermal-sensors = <&pm8998_temp>;
17
18 trips {
19 pm8998_alert0: pm8998-alert0 {
20 temperature = <105000>;
21 hysteresis = <2000>;
22 type = "passive";
23 };
24 pm8998_crit: pm8998-crit {
25 temperature = <125000>;
26 hysteresis = <2000>;
27 type = "critical";
28 };
29 };
30 };
31 };
32};
33
34&spmi_bus {
35 pm8998_lsid0: pmic@0 {
36 compatible = "qcom,pm8998", "qcom,spmi-pmic";
37 reg = <0x0 SPMI_USID>;
38 #address-cells = <1>;
39 #size-cells = <0>;
40
41 pm8998_pon: pon@800 {
42 compatible = "qcom,pm8998-pon";
43
44 reg = <0x800>;
45 mode-bootloader = <0x2>;
46 mode-recovery = <0x1>;
47
48 pm8998_pwrkey: pwrkey {
49 compatible = "qcom,pm8941-pwrkey";
50 interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
51 debounce = <15625>;
52 bias-pull-up;
53 linux,code = <KEY_POWER>;
54 };
55
56 pm8998_resin: resin {
57 compatible = "qcom,pm8941-resin";
58 interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
59 debounce = <15625>;
60 bias-pull-up;
61 status = "disabled";
62 };
63 };
64
65 pm8998_temp: temp-alarm@2400 {
66 compatible = "qcom,spmi-temp-alarm";
67 reg = <0x2400>;
68 interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
69 io-channels = <&pm8998_adc ADC5_DIE_TEMP>;
70 io-channel-names = "thermal";
71 #thermal-sensor-cells = <0>;
72 };
73
74 pm8998_coincell: charger@2800 {
75 compatible = "qcom,pm8998-coincell", "qcom,pm8941-coincell";
76 reg = <0x2800>;
77
78 status = "disabled";
79 };
80
81 pm8998_adc: adc@3100 {
82 compatible = "qcom,spmi-adc-rev2";
83 reg = <0x3100>;
84 interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
85 #address-cells = <1>;
86 #size-cells = <0>;
87 #io-channel-cells = <1>;
88
89 channel@6 {
90 reg = <ADC5_DIE_TEMP>;
91 label = "die_temp";
92 };
93 };
94
95 pm8998_adc_tm: adc-tm@3400 {
96 compatible = "qcom,spmi-adc-tm-hc";
97 reg = <0x3400>;
98 interrupts = <0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>;
99 #thermal-sensor-cells = <1>;
100 #address-cells = <1>;
101 #size-cells = <0>;
102 status = "disabled";
103 };
104
105 rtc@6000 {
106 compatible = "qcom,pm8941-rtc";
107 reg = <0x6000>, <0x6100>;
108 reg-names = "rtc", "alarm";
109 interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
110 };
111
112 pm8998_gpios: gpio@c000 {
113 compatible = "qcom,pm8998-gpio", "qcom,spmi-gpio";
114 reg = <0xc000>;
115 gpio-controller;
116 gpio-ranges = <&pm8998_gpios 0 0 26>;
117 #gpio-cells = <2>;
118 interrupt-controller;
119 #interrupt-cells = <2>;
120 };
121
122 };
123
124 pm8998_lsid1: pmic@1 {
125 compatible = "qcom,pm8998", "qcom,spmi-pmic";
126 reg = <0x1 SPMI_USID>;
127 #address-cells = <1>;
128 #size-cells = <0>;
129 };
130};