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

Meru800bia: adds P2 devices and sensors to PM/sensor_service #195

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

adamcalabrigo
Copy link
Contributor

@adamcalabrigo adamcalabrigo commented Apr 24, 2024

Summary

Adds two devices (new to P2) to platform_manager.json then updates sensor_service.json to track the new sensors.

Testing

Verified on Meru800bia.

Started platform_manager, which succeeds and creates the correct new symlinks. From the service log:

Creating symlink from /run/devmap/sensors/SMB_MAX6581 to /sys/bus/i2c/devices/12-004d/hwmon/hwmon8. DevicePath: /SMB_SLOT@0/[SMB_MAX6581]
Creating symlink from /run/devmap/sensors/SMB_MGMT_TMP75 to /sys/bus/i2c/devices/20-0048/hwmon/hwmon14. DevicePath: /SMB_SLOT@0/[SMB_MGMT_TMP75]

Started sensor_service and verified that the new devices are being polled and are correctly reading sensors. From the service log:

SMB_J3_BOARD_TEMP: Path=/run/devmap/sensors/SMB_MAX6581/temp1_input, Compute=@/1000.0, FRU=SMB
SMB_J3_DIODE_CORE_TEMP: Path=/run/devmap/sensors/SMB_MAX6581/temp2_input, Compute=@/1000.0, FRU=SMB                                                                                                      
SMB_J3_DIODE_FAB0_TEMP: Path=/run/devmap/sensors/SMB_MAX6581/temp3_input, Compute=@/1000.0, FRU=SMB                                                                                                      
SMB_J3_DIODE_FAB1_TEMP: Path=/run/devmap/sensors/SMB_MAX6581/temp4_input, Compute=@/1000.0, FRU=SMB                                                                                                      
SMB_J3_DIODE_HBM0_TEMP: Path=/run/devmap/sensors/SMB_MAX6581/temp7_input, Compute=@/1000.0, FRU=SMB                                                                                                      
SMB_J3_DIODE_HBM1_TEMP: Path=/run/devmap/sensors/SMB_MAX6581/temp8_input, Compute=@/1000.0, FRU=SMB                                                                                                      
SMB_J3_DIODE_NIF0_TEMP: Path=/run/devmap/sensors/SMB_MAX6581/temp5_input, Compute=@/1000.0, FRU=SMB                                                                                                      
SMB_J3_DIODE_NIF1_TEMP: Path=/run/devmap/sensors/SMB_MAX6581/temp6_input, Compute=@/1000.0, FRU=SMB
SMB_MGMT_INLET_TEMP: Path=/run/devmap/sensors/SMB_MGMT_TMP75/temp1_input, Compute=@/1000.0, FRU=SMB
...
SMB_J3_BOARD_TEMP (/run/devmap/sensors/SMB_MAX6581/temp1_input) : 36.25
SMB_J3_DIODE_CORE_TEMP (/run/devmap/sensors/SMB_MAX6581/temp2_input) : 60.125
SMB_J3_DIODE_FAB0_TEMP (/run/devmap/sensors/SMB_MAX6581/temp3_input) : 58.625
SMB_J3_DIODE_FAB1_TEMP (/run/devmap/sensors/SMB_MAX6581/temp4_input) : 59.125
SMB_J3_DIODE_HBM0_TEMP (/run/devmap/sensors/SMB_MAX6581/temp7_input) : 55.375
SMB_J3_DIODE_HBM1_TEMP (/run/devmap/sensors/SMB_MAX6581/temp8_input) : 55
SMB_J3_DIODE_NIF0_TEMP (/run/devmap/sensors/SMB_MAX6581/temp5_input) : 61
SMB_J3_DIODE_NIF1_TEMP (/run/devmap/sensors/SMB_MAX6581/temp6_input) : 60.5

Also verified on P1:

PM will log failure in setting up P2 devices:

Failures in PmUnit SMB at /SMB_SLOT@0
1. Failed to create i2c device for SMB_MAX6581 (max6581) at bus: 12, addr: 0x4d with exit status 0
2. Failed to create i2c device for SMB_MGMT_TMP75 (tmp75) at bus: 20, addr: 0x48 with exit status 0
3. Failed to create a symlink /run/devmap/sensors/SMB_MAX6581 for DevicePath /SMB_SLOT@0/[SMB_MAX6581]. Reason: SMB_MAX6581 is not plugged-in to the platform
4. Failed to create a symlink /run/devmap/sensors/SMB_MGMT_TMP75 for DevicePath /SMB_SLOT@0/[SMB_MGMT_TMP75]. Reason: SMB_MGMT_TMP75 is not plugged-in to the platform

sensor_service logs missing sensors:

Could not read data for SMB_J3_BOARD_TEMP from path:/run/devmap/sensors/SMB_MAX6581/temp1_input, error:File does not exist
Could not read data for SMB_J3_DIODE_CORE_TEMP from path:/run/devmap/sensors/SMB_MAX6581/temp2_input, error:File does not exist
Could not read data for SMB_J3_DIODE_FAB0_TEMP from path:/run/devmap/sensors/SMB_MAX6581/temp3_input, error:File does not exist
Could not read data for SMB_J3_DIODE_FAB1_TEMP from path:/run/devmap/sensors/SMB_MAX6581/temp4_input, error:File does not exist
Could not read data for SMB_J3_DIODE_HBM0_TEMP from path:/run/devmap/sensors/SMB_MAX6581/temp7_input, error:File does not exist
Could not read data for SMB_J3_DIODE_HBM1_TEMP from path:/run/devmap/sensors/SMB_MAX6581/temp8_input, error:File does not exist
Could not read data for SMB_J3_DIODE_NIF0_TEMP from path:/run/devmap/sensors/SMB_MAX6581/temp5_input, error:File does not exist
Could not read data for SMB_J3_DIODE_NIF1_TEMP from path:/run/devmap/sensors/SMB_MAX6581/temp6_input, error:File does not exist
Could not read data for SMB_MGMT_INLET_TEMP from path:/run/devmap/sensors/SMB_MGMT_TMP75/temp1_input, error:File does not exist

@facebook-github-bot
Copy link
Contributor

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

@joancaneus
Copy link
Contributor

@adamcalabrigo can you please also add the P1 testing log in the testing section of this PR?

@facebook-github-bot
Copy link
Contributor

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

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.

None yet

3 participants