xref: /openbmc/linux/arch/arm64/boot/dts/qcom/pm8950.dtsi (revision e8254a8e)
1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2022, AngeloGioacchino Del Regno
4 *                     <angelogioacchino.delregno@somainline.org>
5 * Copyright (c) 2022, Marijn Suijten <marijn.suijten@somainline.org>
6 */
7
8#include <dt-bindings/iio/qcom,spmi-vadc.h>
9#include <dt-bindings/input/linux-event-codes.h>
10#include <dt-bindings/interrupt-controller/irq.h>
11#include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
12#include <dt-bindings/spmi/spmi.h>
13
14&spmi_bus {
15	pmic@0 {
16		compatible = "qcom,pm8950", "qcom,spmi-pmic";
17		reg = <0x0 SPMI_USID>;
18		#address-cells = <1>;
19		#size-cells = <0>;
20
21		pon@800 {
22			compatible = "qcom,pm8916-pon";
23			reg = <0x0800>;
24			mode-bootloader = <0x2>;
25			mode-recovery = <0x1>;
26
27			pwrkey {
28				compatible = "qcom,pm8941-pwrkey";
29				interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
30				debounce = <15625>;
31				bias-pull-up;
32				linux,code = <KEY_POWER>;
33			};
34		};
35
36		pm8950_temp: temp-alarm@2400 {
37			compatible = "qcom,spmi-temp-alarm";
38			reg = <0x2400>;
39			interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>;
40			io-channels = <&pm8950_vadc VADC_DIE_TEMP>;
41			io-channel-names = "thermal";
42			#thermal-sensor-cells = <0>;
43		};
44
45		pm8950_vadc: adc@3100 {
46			compatible = "qcom,spmi-vadc";
47			reg = <0x3100>;
48			interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
49			#address-cells = <1>;
50			#size-cells = <0>;
51			#io-channel-cells = <1>;
52
53			vcoin@5 {
54				reg = <VADC_VCOIN>;
55				qcom,pre-scaling = <1 1>;
56			};
57
58			vph-pwr@7 {
59				reg = <VADC_VSYS>;
60				qcom,pre-scaling = <1 1>;
61			};
62
63			die-temp@8 {
64				reg = <VADC_DIE_TEMP>;
65				qcom,pre-scaling = <1 1>;
66			};
67
68			ref-625mv@9 {
69				reg = <VADC_REF_625MV>;
70				qcom,pre-scaling = <1 1>;
71			};
72
73			ref-1250mv@a {
74				reg = <VADC_REF_1250MV>;
75				qcom,pre-scaling = <1 1>;
76			};
77
78			ref-buf-625mv@c {
79				reg = <VADC_SPARE1>;
80				qcom,pre-scaling = <1 1>;
81			};
82
83			ref-gnd@e {
84				reg = <VADC_GND_REF>;
85			};
86
87			ref-vdd@f {
88				reg = <VADC_VDD_VADC>;
89			};
90
91			pa-therm1@11 {
92				reg = <VADC_P_MUX2_1_1>;
93				qcom,pre-scaling = <1 1>;
94				qcom,ratiometric;
95				qcom,hw-settle-time = <200>;
96			};
97
98			case-therm@13 {
99				reg = <VADC_P_MUX4_1_1>;
100				qcom,pre-scaling = <1 1>;
101				qcom,ratiometric;
102				qcom,hw-settle-time = <200>;
103			};
104
105			xo-therm@32 {
106				reg = <VADC_LR_MUX3_XO_THERM>;
107				qcom,pre-scaling = <1 1>;
108				qcom,ratiometric;
109				qcom,hw-settle-time = <200>;
110			};
111
112			pa-therm0@36 {
113				reg = <VADC_LR_MUX7_HW_ID>;
114				qcom,pre-scaling = <1 1>;
115				qcom,ratiometric;
116				qcom,hw-settle-time = <200>;
117			};
118
119			xo-therm-buf@3c {
120				reg = <VADC_LR_MUX3_BUF_XO_THERM>;
121				qcom,pre-scaling = <1 1>;
122				qcom,ratiometric;
123				qcom,hw-settle-time = <200>;
124			};
125		};
126
127		rtc@6000 {
128			compatible = "qcom,pm8941-rtc";
129			reg = <0x6000>;
130			reg-names = "rtc", "alarm";
131			interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;
132		};
133
134		pm8950_mpps: mpps@a000 {
135			compatible = "qcom,pm8950-mpp", "qcom,spmi-mpp";
136			reg = <0xa000>;
137			gpio-controller;
138			gpio-ranges = <&pm8950_mpps 0 0 4>;
139			#gpio-cells = <2>;
140			interrupt-controller;
141			#interrupt-cells = <2>;
142		};
143
144		pm8950_gpio: gpio@c000 {
145			compatible = "qcom,pm8950-gpio", "qcom,spmi-gpio";
146			reg = <0xc000>;
147			gpio-controller;
148			gpio-ranges = <&pm8950_gpio 0 0 8>;
149			#gpio-cells = <2>;
150			interrupt-controller;
151			#interrupt-cells = <2>;
152		};
153	};
154
155	pmic@1 {
156		compatible = "qcom,pm8950", "qcom,spmi-pmic";
157		reg = <0x1 SPMI_USID>;
158		#address-cells = <1>;
159		#size-cells = <0>;
160
161		pm8950_spmi_regulators: regulators {
162			compatible = "qcom,pm8950-regulators";
163		};
164	};
165};
166