debugging 如何调试意外的OpenBMC hwmon AST2600行为?

anhgbhbe  于 2023-11-22  发布在  其他
关注(0)|答案(1)|浏览(200)

我正在调试<->OpenBMC映像在连接到SensorsBoard和Fan的AST 2600 EVB上运行时观察到的一个Hwmon交互问题(主机未连接)。正在运行的OpenBMC映像是使用bitbake构建的,它包括为此SensorBoard自定义的recipes-phosphor/configuration/entity-manager/SensorBoard.json。已验证SensorsBoard上的I2C传感器是否可以通过i2ctools访问,并且其行为符合预期。但是,即使phy Fan已正确连接,运行“Fanmtachtool<dev_id>--get-fan-speed<fan_num>“也会始终报告“Fan speed is 0”。例如:
/usr/local/bin/vim mtachtool 0 --get-fan-speed 0 --verbose
GET_TACH_SPEED:rpm值0
风扇0转速为0
cat /sys/class/hwmon/hwmon0/fan0_input
0
仔细查看martachtool的代码路径,我看到它调用了martachtool_action(),它读取“/sys/class/hwmon/hwmon<dev_id>/fan”,它总是0。尝试了所有<dev_id>/组合,由sysfs暴露:相同的结果。到目前为止,无法弄清楚为什么会这样。我真的很感激如何调试这个问题的所有建议。
其他详细信息:
ll /sys/class/hwmon/
lrwxrwxrwx 1 root root 0 Feb 16 08:52 hwmon0 -> ../../devices/platform/ahb/ahb:apb/1e610000.pwm-tacho-controller/hwmon/hwmon0
lrwxrwxrwx 1 root root 0 Feb 16 08:52 hwmon1 -> ../../devices/platform/iio-hwmon/hwmon/hwmon1
lrwxrwxrwx 1 root root 0 Feb 26 22:20 hwmon2 -> ../../devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a480.i2c-bus/i2c-8/8-004d/hwmon/hwmon2
ll /sys/class/hwmon/hwmon0/*
lrwxrwxrwx 1 root root 0 Feb 26 22:20 /sys/class/hwmon/hwmon0/device -> ../1e610000.pwm-tacho-controller
-r--r--r-- 1 root root 4096 Feb 26 22:20 /sys/class/hwmon/hwmon0/fan0_input
-r--r--r-- 1 root root 4096 Feb 26 22:20 /sys/class/hwmon/hwmon0/fan10_input
-r--r--r-- 1 root root 4096 Feb 26 22:20 /sys/class/hwmon/hwmon0/fan11_input
-r--r--r-- 1 root root 4096 Feb 26 22:20 /sys/class/hwmon/hwmon0/fan12_input
-r--r--r-- 1 root root 4096 Feb 26 22:20 /sys/class/hwmon/hwmon0/fan13_input
-r--r--r-- 1 root root 4096 Feb 26 22:20 /sys/class/hwmon/hwmon0/fan14_input
-r--r--r-- 1 root root 4096 Feb 26 22:20 /sys/class/hwmon/hwmon0/fan15_input
-r--r--r-- 1 root root 4096 Feb 26 22:20 /sys/class/hwmon/hwmon0/fan1_input
-r--r--r-- 1 root root 4096 Feb 26 22:20 /sys/class/hwmon/hwmon0/fan2_input
-r--r--r-- 1 root root 4096 Feb 26 22:20 /sys/class/hwmon/hwmon0/fan3_input
-r--r--r-- 1 root root 4096 Feb 26 22:20 /sys/class/hwmon/hwmon0/fan4_input
-r--r--r-- 1 root root 4096 Feb 26 22:20 /sys/class/hwmon/hwmon0/fan5_input
-r--r--r-- 1 root root 4096 Feb 26 22:20 /sys/class/hwmon/hwmon0/fan6_input
-r--r--r-- 1 root root 4096 Feb 26 22:20 /sys/class/hwmon/hwmon0/fan7_input
-r--r--r-- 1 root root 4096 Feb 26 22:20 /sys/class/hwmon/hwmon0/fan8_input
-r--r--r-- 1 root root 4096 Feb 26 22:20 /sys/class/hwmon/hwmon0/fan9_input
-r--r--r-- 1 root root 4096 Feb 26 22:20 /sys/class/hwmon/hwmon0/name
lrwxrwxrwx 1 root root 0 Feb 26 22:20 /sys/class/hwmon/hwmon0/of_node -> ../../firmware/devicetree/base/ahb/apb/trem-tacho-pumer@1e610000
-rw-r--r-- 1 root root 4096 Feb 26 22:20 /sys/class/hwmon/hwmon0/hwmon0
-rw-r--r-- 1 root root 4096 Feb 26 22:20 /sys/class/hwmon/hwmon0/hwmon1
-rw-r--r-- 1 root root 4096 Feb 26 22:20 /sys/class/hwmon/hwmon0/hwmon10
-rw-r--r-- 1 root root 4096 Feb 26 22:20 /sys/class/hwmon/hwmon0/hwmon11
-rw-r--r-- 1 root root 4096 Feb 26 22:20 /sys/class/hwmon/hwmon0/hwmon12
-rw-r--r-- 1 root root 4096 Feb 26 22:20 /sys/class/hwmon/hwmon0/hwmon13
-rw-r--r-- 1 root root 4096 Feb 26 22:20 /sys/class/hwmon/hwmon0/hwmon14
-rw-r--r-- 1 root root 4096 Feb 26 22:20 /sys/class/hwmon/hwmon0/hwmon15
-rw-r--r-- 1 root root 4096 Feb 26 22:20 /sys/class/hwmon/hwmon0/hwmon2
-rw-r--r-- 1 root root 4096 Feb 26 22:20 /sys/class/hwmon/hwmon0/hwmon3
-rw-r--r-- 1 root root 4096 Feb 26 22:20 /sys/class/hwmon/hwmon0/hwmon4
-rw-r--r-- 1 root root 4096 Feb 26 22:20 /sys/class/hwmon/hwmon0/hwmon5
-rw-r--r-- 1 root root 4096 Feb 26 22:20 /sys/class/hwmon/hwmon0/hwmon6
-rw-r--r-- 1 root root 4096 Feb 26 22:20 /sys/class/hwmon/hwmon0/hwmon7
-rw-r--r-- 1 root root 4096 Feb 26 22:20 /sys/class/hwmon/hwmon0/hwmon8
-rw-r--r-- 1 root root 4096 Feb 26 22:20 /sys/class/hwmon/hwmon0/hwmon9
lrwxrwxrwx 1 root root 0 Feb 16 08:52 /sys/class/hwmon/hwmon0/subsystem -> ../../class/hwmon
-rw-r--r-- 1 root root 4096 Feb 16 08:52 /sys/class/hwmon/hwmon0/uevent

dhxwm5r4

dhxwm5r41#

在我的情况下,问题是因为J80跳线连接PWM和TACH线。所以,当我删除它jummtachtool开始工作,如预期的那样。

相关问题