xref: /linux/scripts/dtc/include-prefixes/arm/qcom/pm8226.dtsi (revision 06d07429858317ded2db7986113a9e0129cd599b)
1455a4c46SDmitry Baryshkov// SPDX-License-Identifier: BSD-3-Clause
2455a4c46SDmitry Baryshkov#include <dt-bindings/iio/qcom,spmi-vadc.h>
3455a4c46SDmitry Baryshkov#include <dt-bindings/input/linux-event-codes.h>
4455a4c46SDmitry Baryshkov#include <dt-bindings/interrupt-controller/irq.h>
5455a4c46SDmitry Baryshkov#include <dt-bindings/spmi/spmi.h>
6455a4c46SDmitry Baryshkov
7455a4c46SDmitry Baryshkov/ {
8455a4c46SDmitry Baryshkov	thermal-zones {
9455a4c46SDmitry Baryshkov		pm8226-thermal {
10455a4c46SDmitry Baryshkov			polling-delay-passive = <100>;
11455a4c46SDmitry Baryshkov			polling-delay = <0>;
12455a4c46SDmitry Baryshkov			thermal-sensors = <&pm8226_temp>;
13455a4c46SDmitry Baryshkov
14455a4c46SDmitry Baryshkov			trips {
15455a4c46SDmitry Baryshkov				trip0 {
16455a4c46SDmitry Baryshkov					temperature = <105000>;
17455a4c46SDmitry Baryshkov					hysteresis = <2000>;
18455a4c46SDmitry Baryshkov					type = "passive";
19455a4c46SDmitry Baryshkov				};
20455a4c46SDmitry Baryshkov
21455a4c46SDmitry Baryshkov				trip1 {
22455a4c46SDmitry Baryshkov					temperature = <125000>;
23455a4c46SDmitry Baryshkov					hysteresis = <2000>;
24455a4c46SDmitry Baryshkov					type = "hot";
25455a4c46SDmitry Baryshkov				};
26455a4c46SDmitry Baryshkov
27455a4c46SDmitry Baryshkov				crit {
28455a4c46SDmitry Baryshkov					temperature = <145000>;
29455a4c46SDmitry Baryshkov					hysteresis = <2000>;
30455a4c46SDmitry Baryshkov					type = "critical";
31455a4c46SDmitry Baryshkov				};
32455a4c46SDmitry Baryshkov			};
33455a4c46SDmitry Baryshkov		};
34455a4c46SDmitry Baryshkov	};
35455a4c46SDmitry Baryshkov};
36455a4c46SDmitry Baryshkov
37455a4c46SDmitry Baryshkov&spmi_bus {
38455a4c46SDmitry Baryshkov	pm8226_0: pm8226@0 {
39455a4c46SDmitry Baryshkov		compatible = "qcom,pm8226", "qcom,spmi-pmic";
40455a4c46SDmitry Baryshkov		reg = <0x0 SPMI_USID>;
41455a4c46SDmitry Baryshkov		#address-cells = <1>;
42455a4c46SDmitry Baryshkov		#size-cells = <0>;
43455a4c46SDmitry Baryshkov
44455a4c46SDmitry Baryshkov		pon@800 {
45455a4c46SDmitry Baryshkov			compatible = "qcom,pm8916-pon";
46455a4c46SDmitry Baryshkov			reg = <0x800>;
47455a4c46SDmitry Baryshkov
48455a4c46SDmitry Baryshkov			pwrkey {
49455a4c46SDmitry Baryshkov				compatible = "qcom,pm8941-pwrkey";
50455a4c46SDmitry Baryshkov				interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
51455a4c46SDmitry Baryshkov				debounce = <15625>;
52455a4c46SDmitry Baryshkov				bias-pull-up;
53455a4c46SDmitry Baryshkov				linux,code = <KEY_POWER>;
54455a4c46SDmitry Baryshkov			};
55455a4c46SDmitry Baryshkov
56455a4c46SDmitry Baryshkov			pm8226_resin: resin {
57455a4c46SDmitry Baryshkov				compatible = "qcom,pm8941-resin";
58455a4c46SDmitry Baryshkov				interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
59455a4c46SDmitry Baryshkov				debounce = <15625>;
60455a4c46SDmitry Baryshkov				bias-pull-up;
61455a4c46SDmitry Baryshkov				status = "disabled";
62455a4c46SDmitry Baryshkov			};
63455a4c46SDmitry Baryshkov		};
64455a4c46SDmitry Baryshkov
65455a4c46SDmitry Baryshkov		smbb: charger@1000 {
66455a4c46SDmitry Baryshkov			compatible = "qcom,pm8226-charger";
67455a4c46SDmitry Baryshkov			reg = <0x1000>;
68455a4c46SDmitry Baryshkov			interrupts = <0x0 0x10 7 IRQ_TYPE_EDGE_BOTH>,
69455a4c46SDmitry Baryshkov				     <0x0 0x10 5 IRQ_TYPE_EDGE_BOTH>,
70455a4c46SDmitry Baryshkov				     <0x0 0x10 4 IRQ_TYPE_EDGE_BOTH>,
71455a4c46SDmitry Baryshkov				     <0x0 0x12 1 IRQ_TYPE_EDGE_BOTH>,
72455a4c46SDmitry Baryshkov				     <0x0 0x12 0 IRQ_TYPE_EDGE_BOTH>,
73455a4c46SDmitry Baryshkov				     <0x0 0x13 2 IRQ_TYPE_EDGE_BOTH>,
74455a4c46SDmitry Baryshkov				     <0x0 0x13 1 IRQ_TYPE_EDGE_BOTH>,
75455a4c46SDmitry Baryshkov				     <0x0 0x14 1 IRQ_TYPE_EDGE_BOTH>;
76455a4c46SDmitry Baryshkov			interrupt-names = "chg-done",
77455a4c46SDmitry Baryshkov					  "chg-fast",
78455a4c46SDmitry Baryshkov					  "chg-trkl",
79455a4c46SDmitry Baryshkov					  "bat-temp-ok",
80455a4c46SDmitry Baryshkov					  "bat-present",
81455a4c46SDmitry Baryshkov					  "chg-gone",
82455a4c46SDmitry Baryshkov					  "usb-valid",
83455a4c46SDmitry Baryshkov					  "dc-valid";
84455a4c46SDmitry Baryshkov
85*c9c8179dSBryant Mairs			status = "disabled";
86*c9c8179dSBryant Mairs
87455a4c46SDmitry Baryshkov			chg_otg: otg-vbus { };
88455a4c46SDmitry Baryshkov		};
89455a4c46SDmitry Baryshkov
90455a4c46SDmitry Baryshkov		pm8226_temp: temp-alarm@2400 {
91455a4c46SDmitry Baryshkov			compatible = "qcom,spmi-temp-alarm";
92455a4c46SDmitry Baryshkov			reg = <0x2400>;
93455a4c46SDmitry Baryshkov			interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>;
94455a4c46SDmitry Baryshkov			io-channels = <&pm8226_vadc VADC_DIE_TEMP>;
95455a4c46SDmitry Baryshkov			io-channel-names = "thermal";
96455a4c46SDmitry Baryshkov			#thermal-sensor-cells = <0>;
97455a4c46SDmitry Baryshkov		};
98455a4c46SDmitry Baryshkov
99455a4c46SDmitry Baryshkov		pm8226_vadc: adc@3100 {
100455a4c46SDmitry Baryshkov			compatible = "qcom,spmi-vadc";
101455a4c46SDmitry Baryshkov			reg = <0x3100>;
102455a4c46SDmitry Baryshkov			interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
103455a4c46SDmitry Baryshkov			#address-cells = <1>;
104455a4c46SDmitry Baryshkov			#size-cells = <0>;
105455a4c46SDmitry Baryshkov			#io-channel-cells = <1>;
106455a4c46SDmitry Baryshkov
107455a4c46SDmitry Baryshkov			channel@7 {
108455a4c46SDmitry Baryshkov				reg = <VADC_VSYS>;
109455a4c46SDmitry Baryshkov				qcom,pre-scaling = <1 3>;
110455a4c46SDmitry Baryshkov				label = "vph_pwr";
111455a4c46SDmitry Baryshkov			};
112455a4c46SDmitry Baryshkov			channel@8 {
113455a4c46SDmitry Baryshkov				reg = <VADC_DIE_TEMP>;
114455a4c46SDmitry Baryshkov				label = "die_temp";
115455a4c46SDmitry Baryshkov			};
116455a4c46SDmitry Baryshkov			channel@9 {
117455a4c46SDmitry Baryshkov				reg = <VADC_REF_625MV>;
118455a4c46SDmitry Baryshkov				label = "ref_625mv";
119455a4c46SDmitry Baryshkov			};
120455a4c46SDmitry Baryshkov			channel@a {
121455a4c46SDmitry Baryshkov				reg = <VADC_REF_1250MV>;
122455a4c46SDmitry Baryshkov				label = "ref_1250mv";
123455a4c46SDmitry Baryshkov			};
124455a4c46SDmitry Baryshkov			channel@e {
125455a4c46SDmitry Baryshkov				reg = <VADC_GND_REF>;
126455a4c46SDmitry Baryshkov			};
127455a4c46SDmitry Baryshkov			channel@f {
128455a4c46SDmitry Baryshkov				reg = <VADC_VDD_VADC>;
129455a4c46SDmitry Baryshkov			};
130455a4c46SDmitry Baryshkov		};
131455a4c46SDmitry Baryshkov
132455a4c46SDmitry Baryshkov		pm8226_iadc: adc@3600 {
133455a4c46SDmitry Baryshkov			compatible = "qcom,pm8226-iadc", "qcom,spmi-iadc";
134455a4c46SDmitry Baryshkov			reg = <0x3600>;
135455a4c46SDmitry Baryshkov			interrupts = <0x0 0x36 0x0 IRQ_TYPE_EDGE_RISING>;
136455a4c46SDmitry Baryshkov		};
137455a4c46SDmitry Baryshkov
138455a4c46SDmitry Baryshkov		rtc@6000 {
139455a4c46SDmitry Baryshkov			compatible = "qcom,pm8941-rtc";
140455a4c46SDmitry Baryshkov			reg = <0x6000>, <0x6100>;
141455a4c46SDmitry Baryshkov			reg-names = "rtc", "alarm";
142455a4c46SDmitry Baryshkov			interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
143455a4c46SDmitry Baryshkov		};
144455a4c46SDmitry Baryshkov
145455a4c46SDmitry Baryshkov		pm8226_mpps: mpps@a000 {
146455a4c46SDmitry Baryshkov			compatible = "qcom,pm8226-mpp", "qcom,spmi-mpp";
147455a4c46SDmitry Baryshkov			reg = <0xa000>;
148455a4c46SDmitry Baryshkov			gpio-controller;
149455a4c46SDmitry Baryshkov			#gpio-cells = <2>;
150455a4c46SDmitry Baryshkov			gpio-ranges = <&pm8226_mpps 0 0 8>;
151455a4c46SDmitry Baryshkov			interrupt-controller;
152455a4c46SDmitry Baryshkov			#interrupt-cells = <2>;
153455a4c46SDmitry Baryshkov		};
154455a4c46SDmitry Baryshkov
155455a4c46SDmitry Baryshkov		pm8226_gpios: gpio@c000 {
156455a4c46SDmitry Baryshkov			compatible = "qcom,pm8226-gpio", "qcom,spmi-gpio";
157455a4c46SDmitry Baryshkov			reg = <0xc000>;
158455a4c46SDmitry Baryshkov			gpio-controller;
159455a4c46SDmitry Baryshkov			#gpio-cells = <2>;
160455a4c46SDmitry Baryshkov			gpio-ranges = <&pm8226_gpios 0 0 8>;
161455a4c46SDmitry Baryshkov			interrupt-controller;
162455a4c46SDmitry Baryshkov			#interrupt-cells = <2>;
163455a4c46SDmitry Baryshkov		};
164455a4c46SDmitry Baryshkov	};
165455a4c46SDmitry Baryshkov
166455a4c46SDmitry Baryshkov	pm8226_1: pm8226@1 {
167455a4c46SDmitry Baryshkov		compatible = "qcom,pm8226", "qcom,spmi-pmic";
168455a4c46SDmitry Baryshkov		reg = <0x1 SPMI_USID>;
169455a4c46SDmitry Baryshkov		#address-cells = <1>;
170455a4c46SDmitry Baryshkov		#size-cells = <0>;
171455a4c46SDmitry Baryshkov
172455a4c46SDmitry Baryshkov		pm8226_spmi_regulators: regulators {
173455a4c46SDmitry Baryshkov			compatible = "qcom,pm8226-regulators";
174455a4c46SDmitry Baryshkov		};
175455a4c46SDmitry Baryshkov
176455a4c46SDmitry Baryshkov		pm8226_vib: vibrator@c000 {
177455a4c46SDmitry Baryshkov			compatible = "qcom,pm8916-vib";
178455a4c46SDmitry Baryshkov			reg = <0xc000>;
179455a4c46SDmitry Baryshkov			status = "disabled";
180455a4c46SDmitry Baryshkov		};
181455a4c46SDmitry Baryshkov	};
182455a4c46SDmitry Baryshkov};
183