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

[AS5835-54x] Support psu_fan_dir sysfs for YM-1401A PSU #884

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jostar-yang
Copy link
Contributor

Signed-off-by: Jostar Yang [email protected]

Because YM-1401A doesn't support psu_fan_dir from pmbus. Read from command = 0xC3 in pmbus that will always get "F2B". But YM-10401A has F2B and B2F PSU. So read PSU fan dir from psu eerpm and add psu_fan_dir sysfs. YM-1401ABR is F2B and YM-1401ACR is B2B.

Test log as below,
(YM-1401ABR)
cat /sys/bus/i2c/devices/12-0053/psu_fan_dir
F2B
onlpdump log as below,
.............
{
Description: PSU 2 - Fan 1
Status: 0x00000009 [ PRESENT,F2B ]
Caps: 0x00000038 [ SET_PERCENTAGE,GET_RPM,GET_PERCENTAGE ]
RPM: 3200
Per: 14
Model: NULL
SN: NULL

( YM-1401ACR)
/sys/bus/i2c/devices/12-0053/psu_fan_dir
B2F
onlpdump log as below,
Description: PSU-1
Model: YM-1401ACR
SN: SA040W261837000030
Status: 0x00000001 [ PRESENT ]
Caps: 0x00000151 [ AC,VOUT,IOUT,POUT ]
Vin: 0
Vout: 11841
Iin: 0
Iout: 3972
Pin: 0
Pout: 44000
fan @ 6 = {
Description: PSU 1 - Fan 1
Status: 0x00000005 [ PRESENT,B2F ]
..............

@ideaship
Copy link

ideaship commented May 3, 2022

With these changes, onlpdump now shows the expected output for the PSU fan direction.

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.

2 participants