Angel Pons | 08b5280 | 2020-04-05 13:22:20 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Hannah Williams | 5e83e8b | 2018-02-09 18:35:17 -0800 | [diff] [blame] | 2 | |
Furquan Shaikh | 76cedd2 | 2020-05-02 10:24:23 -0700 | [diff] [blame] | 3 | #include <acpi/acpi.h> |
Hannah Williams | 5e83e8b | 2018-02-09 18:35:17 -0800 | [diff] [blame] | 4 | #include <baseboard/gpio.h> |
| 5 | #include <baseboard/variants.h> |
| 6 | #include <commonlib/helpers.h> |
| 7 | |
| 8 | /* |
| 9 | * Pad configuration in ramstage. The order largely follows the 'GPIO Muxing' |
| 10 | * table found in EDS vol 1, but some pins aren't grouped functionally in |
| 11 | * the table so those were moved for more logical grouping. |
| 12 | */ |
| 13 | static const struct pad_config gpio_table[] = { |
Shaunak Saha | cbedd8f | 2018-02-16 08:39:22 -0800 | [diff] [blame] | 14 | /* NORTHWEST COMMUNITY GPIOS */ |
Furquan Shaikh | c529f5b | 2018-11-21 12:03:28 -0800 | [diff] [blame] | 15 | PAD_NC(GPIO_0, DN_20K), /* TCK -- debug header NC */ |
| 16 | PAD_NC(GPIO_1, DN_20K), /* TRST_B -- debug header NC */ |
| 17 | PAD_NC(GPIO_2, UP_20K), /* TMS -- debug header NC */ |
| 18 | PAD_NC(GPIO_3, UP_20K), /* TDI -- debug header NC */ |
| 19 | PAD_NC(GPIO_4, UP_20K), /* TDO -- debug header NC */ |
Furquan Shaikh | d1b482c | 2018-07-25 08:58:52 -0700 | [diff] [blame] | 20 | PAD_NC(GPIO_5, UP_20K), /* JTAGX -- unused */ |
Furquan Shaikh | c529f5b | 2018-11-21 12:03:28 -0800 | [diff] [blame] | 21 | PAD_NC(GPIO_6, UP_20K), /* CX_PREQ_B -- debug header NC */ |
| 22 | PAD_NC(GPIO_7, UP_20K), /* CX_PRDY_B -- debug header NC */ |
| 23 | PAD_NC(GPIO_8, DN_20K), /* TRACE_0_CLK_VNN -- debug header NC */ |
| 24 | PAD_NC(GPIO_9, DN_20K), /* TRACE_0_DATA0_VNN -- debug header NC */ |
| 25 | PAD_NC(GPIO_10, DN_20K), /* TRACE_0_DATA1_VNN -- debug header NC */ |
| 26 | PAD_NC(GPIO_11, DN_20K), /* TRACE_0_DATA2_VNN -- debug header NC */ |
| 27 | PAD_NC(GPIO_12, DN_20K), /* TRACE_0_DATA3_VNN -- debug header NC */ |
| 28 | PAD_NC(GPIO_13, DN_20K), /* TRACE_0_DATA4_VNN -- debug header NC */ |
| 29 | PAD_NC(GPIO_14, DN_20K), /* TRACE_0_DATA5_VNN -- debug header NC */ |
| 30 | PAD_NC(GPIO_15, DN_20K), /* TRACE_0_DATA6_VNN -- debug header NC */ |
| 31 | PAD_NC(GPIO_16, DN_20K), /* TRACE_0_DATA7_VNN -- debug header NC */ |
| 32 | PAD_NC(GPIO_17, UP_20K), /* DBG_PTI_CLK_1 -- debug header NC */ |
| 33 | PAD_NC(GPIO_18, UP_20K), /* DBG_PTI_DATA_8 -- debug header NC */ |
| 34 | PAD_NC(GPIO_19, UP_20K), /* DBG_PTI_DATA_9 -- debug header NC */ |
| 35 | PAD_NC(GPIO_20, UP_20K), /* DBG_PTI_DATA_10 -- debug header NC */ |
Shaunak Saha | cbedd8f | 2018-02-16 08:39:22 -0800 | [diff] [blame] | 36 | PAD_CFG_NF(GPIO_21, UP_20K, DEEP, NF2), /* CNV_MFUART2_RXD */ |
| 37 | PAD_CFG_NF_IOSSTATE(GPIO_22, UP_20K, DEEP, NF2, TxDRxE), /* CNV_MFUART2_TXD */ |
| 38 | PAD_CFG_NF(GPIO_23, UP_20K, DEEP, NF2), /* CNV_GNSS_PABLANKIt */ |
Furquan Shaikh | c529f5b | 2018-11-21 12:03:28 -0800 | [diff] [blame] | 39 | PAD_NC(GPIO_24, UP_20K), /* TRACE_1_DATA6_VNN -- debug header NC */ |
| 40 | PAD_NC(GPIO_25, UP_20K), /* TRACE_1_DATA7_VNN -- debug header NC */ |
| 41 | PAD_NC(GPIO_26, DN_20K), /* TRACE_2_CLK_VNN -- debug header NC */ |
| 42 | PAD_NC(GPIO_27, DN_20K), /* TRACE_2_DATA0_VNN -- debug header NC */ |
| 43 | PAD_NC(GPIO_28, DN_20K), /* TRACE_2_DATA1_VNN 0-- debug header NC */ |
| 44 | PAD_NC(GPIO_29, DN_20K), /* TRACE_2_DATA2_VNN -- debug header NC */ |
| 45 | PAD_NC(GPIO_30, DN_20K), /* TRACE_2_DATA3_VNN -- debug header NC */ |
| 46 | PAD_NC(GPIO_31, DN_20K), /* TRACE_2_DATA4_VNN -- debug header NC */ |
| 47 | PAD_NC(GPIO_32, DN_20K), /* TRACE_2_DATA5_VNN -- debug header NC */ |
| 48 | PAD_NC(GPIO_33, DN_20K), /* TRACE_2_DATA6_VNN -- debug header NC */ |
| 49 | PAD_NC(GPIO_34, DN_20K), /* TRACE_2_DATA7_VNN -- debug header NC */ |
| 50 | PAD_NC(GPIO_35, UP_20K), /* TRACE_3_CLK_VNN -- debug header NC */ |
| 51 | PAD_NC(GPIO_36, UP_20K), /* TRACE_3_DATA0_VNN -- debug header NC */ |
| 52 | PAD_NC(GPIO_37, UP_20K), /* TRACE_3_DATA1_VNN -- debug header NC */ |
| 53 | PAD_NC(GPIO_38, UP_20K), /* TRACE_3_DATA2_VNN -- debug header NC */ |
Furquan Shaikh | d1b482c | 2018-07-25 08:58:52 -0700 | [diff] [blame] | 54 | PAD_NC(GPIO_39, UP_20K), /* TRACE_3_DATA3_VNN -- unused */ |
| 55 | PAD_NC(GPIO_40, UP_20K), /* TRACE_3_DATA4_VNN -- unused */ |
| 56 | PAD_NC(GPIO_41, DN_20K), /* TRACE_3_DATA5_VNN -- unused */ |
| 57 | PAD_NC(GPIO_42, DN_20K), /* GP_INTD_DSI_TE1 -- unused */ |
Furquan Shaikh | c529f5b | 2018-11-21 12:03:28 -0800 | [diff] [blame] | 58 | PAD_NC(GPIO_43, DN_20K), /* GP_INTD_DSI_TE2 -- debug header NC */ |
Shaunak Saha | cbedd8f | 2018-02-16 08:39:22 -0800 | [diff] [blame] | 59 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_44, UP_20K, DEEP, NF1, TxDRxE, ENPU), /* USB_OC0_B */ |
| 60 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_45, UP_20K, DEEP, NF1, TxDRxE, ENPU), /* USB_OC1_B */ |
Furquan Shaikh | d1b482c | 2018-07-25 08:58:52 -0700 | [diff] [blame] | 61 | PAD_NC(GPIO_46, DN_20K), /* DSI_I2C_SDA -- unused */ |
| 62 | PAD_NC(GPIO_47, DN_20K), /* DSI_I2C_SCL -- unused */ |
| 63 | |
| 64 | /* PMC stays active in suspend so disable standby for these pins */ |
Hannah Williams | 8dce5bc | 2018-03-31 18:23:20 -0700 | [diff] [blame] | 65 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_48, NONE, DEEP, NF1), /* PMC_I2C_SDA */ |
| 66 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_49, NONE, DEEP, NF1), /* PMC_I2C_SCL */ |
Furquan Shaikh | 6516149 | 2018-06-05 17:16:11 -0700 | [diff] [blame] | 67 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_50, NONE, DEEP, NF1, HIZCRx1, DISPUPD), /* PCH_I2C_PEN_SDA */ |
| 68 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_51, NONE, DEEP, NF1, HIZCRx1, DISPUPD), /* PCH_I2C_PEN_SCL */ |
Shaunak Saha | cbedd8f | 2018-02-16 08:39:22 -0800 | [diff] [blame] | 69 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_52, NONE, DEEP, NF1, HIZCRx1, DISPUPD), /* LPSS_I2C1_SDA */ |
| 70 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_53, NONE, DEEP, NF1, HIZCRx1, DISPUPD), /* LPSS_I2C1_SCL */ |
Furquan Shaikh | d1b482c | 2018-07-25 08:58:52 -0700 | [diff] [blame] | 71 | PAD_NC(GPIO_54, UP_20K), /* LPSS_I2C2_SDA -- unused */ |
| 72 | PAD_NC(GPIO_55, UP_20K), /* LPSS_I2C2_SCL -- unused */ |
Furquan Shaikh | c529f5b | 2018-11-21 12:03:28 -0800 | [diff] [blame] | 73 | PAD_NC(GPIO_56, UP_20K), /* LPSS_I2C3_SDA -- debug header NC */ |
| 74 | PAD_NC(GPIO_57, UP_20K), /* LPSS_I2C2_SCL -- debug header NC */ |
| 75 | PAD_NC(GPIO_58, UP_20K), /* LPSS_I2C4_SDA -- unused */ |
| 76 | PAD_NC(GPIO_59, UP_20K), /* LPSS_I2C4_SCL -- unused */ |
| 77 | PAD_NC(GPIO_60, UP_20K), /* LPSS_UART0_RXD -- debug header NC */ |
| 78 | PAD_NC(GPIO_61, UP_20K), /* LPSS_UART0_TXD -- debug header NC */ |
Furquan Shaikh | d1b482c | 2018-07-25 08:58:52 -0700 | [diff] [blame] | 79 | PAD_NC(GPIO_62, UP_20K), /* UART0-RTS_B -- unused */ |
Furquan Shaikh | 2d60209 | 2018-09-05 13:59:00 -0700 | [diff] [blame] | 80 | PAD_CFG_GPI_APIC_IOS(GPIO_63, NONE, DEEP, LEVEL, INVERT, TxDRxE, DISPUPD), /* H1_PCH_INT_ODL */ |
Shaunak Saha | cbedd8f | 2018-02-16 08:39:22 -0800 | [diff] [blame] | 81 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_64, UP_20K, DEEP, NF1, HIZCRx1, DISPUPD), /* LPSS_UART2_RXD */ |
| 82 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_65, UP_20K, DEEP, NF1, TxLASTRxE, DISPUPD), /* LPSS_UART2_TXD */ |
Furquan Shaikh | d1b482c | 2018-07-25 08:58:52 -0700 | [diff] [blame] | 83 | PAD_NC(GPIO_66, UP_20K), /* UART2-RTS_B -- unused */ |
| 84 | PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_67, 0, DEEP, NONE, TxLASTRxE, DISPUPD), /* UART2-CTS_B -- EN_PP3300_DX_LTE_SOC */ |
Justin TerAvest | 22595f6 | 2018-03-15 16:28:57 -0600 | [diff] [blame] | 85 | PAD_CFG_GPI(GPIO_68, NONE, DEEP), /* DRAM_ID0 */ |
| 86 | PAD_CFG_GPI(GPIO_69, NONE, DEEP), /* DRAM_ID1 */ |
| 87 | PAD_CFG_GPI(GPIO_70, NONE, DEEP), /* DRAM_ID2 */ |
| 88 | PAD_CFG_GPI(GPIO_71, NONE, DEEP), /* DRAM_ID3 */ |
Furquan Shaikh | d1b482c | 2018-07-25 08:58:52 -0700 | [diff] [blame] | 89 | PAD_NC(GPIO_72, DN_20K), /* PMC_SPI_TXD -- unused */ |
| 90 | PAD_NC(GPIO_73, DN_20K), /* PMC_SPI_CLK -- unused */ |
Shaunak Saha | cbedd8f | 2018-02-16 08:39:22 -0800 | [diff] [blame] | 91 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_74, UP_20K, DEEP, NF1, TxDRxE, ENPU), /* THERMTRIP_B */ |
| 92 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_75, NONE, DEEP, NF1, TxDRxE, DISPUPD), /* PROCHOT_B */ |
Furquan Shaikh | d1b482c | 2018-07-25 08:58:52 -0700 | [diff] [blame] | 93 | PAD_NC(GPIO_211, UP_20K), /* EMMC_RST_B -- unused */ |
Shaunak Saha | cbedd8f | 2018-02-16 08:39:22 -0800 | [diff] [blame] | 94 | PAD_CFG_GPI_APIC_IOS(GPIO_212, NONE, DEEP, LEVEL, INVERT, HIZCRx1, DISPUPD), /* Touch Panel Int */ |
Shamile Khan | 280bc30 | 2018-05-30 10:32:00 -0700 | [diff] [blame] | 95 | PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_213, 0, DEEP, NONE, Tx0RxDCRx0, DISPUPD), /* EN_PP3300_TOUCHSCREEN */ |
Shaunak Saha | cbedd8f | 2018-02-16 08:39:22 -0800 | [diff] [blame] | 96 | PAD_CFG_GPI_APIC_IOS(GPIO_214, NONE, DEEP, LEVEL, INVERT, HIZCRx1, DISPUPD), /* P_SENSOR_INT_L */ |
| 97 | |
| 98 | /* NORTH COMMUNITY GPIOS */ |
| 99 | |
| 100 | /* svid - unused */ |
Furquan Shaikh | d1b482c | 2018-07-25 08:58:52 -0700 | [diff] [blame] | 101 | PAD_NC(GPIO_76, UP_20K),/* SVID Alert - unused */ |
| 102 | PAD_NC(GPIO_77, UP_20K),/* SVID Data - unused */ |
| 103 | PAD_NC(GPIO_78, UP_20K),/* SVID Clk - unused */ |
Shaunak Saha | cbedd8f | 2018-02-16 08:39:22 -0800 | [diff] [blame] | 104 | |
| 105 | /* LPSS */ |
Shamile Khan | 0805cbe | 2018-08-22 13:12:26 -0700 | [diff] [blame] | 106 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_79, NONE, DEEP, NF1, HIZCRx0, DISPUPD), /* H1_SLAVE_SPI_CLK_R */ |
| 107 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_80, NONE, DEEP, NF1, HIZCRx1, DISPUPD), /* H1_SLAVE_SPI_CS_L_R */ |
Furquan Shaikh | c529f5b | 2018-11-21 12:03:28 -0800 | [diff] [blame] | 108 | PAD_NC(GPIO_81, DN_20K), /* GPIO_81_DEBUG -- debug header NC */ |
Ravi Sarawadi | c293496 | 2018-02-27 13:57:01 -0800 | [diff] [blame] | 109 | PAD_CFG_NF(GPIO_82, NONE, DEEP, NF1), /* H1_SLAVE_SPI_MISO */ |
| 110 | PAD_CFG_NF(GPIO_83, NONE, DEEP, NF1), /* H1_SLAVE_SPI_MOSI_R */ |
Furquan Shaikh | d1b482c | 2018-07-25 08:58:52 -0700 | [diff] [blame] | 111 | PAD_NC(GPIO_84, DN_20K), /* LPSS_SPI_2_CLK - unused */ |
| 112 | PAD_NC(GPIO_85, DN_20K), /* LPSS_SPI_2_FS0 - unused */ |
| 113 | PAD_NC(GPIO_86, DN_20K), /* LPSS_SPI_2_FS1 - unused */ |
| 114 | PAD_NC(GPIO_87, DN_20K), /* LPSS_SPI_2_FS2 - unused */ |
| 115 | PAD_NC(GPIO_88, DN_20K), /* LPSS_SPI_2_RXD - unused */ |
| 116 | PAD_NC(GPIO_89, DN_20K), /* LPSS_SPI_2_TXD - unused */ |
Shaunak Saha | cbedd8f | 2018-02-16 08:39:22 -0800 | [diff] [blame] | 117 | |
| 118 | /* Fast SPI */ |
Furquan Shaikh | d1b482c | 2018-07-25 08:58:52 -0700 | [diff] [blame] | 119 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_90, NATIVE, DEEP, NF1, HIZCRx1, SAME),/* FST_SPI_CS0_B */ |
Shamile Khan | 280bc30 | 2018-05-30 10:32:00 -0700 | [diff] [blame] | 120 | PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_91, 0, DEEP, NONE, Tx0RxDCRx0, DISPUPD),/* FST_SPI_CS1_B -- SPK_PA_EN_R */ |
Furquan Shaikh | d1b482c | 2018-07-25 08:58:52 -0700 | [diff] [blame] | 121 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_92, NATIVE, DEEP, NF1, HIZCRx1, SAME),/* FST_SPI_MOSI_IO0 */ |
| 122 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_93, NATIVE, DEEP, NF1, HIZCRx1, SAME),/* FST_SPI_MISO_IO1 */ |
| 123 | PAD_NC(GPIO_94, NATIVE),/* FST_SPI_IO2 - unused */ |
| 124 | PAD_NC(GPIO_95, NATIVE),/* FST_SPI_IO3 - unused */ |
| 125 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_96, NATIVE, DEEP, NF1, HIZCRx0, SAME),/* FST_SPI_CLK */ |
Shaunak Saha | cbedd8f | 2018-02-16 08:39:22 -0800 | [diff] [blame] | 126 | |
| 127 | /* PMU Signals */ |
John Zhao | 8cf6d4d | 2019-01-10 11:09:09 -0800 | [diff] [blame] | 128 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_98, NONE, DEEP, NF1),/* PMU_PLTRST_B */ |
Furquan Shaikh | d1b482c | 2018-07-25 08:58:52 -0700 | [diff] [blame] | 129 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_99, NONE, DEEP, NF1, TxDRxE, DISPUPD),/* PMU_PWRBTN_B */ |
Shaunak Saha | cbedd8f | 2018-02-16 08:39:22 -0800 | [diff] [blame] | 130 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_100, NONE, DEEP, NF1),/* PMU_SLP_S0_B */ |
| 131 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_101, NONE, DEEP, NF1),/* PMU_SLP_S3_B */ |
| 132 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_102, NONE, DEEP, NF1),/* PMU_SLP_S4_B */ |
| 133 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_103, NONE, DEEP, NF1),/* SUSPWRDNACK */ |
Furquan Shaikh | d1b482c | 2018-07-25 08:58:52 -0700 | [diff] [blame] | 134 | PAD_NC(GPIO_104, UP_20K),/* EMMC_DNX_PWR_EN_B - unused */ |
Furquan Shaikh | 6bedbd6 | 2018-10-04 11:11:49 -0700 | [diff] [blame] | 135 | PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_105, 1, DEEP, NONE, Tx1RxDCRx0, DISPUPD),/* GPIO_105 -- TOUCHSCREEN_RST */ |
Furquan Shaikh | d1b482c | 2018-07-25 08:58:52 -0700 | [diff] [blame] | 136 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_106, NONE, DEEP, NF1, HIZCRx1, DISPUPD),/* PMU_BATLOW_B */ |
Shaunak Saha | cbedd8f | 2018-02-16 08:39:22 -0800 | [diff] [blame] | 137 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_107, NONE, DEEP, NF1, TxDRxE, DISPUPD),/* PMU_RESETBUTTON_B */ |
Furquan Shaikh | d1b482c | 2018-07-25 08:58:52 -0700 | [diff] [blame] | 138 | PAD_NC(GPIO_108, NONE),/* PMU_SUSCLK -- unused */ |
Shamile Khan | 280bc30 | 2018-05-30 10:32:00 -0700 | [diff] [blame] | 139 | PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_109, 1, DEEP, NONE, Tx1RxDCRx1, DISPUPD),/* SUS_STAT_B -- BT_DISABLE_L */ |
Shaunak Saha | cbedd8f | 2018-02-16 08:39:22 -0800 | [diff] [blame] | 140 | |
| 141 | /* I2C5 - Audio */ |
| 142 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_110, NONE, DEEP, NF1, HIZCRx1, DISPUPD),/* LPSS_I2C5_SDA */ |
| 143 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_111, NONE, DEEP, NF1, HIZCRx1, DISPUPD),/* LPSS_I2C5_SCL */ |
| 144 | |
| 145 | /* I2C6 - Trackpad */ |
| 146 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_112, NONE, DEEP, NF1, HIZCRx1, DISPUPD),/* LPSS_I2C6_SDA */ |
| 147 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_113, NONE, DEEP, NF1, HIZCRx1, DISPUPD),/* LPSS_I2C6_SCL */ |
| 148 | |
| 149 | /* I2C7 - Touchscreen */ |
| 150 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_114, NONE, DEEP, NF1, HIZCRx1, DISPUPD),/* LPSS_I2C7_SDA */ |
| 151 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_115, NONE, DEEP, NF1, HIZCRx1, DISPUPD),/* LPSS_I2C7_SCL */ |
| 152 | |
| 153 | /* PCIE_WAKE[0:3]_B */ |
Furquan Shaikh | d1b482c | 2018-07-25 08:58:52 -0700 | [diff] [blame] | 154 | PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_116, 1, DEEP, NONE, Tx1RxDCRx1, DISPUPD), /* PCIE_WAKE0_B -- WIFI_DISABLE_L */ |
| 155 | PAD_CFG_GPI_SCI_LOW(GPIO_117, NONE, DEEP, EDGE_SINGLE),/* PCIE_WAKE1_B -- LTE_WAKE_L */ |
| 156 | PAD_NC(GPIO_118, UP_20K),/* PCIE_WAKE2_B -- unused */ |
Furquan Shaikh | b41ae25 | 2018-06-04 17:10:31 -0700 | [diff] [blame] | 157 | PAD_CFG_GPI_SCI_LOW(GPIO_119, NONE, DEEP, EDGE_SINGLE),/* PCIE_WAKE3_B */ |
Shaunak Saha | cbedd8f | 2018-02-16 08:39:22 -0800 | [diff] [blame] | 158 | |
Furquan Shaikh | d1b482c | 2018-07-25 08:58:52 -0700 | [diff] [blame] | 159 | /* |
| 160 | * PCIE_CLKREQ[0:3]_B. For unused pins, follow the termination |
| 161 | * guideline for unused PCIE ports as described in PDG i.e. keep |
| 162 | * the pins in native mode and deploy the internal pull up. |
| 163 | */ |
Shaunak Saha | cbedd8f | 2018-02-16 08:39:22 -0800 | [diff] [blame] | 164 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_120, UP_20K, DEEP, NF1, HIZCRx1, ENPU),/* PCIE_CLKREQ0_B -- unused*/ |
| 165 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_121, UP_20K, DEEP, NF1, HIZCRx1, ENPU),/* PCIE_CLKREQ1_B -- unused */ |
Shamile Khan | dc3910c | 2018-05-22 22:24:22 -0700 | [diff] [blame] | 166 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_122, UP_20K, DEEP, NF1, HIZCRx1, ENPU),/* PCIE_CLKREQ2_B -- unused */ |
Furquan Shaikh | d1b482c | 2018-07-25 08:58:52 -0700 | [diff] [blame] | 167 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_123, NONE, DEEP, NF1, TxDRxE, DISPUPD), /* PCIE_CLKREQ3_B */ |
Shaunak Saha | cbedd8f | 2018-02-16 08:39:22 -0800 | [diff] [blame] | 168 | |
| 169 | /* DDI[0:1] SDA and SCL -- unused */ |
Furquan Shaikh | d1b482c | 2018-07-25 08:58:52 -0700 | [diff] [blame] | 170 | PAD_NC(GPIO_124, UP_20K),/* HV_DDI0_DDC_SDA -- unused */ |
| 171 | PAD_NC(GPIO_125, UP_20K),/* HV_DDI0_DDC_SCL -- unused */ |
| 172 | PAD_NC(GPIO_126, UP_20K),/* HV_DDI1_DDC_SDA -- unused */ |
| 173 | PAD_NC(GPIO_127, UP_20K),/* HV_DDI1_DDC_SCL -- unused */ |
Shaunak Saha | cbedd8f | 2018-02-16 08:39:22 -0800 | [diff] [blame] | 174 | |
| 175 | /* Panel 0 control */ |
Shamile Khan | dc3910c | 2018-05-22 22:24:22 -0700 | [diff] [blame] | 176 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_128, NONE, DEEP, NF1, Tx0RxDCRx0, DISPUPD),/* PANEL0_VDDEN*/ |
| 177 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_129, NONE, DEEP, NF1, Tx0RxDCRx0, DISPUPD),/* PANEL0_BKLTEN */ |
| 178 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_130, NONE, DEEP, NF1, Tx0RxDCRx0, DISPUPD),/* PANEL0_BKLTCTL */ |
Shaunak Saha | cbedd8f | 2018-02-16 08:39:22 -0800 | [diff] [blame] | 179 | |
| 180 | /* Hot plug detect. */ |
| 181 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_131, NONE, DEEP, NF1, HIZCRx1, DISPUPD),/* HV_DDI0_HPD */ |
| 182 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_132, NONE, DEEP, NF1, HIZCRx1, DISPUPD),/* HV_DDI1_HPD */ |
| 183 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_133, NONE, DEEP, NF1, HIZCRx1, DISPUPD),/* HV_EDP_HPD */ |
| 184 | |
Jett Rink | 2dbe51a | 2019-01-09 09:42:07 -0700 | [diff] [blame] | 185 | /* EC_AP_INT_ODL */ |
| 186 | PAD_CFG_GPI_APIC_LOW(GPIO_134, NONE, DEEP), |
| 187 | |
Furquan Shaikh | 2c2650a | 2018-10-18 16:25:58 -0700 | [diff] [blame] | 188 | PAD_CFG_GPI_IRQ_WAKE(GPIO_135, NONE, DEEP, LEVEL, INVERT),/* GPIO_135 -- TRACKPAD_INT1_1V8_ODL */ |
Shaunak Saha | cbedd8f | 2018-02-16 08:39:22 -0800 | [diff] [blame] | 189 | PAD_CFG_GPI_APIC_IOS(GPIO_136, NONE, DEEP, LEVEL, INVERT, TxDRxE, DISPUPD),/* GPIO_136 -- PMIC_PCH_INT_ODL */ |
| 190 | PAD_CFG_GPI_APIC_IOS(GPIO_137, NONE, DEEP, LEVEL, INVERT, HIZCRx1, DISPUPD),/* GPIO_137 -- HP_INT_ODL */ |
Furquan Shaikh | 6516149 | 2018-06-05 17:16:11 -0700 | [diff] [blame] | 191 | PAD_CFG_GPI_APIC_IOS(GPIO_138, NONE, DEEP, LEVEL, INVERT, HIZCRx1, DISPUPD),/* GPIO_138 -- PEN_PDCT_ODL */ |
Furquan Shaikh | d1b482c | 2018-07-25 08:58:52 -0700 | [diff] [blame] | 192 | PAD_CFG_GPI_APIC_IOS(GPIO_139, NONE, DEEP, LEVEL, INVERT, HIZCRx1, DISPUPD),/* GPIO_139 -- PEN_INT_ODL */ |
Furquan Shaikh | 6bedbd6 | 2018-10-04 11:11:49 -0700 | [diff] [blame] | 193 | PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_140, 1, DEEP, NONE, Tx1RxDCRx0, DISPUPD),/* GPIO_140 -- PEN_RESET */ |
Shaunak Saha | cbedd8f | 2018-02-16 08:39:22 -0800 | [diff] [blame] | 194 | // Also we may be able to use eSPI WAKE# Virtual Wire instead |
Furquan Shaikh | d1b482c | 2018-07-25 08:58:52 -0700 | [diff] [blame] | 195 | PAD_CFG_GPI_SCI_IOS(GPIO_141, NONE, DEEP, EDGE_SINGLE, INVERT, IGNORE, DISPUPD),/* GPIO_141 -- EC_PCH_WAKE_ODL */ |
Furquan Shaikh | 2c2650a | 2018-10-18 16:25:58 -0700 | [diff] [blame] | 196 | PAD_NC(GPIO_142, UP_20K),/* GPIO_142 -- TRACKPAD_INT2_1V8_ODL(unused) */ |
Shaunak Saha | cbedd8f | 2018-02-16 08:39:22 -0800 | [diff] [blame] | 197 | PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_143, 1, DEEP, UP_20K, HIZCRx1, ENPU),/* GPIO_143 -- LTE_SAR_ODL */ |
Karthikeyan Ramasubramanian | 2b35780 | 2018-12-07 11:03:38 -0700 | [diff] [blame] | 198 | |
| 199 | /* GPIO_144 -- PEN_EJECT(wake) */ |
Karthikeyan Ramasubramanian | 2b27e23 | 2018-12-07 11:05:51 -0700 | [diff] [blame] | 200 | PAD_CFG_GPI_SCI_HIGH_DEBEN(GPIO_144, UP_20K, DEEP, EDGE_SINGLE, |
| 201 | DEBOUNCE_256_RTC), |
Karthikeyan Ramasubramanian | 2b35780 | 2018-12-07 11:03:38 -0700 | [diff] [blame] | 202 | /* GPIO_145 -- PEN_EJECT(notifications) */ |
| 203 | PAD_CFG_GPI_GPIO_DRIVER(GPIO_145, UP_20K, DEEP), |
Furquan Shaikh | d1b482c | 2018-07-25 08:58:52 -0700 | [diff] [blame] | 204 | PAD_NC(GPIO_146, UP_20K),/* GPIO_146 -- unused */ |
Hannah Williams | cf45830 | 2018-01-09 18:23:40 -0800 | [diff] [blame] | 205 | |
| 206 | /* |
| 207 | * GPIO_154 - LPC_CLKRUN# has a native function for LPC but not for |
| 208 | * eSPI. Nonetheless if we use eSPI, it should be configured as a GPIO |
| 209 | * and kept unconnected to allow S0ix entry. |
| 210 | */ |
Shaunak Saha | cbedd8f | 2018-02-16 08:39:22 -0800 | [diff] [blame] | 211 | |
| 212 | /* AUDIO COMMUNITY GPIOS*/ |
Furquan Shaikh | d1b482c | 2018-07-25 08:58:52 -0700 | [diff] [blame] | 213 | PAD_NC(GPIO_156, DN_20K), /* AVS_I2S0_MCLK -- unused */ |
Shaunak Saha | cbedd8f | 2018-02-16 08:39:22 -0800 | [diff] [blame] | 214 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_157, NONE, DEEP, NF1, HIZCRx0, DISPUPD), /* AVS_I2S0_BCLK */ |
| 215 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_158, NONE, DEEP, NF1, HIZCRx0, DISPUPD), /* AVS_I2S0_WS_SYNC */ |
| 216 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_159, NONE, DEEP, NF1, HIZCRx0, DISPUPD), /* AVS_I2S0_SDI */ |
Furquan Shaikh | d1b482c | 2018-07-25 08:58:52 -0700 | [diff] [blame] | 217 | PAD_NC(GPIO_160, DN_20K), /* AVS_I2S0_SDO -- unused */ |
Furquan Shaikh | 6bedbd6 | 2018-10-04 11:11:49 -0700 | [diff] [blame] | 218 | PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_161, 1, DEEP, UP_20K, Tx1RxDCRx0, DISPUPD), /* AVS_I2S1_MCLK -- LTE_OFF_ODL */ |
Shaunak Saha | cbedd8f | 2018-02-16 08:39:22 -0800 | [diff] [blame] | 219 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_162, NONE, DEEP, NF1, HIZCRx0, DISPUPD), /* AVS_I2S1_BCLK */ |
| 220 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_163, NONE, DEEP, NF1, HIZCRx0, DISPUPD), /* AVS_I2S1_WS_SYNC */ |
Furquan Shaikh | fbd6f39 | 2018-08-09 14:29:08 -0700 | [diff] [blame] | 221 | PAD_CFG_GPO(GPIO_164, 0, DEEP), /* WLAN_PE_RST */ |
Shaunak Saha | cbedd8f | 2018-02-16 08:39:22 -0800 | [diff] [blame] | 222 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_165, NONE, DEEP, NF1, HIZCRx0, DISPUPD), /* AVS_I2S1_SDO */ |
Furquan Shaikh | d1b482c | 2018-07-25 08:58:52 -0700 | [diff] [blame] | 223 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_166, NONE, DEEP, NF2, HIZCRx0, DISPUPD), /* AVS_I2S2_BCLK */ |
Shaunak Saha | cbedd8f | 2018-02-16 08:39:22 -0800 | [diff] [blame] | 224 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_167, NONE, DEEP, NF2, HIZCRx0, DISPUPD), /* AVS_I2S2_WS_SYNC */ |
| 225 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_168, NONE, DEEP, NF2, HIZCRx0, DISPUPD), /* AVS_I2S2_SDI */ |
| 226 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_169, NONE, DEEP, NF2, HIZCRx0, DISPUPD), /* AVS_I2S2_SD0 */ |
| 227 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_170, DN_20K, DEEP, NF2, HIZCRx0, DISPUPD), /* AVS_I2S1_MCLK */ |
Furquan Shaikh | d1b482c | 2018-07-25 08:58:52 -0700 | [diff] [blame] | 228 | |
| 229 | /* Disable standby for GPIO_171 and GPIO_173 to support Wake on Voice */ |
Shamile Khan | 644b2dd | 2018-05-09 09:50:16 -0700 | [diff] [blame] | 230 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_171, DN_20K, DEEP, NF1), /* AVS_M_CLK_A1 -- DMIC_CLK1 */ |
Furquan Shaikh | d1b482c | 2018-07-25 08:58:52 -0700 | [diff] [blame] | 231 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_172, DN_20K, DEEP, NF1, HIZCRx0, DISPUPD), /* AVS_M_CLK_B1 */ |
Shamile Khan | 644b2dd | 2018-05-09 09:50:16 -0700 | [diff] [blame] | 232 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_173, DN_20K, DEEP, NF1), /* AVS_M_DATA_1 -- DMIC_DATA */ |
Furquan Shaikh | d1b482c | 2018-07-25 08:58:52 -0700 | [diff] [blame] | 233 | PAD_NC(GPIO_174, DN_20K), /* AVS_M_CLK_AB2 -- unused */ |
| 234 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_175, NONE, DEEP, NF1, HIZCRx0, DISPUPD), /* AVS_M_DATA_2 */ |
Shaunak Saha | cbedd8f | 2018-02-16 08:39:22 -0800 | [diff] [blame] | 235 | |
| 236 | /* SCC COMMUNITY GPIOS */ |
Furquan Shaikh | d1b482c | 2018-07-25 08:58:52 -0700 | [diff] [blame] | 237 | PAD_NC(GPIO_176, UP_20K), /* SMB_ALERTB -- unused */ |
| 238 | PAD_NC(GPIO_177, UP_20K), /* SMB_CLK -- unused */ |
Wisley Chen | cbf27fd | 2019-04-01 13:21:01 +0800 | [diff] [blame] | 239 | PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_178, 0, DEEP, NONE, Tx0RxDCRx0, DISPUPD), /* EN_PP3300_WLAN_L */ |
| 240 | |
Furquan Shaikh | d1b482c | 2018-07-25 08:58:52 -0700 | [diff] [blame] | 241 | PAD_NC(GPIO_179, NONE), /* SDCARD_CLK -- unused */ |
| 242 | PAD_NC(GPIO_180, NONE), /* SDCARD_CMD -- unused */ |
| 243 | PAD_NC(GPIO_181, UP_20K), /* SDCARD_D0 -- unused */ |
| 244 | PAD_NC(GPIO_182, UP_20K), /* SDCARD_D1 -- unused */ |
| 245 | PAD_NC(GPIO_183, UP_20K), /* SDCARD_D2 -- unused */ |
| 246 | PAD_NC(GPIO_184, UP_20K), /* SDCARD_D3 -- unused */ |
| 247 | PAD_NC(GPIO_185, UP_20K), /* SDCARD_CMD -- unused */ |
| 248 | PAD_NC(GPIO_186, UP_20K), /* SDCARD_CD_N -- unused */ |
| 249 | PAD_NC(GPIO_187, NONE), /* SDCARD_LVL_WP -- unused */ |
| 250 | PAD_NC(GPIO_188, UP_20K), /* SDCARD_PWR_DWN_N -- unused */ |
Furquan Shaikh | faad968 | 2018-06-19 08:40:19 -0700 | [diff] [blame] | 251 | PAD_CFG_GPI(GPIO_189, NONE, DEEP), /* EC_IN_RW */ |
Furquan Shaikh | d1b482c | 2018-07-25 08:58:52 -0700 | [diff] [blame] | 252 | PAD_CFG_GPI(GPIO_190, NONE, DEEP), /* PCH_WP_OD */ |
| 253 | |
| 254 | /* |
| 255 | * Disable standby state for these CNVI pins to allow wake on |
| 256 | * WiFI & Bluetooth. |
| 257 | */ |
Shaunak Saha | cbedd8f | 2018-02-16 08:39:22 -0800 | [diff] [blame] | 258 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_191, NONE, DEEP, NF1), /* CNV_BRI_DT */ |
| 259 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_192, UP_20K, DEEP, NF1), /* CNV_BRI_RSP */ |
| 260 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_193, NONE, DEEP, NF1), /* CNV_RGI_DT */ |
| 261 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_194, UP_20K, DEEP, NF1), /* CNV_RGI_RSP */ |
| 262 | PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_195, NONE, DEEP, NF1), /* CNV_RF_RESET_B */ |
Furquan Shaikh | d1b482c | 2018-07-25 08:58:52 -0700 | [diff] [blame] | 263 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_198, DN_20K, DEEP, NF1, HIZCRx0, ENPD), /* EMMC0_CLK */ |
Shaunak Saha | cbedd8f | 2018-02-16 08:39:22 -0800 | [diff] [blame] | 264 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_200, UP_20K, DEEP, NF1, HIZCRx1, ENPU), /* EMMC0_D0 */ |
| 265 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_201, UP_20K, DEEP, NF1, HIZCRx1, ENPU), /* EMMC0_D1 */ |
| 266 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_202, UP_20K, DEEP, NF1, HIZCRx1, ENPU), /* EMMC0_D2 */ |
| 267 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_203, UP_20K, DEEP, NF1, HIZCRx1, ENPU), /* EMMC0_D3 */ |
| 268 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_204, UP_20K, DEEP, NF1, HIZCRx1, ENPU), /* EMMC0_D4 */ |
| 269 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_205, UP_20K, DEEP, NF1, HIZCRx1, ENPU), /* EMMC0_D5 */ |
| 270 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_206, UP_20K, DEEP, NF1, HIZCRx1, ENPU), /* EMMC0_D6 */ |
| 271 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_207, UP_20K, DEEP, NF1, HIZCRx1, ENPU), /* EMMC0_D7 */ |
| 272 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_208, UP_20K, DEEP, NF1, HIZCRx1, ENPU), /* EMMC0_CMD */ |
Furquan Shaikh | d1b482c | 2018-07-25 08:58:52 -0700 | [diff] [blame] | 273 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_209, NONE, DEEP, NF1, HIZCRx0, DISPUPD), /* EMMC0_STROBE */ |
| 274 | PAD_NC(GPIO_210, DN_20K), |
Hannah Williams | 5e83e8b | 2018-02-09 18:35:17 -0800 | [diff] [blame] | 275 | }; |
| 276 | |
Furquan Shaikh | 06a41f1 | 2018-07-25 14:30:59 -0700 | [diff] [blame] | 277 | const struct pad_config *__weak variant_base_gpio_table(size_t *num) |
Hannah Williams | 5e83e8b | 2018-02-09 18:35:17 -0800 | [diff] [blame] | 278 | { |
| 279 | *num = ARRAY_SIZE(gpio_table); |
| 280 | return gpio_table; |
| 281 | } |
| 282 | |
Furquan Shaikh | 06a41f1 | 2018-07-25 14:30:59 -0700 | [diff] [blame] | 283 | const struct pad_config *__weak variant_override_gpio_table(size_t *num) |
| 284 | { |
| 285 | *num = 0; |
| 286 | return NULL; |
| 287 | } |
| 288 | |
Marco Chen | 8a6174d | 2019-07-15 08:50:35 +0800 | [diff] [blame] | 289 | const struct pad_config *__weak variant_early_override_gpio_table(size_t *num) |
| 290 | { |
| 291 | *num = 0; |
| 292 | return NULL; |
| 293 | } |
| 294 | |
Michael Niewöhner | 732e9e6 | 2020-12-21 17:09:08 +0100 | [diff] [blame] | 295 | static const struct pad_config early_bootblock_gpio_table[] = { |
| 296 | PAD_NC(GPIO_154, NONE), /* LPC_CLKRUNB -- NC for eSPI */ |
Michael Niewöhner | 1c22753 | 2020-12-21 03:46:58 +0100 | [diff] [blame] | 297 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_64, UP_20K, DEEP, NF1, HIZCRx1, DISPUPD), /* LPSS_UART2_RXD */ |
| 298 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_65, UP_20K, DEEP, NF1, TxLASTRxE, DISPUPD), /* LPSS_UART2_TXD */ |
Michael Niewöhner | 732e9e6 | 2020-12-21 17:09:08 +0100 | [diff] [blame] | 299 | }; |
| 300 | |
| 301 | const struct pad_config *mainboard_early_bootblock_gpio_table(size_t *num) |
| 302 | { |
| 303 | *num = ARRAY_SIZE(early_bootblock_gpio_table); |
| 304 | return early_bootblock_gpio_table; |
| 305 | } |
| 306 | |
Hannah Williams | 5e83e8b | 2018-02-09 18:35:17 -0800 | [diff] [blame] | 307 | /* GPIOs needed prior to ramstage. */ |
| 308 | static const struct pad_config early_gpio_table[] = { |
Justin TerAvest | cc6953b | 2018-03-16 13:29:42 -0600 | [diff] [blame] | 309 | PAD_CFG_GPI(GPIO_190, NONE, DEEP), /* PCH_WP_OD */ |
Ravi Sarawadi | c293496 | 2018-02-27 13:57:01 -0800 | [diff] [blame] | 310 | /* GSPI0_INT */ |
Furquan Shaikh | 2d60209 | 2018-09-05 13:59:00 -0700 | [diff] [blame] | 311 | PAD_CFG_GPI_APIC_IOS(GPIO_63, NONE, DEEP, LEVEL, INVERT, TxDRxE, |
Ravi Sarawadi | c293496 | 2018-02-27 13:57:01 -0800 | [diff] [blame] | 312 | DISPUPD), /* H1_PCH_INT_ODL */ |
| 313 | /* GSPI0_CLK */ |
| 314 | PAD_CFG_NF(GPIO_79, NONE, DEEP, NF1), /* H1_SLAVE_SPI_CLK_R */ |
| 315 | /* GSPI0_CS# */ |
| 316 | PAD_CFG_NF(GPIO_80, NONE, DEEP, NF1), /* H1_SLAVE_SPI_CS_L_R */ |
| 317 | /* GSPI0_MISO */ |
| 318 | PAD_CFG_NF(GPIO_82, NONE, DEEP, NF1), /* H1_SLAVE_SPI_MISO */ |
| 319 | /* GSPI0_MOSI */ |
| 320 | PAD_CFG_NF(GPIO_83, NONE, DEEP, NF1), /* H1_SLAVE_SPI_MOSI_R */ |
Furquan Shaikh | ade3bc5 | 2018-03-28 11:53:37 -0700 | [diff] [blame] | 321 | |
| 322 | /* Enable power to wifi early in bootblock and de-assert PERST#. */ |
Furquan Shaikh | ae2cf49 | 2018-11-21 14:02:59 -0800 | [diff] [blame] | 323 | PAD_CFG_GPO(GPIO_178, 0, DEEP), /* EN_PP3300_WLAN_L */ |
Furquan Shaikh | fbd6f39 | 2018-08-09 14:29:08 -0700 | [diff] [blame] | 324 | PAD_CFG_GPO(GPIO_164, 0, DEEP), /* WLAN_PE_RST */ |
Furquan Shaikh | c045179 | 2018-04-27 11:34:00 -0700 | [diff] [blame] | 325 | |
| 326 | /* |
| 327 | * ESPI_IO1 acts as ALERT# (which is open-drain) and requies a weak |
| 328 | * pull-up for proper operation. Since there is no external pull present |
| 329 | * on this platform, configure an internal weak pull-up. |
| 330 | */ |
| 331 | PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_151, UP_20K, DEEP, NF2, HIZCRx1, |
| 332 | ENPU), /* ESPI_IO1 */ |
Marco Chen | af62855 | 2019-07-10 13:13:45 +0800 | [diff] [blame] | 333 | |
| 334 | /* GPIO_67 and GPIO_117 are in early_gpio_table and gpio_table. For variants |
| 335 | * having LTE SKUs, these two GPIOs would be overridden to output high first |
| 336 | * in the bootblock then be set to default state in gpio_table for non-LTE |
| 337 | * SKUs and keep to output high for LTE SKUs in ramstage. |
| 338 | */ |
| 339 | PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_67, 0, DEEP, NONE, TxLASTRxE, DISPUPD), /* UART2-CTS_B -- EN_PP3300_DX_LTE_SOC */ |
| 340 | PAD_CFG_GPI_SCI_LOW(GPIO_117, NONE, DEEP, EDGE_SINGLE),/* PCIE_WAKE1_B -- LTE_WAKE_L */ |
| 341 | /* GPIO_161 is in early_gpio_table and gpio_table because LTE SKU needs |
| 342 | * to override this pin to output low then high respectively in two |
| 343 | * stages. |
| 344 | */ |
| 345 | PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_161, 1, DEEP, UP_20K, Tx1RxDCRx0, DISPUPD), /* AVS_I2S1_MCLK -- LTE_OFF_ODL */ |
Hannah Williams | 5e83e8b | 2018-02-09 18:35:17 -0800 | [diff] [blame] | 346 | }; |
| 347 | |
Aaron Durbin | 6403167 | 2018-04-21 14:45:32 -0600 | [diff] [blame] | 348 | const struct pad_config *__weak |
Hannah Williams | 5e83e8b | 2018-02-09 18:35:17 -0800 | [diff] [blame] | 349 | variant_early_gpio_table(size_t *num) |
| 350 | { |
| 351 | *num = ARRAY_SIZE(early_gpio_table); |
| 352 | return early_gpio_table; |
| 353 | } |
| 354 | |
| 355 | /* GPIO settings before entering sleep. */ |
| 356 | static const struct pad_config sleep_gpio_table[] = { |
| 357 | }; |
| 358 | |
Hannah Williams | 09b883f | 2018-05-11 19:14:38 -0700 | [diff] [blame] | 359 | /* GPIO settings before entering slp_s5. */ |
| 360 | static const struct pad_config sleep_s5_gpio_table[] = { |
| 361 | /* BT_DISABLE_L */ |
Furquan Shaikh | 6bedbd6 | 2018-10-04 11:11:49 -0700 | [diff] [blame] | 362 | PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_109, 0, DEEP, NONE, Tx0RxDCRx1, SAME), |
Hannah Williams | 09b883f | 2018-05-11 19:14:38 -0700 | [diff] [blame] | 363 | }; |
| 364 | |
Aaron Durbin | 6403167 | 2018-04-21 14:45:32 -0600 | [diff] [blame] | 365 | const struct pad_config *__weak |
Hannah Williams | 09b883f | 2018-05-11 19:14:38 -0700 | [diff] [blame] | 366 | variant_sleep_gpio_table(size_t *num, int slp_typ) |
Hannah Williams | 5e83e8b | 2018-02-09 18:35:17 -0800 | [diff] [blame] | 367 | { |
Hannah Williams | 09b883f | 2018-05-11 19:14:38 -0700 | [diff] [blame] | 368 | if (slp_typ == ACPI_S5) { |
| 369 | *num = ARRAY_SIZE(sleep_s5_gpio_table); |
| 370 | return sleep_s5_gpio_table; |
| 371 | } |
| 372 | |
Hannah Williams | 5e83e8b | 2018-02-09 18:35:17 -0800 | [diff] [blame] | 373 | *num = ARRAY_SIZE(sleep_gpio_table); |
| 374 | return sleep_gpio_table; |
| 375 | } |
| 376 | |
| 377 | static const struct cros_gpio cros_gpios[] = { |
Hannah Williams | ecef322 | 2018-04-27 00:13:25 -0700 | [diff] [blame] | 378 | CROS_GPIO_REC_AL(CROS_GPIO_VIRTUAL, CROS_GPIO_DEVICE_NAME), |
Hannah Williams | 0a2b9d4 | 2018-04-13 21:43:05 -0700 | [diff] [blame] | 379 | CROS_GPIO_WP_AH(PAD_SCC(GPIO_PCH_WP), GPIO_COMM_SCC_NAME), |
Hannah Williams | 5e83e8b | 2018-02-09 18:35:17 -0800 | [diff] [blame] | 380 | }; |
| 381 | |
Aaron Durbin | 6403167 | 2018-04-21 14:45:32 -0600 | [diff] [blame] | 382 | const struct cros_gpio *__weak variant_cros_gpios(size_t *num) |
Hannah Williams | 5e83e8b | 2018-02-09 18:35:17 -0800 | [diff] [blame] | 383 | { |
| 384 | *num = ARRAY_SIZE(cros_gpios); |
| 385 | return cros_gpios; |
| 386 | } |