mb/google/rauru: Set up open-drain ChromeOS pins

Set open-drain GPIOs for ChromeOS as input and bias-disable mode.
After applying this patch, the voltage of these pins will become the
expected value 1.8V (previously 1.0V), preventing wrong judgement of
low/high.

BUG=b:396106564
TEST=emerge-rauru coreboot
BRANCH=rauru

Change-Id: I76c7931a56540a395eaf934125bded7fede84992
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86398
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
This commit is contained in:
Yu-Ping Wu 2025-02-13 15:50:28 +08:00 committed by Yidi Lin
commit f48b4d16ca
2 changed files with 59 additions and 5 deletions

View file

@ -9,9 +9,37 @@
void setup_chromeos_gpios(void)
{
gpio_input(GPIO_EC_AP_INT_ODL);
gpio_input(GPIO_GSC_AP_INT_ODL);
/* Set up open-drain pins */
gpio_input(GPIO_RSVD_GPI0);
gpio_input(GPIO_EC_AP_DSI_HPD_OD);
gpio_input(GPIO_RSVD_GPI2);
gpio_input(GPIO_AP_WP_ODL);
gpio_input(GPIO_ALS_INT_SCP_ODL);
gpio_input(GPIO_LID_ACCEL_INT_SCP_L);
gpio_input(GPIO_IMU_INT_SCP_L);
gpio_input(GPIO_TCHSCR_INT_1V8_ODL);
gpio_input(GPIO_TCHPAD_INT_ODL);
gpio_input(GPIO_SPKR_INT_ODL);
gpio_input(GPIO_HP_INT_ODL);
gpio_input(GPIO_SD_CD_AP_ODL);
gpio_input(GPIO_FP_AP_INT_1V8_S3_ODL);
gpio_input(GPIO_EDP_HPD_1V8);
gpio_input(GPIO_SAR_INT_ODL);
gpio_input(GPIO_RSVD_GPI15);
gpio_input(GPIO_RSVD_GPI16);
gpio_input(GPIO_RSVD_GPI17);
gpio_input(GPIO_GSC_AP_INT_ODL);
gpio_input(GPIO_EC_AP_INT_ODL);
gpio_input(GPIO_RSVD_GPI20);
gpio_input(GPIO_RSVD_GPI21);
gpio_input(GPIO_RSVD_GPI22);
gpio_input(GPIO_EC_AP_DP_HPD_OD);
gpio_input(GPIO_PCIE_SSD_WAKE_OBFF_1V8_ODL);
gpio_input(GPIO_PCIE_SSD_CLKREQ_1V8_ODL);
gpio_input(GPIO_PCIE_WLAN_WAKE_OBFF_1V2_ODL);
gpio_input(GPIO_PCIE_WLAN_CLKREQ_1V2_ODL);
/* Set up GPIOs */
gpio_output(GPIO_AP_EC_WARM_RST_REQ, 0);
gpio_output(GPIO_AP_FP_FW_UP_STRAP, 0);
gpio_output(GPIO_BEEP_ON, 0);

View file

@ -5,11 +5,37 @@
#include <soc/gpio.h>
#define GPIO_RSVD_GPI0 GPIO(EINT0)
#define GPIO_EC_AP_DSI_HPD_OD GPIO(EINT1)
#define GPIO_RSVD_GPI2 GPIO(EINT2)
#define GPIO_AP_WP_ODL GPIO(EINT3)
#define GPIO_ALS_INT_SCP_ODL GPIO(EINT4)
#define GPIO_LID_ACCEL_INT_SCP_L GPIO(EINT5)
#define GPIO_IMU_INT_SCP_L GPIO(EINT6)
#define GPIO_TCHSCR_INT_1V8_ODL GPIO(EINT7)
#define GPIO_TCHPAD_INT_ODL GPIO(EINT8)
#define GPIO_SPKR_INT_ODL GPIO(EINT9)
#define GPIO_HP_INT_ODL GPIO(EINT10)
#define GPIO_SD_CD_AP_ODL GPIO(EINT11)
#define GPIO_FP_AP_INT_1V8_S3_ODL GPIO(EINT12)
#define GPIO_EDP_HPD_1V8 GPIO(EINT13)
#define GPIO_SAR_INT_ODL GPIO(EINT14)
#define GPIO_RSVD_GPI15 GPIO(EINT15)
#define GPIO_RSVD_GPI16 GPIO(EINT16)
#define GPIO_RSVD_GPI17 GPIO(EINT17)
#define GPIO_GSC_AP_INT_ODL GPIO(EINT18)
#define GPIO_EC_AP_INT_ODL GPIO(EINT19)
#define GPIO_RSVD_GPI20 GPIO(EINT20)
#define GPIO_RSVD_GPI21 GPIO(EINT21)
#define GPIO_RSVD_GPI22 GPIO(EINT22)
#define GPIO_EC_AP_DP_HPD_OD GPIO(EINT32)
#define GPIO_PCIE_SSD_WAKE_OBFF_1V8_ODL GPIO(BPI_D_BUS0)
#define GPIO_PCIE_SSD_CLKREQ_1V8_ODL GPIO(BPI_D_BUS2)
#define GPIO_PCIE_WLAN_WAKE_OBFF_1V2_ODL GPIO(PCIE0_WAKEN)
#define GPIO_PCIE_WLAN_CLKREQ_1V2_ODL GPIO(PCIE0_CLKREQN)
#define GPIO_BEEP_ON GPIO(PERIPHERAL_EN1)
#define GPIO_EN_SPKR GPIO(PERIPHERAL_EN0)
#define GPIO_SD_CD_AP_ODL GPIO(EINT11)
#define GPIO_GSC_AP_INT_ODL GPIO(EINT18)
#define GPIO_EC_AP_INT_ODL GPIO(EINT19)
#define GPIO_XHCI_INIT_DONE GPIO(EINT28)
#define GPIO_AP_EC_WARM_RST_REQ GPIO(EINT29)
#define GPIO_FP_RST_1V8_S3_L GPIO(EINT26)