The Lenovo ThinkPad T14s Gen6 is one of the best supported Snapdragon X Elite laptops under Linux thus far. Thanks to active developer engagement and cooperation from Lenovo there are firmware files in upstream linux-firmware.git and Lenovo’s generally robust Linux support make it one of the better choices for the Snapdragon X laptops currently out there. In further enhancing the Lenovo ThinkPad T14s Gen6 on Linux, a new EC driver has been posted for supporting this Snapdragon powered laptop.
Sebastian Reichel has posted thinkpad-t14s-ec as a new EC driver for this Snapdragon X Elite laptop. There is already the existing Lenovo ThinkPad ACPI driver within the Linux kernel used across the many ThinkPad laptop models. But the use of DeviceTrees with this Snapdragon X Elite laptop rather than ACPI precludes that driver’s use.
Rather than trying to tack DT support onto the ThinkPad ACPI driver, it was easier for Sebastian to write a new separate driver and to avoid overburdening the ACPI driver.
With this new driver, system LEDs, audio LEDs, extra keyboard keys, keyboard backlight, and other features are working. Sebastian explained with the new driver:
“Introduce driver for the ThinkPad T14s Gen6 Snapdragon EC. In theory it seems to be compatible with the ThinkPad ACPI driver, but these devices are booted with device tree. As the name implies, the existing ThinkPad ACPI driver only supports the ACPI interface. Looking at the implementation, the ACPI DSDT contains many mapping functions to translate the low level I2C messages into the interface used by the ThinkPad ACPI driver. Adding DT support to the ThinkPad ACPI driver would require adding all those translation functions, which would add more or less the same amount of code as writing a separate driver using the low level interface directly. I don’t think it’s sensible to make the existing ACPI driver even more complicated, so I went for a separate driver.
I managed to get system LEDs, audio LEDs, extra keys and the keyboard backlight control working. The EC also seems to be used for some thermal bits, which I haven’t looked into deeply. As far as I understand most thermal and fan control is handled by a different controller (0x36@i2c5) anyways.
Apart from that the EC is involved in proper system suspend, which is something I do not yet understand (I don’t have any documentation apart from the dis-assembled DSDT and existing ACPI driver). Right now I disabled wake capabilities for the IRQ, since it would wake up the system when closing the LID. Hopefully a way to mask specific events will be found in the future.”
That new driver was posted for review on Sunday on the Linux kernel mailing list.