fby3.5: cl:Support IPMI command - Get card type#308
Conversation
|
Dependency: #303 |
|
@GoldenBug has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
GoldenBug
left a comment
There was a problem hiding this comment.
2 Small changes.
Thanks for including comments in the code when necessary!
| class_type = i2c_msg.data[0]; | ||
| is_1ou_present = (class_type & 0x4 ? false : true); | ||
| is_2ou_present = (class_type & 0x8 ? false : true); | ||
| _1ou_status.present = (class_type & BIT(2) ? false : true); |
There was a problem hiding this comment.
Add Parenthesis just to be safe.
There was a problem hiding this comment.
We has fixed this. Please review it again, thanks.
| is_1ou_present = (class_type & 0x4 ? false : true); | ||
| is_2ou_present = (class_type & 0x8 ? false : true); | ||
| _1ou_status.present = (class_type & BIT(2) ? false : true); | ||
| _2ou_status.present = (class_type & BIT(3) ? false : true); |
There was a problem hiding this comment.
Add Parenthesis just to be safe.
There was a problem hiding this comment.
We has fixed this. Please review it again, thanks.
Summary: - Add DPV2 temperature/voltage/current/power sensor. - Remove checking VR type debug message. Test Plan: - Build code: Pass - Get DPV2 sensor: Pass - Check debug message is removed in BIC console after BIC boot up: Pass Log: Get DPV2 sensor root@bmc-oob:~# sensor-util slot1 --threshold | grep "DPV2" DPV2_2_12V_Vin (0x91) : 12.40 Volts | (ok) | UCR: 13.19 | UNC: 12.94 | UNR: 14.04 | LCR: 10.79 | LNC: 11.05 | LNR: 10.01 DPV2_2_12V_Vout (0x92) : 12.38 Volts | (ok) | UCR: 13.19 | UNC: 12.94 | UNR: 14.04 | LCR: 10.79 | LNC: 11.05 | LNR: 10.01 DPV2_2_12V_Iout (0x93) : 0.12 Amps | (ok) | UCR: 15.49 | UNC: 15.14 | UNR: 18.88 | LCR: NA | LNC: NA | LNR: NA DPV2_2_EFUSETemp (0x94) : 22.38 C | (ok) | UCR: 100.00 | UNC: NA | UNR: 150.00 | LCR: NA | LNC: NA | LNR: NA DPV2_2_EFUSEPWR (0x95) : 1.18 Watts | (ok) | UCR: 186.00 | UNC: NA | UNR: 227.00 | LCR: NA | LNC: NA | LNR: NA Before removing VR type debug message [BIC console] Hello, welcome to yv35 craterlake 2022.19.1 BIC class type(class-1), 1ou present status(0), 2ou present status(1), board revision(0x2) Failed to read VR register(0xad) ected ep[VR type: ISL69259 0x2] as VR type: ISL69259 IN endpoiVR type: ISL69259 ,000] VR type: ISL69259 <inf>VR type: ISL69259 usb_dc_aVR type: ISL69259 speed: seVR type: ISL69259 lect ep[0VR type: ISL69259 x3] as OUVR type: ISL69259 T endpoinVR type: ISL69259 [0VR type: ISL69259 0:00:00.0VR type: ISL69259 56,000] R type: ISL69259 [0m<inf> VR type: ISL69259 kcs_aspeeVR type: ISL69259 d: KCS3: VR type: ISL69259 addr=0xcaVR type: ISL69259 ipmi_init [set_DC_status] gpio number(15) status(1) [set_post_status] gpio number(1) status(0) After removing VR type debug message [BIC console] Hello, welcome to yv35 craterlake 2022.19.1 BIC class type(class-1), 1ou present status(0), 2ou present status(1), board revision(0x2) pre-selected ep[0x2] as IN endpoint [00:00:00.001,000] <inf> usb_dc_aspeed: select ep[0x3] as OUT endpoint [00:00:00.056,000] <inf> kcs_aspeed: KCS3: addr=0xca2, idr=0x2c, odr=0x38,ipmi_init [set_DC_status] gpio number(15) status(1) [set_post_status] gpio number(1) status(1)
Summary:
- Support 1OU card type detection (by SB BIC firmware)
Follow hardware design, BIC can judge 1OU card type according the ADC-6(0-based) voltage if 1OU is present.
BIC should set the type to SB CPLD register "1OU Card Detection" to let SB CPLD powers on the SI test card.
- Support IPMI command - "Get card type"
NetFn: 38h / Cmd: A1h
Request Data:
Byte[3:1] - Manufacturer ID
Byte4 - Get 1OU/2OU card type(00h for 1OU and 01h for 2OU)
Response Data:
Byte1 - Completion code
00h - Successfully
C7h - Request data length invalid
CCh - Invalid data field in Request
Byte2 - 1OU/2OU(00h for 1OU and 01h for 2OU)
Byte3 - card type
1OU -
* 00h: 1OU SI test card
* 01h: Expansion with 6 M.2
* 02h: Rainbow falls ( CXL with 4 DDR4 DIMMs)
* 03h: Vernal falls (with TI chip)
* 04h: Vernal falls (with AST1030 chip)
* 05h: Kahuna Falls
* 06h: Waimano falls (CXL with 2 DDR4 DIMMs+2 E1S)
* 07h: Expansion with NIC
* FEh: 1OU card is absent
* FFh: Unknown 1OU card type
2OU -
* 07h: DPV2 x8
* 70h: DPV2 x16
* FEh: 2OU card is absent
* FFh: Unknown 2OU card type
TODO:
The manufacture ID should be changed to Meta's IANA.
Test Plan:
1. Check the IPMI command "Get card type" - pass
==> Get 1OU card type: bic-util ${slot} 0xe0 0xa1 0x9c 0x9c 0x0 0x0
==> Get 2OU card type: bic-util ${slot} 0xe0 0xa1 0x9c 0x9c 0x0 0x1
2. Check SB CPLD register 09h - pass
==> bic-util ${slot} 0x18 0x52 0x1 0x42 0x1 0x9
Log:
[1OU - SI test card]
root@bmc-oob:~# bic-util slot1 0xe0 0xa1 0x9c 0x9c 0x0 0x0
9C 9C 00 00 00
[1OU - Rainbow falls]
root@bmc-oob:~# bic-util slot2 0xe0 0xa1 0x9c 0x9c 0x0 0x0
9C 9C 00 00 02
root@bmc-oob:~# bic-util slot2 0x18 0x52 0x1 0x42 0x1 0x9
02
[2OU - DPV2 x8]
root@bmc-oob:~# bic-util slot1 0xe0 0xa1 0x9c 0x9c 0x0 0x1
9C 9C 00 01 07
[2OU - DPV2 x16]
root@bmc-oob:~# bic-util slot1 0xe0 0xa1 0x9c 0x9c 0x0 0x1
9C 9C 00 01 70
[2OU - DPV2 x8 and DPV2 x16]
root@bmc-oob:~# bic-util slot1 0xe0 0xa1 0x9c 0x9c 0x0 0x1
9C 9C 00 01 77
[No 1OU/2OU card]
root@bmc-oob:~# bic-util slot1 0xe0 0xa1 0x9c 0x9c 0x0 0x0
9C 9C 00 00 FE
root@bmc-oob:~# bic-util slot1 0xe0 0xa1 0x9c 0x9c 0x0 0x1
9C 9C 00 01 FE
e180bf7 to
f3136ca
Compare
|
@DelphineChiu has updated the pull request. You must reimport the pull request before landing. |
|
@GoldenBug has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Summary:
Follow hardware design, BIC can judge 1OU card type according the ADC-6(0-based) voltage if 1OU is present.
BIC should set the type to SB CPLD register "1OU Card Detection" to let SB CPLD powers on the SI test card.
NetFn: 38h / Cmd: A1h
Request Data:
Byte[3:1] - Manufacturer ID
Byte4 - Get 1OU/2OU card type(00h for 1OU and 01h for 2OU)
Response Data:
Byte1 - Completion code
00h - Successfully
C7h - Request data length invalid
CCh - Invalid data field in Request
Byte2 - 1OU/2OU(00h for 1OU and 01h for 2OU)
Byte3 - card type
1OU -
* 00h: 1OU SI test card
* 01h: Expansion with 6 M.2
* 02h: Rainbow falls ( CXL with 4 DDR4 DIMMs)
* 03h: Vernal falls (with TI chip)
* 04h: Vernal falls (with AST1030 chip)
* 05h: Kahuna Falls
* 06h: Waimano falls (CXL with 2 DDR4 DIMMs+2 E1S)
* 07h: Expansion with NIC
* FEh: 1OU card is absent
* FFh: Unknown 1OU card type
2OU -
* 07h: DPV2 x8
* 70h: DPV2 x16
* FEh: 2OU card is absent
* FFh: Unknown 2OU card type
Dependency: #303
TODO:
The manufacture ID should be changed to Meta's IANA.
Test Plan:
==> Get 1OU card type: bic-util ${slot} 0xe0 0xa1 0x9c 0x9c 0x0 0x0
==> Get 2OU card type: bic-util ${slot} 0xe0 0xa1 0x9c 0x9c 0x0 0x1
==> bic-util ${slot} 0x18 0x52 0x1 0x42 0x1 0x9
Log:
[1OU - SI test card]
root@bmc-oob:
# bic-util slot1 0xe0 0xa1 0x9c 0x9c 0x0 0x0# bic-util slot2 0xe0 0xa1 0x9c 0x9c 0x0 0x09C 9C 00 00 00
[1OU - Rainbow falls]
root@bmc-oob:
9C 9C 00 00 02
root@bmc-oob:
# bic-util slot2 0x18 0x52 0x1 0x42 0x1 0x9# bic-util slot1 0xe0 0xa1 0x9c 0x9c 0x0 0x102
[2OU - DPV2 x8]
root@bmc-oob:
9C 9C 00 01 07
[2OU - DPV2 x16]
root@bmc-oob:
# bic-util slot1 0xe0 0xa1 0x9c 0x9c 0x0 0x1# bic-util slot1 0xe0 0xa1 0x9c 0x9c 0x0 0x19C 9C 00 01 70
[2OU - DPV2 x8 and DPV2 x16]
root@bmc-oob:
9C 9C 00 01 77
[No 1OU/2OU card]
root@bmc-oob:
# bic-util slot1 0xe0 0xa1 0x9c 0x9c 0x0 0x0# bic-util slot1 0xe0 0xa1 0x9c 0x9c 0x0 0x19C 9C 00 00 FE
root@bmc-oob:
9C 9C 00 01 FE