iio: imu: st_lsm6dsx: Add ACPI ID SMOCF05 (Minisforum V3 / V3 SE)
Subsystems (2)
v3 cover iio: imu: st_lsm6dsx: Add ACPI ID SMOCF05 (Minisforum V3 / V3 SE)
Hi,
This picks up Samuel's series adding the SMOCF05 ACPI ID for the LSM6DS3TR-C [1][2], which stalled after the v2 review. The Minisforum V3 and V3 SE tablets both use this ID; without a DSDT override their accelerometer and gyroscope are missing, and owners currently carry one just to get screen rotation [3].
I own a V3 and would like to see this merged, so I followed the path the SMOCF00 patch took [4]:
- Patch 2/2 only adds the ID; the SLA0/SLG0 mount matrix patch is dropped. Orientation is handled in userspace via hwdb, and I will send the systemd hwdb entry separately. That also addresses the patch-order concern from the v2 review.
- The DSDT excerpt and the tested machines are now in the changelog (full excerpt below), as Andy asked.
- Patch 1/2 is the trailing-comma cleanup Andy suggested, split out and applied to the existing entries too.
Samuel stays the author of 2/2; my edits are noted in the tags.
Changes since v2:
- Dropped "Add alternative ACPI mount matrix retrieval".
- Split the trailing-comma cleanup into its own patch, covering SMOCF00 as well.
- Changelog of the ID patch: DSDT excerpt, machines, test results.
The V3 BIOS (1.06) declares the device exactly like the V3 SE's:
Device (STS)
{
Name (_HID, EisaId ("SMOCF05"))
Name (_CID, EisaId ("SMOCF05"))
Name (_UID, Zero)
Method (_STA, 0, NotSerialized)
{
Return (0x0F)
}
Method (_CRS, 0, NotSerialized)
{
Name (RBUF, ResourceTemplate ()
{
I2cSerialBusV2 (0x006A, ControllerInitiated, 0x00061A80,
AddressingMode7Bit, "\\_SB.I2CD",
0x00, ResourceConsumer, , Exclusive,
RawDataBuffer (0x04)
{
0x53, 0x4C, 0x41, 0x30
})
I2cSerialBusV2 (0x006A, ControllerInitiated, 0x00061A80,
AddressingMode7Bit, "\\_SB.I2CD",
0x00, ResourceConsumer, , Exclusive,
RawDataBuffer (0x04)
{
0x53, 0x4C, 0x47, 0x30
})
GpioInt (Edge, ActiveHigh, Exclusive, PullNone, 0x0000,
"\\_SB.GPIO", 0x00, ResourceConsumer, ,
RawDataBuffer (0x04)
{
0x53, 0x4C, 0x41, 0x30
})
{
0x0009
}
})
Return (RBUF) /* \_SB_.I2CD.STS_._CRS.RBUF */
}
Method (SLA0, 0, NotSerialized)
{
Name (RBUF, Package (0x03)
{
"-1 0 0",
"0 -1 0",
"0 0 -1"
})
Return (RBUF) /* \_SB_.I2CD.STS_.SLA0.RBUF */
}
Method (SLG0, 0, NotSerialized)
{
Name (RBUF, Package (0x03)
{
"1 0 0",
"0 1 0",
"0 0 1"
})
Return (RBUF) /* \_SB_.I2CD.STS_.SLG0.RBUF */
}
}On the V3 with this series and the stock firmware tables, the driver binds to i2c-SMOCF05:00, WHO_AM_I reads 0x6a, and both lsm6ds3tr-c_accel and lsm6ds3tr-c_gyro are registered. Screen auto-rotation works through iio-sensor-proxy with the mount matrix -1 0 0; 0 -1 0; 0 0 -1 (the firmware's SLA0), applied via hwdb.
Thanks to Samuel for the original series and to the v2 reviewers for the feedback. The patches and changelogs were prepared with the help of an AI coding assistant; I reviewed them and tested the result on my V3.
[1] v1: https://lore.kernel.org/linux-iio/[email protected]/
[2] v2: https://lore.kernel.org/linux-iio/[email protected]/
[3] https://github.com/mudkipme/awesome-minisforum-v3/issues/2
[4] https://lore.kernel.org/linux-iio/[email protected]/
Samuel Dionne-Riel (1):
iio: imu: st_lsm6dsx: Add ACPI ID SMOCF05 for LSM6DS3TR-C
Jared Wuerzburger (1):
iio: imu: st_lsm6dsx: Drop trailing comma in ACPI match table entries
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
base-commit: d8c0f48f0b1583308a98401c0c7b1a65d1d43a6c
Signature · 1 line
2.55.0
PATCH v3 1/2 iio: imu: st_lsm6dsx: Drop trailing comma in ACPI match table entries
The trailing comma after the last member of an initializer is only useful when more members may follow, which is never the case for an acpi_device_id entry. Drop it, as suggested during review of an earlier version of the next patch.
--- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c +2 -2
@@ -143,8 +143,8 @@ static const struct of_device_id st_lsm6dsx_i2c_of_match[] = {MODULE_DEVICE_TABLE (of, st_lsm6dsx_i2c_of_match);static const struct acpi_device_id st_lsm6dsx_i2c_acpi_match[] = { - {"SMO8B30" ,ST_LSM6DS3TRC_ID , }, - {"SMOCF00" ,ST_LSM6DSO_ID , }, + {"SMO8B30" ,ST_LSM6DS3TRC_ID }, + {"SMOCF00" ,ST_LSM6DSO_ID }, { } };MODULE_DEVICE_TABLE (acpi, st_lsm6dsx_i2c_acpi_match);
Signature · 1 line
2.55.0
Re: [PATCH v3 1/2] iio: imu: st_lsm6dsx: Drop trailing comma in ACPI match table entries
Quoted 8 lines · Jared Wuerzburger
The trailing comma after the last member of an initializer is only useful when more members may follow, which is never the case for an
acpi_device_identry. Drop it, as suggested during review of an earlier version of the next patch.Suggested-by Andy Shevchenko <[email protected]>Assisted-by Claude:claude-opus-5-5
Quoted 1 line
Signed-off-by Jared Wuerzburger <[email protected]>
...
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c static const struct of_device_id st_lsm6dsx_i2c_of_match[] = { · line 149
Quoted 7 lines
static const struct
acpi_device_idst_lsm6dsx_i2c_acpi_match[] = {drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c +2
-2- { "SMO8B30", ST_LSM6DS3TRC_ID, }, - { "SMOCF00", ST_LSM6DSO_ID, }, + { "SMO8B30", ST_LSM6DS3TRC_ID }, + { "SMOCF00", ST_LSM6DSO_ID }, { } };
Thanks, but while at it, also switch to C99 initialisers to avoid an additional churn (there is ongoing activity to switch all ID tables to use C99 initialisers).
Signature · 2 lines
With Best Regards, Andy Shevchenko
Re: [PATCH v3 1/2] iio: imu: st_lsm6dsx: Drop trailing comma in ACPI match table entries
Quoted 1 line · Andy Shevchenko
On Sun, Sep 27, 2026 at 05:05:58PM -0500, Jared Wuerzburger wrote:
...
Quoted 3 lines
Quoted 1 line
Assisted-by Claude:claude-opus-5-5Assisted-by LLM
Thanks, that was the format from an older version of coding-assistants.rst. I'll use Assisted-by: LLM in v4, in 2/2 as well.
...
Quoted 2 lines
Thanks, but while at it, also switch to C99 initialisers to avoid an additional churn (there is ongoing activity to switch all ID tables to use C99 initialisers).
Will do. v4 converts the table to { .id = ..., .driver_data = ... }, which also matches the i2c_device_id table in the same file.
Thanks for the quick review!
Jared
PATCH v3 2/2 iio: imu: st_lsm6dsx: Add ACPI ID SMOCF05 for LSM6DS3TR-C
In reply to Jared WuerzburgerFrom: Samuel Dionne-Riel <[email protected]>
The Minisforum V3 and V3 SE tablets declare their ST LSM6DS3TR-C IMU in the DSDT with the hardware ID SMOCF05 instead of SMO8B30, so the driver never binds and the accelerometer and gyroscope are missing. The Windows driver (version 1.0.4.3) binds the LSM6DS3TR-C to both IDs.
Relevant part of the DSDT, identical on both models (full excerpt in the cover letter):
Scope (_SB.I2CD) { Device (STS) {
Name (_HID, EisaId ("SMOCF05"))
Name (_CID, EisaId ("SMOCF05"))
_CRS: I2cSerialBusV2 (0x006A, ..., "\\_SB.I2CD") vendor data "SLA0"
I2cSerialBusV2 (0x006A, ..., "\\_SB.I2CD") vendor data "SLG0"
GpioInt (Edge, ActiveHigh, ..., "\\_SB.GPIO") { 9 } "SLA0"
Method (SLA0): "-1 0 0", "0 -1 0", "0 0 -1"
Method (SLG0): "1 0 0", "0 1 0", "0 0 1"
} }Both I2C resources describe the same address, and the driver uses the first one. The vendor-specific SLA0/SLG0 mount matrices are not parsed here; the accelerometer orientation is handled in userspace through the systemd hwdb, as for SMOCF00.
Tested on:
- V3 SE (Ryzen 7 7735U, BIOS 1.03) with this change.
- V3 (Ryzen 7 8840U, BIOS 1.06), kernel 7.2.7, with this change and the stock firmware tables. The driver binds to i2c-SMOCF05:00, the WHO_AM_I check passes (0x6a), and both lsm6ds3tr-c_accel and lsm6ds3tr-c_gyro are registered. Screen auto-rotation works with iio-sensor-proxy (checked with the device renamed to SMO8B30 via a DSDT override, i.e. the same ST_LSM6DS3TRC_ID driver data).
[Jared Wuerzburger: rewrote the changelog with the DSDT excerpt and test
results, dropped the mount matrix patch from the series]
--- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c | 1 + 1 file changed, 1 insertion(+)
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c +1 -0
@@ -145,6 +145,7 @@ MODULE_DEVICE_TABLE(of, st_lsm6dsx_i2c_of_match);static const struct acpi_device_id st_lsm6dsx_i2c_acpi_match[] = { {"SMO8B30" ,ST_LSM6DS3TRC_ID }, {"SMOCF00" ,ST_LSM6DSO_ID }, + {"SMOCF05" ,ST_LSM6DS3TRC_ID }, { } };MODULE_DEVICE_TABLE (acpi, st_lsm6dsx_i2c_acpi_match);
Signature · 1 line
2.55.0
Re: [PATCH v3 2/2] iio: imu: st_lsm6dsx: Add ACPI ID SMOCF05 for LSM6DS3TR-C
Quoted 7 lines · Jared Wuerzburger
The Minisforum V3 and V3 SE tablets declare their ST LSM6DS3TR-C IMU in the DSDT with the hardware ID SMOCF05 instead of SMO8B30, so the driver never binds and the accelerometer and gyroscope are missing. The Windows driver (version 1.0.4.3) binds the LSM6DS3TR-C to both IDs.
Relevant part of the DSDT, identical on both models (full excerpt in the cover letter):
Don't refer to the cover letter in the commit message. Most will not understand this pointer.
Quoted 9 lines
Scope (_SB.I2CD) { Device (STS) {
Name (_HID, EisaId ("SMOCF05"))
Name (_CID, EisaId ("SMOCF05"))
_CRS: I2cSerialBusV2 (0x006A, ..., "\\_SB.I2CD") vendor data "SLA0"
I2cSerialBusV2 (0x006A, ..., "\\_SB.I2CD") vendor data "SLG0"
GpioInt (Edge, ActiveHigh, ..., "\\_SB.GPIO") { 9 } "SLA0"
Method (SLA0): "-1 0 0", "0 -1 0", "0 0 -1"
Method (SLG0): "1 0 0", "0 1 0", "0 0 1"
} }Just ask maintainer to add a Link tag to the series instead.
Quoted 4 lines
Both I2C resources describe the same address, and the driver uses the first one. The vendor-specific SLA0/SLG0 mount matrices are not parsed here; the accelerometer orientation is handled in userspace through the systemd hwdb, as for SMOCF00.
Hmm... But is that wrong? I mean does ACPI provide the correct data in mount matrix?
Quoted 10 lines
Tested on:
- V3 SE (Ryzen 7 7735U, BIOS 1.03) with this change.
- V3 (Ryzen 7 8840U, BIOS 1.06), kernel 7.2.7, with this change and the stock firmware tables. The driver binds to i2c-SMOCF05:00, theWHO_AM_Icheck passes (0x6a), and both lsm6ds3tr-c_accel and lsm6ds3tr-c_gyro are registered. Screen auto-rotation works with iio-sensor-proxy (checked with the device renamed to SMO8B30 via a DSDT override, i.e. the sameST_LSM6DS3TRC_IDdriver data).
Closes?
Quoted 4 lines
Signed-off-by Samuel Dionne-Riel <[email protected]>[Jared Wuerzburger: rewrote the changelog with the DSDT excerpt and test
results, dropped the mount matrix patch from the series]Assisted-by Claude:claude-opus-5-5
Quoted 1 line
Signed-off-by Jared Wuerzburger <[email protected]>
Signature · 2 lines
With Best Regards, Andy Shevchenko
Re: [PATCH v3 2/2] iio: imu: st_lsm6dsx: Add ACPI ID SMOCF05 for LSM6DS3TR-C
Quoted 1 line · Andy Shevchenko
On Sun, Sep 27, 2026 at 05:05:59PM -0500, Jared Wuerzburger wrote:
...
Quoted 5 lines
Quoted 2 lines
Relevant part of the DSDT, identical on both models (full excerpt in the cover letter):
Don't refer to the cover letter in the commit message. Most will not understand this pointer.
Makes sense, I'll drop it.
Quoted 1 line
Quoted 1 line
Scope (_SB.I2CD) { Device (STS) {
...
Quoted 1 line
Just ask maintainer to add a Link tag to the series instead.
Will do. In v4 the short excerpt stays in the commit message, without the pointer, and I'll ask Jonathan below the --- line to add a Link:
to the series when applying, so the full excerpt in the cover letter stays reachable from the commit.
Quoted 7 lines
Quoted 4 lines
Both I2C resources describe the same address, and the driver uses the first one. The vendor-specific SLA0/SLG0 mount matrices are not parsed here; the accelerometer orientation is handled in userspace through the systemd hwdb, as for SMOCF00.
Hmm... But is that wrong? I mean does ACPI provide the correct data in mount matrix?
Good question, and it made me check more carefully: X and Y are right, Z isn't. SLA0 (-1 0 0; 0 -1 0; 0 0 -1) matches the Windows sensor convention, which reports the gravity vector (Z = -1g with the screen facing up). SLG0 being identity fits that: SLA0's negation is a sign convention, not a mounting rotation. With it applied via hwdb, auto-rotation on my V3 is correct (that only depends on the X and Y signs), but iio-sensor-proxy reports the tilt inverted: "tilted-down" with the screen leaning back. With -1 0 0; 0 -1 0; 0 0 1, a plain 180 degree rotation about Z, orientation and tilt are both right. That means the systemd hwdb entry that went in today [1] has the wrong Z sign; the fix is here [2].
So the firmware values can't be used as a mount matrix as they are; reading SLA0 like ROTM, as v2 did, would have exported the same wrong Z. That's one more reason I'd keep this series to the ID and leave the orientation to hwdb, as was done for SMOCF00. If you'd still like the firmware data used in the driver, I'm happy to look at it as a follow-up, but it would need translating from the Windows convention rather than using it as a mount matrix.
Quoted 3 lines
Quoted 1 line
Closes?
Yes, I'll switch it to Closes: in v4.
Quoted 3 lines
Quoted 1 line
Assisted-by Claude:claude-opus-5-5Assisted-by LLM
Will fix, same as in 1/2.
[1] https://github.com/systemd/systemd/pull/43935
[2] https://github.com/systemd/systemd/pull/43941
Jared
Re: [PATCH v3 2/2] iio: imu: st_lsm6dsx: Add ACPI ID SMOCF05 for LSM6DS3TR-C
Quoted 3 lines · Jared Wuerzburger
Quoted 1 line · Andy Shevchenko
On Sun, Sep 27, 2026 at 05:05:59PM -0500, Jared Wuerzburger wrote:
...
Quoted 20 lines
Quoted 7 lines
Quoted 4 lines
Both I2C resources describe the same address, and the driver uses the first one. The vendor-specific SLA0/SLG0 mount matrices are not parsed here; the accelerometer orientation is handled in userspace through the systemd hwdb, as for SMOCF00.
Hmm... But is that wrong? I mean does ACPI provide the correct data in mount matrix?
Good question, and it made me check more carefully: X and Y are right, Z isn't. SLA0 (-1 0 0; 0 -1 0; 0 0 -1) matches the Windows sensor convention, which reports the gravity vector (Z = -1g with the screen facing up). SLG0 being identity fits that: SLA0's negation is a sign convention, not a mounting rotation. With it applied via hwdb, auto-rotation on my V3 is correct (that only depends on the X and Y signs), but iio-sensor-proxy reports the tilt inverted: "tilted-down" with the screen leaning back. With -1 0 0; 0 -1 0; 0 0 1, a plain 180 degree rotation about Z, orientation and tilt are both right. That means the systemd hwdb entry that went in today [1] has the wrong Z sign; the fix is here [2].
Quoted 7 lines
So the firmware values can't be used as a mount matrix as they are; reading SLA0 like ROTM, as v2 did, would have exported the same wrong Z. That's one more reason I'd keep this series to the ID and leave the orientation to hwdb, as was done for SMOCF00. If you'd still like the firmware data used in the driver, I'm happy to look at it as a follow-up, but it would need translating from the Windows convention rather than usingit as a mount matrix.
For the starter just summarize above in the commit message in v4. This will justify usage of hwdb (IIUC the case).
Quoted 2 lines
[1] https://github.com/systemd/systemd/pull/43935
[2] https://github.com/systemd/systemd/pull/43941
Signature · 2 lines
With Best Regards, Andy Shevchenko