Jonathon Hall | a86704a | 2023-09-14 14:41:20 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #ifndef CFG_GPIO_H |
| 4 | #define CFG_GPIO_H |
| 5 | |
| 6 | #include <gpio.h> |
| 7 | |
| 8 | static const struct pad_config gpio_table[] = { |
Jonathon Hall | a86704a | 2023-09-14 14:41:20 -0400 | [diff] [blame] | 9 | /* ------- GPIO Community 1 ------- */ |
| 10 | |
| 11 | /* ------- GPIO Group GPP_G ------- */ |
| 12 | PAD_NC(GPP_G0, NONE), /* GPIO */ |
| 13 | PAD_NC(GPP_G1, NONE), /* GPIO */ |
| 14 | PAD_NC(GPP_G2, NONE), /* GPIO */ |
| 15 | PAD_NC(GPP_G3, NONE), /* GPIO */ |
| 16 | PAD_NC(GPP_G4, NONE), /* GPIO */ |
| 17 | PAD_NC(GPP_G5, NONE), /* GPIO */ |
| 18 | PAD_NC(GPP_G6, NONE), /* GPIO */ |
| 19 | PAD_NC(GPP_G7, NONE), /* GPIO */ |
| 20 | |
| 21 | /* ------- GPIO Community 2 ------- */ |
| 22 | |
| 23 | /* ------- GPIO Group HVMOS ------- */ |
| 24 | |
| 25 | /* ------- GPIO Group GPP_E ------- */ |
| 26 | PAD_NC(GPP_E0, NONE), /* GPIO */ |
| 27 | /* GPP_E1 - ACCL_1_INT_N */ |
| 28 | PAD_CFG_GPI_TRIG_OWN(GPP_E1, NONE, PLTRST, OFF, DRIVER), /* GPIO */ |
| 29 | PAD_NC(GPP_E2, NONE), /* GPIO */ |
| 30 | PAD_NC(GPP_E3, NONE), /* GPIO */ |
| 31 | PAD_NC(GPP_E4, NONE), /* GPIO */ |
| 32 | PAD_NC(GPP_E5, NONE), /* GPIO */ |
| 33 | PAD_NC(GPP_E6, NONE), /* GPIO */ |
| 34 | PAD_NC(GPP_E7, NONE), /* GPIO */ |
| 35 | /* GPP_E8 - UART_BT_WAKE_N */ |
| 36 | //PAD_CFG_GPI_SCI(GPP_E8, NONE, DEEP, LEVEL, INVERT), /* GPIO */ |
| 37 | PAD_NC(GPP_E8, NONE), |
| 38 | PAD_NC(GPP_E9, NONE), /* GPIO */ |
| 39 | PAD_NC(GPP_E10, NONE), /* GPIO */ |
| 40 | PAD_NC(GPP_E11, NONE), /* GPIO */ |
| 41 | PAD_NC(GPP_E12, NONE), /* GPIO */ |
| 42 | PAD_NC(GPP_E13, NONE), /* GPIO */ |
| 43 | PAD_NC(GPP_E14, NONE), /* GPIO */ |
| 44 | PAD_NC(GPP_E15, NONE), /* GPIO */ |
| 45 | PAD_NC(GPP_E16, NONE), /* GPIO */ |
| 46 | PAD_NC(GPP_E17, NONE), /* GPIO */ |
| 47 | PAD_NC(GPP_E18, NONE), /* GPIO */ |
| 48 | PAD_NC(GPP_E19, NONE), /* GPIO */ |
| 49 | PAD_CFG_NF(GPP_E20, NONE, DEEP, NF1), /* CNV_BRI_DT */ |
| 50 | PAD_CFG_NF(GPP_E21, UP_20K, DEEP, NF1), /* CNV_BRI_RSP */ |
| 51 | PAD_CFG_NF(GPP_E22, NONE, DEEP, NF1), /* CNV_RGI_DT */ |
| 52 | PAD_CFG_NF(GPP_E23, UP_20K, DEEP, NF1), /* CNV_RGI_RSP */ |
| 53 | |
| 54 | /* ------- GPIO Community 4 ------- */ |
| 55 | |
| 56 | /* ------- GPIO Group GPD ------- */ |
| 57 | PAD_CFG_NF(GPD0, NONE, RSMRST, NF1), /* GPIO_BATLOWB */ |
| 58 | PAD_CFG_NF(GPD1, NATIVE, RSMRST, NF1), /* GPIO_ACPRESENT */ |
| 59 | /* GPD2 - SMC_WAKE_SCI_N */ |
| 60 | PAD_CFG_GPI_SCI(GPD2, NONE, DEEP, LEVEL, INVERT), /* GPIO */ |
| 61 | PAD_CFG_NF(GPD3, UP_20K, RSMRST, NF1), /* GPIO_PWRBTNB */ |
| 62 | PAD_CFG_NF(GPD4, NONE, RSMRST, NF1), /* GPIO_SLP_S3B */ |
| 63 | PAD_CFG_NF(GPD5, NONE, RSMRST, NF1), /* GPIO_SLP_S4B */ |
| 64 | PAD_CFG_NF(GPD6, NONE, DEEP, NF1), /* GPIO_SLP_AB */ |
| 65 | PAD_NC(GPD7, NONE), /* GPIO */ |
| 66 | PAD_CFG_NF(GPD8, NONE, RSMRST, NF1), /* GPIO_SUSCLK */ |
| 67 | PAD_CFG_NF(GPD9, NONE, DEEP, NF1), /* GPIO_SLP_WLANB */ |
| 68 | PAD_CFG_NF(GPD10, NONE, DEEP, NF1), /* GPIO_SLP_S5B */ |
| 69 | |
| 70 | /* ------- GPIO Community 5 ------- */ |
| 71 | |
| 72 | /* ------- GPIO Group GPP_H ------- */ |
| 73 | /* GPP_H0 - FPS_INT_N */ |
| 74 | PAD_CFG_GPI_APIC(GPP_H0, NONE, PLTRST, LEVEL, INVERT), /* GPIO */ |
| 75 | PAD_NC(GPP_H1, NONE), /* GPIO */ |
| 76 | PAD_CFG_NF(GPP_H2, NONE, DEEP, NF3), /* MODEM_CLKREQ */ |
| 77 | PAD_NC(GPP_H3, NONE), /* GPIO */ |
| 78 | PAD_CFG_NF(GPP_H4, NONE, DEEP, NF1), /* I2C2_SDA */ |
| 79 | PAD_CFG_NF(GPP_H5, NONE, DEEP, NF1), /* I2C2_SCL */ |
| 80 | PAD_CFG_NF(GPP_H6, NONE, DEEP, NF1), /* I2C3_SDA */ |
| 81 | PAD_CFG_NF(GPP_H7, NONE, DEEP, NF1), /* I2C3_SCL */ |
| 82 | PAD_NC(GPP_H8, NONE), /* GPIO */ |
| 83 | PAD_NC(GPP_H9, NONE), /* GPIO */ |
| 84 | PAD_NC(GPP_H10, NONE), /* GPIO */ |
| 85 | PAD_NC(GPP_H11, NONE), /* GPIO */ |
| 86 | PAD_CFG_NF(GPP_H12, NONE, DEEP, NF2), /* CNV_RF_RESETB */ |
| 87 | PAD_NC(GPP_H13, NONE), /* GPIO */ |
| 88 | PAD_NC(GPP_H14, NONE), /* GPIO */ |
| 89 | PAD_NC(GPP_H15, NONE), /* GPIO */ |
| 90 | /* GPP_H16 - FPS_RST_N */ |
| 91 | PAD_CFG_GPO(GPP_H16, 1, PLTRST), /* GPIO */ |
| 92 | PAD_NC(GPP_H17, NONE), /* GPIO */ |
| 93 | PAD_NC(GPP_H18, NONE), /* GPIO */ |
| 94 | PAD_NC(GPP_H19, NONE), /* GPIO */ |
| 95 | PAD_NC(GPP_H20, NONE), /* GPIO */ |
| 96 | PAD_NC(GPP_H21, NONE), /* GPIO */ |
| 97 | PAD_NC(GPP_H22, NONE), /* GPIO */ |
| 98 | PAD_NC(GPP_H23, NONE), /* GPIO */ |
| 99 | |
| 100 | /* ------- GPIO Group GPP_D ------- */ |
| 101 | PAD_NC(GPP_D0, NONE), /* GPIO */ |
| 102 | PAD_NC(GPP_D1, NONE), /* GPIO */ |
| 103 | /* GPP_D2 - EC_SMI_N */ |
| 104 | PAD_CFG_GPI_SMI(GPP_D2, NONE, PLTRST, LEVEL, INVERT), /* GPIO */ |
| 105 | PAD_NC(GPP_D3, NONE), /* GPIO */ |
| 106 | /* GPP_D4 - GPIO_DK (keyboard dock sense) */ |
| 107 | PAD_CFG_GPI_SCI(GPP_D4, NONE, DEEP, EDGE_BOTH, NONE), /* GPIO */ |
| 108 | /* GPP_D5 - SSD_RST_N (NVMe PERESET#) */ |
| 109 | PAD_CFG_GPO(GPP_D5, 1, PLTRST), /* GPIO */ |
| 110 | /* GPP_D6 - TCH_PNL_RST_N */ |
| 111 | PAD_CFG_GPO(GPP_D6, 1, PLTRST), /* GPIO */ |
| 112 | PAD_NC(GPP_D7, NONE), /* GPIO */ |
| 113 | PAD_NC(GPP_D8, NONE), /* GPIO */ |
| 114 | PAD_NC(GPP_D9, NONE), /* GPIO */ |
| 115 | PAD_NC(GPP_D10, NONE), /* GPIO */ |
| 116 | PAD_NC(GPP_D11, NONE), /* GPIO */ |
| 117 | PAD_NC(GPP_D12, NONE), /* GPIO */ |
| 118 | PAD_NC(GPP_D13, NONE), /* GPIO */ |
| 119 | PAD_NC(GPP_D14, NONE), /* GPIO */ |
| 120 | PAD_NC(GPP_D15, NONE), /* GPIO */ |
| 121 | PAD_NC(GPP_D16, NONE), /* GPIO */ |
| 122 | PAD_NC(GPP_D17, NONE), /* GPIO */ |
| 123 | PAD_NC(GPP_D18, NONE), /* GPIO */ |
| 124 | PAD_NC(GPP_D19, NONE), /* GPIO */ |
| 125 | PAD_NC(GPP_D20, NONE), /* GPIO */ |
| 126 | PAD_NC(GPP_D21, NONE), /* GPIO */ |
| 127 | PAD_NC(GPP_D22, NONE), /* GPIO */ |
| 128 | PAD_NC(GPP_D23, NONE), /* GPIO */ |
| 129 | |
| 130 | /* ------- GPIO Group VGPIO5 ------- */ |
| 131 | PAD_NC(VGPIO_0, NONE), /* GPIO */ |
| 132 | PAD_NC(VGPIO_3, NONE), /* GPIO */ |
| 133 | PAD_NC(VGPIO_4, NONE), /* GPIO */ |
| 134 | PAD_NC(VGPIO_5, NONE), /* GPIO */ |
| 135 | PAD_NC(VGPIO_6, NONE), /* GPIO */ |
| 136 | PAD_NC(VGPIO_7, NONE), /* GPIO */ |
| 137 | PAD_NC(VGPIO_8, NONE), /* GPIO */ |
| 138 | PAD_NC(VGPIO_9, NONE), /* GPIO */ |
| 139 | PAD_NC(VGPIO_10, NONE), /* GPIO */ |
| 140 | PAD_NC(VGPIO_11, NONE), /* GPIO */ |
| 141 | PAD_NC(VGPIO_12, NONE), /* GPIO */ |
| 142 | PAD_NC(VGPIO_13, NONE), /* GPIO */ |
| 143 | PAD_NC(VGPIO_18, NONE), /* GPIO */ |
| 144 | PAD_NC(VGPIO_19, NONE), /* GPIO */ |
| 145 | PAD_NC(VGPIO_20, NONE), /* GPIO */ |
| 146 | PAD_NC(VGPIO_21, NONE), /* GPIO */ |
| 147 | PAD_NC(VGPIO_22, NONE), /* GPIO */ |
| 148 | PAD_NC(VGPIO_23, NONE), /* GPIO */ |
| 149 | PAD_NC(VGPIO_24, NONE), /* GPIO */ |
| 150 | PAD_NC(VGPIO_25, NONE), /* GPIO */ |
| 151 | PAD_NC(VGPIO_30, NONE), /* GPIO */ |
| 152 | PAD_NC(VGPIO_31, NONE), /* GPIO */ |
| 153 | PAD_NC(VGPIO_32, NONE), /* GPIO */ |
| 154 | PAD_NC(VGPIO_33, NONE), /* GPIO */ |
| 155 | PAD_NC(VGPIO_34, NONE), /* GPIO */ |
| 156 | PAD_NC(VGPIO_35, NONE), /* GPIO */ |
| 157 | PAD_NC(VGPIO_36, NONE), /* GPIO */ |
| 158 | PAD_NC(VGPIO_37, NONE), /* GPIO */ |
| 159 | PAD_NC(VGPIO_39, NONE), /* GPIO */ |
| 160 | |
| 161 | /* ------- GPIO Group GPP_C ------- */ |
| 162 | PAD_NC(GPP_C0, NONE), /* GPIO */ |
| 163 | PAD_NC(GPP_C1, NONE), /* GPIO */ |
| 164 | PAD_NC(GPP_C2, NONE), /* GPIO */ |
| 165 | PAD_NC(GPP_C3, NONE), /* GPIO */ |
| 166 | PAD_NC(GPP_C4, NONE), /* GPIO */ |
| 167 | PAD_NC(GPP_C5, NONE), /* GPIO */ |
| 168 | PAD_NC(GPP_C6, NONE), /* GPIO */ |
| 169 | PAD_NC(GPP_C7, NONE), /* GPIO */ |
| 170 | PAD_CFG_GPO(GPP_C8, 1, PLTRST), /* GPIO */ |
| 171 | PAD_NC(GPP_C9, NONE), /* GPIO */ |
| 172 | PAD_NC(GPP_C10, NONE), /* GPIO */ |
| 173 | PAD_NC(GPP_C11, NONE), /* GPIO */ |
| 174 | /* GPP_C12 - TCH_PNL_INT_N */ |
| 175 | PAD_CFG_GPI_TRIG_OWN(GPP_C12, NONE, PLTRST, EDGE_SINGLE, DRIVER), /* GPIO */ |
| 176 | PAD_NC(GPP_C13, NONE), /* GPIO */ |
| 177 | PAD_NC(GPP_C14, NONE), /* GPIO */ |
| 178 | PAD_NC(GPP_C15, NONE), /* GPIO */ |
| 179 | PAD_NC(GPP_C16, NONE), /* GPIO */ |
| 180 | PAD_NC(GPP_C17, NONE), /* GPIO */ |
| 181 | PAD_NC(GPP_C18, NONE), /* GPIO */ |
| 182 | PAD_NC(GPP_C19, NONE), /* GPIO */ |
| 183 | /* GPP_C20, GPP_C21 configured in bootblock for UART2 */ |
| 184 | PAD_NC(GPP_C22, NONE), /* GPIO */ |
| 185 | PAD_NC(GPP_C23, NONE), /* GPIO */ |
| 186 | |
| 187 | /* ------- GPIO Community 6 ------- */ |
| 188 | |
| 189 | /* ------- GPIO Group GPP_F ------- */ |
| 190 | PAD_NC(GPP_F0, NONE), /* GPIO */ |
| 191 | PAD_NC(GPP_F1, NONE), /* GPIO */ |
| 192 | PAD_NC(GPP_F2, NONE), /* GPIO */ |
| 193 | PAD_NC(GPP_F3, NONE), /* GPIO */ |
| 194 | PAD_NC(GPP_F4, NONE), /* GPIO */ |
| 195 | PAD_NC(GPP_F5, NONE), /* GPIO */ |
| 196 | PAD_NC(GPP_F6, NONE), /* GPIO */ |
| 197 | PAD_NC(GPP_F7, NONE), /* GPIO */ |
| 198 | PAD_NC(GPP_F8, NONE), /* GPIO */ |
| 199 | PAD_NC(GPP_F9, NONE), /* GPIO */ |
| 200 | PAD_NC(GPP_F10, NONE), /* GPIO */ |
| 201 | PAD_NC(GPP_F11, NONE), /* GPIO */ |
| 202 | PAD_NC(GPP_F12, NONE), /* GPIO */ |
| 203 | PAD_NC(GPP_F13, NONE), /* GPIO */ |
| 204 | PAD_NC(GPP_F14, NONE), /* GPIO */ |
| 205 | PAD_NC(GPP_F15, NONE), /* GPIO */ |
| 206 | PAD_NC(GPP_F16, NONE), /* GPIO */ |
| 207 | PAD_NC(GPP_F17, NONE), /* GPIO */ |
| 208 | PAD_NC(GPP_F18, NONE), /* GPIO */ |
| 209 | PAD_NC(GPP_F19, NONE), /* GPIO */ |
| 210 | |
| 211 | /* ------- GPIO Group GPP_SPI ------- */ |
| 212 | |
| 213 | /* ------- GPIO Group GPP_B ------- */ |
| 214 | PAD_CFG_NF(GPP_B0, NONE, DEEP, NF1), /* GPIO_CORE_VID0 */ |
| 215 | PAD_CFG_NF(GPP_B1, NONE, DEEP, NF1), /* GPIO_CORE_VID1 */ |
| 216 | PAD_NC(GPP_B2, NONE), /* GPIO */ |
| 217 | PAD_NC(GPP_B3, NONE), /* GPIO */ |
| 218 | PAD_NC(GPP_B4, NONE), /* GPIO */ |
| 219 | PAD_CFG_NF(GPP_B5, NONE, DEEP, NF1), /* PCIE_CLKREQ0B */ |
| 220 | PAD_CFG_NF(GPP_B6, NONE, DEEP, NF1), /* PCIE_CLKREQ1B */ |
| 221 | PAD_NC(GPP_B7, NONE), /* GPIO */ |
| 222 | PAD_NC(GPP_B8, NONE), /* GPIO */ |
| 223 | PAD_NC(GPP_B9, NONE), /* GPIO */ |
| 224 | PAD_NC(GPP_B10, NONE), /* GPIO */ |
| 225 | PAD_NC(GPP_B11, NONE), /* GPIO */ |
| 226 | PAD_CFG_NF(GPP_B12, NONE, DEEP, NF1), /* GPIO_SLP_S0B */ |
| 227 | PAD_CFG_NF(GPP_B13, NONE, DEEP, NF1), /* GPIO_PLTRSTB */ |
| 228 | PAD_NC(GPP_B14, NONE), /* GPIO */ |
| 229 | PAD_NC(GPP_B15, NONE), /* GPIO */ |
| 230 | PAD_NC(GPP_B16, NONE), /* GPIO */ |
| 231 | /* GPP_B17 - PCIE_WLAN_RST_N_R */ |
| 232 | PAD_CFG_GPO(GPP_B17, 1, PLTRST), /* GPIO */ |
| 233 | PAD_NC(GPP_B18, NONE), /* GPIO */ |
| 234 | PAD_CFG_NF(GPP_B19, NONE, DEEP, NF1), /* GSPI1_CS0B */ |
| 235 | PAD_CFG_NF(GPP_B20, NONE, DEEP, NF1), /* GSPI1_CLK */ |
| 236 | PAD_CFG_NF(GPP_B21, NONE, DEEP, NF1), /* GSPI1_MISO */ |
| 237 | PAD_CFG_NF(GPP_B22, NONE, DEEP, NF1), /* GSPI1_MOSI */ |
| 238 | PAD_CFG_NF(GPP_B23, NONE, DEEP, NF1), /* DDI2_HPD */ |
| 239 | |
| 240 | /* ------- GPIO Group GPP_A ------- */ |
| 241 | PAD_CFG_NF(GPP_A0, UP_20K, DEEP, NF1), /* ESPI_IO_0 */ |
| 242 | PAD_CFG_NF(GPP_A1, UP_20K, DEEP, NF1), /* ESPI_IO_1 */ |
| 243 | PAD_CFG_NF(GPP_A2, UP_20K, DEEP, NF1), /* ESPI_IO_2 */ |
| 244 | PAD_CFG_NF(GPP_A3, UP_20K, DEEP, NF1), /* ESPI_IO_3 */ |
| 245 | PAD_CFG_NF(GPP_A4, UP_20K, DEEP, NF1), /* ESPI_CSB */ |
| 246 | PAD_CFG_NF(GPP_A5, DN_20K, DEEP, NF1), /* ESPI_CLK */ |
| 247 | PAD_CFG_NF(GPP_A6, NONE, DEEP, NF1), /* ESPI_RESETB */ |
| 248 | PAD_NC(GPP_A7, NONE), /* GPIO */ |
| 249 | PAD_NC(GPP_A8, NONE), /* GPIO */ |
| 250 | PAD_NC(GPP_A9, NONE), /* GPIO */ |
| 251 | PAD_NC(GPP_A10, NONE), /* GPIO */ |
| 252 | PAD_NC(GPP_A11, NONE), /* GPIO */ |
| 253 | PAD_NC(GPP_A12, NONE), /* GPIO */ |
| 254 | PAD_NC(GPP_A13, NONE), /* GPIO */ |
| 255 | PAD_NC(GPP_A14, NONE), /* GPIO */ |
| 256 | PAD_NC(GPP_A15, NONE), /* GPIO */ |
| 257 | PAD_CFG_NF(GPP_A16, NONE, DEEP, NF1), /* DDI1_HPD */ |
| 258 | PAD_CFG_NF(GPP_A17, NONE, DEEP, NF1), /* DDI0_HPD */ |
| 259 | PAD_NC(GPP_A18, NONE), /* GPIO */ |
| 260 | /* GPP_A19 - WWAN_DISABLE_3P3_N (actually for WLAN despite name) */ |
| 261 | PAD_CFG_GPO(GPP_A19, 1, PLTRST), /* GPIO */ |
| 262 | |
| 263 | /* ------- GPIO Group GPP_S ------- */ |
| 264 | PAD_NC(GPP_S0, NONE), /* GPIO */ |
| 265 | PAD_NC(GPP_S1, NONE), /* GPIO */ |
| 266 | PAD_NC(GPP_S2, NONE), /* GPIO */ |
| 267 | PAD_NC(GPP_S3, NONE), /* GPIO */ |
| 268 | PAD_NC(GPP_S4, NONE), /* GPIO */ |
| 269 | PAD_NC(GPP_S5, NONE), /* GPIO */ |
| 270 | PAD_NC(GPP_S6, NONE), /* GPIO */ |
| 271 | PAD_NC(GPP_S7, NONE), /* GPIO */ |
| 272 | |
| 273 | /* ------- GPIO Group GPP_R ------- */ |
| 274 | PAD_CFG_NF(GPP_R0, NONE, DEEP, NF1), /* HDA_BCLK */ |
| 275 | PAD_CFG_NF(GPP_R1, NATIVE, DEEP, NF1), /* HDA_SYNC */ |
| 276 | PAD_CFG_NF(GPP_R2, NATIVE, DEEP, NF1), /* HDA_SD0 */ |
| 277 | PAD_CFG_NF(GPP_R3, NATIVE, DEEP, NF1), /* HDA_SDI0 */ |
| 278 | PAD_CFG_NF(GPP_R4, NONE, DEEP, NF1), /* HDA_RSTB */ |
| 279 | PAD_NC(GPP_R5, NONE), /* GPIO */ |
| 280 | PAD_NC(GPP_R6, NONE), /* GPIO */ |
| 281 | PAD_NC(GPP_R7, NONE), /* GPIO */ |
| 282 | }; |
| 283 | |
| 284 | #endif /* CFG_GPIO_H */ |