xref: /openbmc/linux/arch/arm64/boot/dts/qcom/pm8916.dtsi (revision 4cff79e9)
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/spmi/spmi.h>
5
6&spmi_bus {
7
8	pm8916_0: pm8916@0 {
9		compatible = "qcom,pm8916", "qcom,spmi-pmic";
10		reg = <0x0 SPMI_USID>;
11		#address-cells = <1>;
12		#size-cells = <0>;
13
14		rtc@6000 {
15			compatible = "qcom,pm8941-rtc";
16			reg = <0x6000>;
17			reg-names = "rtc", "alarm";
18			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>;
38		};
39
40		pm8916_mpps: mpps@a000 {
41			compatible = "qcom,pm8916-mpp";
42			reg = <0xa000>;
43			gpio-controller;
44			#gpio-cells = <2>;
45			interrupts = <0 0xa0 0 IRQ_TYPE_NONE>,
46				     <0 0xa1 0 IRQ_TYPE_NONE>,
47				     <0 0xa2 0 IRQ_TYPE_NONE>,
48				     <0 0xa3 0 IRQ_TYPE_NONE>;
49		};
50
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			};
91		};
92	};
93
94	pm8916_1: pm8916@1 {
95		compatible = "qcom,pm8916", "qcom,spmi-pmic";
96		reg = <0x1 SPMI_USID>;
97		#address-cells = <1>;
98		#size-cells = <0>;
99
100		wcd_codec: codec@f000 {
101			compatible = "qcom,pm8916-wcd-analog-codec";
102			reg = <0xf000 0x200>;
103			reg-names = "pmic-codec-core";
104			clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>;
105			clock-names = "mclk";
106			interrupt-parent = <&spmi_bus>;
107			interrupts = <0x1 0xf0 0x0 IRQ_TYPE_NONE>,
108				     <0x1 0xf0 0x1 IRQ_TYPE_NONE>,
109				     <0x1 0xf0 0x2 IRQ_TYPE_NONE>,
110				     <0x1 0xf0 0x3 IRQ_TYPE_NONE>,
111				     <0x1 0xf0 0x4 IRQ_TYPE_NONE>,
112				     <0x1 0xf0 0x5 IRQ_TYPE_NONE>,
113				     <0x1 0xf0 0x6 IRQ_TYPE_NONE>,
114				     <0x1 0xf0 0x7 IRQ_TYPE_NONE>,
115				     <0x1 0xf1 0x0 IRQ_TYPE_NONE>,
116				     <0x1 0xf1 0x1 IRQ_TYPE_NONE>,
117				     <0x1 0xf1 0x2 IRQ_TYPE_NONE>,
118				     <0x1 0xf1 0x3 IRQ_TYPE_NONE>,
119				     <0x1 0xf1 0x4 IRQ_TYPE_NONE>,
120				     <0x1 0xf1 0x5 IRQ_TYPE_NONE>;
121			interrupt-names = "cdc_spk_cnp_int",
122					  "cdc_spk_clip_int",
123					  "cdc_spk_ocp_int",
124					  "mbhc_ins_rem_det1",
125					  "mbhc_but_rel_det",
126					  "mbhc_but_press_det",
127					  "mbhc_ins_rem_det",
128					  "mbhc_switch_int",
129					  "cdc_ear_ocp_int",
130					  "cdc_hphr_ocp_int",
131					  "cdc_hphl_ocp_det",
132					  "cdc_ear_cnp_int",
133					  "cdc_hphr_cnp_int",
134					  "cdc_hphl_cnp_int";
135			vdd-cdc-io-supply = <&pm8916_l5>;
136			vdd-cdc-tx-rx-cx-supply = <&pm8916_l5>;
137			vdd-micbias-supply = <&pm8916_l13>;
138			#sound-dai-cells = <1>;
139		};
140	};
141};
142