]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - src/arm64/qcom/pm8916.dtsi
Import DTS files from Linux 4.20
[FreeBSD/FreeBSD.git] / src / arm64 / qcom / pm8916.dtsi
1 // SPDX-License-Identifier: GPL-2.0
2 #include <dt-bindings/iio/qcom,spmi-vadc.h>
3 #include <dt-bindings/interrupt-controller/irq.h>
4 #include <dt-bindings/input/linux-event-codes.h>
5 #include <dt-bindings/spmi/spmi.h>
6
7 &spmi_bus {
8
9         pm8916_0: pm8916@0 {
10                 compatible = "qcom,pm8916", "qcom,spmi-pmic";
11                 reg = <0x0 SPMI_USID>;
12                 #address-cells = <1>;
13                 #size-cells = <0>;
14
15                 rtc@6000 {
16                         compatible = "qcom,pm8941-rtc";
17                         reg = <0x6000>;
18                         reg-names = "rtc", "alarm";
19                         interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
20                 };
21
22                 pon@800 {
23                         compatible = "qcom,pm8916-pon";
24                         reg = <0x800>;
25                         mode-bootloader = <0x2>;
26                         mode-recovery = <0x1>;
27
28                         pwrkey {
29                                 compatible = "qcom,pm8941-pwrkey";
30                                 interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
31                                 debounce = <15625>;
32                                 bias-pull-up;
33                                 linux,code = <KEY_POWER>;
34                         };
35                 };
36
37                 pm8916_gpios: gpios@c000 {
38                         compatible = "qcom,pm8916-gpio";
39                         reg = <0xc000>;
40                         gpio-controller;
41                         #gpio-cells = <2>;
42                         interrupts = <0 0xc0 0 IRQ_TYPE_NONE>,
43                                      <0 0xc1 0 IRQ_TYPE_NONE>,
44                                      <0 0xc2 0 IRQ_TYPE_NONE>,
45                                      <0 0xc3 0 IRQ_TYPE_NONE>;
46                 };
47
48                 pm8916_mpps: mpps@a000 {
49                         compatible = "qcom,pm8916-mpp";
50                         reg = <0xa000>;
51                         gpio-controller;
52                         #gpio-cells = <2>;
53                         interrupts = <0 0xa0 0 IRQ_TYPE_NONE>,
54                                      <0 0xa1 0 IRQ_TYPE_NONE>,
55                                      <0 0xa2 0 IRQ_TYPE_NONE>,
56                                      <0 0xa3 0 IRQ_TYPE_NONE>;
57                 };
58
59                 pm8916_temp: temp-alarm@2400 {
60                         compatible = "qcom,spmi-temp-alarm";
61                         reg = <0x2400>;
62                         interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>;
63                         io-channels = <&pm8916_vadc VADC_DIE_TEMP>;
64                         io-channel-names = "thermal";
65                         #thermal-sensor-cells = <0>;
66                 };
67
68                 pm8916_vadc: vadc@3100 {
69                         compatible = "qcom,spmi-vadc";
70                         reg = <0x3100>;
71                         interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
72                         #address-cells = <1>;
73                         #size-cells = <0>;
74                         #io-channel-cells = <1>;
75
76                         usb_in {
77                                 reg = <VADC_USBIN>;
78                                 qcom,pre-scaling = <1 10>;
79                         };
80                         vph_pwr {
81                                 reg = <VADC_VSYS>;
82                                 qcom,pre-scaling = <1 3>;
83                         };
84                         die_temp {
85                                 reg = <VADC_DIE_TEMP>;
86                         };
87                         ref_625mv {
88                                 reg = <VADC_REF_625MV>;
89                         };
90                         ref_1250v {
91                                 reg = <VADC_REF_1250MV>;
92                         };
93                         ref_gnd {
94                                 reg = <VADC_GND_REF>;
95                         };
96                         ref_vdd {
97                                 reg = <VADC_VDD_VADC>;
98                         };
99                 };
100         };
101
102         pm8916_1: pm8916@1 {
103                 compatible = "qcom,pm8916", "qcom,spmi-pmic";
104                 reg = <0x1 SPMI_USID>;
105                 #address-cells = <1>;
106                 #size-cells = <0>;
107
108                 wcd_codec: codec@f000 {
109                         compatible = "qcom,pm8916-wcd-analog-codec";
110                         reg = <0xf000 0x200>;
111                         reg-names = "pmic-codec-core";
112                         clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>;
113                         clock-names = "mclk";
114                         interrupt-parent = <&spmi_bus>;
115                         interrupts = <0x1 0xf0 0x0 IRQ_TYPE_NONE>,
116                                      <0x1 0xf0 0x1 IRQ_TYPE_NONE>,
117                                      <0x1 0xf0 0x2 IRQ_TYPE_NONE>,
118                                      <0x1 0xf0 0x3 IRQ_TYPE_NONE>,
119                                      <0x1 0xf0 0x4 IRQ_TYPE_NONE>,
120                                      <0x1 0xf0 0x5 IRQ_TYPE_NONE>,
121                                      <0x1 0xf0 0x6 IRQ_TYPE_NONE>,
122                                      <0x1 0xf0 0x7 IRQ_TYPE_NONE>,
123                                      <0x1 0xf1 0x0 IRQ_TYPE_NONE>,
124                                      <0x1 0xf1 0x1 IRQ_TYPE_NONE>,
125                                      <0x1 0xf1 0x2 IRQ_TYPE_NONE>,
126                                      <0x1 0xf1 0x3 IRQ_TYPE_NONE>,
127                                      <0x1 0xf1 0x4 IRQ_TYPE_NONE>,
128                                      <0x1 0xf1 0x5 IRQ_TYPE_NONE>;
129                         interrupt-names = "cdc_spk_cnp_int",
130                                           "cdc_spk_clip_int",
131                                           "cdc_spk_ocp_int",
132                                           "mbhc_ins_rem_det1",
133                                           "mbhc_but_rel_det",
134                                           "mbhc_but_press_det",
135                                           "mbhc_ins_rem_det",
136                                           "mbhc_switch_int",
137                                           "cdc_ear_ocp_int",
138                                           "cdc_hphr_ocp_int",
139                                           "cdc_hphl_ocp_det",
140                                           "cdc_ear_cnp_int",
141                                           "cdc_hphr_cnp_int",
142                                           "cdc_hphl_cnp_int";
143                         vdd-cdc-io-supply = <&pm8916_l5>;
144                         vdd-cdc-tx-rx-cx-supply = <&pm8916_l5>;
145                         vdd-micbias-supply = <&pm8916_l13>;
146                         #sound-dai-cells = <1>;
147                 };
148         };
149 };