-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GT: Add OEM_1S_GET_FW_VERSION in platform code #337
Closed
Quanta-YangChen
wants to merge
3
commits into
facebook:main
from
Quanta-YangChen:PR/add_get_version_cmd
Closed
GT: Add OEM_1S_GET_FW_VERSION in platform code #337
Quanta-YangChen
wants to merge
3
commits into
facebook:main
from
Quanta-YangChen:PR/add_get_version_cmd
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
facebook-github-bot
added
the
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
label
Jun 15, 2022
Summary: - Support TMP75 sensor reading - Support VR sensor reading - Support ADC sensor reading - Support HSC sensor reading - Support PEX sensor reading - Support NVME sensor reading - Because PEX can only access when DC ON, so add one ISR if DC on then do pex89000_init later. - Add mutex to protect some bus which has i2c mux. Test Plan: - Build code: Pass
Summary: - Add command in oem_1s_handler.c to read multiple sensor - NetFn: 0x38/Cmd: 0x88 - Request: Data 0 ~ Data N (N less than or equal to 32) multiple sensor number Response: [sensor num][decimal byte 0][decimal byte 1][fraction byte 0][fraction byte 1][status] * N Note: If the sensor number is not support will response 6 bytes 0xff Test plan: - Build code: Pass
Summary: - Request: Data[0] -> Component ID: VR0 0 VR1 1 BIC 2 PEX0 3 PEX1 4 PEX2 5 PEX3 6 CPLD 7 NIC0 8 NIC1 9 NIC2 10 NIC3 11 NIC4 12 NIC5 13 NIC6 14 NIC7 15 - Response: data[0] = component id data[1] = firmware version length data[2] ~ data[length + 1] = firmware version - Add all mctp instance for NIC0-NIC7. - Send PLDM firmware update command GetParameter to each NIC then store to local array for later use in oem command. - Use the same component id define in firmware update and get firmware version function. - Remove check need init condition to avoid to access SPI without initialize and return wrong data. - According RENESAS programming guide to get VR version and update remaining number. - Add 3S timer to send mctp/pldm related command to device after BIC power on. - Add send command to device in DC on ISR.
Quanta-YangChen
force-pushed
the
PR/add_get_version_cmd
branch
from
June 16, 2022 13:03
22e3285
to
e0437ad
Compare
@GoldenBug has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Merged |
facebook-github-bot
pushed a commit
that referenced
this pull request
Jun 22, 2022
Summary: - Add command to bridge i2c message to the component, the procedure as below: 1. Lock the bus mutex if have it. 2. Change the i2c mux channel if have it. 3. Bridge i2c command. 4. Unlock the bus mutex if have it. - NetFn: 0x38 CMD: 0x74 - Component ID: VR0: 0 VR1: 1 - Request format: data[0]: component id data[1]: number of bytes to read, 1 based. 0 = no byte to read. data[2]-data[N]: data to write Dependency: #337 Pull Request resolved: #340 Test Plan: - Build code: Pass Log: 1. Read VR0 version root@bmc-oob:~# mctp-util 3 0x40 0x0a 0x01 0x80 0x3f 0x01 0x15 0xa0 0x00 0xe0 0x74 0x15 0xa0 0x00 0x00 0x00 0xc7 0x3f 0x00 00 0e 01 00 3f 01 00 15 a0 00 e4 74 00 15 a0 00 root@bmc-oob:~# mctp-util 3 0x40 0x0a 0x01 0x80 0x3f 0x01 0x15 0xa0 0x00 0xe0 0x74 0x15 0xa0 0x00 0x00 0x04 0xc5 0xC1 00 12 01 00 3f 01 00 15 a0 00 e4 74 00 15 a0 00 09 d0 b8 d3 2. Read VR1 version root@bmc-oob:~# mctp-util 3 0x40 0x0a 0x01 0x80 0x3f 0x01 0x15 0xa0 0x00 0xe0 0x74 0x15 0xa0 0x00 0x01 0x00 0xc7 0x3f 0x00 00 0e 01 00 3f 01 00 15 a0 00 e4 74 00 15 a0 00 root@bmc-oob:~# mctp-util 3 0x40 0x0a 0x01 0x80 0x3f 0x01 0x15 0xa0 0x00 0xe0 0x74 0x15 0xa0 0x00 0x01 0x04 0xc5 0xC1 00 12 01 00 3f 01 00 15 a0 00 e4 74 00 15 a0 00 09 d0 b8 d3 Reviewed By: zhdaniel12 Differential Revision: D37234353 Pulled By: GoldenBug fbshipit-source-id: a1db54d70b0188e4cab650a76aea5950c05cbbb4
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
Request:
Data[0] : Component ID:
VR0 0
VR1 1
BIC 2
PEX0 3
PEX1 4
PEX2 5
PEX3 6
CPLD 7
NIC0 8
NIC1 9
NIC2 10
NIC3 11
NIC4 12
NIC5 13
NIC6 14
NIC7 15
Response:
data[0] = component id
data[1] = firmware version length
data[2] ~ data[length + 1] = firmware version
Add all MCTP instances for NIC0-NIC7.
Send PLDM firmware update command GetParameter to each NIC then store to local array for later use in OEM command.
Use the same component id define in the firmware update and get the firmware version function.
Remove check need init condition to avoid accessing SPI without initializing and returning wrong data.
According to the RENESAS programming guide get the VR version and update the remaining number.
Add a 3S timer to send MCTP/PLDM-related commands to the device after BIC power on.
Add send command to the device in DC on ISR.
Dependency: #334
Test plan:
Build code: Pass
Log:
Get VR0 version
root@bmc-oob:~# mctp-util 3 0x40 0x0a 0x01 0x80 0x3f 0x01 0x15 0xa0 0x00 0xe0 0x0b 0x15 0xa0 0x00 0x00
00 15 01 00 3f 01 00 15 a0 00 e4 0b 00 15 a0 00 00 05 09 d0 b8 d3 1b
Get VR1 version
root@bmc-oob:~# mctp-util 3 0x40 0x0a 0x01 0x80 0x3f 0x01 0x15 0xa0 0x00 0xe0 0x0b 0x15 0xa0 0x00 0x01
00 15 01 00 3f 01 00 15 a0 00 e4 0b 00 15 a0 00 01 05 09 d0 b8 d3 1b
Get BIC version
root@bmc-oob:~# mctp-util 3 0x40 0x0a 0x01 0x80 0x3f 0x01 0x15 0xa0 0x00 0xe0 0x0b 0x15 0xa0 0x00 0x02
00 17 01 00 3f 01 00 15 a0 00 e4 0b 00 15 a0 00 02 07 20 22 22 01 47 54 00
Get PEX0 version
root@bmc-oob:~# mctp-util 3 0x40 0x0a 0x01 0x80 0x3f 0x01 0x15 0xa0 0x00 0xe0 0x0b 0x15 0xa0 0x00 0x03
00 14 01 00 3f 01 00 15 a0 00 e4 0b 00 15 a0 00 03 04 00 00 01 a6
Get PEX1 version
root@bmc-oob:~# mctp-util 3 0x40 0x0a 0x01 0x80 0x3f 0x01 0x15 0xa0 0x00 0xe0 0x0b 0x15 0xa0 0x00 0x04
00 14 01 00 3f 01 00 15 a0 00 e4 0b 00 15 a0 00 04 04 00 00 01 a6
Get PEX2 version
root@bmc-oob:~# mctp-util 3 0x40 0x0a 0x01 0x80 0x3f 0x01 0x15 0xa0 0x00 0xe0 0x0b 0x15 0xa0 0x00 0x05
00 14 01 00 3f 01 00 15 a0 00 e4 0b 00 15 a0 00 05 04 00 00 01 a6
Get PEX3 version
root@bmc-oob:~# mctp-util 3 0x40 0x0a 0x01 0x80 0x3f 0x01 0x15 0xa0 0x00 0xe0 0x0b 0x15 0xa0 0x00 0x06
00 14 01 00 3f 01 00 15 a0 00 e4 0b 00 15 a0 00 06 04 2c 0d 00 00
Get CPLD version
root@bmc-oob:~# mctp-util 3 0x40 0x0a 0x01 0x80 0x3f 0x01 0x15 0xa0 0x00 0xe0 0x0b 0x15 0xa0 0x00 0x07
00 14 01 00 3f 01 00 15 a0 00 e4 0b 00 15 a0 00 07 04 01 00 00 02
Get NIC0 version
root@bmc-oob:~# mctp-util 3 0x40 0x0a 0x01 0x80 0x3f 0x01 0x15 0xa0 0x00 0xe0 0x0b 0x15 0xa0 0x00 0x08
00 1a 01 00 3f 01 00 15 a0 00 e4 0b 00 15 a0 00 08 0a 32 38 2e 39 38 2e 35 34 31 36
Get NIC1 version
root@bmc-oob:~# mctp-util 3 0x40 0x0a 0x01 0x80 0x3f 0x01 0x15 0xa0 0x00 0xe0 0x0b 0x15 0xa0 0x00 0x09
00 1a 01 00 3f 01 00 15 a0 00 e4 0b 00 15 a0 00 09 0a 32 38 2e 39 38 2e 35 34 31 36
Get NIC2 version
root@bmc-oob:~# mctp-util 3 0x40 0x0a 0x01 0x80 0x3f 0x01 0x15 0xa0 0x00 0xe0 0x0b 0x15 0xa0 0x00 0x0A
00 1a 01 00 3f 01 00 15 a0 00 e4 0b 00 15 a0 00 0a 0a 32 38 2e 39 38 2e 35 34 31 36
Get NIC3 version
root@bmc-oob:~# mctp-util 3 0x40 0x0a 0x01 0x80 0x3f 0x01 0x15 0xa0 0x00 0xe0 0x0b 0x15 0xa0 0x00 0x0B
00 1a 01 00 3f 01 00 15 a0 00 e4 0b 00 15 a0 00 0b 0a 32 38 2e 39 38 2e 35 34 31 36
Get NIC4 version
root@bmc-oob:~# mctp-util 3 0x40 0x0a 0x01 0x80 0x3f 0x01 0x15 0xa0 0x00 0xe0 0x0b 0x15 0xa0 0x00 0x0C
00 1a 01 00 3f 01 00 15 a0 00 e4 0b 00 15 a0 00 0c 0a 32 38 2e 39 38 2e 35 34 31 36
Get NIC5 version
root@bmc-oob:~# mctp-util 3 0x40 0x0a 0x01 0x80 0x3f 0x01 0x15 0xa0 0x00 0xe0 0x0b 0x15 0xa0 0x00 0x0D
00 1a 01 00 3f 01 00 15 a0 00 e4 0b 00 15 a0 00 0d 0a 32 38 2e 39 38 2e 35 34 31 36
Get NIC6 version
root@bmc-oob:~# mctp-util 3 0x40 0x0a 0x01 0x80 0x3f 0x01 0x15 0xa0 0x00 0xe0 0x0b 0x15 0xa0 0x00 0x0E
00 1a 01 00 3f 01 00 15 a0 00 e4 0b 00 15 a0 00 0e 0a 32 38 2e 39 38 2e 35 34 31 36
Get NIC7 version
root@bmc-oob:~# mctp-util 3 0x40 0x0a 0x01 0x80 0x3f 0x01 0x15 0xa0 0x00 0xe0 0x0b 0x15 0xa0 0x00 0x0F
00 1a 01 00 3f 01 00 15 a0 00 e4 0b 00 15 a0 00 0f 0a 32 38 2e 39 38 2e 35 34 31 36