Skip to content
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

yv4: sd: Add set WF_BIC EID via WF_BIC_READY GPIO #2150

Conversation

SaraLin-wiwynn
Copy link
Contributor

Description:

  • The WF_BIC_READY pin is GPIOF4 in DVT stage
  • Add ISR_WF_BIC_READY() to detect WF_BIC_READY (H->L->H), wait 1s, then set FF/WF EID.

Motivation:

SD-BIC to actively set EID for WF-BIC after detecting WF-BIC ready.

Test Plan:

  1. Build code: pass.
  2. Restart slot2 WF_BIC: pldmtool raw -d 0x80 0x3f 0x1 0x15 0xa0 0x0 0x18 0x03 -m 22.
  3. Verify EID: pldmtool base GetPLDMTypes -m 22. [
    {
    "PLDM Type": "base",
    "PLDM Type Code": 0
    },
    {
    "PLDM Type": "platform",
    "PLDM Type Code": 2
    }
    ]
  4. Sled AC cycle; after DC on, ensure EID is set correctly. └─ /xyz/openbmc_project/mctp/1
    ├─ /xyz/openbmc_project/mctp/1/10
    ├─ /xyz/openbmc_project/mctp/1/12
    ├─ /xyz/openbmc_project/mctp/1/14
    ├─ /xyz/openbmc_project/mctp/1/15
    ├─ /xyz/openbmc_project/mctp/1/20
    ├─ /xyz/openbmc_project/mctp/1/22
    ├─ /xyz/openbmc_project/mctp/1/24
    ├─ /xyz/openbmc_project/mctp/1/25
    ├─ /xyz/openbmc_project/mctp/1/30
    ├─ /xyz/openbmc_project/mctp/1/32
    ├─ /xyz/openbmc_project/mctp/1/34
    ├─ /xyz/openbmc_project/mctp/1/35
    ├─ /xyz/openbmc_project/mctp/1/40
    ├─ /xyz/openbmc_project/mctp/1/42
    ├─ /xyz/openbmc_project/mctp/1/44
    ├─ /xyz/openbmc_project/mctp/1/45
    ├─ /xyz/openbmc_project/mctp/1/50
    ├─ /xyz/openbmc_project/mctp/1/52
    ├─ /xyz/openbmc_project/mctp/1/54
    ├─ /xyz/openbmc_project/mctp/1/55
    ├─ /xyz/openbmc_project/mctp/1/60
    ├─ /xyz/openbmc_project/mctp/1/62
    ├─ /xyz/openbmc_project/mctp/1/64
    ├─ /xyz/openbmc_project/mctp/1/65
    ├─ /xyz/openbmc_project/mctp/1/70
    ├─ /xyz/openbmc_project/mctp/1/72
    ├─ /xyz/openbmc_project/mctp/1/74
    ├─ /xyz/openbmc_project/mctp/1/75
    ├─ /xyz/openbmc_project/mctp/1/8
    ├─ /xyz/openbmc_project/mctp/1/80
    ├─ /xyz/openbmc_project/mctp/1/82
    ├─ /xyz/openbmc_project/mctp/1/84
    ├─ /xyz/openbmc_project/mctp/1/85
    ├─ /xyz/openbmc_project/mctp/1/90
    ├─ /xyz/openbmc_project/mctp/1/91
    ├─ /xyz/openbmc_project/mctp/1/92
    └─ /xyz/openbmc_project/mctp/1/93

@facebook-github-bot 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 Jan 2, 2025
@facebook-github-bot
Copy link
Contributor

@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. (Because this pull request was imported automatically, there will not be any future comments.)

@wangx6f
Copy link

wangx6f commented Jan 2, 2025

Looks like the clang-format has error, please fix it and put up a new patch.

@BensonChuWiwynn BensonChuWiwynn force-pushed the Benson/yv4_sd-sd_set_wf_eid_by_ready_pin branch from 81d4390 to 904efd2 Compare January 6, 2025 01:48
@facebook-github-bot
Copy link
Contributor

@SaraLin-wiwynn has updated the pull request. You must reimport the pull request before landing.

@BensonChuWiwynn
Copy link
Contributor

fixed the Clang format error. 904efd2

Description:
- The WF_BIC_READY pin is GPIOF4 in DVT stage
- Add ISR_WF_BIC_READY() to detect WF_BIC_READY (L->H) then set FF/WF EID. Note that L->H indicates raising after initialization is complete.

Motivation:
SD-BIC to actively set EID for WF-BIC after detecting WF-BIC ready.

Test Plan:
1. Build code: pass.
2. Restart slot2 WF_BIC: `pldmtool raw -d 0x80 0x3f 0x1 0x15 0xa0 0x0 0x18 0x03 -m 22`.
3. Verify EID: `pldmtool base GetPLDMTypes -m 22`.
[
    {
        "PLDM Type": "base",
        "PLDM Type Code": 0
    },
    {
        "PLDM Type": "platform",
        "PLDM Type Code": 2
    }
]
4. Sled AC cycle; after DC on, ensure EID is set correctly.
└─ /xyz/openbmc_project/mctp/1
        ├─ /xyz/openbmc_project/mctp/1/10
        ├─ /xyz/openbmc_project/mctp/1/12
        ├─ /xyz/openbmc_project/mctp/1/14
        ├─ /xyz/openbmc_project/mctp/1/15
        ├─ /xyz/openbmc_project/mctp/1/20
        ├─ /xyz/openbmc_project/mctp/1/22
        ├─ /xyz/openbmc_project/mctp/1/24
        ├─ /xyz/openbmc_project/mctp/1/25
        ├─ /xyz/openbmc_project/mctp/1/30
        ├─ /xyz/openbmc_project/mctp/1/32
        ├─ /xyz/openbmc_project/mctp/1/34
        ├─ /xyz/openbmc_project/mctp/1/35
        ├─ /xyz/openbmc_project/mctp/1/40
        ├─ /xyz/openbmc_project/mctp/1/42
        ├─ /xyz/openbmc_project/mctp/1/44
        ├─ /xyz/openbmc_project/mctp/1/45
        ├─ /xyz/openbmc_project/mctp/1/50
        ├─ /xyz/openbmc_project/mctp/1/52
        ├─ /xyz/openbmc_project/mctp/1/54
        ├─ /xyz/openbmc_project/mctp/1/55
        ├─ /xyz/openbmc_project/mctp/1/60
        ├─ /xyz/openbmc_project/mctp/1/62
        ├─ /xyz/openbmc_project/mctp/1/64
        ├─ /xyz/openbmc_project/mctp/1/65
        ├─ /xyz/openbmc_project/mctp/1/70
        ├─ /xyz/openbmc_project/mctp/1/72
        ├─ /xyz/openbmc_project/mctp/1/74
        ├─ /xyz/openbmc_project/mctp/1/75
        ├─ /xyz/openbmc_project/mctp/1/8
        ├─ /xyz/openbmc_project/mctp/1/80
        ├─ /xyz/openbmc_project/mctp/1/82
        ├─ /xyz/openbmc_project/mctp/1/84
        ├─ /xyz/openbmc_project/mctp/1/85
        ├─ /xyz/openbmc_project/mctp/1/90
        ├─ /xyz/openbmc_project/mctp/1/91
        ├─ /xyz/openbmc_project/mctp/1/92
        └─ /xyz/openbmc_project/mctp/1/93
@BensonChuWiwynn BensonChuWiwynn force-pushed the Benson/yv4_sd-sd_set_wf_eid_by_ready_pin branch from 904efd2 to 9e169d0 Compare January 14, 2025 08:43
@facebook-github-bot
Copy link
Contributor

@SaraLin-wiwynn has updated the pull request. You must reimport the pull request before landing.

@BensonChuWiwynn
Copy link
Contributor

Modify the trigger condition to GPIO_INT_EDGE_RISING (after initialization is complete) and remove the 1-second delay. 9e169d0

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in d9312d8.

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. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants