xref: /linux/arch/arm64/boot/dts/qcom/pm8953.dtsi (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
1// SPDX-License-Identifier: BSD-3-Clause
2/* Copyright (c) 2022, The Linux Foundation. All rights reserved. */
3
4#include <dt-bindings/iio/qcom,spmi-vadc.h>
5#include <dt-bindings/interrupt-controller/irq.h>
6#include <dt-bindings/input/linux-event-codes.h>
7#include <dt-bindings/spmi/spmi.h>
8
9/ {
10	thermal-zones {
11		pm8953-thermal {
12			thermal-sensors = <&pm8953_temp>;
13
14			trips {
15				trip0 {
16					temperature = <105000>;
17					hysteresis = <0>;
18					type = "passive";
19				};
20
21				trip1 {
22					temperature = <125000>;
23					hysteresis = <0>;
24					type = "hot";
25				};
26
27				trip2 {
28					temperature = <145000>;
29					hysteresis = <0>;
30					type = "critical";
31				};
32			};
33		};
34	};
35};
36
37&spmi_bus {
38	pmic@0 {
39		compatible = "qcom,pm8953", "qcom,spmi-pmic";
40		reg = <0 SPMI_USID>;
41		#address-cells = <1>;
42		#size-cells = <0>;
43
44		pm8953_pon: pon@800 {
45			compatible = "qcom,pm8916-pon";
46			reg = <0x800>;
47			mode-bootloader = <0x2>;
48			mode-recovery = <0x1>;
49
50			pwrkey {
51				compatible = "qcom,pm8941-pwrkey";
52				interrupts = <0x00 0x08 0 IRQ_TYPE_EDGE_BOTH>;
53				debounce = <15625>;
54				bias-pull-up;
55				linux,code = <KEY_POWER>;
56			};
57
58			pm8953_resin: resin {
59				compatible = "qcom,pm8941-resin";
60				interrupts = <0x00 0x08 1 IRQ_TYPE_EDGE_BOTH>;
61				debounce = <15625>;
62				bias-pull-up;
63				status = "disabled";
64			};
65		};
66
67		pm8953_temp: temp-alarm@2400 {
68			compatible = "qcom,spmi-temp-alarm";
69			reg = <0x2400>;
70			interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
71			io-channels = <&pm8953_vadc VADC_DIE_TEMP>;
72			io-channel-names = "thermal";
73			#thermal-sensor-cells = <0>;
74		};
75
76		pm8953_vadc: adc@3100 {
77			compatible = "qcom,spmi-vadc";
78			reg = <0x3100>;
79			interrupts = <0x00 0x31 0x00 0x01>;
80			#address-cells = <1>;
81			#size-cells = <0>;
82			#io-channel-cells = <1>;
83
84			channel@8 {
85				reg = <VADC_DIE_TEMP>;
86			};
87			channel@9 {
88				reg = <VADC_REF_625MV>;
89			};
90			channel@a {
91				reg = <VADC_REF_1250MV>;
92			};
93			channel@c {
94				reg = <VADC_SPARE1>;
95			};
96			channel@e {
97				reg = <VADC_GND_REF>;
98			};
99			channel@f {
100				reg = <VADC_VDD_VADC>;
101			};
102		};
103
104		rtc@6000 {
105			compatible = "qcom,pm8941-rtc";
106			reg = <0x6000>, <0x6100>;
107			reg-names = "rtc", "alarm";
108			interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
109		};
110
111		pm8953_gpios: gpio@c000 {
112			compatible = "qcom,pm8953-gpio", "qcom,spmi-gpio";
113			reg = <0xc000>;
114			gpio-controller;
115			gpio-ranges = <&pm8953_gpios 0 0 8>;
116			#gpio-cells = <2>;
117			interrupt-controller;
118			#interrupt-cells = <2>;
119		};
120	};
121
122	pmic@1 {
123		compatible = "qcom,pm8953", "qcom,spmi-pmic";
124		reg = <1 SPMI_USID>;
125		#address-cells = <1>;
126		#size-cells = <0>;
127	};
128};
129