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

[minipack3n] Add presenceDetection for FCB/PDB slot in platform_manager #350

Closed

Conversation

brandonchuang
Copy link
Contributor

Description:

  1. Add the presenceDetection entry for the below slots in platform_manager.json
    PDBLEFT_SLOT
    PDBRIGHT_SLOT
    FCBBOTTOM_SLOT
    FCBTOP_SLOT

Motivation:

  1. The presenceDetection for the PDB/FCB slots are missing.
  2. Add psu_l_present for PDBLEFT_SLOT
  3. Add psu_r_present for PDBRIGHT_SLOT
  4. Add fan[2|4|6|8]_present for FCBBOTTOM_SLOT
  5. Add fan[1|3|5|7]_present for FCBTOP_SLOT

Test Plan:

  1. Run platform_manager with the updated configuration.
  2. Plug in all FANs and PSUs, then verify that all FCB and PDB slots are explored successfully.
    20250313_ALL_(FAN_PSU)present.txt
  3. Remove the left PSU and verify that PDBLEFT_SLOT fails during exploration.
    20250313_PDB_L_not_present.txt
  4. Remove the right PSU and verify that PDBRIGHT_SLOT fails during exploration.
    20250313_PDB_R_not_present.txt
  5. Remove fans 1/3/5/7 and verify that FCBTOP_SLOT fails during exploration.
    20250313_FCB_T_FAN_1_not_present.txt
    20250313_FCB_T_FAN_3_not_present.txt
    20250313_FCB_T_FAN_5_not_present.txt
    20250313_FCB_T_FAN_7_not_present.txt
  6. Remove fans 2/4/6/8 and verify that FCBBOTTOM_SLOT fails during exploration.
    20250313_FCB_B_FAN_2_not_present.txt
    20250313_FCB_B_FAN_4_not_present.txt
    20250313_FCB_B_FAN_6_not_present.txt
    20250313_FCB_B_FAN_8_not_present.txt

…er.json

Description:
1) Add the `presenceDetection` entry for the below slots in platform_manager.json
   PDBLEFT_SLOT
   PDBRIGHT_SLOT
   FCBBOTTOM_SLOT
   FCBTOP_SLOT

Motivation:
1) The presenceDetection for the PDB/FCB slots are missing.
1) Add `psu_l_present` for `PDBLEFT_SLOT`
2) Add `psu_r_present` for `PDBRIGHT_SLOT`
3) Add `fan[2|4|6|8]_present` for `FCBBOTTOM_SLOT`
4) Add `fan[1|3|5|7]_present` for `FCBTOP_SLOT`

Test Plan:
1) Run `platform_manager` with the updated configuration.
2) Plug in all FANs and PSUs, then verify that all FCB and PDB slots are explored successfully.
   [20250313_ALL_(FAN_PSU)_present_.txt](https://github.com/user-attachments/files/19223588/20250313_ALL_.FAN_PSU._present_.txt)
3) Remove the left PSU and verify that `PDBLEFT_SLOT` fails during exploration.
   [20250313_PDB_L_not_present.txt](https://github.com/user-attachments/files/19223616/20250313_PDB_L_not_present.txt)
4) Remove the right PSU and verify that `PDBRIGHT_SLOT` fails during exploration.
   [20250313_PDB_R_not_present.txt](https://github.com/user-attachments/files/19223618/20250313_PDB_R_not_present.txt)
5) Remove fans 1/3/5/7 and verify that `FCBTOP_SLOT` fails during exploration.
   [20250313_FCB_T_FAN_1_not_present.txt](https://github.com/user-attachments/files/19223623/20250313_FCB_T_FAN_1_not_present.txt)
   [20250313_FCB_T_FAN_3_not_present.txt](https://github.com/user-attachments/files/19223634/20250313_FCB_T_FAN_3_not_present.txt)
   [20250313_FCB_T_FAN_5_not_present.txt](https://github.com/user-attachments/files/19223727/20250313_FCB_T_FAN_5_not_present.txt)
   [20250313_FCB_T_FAN_7_not_present.txt](https://github.com/user-attachments/files/19223728/20250313_FCB_T_FAN_7_not_present.txt)
6) Remove fans 2/4/6/8 and verify that `FCBBOTTOM_SLOT` fails during exploration.
   [20250313_FCB_B_FAN_2_not_present.txt](https://github.com/user-attachments/files/19223730/20250313_FCB_B_FAN_2_not_present.txt)
   [20250313_FCB_B_FAN_4_not_present.txt](https://github.com/user-attachments/files/19223731/20250313_FCB_B_FAN_4_not_present.txt)
   [20250313_FCB_B_FAN_6_not_present.txt](https://github.com/user-attachments/files/19223732/20250313_FCB_B_FAN_6_not_present.txt)
   [20250313_FCB_B_FAN_8_not_present.txt](https://github.com/user-attachments/files/19223733/20250313_FCB_B_FAN_8_not_present.txt)
@kimdo8736
Copy link

kimdo8736 commented Mar 13, 2025

Thanks for the thorough testings

@facebook-github-bot
Copy link
Contributor

@kimdo8736 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@@ -2748,12 +2748,26 @@
},
"PDBLEFT_SLOT@0": {
"slotType": "PDBLEFT_SLOT",
"presenceDetection": {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please:

  1. Define PSU(LEFT | RIGHT) PmUnit.
  2. Add the above PmUnits' IDPROM config with corresponding PSU eeprom.

Comment on lines +2790 to +2835
"presenceDetection": {
"sysfsFileHandle": {
"devicePath": "/[MCB_FAN_CPLD]",
"presenceFileName": "fan2_present",
"desiredValue": 1
}
},
"outgoingI2cBusNames": [
"MCB_IOB_I2C_MASTER_17"
]
},
"FCBBOTTOM_SLOT@1": {
"slotType": "FCBBOTTOM_SLOT",
"presenceDetection": {
"sysfsFileHandle": {
"devicePath": "/[MCB_FAN_CPLD]",
"presenceFileName": "fan4_present",
"desiredValue": 1
}
},
"outgoingI2cBusNames": [
"MCB_IOB_I2C_MASTER_17"
]
},
"FCBBOTTOM_SLOT@2": {
"slotType": "FCBBOTTOM_SLOT",
"presenceDetection": {
"sysfsFileHandle": {
"devicePath": "/[MCB_FAN_CPLD]",
"presenceFileName": "fan6_present",
"desiredValue": 1
}
},
"outgoingI2cBusNames": [
"MCB_IOB_I2C_MASTER_17"
]
},
"FCBBOTTOM_SLOT@3": {
"slotType": "FCBBOTTOM_SLOT",
"presenceDetection": {
"sysfsFileHandle": {
"devicePath": "/[MCB_FAN_CPLD]",
"presenceFileName": "fan8_present",
"desiredValue": 1
}
},

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like physically one FCB to 4 Fans.
Can you create a separate PmUnit for "FAN" (you need 4), then define presence detection in FCB's outgoingSlotConfigs?

Copy link
Contributor

@somasun somasun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address @kimdo8736's comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants