2022-07-14 05:43:29

by Akihiko Odaki

[permalink] [raw]
Subject: [PATCH v2] AMD_SFH: Add a DMI quirk entry for Chromebooks

Google Chromebooks use Chrome OS Embedded Controller Sensor Hub instead
of Sensor Hub Fusion and leaves MP2 uninitialized, which disables all
functionalities, even including the registers necessary for feature
detections.

The behavior was observed with Lenovo ThinkPad C13 Yoga.

Signed-off-by: Akihiko Odaki <[email protected]>
Suggested-by: Mario Limonciello <[email protected]>
---
drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
index dadc491bbf6b..b91e1c95e543 100644
--- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
+++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
@@ -197,6 +197,18 @@ static const struct dmi_system_id dmi_sensor_mask_overrides[] = {
},
.driver_data = (void *)(ACEL_EN | MAGNO_EN),
},
+ {
+ /*
+ * Google Chromebooks use Chrome OS Embedded Controller Sensor
+ * Hub instead of Sensor Hub Fusion and leaves MP2
+ * uninitialized, which disables all functionalities, even
+ * including the registers necessary for feature detections.
+ */
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Google"),
+ },
+ .driver_data = (void *)0,
+ },
{ }
};

--
2.36.1


2022-07-14 11:56:01

by Mario Limonciello

[permalink] [raw]
Subject: Re: [PATCH v2] AMD_SFH: Add a DMI quirk entry for Chromebooks

On 7/14/22 00:37, Akihiko Odaki wrote:
> Google Chromebooks use Chrome OS Embedded Controller Sensor Hub instead
> of Sensor Hub Fusion and leaves MP2 uninitialized, which disables all
> functionalities, even including the registers necessary for feature
> detections.
>
> The behavior was observed with Lenovo ThinkPad C13 Yoga.
>
> Signed-off-by: Akihiko Odaki <[email protected]>
> Suggested-by: Mario Limonciello <[email protected]>
> ---
> drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
> index dadc491bbf6b..b91e1c95e543 100644
> --- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
> +++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
> @@ -197,6 +197,18 @@ static const struct dmi_system_id dmi_sensor_mask_overrides[] = {
> },
> .driver_data = (void *)(ACEL_EN | MAGNO_EN),
> },
> + {
> + /*
> + * Google Chromebooks use Chrome OS Embedded Controller Sensor
> + * Hub instead of Sensor Hub Fusion and leaves MP2
> + * uninitialized, which disables all functionalities, even
> + * including the registers necessary for feature detections.
> + */
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "Google"),
> + },
> + .driver_data = (void *)0,
> + },
> { }
> };
>

Did you miss my other comment on v1 on discovery sensor probing or is it
not a problem?

2022-07-14 19:38:42

by Basavaraj Natikar

[permalink] [raw]
Subject: Re: [PATCH v2] AMD_SFH: Add a DMI quirk entry for Chromebooks


On 7/14/2022 11:07 AM, Akihiko Odaki wrote:
> Google Chromebooks use Chrome OS Embedded Controller Sensor Hub instead
> of Sensor Hub Fusion and leaves MP2 uninitialized, which disables all
> functionalities, even including the registers necessary for feature
> detections.
>
> The behavior was observed with Lenovo ThinkPad C13 Yoga.

We are checking for few things with respect to this issue
internally.

Please hold on this patch. we will get back soon.

Thanks,
Basavaraj

2022-07-15 04:44:02

by Basavaraj Natikar

[permalink] [raw]
Subject: Re: [PATCH v2] AMD_SFH: Add a DMI quirk entry for Chromebooks



On 7/14/2022 11:07 AM, Akihiko Odaki wrote:
> Google Chromebooks use Chrome OS Embedded Controller Sensor Hub instead
> of Sensor Hub Fusion and leaves MP2 uninitialized, which disables all
> functionalities, even including the registers necessary for feature
> detections.
>
> The behavior was observed with Lenovo ThinkPad C13 Yoga.
>
>
This driver should not get loaded in chrome OS by default.
Could you please provide details of Chrome OS Version and Kernel version to confirm the behavior.

Are you enabling manually CONFIG_AMD_SFH_HID config?

Thanks,
Basavaraj

2022-07-15 04:50:56

by Akihiko Odaki

[permalink] [raw]
Subject: Re: [PATCH v2] AMD_SFH: Add a DMI quirk entry for Chromebooks

On 2022/07/15 13:41, Basavaraj Natikar wrote:
>
>
> On 7/14/2022 11:07 AM, Akihiko Odaki wrote:
>> Google Chromebooks use Chrome OS Embedded Controller Sensor Hub instead
>> of Sensor Hub Fusion and leaves MP2 uninitialized, which disables all
>> functionalities, even including the registers necessary for feature
>> detections.
>>
>> The behavior was observed with Lenovo ThinkPad C13 Yoga.
>>
>>
> This driver should not get loaded in chrome OS by default.
> Could you please provide details of Chrome OS Version and Kernel version to confirm the behavior.
>
> Are you enabling manually CONFIG_AMD_SFH_HID config?
>
> Thanks,
> Basavaraj
>

I use Fedora 36, not Chrome OS. The config is enabled on Fedora's
generic kernel. The kernel is built from commit
78ca55889a549a9a194c6ec666836329b774ab6d from the upstream.

Regards,
Akihiko Odaki

2022-08-15 21:04:17

by Mario Limonciello

[permalink] [raw]
Subject: RE: [PATCH v2] AMD_SFH: Add a DMI quirk entry for Chromebooks

[Public]

> -----Original Message-----
> From: Akihiko Odaki <[email protected]>
> Sent: Thursday, July 14, 2022 23:46
> To: Natikar, Basavaraj <[email protected]>
> Cc: Natikar, Basavaraj <[email protected]>; Jiri Kosina
> <[email protected]>; Benjamin Tissoires <[email protected]>;
> [email protected]; [email protected]; Limonciello,
> Mario <[email protected]>
> Subject: Re: [PATCH v2] AMD_SFH: Add a DMI quirk entry for Chromebooks
>
> On 2022/07/15 13:41, Basavaraj Natikar wrote:
> >
> >
> > On 7/14/2022 11:07 AM, Akihiko Odaki wrote:
> >> Google Chromebooks use Chrome OS Embedded Controller Sensor Hub
> instead
> >> of Sensor Hub Fusion and leaves MP2 uninitialized, which disables all
> >> functionalities, even including the registers necessary for feature
> >> detections.
> >>
> >> The behavior was observed with Lenovo ThinkPad C13 Yoga.
> >>
> >>
> > This driver should not get loaded in chrome OS by default.
> > Could you please provide details of Chrome OS Version and Kernel version
> to confirm the behavior.
> >
> > Are you enabling manually CONFIG_AMD_SFH_HID config?
> >
> > Thanks,
> > Basavaraj
> >
>
> I use Fedora 36, not Chrome OS. The config is enabled on Fedora's
> generic kernel. The kernel is built from commit
> 78ca55889a549a9a194c6ec666836329b774ab6d from the upstream.
>
> Regards,
> Akihiko Odaki

Akihiko,

FWIW - I think your patch is the correct direction for your situation (trying to load
Fedora onto a system that previously shipped with ChromeOS).

I think you just need to check the question that I had about discovery registers and
if that probing is still a problem or not.

Thanks,