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