summaryrefslogtreecommitdiff
path: root/arch/arm/boot/dts/qcom/pm8058.dtsi
blob: 984b797779846096e83342646eec8a24981616e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
// SPDX-License-Identifier: GPL-2.0

&ssbi {
	pm8058: pmic {
		compatible = "qcom,pm8058";
		#interrupt-cells = <2>;
		interrupt-controller;
		#address-cells = <1>;
		#size-cells = <0>;

		pwrkey@1c {
			compatible = "qcom,pm8058-pwrkey";
			reg = <0x1c>;
			interrupts-extended = <&pm8058 50 IRQ_TYPE_EDGE_RISING>,
					      <&pm8058 51 IRQ_TYPE_EDGE_RISING>;
			debounce = <15625>;
			pull-up;
		};

		pm8058_led48: led@48 {
			compatible = "qcom,pm8058-keypad-led";
			reg = <0x48>;
			status = "disabled";
		};

		vibrator@4a {
			compatible = "qcom,pm8058-vib";
			reg = <0x4a>;
		};

		pm8058_mpps: mpps@50 {
			compatible = "qcom,pm8058-mpp",
				     "qcom,ssbi-mpp";
			reg = <0x50>;
			gpio-controller;
			#gpio-cells = <2>;
			gpio-ranges = <&pm8058_mpps 0 0 12>;
			interrupt-controller;
			#interrupt-cells = <2>;
		};

		pm8058_led131: led@131 {
			compatible = "qcom,pm8058-led";
			reg = <0x131>;
			status = "disabled";
		};

		pm8058_led132: led@132 {
			compatible = "qcom,pm8058-led";
			reg = <0x132>;
			status = "disabled";
		};

		pm8058_led133: led@133 {
			compatible = "qcom,pm8058-led";
			reg = <0x133>;
			status = "disabled";
		};

		pm8058_keypad: keypad@148 {
			compatible = "qcom,pm8058-keypad";
			reg = <0x148>;
			interrupts-extended = <&pm8058 74 IRQ_TYPE_EDGE_RISING>,
					      <&pm8058 75 IRQ_TYPE_EDGE_RISING>;
			debounce = <15>;
			scan-delay = <32>;
			row-hold = <91500>;
		};

		pm8058_gpio: gpio@150 {
			compatible = "qcom,pm8058-gpio",
				     "qcom,ssbi-gpio";
			reg = <0x150>;
			interrupt-controller;
			#interrupt-cells = <2>;
			gpio-controller;
			gpio-ranges = <&pm8058_gpio 0 0 44>;
			#gpio-cells = <2>;
		};

		pm8058_xoadc: xoadc@197 {
			compatible = "qcom,pm8058-adc";
			reg = <0x197>;
			interrupts-extended = <&pm8058 76 IRQ_TYPE_EDGE_RISING>;
			#address-cells = <2>;
			#size-cells = <0>;
			#io-channel-cells = <2>;

			vcoin: adc-channel@0 {
				reg = <0x00 0x00>;
			};

			vbat: adc-channel@1 {
				reg = <0x00 0x01>;
			};

			dcin: adc-channel@2 {
				reg = <0x00 0x02>;
			};

			ichg: adc-channel@3 {
				reg = <0x00 0x03>;
			};

			vph_pwr: adc-channel@4 {
				reg = <0x00 0x04>;
			};

			usb_vbus: adc-channel@a {
				reg = <0x00 0x0a>;
			};

			die_temp: adc-channel@b {
				reg = <0x00 0x0b>;
			};

			ref_625mv: adc-channel@c {
				reg = <0x00 0x0c>;
			};

			ref_1250mv: adc-channel@d {
				reg = <0x00 0x0d>;
			};

			ref_325mv: adc-channel@e {
				reg = <0x00 0x0e>;
			};

			ref_muxoff: adc-channel@f {
				reg = <0x00 0x0f>;
			};
		};

		rtc@1e8 {
			compatible = "qcom,pm8058-rtc";
			reg = <0x1e8>;
			interrupts-extended = <&pm8058 39 IRQ_TYPE_EDGE_RISING>;
			allow-set-time;
		};
	};
};

/ {
	/*
	 * These channels from the ADC are simply hardware monitors.
	 * That is why the ADC is referred to as "HKADC" - HouseKeeping
	 * ADC.
	 */
	iio-hwmon {
		compatible = "iio-hwmon";
		io-channels = <&pm8058_xoadc 0x00 0x01>, /* Battery */
			      <&pm8058_xoadc 0x00 0x02>, /* DC in (charger) */
			      <&pm8058_xoadc 0x00 0x04>, /* VPH the main system voltage */
			      <&pm8058_xoadc 0x00 0x0b>, /* Die temperature */
			      <&pm8058_xoadc 0x00 0x0c>, /* Reference voltage 1.25V */
			      <&pm8058_xoadc 0x00 0x0d>, /* Reference voltage 0.625V */
			      <&pm8058_xoadc 0x00 0x0e>; /* Reference voltage 0.325V */
	};
};