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