Thang Q. Nguyen | dde1fed | 2021-11-04 08:30:27 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | # shellcheck disable=SC2034 |
ThuBaNguyen | fb21478 | 2021-07-08 14:20:43 +0700 | [diff] [blame] | 4 | # Index of GPIO device in gpioget/gpioset |
| 5 | GPIO_CHIP0_IDX=0 |
| 6 | GPIO_CHIP1_IDX=1 |
| 7 | |
| 8 | # Base of GPIO chip in /sys/class/gpio |
| 9 | GPIO_CHIP0_BASE=792 |
| 10 | GPIO_CHIP1_BASE=780 |
| 11 | |
| 12 | ### Power control configuration |
| 13 | # Power control gpios |
| 14 | S0_SHD_REQ_L=49 |
| 15 | S0_SHD_ACK_L=50 |
| 16 | S0_REBOOT_ACK_L=75 |
| 17 | S0_SYSRESET_L=91 |
Thang Q. Nguyen | bddca60 | 2022-07-29 14:45:33 +0700 | [diff] [blame] | 18 | S1_SYSRESET_L=92 |
ThuBaNguyen | fb21478 | 2021-07-08 14:20:43 +0700 | [diff] [blame] | 19 | |
| 20 | |
| 21 | ### Table 1: GPIO Assignments |
chaul.ampere | 7b6d85f | 2022-07-23 04:28:42 +0000 | [diff] [blame] | 22 | BMC_I2C_BACKUP_SEL=8 |
ThuBaNguyen | fb21478 | 2021-07-08 14:20:43 +0700 | [diff] [blame] | 23 | S0_CPU_FW_BOOT_OK=48 |
| 24 | CPU_BMC_OVERTEMP_L=51 |
| 25 | CPU_BMC_HIGHTEMP_L=72 |
| 26 | CPU_FAULT_ALERT=73 |
| 27 | S1_CPU_FW_BOOT_OK=202 |
Thang Q. Nguyen | bddca60 | 2022-07-29 14:45:33 +0700 | [diff] [blame] | 28 | S0_SPECIAL_BOOT=3 |
| 29 | S1_SPECIAL_BOOT=66 |
| 30 | RTC_LOCK=203 |
ThuBaNguyen | fb21478 | 2021-07-08 14:20:43 +0700 | [diff] [blame] | 31 | |
| 32 | ### Table 2: Alert and Additional Miscellaneous Signals |
| 33 | S0_SCP_AUTH_FAILURE=74 |
| 34 | S1_SCP_AUTH_FAILURE=205 |
| 35 | BMC_OK=228 |
| 36 | SLAVE_PRESENT_L=230 |
| 37 | |
| 38 | ### Common GPIOs |
| 39 | SYS_PSON_L=42 |
| 40 | BMC_READY=229 |
ThuBaNguyen | 3310917 | 2021-07-02 15:39:57 +0700 | [diff] [blame] | 41 | |
| 42 | ### OCP power selection |
| 43 | OCP_AUX_PWREN=139 |
| 44 | OCP_MAIN_PWREN=140 |
| 45 | |
| 46 | ### SPI0 Mode selection |
| 47 | SPI0_PROGRAM_SEL=226 |
| 48 | SPI0_BACKUP_SEL=227 |
Thang Q. Nguyen | bddca60 | 2022-07-29 14:45:33 +0700 | [diff] [blame] | 49 | |
| 50 | ### Mt.Jade specific GPIOs |
| 51 | S0_I2C9_ALERT_L=100 |
| 52 | S1_I2C9_ALERT_L=101 |
| 53 | GPIO_BMC_VGA_FRONT_PRES_L=135 |
| 54 | GPIO_S0_VRHOT_L=144 |
| 55 | GPIO_S1_VRHOT_L=145 |
| 56 | BMC_VGA_SEL=195 |
| 57 | BMC_GPIOR2_EXT_HIGHTEMP_L=138 |
| 58 | GPIO_BMC_VR_PMBUS_SEL_L=149 |
| 59 | GPIO_BMC_I2C6_RESET_L=63 |