Re: [PATCH v6 2/3] platform/arm64: add Lenovo Yoga Slim 7x Gen 11 EC driver

From: Ilpo Järvinen

Date: Wed Oct 14 2026 - 10:55:44 EST


On Wed, 14 Oct 2026, Oleg Keri wrote:

> The Lenovo Yoga Slim 7x Gen 11 (Qualcomm glymur / Snapdragon X2 Elite)
> carries a Compal EF06 embedded controller on I2C at address 0x70. The
> platform firmware describes it as an ACPI GenericSerialBus region, but the
> machine boots from device tree, so nothing otherwise talks to it.
>
> Commands are exchanged with two raw I2C block transfers: a 7 byte write to
> register 0x02 carrying the command and up to six arguments, then a 6 byte
> read of register 0x01 for the result, with a short delay in between before
> the result register is valid. The EC offers no way to match a result to
> its command; the delay is the one the vendor ACPI code uses.
>
> Expose what the EC offers that the rest of the kernel does not already
> provide:
>
> - the board thermistors that report a value at probe, five on this
> machine, as hwmon temperature channels. These are charger, CPU
> voltage regulator, 5 V rail and ambient sensors, not die sensors, and
> read considerably cooler than tsens
> - CPU fan speed in RPM
> - the keyboard backlight as an LED, off/low/high
> - Fn-lock as a read/write sysfs attribute, matching the ideapad-laptop
> interface. The EC reports Fn+Esc as an event but keeps no state of its
> own, so the driver owns the bit and toggles it on the key
> - the mic-mute and airplane-mode keys as KEY_MICMUTE and KEY_RFKILL.
> These reach the host only as EC events; they are not on the keyboard's
> HID interface and have no GPIO of their own
>
> The EC signals pending events on a dedicated line, and keeps pulsing it
> until they are read - so the queue must be drained completely on every
> interrupt, including codes this driver ignores. Leaving one behind makes
> the controller pulse indefinitely.
>
> Fan speed is reported but not controlled. The EC accepts a manual setpoint,
> however it enforces no thermal floor over it: with the fan pinned at
> roughly 2000 RPM under full load the SoC rose from 69 to 91 degrees in 30
> seconds without the EC ever overriding. Exposing pwm1_enable or fan1_target
> would therefore let userspace overheat the machine, so neither is
> implemented.
>
> Note this is the Gen 11 machine specifically. Its EC differs from the
> Qualcomm reference EC that the reference designs place at address 0x76,
> which is not populated here, and so EC_QCOM_HAMOA does not drive it.
>
> Signed-off-by: Oleg Keri <okerixx@xxxxxxxxx>
> ---

> +static const struct of_device_id slim7x11_ec_of_match[] = {
> + { .compatible = "lenovo,yoga-slim7x-gen11-ec" },
> + { }
> +};
> +MODULE_DEVICE_TABLE(of, slim7x11_ec_of_match);
> +
> +static const struct i2c_device_id slim7x11_ec_i2c_id[] = {
> + { "slim7x-gen11-ec" },

Thanks for the update. I've applied patch 2 to the review-ilpo-next branch
in the platform drivers (pdx86) tree.

The other two patches will need to go through some other tree.

While applying, I added .name = into that id struct.


--
i.