Debian Codegraph @

scripts/dtc/include-prefixes/arm64/qcom/pm8150.dtsi

raw
1 // SPDX-License-Identifier: BSD-3-Clause
2 /*
3 * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
4 * Copyright (c) 2019, Linaro Limited
5 */
6
7 #include <dt-bindings/input/input.h>
8 #include <dt-bindings/interrupt-controller/irq.h>
9 #include <dt-bindings/spmi/spmi.h>
10 #include <dt-bindings/iio/qcom,spmi-vadc.h>
11
12 / {
13 thermal-zones {
14 pm8150-thermal {
15 polling-delay-passive = <100>;
16
17 thermal-sensors = <&pm8150_temp>;
18
19 trips {
20 trip0 {
21 temperature = <95000>;
22 hysteresis = <0>;
23 type = "passive";
24 };
25
26 trip1 {
27 temperature = <115000>;
28 hysteresis = <0>;
29 type = "hot";
30 };
31
32 trip2 {
33 temperature = <145000>;
34 hysteresis = <0>;
35 type = "critical";
36 };
37 };
38 };
39 };
40 };
41
42 &spmi_bus {
43 pm8150_0: pmic@0 {
44 compatible = "qcom,pm8150", "qcom,spmi-pmic";
45 reg = <0x0 SPMI_USID>;
46 #address-cells = <1>;
47 #size-cells = <0>;
48
49 pon: pon@800 {
50 compatible = "qcom,pm8998-pon";
51 reg = <0x0800>;
52
53 pon_pwrkey: pwrkey {
54 compatible = "qcom,pm8941-pwrkey";
55 interrupts = <0x0 0x8 0x0 IRQ_TYPE_EDGE_BOTH>;
56 debounce = <15625>;
57 bias-pull-up;
58 linux,code = <KEY_POWER>;
59
60 status = "disabled";
61 };
62
63 pon_resin: resin {
64 compatible = "qcom,pm8941-resin";
65 interrupts = <0x0 0x8 0x1 IRQ_TYPE_EDGE_BOTH>;
66 debounce = <15625>;
67 bias-pull-up;
68
69 status = "disabled";
70 };
71 };
72
73 pm8150_temp: temp-alarm@2400 {
74 compatible = "qcom,spmi-temp-alarm";
75 reg = <0x2400>;
76 interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_BOTH>;
77 io-channels = <&pm8150_adc ADC5_DIE_TEMP>;
78 io-channel-names = "thermal";
79 #thermal-sensor-cells = <0>;
80 };
81
82 pm8150_adc: adc@3100 {
83 compatible = "qcom,spmi-adc5";
84 reg = <0x3100>;
85 #address-cells = <1>;
86 #size-cells = <0>;
87 #io-channel-cells = <1>;
88 interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
89
90 channel@0 {
91 reg = <ADC5_REF_GND>;
92 qcom,pre-scaling = <1 1>;
93 label = "ref_gnd";
94 };
95
96 channel@1 {
97 reg = <ADC5_1P25VREF>;
98 qcom,pre-scaling = <1 1>;
99 label = "vref_1p25";
100 };
101
102 channel@6 {
103 reg = <ADC5_DIE_TEMP>;
104 qcom,pre-scaling = <1 1>;
105 label = "die_temp";
106 };
107 };
108
109 pm8150_adc_tm: adc-tm@3500 {
110 compatible = "qcom,spmi-adc-tm5";
111 reg = <0x3500>;
112 interrupts = <0x0 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
113 #thermal-sensor-cells = <1>;
114 #address-cells = <1>;
115 #size-cells = <0>;
116 status = "disabled";
117 };
118
119 rtc@6000 {
120 compatible = "qcom,pm8941-rtc";
121 reg = <0x6000>, <0x6100>;
122 reg-names = "rtc", "alarm";
123 interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;
124 };
125
126 pm8150_gpios: gpio@c000 {
127 compatible = "qcom,pm8150-gpio", "qcom,spmi-gpio";
128 reg = <0xc000>;
129 gpio-controller;
130 gpio-ranges = <&pm8150_gpios 0 0 10>;
131 #gpio-cells = <2>;
132 interrupt-controller;
133 #interrupt-cells = <2>;
134 };
135 };
136
137 pmic@1 {
138 compatible = "qcom,pm8150", "qcom,spmi-pmic";
139 reg = <0x1 SPMI_USID>;
140 #address-cells = <1>;
141 #size-cells = <0>;
142 };
143 };