Skip to content

Commit

Permalink
ELBERT: Add MAX6581 in userspace (#117)
Browse files Browse the repository at this point in the history
Summary:
ELBERT: Add MAX6581 in userspace

- Add TH4 Diode temp sensor in setup_i2c.sh instead of dts. This allows
  it to retry adding the device if it fails to probe for any reason.

Testing:

Following tests no longer occasionally fail
- test_i2c
- test_sensor_calibration

Pull Request resolved: facebookexternal/openbmc.arista#117

Reviewed By: tao-ren

fbshipit-source-id: 39d1436ef3
  • Loading branch information
joancaneus authored and facebook-github-bot committed Dec 4, 2020
1 parent f246551 commit d2ba587
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,19 @@ hwmon_device_add() {
fi
}

# Calibrate TH4 MAX6581
calibrate_th4_max6581() {
i2cset -f -y 4 0x4d 0x4a 0x03
i2cset -f -y 4 0x4d 0x4b 0x1f
i2cset -f -y 4 0x4d 0x4c 0x03
}

# Probe FSCD devices first in case one module is taking too
# long or is in bad shape
# Supvervisor Inlet
hwmon_device_add 11 0x4c max6658
hwmon_device_add 4 0x4d max6581
calibrate_th4_max6581

# SMBus 0
# Currently not using I2C TPM
Expand Down

0 comments on commit d2ba587

Please sign in to comment.