[AST2600] PWM/TACH driver and dbus-sensor issue

Troy Lee troy_lee at aspeedtech.com
Mon Feb 14 15:02:21 AEDT 2022


Adding Billy.

Hi Tung,

> -----Original Message-----
> From: Tung Nguyen OS <tungnguyen at os.amperecomputing.com>
> Sent: Monday, February 14, 2022 11:46 AM
> To: Troy Lee <troy_lee at aspeedtech.com>; openbmc at lists.ozlabs.org
> Cc: Thu Nguyen OS <thu at os.amperecomputing.com>; Thang Nguyen OS
> <thang at os.amperecomputing.com>; Phong Vo OS
> <phong at os.amperecomputing.com>
> Subject: Re: [AST2600] PWM/TACH driver and dbus-sensor issue
> 
> Hi Troy,
> Thank you for the information, i have merged the dbus-sensor patch and see
> it creates the Fan sensors well.
> One more issue i have observed about the fan tach report like this:
> 
> root at mtmitchell:~# echo 120 > /sys/class/hwmon/hwmon1/pwm1
> root at mtmitchell:~# cat /sys/class/hwmon/hwmon0/fan1_input
> 418526
> root at mtmitchell:~# echo 100 > /sys/class/hwmon/hwmon1/pwm1
> root at mtmitchell:~# cat /sys/class/hwmon/hwmon0/fan1_input
> 195312
> root at mtmitchell:~# echo 255 > /sys/class/hwmon/hwmon1/pwm1
> root at mtmitchell:~# cat /sys/class/hwmon/hwmon0/fan1_input
> 0
> root at mtmitchell:~# echo 50 > /sys/class/hwmon/hwmon1/pwm1
> root at mtmitchell:~# cat /sys/class/hwmon/hwmon0/fan1_input
> 0
> 
> It means the fan speed is reported incorrectly somehow, but i can see the
> fan speed changes by eyes, do you have idea on this issue ?

Does the aspeed,pulse-pr property of fan node set correspondingly?
What is the expected RPM of you fan? 418526 RPM?

Thanks,
Troy Lee

> 
> ________________________________________
> From: Troy Lee <troy_lee at aspeedtech.com>
> Sent: Friday, February 11, 2022 12:13 PM
> To: Tung Nguyen OS; openbmc at lists.ozlabs.org
> Cc: Thu Nguyen OS; Thang Nguyen OS; Phong Vo OS
> Subject: RE: [AST2600] PWM/TACH driver and dbus-sensor issue
> 
> Hi Tung,
> 
> > -----Original Message-----
> > From: openbmc <openbmc-
> > bounces+troy_lee=aspeedtech.com at lists.ozlabs.org> On Behalf Of Tung
> > Nguyen OS
> > Sent: Wednesday, February 9, 2022 10:40 PM
> > To: openbmc at lists.ozlabs.org
> > Cc: Thu Nguyen OS <thu at os.amperecomputing.com>; Thang Nguyen OS
> > <thang at os.amperecomputing.com>; Phong Vo OS
> > <phong at os.amperecomputing.com>
> > Subject: [AST2600] PWM/TACH driver and dbus-sensor issue
> >
> > Dear community,
> > We have ported the PWM/TACH hwmon driver for AST2600 from ASPEED's
> > repository https://github.com/AspeedTech-BMC/linux/tree/aspeed-
> master-
> > v5.4/drivers/hwmon to support Ampere Computing's systems. Verify with
> > AST2600 EVB, i can see the driver works. However there is a concern like:
> > 1. The change of hwmon fan pwm/tach in sysfs (as below), this is
> > different from the ast2500 as the separated of the fan*_input and pwm1
> > in various hwmon directories. At this time, the driver doesn't exist
> > in the OpenBMC linux at https://github.com/openbmc/linux. Is OpenBMC
> > going to merge and keep this driver ?
> 
> Please have a look on this patch.
> https://gerrit.openbmc-project.xyz/c/openbmc/dbus-sensors/+/49253
> 
> Thanks,
> Troy Lee
> 
> > root at mtmitchell:~# ls -la /sys/class/hwmon/hwmon hwmon0/ hwmon1/
> > hwmon2/ hwmon3/ hwmon4/ hwmon5/ hwmon6/ hwmon7/ hwmon8/
> hwmon9/
> > root at mtmitchell:~# ls -la /sys/class/hwmon/hwmon0/
> > drwxr-xr-x    3 root     root             0 Jan  1  1970 .
> > drwxr-xr-x    3 root     root             0 Jan  1  1970 ..
> > lrwxrwxrwx    1 root     root             0 Feb  9 08:38 device -
> > > ../../../1e610000.pwm_tach:tach
> > -r--r--r--    1 root     root          4096 Feb  9 08:38 fan10_input
> > -r--r--r--    1 root     root          4096 Feb  9 08:38 fan11_input
> > -r--r--r--    1 root     root          4096 Feb  9 08:38 fan12_input
> > -r--r--r--    1 root     root          4096 Feb  9 08:38 fan13_input
> > -r--r--r--    1 root     root          4096 Feb  9 08:38 fan14_input
> > -r--r--r--    1 root     root          4096 Feb  9 08:38 fan15_input
> > -r--r--r--    1 root     root          4096 Feb  9 08:38 fan16_input
> > -r--r--r--    1 root     root          4096 Feb  9 08:38 fan1_input
> > -r--r--r--    1 root     root          4096 Feb  9 08:38 fan2_input
> > -r--r--r--    1 root     root          4096 Feb  9 08:38 fan3_input
> > -r--r--r--    1 root     root          4096 Feb  9 08:38 fan4_input
> > -r--r--r--    1 root     root          4096 Feb  9 08:38 fan5_input
> > -r--r--r--    1 root     root          4096 Feb  9 08:38 fan6_input
> > -r--r--r--    1 root     root          4096 Feb  9 08:38 fan7_input
> > -r--r--r--    1 root     root          4096 Feb  9 08:38 fan8_input
> > -r--r--r--    1 root     root          4096 Feb  9 08:38 fan9_input
> > -r--r--r--    1 root     root          4096 Feb  9 08:38 name
> > lrwxrwxrwx    1 root     root             0 Feb  9 08:38 of_node -
> > > ../../../../../../../../firmware/devicetree/base/ahb/apb/pwm_tach at 1e
> > > 610
> > 000/tach
> > drwxr-xr-x    2 root     root             0 Feb  9 08:38 power
> > lrwxrwxrwx    1 root     root             0 Jan  1  1970 subsystem -
> > > ../../../../../../../../class/hwmon
> > -rw-r--r--    1 root     root          4096 Jan  1  1970 uevent
> > root at mtmitchell:~# ls -la /sys/class/hwmon/hwmon*/pwm*
> > -rw-r--r--    1 root     root          4096 Feb  9 09:13
> > /sys/class/hwmon/hwmon1/pwm1
> > -rw-r--r--    1 root     root          4096 Feb  9 09:20
> > /sys/class/hwmon/hwmon2/pwm1
> > -rw-r--r--    1 root     root          4096 Feb  9 08:38
> > /sys/class/hwmon/hwmon3/pwm1
> > -rw-r--r--    1 root     root          4096 Feb  9 08:38
> > /sys/class/hwmon/hwmon4/pwm1
> > -rw-r--r--    1 root     root          4096 Feb  9 08:38
> > /sys/class/hwmon/hwmon5/pwm1
> > -rw-r--r--    1 root     root          4096 Feb  9 08:38
> > /sys/class/hwmon/hwmon6/pwm1
> > -rw-r--r--    1 root     root          4096 Feb  9 08:38
> > /sys/class/hwmon/hwmon7/pwm1
> > -rw-r--r--    1 root     root          4096 Feb  9 08:38
> > /sys/class/hwmon/hwmon8/pwm1
> >
> > 2. With above changes, the dbus-sensor for FAN/PWM shall not work
> > because of the compatibility. So if OpenBMC want to keep above
> > PWM/TACH driver, does any sides have the plan to support the fan
> > sensor, if not, we can join and do it.
> >
> > Thank you and best regards,
> > Tung


More information about the openbmc mailing list