xref: /freebsd/sys/contrib/device-tree/src/arm/qcom/pm8058.dtsi (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
1*8d13bc63SEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0
2*8d13bc63SEmmanuel Vadot
3*8d13bc63SEmmanuel Vadot&ssbi {
4*8d13bc63SEmmanuel Vadot	pm8058: pmic {
5*8d13bc63SEmmanuel Vadot		compatible = "qcom,pm8058";
6*8d13bc63SEmmanuel Vadot		#interrupt-cells = <2>;
7*8d13bc63SEmmanuel Vadot		interrupt-controller;
8*8d13bc63SEmmanuel Vadot		#address-cells = <1>;
9*8d13bc63SEmmanuel Vadot		#size-cells = <0>;
10*8d13bc63SEmmanuel Vadot
11*8d13bc63SEmmanuel Vadot		pwrkey@1c {
12*8d13bc63SEmmanuel Vadot			compatible = "qcom,pm8058-pwrkey";
13*8d13bc63SEmmanuel Vadot			reg = <0x1c>;
14*8d13bc63SEmmanuel Vadot			interrupts-extended = <&pm8058 50 IRQ_TYPE_EDGE_RISING>,
15*8d13bc63SEmmanuel Vadot					      <&pm8058 51 IRQ_TYPE_EDGE_RISING>;
16*8d13bc63SEmmanuel Vadot			debounce = <15625>;
17*8d13bc63SEmmanuel Vadot			pull-up;
18*8d13bc63SEmmanuel Vadot		};
19*8d13bc63SEmmanuel Vadot
20*8d13bc63SEmmanuel Vadot		pm8058_led48: led@48 {
21*8d13bc63SEmmanuel Vadot			compatible = "qcom,pm8058-keypad-led";
22*8d13bc63SEmmanuel Vadot			reg = <0x48>;
23*8d13bc63SEmmanuel Vadot			status = "disabled";
24*8d13bc63SEmmanuel Vadot		};
25*8d13bc63SEmmanuel Vadot
26*8d13bc63SEmmanuel Vadot		vibrator@4a {
27*8d13bc63SEmmanuel Vadot			compatible = "qcom,pm8058-vib";
28*8d13bc63SEmmanuel Vadot			reg = <0x4a>;
29*8d13bc63SEmmanuel Vadot		};
30*8d13bc63SEmmanuel Vadot
31*8d13bc63SEmmanuel Vadot		pm8058_mpps: mpps@50 {
32*8d13bc63SEmmanuel Vadot			compatible = "qcom,pm8058-mpp",
33*8d13bc63SEmmanuel Vadot				     "qcom,ssbi-mpp";
34*8d13bc63SEmmanuel Vadot			reg = <0x50>;
35*8d13bc63SEmmanuel Vadot			gpio-controller;
36*8d13bc63SEmmanuel Vadot			#gpio-cells = <2>;
37*8d13bc63SEmmanuel Vadot			gpio-ranges = <&pm8058_mpps 0 0 12>;
38*8d13bc63SEmmanuel Vadot			interrupt-controller;
39*8d13bc63SEmmanuel Vadot			#interrupt-cells = <2>;
40*8d13bc63SEmmanuel Vadot		};
41*8d13bc63SEmmanuel Vadot
42*8d13bc63SEmmanuel Vadot		pm8058_led131: led@131 {
43*8d13bc63SEmmanuel Vadot			compatible = "qcom,pm8058-led";
44*8d13bc63SEmmanuel Vadot			reg = <0x131>;
45*8d13bc63SEmmanuel Vadot			status = "disabled";
46*8d13bc63SEmmanuel Vadot		};
47*8d13bc63SEmmanuel Vadot
48*8d13bc63SEmmanuel Vadot		pm8058_led132: led@132 {
49*8d13bc63SEmmanuel Vadot			compatible = "qcom,pm8058-led";
50*8d13bc63SEmmanuel Vadot			reg = <0x132>;
51*8d13bc63SEmmanuel Vadot			status = "disabled";
52*8d13bc63SEmmanuel Vadot		};
53*8d13bc63SEmmanuel Vadot
54*8d13bc63SEmmanuel Vadot		pm8058_led133: led@133 {
55*8d13bc63SEmmanuel Vadot			compatible = "qcom,pm8058-led";
56*8d13bc63SEmmanuel Vadot			reg = <0x133>;
57*8d13bc63SEmmanuel Vadot			status = "disabled";
58*8d13bc63SEmmanuel Vadot		};
59*8d13bc63SEmmanuel Vadot
60*8d13bc63SEmmanuel Vadot		pm8058_keypad: keypad@148 {
61*8d13bc63SEmmanuel Vadot			compatible = "qcom,pm8058-keypad";
62*8d13bc63SEmmanuel Vadot			reg = <0x148>;
63*8d13bc63SEmmanuel Vadot			interrupts-extended = <&pm8058 74 IRQ_TYPE_EDGE_RISING>,
64*8d13bc63SEmmanuel Vadot					      <&pm8058 75 IRQ_TYPE_EDGE_RISING>;
65*8d13bc63SEmmanuel Vadot			debounce = <15>;
66*8d13bc63SEmmanuel Vadot			scan-delay = <32>;
67*8d13bc63SEmmanuel Vadot			row-hold = <91500>;
68*8d13bc63SEmmanuel Vadot		};
69*8d13bc63SEmmanuel Vadot
70*8d13bc63SEmmanuel Vadot		pm8058_gpio: gpio@150 {
71*8d13bc63SEmmanuel Vadot			compatible = "qcom,pm8058-gpio",
72*8d13bc63SEmmanuel Vadot				     "qcom,ssbi-gpio";
73*8d13bc63SEmmanuel Vadot			reg = <0x150>;
74*8d13bc63SEmmanuel Vadot			interrupt-controller;
75*8d13bc63SEmmanuel Vadot			#interrupt-cells = <2>;
76*8d13bc63SEmmanuel Vadot			gpio-controller;
77*8d13bc63SEmmanuel Vadot			gpio-ranges = <&pm8058_gpio 0 0 44>;
78*8d13bc63SEmmanuel Vadot			#gpio-cells = <2>;
79*8d13bc63SEmmanuel Vadot		};
80*8d13bc63SEmmanuel Vadot
81*8d13bc63SEmmanuel Vadot		pm8058_xoadc: xoadc@197 {
82*8d13bc63SEmmanuel Vadot			compatible = "qcom,pm8058-adc";
83*8d13bc63SEmmanuel Vadot			reg = <0x197>;
84*8d13bc63SEmmanuel Vadot			interrupts-extended = <&pm8058 76 IRQ_TYPE_EDGE_RISING>;
85*8d13bc63SEmmanuel Vadot			#address-cells = <2>;
86*8d13bc63SEmmanuel Vadot			#size-cells = <0>;
87*8d13bc63SEmmanuel Vadot			#io-channel-cells = <2>;
88*8d13bc63SEmmanuel Vadot
89*8d13bc63SEmmanuel Vadot			vcoin: adc-channel@0 {
90*8d13bc63SEmmanuel Vadot				reg = <0x00 0x00>;
91*8d13bc63SEmmanuel Vadot			};
92*8d13bc63SEmmanuel Vadot
93*8d13bc63SEmmanuel Vadot			vbat: adc-channel@1 {
94*8d13bc63SEmmanuel Vadot				reg = <0x00 0x01>;
95*8d13bc63SEmmanuel Vadot			};
96*8d13bc63SEmmanuel Vadot
97*8d13bc63SEmmanuel Vadot			dcin: adc-channel@2 {
98*8d13bc63SEmmanuel Vadot				reg = <0x00 0x02>;
99*8d13bc63SEmmanuel Vadot			};
100*8d13bc63SEmmanuel Vadot
101*8d13bc63SEmmanuel Vadot			ichg: adc-channel@3 {
102*8d13bc63SEmmanuel Vadot				reg = <0x00 0x03>;
103*8d13bc63SEmmanuel Vadot			};
104*8d13bc63SEmmanuel Vadot
105*8d13bc63SEmmanuel Vadot			vph_pwr: adc-channel@4 {
106*8d13bc63SEmmanuel Vadot				reg = <0x00 0x04>;
107*8d13bc63SEmmanuel Vadot			};
108*8d13bc63SEmmanuel Vadot
109*8d13bc63SEmmanuel Vadot			usb_vbus: adc-channel@a {
110*8d13bc63SEmmanuel Vadot				reg = <0x00 0x0a>;
111*8d13bc63SEmmanuel Vadot			};
112*8d13bc63SEmmanuel Vadot
113*8d13bc63SEmmanuel Vadot			die_temp: adc-channel@b {
114*8d13bc63SEmmanuel Vadot				reg = <0x00 0x0b>;
115*8d13bc63SEmmanuel Vadot			};
116*8d13bc63SEmmanuel Vadot
117*8d13bc63SEmmanuel Vadot			ref_625mv: adc-channel@c {
118*8d13bc63SEmmanuel Vadot				reg = <0x00 0x0c>;
119*8d13bc63SEmmanuel Vadot			};
120*8d13bc63SEmmanuel Vadot
121*8d13bc63SEmmanuel Vadot			ref_1250mv: adc-channel@d {
122*8d13bc63SEmmanuel Vadot				reg = <0x00 0x0d>;
123*8d13bc63SEmmanuel Vadot			};
124*8d13bc63SEmmanuel Vadot
125*8d13bc63SEmmanuel Vadot			ref_325mv: adc-channel@e {
126*8d13bc63SEmmanuel Vadot				reg = <0x00 0x0e>;
127*8d13bc63SEmmanuel Vadot			};
128*8d13bc63SEmmanuel Vadot
129*8d13bc63SEmmanuel Vadot			ref_muxoff: adc-channel@f {
130*8d13bc63SEmmanuel Vadot				reg = <0x00 0x0f>;
131*8d13bc63SEmmanuel Vadot			};
132*8d13bc63SEmmanuel Vadot		};
133*8d13bc63SEmmanuel Vadot
134*8d13bc63SEmmanuel Vadot		rtc@1e8 {
135*8d13bc63SEmmanuel Vadot			compatible = "qcom,pm8058-rtc";
136*8d13bc63SEmmanuel Vadot			reg = <0x1e8>;
137*8d13bc63SEmmanuel Vadot			interrupts-extended = <&pm8058 39 IRQ_TYPE_EDGE_RISING>;
138*8d13bc63SEmmanuel Vadot			allow-set-time;
139*8d13bc63SEmmanuel Vadot		};
140*8d13bc63SEmmanuel Vadot	};
141*8d13bc63SEmmanuel Vadot};
142*8d13bc63SEmmanuel Vadot
143*8d13bc63SEmmanuel Vadot/ {
144*8d13bc63SEmmanuel Vadot	/*
145*8d13bc63SEmmanuel Vadot	 * These channels from the ADC are simply hardware monitors.
146*8d13bc63SEmmanuel Vadot	 * That is why the ADC is referred to as "HKADC" - HouseKeeping
147*8d13bc63SEmmanuel Vadot	 * ADC.
148*8d13bc63SEmmanuel Vadot	 */
149*8d13bc63SEmmanuel Vadot	iio-hwmon {
150*8d13bc63SEmmanuel Vadot		compatible = "iio-hwmon";
151*8d13bc63SEmmanuel Vadot		io-channels = <&pm8058_xoadc 0x00 0x01>, /* Battery */
152*8d13bc63SEmmanuel Vadot			      <&pm8058_xoadc 0x00 0x02>, /* DC in (charger) */
153*8d13bc63SEmmanuel Vadot			      <&pm8058_xoadc 0x00 0x04>, /* VPH the main system voltage */
154*8d13bc63SEmmanuel Vadot			      <&pm8058_xoadc 0x00 0x0b>, /* Die temperature */
155*8d13bc63SEmmanuel Vadot			      <&pm8058_xoadc 0x00 0x0c>, /* Reference voltage 1.25V */
156*8d13bc63SEmmanuel Vadot			      <&pm8058_xoadc 0x00 0x0d>, /* Reference voltage 0.625V */
157*8d13bc63SEmmanuel Vadot			      <&pm8058_xoadc 0x00 0x0e>; /* Reference voltage 0.325V */
158*8d13bc63SEmmanuel Vadot	};
159*8d13bc63SEmmanuel Vadot};
160