conqp / amd-sfh-hid-dkms

Linux kernel driver for the AMD Sensor Fusion Hub.
7 stars 3 forks source link

Support for Asus Vivobook Flip 14 (TM420IA-EC172T) #1

Closed zorun closed 3 years ago

zorun commented 3 years ago

Hi,

I tried your driver on a Asus Vivobook Flip 14 laptop (TM420IA-EC172T) that also has an AMD SFH.

The module loads fine and an accelerometer device appears, but it does not return any value:

==> /sys/bus/iio/devices/iio:device0/current_timestamp_clock <==
realtime

==> /sys/bus/iio/devices/iio:device0/dev <==
234:0

==> /sys/bus/iio/devices/iio:device0/in_accel_hysteresis <==
1.270000

==> /sys/bus/iio/devices/iio:device0/in_accel_offset <==
0

==> /sys/bus/iio/devices/iio:device0/in_accel_sampling_frequency <==
12.500000

==> /sys/bus/iio/devices/iio:device0/in_accel_scale <==
0.098066500

==> /sys/bus/iio/devices/iio:device0/in_accel_x_raw <==
0

==> /sys/bus/iio/devices/iio:device0/in_accel_y_raw <==
0

==> /sys/bus/iio/devices/iio:device0/in_accel_z_raw <==
0

==> /sys/bus/iio/devices/iio:device0/name <==
accel_3d

==> /sys/bus/iio/devices/iio:device0/uevent <==
MAJOR=234
MINOR=0
DEVNAME=iio:device0
DEVTYPE=iio_device

I built your driver as an out-of-tree module, and I tried with and without the amd_iommu=off boot option. By default, only an accelerometer device is created. I tried to force the other sensors with sensor_mask: it creates new devices for gyroscope and magnetometer, but they also don't return any value.

I also tried to backport the upstream driver that was merged in linux 5.11 (see https://github.com/zorun/amd-sfh-hid-backport) and it gives the same result (accelerometer device, but no value).

This is on Ubuntu 20.04 with a 5.8 kernel: Linux axoloto 5.8.0-41-generic #46~20.04.1-Ubuntu SMP Mon Jan 18 17:52:23 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Any idea on how to further debug this? Thanks!

conqp commented 3 years ago

This is a known issue, as you most likely have a Renoir device. Unfortunately there's nothing I can do about that. AMD needs to provide us with an appropriate report descriptor for the accelerometer used on Renoir devices. Until they do so, users with Renoir devices are SOL.

zorun commented 3 years ago

Ah right, thanks, I had missed that part. Too bad :/