Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #include <gpio.h> |
| 4 | #include <soc/meminit.h> |
| 5 | #include <soc/romstage.h> |
| 6 | #include <string.h> |
| 7 | #include <variants.h> |
| 8 | #include <types.h> |
| 9 | |
| 10 | /* Early pad configuration in bootblock. */ |
| 11 | const struct pad_config early_gpio_table[] = { |
| 12 | /* GPIO_64: UART2_TXD */ |
| 13 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_64, UP_20K, DEEP, NF1, HIZCRx1, DISPUPD), |
| 14 | /* GPIO_65: UART2_RXD */ |
| 15 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_65, UP_20K, DEEP, NF1, TxLASTRxE, DISPUPD), |
| 16 | }; |
| 17 | |
| 18 | const struct pad_config *variant_early_gpio_table(size_t *num) |
| 19 | { |
| 20 | *num = ARRAY_SIZE(early_gpio_table); |
| 21 | return early_gpio_table; |
| 22 | } |
| 23 | |
| 24 | /* Pad configuration in ramstage. */ |
| 25 | const struct pad_config gpio_table[] = { |
| 26 | /* ------- GPIO Group NorthWest ------- */ |
| 27 | /* GPIO_0: XDP_H_TCK */ |
| 28 | PAD_NC(GPIO_0, DN_20K), |
| 29 | /* GPIO_1: XDP_H_TRST_N */ |
| 30 | PAD_NC(GPIO_1, DN_20K), |
| 31 | /* GPIO_2: XDP_H_TMS */ |
| 32 | PAD_NC(GPIO_2, DN_20K), |
| 33 | /* GPIO_3: XDP_H_TDI */ |
| 34 | PAD_NC(GPIO_3, DN_20K), |
| 35 | /* GPIO_4: XDP_H_TDO */ |
| 36 | PAD_NC(GPIO_4, DN_20K), |
| 37 | /* GPIO_5: Not Connected */ |
| 38 | PAD_NC(GPIO_5, DN_20K), |
| 39 | /* GPIO_6: XDP_H_PREQ_N */ |
| 40 | PAD_NC(GPIO_6, DN_20K), |
| 41 | /* GPIO_7: XDP_H_PRDY_N */ |
| 42 | PAD_NC(GPIO_7, DN_20K), |
| 43 | /* GPIO_8: Not Connected */ |
| 44 | PAD_NC(GPIO_8, DN_20K), |
| 45 | /* GPIO_9: Not Connected */ |
| 46 | PAD_NC(GPIO_9, DN_20K), |
| 47 | /* GPIO_10: Not Connected */ |
| 48 | PAD_NC(GPIO_10, DN_20K), |
| 49 | /* GPIO_11: Not Connected */ |
| 50 | PAD_NC(GPIO_11, DN_20K), |
| 51 | /* GPIO_12: Not Connected */ |
| 52 | PAD_NC(GPIO_12, DN_20K), |
| 53 | /* GPIO_13: Not Connected */ |
| 54 | PAD_NC(GPIO_13, DN_20K), |
| 55 | /* GPIO_14: Not Connected */ |
| 56 | PAD_NC(GPIO_14, DN_20K), |
| 57 | /* GPIO_15: Not Connected */ |
| 58 | PAD_NC(GPIO_15, DN_20K), |
| 59 | /* GPIO_16: Not Connected */ |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 60 | PAD_NC(GPIO_16, NONE), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 61 | /* GPIO_17: Not Connected */ |
| 62 | PAD_NC(GPIO_17, DN_20K), |
| 63 | /* GPIO_18: Not Connected */ |
| 64 | PAD_NC(GPIO_18, DN_20K), |
| 65 | /* GPIO_19: PMIC_IRQ# */ |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 66 | PAD_CFG_GPI_APIC_IOS(GPIO_19, UP_20K, DEEP, EDGE_SINGLE, NONE, TxDRxE, SAME), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 67 | /* GPIO_20: Not Connected */ |
| 68 | PAD_NC(GPIO_20, DN_20K), |
| 69 | /* GPIO_21: Not Connected */ |
| 70 | PAD_NC(GPIO_21, DN_20K), |
| 71 | /* GPIO_22: Not Connected */ |
| 72 | PAD_NC(GPIO_22, DN_20K), |
| 73 | /* GPIO_23: Not Connected */ |
| 74 | PAD_NC(GPIO_23, DN_20K), |
| 75 | /* GPIO_24: Not Connected */ |
| 76 | PAD_NC(GPIO_24, DN_20K), |
| 77 | /* GPIO_25: Not Connected */ |
| 78 | PAD_NC(GPIO_25, DN_20K), |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 79 | /* GPIO_26: TPNL_INT# */ |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 80 | PAD_NC(GPIO_26, DN_20K), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 81 | /* GPIO_27: eMMC Strap */ |
| 82 | PAD_NC(GPIO_27, NONE), |
| 83 | /* GPIO_28: SPI Strap */ |
| 84 | PAD_NC(GPIO_28, NONE), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 85 | /* GPIO_29: Not Connected */ |
| 86 | PAD_NC(GPIO_29, DN_20K), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 87 | /* GPIO_30: Not Connected */ |
| 88 | PAD_NC(GPIO_30, DN_20K), |
| 89 | /* GPIO_31: Not Connected */ |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 90 | PAD_NC(GPIO_31, DN_20K), |
| 91 | /* GPIO_32: SAR_PROX_RST */ |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 92 | PAD_NC(GPIO_32, DN_20K), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 93 | /* GPIO_33: Not Connected */ |
| 94 | PAD_NC(GPIO_33, DN_20K), |
| 95 | /* GPIO_34: Not Connected */ |
| 96 | PAD_NC(GPIO_34, DN_20K), |
| 97 | /* GPIO_35: Not Connected */ |
| 98 | PAD_NC(GPIO_35, DN_20K), |
| 99 | /* GPIO_36: Not Connected */ |
| 100 | PAD_NC(GPIO_36, DN_20K), |
| 101 | /* GPIO_37: Not Connected */ |
| 102 | PAD_NC(GPIO_37, DN_20K), |
| 103 | /* GPIO_38: WAKE_SCI# */ |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 104 | PAD_CFG_GPI_SCI_IOS(GPIO_38, UP_20K, DEEP, EDGE_SINGLE, INVERT, IGNORE, SAME), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 105 | /* GPIO_39: FP_RST# */ |
| 106 | PAD_NC(GPIO_39, DN_20K), |
| 107 | /* GPIO_40: Not Connected */ |
| 108 | PAD_NC(GPIO_40, DN_20K), |
| 109 | /* GPIO_41: Not Connected */ |
| 110 | PAD_NC(GPIO_41, DN_20K), |
| 111 | /* GPIO_42: SECURITY_FLASH */ |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 112 | PAD_NC(GPIO_42, DN_20K), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 113 | /* GPIO_43: GPIO_43 */ |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 114 | PAD_NC(GPIO_43, DN_20K), |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 115 | /* GPIO_44: USB OC0 */ |
| 116 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_44, UP_20K, DEEP, NF1, TxDRxE, ENPU), |
| 117 | /* GPIO_45: USB_OC1 */ |
| 118 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_45, UP_20K, DEEP, NF1, TxDRxE, ENPU), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 119 | /* GPIO_46: Not Connected */ |
| 120 | PAD_NC(GPIO_46, DN_20K), |
| 121 | /* GPIO_47: Not Connected */ |
| 122 | PAD_NC(GPIO_47, DN_20K), |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 123 | /* GPIO_48: PMC_I2C_SDA */ |
| 124 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_48, UP_1K, DEEP, NF1), |
| 125 | /* GPIO_49: PMC_I2C_SCL */ |
| 126 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_49, UP_1K, DEEP, NF1), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 127 | /* GPIO_50: I2C_0 SDA */ |
| 128 | PAD_NC(GPIO_50, DN_20K), |
| 129 | /* GPIO_51: I2C_0 SDL */ |
| 130 | PAD_NC(GPIO_51, DN_20K), |
| 131 | /* GPIO_52: I2C_1 SDA */ |
| 132 | PAD_NC(GPIO_52, DN_20K), |
| 133 | /* GPIO_53: I2C_1 SDL */ |
| 134 | PAD_NC(GPIO_53, DN_20K), |
| 135 | /* GPIO_54: I2C_2 SDA */ |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 136 | PAD_NC(GPIO_54, DN_20K), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 137 | /* GPIO_55: I2C_2 SDL */ |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 138 | PAD_NC(GPIO_55, DN_20K), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 139 | /* GPIO_56: I2C_3 SDA */ |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 140 | PAD_NC(GPIO_56, DN_20K), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 141 | /* GPIO_57: I2C_3 SDL */ |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 142 | PAD_NC(GPIO_57, DN_20K), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 143 | /* GPIO_58: I2C4_SDA */ |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 144 | PAD_NC(GPIO_58, DN_20K), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 145 | /* GPIO_59: I2C4_SCL */ |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 146 | PAD_NC(GPIO_59, DN_20K), |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 147 | /* GPIO_60: UART0 RXD */ |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 148 | PAD_NC(GPIO_60, DN_20K), |
| 149 | /* GPIO_61: UART0 TXD */ |
| 150 | PAD_NC(GPIO_61, DN_20K), |
| 151 | /* GPIO_62: UART0 RTS */ |
| 152 | PAD_NC(GPIO_62, DN_20K), |
| 153 | /* GPIO_63: UART0 CTS */ |
| 154 | PAD_NC(GPIO_63, DN_20K), |
| 155 | /* GPIO_66: GPIO_66 */ |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 156 | PAD_NC(GPIO_66, DN_20K), |
| 157 | /* GPIO_67: SMC_EXTSMI# */ |
| 158 | PAD_CFG_GPI_SMI_IOS(GPIO_67, UP_20K, DEEP, EDGE_SINGLE, NONE, IGNORE, SAME), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 159 | /* GPIO_68: Not Connected */ |
| 160 | PAD_NC(GPIO_68, DN_20K), |
| 161 | /* GPIO_69: Not Connected */ |
| 162 | PAD_NC(GPIO_69, DN_20K), |
| 163 | /* GPIO_70: Not Connected */ |
| 164 | PAD_NC(GPIO_70, DN_20K), |
| 165 | /* GPIO_71: Not Connected */ |
| 166 | PAD_NC(GPIO_71, DN_20K), |
| 167 | /* GPIO_72: Not Connected */ |
| 168 | PAD_NC(GPIO_72, DN_20K), |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 169 | /* GPIO_73: WiFi Disable */ |
| 170 | PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_73, 1, DEEP, NONE, IGNORE, DISPUPD), |
| 171 | /* GPIO_74: PMIC_THERMTRIP# */ |
| 172 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_74, UP_20K, DEEP, NF1, TxDRxE, ENPU), |
| 173 | /* GPIO_75: PROCHOT#_CPU */ |
| 174 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_75, NONE, DEEP, NF1, TxDRxE, DISPUPD), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 175 | /* GPIO_211: EMMC_RST#_CPU */ |
| 176 | PAD_NC(GPIO_211, UP_20K), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 177 | /* GPIO_212: Not Connected */ |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 178 | PAD_NC(GPIO_212, DN_20K), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 179 | /* GPIO_213: Not Connected */ |
| 180 | PAD_NC(GPIO_213, DN_20K), |
| 181 | /* GPIO_214: Not Connected */ |
| 182 | PAD_NC(GPIO_214, DN_20K), |
| 183 | |
| 184 | /* ------- GPIO Group North ------- */ |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 185 | /* GPIO_76: Not Connected */ |
| 186 | PAD_NC(GPIO_76, DN_20K), |
| 187 | /* GPIO_77: Not Connected */ |
| 188 | PAD_NC(GPIO_77, DN_20K), |
| 189 | /* GPIO_78: Not Connected */ |
| 190 | PAD_NC(GPIO_78, DN_20K), |
| 191 | /* GPIO_79: GPIO_79 */ |
| 192 | PAD_NC(GPIO_79, DN_20K), |
| 193 | /* GPIO_80: FP_FS0 */ |
| 194 | PAD_NC(GPIO_80, DN_20K), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 195 | /* GPIO_81: GPIO_81 */ |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 196 | PAD_NC(GPIO_81, DN_20K), |
| 197 | /* GPIO_82: FP_MISO */ |
| 198 | PAD_NC(GPIO_82, DN_20K), |
| 199 | /* GPIO_83: LPC 1.8V/3.3V Select */ |
| 200 | PAD_NC(GPIO_83, DN_20K), |
| 201 | /* GPIO_84: Allow SPI Boot */ |
| 202 | PAD_NC(GPIO_84, UP_20K), |
| 203 | /* GPIO_85: Webcam 5V */ |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 204 | PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_85, 1, DEEP, UP_20K, IGNORE, ENPU), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 205 | /* GPIO_86: GPIO_86 */ |
| 206 | PAD_NC(GPIO_86, DN_20K), |
| 207 | /* GPIO_87: Not Connected */ |
| 208 | PAD_NC(GPIO_87, DN_20K), |
| 209 | /* GPIO_88: Not Connected */ |
| 210 | PAD_NC(GPIO_88, DN_20K), |
| 211 | /* GPIO_89: Not Connected */ |
| 212 | PAD_NC(GPIO_89, DN_20K), |
| 213 | /* GPIO_90: FLASH_SPI_CS0_N */ |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 214 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_90, NATIVE, DEEP, NF1), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 215 | /* GPIO_91: Not Connected */ |
| 216 | PAD_NC(GPIO_91, DN_20K), |
| 217 | /* GPIO_92: FLASH_SPI_MOSI */ |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 218 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_92, DN_20K, DEEP, NF1), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 219 | /* GPIO_93: FLASH_SPI_MISO */ |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 220 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_93, NATIVE, DEEP, NF1), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 221 | /* GPIO_94: FLASH_SPI_IO2 */ |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 222 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_94, NATIVE, DEEP, NF1), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 223 | /* GPIO_95: FLASH_SPI_IO3 */ |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 224 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_95, NATIVE, DEEP, NF1), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 225 | /* GPIO_96: FLASH_SPI_CLK */ |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 226 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_96, NATIVE, DEEP, NF1), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 227 | /* GPIO_98: PMU_PLT_RST#_CPU */ |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 228 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_98, NONE, DEEP, NF1), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 229 | /* GPIO_99: PM_PWRBTN# */ |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 230 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_99, UP_20K, DEEP, NF1), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 231 | /* GPIO_100: SLP_S0# */ |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 232 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_100, NONE, DEEP, NF1), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 233 | /* GPIO_101: SLP_S3# */ |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 234 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_101, NONE, DEEP, NF1), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 235 | /* GPIO_102: SLP_S4# */ |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 236 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_102, NONE, DEEP, NF1), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 237 | /* GPIO_103: SUSPWRDNACK */ |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 238 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_103, NONE, DEEP, NF1), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 239 | /* GPIO_104: Not Connected */ |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 240 | PAD_NC(GPIO_104, UP_20K), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 241 | /* GPIO_105: GPIO_105 */ |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 242 | PAD_NC(GPIO_105, UP_20K), |
| 243 | /* GPIO_106: PMU_BATLOW# */ |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 244 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_106, UP_20K, DEEP, NF1), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 245 | /* GPIO_107: PMU_RSTBTN# */ |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 246 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_107, UP_20K, DEEP, NF1), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 247 | /* GPIO_108: SUS_CLK */ |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 248 | PAD_NC(GPIO_108, NONE), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 249 | /* GPIO_109: PMU_SUS_STAT# */ |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 250 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_109, NONE, DEEP, NF1), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 251 | /* GPIO_110: I2C_5 SDA */ |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 252 | PAD_NC(GPIO_110, DN_20K), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 253 | /* GPIO_111: I2C_5 SDL */ |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 254 | PAD_NC(GPIO_111, DN_20K), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 255 | /* GPIO_112: I2C_6 SDA */ |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 256 | PAD_NC(GPIO_112, DN_20K), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 257 | /* GPIO_113: I2C_6 SCL */ |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 258 | PAD_NC(GPIO_113, DN_20K), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 259 | /* GPIO_114: I2C_7 SDA */ |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 260 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_114, NONE, DEEP, NF1, HIZCRx1, DISPUPD), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 261 | /* GPIO_115: I2C_7 SCL */ |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 262 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_115, NONE, DEEP, NF1, HIZCRx1, DISPUPD), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 263 | /* GPIO_116: WLAN_PCIE_WAKE# */ |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 264 | PAD_NC(GPIO_116, DN_20K), |
| 265 | /* GPIO_117: Not Connected */ |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 266 | PAD_NC(GPIO_117, DN_20K), |
| 267 | /* GPIO_118: Not Connected */ |
| 268 | PAD_NC(GPIO_118, DN_20K), |
| 269 | /* GPIO_119: Not Connected */ |
| 270 | PAD_NC(GPIO_119, DN_20K), |
| 271 | /* GPIO_120: WLAN_CLK_REQ# */ |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 272 | PAD_NC(GPIO_120, DN_20K), |
| 273 | /* GPIO_121: Not Connected */ |
| 274 | PAD_NC(GPIO_121, DN_20K), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 275 | /* GPIO_122: Not Connected */ |
| 276 | PAD_NC(GPIO_122, DN_20K), |
| 277 | /* GPIO_123: Not Connected */ |
| 278 | PAD_NC(GPIO_123, DN_20K), |
| 279 | /* GPIO_124: DDI0_DDC_SDA */ |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 280 | PAD_CFG_NF_IOSSTATE(GPIO_124, UP_20K, DEEP, NF1, HIZCRx0), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 281 | /* GPIO_125: DDI0_DDC_SCL */ |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 282 | PAD_CFG_NF_IOSSTATE(GPIO_125, UP_20K, DEEP, NF1, HIZCRx0), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 283 | /* GPIO_126: Not Connected */ |
| 284 | PAD_NC(GPIO_126, DN_20K), |
| 285 | /* GPIO_127: Not Connected */ |
| 286 | PAD_NC(GPIO_127, DN_20K), |
| 287 | /* GPIO_128: EDP_VDD_EN */ |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 288 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_128, NONE, DEEP, NF1, Tx0RxDCRx0, DISPUPD), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 289 | /* GPIO_129: EDP_BKLT_EN */ |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 290 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_129, NONE, DEEP, NF1, Tx0RxDCRx0, DISPUPD), |
| 291 | /* GPIO_130: eDP_BKLCTL_3P3 */ |
| 292 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_130, NONE, DEEP, NF1, Tx0RxDCRx0, DISPUPD), |
| 293 | /* GPIO_131: HDMI_HPD_CPU */ |
| 294 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_131, NONE, DEEP, NF1, HIZCRx1, DISPUPD), |
| 295 | /* GPIO_132: DDI1_HPD_SOC_N */ |
| 296 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_132, NONE, DEEP, NF1, HIZCRx1, DISPUPD), |
| 297 | /* GPIO_133: EDP_HPD_CPU */ |
| 298 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_133, NONE, DEEP, NF1, HIZCRx1, DISPUPD), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 299 | /* GPIO_134: Touch_Panel_RST# */ |
| 300 | PAD_NC(GPIO_134, DN_20K), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 301 | /* GPIO_135: TCH_HOME_KEY */ |
| 302 | PAD_NC(GPIO_135, DN_20K), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 303 | /* GPIO_136: Not Connected */ |
| 304 | PAD_NC(GPIO_136, DN_20K), |
| 305 | /* GPIO_137: Not Connected */ |
| 306 | PAD_NC(GPIO_137, DN_20K), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 307 | /* GPIO_138: Not Connected */ |
| 308 | PAD_NC(GPIO_138, DN_20K), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 309 | /* GPIO_139: Not Connected */ |
| 310 | PAD_NC(GPIO_139, DN_20K), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 311 | /* GPIO_140: Not Connected */ |
| 312 | PAD_NC(GPIO_140, DN_20K), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 313 | /* GPIO_141: Not Connected */ |
| 314 | PAD_NC(GPIO_141, DN_20K), |
| 315 | /* GPIO_142: PMU_WAKE# */ |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 316 | PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_142, 1, DEEP, UP_20K, IGNORE, SAME), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 317 | /* GPIO_143: Not Connected */ |
| 318 | PAD_NC(GPIO_143, DN_20K), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 319 | /* GPIO_144: Not Connected */ |
| 320 | PAD_NC(GPIO_144, DN_20K), |
| 321 | /* GPIO_145: Not Connected */ |
| 322 | PAD_NC(GPIO_145, DN_20K), |
| 323 | /* GPIO_146: Not Connected */ |
| 324 | PAD_NC(GPIO_146, DN_20K), |
Sean Rhodes | 664f0c5 | 2022-05-24 22:14:18 +0100 | [diff] [blame] | 325 | /* GPIO 147 through 156 are configured by the TXE */ |
| 326 | /* GPIO_147: LPC_SERIRQ */ |
| 327 | /* GPIO_148: LPC_CLK0 */ |
| 328 | /* GPIO_149: LPC_CLK_DBG_CPU */ |
| 329 | /* GPIO_150: LPC_AD0 */ |
| 330 | /* GPIO_151: LPC_AD1 */ |
| 331 | /* GPIO_152: LPC_AD2 */ |
| 332 | /* GPIO_153: LPC_AD3 */ |
| 333 | /* GPIO_154: LPC_CLKRUN# */ |
| 334 | /* GPIO_155: LPC_FRAME# */ |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 335 | |
| 336 | /* ----- GPIO Group Audio ----- */ |
Sean Rhodes | 664f0c5 | 2022-05-24 22:14:18 +0100 | [diff] [blame] | 337 | /* GPIO_156: FP_INT# */ |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 338 | /* GPIO_157: Not Connected */ |
| 339 | PAD_NC(GPIO_157, DN_20K), |
| 340 | /* GPIO_158: Not Connected */ |
| 341 | PAD_NC(GPIO_158, DN_20K), |
| 342 | /* GPIO_159: Not Connected */ |
| 343 | PAD_NC(GPIO_159, DN_20K), |
| 344 | /* GPIO_160: Not Connected */ |
| 345 | PAD_NC(GPIO_160, DN_20K), |
| 346 | /* GPIO_161: GPIO_161 */ |
| 347 | PAD_NC(GPIO_161, DN_20K), |
| 348 | /* GPIO_162: Not Connected */ |
| 349 | PAD_NC(GPIO_162, DN_20K), |
| 350 | /* GPIO_163: GPIO_163 */ |
| 351 | PAD_NC(GPIO_163, DN_20K), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 352 | /* GPIO_164: GPIO_164 */ |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 353 | PAD_NC(GPIO_164, DN_20K), |
| 354 | /* GPIO_165: GPIO_165 */ |
| 355 | PAD_NC(GPIO_165, DN_20K), |
| 356 | /* GPIO_166: HDA_BCLK_CPU_R */ |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 357 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_166, NONE, DEEP, NF1, HIZCRx0, DISPUPD), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 358 | /* GPIO_167: HDA_SYNC_CPU_R */ |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 359 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_167, NONE, DEEP, NF1, HIZCRx0, DISPUPD), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 360 | /* GPIO_168: GPIO_168 */ |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 361 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_168, NONE, DEEP, NF1, HIZCRx0, DISPUPD), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 362 | /* GPIO_169: HDA_SDATAOUT */ |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 363 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_169, NONE, DEEP, NF1, HIZCRx0, DISPUPD), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 364 | /* GPIO_170: HDA_RST# */ |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 365 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_170, NONE, DEEP, NF1, HIZCRx0, DISPUPD), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 366 | /* GPIO_171: Not Connected */ |
| 367 | PAD_NC(GPIO_171, DN_20K), |
| 368 | /* GPIO_172: Not Connected */ |
| 369 | PAD_NC(GPIO_172, DN_20K), |
| 370 | /* GPIO_173: Not Connected */ |
| 371 | PAD_NC(GPIO_173, DN_20K), |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 372 | /* GPIO_174: VDD2 1.20V / 1.24V Mode */ |
| 373 | PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_174, 1, DEEP, DN_20K, TxLASTRxE, ENPU), |
| 374 | /* GPIO_175: eSPI / LPC Mode */ |
| 375 | PAD_NC(GPIO_175, NONE), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 376 | |
| 377 | /* ----- GPIO Group SCC ----- */ |
| 378 | /* GPIO_176: TP_INT# */ |
| 379 | PAD_CFG_GPI_GPIO_DRIVER(GPIO_176, NONE, PLTRST), |
| 380 | /* GPIO_177: SMB_SOC_CLK */ |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 381 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_177, UP_20K, DEEP, NF1), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 382 | /* GPIO_178: Not Connected */ |
| 383 | PAD_NC(GPIO_178, DN_20K), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 384 | /* GPIO_187: Not Connected */ |
| 385 | PAD_NC(GPIO_187, DN_20K), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 386 | /* GPIO_179: Not Connected */ |
| 387 | PAD_NC(GPIO_179, DN_20K), |
| 388 | /* GPIO_181: Not Connected */ |
| 389 | PAD_NC(GPIO_181, DN_20K), |
| 390 | /* GPIO_182: Not Connected */ |
| 391 | PAD_NC(GPIO_182, DN_20K), |
| 392 | /* GPIO_183: Not Connected */ |
| 393 | PAD_NC(GPIO_183, DN_20K), |
| 394 | /* GPIO_184: Not Connected */ |
| 395 | PAD_NC(GPIO_184, DN_20K), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 396 | /* GPIO_185: WLAN_RST_N_R */ |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 397 | PAD_NC(GPIO_185, DN_20K), |
| 398 | /* GPIO_186: Not Connected */ |
| 399 | PAD_NC(GPIO_186, DN_20K), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 400 | /* GPIO_188: SDMMC3_PWR_EN_N */ |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 401 | PAD_CFG_NF(GPIO_188, NONE, DEEP, NF1), |
| 402 | /* GPIO_210: Not Connected */ |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 403 | PAD_NC(GPIO_210, DN_20K), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 404 | /* GPIO_189: Not Connected */ |
| 405 | PAD_NC(GPIO_189, DN_20K), |
| 406 | /* GPIO_190: Not Connected */ |
| 407 | PAD_NC(GPIO_190, DN_20K), |
Sean Rhodes | 2c6c5f2 | 2022-05-24 22:09:59 +0100 | [diff] [blame] | 408 | /* GPIO_191: eSPI Flash Sharing */ |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 409 | PAD_NC(GPIO_191, NONE), |
| 410 | /* GPIO_192: CNVI_BRI_RSP */ |
| 411 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_192, UP_20K, DEEP, NF1), |
| 412 | /* GPIO_193: CNVI_RGI_DT */ |
| 413 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_193, NONE, DEEP, NF1), |
| 414 | /* GPIO_194: GPIO_194 */ |
| 415 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_194, UP_20K, DEEP, NF1), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 416 | /* GPIO_195: CNVI_RF_RESET_N */ |
Sean Rhodes | d18fa49 | 2022-05-24 22:13:44 +0100 | [diff] [blame] | 417 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_195, NONE, DEEP, NF1), |
Sean Rhodes | 3252897 | 2022-03-09 09:07:40 +0000 | [diff] [blame] | 418 | /* GPIO_198: EMMC_CLK */ |
| 419 | PAD_NC(GPIO_198, DN_20K), |
| 420 | /* GPIO_200: EMMC_DATA_0 */ |
| 421 | PAD_NC(GPIO_200, DN_20K), |
| 422 | /* GPIO_201: EMMC_DATA_1 */ |
| 423 | PAD_NC(GPIO_201, DN_20K), |
| 424 | /* GPIO_202: EMMC_DATA_2 */ |
| 425 | PAD_NC(GPIO_202, DN_20K), |
| 426 | /* GPIO_203: EMMC_DATA_3 */ |
| 427 | PAD_NC(GPIO_203, DN_20K), |
| 428 | /* GPIO_204: EMMC_DATA_4 */ |
| 429 | PAD_NC(GPIO_204, DN_20K), |
| 430 | /* GPIO_205: EMMC_DATA_5 */ |
| 431 | PAD_NC(GPIO_205, DN_20K), |
| 432 | /* GPIO_206: EMMC_DATA_6 */ |
| 433 | PAD_NC(GPIO_206, DN_20K), |
| 434 | /* GPIO_207: EMMC_DATA_7 */ |
| 435 | PAD_NC(GPIO_207, DN_20K), |
| 436 | /* GPIO_208: EMMC_CMD */ |
| 437 | PAD_NC(GPIO_208, DN_20K), |
| 438 | /* GPIO_209: EMMC_STROBE */ |
| 439 | PAD_NC(GPIO_209, DN_20K), |
| 440 | }; |
| 441 | |
| 442 | const struct pad_config *variant_gpio_table(size_t *num) |
| 443 | { |
| 444 | *num = ARRAY_SIZE(gpio_table); |
| 445 | return gpio_table; |
| 446 | } |