Yang Chen | 5e5fe36 | 2023-12-15 16:41:42 +0800 | [diff] [blame] | 1 | #!/bin/bash -e |
| 2 | # shellcheck source=meta-facebook/meta-minerva/recipes-minerva/plat-tool/files/minerva-common-functions |
| 3 | source /usr/libexec/minerva-common-functions |
| 4 | |
Yang Chen | d586c4c | 2024-05-09 20:39:36 +0800 | [diff] [blame] | 5 | power_on_led_init() { |
| 6 | systemctl start obmc-led-group-start@power_on.service |
| 7 | } |
| 8 | |
Yang Chen | 5e5fe36 | 2023-12-15 16:41:42 +0800 | [diff] [blame] | 9 | # set initial value for GPIO output pins |
Yang Chen | 9c7a587 | 2024-02-23 09:33:51 +0800 | [diff] [blame] | 10 | set_gpio PWREN_MTIA_BLADE1_EN_N 0 |
| 11 | set_gpio PWREN_MTIA_BLADE2_EN_N 0 |
| 12 | set_gpio PWREN_MTIA_BLADE3_EN_N 0 |
| 13 | set_gpio PWREN_MTIA_BLADE4_EN_N 0 |
| 14 | set_gpio PWREN_MTIA_BLADE5_EN_N 0 |
| 15 | set_gpio PWREN_MTIA_BLADE6_EN_N 0 |
| 16 | set_gpio PWREN_MTIA_BLADE7_EN_N 0 |
| 17 | set_gpio PWREN_MTIA_BLADE8_EN_N 0 |
| 18 | set_gpio PWREN_MTIA_BLADE9_EN_N 0 |
| 19 | set_gpio PWREN_MTIA_BLADE10_EN_N 0 |
| 20 | set_gpio PWREN_MTIA_BLADE11_EN_N 0 |
| 21 | set_gpio PWREN_MTIA_BLADE12_EN_N 0 |
| 22 | set_gpio PWREN_MTIA_BLADE13_EN_N 0 |
| 23 | set_gpio PWREN_MTIA_BLADE14_EN_N 0 |
| 24 | set_gpio PWREN_MTIA_BLADE15_EN_N 0 |
Yang Chen | a0c7c9f | 2024-09-24 22:30:27 +0800 | [diff] [blame^] | 25 | set_gpio PWREN_MTIA_BLADE16_EN_N 0 |
Yang Chen | 5e5fe36 | 2023-12-15 16:41:42 +0800 | [diff] [blame] | 26 | |
Yang Chen | 9c7a587 | 2024-02-23 09:33:51 +0800 | [diff] [blame] | 27 | set_gpio PWREN_NW_BLADE1_EN_N 0 |
| 28 | set_gpio PWREN_NW_BLADE2_EN_N 0 |
| 29 | set_gpio PWREN_NW_BLADE3_EN_N 0 |
| 30 | set_gpio PWREN_NW_BLADE4_EN_N 0 |
| 31 | set_gpio PWREN_NW_BLADE5_EN_N 0 |
Yang Chen | a0c7c9f | 2024-09-24 22:30:27 +0800 | [diff] [blame^] | 32 | set_gpio PWREN_NW_BLADE6_EN_N 0 |
Yang Chen | 5e5fe36 | 2023-12-15 16:41:42 +0800 | [diff] [blame] | 33 | |
Yang Chen | 9c7a587 | 2024-02-23 09:33:51 +0800 | [diff] [blame] | 34 | set_gpio PWREN_MTIA_BLADE1_HSC_EN_N 0 |
| 35 | set_gpio PWREN_MTIA_BLADE2_HSC_EN_N 0 |
| 36 | set_gpio PWREN_MTIA_BLADE3_HSC_EN_N 0 |
| 37 | set_gpio PWREN_MTIA_BLADE4_HSC_EN_N 0 |
| 38 | set_gpio PWREN_MTIA_BLADE5_HSC_EN_N 0 |
| 39 | set_gpio PWREN_MTIA_BLADE6_HSC_EN_N 0 |
| 40 | set_gpio PWREN_MTIA_BLADE7_HSC_EN_N 0 |
| 41 | set_gpio PWREN_MTIA_BLADE8_HSC_EN_N 0 |
| 42 | set_gpio PWREN_MTIA_BLADE9_HSC_EN_N 0 |
| 43 | set_gpio PWREN_MTIA_BLADE10_HSC_EN_N 0 |
| 44 | set_gpio PWREN_MTIA_BLADE11_HSC_EN_N 0 |
| 45 | set_gpio PWREN_MTIA_BLADE12_HSC_EN_N 0 |
| 46 | set_gpio PWREN_MTIA_BLADE13_HSC_EN_N 0 |
| 47 | set_gpio PWREN_MTIA_BLADE14_HSC_EN_N 0 |
| 48 | set_gpio PWREN_MTIA_BLADE15_HSC_EN_N 0 |
Yang Chen | a0c7c9f | 2024-09-24 22:30:27 +0800 | [diff] [blame^] | 49 | set_gpio PWREN_MTIA_BLADE16_HSC_EN_N 0 |
Yang Chen | 5e5fe36 | 2023-12-15 16:41:42 +0800 | [diff] [blame] | 50 | |
Yang Chen | 9c7a587 | 2024-02-23 09:33:51 +0800 | [diff] [blame] | 51 | set_gpio PWREN_NW_BLADE1_HSC_EN_N 0 |
| 52 | set_gpio PWREN_NW_BLADE2_HSC_EN_N 0 |
| 53 | set_gpio PWREN_NW_BLADE3_HSC_EN_N 0 |
| 54 | set_gpio PWREN_NW_BLADE4_HSC_EN_N 0 |
| 55 | set_gpio PWREN_NW_BLADE5_HSC_EN_N 0 |
Yang Chen | a0c7c9f | 2024-09-24 22:30:27 +0800 | [diff] [blame^] | 56 | set_gpio PWREN_NW_BLADE6_HSC_EN_N 0 |
Yang Chen | 5e5fe36 | 2023-12-15 16:41:42 +0800 | [diff] [blame] | 57 | |
Yang Chen | a0c7c9f | 2024-09-24 22:30:27 +0800 | [diff] [blame^] | 58 | set_gpio PWREN_SGPIO_FCB_1_EN_N 0 |
| 59 | set_gpio PWREN_SGPIO_FCB_2_EN_N 0 |
| 60 | set_gpio PWREN_SGPIO_FCB_3_EN_N 0 |
| 61 | set_gpio PWREN_SGPIO_FCB_4_EN_N 0 |
| 62 | set_gpio PWREN_SGPIO_FCB_5_EN_N 0 |
| 63 | set_gpio PWREN_SGPIO_FCB_6_EN_N 0 |
Yang Chen | 5e5fe36 | 2023-12-15 16:41:42 +0800 | [diff] [blame] | 64 | |
Yang Chen | a0c7c9f | 2024-09-24 22:30:27 +0800 | [diff] [blame^] | 65 | set_gpio FM_BMC_RST_RTCRST_R 0 |
| 66 | set_gpio ERR_INJECT_CMM_PWR_FAIL_N 1 |
Yang Chen | 5e5fe36 | 2023-12-15 16:41:42 +0800 | [diff] [blame] | 67 | |
Yang Chen | a0c7c9f | 2024-09-24 22:30:27 +0800 | [diff] [blame^] | 68 | set_gpio RST_I2CRST_FCB_1_N 1 |
| 69 | set_gpio RST_I2CRST_FCB_2_N 1 |
| 70 | set_gpio RST_I2CRST_FCB_3_N 1 |
| 71 | set_gpio RST_I2CRST_FCB_4_N 1 |
| 72 | set_gpio RST_I2CRST_FCB_5_N 1 |
| 73 | set_gpio RST_I2CRST_FCB_6_N 1 |
Yang Chen | 5e5fe36 | 2023-12-15 16:41:42 +0800 | [diff] [blame] | 74 | |
Yang Chen | 80af24e | 2024-06-28 16:33:50 +0800 | [diff] [blame] | 75 | set_gpio FM_MDIO_SW_SEL 0 |
| 76 | set_gpio FM_88E6393X_BIN_UPDATE_EN_N 1 |
| 77 | set_gpio WATER_VALVE_CLOSED_N 1 |
Yang Chen | 5e5fe36 | 2023-12-15 16:41:42 +0800 | [diff] [blame] | 78 | set_gpio BMC_READY 1 |
Yang Chen | d586c4c | 2024-05-09 20:39:36 +0800 | [diff] [blame] | 79 | |
| 80 | power_on_led_init |
| 81 | |
Yang Chen | 5e5fe36 | 2023-12-15 16:41:42 +0800 | [diff] [blame] | 82 | exit 0 |