Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | echo |
| 3 | echo "-----FPGA Ethanol<x> CRB Register Dump Utility" |
| 4 | echo |
| 5 | I2CBUS=2 |
| 6 | FPGAADDR=0x50 |
| 7 | |
| 8 | # FPGA FW Version Information |
| 9 | FPGA_REG=39 |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 10 | DATA=$(i2cget -y $I2CBUS $FPGAADDR "$(printf "0x%x" $FPGA_REG)") |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 11 | MAJOR=$((DATA >> 4)) |
| 12 | MINOR=$((DATA & 0x0F)) |
| 13 | echo FPGA FW Version: $MAJOR.$MINOR |
| 14 | |
| 15 | # IP register information |
| 16 | FPGA_REG=0 |
| 17 | IP_REG_MAX=3 |
| 18 | printf "IP Address Registers: " |
| 19 | while [ $FPGA_REG -le $IP_REG_MAX ] |
| 20 | do |
| 21 | # not using printf as integer and hex values are the same for this use |
| 22 | DATA=$(i2cget -y $I2CBUS $FPGAADDR $FPGA_REG) |
| 23 | if [ $FPGA_REG -ne $IP_REG_MAX ] ; then |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 24 | printf "%d." "$DATA" |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 25 | else |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 26 | printf "%d\n\n" "$DATA" |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 27 | fi |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 28 | ((FPGA_REG=FPGA_REG+1)) |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 29 | done |
| 30 | |
| 31 | # VDD block - Addresses 16 - 23 |
| 32 | FPGA_REG=16 |
| 33 | VDD_REG_MAX=23 |
| 34 | SOCKET=0 |
| 35 | |
| 36 | while [ $FPGA_REG -le $VDD_REG_MAX ] |
| 37 | do |
| 38 | VDD_LOOP_CNT=0 |
| 39 | |
| 40 | while [ $VDD_LOOP_CNT -le 1 ] |
| 41 | do |
| 42 | if [ $VDD_LOOP_CNT -eq 0 ] ; then |
| 43 | VDD_LOOP_CNT_TXT="Enables" |
| 44 | else |
| 45 | VDD_LOOP_CNT_TXT="Power Goods" |
| 46 | fi |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 47 | DATA=$(i2cget -y $I2CBUS $FPGAADDR "$(printf "0x%x" $FPGA_REG)") |
| 48 | echo ----------FPGAreg$FPGA_REG-----P$SOCKET VDD "$VDD_LOOP_CNT_TXT" |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 49 | echo VDD_18_DUAL : $((DATA & 0x01)) |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 50 | echo VDD_SOC_DUAL: $(((DATA & 0x02) >> 1)) |
| 51 | echo VDD_SPD_ABCD: $(((DATA & 0x04) >> 2)) |
| 52 | echo VDD_VPP_ABCD: $(((DATA & 0x08) >> 3)) |
| 53 | echo VDD_VTT_ABCD: $(((DATA & 0x10) >> 4)) |
| 54 | echo VDD_MEM_ABCD: $(((DATA & 0x20) >> 5)) |
| 55 | echo VDD_SPD_EFGH: $(((DATA & 0x40) >> 6)) |
| 56 | echo VDD_VPP_EFGH: $(((DATA & 0x80) >> 7)) |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 57 | |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 58 | ((FPGA_REG=FPGA_REG+1)) |
| 59 | DATA=$(i2cget -y $I2CBUS $FPGAADDR "$(printf "0x%x" $FPGA_REG)") |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 60 | echo VDD_VTT_EFGH : $((DATA & 0x01)) |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 61 | echo VDD_MEM_EFGH : $(((DATA & 0x02) >> 1)) |
| 62 | echo VDD_18_RUN-- : $(((DATA & 0x04) >> 2)) |
| 63 | echo VDD_SOC_RUN- : $(((DATA & 0x08) >> 3)) |
| 64 | echo VDD_CORE_RUN : $(((DATA & 0x10) >> 4)) |
| 65 | ((FPGA_REG=FPGA_REG+1)) |
| 66 | ((VDD_LOOP_CNT=VDD_LOOP_CNT+1)) |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 67 | done |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 68 | ((SOCKET=SOCKET+1)) |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 69 | done |
| 70 | |
| 71 | # Power State/Reset Data |
| 72 | FPGA_REG=24 |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 73 | DATA=$(i2cget -y $I2CBUS $FPGAADDR "$(printf "0x%x" $FPGA_REG)") |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 74 | echo ----------FPGAreg$FPGA_REG-----Power state Information: |
| 75 | echo P0_SLP_S5_L--- : $((DATA & 0x01)) |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 76 | echo P0_SLP_S3_L--- : $(((DATA & 0x02) >> 1)) |
| 77 | echo ATX_PS_ON----- : $(((DATA & 0x04) >> 2)) |
| 78 | echo FPGA_5_DUAL_EN : $(((DATA & 0x08) >> 3)) |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 79 | |
| 80 | # Power Good information |
| 81 | FPGA_REG=25 |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 82 | DATA=$(i2cget -y $I2CBUS $FPGAADDR "$(printf "0x%x" $FPGA_REG)") |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 83 | echo ----------FPGAreg$FPGA_REG-----Power Good Information: |
| 84 | echo VDD_33_DUAL_PG------- : $((DATA & 0x01)) |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 85 | echo FPGA_VDD_CORE_DUAL_PG : $(((DATA & 0x02) >> 1)) |
| 86 | echo MGMT_VDD_VPP_DUAL_PG- : $(((DATA & 0x04) >> 2)) |
| 87 | echo MGMT_VDD_MEM_DUAL_PG- : $(((DATA & 0x08) >> 3)) |
| 88 | echo MGMT_VDD_CORE_DUAL_PG : $(((DATA & 0x10) >> 4)) |
| 89 | echo ATX_PWR_OK----------- : $(((DATA & 0x20) >> 5)) |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 90 | |
| 91 | # Power and Reset Signals |
| 92 | FPGA_REG=26 |
| 93 | PWRRST_REG_MAX=27 |
| 94 | SOCKET=0 |
| 95 | while [ $FPGA_REG -le $PWRRST_REG_MAX ] |
| 96 | do |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 97 | DATA=$(i2cget -y $I2CBUS $FPGAADDR "$(printf "0x%x" $FPGA_REG)") |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 98 | echo ----------FPGAreg$FPGA_REG-----P$SOCKET Power and Reset Signals: |
| 99 | echo RSMRST_L----------------- : $((DATA & 0x01)) |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 100 | echo PWR_GOOD----------------- : $(((DATA & 0x02) >> 1)) |
| 101 | echo PWRGD_OUT---------------- : $(((DATA & 0x04) >> 2)) |
| 102 | echo FPGA_PWROK_RESET_BUF_EN_L : $(((DATA & 0x08) >> 3)) |
| 103 | echo 33_PWROK----------------- : $(((DATA & 0x10) >> 4)) |
| 104 | echo VDD_CORE_RUN_PWROK------- : $(((DATA & 0x20) >> 5)) |
| 105 | echo VDD_SOC_RUN_PWROK-------- : $(((DATA & 0x40) >> 6)) |
| 106 | echo 33_RESET_L--------------- : $(((DATA & 0x80) >> 7)) |
| 107 | ((FPGA_REG=FPGA_REG+1)) |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 108 | done |
| 109 | |
| 110 | # Processor and power cable preset signals |
| 111 | FPGA_REG=28 |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 112 | DATA=$(i2cget -y $I2CBUS $FPGAADDR "$(printf "0x%x" $FPGA_REG)") |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 113 | echo ----------FPGAreg$FPGA_REG-----Processor and power cable preset signals: |
| 114 | echo P0_PRESENT_L--------------------- : $((DATA & 0x01)) |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 115 | echo P0_VDD_MEM_ABCD_12_RUN_PLUG_PRSNT : $(((DATA & 0x02) >> 1)) |
| 116 | echo P0_VDD_MEM_EFGH_12_RUN_PLUG_PRSNT : $(((DATA & 0x04) >> 2)) |
| 117 | echo P0_VDD_12_RUN_PLUG_PRSNT--------- : $(((DATA & 0x08) >> 3)) |
| 118 | echo P1_PRESENT_L--------------------- : $(((DATA & 0x10) >> 4)) |
| 119 | echo P1_VDD_MEM_ABCD_12_RUN_PLUG_PRSNT : $(((DATA & 0x20) >> 5)) |
| 120 | echo P1_VDD_MEM_EFGH_12_RUN_PLUG_PRSNT : $(((DATA & 0x40) >> 6)) |
| 121 | echo P1_VDD_12_RUN_PLUG_PRSNT--------- : $(((DATA & 0x80) >> 7)) |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 122 | |
| 123 | # Board LEDs |
| 124 | FPGA_REG=29 |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 125 | DATA=$(i2cget -y $I2CBUS $FPGAADDR "$(printf "0x%x" $FPGA_REG)") |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 126 | echo ----------FPGAreg$FPGA_REG-----LED States: |
| 127 | echo PWR_GOOD_LED--- : $((DATA & 0x01)) |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 128 | echo PWROK_LED------ : $(((DATA & 0x02) >> 1)) |
| 129 | echo RESET_LED_L---- : $(((DATA & 0x04) >> 2)) |
| 130 | echo P0_PROCHOT_LED- : $(((DATA & 0x08) >> 3)) |
| 131 | echo P1_PROCHOT_LED- : $(((DATA & 0x10) >> 4)) |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 132 | |
| 133 | # VR thermal errors |
| 134 | FPGA_REG=30 |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 135 | DATA=$(i2cget -y $I2CBUS $FPGAADDR "$(printf "0x%x" $FPGA_REG)") |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 136 | echo ----------FPGAreg$FPGA_REG-----VR Thermal Errors: |
| 137 | echo P0_VDD_MEM_ABCD_SUS_VRHOT_L : $((DATA & 0x01)) |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 138 | echo P0_VDD_MEM_EFGH_SUS_VRHOT_L : $(((DATA & 0x02) >> 1)) |
| 139 | echo P0_VDD_SOC_RUN_VRHOT_L----- : $(((DATA & 0x04) >> 2)) |
| 140 | echo P0_VDD_CORE_RUN_VRHOT_L---- : $(((DATA & 0x08) >> 3)) |
| 141 | echo P1_VDD_MEM_ABCD_SUS_VRHOT_L : $(((DATA & 0x10) >> 4)) |
| 142 | echo P1_VDD_MEM_EFGH_SUS_VRHOT_L : $(((DATA & 0x20) >> 5)) |
| 143 | echo P1_VDD_SOC_RUN_VRHOT_L----- : $(((DATA & 0x40) >> 6)) |
| 144 | echo P1_VDD_CORE_RUN_VRHOT_L---- : $(((DATA & 0x80) >> 7)) |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 145 | |
| 146 | # Processor and board Thermal Errors |
| 147 | FPGA_REG=31 |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 148 | DATA=$(i2cget -y $I2CBUS $FPGAADDR "$(printf "0x%x" $FPGA_REG)") |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 149 | echo ----------FPGAreg$FPGA_REG-----Processor and board Thermal Errors: |
| 150 | echo FPGA_P0_THERMTRIP_L : $((DATA & 0x01)) |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 151 | echo FPGA_P1_THERMTRIP_L : $(((DATA & 0x02) >> 1)) |
| 152 | echo SENSOR_THERM_L----- : $(((DATA & 0x04) >> 2)) |
| 153 | echo P0_PROCHOT_L------- : $(((DATA & 0x08) >> 3)) |
| 154 | echo P1_PROCHOT_L------- : $(((DATA & 0x10) >> 4)) |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 155 | |
| 156 | # AST2500 control Signals |
| 157 | FPGA_REG=32 |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 158 | DATA=$(i2cget -y $I2CBUS $FPGAADDR "$(printf "0x%x" $FPGA_REG)") |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 159 | echo ----------FPGAreg$FPGA_REG-----AST2500 Control Signals: |
| 160 | echo MGMT_ASSERT_BMC_READY--- : $((DATA & 0x01)) |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 161 | echo MGMT_ASSERT_LOCAL_LOCK-- : $(((DATA & 0x02) >> 1)) |
| 162 | echo MGMT_ASSERT_PWR_BTN----- : $(((DATA & 0x04) >> 2)) |
| 163 | echo MGMT_ASSERT_RST_BTN----- : $(((DATA & 0x08) >> 3)) |
| 164 | echo MGMT_ASSERT_NMI_BTN----- : $(((DATA & 0x10) >> 4)) |
| 165 | echo MGMT_ASSERT_P0_PROCHOT-- : $(((DATA & 0x20) >> 5)) |
| 166 | echo MGMT_ASSERT_P1_PROCHOT-- : $(((DATA & 0x40) >> 6)) |
| 167 | echo MGMT_ASSERT_WARM_RST_BTN : $(((DATA & 0x80) >> 7)) |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 168 | |
| 169 | # FPGA processor control signals |
| 170 | FPGA_REG=33 |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 171 | DATA=$(i2cget -y $I2CBUS $FPGAADDR "$(printf "0x%x" $FPGA_REG)") |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 172 | echo ----------FPGAreg$FPGA_REG-----FPGA processor Control Signals: |
| 173 | echo ASSERT_P0_PWROK_L-------- : $((DATA & 0x01)) |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 174 | echo ASSERT_P0_RESET_L-------- : $(((DATA & 0x02) >> 1)) |
| 175 | echo ASSERT_P0_PROCHOT_L------ : $(((DATA & 0x04) >> 2)) |
| 176 | echo MGMT_SYS_MON_P0_PROCHOT_L : $(((DATA & 0x08) >> 3)) |
| 177 | echo ASSERT_P1_PWROK_L-------- : $(((DATA & 0x10) >> 4)) |
| 178 | echo ASSERT_P1_RESET_L-------- : $(((DATA & 0x20) >> 5)) |
| 179 | echo ASSERT_P1_PROCHOT_L------ : $(((DATA & 0x40) >> 6)) |
| 180 | echo MGMT_SYS_MON_P1_PROCHOT_L : $(((DATA & 0x80) >> 7)) |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 181 | |
| 182 | # Buttons/Resets |
| 183 | FPGA_REG=34 |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 184 | DATA=$(i2cget -y $I2CBUS $FPGAADDR "$(printf "0x%x" $FPGA_REG)") |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 185 | echo ----------FPGAreg$FPGA_REG-----Button and Reset Signals: |
| 186 | echo PWR_BTN_L----- : $((DATA & 0x01)) |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 187 | echo RST_BTN_L----- : $(((DATA & 0x02) >> 1)) |
| 188 | echo WARM_RST_BTN_L : $(((DATA & 0x04) >> 2)) |
| 189 | echo NMI_BTN_L----- : $(((DATA & 0x08) >> 3)) |
| 190 | echo FPGA_BTN_L---- : $(((DATA & 0x10) >> 4)) |
| 191 | echo P0_PWR_BTN_L-- : $(((DATA & 0x20) >> 5)) |
| 192 | echo P0_SYS_RESET_L : $(((DATA & 0x40) >> 6)) |
| 193 | echo P0_KBRST_L---- : $(((DATA & 0x80) >> 7)) |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 194 | |
| 195 | # Miscellaneous Block 1 |
| 196 | FPGA_REG=35 |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 197 | DATA=$(i2cget -y $I2CBUS $FPGAADDR "$(printf "0x%x" $FPGA_REG)") |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 198 | echo ----------FPGAreg$FPGA_REG-----Miscellaneous 35 Signals: |
| 199 | echo MGMT_AC_LOSS_L---------- : $((DATA & 0x01)) |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 200 | echo P0_NV_FORCE_SELF_REFRESH : $(((DATA & 0x02) >> 1)) |
| 201 | echo P1_NV_FORCE_SELF_REFRESH : $(((DATA & 0x04) >> 2)) |
| 202 | echo P0_LOCAL_SPI_ROM_SEL_L-- : $(((DATA & 0x08) >> 3)) |
| 203 | echo PCIE_SLOT4_HP_FON_L----- : $(((DATA & 0x10) >> 4)) |
| 204 | echo P0_NMI_SYNC_FLOOD_L----- : $(((DATA & 0x20) >> 5)) |
| 205 | echo FPGA_LPC_RST_L---------- : $(((DATA & 0x40) >> 6)) |
| 206 | echo MGMT_SMBUS_ALERT_L------ : $(((DATA & 0x80) >> 7)) |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 207 | |
| 208 | # Miscellaneous Block 2 |
| 209 | FPGA_REG=36 |
| 210 | SHUTDOWNERR=0 |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 211 | DATA=$(i2cget -y $I2CBUS $FPGAADDR "$(printf "0x%x" $FPGA_REG)") |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 212 | echo ----------FPGAreg$FPGA_REG-----Miscellaneous 36 Signals: |
| 213 | echo physical_pg------------------- : $((DATA & 0x01)) |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 214 | echo shutdown_error---------------- : $(((DATA & 0x02) >> 1)) |
| 215 | SHUTDOWNERR=$(((DATA & 0x02) >> 1)) |
| 216 | echo P0_PRESENT_HDT---------------- : $(((DATA & 0x04) >> 2)) |
| 217 | echo P1_PRESENT_HDT---------------- : $(((DATA & 0x08) >> 3)) |
| 218 | echo DAP_EXT_P0_CORE_RUN_VOLTAGE_PG : $(((DATA & 0x10) >> 4)) |
| 219 | echo FPGA_BRD_ID------------------- : $(((DATA & 0x20) >> 5)) |
| 220 | echo FPGA_BRD_ID------------------- : $(((DATA & 0x40) >> 6)) |
| 221 | echo MGMT_FPGA_RSVD---------------- : $(((DATA & 0x80) >> 7)) |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 222 | |
| 223 | # Switch S1 |
| 224 | FPGA_REG=37 |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 225 | DATA=$(i2cget -y $I2CBUS $FPGAADDR "$(printf "0x%x" $FPGA_REG)") |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 226 | echo ----------FPGAreg$FPGA_REG-----Switch Bank S1: |
| 227 | if [ $((DATA & 0x01)) -eq 1 ] ; then |
| 228 | echo "FPGA_SW1-1 - OFF - P0 PwrReg PU with Proc" |
| 229 | else |
| 230 | echo "FPGA_SW1-1 - ON - P0 PwrReg PU without Proc" |
| 231 | fi |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 232 | if [ $(((DATA & 0x02) >> 1)) -eq 1 ] ; then |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 233 | echo "FPGA_SW1-1 - OFF - P1 PwrReg PU with Proc" |
| 234 | else |
| 235 | echo "FPGA_SW1-1 - ON - P1 PwrReg PU without Proc" |
| 236 | fi |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 237 | if [ $(((DATA & 0x04) >> 2)) -eq 1 ] ; then |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 238 | echo "FPGA_SW1-3 - OFF - ATX Connectors Valid" |
| 239 | else |
| 240 | echo "FPGA_SW1-3 - ON - ATX Connectors Ignored" |
| 241 | fi |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 242 | if [ $(((DATA & 0x08) >> 3)) -eq 1 ] ; then |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 243 | echo "FPGA_SW1-4 - OFF - Wait for BMC Boot" |
| 244 | else |
| 245 | echo "FPGA_SW1-4 - ON - Do Not Wait for BMC Boot" |
| 246 | fi |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 247 | if [ $(((DATA & 0x10) >> 4)) -eq 1 ] ; then |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 248 | echo "FPGA_SW1-5 - OFF - MemPwrReg PU after ATX" |
| 249 | else |
| 250 | echo "FPGA_SW1-5 - ON - MemPwrReg PU before ATX" |
| 251 | fi |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 252 | if [ $(((DATA & 0x20) >> 5)) -eq 1 ] ; then |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 253 | echo "FPGA_SW1-6 - OFF - DAP CORE Reg Bypass DISABLED" |
| 254 | else |
| 255 | echo "FPGA_SW1-6 - ON - DAP CORE Reg Bypass ENABLED" |
| 256 | fi |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 257 | if [ $(((DATA & 0x40) >> 6)) -eq 1 ] ; then |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 258 | echo "FPGA_SW1-7 - OFF - Bypass P0 in HDT JTAG Chain DISABLED" |
| 259 | else |
| 260 | echo "FPGA_SW1-7 - ON - Bypass P0 in HDT JTAG Chain ENABLED" |
| 261 | fi |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 262 | if [ $(((DATA & 0x80) >> 7)) -eq 1 ] ; then |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 263 | echo "FPGA_SW1-8 - OFF - Bypass P1 in HDT JTAG Chain DISABLED" |
| 264 | else |
| 265 | echo "FPGA_SW1-8 - ON - Bypass P1 in HDT JTAG Chain ENABLED" |
| 266 | fi |
| 267 | |
| 268 | # Switch S2 |
| 269 | FPGA_REG=38 |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 270 | DATA=$(i2cget -y $I2CBUS $FPGAADDR "$(printf "0x%x" $FPGA_REG)") |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 271 | echo ----------FPGAreg$FPGA_REG-----Switch Bank S2: |
| 272 | if [ $((DATA & 0x01)) -eq 1 ] ; then |
| 273 | echo "FPGA_SW2-1 - OFF - Boot from SPI ROM behind BMC" |
| 274 | else |
| 275 | echo "FPGA_SW2-1 - ON - Boot from P0 local SPI ROM" |
| 276 | fi |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 277 | if [ $(((DATA & 0x02) >> 1)) -eq 1 ] ; then |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 278 | echo "FPGA_SW2-2 - OFF - PCIe SLOT4 hot plug forced PwrON without driver" |
| 279 | else |
| 280 | echo "FPGA_SW2-2 - ON - PCIe SLOT4 hot plug NOT forced PwrON without driver" |
| 281 | fi |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 282 | if [ $(((DATA & 0x04) >> 2)) -eq 1 ] ; then |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 283 | echo "FPGA_SW2-3 - OFF - SMI testing DISABLED" |
| 284 | else |
| 285 | echo "FPGA_SW2-3 - ON - SMI testing ENABLED" |
| 286 | fi |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 287 | if [ $(((DATA & 0x08) >> 3)) -eq 1 ] ; then |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 288 | echo "FPGA_SW2-4 - OFF - PROCHOT testing DISABLED" |
| 289 | else |
| 290 | echo "FPGA_SW2-4 - ON - PROCHOT testing ENABLED" |
| 291 | fi |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 292 | if [ $(((DATA & 0x10) >> 4)) -eq 1 ] ; then |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 293 | echo "FPGA_SW2-5 - OFF - PwrCycle on post code C0 DISABLED" |
| 294 | else |
| 295 | echo "FPGA_SW2-5 - ON - PwrCycle on post code C0 ENABLED" |
| 296 | fi |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 297 | if [ $(((DATA & 0x20) >> 5)) -eq 1 ] ; then |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 298 | echo "FPGA_SW2-6 - OFF - PwrCycle Px DISABLED" |
| 299 | else |
| 300 | echo "FPGA_SW2-6 - ON - PwrCycle - Px Present - RESET_L | Px Not Present VR PwrGood" |
| 301 | fi |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 302 | if [ $(((DATA & 0x40) >> 6)) -eq 1 ] ; then |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 303 | echo "FPGA_SW2-7 - OFF - BMC IP Address display DISABLED" |
| 304 | else |
| 305 | echo "FPGA_SW2-7 - ON - BMC IP Address display ENABLED" |
| 306 | fi |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 307 | if [ $(((DATA & 0x80) >> 7)) -eq 1 ] ; then |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 308 | echo "FPGA_SW1-8 - OFF - FORCE_SELFREFRESH support diabled" |
| 309 | else |
| 310 | echo "FPGA_SW1-8 - ON - FORCE_SELFREFRESH support diabled" |
| 311 | fi |
| 312 | |
| 313 | # Powerup Error Group |
| 314 | echo ------------------------Power and Thermal Error Group |
| 315 | if [ $SHUTDOWNERR = 0 ] ; then |
| 316 | echo NO Shutdown Errors Detected |
| 317 | fi |
| 318 | |
| 319 | FPGA_REG=40 |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 320 | DATA=$(i2cget -y $I2CBUS $FPGAADDR "$(printf "0x%x" $FPGA_REG)") |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 321 | if [ $((DATA & 0x0F)) != 0 ] ; then |
| 322 | echo PU Error: PU1$((DATA & 0x0F)) |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 323 | echo "$DATA" |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 324 | fi |
| 325 | |
| 326 | FPGA_REG=41 |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 327 | DATA=$(i2cget -y $I2CBUS $FPGAADDR "$(printf "0x%x" $FPGA_REG)") |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 328 | if [ $((DATA & 0x07)) != 0 ] ; then |
| 329 | echo PU Error: PU2$((DATA & 0x07)) |
| 330 | fi |
| 331 | |
| 332 | FPGA_REG=42 |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 333 | DATA=$(i2cget -y $I2CBUS $FPGAADDR "$(printf "0x%x" $FPGA_REG)") |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 334 | if [ $((DATA & 0x0F)) != 0 ] ; then |
| 335 | echo PU Error: PU1$((DATA & 0x0F)) |
| 336 | fi |
| 337 | |
| 338 | FPGA_REG=43 |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 339 | DATA=$(i2cget -y $I2CBUS $FPGAADDR "$(printf "0x%x" $FPGA_REG)") |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 340 | if [ $((DATA & 0x07)) != 0 ] ; then |
| 341 | echo PU Error: PU4$((DATA & 0x07)) |
| 342 | fi |
| 343 | |
| 344 | FPGA_REG=44 |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 345 | DATA=$(i2cget -y $I2CBUS $FPGAADDR "$(printf "0x%x" $FPGA_REG)") |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 346 | if [ $((DATA & 0x03)) != 0 ] ; then |
| 347 | echo PU Error: PU5$((DATA & 0x03)) |
| 348 | fi |
| 349 | |
| 350 | FPGA_REG=45 |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 351 | DATA=$(i2cget -y $I2CBUS $FPGAADDR "$(printf "0x%x" $FPGA_REG)") |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 352 | if [ $((DATA & 0x07)) != 0 ] ; then |
| 353 | echo PU Error: PU6$((DATA & 0x07)) |
| 354 | fi |
| 355 | |
| 356 | # Powerdown Error Group |
| 357 | FPGA_REG=46 |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 358 | DATA=$(i2cget -y $I2CBUS $FPGAADDR "$(printf "0x%x" $FPGA_REG)") |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 359 | if [ $((DATA & 0x0F)) != 0 ] ; then |
| 360 | echo PD Error: PD1$((DATA & 0x0F)) |
| 361 | fi |
| 362 | |
| 363 | FPGA_REG=47 |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 364 | DATA=$(i2cget -y $I2CBUS $FPGAADDR "$(printf "0x%x" $FPGA_REG)") |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 365 | if [ $((DATA & 0x07)) != 0 ] ; then |
| 366 | echo PD Error: PD2$((DATA & 0x07)) |
| 367 | fi |
| 368 | |
| 369 | FPGA_REG=48 |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 370 | DATA=$(i2cget -y $I2CBUS $FPGAADDR "$(printf "0x%x" $FPGA_REG)") |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 371 | if [ $((DATA & 0x0F)) != 0 ] ; then |
| 372 | echo PD Error: PD3$((DATA & 0x0F)) |
| 373 | fi |
| 374 | |
| 375 | FPGA_REG=49 |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 376 | DATA=$(i2cget -y $I2CBUS $FPGAADDR "$(printf "0x%x" $FPGA_REG)") |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 377 | if [ $((DATA & 0x07)) != 0 ] ; then |
| 378 | echo PD Error: PD4$((DATA & 0x07)) |
| 379 | fi |
| 380 | |
| 381 | FPGA_REG=50 |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 382 | DATA=$(i2cget -y $I2CBUS $FPGAADDR "$(printf "0x%x" $FPGA_REG)") |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 383 | if [ $((DATA & 0x03)) != 0 ] ; then |
| 384 | echo PD Error: PD5$((DATA & 0x03)) |
| 385 | fi |
| 386 | |
| 387 | FPGA_REG=51 |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 388 | DATA=$(i2cget -y $I2CBUS $FPGAADDR "$(printf "0x%x" $FPGA_REG)") |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 389 | if [ $((DATA & 0x03)) != 0 ] ; then |
| 390 | echo PD Error: PD6$((DATA & 0x03)) |
| 391 | fi |
| 392 | |
| 393 | FPGA_REG=52 |
Andrew Geissler | bda29da | 2023-04-13 13:56:43 -0600 | [diff] [blame^] | 394 | DATA=$(i2cget -y $I2CBUS $FPGAADDR "$(printf "0x%x" $FPGA_REG)") |
Konstantin Aladyshev | a953aa6 | 2021-04-19 11:37:54 +0300 | [diff] [blame] | 395 | if [ $((DATA & 0x0F)) != 0 ] ; then |
| 396 | echo Thermal Error: H_0$((DATA & 0x0F)) |
| 397 | fi |
| 398 | echo ------------- end of data ----------------- |