diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mainboard/google/kahlee/BiosCallOuts.c | 3 | ||||
-rw-r--r-- | src/mainboard/google/kahlee/Makefile.inc | 3 | ||||
-rw-r--r-- | src/mainboard/google/kahlee/bootblock/BiosCallOuts.c | 75 | ||||
-rw-r--r-- | src/mainboard/google/kahlee/gpio.c | 94 |
4 files changed, 101 insertions, 74 deletions
diff --git a/src/mainboard/google/kahlee/BiosCallOuts.c b/src/mainboard/google/kahlee/BiosCallOuts.c index 357cf10597..c65c930d08 100644 --- a/src/mainboard/google/kahlee/BiosCallOuts.c +++ b/src/mainboard/google/kahlee/BiosCallOuts.c @@ -19,6 +19,8 @@ #include <soc/hudson.h> #include <stdlib.h> +extern const GPIO_CONTROL oem_kahlee_gpio[]; + static AGESA_STATUS fch_initenv(UINT32 Func, UINTN FchData, VOID *ConfigPtr) { AMD_CONFIG_PARAMS *StdHeader = ConfigPtr; @@ -26,6 +28,7 @@ static AGESA_STATUS fch_initenv(UINT32 Func, UINTN FchData, VOID *ConfigPtr) if (StdHeader->Func == AMD_INIT_ENV) { FCH_DATA_BLOCK *FchParams_env = (FCH_DATA_BLOCK *)FchData; printk(BIOS_DEBUG, "Fch OEM config in INIT ENV "); + FchParams_env->PostOemGpioTable = oem_kahlee_gpio; /* XHCI configuration */ if (IS_ENABLED(CONFIG_STONEYRIDGE_XHCI_ENABLE)) diff --git a/src/mainboard/google/kahlee/Makefile.inc b/src/mainboard/google/kahlee/Makefile.inc index 665e086dc7..6db037f726 100644 --- a/src/mainboard/google/kahlee/Makefile.inc +++ b/src/mainboard/google/kahlee/Makefile.inc @@ -17,14 +17,17 @@ bootblock-y += bootblock/bootblock.c bootblock-y += bootblock/BiosCallOuts.c bootblock-y += bootblock/OemCustomize.c bootblock-y += ec.c +bootblock-y += gpio.c romstage-y += BiosCallOuts.c romstage-y += chromeos.c +romstage-y += gpio.c romstage-y += OemCustomize.c ramstage-y += BiosCallOuts.c ramstage-y += chromeos.c ramstage-y += ec.c +ramstage-y += gpio.c ramstage-y += OemCustomize.c verstage-y += chromeos.c diff --git a/src/mainboard/google/kahlee/bootblock/BiosCallOuts.c b/src/mainboard/google/kahlee/bootblock/BiosCallOuts.c index 78b1153677..b70db1dc0e 100644 --- a/src/mainboard/google/kahlee/bootblock/BiosCallOuts.c +++ b/src/mainboard/google/kahlee/bootblock/BiosCallOuts.c @@ -19,80 +19,7 @@ #include <soc/hudson.h> #include <stdlib.h> -static const GPIO_CONTROL oem_kahlee_gpio[] = { - /* SER TX */ - {8, Function1, FCH_GPIO_PULL_UP_ENABLE | FCH_GPIO_OUTPUT_VALUE - | FCH_GPIO_OUTPUT_ENABLE}, - /* SER RX */ - {9, Function1, FCH_GPIO_PULL_UP_ENABLE }, - - /* AGPIO 12 */ - {12, Function2, FCH_GPIO_PULL_UP_ENABLE }, - - /* TS_EN_SOC (TouchScreen enable GPIO) */ - {13, Function1, FCH_GPIO_PULL_UP_ENABLE | FCH_GPIO_OUTPUT_VALUE - | FCH_GPIO_OUTPUT_ENABLE}, - - /* CAM_PWRON (Camera enable GPIO) */ - {14, Function1, FCH_GPIO_PULL_UP_ENABLE | FCH_GPIO_OUTPUT_VALUE - | FCH_GPIO_OUTPUT_ENABLE}, - - /* EC_IN_RW */ - {15, Function1, FCH_GPIO_PULL_UP_ENABLE | FCH_GPIO_OUTPUT_VALUE - | FCH_GPIO_OUTPUT_ENABLE}, - - /* APU_I2C_3_SCL */ - {19, Function1, FCH_GPIO_PULL_UP_ENABLE }, - - /* APU_I2C_3_SDA */ - {20, Function1, FCH_GPIO_PULL_UP_ENABLE }, - - - /* APU_BT_ON# */ - {24, Function1, FCH_GPIO_PULL_UP_ENABLE | FCH_GPIO_OUTPUT_VALUE - | FCH_GPIO_OUTPUT_ENABLE}, - - /* DEVSLP1_SSD */ - {67, Function1, FCH_GPIO_PULL_UP_ENABLE}, - - /* DEVSLP1_EMMC */ - /* No Connect for now. - * {70, Function1, FCH_GPIO_PULL_UP_ENABLE}, - */ - - /* SPI_TPM_CS_L */ - {76, Function1, FCH_GPIO_PULL_DOWN_ENABLE | FCH_GPIO_OUTPUT_VALUE - | FCH_GPIO_OUTPUT_ENABLE}, - - /* CAM_LED# */ - {84, Function1, FCH_GPIO_PULL_UP_ENABLE | FCH_GPIO_OUTPUT_VALUE - | FCH_GPIO_OUTPUT_ENABLE}, - - /* TS_RST# (TouchScreen Reset) */ - {85, Function1, FCH_GPIO_PULL_UP_ENABLE | FCH_GPIO_OUTPUT_VALUE - | FCH_GPIO_OUTPUT_ENABLE}, - - /* WLAN_RST#_AUX */ - {119, Function2, FCH_GPIO_PULL_UP_ENABLE | FCH_GPIO_OUTPUT_VALUE - | FCH_GPIO_OUTPUT_ENABLE}, - - /* BD_ID1 */ - {135, Function1, 0 }, - - /* TPM_SERIRQ# */ - {139, Function1, FCH_GPIO_PULL_UP_ENABLE }, - - /* BD_ID2 */ - {140, Function1, 0 }, - - /* APU_SPI_WP */ - {142, Function1, FCH_GPIO_PULL_UP_ENABLE }, - - /* BD_ID3 */ - {144, Function1, 0 }, - - {-1} -}; +extern const GPIO_CONTROL oem_kahlee_gpio[]; static AGESA_STATUS fch_initreset(UINT32 Func, UINTN FchData, VOID *ConfigPtr) { diff --git a/src/mainboard/google/kahlee/gpio.c b/src/mainboard/google/kahlee/gpio.c new file mode 100644 index 0000000000..56a5e3d2c7 --- /dev/null +++ b/src/mainboard/google/kahlee/gpio.c @@ -0,0 +1,94 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2017 Advanced Micro Devices, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include <AGESA.h> +#include <FchPlatform.h> +#include <soc/hudson.h> +#include <stdlib.h> + +const GPIO_CONTROL oem_kahlee_gpio[] = { + /* SER TX */ + {8, Function1, FCH_GPIO_PULL_UP_ENABLE | FCH_GPIO_OUTPUT_VALUE + | FCH_GPIO_OUTPUT_ENABLE}, + /* SER RX */ + {9, Function1, FCH_GPIO_PULL_UP_ENABLE }, + + /* AGPIO 12 */ + {12, Function2, FCH_GPIO_PULL_UP_ENABLE }, + + /* TS_EN_SOC (TouchScreen enable GPIO) */ + {13, Function1, FCH_GPIO_PULL_UP_ENABLE | FCH_GPIO_OUTPUT_VALUE + | FCH_GPIO_OUTPUT_ENABLE}, + + /* CAM_PWRON (Camera enable GPIO) */ + {14, Function1, FCH_GPIO_PULL_UP_ENABLE | FCH_GPIO_OUTPUT_VALUE + | FCH_GPIO_OUTPUT_ENABLE}, + + /* EC_IN_RW */ + {15, Function1, FCH_GPIO_PULL_UP_ENABLE | FCH_GPIO_OUTPUT_VALUE + | FCH_GPIO_OUTPUT_ENABLE}, + + /* APU_I2C_3_SCL */ + {19, Function1, FCH_GPIO_PULL_UP_ENABLE }, + + /* APU_I2C_3_SDA */ + {20, Function1, FCH_GPIO_PULL_UP_ENABLE }, + + + /* APU_BT_ON# */ + {24, Function1, FCH_GPIO_PULL_UP_ENABLE | FCH_GPIO_OUTPUT_VALUE + | FCH_GPIO_OUTPUT_ENABLE}, + + /* DEVSLP1_SSD */ + {67, Function1, FCH_GPIO_PULL_UP_ENABLE}, + + /* DEVSLP1_EMMC */ + /* No Connect for now. + * {70, Function1, FCH_GPIO_PULL_UP_ENABLE}, + */ + + /* SPI_TPM_CS_L */ + {76, Function1, FCH_GPIO_PULL_DOWN_ENABLE | FCH_GPIO_OUTPUT_VALUE + | FCH_GPIO_OUTPUT_ENABLE}, + + /* CAM_LED# */ + {84, Function1, FCH_GPIO_PULL_UP_ENABLE | FCH_GPIO_OUTPUT_VALUE + | FCH_GPIO_OUTPUT_ENABLE}, + + /* TS_RST# (TouchScreen Reset) */ + {85, Function1, FCH_GPIO_PULL_UP_ENABLE | FCH_GPIO_OUTPUT_VALUE + | FCH_GPIO_OUTPUT_ENABLE}, + + /* WLAN_RST#_AUX */ + {119, Function2, FCH_GPIO_PULL_UP_ENABLE | FCH_GPIO_OUTPUT_VALUE + | FCH_GPIO_OUTPUT_ENABLE}, + + /* BD_ID1 */ + {135, Function1, 0 }, + + /* TPM_SERIRQ# */ + {139, Function1, FCH_GPIO_PULL_UP_ENABLE }, + + /* BD_ID2 */ + {140, Function1, 0 }, + + /* APU_SPI_WP */ + {142, Function1, FCH_GPIO_PULL_UP_ENABLE }, + + /* BD_ID3 */ + {144, Function1, 0 }, + + {-1} +}; |