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_BLADE0_EN_N 0 |
| 11 | set_gpio PWREN_MTIA_BLADE1_EN_N 0 |
| 12 | set_gpio PWREN_MTIA_BLADE2_EN_N 0 |
| 13 | set_gpio PWREN_MTIA_BLADE3_EN_N 0 |
| 14 | set_gpio PWREN_MTIA_BLADE4_EN_N 0 |
| 15 | set_gpio PWREN_MTIA_BLADE5_EN_N 0 |
| 16 | set_gpio PWREN_MTIA_BLADE6_EN_N 0 |
| 17 | set_gpio PWREN_MTIA_BLADE7_EN_N 0 |
| 18 | set_gpio PWREN_MTIA_BLADE8_EN_N 0 |
| 19 | set_gpio PWREN_MTIA_BLADE9_EN_N 0 |
| 20 | set_gpio PWREN_MTIA_BLADE10_EN_N 0 |
| 21 | set_gpio PWREN_MTIA_BLADE11_EN_N 0 |
| 22 | set_gpio PWREN_MTIA_BLADE12_EN_N 0 |
| 23 | set_gpio PWREN_MTIA_BLADE13_EN_N 0 |
| 24 | set_gpio PWREN_MTIA_BLADE14_EN_N 0 |
| 25 | set_gpio PWREN_MTIA_BLADE15_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_BLADE0_EN_N 0 |
| 28 | set_gpio PWREN_NW_BLADE1_EN_N 0 |
| 29 | set_gpio PWREN_NW_BLADE2_EN_N 0 |
| 30 | set_gpio PWREN_NW_BLADE3_EN_N 0 |
| 31 | set_gpio PWREN_NW_BLADE4_EN_N 0 |
| 32 | set_gpio PWREN_NW_BLADE5_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_BLADE0_HSC_EN_N 0 |
| 35 | set_gpio PWREN_MTIA_BLADE1_HSC_EN_N 0 |
| 36 | set_gpio PWREN_MTIA_BLADE2_HSC_EN_N 0 |
| 37 | set_gpio PWREN_MTIA_BLADE3_HSC_EN_N 0 |
| 38 | set_gpio PWREN_MTIA_BLADE4_HSC_EN_N 0 |
| 39 | set_gpio PWREN_MTIA_BLADE5_HSC_EN_N 0 |
| 40 | set_gpio PWREN_MTIA_BLADE6_HSC_EN_N 0 |
| 41 | set_gpio PWREN_MTIA_BLADE7_HSC_EN_N 0 |
| 42 | set_gpio PWREN_MTIA_BLADE8_HSC_EN_N 0 |
| 43 | set_gpio PWREN_MTIA_BLADE9_HSC_EN_N 0 |
| 44 | set_gpio PWREN_MTIA_BLADE10_HSC_EN_N 0 |
| 45 | set_gpio PWREN_MTIA_BLADE11_HSC_EN_N 0 |
| 46 | set_gpio PWREN_MTIA_BLADE12_HSC_EN_N 0 |
| 47 | set_gpio PWREN_MTIA_BLADE13_HSC_EN_N 0 |
| 48 | set_gpio PWREN_MTIA_BLADE14_HSC_EN_N 0 |
| 49 | set_gpio PWREN_MTIA_BLADE15_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_BLADE0_HSC_EN_N 0 |
| 52 | set_gpio PWREN_NW_BLADE1_HSC_EN_N 0 |
| 53 | set_gpio PWREN_NW_BLADE2_HSC_EN_N 0 |
| 54 | set_gpio PWREN_NW_BLADE3_HSC_EN_N 0 |
| 55 | set_gpio PWREN_NW_BLADE4_HSC_EN_N 0 |
| 56 | set_gpio PWREN_NW_BLADE5_HSC_EN_N 0 |
Yang Chen | 5e5fe36 | 2023-12-15 16:41:42 +0800 | [diff] [blame] | 57 | |
Yang Chen | 80af24e | 2024-06-28 16:33:50 +0800 | [diff] [blame] | 58 | set_gpio PWREN_FCB_TOP_0_EN_N 0 |
| 59 | set_gpio PWREN_FCB_TOP_1_EN_N 0 |
| 60 | set_gpio PWREN_FCB_MIDDLE_0_EN_N 0 |
| 61 | set_gpio PWREN_FCB_MIDDLE_1_EN_N 0 |
| 62 | set_gpio PWREN_FCB_BOTTOM_1_EN_N 0 |
| 63 | set_gpio PWREN_FCB_BOTTOM_0_EN_N 0 |
Yang Chen | 5e5fe36 | 2023-12-15 16:41:42 +0800 | [diff] [blame] | 64 | |
| 65 | set_gpio FM_CMM_AC_CYCLE_N 1 |
| 66 | |
Yang Chen | 80af24e | 2024-06-28 16:33:50 +0800 | [diff] [blame] | 67 | set_gpio RST_I2CRST_FCB_BOTTOM_1_N 1 |
| 68 | set_gpio RST_I2CRST_FCB_BOTTOM_0_N 1 |
| 69 | set_gpio RST_I2CRST_FCB_MIDDLE_0_N 1 |
| 70 | set_gpio RST_I2CRST_FCB_MIDDLE_1_N 1 |
| 71 | set_gpio RST_I2CRST_FCB_TOP_0_N 1 |
| 72 | set_gpio RST_I2CRST_FCB_TOP_1_N 1 |
Yang Chen | 5e5fe36 | 2023-12-15 16:41:42 +0800 | [diff] [blame] | 73 | |
Yang Chen | 80af24e | 2024-06-28 16:33:50 +0800 | [diff] [blame] | 74 | set_gpio FM_MDIO_SW_SEL 0 |
| 75 | set_gpio FM_88E6393X_BIN_UPDATE_EN_N 1 |
| 76 | set_gpio WATER_VALVE_CLOSED_N 1 |
Yang Chen | 5e5fe36 | 2023-12-15 16:41:42 +0800 | [diff] [blame] | 77 | set_gpio BMC_READY 1 |
Yang Chen | d586c4c | 2024-05-09 20:39:36 +0800 | [diff] [blame] | 78 | |
| 79 | power_on_led_init |
| 80 | |
Yang Chen | 5e5fe36 | 2023-12-15 16:41:42 +0800 | [diff] [blame] | 81 | exit 0 |