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