Jon Murphy has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/74608 )
Change subject: mb/google/myst: Add named GPIO's ......................................................................
mb/google/myst: Add named GPIO's
Add named GPIO's to help prevent confusion in GPIO management
BUG=b:278969100 TEST=builds
Signed-off-by: Jon Murphy jpmurphy@google.com Change-Id: Ie0ef4fa25e36f380af8eb432ee346e0022117d3c --- M src/mainboard/google/myst/chromeos.c M src/mainboard/google/myst/ec.c M src/mainboard/google/myst/variants/baseboard/include/baseboard/ec.h M src/mainboard/google/myst/variants/baseboard/include/baseboard/gpio.h M src/mainboard/google/myst/variants/baseboard/include/baseboard/variants.h A src/mainboard/google/myst/variants/myst/include/variant/gpio.h 6 files changed, 94 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/08/74608/1
diff --git a/src/mainboard/google/myst/chromeos.c b/src/mainboard/google/myst/chromeos.c index e488e81..5c10f65 100644 --- a/src/mainboard/google/myst/chromeos.c +++ b/src/mainboard/google/myst/chromeos.c @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */
-#include <baseboard/gpio.h> #include <boot/coreboot_tables.h> #include <vendorcode/google/chromeos/chromeos.h> +#include <variant/gpio.h>
void fill_lb_gpios(struct lb_gpios *gpios) {}
diff --git a/src/mainboard/google/myst/ec.c b/src/mainboard/google/myst/ec.c index 060119d..d8c1ae3 100644 --- a/src/mainboard/google/myst/ec.c +++ b/src/mainboard/google/myst/ec.c @@ -3,9 +3,9 @@ #include <acpi/acpi.h> #include <amdblocks/smi.h> #include <ec/google/chromeec/ec.h> -#include <gpio.h> #include <soc/smi.h> #include <variant/ec.h> +#include <variant/gpio.h>
static const struct sci_source espi_sci_sources[] = { { diff --git a/src/mainboard/google/myst/variants/baseboard/include/baseboard/ec.h b/src/mainboard/google/myst/variants/baseboard/include/baseboard/ec.h index c6ab30f..2eeb167 100644 --- a/src/mainboard/google/myst/variants/baseboard/include/baseboard/ec.h +++ b/src/mainboard/google/myst/variants/baseboard/include/baseboard/ec.h @@ -5,8 +5,7 @@
#include <ec/ec.h> #include <ec/google/chromeec/ec_commands.h> -#include <baseboard/gpio.h> -#include <gpio.h> +#include <variant/gpio.h>
#define MAINBOARD_EC_SCI_EVENTS \ (EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_CLOSED) \ @@ -73,9 +72,6 @@ /* Enable EC sync interrupt */ #define EC_ENABLE_SYNC_IRQ_GPIO
-/* EC sync irq */ -#define EC_SYNC_IRQ GPIO_90 - /* Enable EC backed PD MCU device in ACPI */ #define EC_ENABLE_PD_MCU_DEVICE
diff --git a/src/mainboard/google/myst/variants/baseboard/include/baseboard/gpio.h b/src/mainboard/google/myst/variants/baseboard/include/baseboard/gpio.h index a6683fd..13286b1 100644 --- a/src/mainboard/google/myst/variants/baseboard/include/baseboard/gpio.h +++ b/src/mainboard/google/myst/variants/baseboard/include/baseboard/gpio.h @@ -5,7 +5,78 @@
#include <gpio.h>
+#define EC_SOC_PWR_BTN_ODL GPIO_0 +#define SYS_RST_ODL GPIO_1 +#define SOC_PCIE_WAKE_ODL GPIO_2 +#define EN_PWR_FP GPIO_4 +#define EN_PP3300_TCHPAD_X GPIO_5 +#define EN_PP3300_WWAN_X GPIO_6 +#define SOC_PEN_DETECT_ODL GPIO_7 +#define SOC_TCHPAD_INT_ODL GPIO_8 +#define EN_PP3300_WLAN_X GPIO_9 +#define WWAN_RST GPIO_11 +#define USB_FAULT_ODL GPIO_16 +#define EC_SOC_WAKE_R_ODL GPIO_17 +#define FP_SOC_INT_L GPIO_18 +#define I2C_SOC_AUDIO_HDMI_SCL_U GPIO_19 +#define I2C_SOC_AUDIO_HDMI_SDA_U GPIO_20 +#define ESPI_EC_ALERT_SOC_ODL GPIO_22 +#define SOC_AC_PRES_OD GPIO_23 +#define SOC_PCIE_RST0_R_L GPIO_26 +#define SOC_PCIE_RST1_R_L GPIO_27 +#define SD_AUX_RST GPIO_29 +#define ESPI_SOC_CS_EC_R_L GPIO_30 +#define SSD_AUX_RST GPIO_31 +#define LPC_RST_L_MB GPIO_32 +#define WLAN_AUX_RST_L GPIO_38 +#define WWAN_AUX_RST_L GPIO_39 +#define SOC_FP_RST_L GPIO_40 +#define SOC_MEM_VID_C1 GPIO_42 +#define ESPI_SOC_D2_EC_R GPIO_68 +#define ESPI_SOC_D3_EC_R GPIO_69 +#define SPI_SOC_CLK_FPMCU_R GPIO_70 +#define EN_TCHSCR_REPORT GPIO_74 +#define SPI_SOC_CS_FPMCU_R_L GPIO_75 +#define ESPI_SOC_CLK_EC_R GPIO_77 +#define RAM_ID_0 GPIO_78 +#define RAM_ID_1 GPIO_79 +#define ESPI_SOC_D1_EC_R GPIO_80 +#define ESPI_SOC_D0_EC_R GPIO_81 +#define GSC_SOC_INT_ODL GPIO_84 +#define HP_INT_ODL GPIO_89 +#define EC_SOC_INT_ODL GPIO_90 +#define TCHSCR_INT_ODL GPIO_91 +#define PCIE_0_WLAN_CLKREQ_ODL GPIO_92 +#define SPI_SOC_DO_FPMCU_DI_R GPIO_104 +#define SPI_SOC_DI_FPMCU_DO_R GPIO_105 +#define RAM_ID_2 GPIO_106 +#define RAM_ID_3 GPIO_107 +#define I2C_SOC_GSC_SCL_U GPIO_113 +#define I2C_SOC_GSC_SDA_U GPIO_114 +#define PCIE_1_SD_CLKREQ_ODL GPIO_115 +#define PCIE_2_WWAN_CLKREQ_ODL GPIO_116 +#define PCIE_3_SSD_CLKREQ_ODL GPIO_131 +#define SOC_FP_BOOT0 GPIO_132 +#define EN_PP3300_CAM_X GPIO_135 +#define SOC_BIOS_WP_OD GPIO_139 +#define UART_SOC_TX_FPMCU_RX GPIO_140 +#define UART_SOC_RX_DBG_TX GPIO_141 +#define UART_SOC_RX_FPMCU_TX GPIO_142 +#define UART_SOC_TX_DBG_RX GPIO_143 +#define EN_PP3300_TCHSCR_X GPIO_144 +#define I2C_SOC_TCHPAD_SCL GPIO_145 +#define I2C_SOC_TCHPAD_SDA GPIO_146 +#define I2C_SOC_TCHSCR_SCL GPIO_147 +#define I2C_SOC_TCHSCR_SDA GPIO_148 +#define EN_SPKR GPIO_153 +#define BT_DISABLE GPIO_154 +#define WLAN_DISABLE GPIO_156 +#define TCHSCR_RST_L GPIO_157 + +/* EC sync irq */ +#define EC_SYNC_IRQ EC_SOC_INT_ODL + /* SPI Write protect */ -#define CROS_WP_GPIO GPIO_139 +#define CROS_WP_GPIO SOC_BIOS_WP_OD
#endif /* __BASEBOARD_GPIO_H__ */ diff --git a/src/mainboard/google/myst/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/myst/variants/baseboard/include/baseboard/variants.h index 3f69548..a15a819 100644 --- a/src/mainboard/google/myst/variants/baseboard/include/baseboard/variants.h +++ b/src/mainboard/google/myst/variants/baseboard/include/baseboard/variants.h @@ -3,7 +3,7 @@ #ifndef __BASEBOARD_VARIANTS_H__ #define __BASEBOARD_VARIANTS_H__
-#include <gpio.h> +#include <variant/gpio.h>
/* This function provides base GPIO configuration table. */ diff --git a/src/mainboard/google/myst/variants/myst/include/variant/gpio.h b/src/mainboard/google/myst/variants/myst/include/variant/gpio.h new file mode 100644 index 0000000..dfaeec3 --- /dev/null +++ b/src/mainboard/google/myst/variants/myst/include/variant/gpio.h @@ -0,0 +1,3 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include <baseboard/gpio.h>