diff --git a/src/mainboard/pcengines/apu2/gpio_ftns.h b/src/mainboard/pcengines/apu2/gpio_ftns.h index 638622076e..fb4edd97c4 100644 --- a/src/mainboard/pcengines/apu2/gpio_ftns.h +++ b/src/mainboard/pcengines/apu2/gpio_ftns.h @@ -26,4 +26,18 @@ int get_spd_offset(void); #define GPIO_68 0x48 // PE4_WDIS (SIMSWAP1 on APU5) #define GPIO_71 0x4D // PROCHOT +#define GPIO_22_IOMUX_GPIOxx 0 +#define GPIO_32_IOMUX_GPIOxx 0 +#define GPIO_33_IOMUX_GPIOxx 0 +#define GPIO_49_IOMUX_GPIOxx 2 +#define GPIO_50_IOMUX_GPIOxx 2 +#define GPIO_51_IOMUX_GPIOxx 2 +#define GPIO_55_IOMUX_GPIOxx 3 +#define GPIO_57_IOMUX_GPIOxx 1 +#define GPIO_58_IOMUX_GPIOxx 1 +#define GPIO_59_IOMUX_GPIOxx 3 +#define GPIO_64_IOMUX_GPIOxx 2 +#define GPIO_68_IOMUX_GPIOxx 0 +#define GPIO_71_IOMUX_GPIOxx 0 + #endif /* GPIO_FTNS_H */ diff --git a/src/mainboard/pcengines/apu2/romstage.c b/src/mainboard/pcengines/apu2/romstage.c index 9b1435ac79..5d2b988fbc 100644 --- a/src/mainboard/pcengines/apu2/romstage.c +++ b/src/mainboard/pcengines/apu2/romstage.c @@ -31,39 +31,31 @@ void board_BeforeAgesa(struct sysinfo *cb) } const struct soc_amd_gpio gpio_common[] = { - /* Output disabled, pull up/down disabled */ - PAD_CFG_STRUCT(GPIO_49, Function2, PAD_PULL(PULL_NONE)), - PAD_CFG_STRUCT(GPIO_50, Function2, PAD_PULL(PULL_NONE)), - PAD_CFG_STRUCT(GPIO_71, Function0, PAD_PULL(PULL_NONE)), - /* Output enabled, value low, pull up/down disabled */ - PAD_CFG_STRUCT(GPIO_57, Function1, PAD_OUTPUT(LOW)), - PAD_CFG_STRUCT(GPIO_58, Function1, PAD_OUTPUT(LOW)), - PAD_CFG_STRUCT(GPIO_59, Function3, PAD_OUTPUT(LOW)), - /* Output enabled, value high, pull up/down disabled */ - PAD_CFG_STRUCT(GPIO_51, Function2, PAD_OUTPUT(HIGH)), - PAD_CFG_STRUCT(GPIO_55, Function3, PAD_OUTPUT(HIGH)), - PAD_CFG_STRUCT(GPIO_64, Function2, PAD_OUTPUT(HIGH)), - PAD_CFG_STRUCT(GPIO_68, Function0, PAD_OUTPUT(HIGH)), + PAD_GPI(GPIO_49, PULL_NONE), + PAD_GPI(GPIO_50, PULL_NONE), + PAD_GPI(GPIO_71, PULL_NONE), + PAD_GPO(GPIO_57, LOW), + PAD_GPO(GPIO_58, LOW), + PAD_GPO(GPIO_59, LOW), + PAD_GPO(GPIO_51, HIGH), + PAD_GPO(GPIO_55, HIGH), + PAD_GPO(GPIO_64, HIGH), + PAD_GPO(GPIO_68, HIGH), }; const struct soc_amd_gpio gpio_apu2[] = { - /* Output disabled, pull up/down disabled */ - PAD_CFG_STRUCT(GPIO_32, Function0, PAD_PULL(PULL_NONE)), + PAD_GPI(GPIO_32, PULL_NONE), }; const struct soc_amd_gpio gpio_apu34[] = { - /* Output disabled, pull up/down disabled */ - PAD_CFG_STRUCT(GPIO_32, Function0, PAD_PULL(PULL_NONE)), - /* Output enabled, value low, pull up/down disabled */ - PAD_CFG_STRUCT(GPIO_33, Function0, PAD_OUTPUT(LOW)), + PAD_GPI(GPIO_32, PULL_NONE), + PAD_GPO(GPIO_33, LOW), }; const struct soc_amd_gpio gpio_apu5[] = { - /* Output disabled, pull up/down disabled */ - PAD_CFG_STRUCT(GPIO_22, Function0, PAD_PULL(PULL_NONE)), - /* Output enabled, value high, pull up/down disabled */ - PAD_CFG_STRUCT(GPIO_32, Function0, PAD_OUTPUT(HIGH)), - PAD_CFG_STRUCT(GPIO_33, Function0, PAD_OUTPUT(HIGH)), + PAD_GPI(GPIO_22, PULL_NONE), + PAD_GPO(GPIO_32, HIGH), + PAD_GPO(GPIO_33, HIGH), }; static void early_lpc_init(void)