blob: 64e2dc7183f33a8df2f5ad079ebc37faa7a320bf [file] [log] [blame]
Bjorn Andersson43059f62014-10-22 12:58:44 +03001/*
2 * This header provides constants for the Qualcomm PMIC GPIO binding.
3 */
4
5#ifndef _DT_BINDINGS_PINCTRL_QCOM_PMIC_GPIO_H
6#define _DT_BINDINGS_PINCTRL_QCOM_PMIC_GPIO_H
7
8#define PMIC_GPIO_PULL_UP_30 0
9#define PMIC_GPIO_PULL_UP_1P5 1
10#define PMIC_GPIO_PULL_UP_31P5 2
11#define PMIC_GPIO_PULL_UP_1P5_30 3
12
13#define PMIC_GPIO_STRENGTH_NO 0
14#define PMIC_GPIO_STRENGTH_HIGH 1
15#define PMIC_GPIO_STRENGTH_MED 2
16#define PMIC_GPIO_STRENGTH_LOW 3
17
18/*
19 * Note: PM8018 GPIO3 and GPIO4 are supporting
20 * only S3 and L2 options (1.8V)
21 */
22#define PM8018_GPIO_L6 0
23#define PM8018_GPIO_L5 1
24#define PM8018_GPIO_S3 2
25#define PM8018_GPIO_L14 3
26#define PM8018_GPIO_L2 4
27#define PM8018_GPIO_L4 5
28#define PM8018_GPIO_VDD 6
29
30/*
31 * Note: PM8038 GPIO7 and GPIO8 are supporting
32 * only L11 and L4 options (1.8V)
33 */
34#define PM8038_GPIO_VPH 0
35#define PM8038_GPIO_BB 1
36#define PM8038_GPIO_L11 2
37#define PM8038_GPIO_L15 3
38#define PM8038_GPIO_L4 4
39#define PM8038_GPIO_L3 5
40#define PM8038_GPIO_L17 6
41
42#define PM8058_GPIO_VPH 0
43#define PM8058_GPIO_BB 1
44#define PM8058_GPIO_S3 2
45#define PM8058_GPIO_L3 3
46#define PM8058_GPIO_L7 4
47#define PM8058_GPIO_L6 5
48#define PM8058_GPIO_L5 6
49#define PM8058_GPIO_L2 7
50
Ivan T. Ivanov7414b092015-03-31 12:37:18 +030051/*
52 * Note: PM8916 GPIO1 and GPIO2 are supporting
53 * only L2(1.15V) and L5(1.8V) options
54 */
55#define PM8916_GPIO_VPH 0
56#define PM8916_GPIO_L2 2
57#define PM8916_GPIO_L5 3
58
Bjorn Andersson43059f62014-10-22 12:58:44 +030059#define PM8917_GPIO_VPH 0
60#define PM8917_GPIO_S4 2
61#define PM8917_GPIO_L15 3
62#define PM8917_GPIO_L4 4
63#define PM8917_GPIO_L3 5
64#define PM8917_GPIO_L17 6
65
66#define PM8921_GPIO_VPH 0
67#define PM8921_GPIO_BB 1
68#define PM8921_GPIO_S4 2
69#define PM8921_GPIO_L15 3
70#define PM8921_GPIO_L4 4
71#define PM8921_GPIO_L3 5
72#define PM8921_GPIO_L17 6
73
74/*
75 * Note: PM8941 gpios from 15 to 18 are supporting
76 * only S3 and L6 options (1.8V)
77 */
78#define PM8941_GPIO_VPH 0
79#define PM8941_GPIO_L1 1
80#define PM8941_GPIO_S3 2
81#define PM8941_GPIO_L6 3
82
83/*
84 * Note: PMA8084 gpios from 15 to 18 are supporting
85 * only S4 and L6 options (1.8V)
86 */
87#define PMA8084_GPIO_VPH 0
88#define PMA8084_GPIO_L1 1
89#define PMA8084_GPIO_S4 2
90#define PMA8084_GPIO_L6 3
91
Fenglin Wu60a05cb2016-07-21 14:32:24 +080092/* ATEST MUX selection for analog-pass-through mode */
93#define PMIC_GPIO_AOUT_ATEST1 0
94#define PMIC_GPIO_AOUT_ATEST2 1
95#define PMIC_GPIO_AOUT_ATEST3 2
96#define PMIC_GPIO_AOUT_ATEST4 3
97
Fenglin Wuf6c0e702016-07-21 15:33:03 +080098/* DTEST buffer for digital input mode */
99#define PMIC_GPIO_DIN_DTEST1 0
100#define PMIC_GPIO_DIN_DTEST2 1
101#define PMIC_GPIO_DIN_DTEST3 2
102#define PMIC_GPIO_DIN_DTEST4 3
103
Bjorn Andersson43059f62014-10-22 12:58:44 +0300104/* To be used with "function" */
105#define PMIC_GPIO_FUNC_NORMAL "normal"
106#define PMIC_GPIO_FUNC_PAIRED "paired"
107#define PMIC_GPIO_FUNC_FUNC1 "func1"
108#define PMIC_GPIO_FUNC_FUNC2 "func2"
Fenglin Wu60a05cb2016-07-21 14:32:24 +0800109#define PMIC_GPIO_FUNC_FUNC3 "func3"
110#define PMIC_GPIO_FUNC_FUNC4 "func4"
Bjorn Andersson43059f62014-10-22 12:58:44 +0300111#define PMIC_GPIO_FUNC_DTEST1 "dtest1"
112#define PMIC_GPIO_FUNC_DTEST2 "dtest2"
113#define PMIC_GPIO_FUNC_DTEST3 "dtest3"
114#define PMIC_GPIO_FUNC_DTEST4 "dtest4"
Fenglin Wu60a05cb2016-07-21 14:32:24 +0800115#define PMIC_GPIO_FUNC_ANALOG "analog"
Bjorn Andersson43059f62014-10-22 12:58:44 +0300116
117#define PM8038_GPIO1_2_LPG_DRV PMIC_GPIO_FUNC_FUNC1
118#define PM8038_GPIO3_5V_BOOST_EN PMIC_GPIO_FUNC_FUNC1
119#define PM8038_GPIO4_SSBI_ALT_CLK PMIC_GPIO_FUNC_FUNC1
120#define PM8038_GPIO5_6_EXT_REG_EN PMIC_GPIO_FUNC_FUNC1
121#define PM8038_GPIO10_11_EXT_REG_EN PMIC_GPIO_FUNC_FUNC1
122#define PM8038_GPIO6_7_CLK PMIC_GPIO_FUNC_FUNC1
123#define PM8038_GPIO9_BAT_ALRM_OUT PMIC_GPIO_FUNC_FUNC1
124#define PM8038_GPIO6_12_KYPD_DRV PMIC_GPIO_FUNC_FUNC2
125
126#define PM8058_GPIO7_8_MP3_CLK PMIC_GPIO_FUNC_FUNC1
127#define PM8058_GPIO7_8_BCLK_19P2MHZ PMIC_GPIO_FUNC_FUNC2
128#define PM8058_GPIO9_26_KYPD_DRV PMIC_GPIO_FUNC_FUNC1
129#define PM8058_GPIO21_23_UART_TX PMIC_GPIO_FUNC_FUNC2
130#define PM8058_GPIO24_26_LPG_DRV PMIC_GPIO_FUNC_FUNC2
131#define PM8058_GPIO33_BCLK_19P2MHZ PMIC_GPIO_FUNC_FUNC1
132#define PM8058_GPIO34_35_MP3_CLK PMIC_GPIO_FUNC_FUNC1
133#define PM8058_GPIO36_BCLK_19P2MHZ PMIC_GPIO_FUNC_FUNC1
134#define PM8058_GPIO37_UPL_OUT PMIC_GPIO_FUNC_FUNC1
135#define PM8058_GPIO37_UART_M_RX PMIC_GPIO_FUNC_FUNC2
136#define PM8058_GPIO38_XO_SLEEP_CLK PMIC_GPIO_FUNC_FUNC1
137#define PM8058_GPIO38_39_CLK_32KHZ PMIC_GPIO_FUNC_FUNC2
138#define PM8058_GPIO39_MP3_CLK PMIC_GPIO_FUNC_FUNC1
139#define PM8058_GPIO40_EXT_BB_EN PMIC_GPIO_FUNC_FUNC1
140
Ivan T. Ivanov7414b092015-03-31 12:37:18 +0300141#define PM8916_GPIO1_BAT_ALRM_OUT PMIC_GPIO_FUNC_FUNC1
142#define PM8916_GPIO1_KEYP_DRV PMIC_GPIO_FUNC_FUNC2
143#define PM8916_GPIO2_DIV_CLK PMIC_GPIO_FUNC_FUNC1
144#define PM8916_GPIO2_SLEEP_CLK PMIC_GPIO_FUNC_FUNC2
145#define PM8916_GPIO3_KEYP_DRV PMIC_GPIO_FUNC_FUNC1
146#define PM8916_GPIO4_KEYP_DRV PMIC_GPIO_FUNC_FUNC2
147
Bjorn Andersson43059f62014-10-22 12:58:44 +0300148#define PM8917_GPIO9_18_KEYP_DRV PMIC_GPIO_FUNC_FUNC1
149#define PM8917_GPIO20_BAT_ALRM_OUT PMIC_GPIO_FUNC_FUNC1
150#define PM8917_GPIO21_23_UART_TX PMIC_GPIO_FUNC_FUNC2
151#define PM8917_GPIO25_26_EXT_REG_EN PMIC_GPIO_FUNC_FUNC1
152#define PM8917_GPIO37_38_XO_SLEEP_CLK PMIC_GPIO_FUNC_FUNC1
153#define PM8917_GPIO37_38_MP3_CLK PMIC_GPIO_FUNC_FUNC2
154
155#define PM8941_GPIO9_14_KYPD_DRV PMIC_GPIO_FUNC_FUNC1
156#define PM8941_GPIO15_18_DIV_CLK PMIC_GPIO_FUNC_FUNC1
157#define PM8941_GPIO15_18_SLEEP_CLK PMIC_GPIO_FUNC_FUNC2
158#define PM8941_GPIO23_26_KYPD_DRV PMIC_GPIO_FUNC_FUNC1
159#define PM8941_GPIO23_26_LPG_DRV_HI PMIC_GPIO_FUNC_FUNC2
160#define PM8941_GPIO31_BAT_ALRM_OUT PMIC_GPIO_FUNC_FUNC1
161#define PM8941_GPIO33_36_LPG_DRV_3D PMIC_GPIO_FUNC_FUNC1
162#define PM8941_GPIO33_36_LPG_DRV_HI PMIC_GPIO_FUNC_FUNC2
163
164#define PMA8084_GPIO4_5_LPG_DRV PMIC_GPIO_FUNC_FUNC1
165#define PMA8084_GPIO7_10_LPG_DRV PMIC_GPIO_FUNC_FUNC1
166#define PMA8084_GPIO5_14_KEYP_DRV PMIC_GPIO_FUNC_FUNC2
167#define PMA8084_GPIO19_21_KEYP_DRV PMIC_GPIO_FUNC_FUNC2
168#define PMA8084_GPIO15_18_DIV_CLK PMIC_GPIO_FUNC_FUNC1
169#define PMA8084_GPIO15_18_SLEEP_CLK PMIC_GPIO_FUNC_FUNC2
170#define PMA8084_GPIO22_BAT_ALRM_OUT PMIC_GPIO_FUNC_FUNC1
171
172#endif