diff options
Diffstat (limited to 'meta-ampere')
-rw-r--r-- | meta-ampere/meta-jade/recipes-ampere/platform/ampere-platform-init/ampere_platform_init.sh | 75 | ||||
-rw-r--r-- | meta-ampere/meta-jade/recipes-ampere/platform/ampere-utils/gpio-defs.sh | 15 |
2 files changed, 48 insertions, 42 deletions
diff --git a/meta-ampere/meta-jade/recipes-ampere/platform/ampere-platform-init/ampere_platform_init.sh b/meta-ampere/meta-jade/recipes-ampere/platform/ampere-platform-init/ampere_platform_init.sh index 4b448ef159..e04af8da26 100644 --- a/meta-ampere/meta-jade/recipes-ampere/platform/ampere-platform-init/ampere_platform_init.sh +++ b/meta-ampere/meta-jade/recipes-ampere/platform/ampere-platform-init/ampere_platform_init.sh @@ -2,54 +2,45 @@ # shellcheck source=/dev/null source /usr/sbin/gpio-lib.sh +source /usr/sbin/gpio-defs.sh -# GPIOAC3 BMC_SPI0_BACKUP_SEL Boot from MAIN SPI-HOST -gpio_configure_output 227 0 +# Configure to boot from MAIN SPI-HOST +gpio_configure_output "$SPI0_BACKUP_SEL" 0 -# GPIOM4 S0_I2C9_ALERT_L -gpio_configure_input 100 - -# GPIOM5 S1_I2C9_ALERT_L -gpio_configure_input 101 - -# GPIOQ7 GPIO_BMC_VGA_FRONT_PRES_L -gpio_configure_input 135 - -# GPIOS0 GPIO_S0_VRHOT_L -gpio_configure_input 144 - -# GPIOS1 GPIO_S1_VRHOT_L -gpio_configure_input 145 - -# GPIOY3 BMC_VGA_SEL -gpio_configure_output 195 1 - -# GPIO_BMC_READY -gpio_configure_output 229 1 +gpio_configure_input "$S0_I2C9_ALERT_L" +gpio_configure_input "$S1_I2C9_ALERT_L" +gpio_configure_input "$GPIO_BMC_VGA_FRONT_PRES_L" +gpio_configure_input "$GPIO_S0_VRHOT_L" +gpio_configure_input "$GPIO_S1_VRHOT_L" +gpio_configure_output "$BMC_VGA_SEL" 1 # ======================================================= # Below GPIOs are controlled by other services so just # initialize in A/C power only. bootstatus=$(cat /sys/class/watchdog/watchdog0/bootstatus) if [ "$bootstatus" == '32' ]; then - # BMC_GPIOR2_EXT_HIGHTEMP_L - gpio_configure_output 138 1 - - # GPIOS5 GPIO_BMC_VR_PMBUS_SEL_L - gpio_configure_output 149 1 - - # GPIOH7 GPIO_BMC_I2C6_RESET_L - gpio_configure_output 63 1 - - # GPIO_BMC_OCP_AUX_PWREN - gpio_configure_output 139 1 - - # GPIO_BMC_OCP_MAIN_PWREN - gpio_configure_output 140 0 - - # BMC_GPIOAC2_SPI0_PROGRAM_SEL - gpio_configure_output 226 0 - - # BMC_GPIOB0_I2C_BACKUP_SEL - gpio_configure_output 8 1 + gpio_configure_output "$BMC_GPIOR2_EXT_HIGHTEMP_L" 1 + gpio_configure_output "$GPIO_BMC_VR_PMBUS_SEL_L" 1 + gpio_configure_output "$GPIO_BMC_I2C6_RESET_L" 1 + + # Initialize OCP register + gpio_configure_output "$OCP_MAIN_PWREN" 0 + + # Configure SPI-NOR/EEPROM switching + gpio_configure_output "$SPI0_PROGRAM_SEL" 0 + gpio_configure_output "$BMC_I2C_BACKUP_SEL" 1 + gpio_configure_output "$SPI0_BACKUP_SEL" 0 + + # Initialize BMC_SYS_PSON_L, SHD_REQ_L, BMC_SYSRESET_L + gpio_configure_output "$SYS_PSON_L" 1 + gpio_configure_output "$S0_SHD_REQ_L" 1 + gpio_configure_output "$S0_SYSRESET_L" 1 + gpio_configure_output "$S1_SYSRESET_L" 1 + + # RTC Lock, SPECIAL_BOOT + gpio_configure_output "$RTC_LOCK" 0 + gpio_configure_output "$S0_SPECIAL_BOOT" 0 + gpio_configure_output "$S1_SPECIAL_BOOT" 0 fi + +gpio_configure_output "$BMC_READY" 1 diff --git a/meta-ampere/meta-jade/recipes-ampere/platform/ampere-utils/gpio-defs.sh b/meta-ampere/meta-jade/recipes-ampere/platform/ampere-utils/gpio-defs.sh index e0a7c020e3..2f2a4d6703 100644 --- a/meta-ampere/meta-jade/recipes-ampere/platform/ampere-utils/gpio-defs.sh +++ b/meta-ampere/meta-jade/recipes-ampere/platform/ampere-utils/gpio-defs.sh @@ -15,6 +15,7 @@ S0_SHD_REQ_L=49 S0_SHD_ACK_L=50 S0_REBOOT_ACK_L=75 S0_SYSRESET_L=91 +S1_SYSRESET_L=92 ### Table 1: GPIO Assignments @@ -24,6 +25,9 @@ CPU_BMC_OVERTEMP_L=51 CPU_BMC_HIGHTEMP_L=72 CPU_FAULT_ALERT=73 S1_CPU_FW_BOOT_OK=202 +S0_SPECIAL_BOOT=3 +S1_SPECIAL_BOOT=66 +RTC_LOCK=203 ### Table 2: Alert and Additional Miscellaneous Signals S0_SCP_AUTH_FAILURE=74 @@ -42,3 +46,14 @@ OCP_MAIN_PWREN=140 ### SPI0 Mode selection SPI0_PROGRAM_SEL=226 SPI0_BACKUP_SEL=227 + +### Mt.Jade specific GPIOs +S0_I2C9_ALERT_L=100 +S1_I2C9_ALERT_L=101 +GPIO_BMC_VGA_FRONT_PRES_L=135 +GPIO_S0_VRHOT_L=144 +GPIO_S1_VRHOT_L=145 +BMC_VGA_SEL=195 +BMC_GPIOR2_EXT_HIGHTEMP_L=138 +GPIO_BMC_VR_PMBUS_SEL_L=149 +GPIO_BMC_I2C6_RESET_L=63 |