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

[AS7726-32X] Add to support mulit PSU SN in PDDF #8164

Merged
merged 3 commits into from Feb 7, 2022

Conversation

jostar-yang
Copy link
Contributor

Signed-off-by: Jostar Yang jostar_yang@accton.com.tw

Why I did it

This DUT support different PSU

How I did it

Add drv code to read from PSU eeprom to get model name and then get serial number

How to verify it

Test via pddf_psu cmd,
root@sonic:/home/admin# pddf_psuutil mfrinfo
PSU Status Manufacturer ID Model Serial Fan Airflow Direction


PSU1 OK ACBEL FSF019-611 FSF0192105002864 EXHAUST
PSU2 OK 3Y POWER YM-2651Y SA070V581905000055 EXHAUST

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106

Description for the changelog

A picture of a cute animal (not mandatory but encouraged)

Signed-off-by: Jostar Yang <jostar_yang@accton.com.tw>
FuzailBrcm
FuzailBrcm previously approved these changes Jul 13, 2021
#include <linux/sysfs.h>
#include <linux/slab.h>
#include <linux/dmi.h>
#include "../../../../pddf/i2c/modules/include/pddf_psu_defs.h"
Copy link
Collaborator

Choose a reason for hiding this comment

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

there are too many pddf directory in the sonic-buildimage, we should add the include path in the search path and build.

Copy link
Contributor

Choose a reason for hiding this comment

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

@jostar-yang
Can you take care of this comment?

Copy link
Collaborator

@lguohan lguohan left a comment

Choose a reason for hiding this comment

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

🕐

};

struct serial_number_info serials[] = {
{PSU_TYPE_AC_110V, 0x2e, 18, 18, "YM-2651Y"},
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you re-check this and correct the offset if needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

as7726 support YM-2651Y PSU. So need this code.

@seanwu-ec seanwu-ec mentioned this pull request Dec 28, 2021
5 tasks
]
}
},
"PSU2-EEPROM":
{
"dev_info": { "device_type":"PSU-EEPROM", "device_name":"PSU1-EEPROM", "device_parent":"MUX7", "virt_parent":"PSU2"},
Copy link
Contributor

Choose a reason for hiding this comment

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

"device_name":"PSU1-EEPROM" ---------> this should be "PSU2-EEPROM"

@prgeor prgeor merged commit 9c5f38b into sonic-net:master Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants