xref: /linux/include/dt-bindings/iio/qcom,spmi-adc7-pm8350.h (revision 05909cd9a0c8811731b38697af13075e8954314f)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Copyright (c) 2020, The Linux Foundation. All rights reserved.
4  */
5 
6 #ifndef _DT_BINDINGS_QCOM_SPMI_VADC_PM8350_H
7 #define _DT_BINDINGS_QCOM_SPMI_VADC_PM8350_H
8 
9 #ifndef PM8350_SID
10 #define PM8350_SID					1
11 #endif
12 
13 /* ADC channels for PM8350_ADC for PMIC7 */
14 #define PM8350_ADC7_REF_GND			(PM8350_SID << 8 | 0x0)
15 #define PM8350_ADC7_1P25VREF			(PM8350_SID << 8 | 0x01)
16 #define PM8350_ADC7_VREF_VADC			(PM8350_SID << 8 | 0x02)
17 #define PM8350_ADC7_DIE_TEMP			(PM8350_SID << 8 | 0x03)
18 
19 #define PM8350_ADC7_AMUX_THM1			(PM8350_SID << 8 | 0x04)
20 #define PM8350_ADC7_AMUX_THM2			(PM8350_SID << 8 | 0x05)
21 #define PM8350_ADC7_AMUX_THM3			(PM8350_SID << 8 | 0x06)
22 #define PM8350_ADC7_AMUX_THM4			(PM8350_SID << 8 | 0x07)
23 #define PM8350_ADC7_AMUX_THM5			(PM8350_SID << 8 | 0x08)
24 #define PM8350_ADC7_GPIO1			(PM8350_SID << 8 | 0x0a)
25 #define PM8350_ADC7_GPIO2			(PM8350_SID << 8 | 0x0b)
26 #define PM8350_ADC7_GPIO3			(PM8350_SID << 8 | 0x0c)
27 #define PM8350_ADC7_GPIO4			(PM8350_SID << 8 | 0x0d)
28 
29 /* 30k pull-up1 */
30 #define PM8350_ADC7_AMUX_THM1_30K_PU		(PM8350_SID << 8 | 0x24)
31 #define PM8350_ADC7_AMUX_THM2_30K_PU		(PM8350_SID << 8 | 0x25)
32 #define PM8350_ADC7_AMUX_THM3_30K_PU		(PM8350_SID << 8 | 0x26)
33 #define PM8350_ADC7_AMUX_THM4_30K_PU		(PM8350_SID << 8 | 0x27)
34 #define PM8350_ADC7_AMUX_THM5_30K_PU		(PM8350_SID << 8 | 0x28)
35 #define PM8350_ADC7_GPIO1_30K_PU		(PM8350_SID << 8 | 0x2a)
36 #define PM8350_ADC7_GPIO2_30K_PU		(PM8350_SID << 8 | 0x2b)
37 #define PM8350_ADC7_GPIO3_30K_PU		(PM8350_SID << 8 | 0x2c)
38 #define PM8350_ADC7_GPIO4_30K_PU		(PM8350_SID << 8 | 0x2d)
39 
40 /* 100k pull-up2 */
41 #define PM8350_ADC7_AMUX_THM1_100K_PU		(PM8350_SID << 8 | 0x44)
42 #define PM8350_ADC7_AMUX_THM2_100K_PU		(PM8350_SID << 8 | 0x45)
43 #define PM8350_ADC7_AMUX_THM3_100K_PU		(PM8350_SID << 8 | 0x46)
44 #define PM8350_ADC7_AMUX_THM4_100K_PU		(PM8350_SID << 8 | 0x47)
45 #define PM8350_ADC7_AMUX_THM5_100K_PU		(PM8350_SID << 8 | 0x48)
46 #define PM8350_ADC7_GPIO1_100K_PU		(PM8350_SID << 8 | 0x4a)
47 #define PM8350_ADC7_GPIO2_100K_PU		(PM8350_SID << 8 | 0x4b)
48 #define PM8350_ADC7_GPIO3_100K_PU		(PM8350_SID << 8 | 0x4c)
49 #define PM8350_ADC7_GPIO4_100K_PU		(PM8350_SID << 8 | 0x4d)
50 
51 /* 400k pull-up3 */
52 #define PM8350_ADC7_AMUX_THM1_400K_PU		(PM8350_SID << 8 | 0x64)
53 #define PM8350_ADC7_AMUX_THM2_400K_PU		(PM8350_SID << 8 | 0x65)
54 #define PM8350_ADC7_AMUX_THM3_400K_PU		(PM8350_SID << 8 | 0x66)
55 #define PM8350_ADC7_AMUX_THM4_400K_PU		(PM8350_SID << 8 | 0x67)
56 #define PM8350_ADC7_AMUX_THM5_400K_PU		(PM8350_SID << 8 | 0x68)
57 #define PM8350_ADC7_GPIO1_400K_PU		(PM8350_SID << 8 | 0x6a)
58 #define PM8350_ADC7_GPIO2_400K_PU		(PM8350_SID << 8 | 0x6b)
59 #define PM8350_ADC7_GPIO3_400K_PU		(PM8350_SID << 8 | 0x6c)
60 #define PM8350_ADC7_GPIO4_400K_PU		(PM8350_SID << 8 | 0x6d)
61 
62 /* 1/3 Divider */
63 #define PM8350_ADC7_GPIO4_DIV3			(PM8350_SID << 8 | 0x8d)
64 
65 #define PM8350_ADC7_VPH_PWR			(PM8350_SID << 8 | 0x8e)
66 
67 #endif /* _DT_BINDINGS_QCOM_SPMI_VADC_PM8350_H */
68