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

Meru800bfa: add UCD90320 sensors #196

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 sensor support for UCD90320 and corrects the names of two existing temp sensors to follow the convention used by the other temp sensors. Note that this is supported on P2 only currently.

Testing

Tested on Meru800bfa.

ucd90320 is correctly initialized:

[ 5416.277630] ucd9000 12-0011: Device ID UCD90320U|3.0.0.3323|211011
[ 5417.830854] i2c i2c-12: new_device: Instantiated device ucd90320 at 0x11

platform_manager creates the symlink for the UCD90320 sensors. From the service log:

Creating symlink from /run/devmap/sensors/SMB_UCD90320 to /sys/bus/i2c/devices/12-0011/hwmon/hwmon19. DevicePath: /SMB_SLOT@0/[SMB_UCD90320]

Ran sensor_service and ensured that the new sensors are being polled correctly. From the service log:

SMB_DPM_12V: Path=/run/devmap/sensors/SMB_UCD90320/in1_input, Compute=@/1000.0, FRU=SMB
SMB_DPM_1V2_DKR: Path=/run/devmap/sensors/SMB_UCD90320/in4_input, Compute=@/1000.0, FRU=SMB
SMB_DPM_1V9_DKR: Path=/run/devmap/sensors/SMB_UCD90320/in3_input, Compute=@/1000.0, FRU=SMB
SMB_DPM_3V3: Path=/run/devmap/sensors/SMB_UCD90320/in7_input, Compute=@/1000.0, FRU=SMB
SMB_DPM_3V3_DKR: Path=/run/devmap/sensors/SMB_UCD90320/in2_input, Compute=@/1000.0, FRU=SMB
SMB_DPM_5V0: Path=/run/devmap/sensors/SMB_UCD90320/in8_input, Compute=@/1000.0, FRU=SMB
...
SMB_DPM_5V0 (/run/devmap/sensors/SMB_UCD90320/in8_input) : 4.928                                                                                                                                        
SMB_DPM_3V3_DKR (/run/devmap/sensors/SMB_UCD90320/in2_input) : 3.305                                                                                                                                    
SMB_DPM_3V3 (/run/devmap/sensors/SMB_UCD90320/in7_input) : 3.311                                                                                                                                        
SMB_DPM_1V2_DKR (/run/devmap/sensors/SMB_UCD90320/in4_input) : 1.197                                                                                                                                    
SMB_DPM_12V (/run/devmap/sensors/SMB_UCD90320/in1_input) : 12.089

On P1, platform_manager logs the failures:

Failures in PmUnit SMB at /SMB_SLOT@0
1. Failed to create i2c device for SMB_UCD90320 (ucd90320) at bus: 12, addr: 0x11 with exit status 0
2. Failed to create a symlink /run/devmap/sensors/SMB_UCD90320 for DevicePath /SMB_SLOT@0/[SMB_UCD90320]. Reason: SMB_UCD90320 is not plugged-in to the platform

sensor_service logs the failures also:

Could not read data for SMB_DPM_12V from path:/run/devmap/sensors/SMB_UCD90320/in1_input, error:File does not exist
Could not read data for SMB_DPM_1V2_DKR from path:/run/devmap/sensors/SMB_UCD90320/in4_input, error:File does not exist
Could not read data for SMB_DPM_1V9_DKR from path:/run/devmap/sensors/SMB_UCD90320/in3_input, error:File does not exist
Could not read data for SMB_DPM_3V3 from path:/run/devmap/sensors/SMB_UCD90320/in7_input, error:File does not exist
Could not read data for SMB_DPM_3V3_DKR from path:/run/devmap/sensors/SMB_UCD90320/in2_input, error:File does not exist
Could not read data for SMB_DPM_5V0 from path:/run/devmap/sensors/SMB_UCD90320/in8_input, error:File does not exist
Processed 145 Sensors. 6 Failures.

@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 this PR?

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