Charles Boyer | 765c66a | 2022-05-03 11:01:24 -0500 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | # Provide source directive to shellcheck. |
| 4 | # shellcheck source=meta-fii/meta-mori/recipes-mori/mori-fw-utility/mori-fw/mori-lib.sh |
| 5 | source /usr/libexec/mori-fw/mori-lib.sh |
| 6 | |
| 7 | function set_mux_default(){ |
| 8 | # set all mux route to CPU before power on host |
| 9 | # BMC_CPU_DDR_I2C_SEL |
| 10 | set_gpio_ctrl CPU_DDR_SEL 1 |
| 11 | # BMC_CPU_EEPROM_I2C_SEL |
| 12 | set_gpio_ctrl CPU_EEPROM_SEL 1 |
| 13 | # BMC_CPU_PMBUS_SEL |
| 14 | set_gpio_ctrl CPU_VRD_SEL 1 |
Charles Boyer | 765c66a | 2022-05-03 11:01:24 -0500 | [diff] [blame] | 15 | # LED control |
| 16 | # LED_BMC_LIVE |
| 17 | set_gpio_ctrl LED_BMC_ALIVE 1 |
| 18 | } |
| 19 | |
| 20 | set_mux_default |
| 21 | set_gpio_ctrl HPM_STBY_RST_N 1 |
| 22 | sleep 5 |
| 23 | set_gpio_ctrl S0_BMC_OK 1 |
| 24 | |
| 25 | # Create /run/openbmc for system power files |
| 26 | if [[ ! -d "/run/openbmc" ]]; then |
| 27 | mkdir "/run/openbmc" |
| 28 | fi |
| 29 | |
| 30 | echo "BMC initialization complete" |