blob: de609ee56b422c0c564d02b528976eccdb676b79 [file] [log] [blame]
Yang Chen5e5fe362023-12-15 16:41:42 +08001#!/bin/bash -e
2# shellcheck source=meta-facebook/meta-minerva/recipes-minerva/plat-tool/files/minerva-common-functions
3source /usr/libexec/minerva-common-functions
4
Yang Chend586c4c2024-05-09 20:39:36 +08005power_on_led_init() {
6 systemctl start obmc-led-group-start@power_on.service
7}
8
Yang Chen5e5fe362023-12-15 16:41:42 +08009# set initial value for GPIO output pins
Yang Chen9c7a5872024-02-23 09:33:51 +080010set_gpio PWREN_MTIA_BLADE0_EN_N 0
11set_gpio PWREN_MTIA_BLADE1_EN_N 0
12set_gpio PWREN_MTIA_BLADE2_EN_N 0
13set_gpio PWREN_MTIA_BLADE3_EN_N 0
14set_gpio PWREN_MTIA_BLADE4_EN_N 0
15set_gpio PWREN_MTIA_BLADE5_EN_N 0
16set_gpio PWREN_MTIA_BLADE6_EN_N 0
17set_gpio PWREN_MTIA_BLADE7_EN_N 0
18set_gpio PWREN_MTIA_BLADE8_EN_N 0
19set_gpio PWREN_MTIA_BLADE9_EN_N 0
20set_gpio PWREN_MTIA_BLADE10_EN_N 0
21set_gpio PWREN_MTIA_BLADE11_EN_N 0
22set_gpio PWREN_MTIA_BLADE12_EN_N 0
23set_gpio PWREN_MTIA_BLADE13_EN_N 0
24set_gpio PWREN_MTIA_BLADE14_EN_N 0
25set_gpio PWREN_MTIA_BLADE15_EN_N 0
Yang Chen5e5fe362023-12-15 16:41:42 +080026
Yang Chen9c7a5872024-02-23 09:33:51 +080027set_gpio PWREN_NW_BLADE0_EN_N 0
28set_gpio PWREN_NW_BLADE1_EN_N 0
29set_gpio PWREN_NW_BLADE2_EN_N 0
30set_gpio PWREN_NW_BLADE3_EN_N 0
31set_gpio PWREN_NW_BLADE4_EN_N 0
32set_gpio PWREN_NW_BLADE5_EN_N 0
Yang Chen5e5fe362023-12-15 16:41:42 +080033
Yang Chen9c7a5872024-02-23 09:33:51 +080034set_gpio PWREN_MTIA_BLADE0_HSC_EN_N 0
35set_gpio PWREN_MTIA_BLADE1_HSC_EN_N 0
36set_gpio PWREN_MTIA_BLADE2_HSC_EN_N 0
37set_gpio PWREN_MTIA_BLADE3_HSC_EN_N 0
38set_gpio PWREN_MTIA_BLADE4_HSC_EN_N 0
39set_gpio PWREN_MTIA_BLADE5_HSC_EN_N 0
40set_gpio PWREN_MTIA_BLADE6_HSC_EN_N 0
41set_gpio PWREN_MTIA_BLADE7_HSC_EN_N 0
42set_gpio PWREN_MTIA_BLADE8_HSC_EN_N 0
43set_gpio PWREN_MTIA_BLADE9_HSC_EN_N 0
44set_gpio PWREN_MTIA_BLADE10_HSC_EN_N 0
45set_gpio PWREN_MTIA_BLADE11_HSC_EN_N 0
46set_gpio PWREN_MTIA_BLADE12_HSC_EN_N 0
47set_gpio PWREN_MTIA_BLADE13_HSC_EN_N 0
48set_gpio PWREN_MTIA_BLADE14_HSC_EN_N 0
49set_gpio PWREN_MTIA_BLADE15_HSC_EN_N 0
Yang Chen5e5fe362023-12-15 16:41:42 +080050
Yang Chen9c7a5872024-02-23 09:33:51 +080051set_gpio PWREN_NW_BLADE0_HSC_EN_N 0
52set_gpio PWREN_NW_BLADE1_HSC_EN_N 0
53set_gpio PWREN_NW_BLADE2_HSC_EN_N 0
54set_gpio PWREN_NW_BLADE3_HSC_EN_N 0
55set_gpio PWREN_NW_BLADE4_HSC_EN_N 0
56set_gpio PWREN_NW_BLADE5_HSC_EN_N 0
Yang Chen5e5fe362023-12-15 16:41:42 +080057
Yang Chen9c7a5872024-02-23 09:33:51 +080058set_gpio PWREN_FCB_TOP_L_EN_N 0
59set_gpio PWREN_FCB_TOP_R_EN_N 0
60set_gpio PWREN_FCB_MIDDLE_L_EN_N 0
61set_gpio PWREN_FCB_MIDDLE_R_EN_N 0
62set_gpio PWREN_FCB_BOTTOM_L_EN_N 0
63set_gpio PWREN_FCB_BOTTOM_R_EN_N 0
Yang Chen5e5fe362023-12-15 16:41:42 +080064
65set_gpio FM_CMM_AC_CYCLE_N 1
66
67# if MGMT_SFP_PRSNT_N = 0 -> MGMT_SFP_TX_DIS = 0
68# if MGMT_SFP_PRSNT_N = 1 -> MGMT_SFP_TX_DIS = 1
69MGMT_SFP_PRSNT_N_VALUE=$(get_gpio MGMT_SFP_PRSNT_N)
70if [ "$MGMT_SFP_PRSNT_N_VALUE" = "0" ]; then
71 set_gpio MGMT_SFP_TX_DIS 0
72else
73 set_gpio MGMT_SFP_TX_DIS 1
74fi
75
76set_gpio RST_I2CRST_MTIA_BLADE0_1_N 1
77set_gpio RST_I2CRST_MTIA_BLADE2_3_N 1
78set_gpio RST_I2CRST_MTIA_BLADE4_5_N 1
79set_gpio RST_I2CRST_MTIA_BLADE6_7_N 1
80set_gpio RST_I2CRST_MTIA_BLADE8_9_N 1
81set_gpio RST_I2CRST_MTIA_BLADE10_11_N 1
82set_gpio RST_I2CRST_MTIA_BLADE12_13_N 1
83set_gpio RST_I2CRST_MTIA_BLADE14_15_N 1
84set_gpio RST_I2CRST_NW_BLADE0_1_2_N 1
85set_gpio RST_I2CRST_NW_BLADE3_4_5_N 1
86
87set_gpio RST_I2CRST_FCB_N 1
88set_gpio RST_I2CRST_FCB_B_L_N 1
89set_gpio RST_I2CRST_FCB_B_R_N 1
90set_gpio RST_I2CRST_FCB_M_L_N 1
91set_gpio RST_I2CRST_FCB_M_R_N 1
92set_gpio RST_I2CRST_FCB_T_L_N 1
93set_gpio RST_I2CRST_FCB_T_R_N 1
94
95set_gpio wFM_88E6393X_BIN_UPDATE_EN_N 1
96set_gpio WATER_VALVE_CLOSED_N 0
97set_gpio BMC_READY 1
Yang Chend586c4c2024-05-09 20:39:36 +080098
99power_on_led_init
100
Yang Chen5e5fe362023-12-15 16:41:42 +0800101exit 0