hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/arch/arm64/boot/dts/qcom/pm8916.dtsi
....@@ -1,40 +1,92 @@
11 // SPDX-License-Identifier: GPL-2.0
22 #include <dt-bindings/iio/qcom,spmi-vadc.h>
3
+#include <dt-bindings/input/linux-event-codes.h>
34 #include <dt-bindings/interrupt-controller/irq.h>
45 #include <dt-bindings/spmi/spmi.h>
56
67 &spmi_bus {
78
8
- pm8916_0: pm8916@0 {
9
+ pm8916_0: pmic@0 {
910 compatible = "qcom,pm8916", "qcom,spmi-pmic";
1011 reg = <0x0 SPMI_USID>;
1112 #address-cells = <1>;
1213 #size-cells = <0>;
1314
15
+ pon@800 {
16
+ compatible = "qcom,pm8916-pon";
17
+ reg = <0x800>;
18
+ mode-bootloader = <0x2>;
19
+ mode-recovery = <0x1>;
20
+
21
+ pwrkey {
22
+ compatible = "qcom,pm8941-pwrkey";
23
+ interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
24
+ debounce = <15625>;
25
+ bias-pull-up;
26
+ linux,code = <KEY_POWER>;
27
+ };
28
+
29
+ pm8916_resin: resin {
30
+ compatible = "qcom,pm8941-resin";
31
+ interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
32
+ debounce = <15625>;
33
+ bias-pull-up;
34
+ status = "disabled";
35
+ };
36
+
37
+ watchdog {
38
+ compatible = "qcom,pm8916-wdt";
39
+ interrupts = <0x0 0x8 6 IRQ_TYPE_EDGE_RISING>;
40
+ timeout-sec = <60>;
41
+ };
42
+ };
43
+
44
+ pm8916_temp: temp-alarm@2400 {
45
+ compatible = "qcom,spmi-temp-alarm";
46
+ reg = <0x2400>;
47
+ interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>;
48
+ io-channels = <&pm8916_vadc VADC_DIE_TEMP>;
49
+ io-channel-names = "thermal";
50
+ #thermal-sensor-cells = <0>;
51
+ };
52
+
53
+ pm8916_vadc: adc@3100 {
54
+ compatible = "qcom,spmi-vadc";
55
+ reg = <0x3100>;
56
+ interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
57
+ #address-cells = <1>;
58
+ #size-cells = <0>;
59
+ #io-channel-cells = <1>;
60
+
61
+ adc-chan@0 {
62
+ reg = <VADC_USBIN>;
63
+ qcom,pre-scaling = <1 10>;
64
+ };
65
+ adc-chan@7 {
66
+ reg = <VADC_VSYS>;
67
+ qcom,pre-scaling = <1 3>;
68
+ };
69
+ adc-chan@8 {
70
+ reg = <VADC_DIE_TEMP>;
71
+ };
72
+ adc-chan@9 {
73
+ reg = <VADC_REF_625MV>;
74
+ };
75
+ adc-chan@a {
76
+ reg = <VADC_REF_1250MV>;
77
+ };
78
+ adc-chan@e {
79
+ reg = <VADC_GND_REF>;
80
+ };
81
+ adc-chan@f {
82
+ reg = <VADC_VDD_VADC>;
83
+ };
84
+ };
85
+
1486 rtc@6000 {
1587 compatible = "qcom,pm8941-rtc";
1688 reg = <0x6000>;
17
- reg-names = "rtc", "alarm";
1889 interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
19
- };
20
-
21
- pwrkey@800 {
22
- compatible = "qcom,pm8941-pwrkey";
23
- reg = <0x800>;
24
- interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
25
- debounce = <15625>;
26
- bias-pull-up;
27
- };
28
-
29
- pm8916_gpios: gpios@c000 {
30
- compatible = "qcom,pm8916-gpio";
31
- reg = <0xc000>;
32
- gpio-controller;
33
- #gpio-cells = <2>;
34
- interrupts = <0 0xc0 0 IRQ_TYPE_NONE>,
35
- <0 0xc1 0 IRQ_TYPE_NONE>,
36
- <0 0xc2 0 IRQ_TYPE_NONE>,
37
- <0 0xc3 0 IRQ_TYPE_NONE>;
3890 };
3991
4092 pm8916_mpps: mpps@a000 {
....@@ -48,56 +100,31 @@
48100 <0 0xa3 0 IRQ_TYPE_NONE>;
49101 };
50102
51
- pm8916_temp: temp-alarm@2400 {
52
- compatible = "qcom,spmi-temp-alarm";
53
- reg = <0x2400>;
54
- interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>;
55
- io-channels = <&pm8916_vadc VADC_DIE_TEMP>;
56
- io-channel-names = "thermal";
57
- #thermal-sensor-cells = <0>;
58
- };
59
-
60
- pm8916_vadc: vadc@3100 {
61
- compatible = "qcom,spmi-vadc";
62
- reg = <0x3100>;
63
- interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
64
- #address-cells = <1>;
65
- #size-cells = <0>;
66
- #io-channel-cells = <1>;
67
-
68
- usb_in {
69
- reg = <VADC_USBIN>;
70
- qcom,pre-scaling = <1 10>;
71
- };
72
- vph_pwr {
73
- reg = <VADC_VSYS>;
74
- qcom,pre-scaling = <1 3>;
75
- };
76
- die_temp {
77
- reg = <VADC_DIE_TEMP>;
78
- };
79
- ref_625mv {
80
- reg = <VADC_REF_625MV>;
81
- };
82
- ref_1250v {
83
- reg = <VADC_REF_1250MV>;
84
- };
85
- ref_gnd {
86
- reg = <VADC_GND_REF>;
87
- };
88
- ref_vdd {
89
- reg = <VADC_VDD_VADC>;
90
- };
103
+ pm8916_gpios: gpios@c000 {
104
+ compatible = "qcom,pm8916-gpio";
105
+ reg = <0xc000>;
106
+ gpio-controller;
107
+ #gpio-cells = <2>;
108
+ interrupts = <0 0xc0 0 IRQ_TYPE_NONE>,
109
+ <0 0xc1 0 IRQ_TYPE_NONE>,
110
+ <0 0xc2 0 IRQ_TYPE_NONE>,
111
+ <0 0xc3 0 IRQ_TYPE_NONE>;
91112 };
92113 };
93114
94
- pm8916_1: pm8916@1 {
115
+ pm8916_1: pmic@1 {
95116 compatible = "qcom,pm8916", "qcom,spmi-pmic";
96117 reg = <0x1 SPMI_USID>;
97118 #address-cells = <1>;
98119 #size-cells = <0>;
99120
100
- wcd_codec: codec@f000 {
121
+ pm8916_vib: vibrator@c000 {
122
+ compatible = "qcom,pm8916-vib";
123
+ reg = <0xc000>;
124
+ status = "disabled";
125
+ };
126
+
127
+ wcd_codec: audio-codec@f000 {
101128 compatible = "qcom,pm8916-wcd-analog-codec";
102129 reg = <0xf000>;
103130 reg-names = "pmic-codec-core";