]> git.ipfire.org Git - thirdparty/u-boot.git/blob - src/arm64/qcom/pm8953.dtsi
Squashed 'dts/upstream/' content from commit aaba2d45dc2a
[thirdparty/u-boot.git] / src / arm64 / qcom / pm8953.dtsi
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 polling-delay-passive = <0>;
13 polling-delay = <0>;
14
15 thermal-sensors = <&pm8953_temp>;
16
17 trips {
18 trip0 {
19 temperature = <105000>;
20 hysteresis = <0>;
21 type = "passive";
22 };
23
24 trip1 {
25 temperature = <125000>;
26 hysteresis = <0>;
27 type = "hot";
28 };
29
30 trip2 {
31 temperature = <145000>;
32 hysteresis = <0>;
33 type = "critical";
34 };
35 };
36 };
37 };
38 };
39
40 &spmi_bus {
41 pmic@0 {
42 compatible = "qcom,pm8953", "qcom,spmi-pmic";
43 reg = <0 SPMI_USID>;
44 #address-cells = <1>;
45 #size-cells = <0>;
46
47 pm8953_pon: pon@800 {
48 compatible = "qcom,pm8916-pon";
49 reg = <0x800>;
50 mode-bootloader = <0x2>;
51 mode-recovery = <0x1>;
52
53 pwrkey {
54 compatible = "qcom,pm8941-pwrkey";
55 interrupts = <0x00 0x08 0 IRQ_TYPE_EDGE_BOTH>;
56 debounce = <15625>;
57 bias-pull-up;
58 linux,code = <KEY_POWER>;
59 };
60
61 pm8953_resin: resin {
62 compatible = "qcom,pm8941-resin";
63 interrupts = <0x00 0x08 1 IRQ_TYPE_EDGE_BOTH>;
64 debounce = <15625>;
65 bias-pull-up;
66 status = "disabled";
67 };
68 };
69
70 pm8953_temp: temp-alarm@2400 {
71 compatible = "qcom,spmi-temp-alarm";
72 reg = <0x2400>;
73 interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
74 io-channels = <&pm8953_vadc VADC_DIE_TEMP>;
75 io-channel-names = "thermal";
76 #thermal-sensor-cells = <0>;
77 };
78
79 pm8953_vadc: adc@3100 {
80 compatible = "qcom,spmi-vadc";
81 reg = <0x3100>;
82 interrupts = <0x00 0x31 0x00 0x01>;
83 #address-cells = <1>;
84 #size-cells = <0>;
85 #io-channel-cells = <1>;
86
87 channel@8 {
88 reg = <VADC_DIE_TEMP>;
89 };
90 channel@9 {
91 reg = <VADC_REF_625MV>;
92 };
93 channel@a {
94 reg = <VADC_REF_1250MV>;
95 };
96 channel@c {
97 reg = <VADC_SPARE1>;
98 };
99 channel@e {
100 reg = <VADC_GND_REF>;
101 };
102 channel@f {
103 reg = <VADC_VDD_VADC>;
104 };
105 };
106
107 rtc@6000 {
108 compatible = "qcom,pm8941-rtc";
109 reg = <0x6000>, <0x6100>;
110 reg-names = "rtc", "alarm";
111 interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
112 };
113
114 pm8953_gpios: gpio@c000 {
115 compatible = "qcom,pm8953-gpio", "qcom,spmi-gpio";
116 reg = <0xc000>;
117 gpio-controller;
118 gpio-ranges = <&pm8953_gpios 0 0 8>;
119 #gpio-cells = <2>;
120 interrupt-controller;
121 #interrupt-cells = <2>;
122 };
123 };
124
125 pmic@1 {
126 compatible = "qcom,pm8953", "qcom,spmi-pmic";
127 reg = <1 SPMI_USID>;
128 #address-cells = <1>;
129 #size-cells = <0>;
130 };
131 };