2023-12-20 16:15:03

by Paul Menzel

[permalink] [raw]
Subject: [PATCH 1/2] i2c: i801: Add 0x29 as I²C address for lis3lv02d in Dell Precision 3540

On the Dell Precision 3540/0M14W7, BIOS 1.7.4 05/12/2020, Linux prints
the warning below.

i801_smbus 0000:00:1f.4: Accelerometer lis3lv02d is present on SMBus but its address is unknown, skipping registration

With the help of Wolfram Sang, the test to probe it on I²C bus 6 at address
0x29 was successful.

$ cd /sys/bus/pci/drivers/i801_smbus/0000:00:1f.4
$ ls -d i2c-?
i2c-6
$ sudo i2cdetect 6
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-6.
I will probe address range 0x08-0x77.
Continue? [Y/n] Y
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: 08 -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- 29 -- -- -- -- -- --
30: 30 -- -- -- -- 35 UU UU -- -- -- -- -- -- -- --
40: -- -- -- -- 44 -- -- -- -- -- -- -- -- -- -- --
50: UU -- 52 -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

$ echo lis3lv02d 0x29 | sudo tee /sys/bus/i2c/devices/i2c-6/new_device
$ sudo dmesg
[…]
[ 2110.787000] i2c i2c-6: new_device: Instantiated device lis3lv02d at 0x29
[ 2110.791932] lis3lv02d_i2c 6-0029: supply Vdd not found, using dummy regulator
[ 2110.791981] lis3lv02d_i2c 6-0029: supply Vdd_IO not found, using dummy regulator
[ 2110.809233] lis3lv02d: 8 bits 3DC sensor found
[ 2110.900668] input: ST LIS3LV02DL Accelerometer as /devices/platform/lis3lv02d/input/input23

So, the device has that accelerometer. Add the I2C address to the
mapping list.

Link: https://lore.kernel.org/linux-i2c/[email protected]/
Signed-off-by: Paul Menzel <[email protected]>
---
drivers/i2c/busses/i2c-i801.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
index 070999139c6d..cb9660f84117 100644
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -1230,6 +1230,7 @@ static const struct {
* Additional individual entries were added after verification.
*/
{ "Latitude 5480", 0x29 },
+ { "Precision 3540", 0x29 },
{ "Vostro V131", 0x1d },
{ "Vostro 5568", 0x29 },
};
--
2.43.0



2023-12-20 16:15:37

by Paul Menzel

[permalink] [raw]
Subject: [PATCH 2/2] i2c: i801: Add 0x29 as I²C address for lis3lv02d in Dell XPS 15 7590

On the Dell XPS 15 7590/0VYV0G, BIOS 1.24.0 09/11/2023, Linux prints the
warning below.

i801_smbus 0000:00:1f.4: Accelerometer lis3lv02d is present on SMBus but its address is unknown, skipping registration

Following the same suggestions by Wolfram Sang as for the Dell Precision
3540 [1], the accelerometer can be successfully found on I²C bus 2 at
address 0x29.

$ echo lis3lv02d 0x29 | sudo tee /sys/bus/i2c/devices/i2c-2/new_device
lis3lv02d 0x29
$ dmesg | tail -5
[ 549.522876] lis3lv02d_i2c 2-0029: supply Vdd not found, using dummy regulator
[ 549.522904] lis3lv02d_i2c 2-0029: supply Vdd_IO not found, using dummy regulator
[ 549.542486] lis3lv02d: 8 bits 3DC sensor found
[ 549.630022] input: ST LIS3LV02DL Accelerometer as /devices/platform/lis3lv02d/input/input35
[ 549.630586] i2c i2c-2: new_device: Instantiated device lis3lv02d at 0x29

So, the device has that accelerometer. Add the I²C address to the
mapping list, and test it successfully on the device.

[1]: https://lore.kernel.org/linux-i2c/[email protected]/

Signed-off-by: Paul Menzel <[email protected]>
---
drivers/i2c/busses/i2c-i801.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
index cb9660f84117..3932e8d96a17 100644
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -1233,6 +1233,7 @@ static const struct {
{ "Precision 3540", 0x29 },
{ "Vostro V131", 0x1d },
{ "Vostro 5568", 0x29 },
+ { "XPS 15 7590", 0x29 },
};

static void register_dell_lis3lv02d_i2c_device(struct i801_priv *priv)
--
2.43.0


2023-12-20 16:28:31

by Pali Rohár

[permalink] [raw]
Subject: Re: [PATCH 2/2] i2c: i801: Add 0x29 as I² C address for lis3lv02d in Dell XPS 15 7590

On Wednesday 20 December 2023 17:10:02 Paul Menzel wrote:
> On the Dell XPS 15 7590/0VYV0G, BIOS 1.24.0 09/11/2023, Linux prints the
> warning below.
>
> i801_smbus 0000:00:1f.4: Accelerometer lis3lv02d is present on SMBus but its address is unknown, skipping registration
>
> Following the same suggestions by Wolfram Sang as for the Dell Precision
> 3540 [1], the accelerometer can be successfully found on I²C bus 2 at
> address 0x29.
>
> $ echo lis3lv02d 0x29 | sudo tee /sys/bus/i2c/devices/i2c-2/new_device
> lis3lv02d 0x29
> $ dmesg | tail -5
> [ 549.522876] lis3lv02d_i2c 2-0029: supply Vdd not found, using dummy regulator
> [ 549.522904] lis3lv02d_i2c 2-0029: supply Vdd_IO not found, using dummy regulator
> [ 549.542486] lis3lv02d: 8 bits 3DC sensor found
> [ 549.630022] input: ST LIS3LV02DL Accelerometer as /devices/platform/lis3lv02d/input/input35
> [ 549.630586] i2c i2c-2: new_device: Instantiated device lis3lv02d at 0x29
>
> So, the device has that accelerometer. Add the I²C address to the
> mapping list, and test it successfully on the device.
>
> [1]: https://lore.kernel.org/linux-i2c/[email protected]/
>
> Signed-off-by: Paul Menzel <[email protected]>

If the accelerometer is working fine then I have no objections.

Acked-by: Pali Rohár <[email protected]>

> ---
> drivers/i2c/busses/i2c-i801.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
> index cb9660f84117..3932e8d96a17 100644
> --- a/drivers/i2c/busses/i2c-i801.c
> +++ b/drivers/i2c/busses/i2c-i801.c
> @@ -1233,6 +1233,7 @@ static const struct {
> { "Precision 3540", 0x29 },
> { "Vostro V131", 0x1d },
> { "Vostro 5568", 0x29 },
> + { "XPS 15 7590", 0x29 },
> };
>
> static void register_dell_lis3lv02d_i2c_device(struct i801_priv *priv)
> --
> 2.43.0
>

2023-12-20 16:41:33

by Pali Rohár

[permalink] [raw]
Subject: Re: [PATCH 1/2] i2c: i801: Add 0x29 as I² C address for lis3lv02d in Dell Precision 3540

On Wednesday 20 December 2023 17:10:01 Paul Menzel wrote:
> On the Dell Precision 3540/0M14W7, BIOS 1.7.4 05/12/2020, Linux prints
> the warning below.
>
> i801_smbus 0000:00:1f.4: Accelerometer lis3lv02d is present on SMBus but its address is unknown, skipping registration
>
> With the help of Wolfram Sang, the test to probe it on I²C bus 6 at address
> 0x29 was successful.
>
> $ cd /sys/bus/pci/drivers/i801_smbus/0000:00:1f.4
> $ ls -d i2c-?
> i2c-6
> $ sudo i2cdetect 6
> WARNING! This program can confuse your I2C bus, cause data loss and worse!
> I will probe file /dev/i2c-6.
> I will probe address range 0x08-0x77.
> Continue? [Y/n] Y
> 0 1 2 3 4 5 6 7 8 9 a b c d e f
> 00: 08 -- -- -- -- -- -- --
> 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 20: -- -- -- -- -- -- -- -- -- 29 -- -- -- -- -- --
> 30: 30 -- -- -- -- 35 UU UU -- -- -- -- -- -- -- --
> 40: -- -- -- -- 44 -- -- -- -- -- -- -- -- -- -- --
> 50: UU -- 52 -- -- -- -- -- -- -- -- -- -- -- -- --
> 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 70: -- -- -- -- -- -- -- --
>
> $ echo lis3lv02d 0x29 | sudo tee /sys/bus/i2c/devices/i2c-6/new_device
> $ sudo dmesg
> […]
> [ 2110.787000] i2c i2c-6: new_device: Instantiated device lis3lv02d at 0x29
> [ 2110.791932] lis3lv02d_i2c 6-0029: supply Vdd not found, using dummy regulator
> [ 2110.791981] lis3lv02d_i2c 6-0029: supply Vdd_IO not found, using dummy regulator
> [ 2110.809233] lis3lv02d: 8 bits 3DC sensor found
> [ 2110.900668] input: ST LIS3LV02DL Accelerometer as /devices/platform/lis3lv02d/input/input23
>
> So, the device has that accelerometer. Add the I2C address to the
> mapping list.
>
> Link: https://lore.kernel.org/linux-i2c/[email protected]/
> Signed-off-by: Paul Menzel <[email protected]>

If the accelerometer is working fine then I have no objections.

Acked-by: Pali Rohár <[email protected]>

Anyway, if you have a time then try to look into decompiled ACPI DSDT
table if Dell had not put somewhere this SMBus/I²C address of the
accelerometer. I remember that for older Latitude E6440 I looked into
every DSDT method related with accelerometer if there is not some
information but I have not find anything and also Dell confirmed that
this address information is not there present. I'm still hoping that
Dell put autodiscovery address for new machines somewhere...

And if you are more curious you can start investigation what are other
devices which i2cdetect showed (only those with UU are bound to some
kernel/userspace driver).

> ---
> drivers/i2c/busses/i2c-i801.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
> index 070999139c6d..cb9660f84117 100644
> --- a/drivers/i2c/busses/i2c-i801.c
> +++ b/drivers/i2c/busses/i2c-i801.c
> @@ -1230,6 +1230,7 @@ static const struct {
> * Additional individual entries were added after verification.
> */
> { "Latitude 5480", 0x29 },
> + { "Precision 3540", 0x29 },
> { "Vostro V131", 0x1d },
> { "Vostro 5568", 0x29 },
> };
> --
> 2.43.0
>

2023-12-22 00:26:03

by Andi Shyti

[permalink] [raw]
Subject: Re: [PATCH 1/2] i2c: i801: Add 0x29 as I² C address for lis3lv02d in Dell Precision 3540

Hi Paul,

On Wed, Dec 20, 2023 at 05:10:01PM +0100, Paul Menzel wrote:
> On the Dell Precision 3540/0M14W7, BIOS 1.7.4 05/12/2020, Linux prints
> the warning below.
>
> i801_smbus 0000:00:1f.4: Accelerometer lis3lv02d is present on SMBus but its address is unknown, skipping registration
>
> With the help of Wolfram Sang, the test to probe it on I?C bus 6 at address

please, next time /I?C/I2C/

Reviewed-by: Andi Shyti <[email protected]>

Thanks,
Andi

2023-12-22 00:28:36

by Andi Shyti

[permalink] [raw]
Subject: Re: [PATCH 2/2] i2c: i801: Add 0x29 as I² C address for lis3lv02d in Dell XPS 15 7590

Hi Paul,

On Wed, Dec 20, 2023 at 05:10:02PM +0100, Paul Menzel wrote:
> On the Dell XPS 15 7590/0VYV0G, BIOS 1.24.0 09/11/2023, Linux prints the
> warning below.
>
> i801_smbus 0000:00:1f.4: Accelerometer lis3lv02d is present on SMBus but its address is unknown, skipping registration
>
> Following the same suggestions by Wolfram Sang as for the Dell Precision
> 3540 [1], the accelerometer can be successfully found on I?C bus 2 at
> address 0x29.
>
> $ echo lis3lv02d 0x29 | sudo tee /sys/bus/i2c/devices/i2c-2/new_device
> lis3lv02d 0x29
> $ dmesg | tail -5
> [ 549.522876] lis3lv02d_i2c 2-0029: supply Vdd not found, using dummy regulator
> [ 549.522904] lis3lv02d_i2c 2-0029: supply Vdd_IO not found, using dummy regulator
> [ 549.542486] lis3lv02d: 8 bits 3DC sensor found
> [ 549.630022] input: ST LIS3LV02DL Accelerometer as /devices/platform/lis3lv02d/input/input35
> [ 549.630586] i2c i2c-2: new_device: Instantiated device lis3lv02d at 0x29
>
> So, the device has that accelerometer. Add the I?C address to the
> mapping list, and test it successfully on the device.
>
> [1]: https://lore.kernel.org/linux-i2c/[email protected]/
>
> Signed-off-by: Paul Menzel <[email protected]>

Reviewed-by: Andi Shyti <[email protected]>

Thanks,
Andi

2023-12-22 10:40:15

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH 1/2] i2c: i801: Add 0 x29 as I²C address for lis3lv02d in Dell Precision 3540

On Wed, Dec 20, 2023 at 05:10:01PM +0100, Paul Menzel wrote:
> On the Dell Precision 3540/0M14W7, BIOS 1.7.4 05/12/2020, Linux prints
> the warning below.
>
> i801_smbus 0000:00:1f.4: Accelerometer lis3lv02d is present on SMBus but its address is unknown, skipping registration
>
> With the help of Wolfram Sang, the test to probe it on I²C bus 6 at address
> 0x29 was successful.
>
> $ cd /sys/bus/pci/drivers/i801_smbus/0000:00:1f.4
> $ ls -d i2c-?
> i2c-6
> $ sudo i2cdetect 6
> WARNING! This program can confuse your I2C bus, cause data loss and worse!
> I will probe file /dev/i2c-6.
> I will probe address range 0x08-0x77.
> Continue? [Y/n] Y
> 0 1 2 3 4 5 6 7 8 9 a b c d e f
> 00: 08 -- -- -- -- -- -- --
> 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 20: -- -- -- -- -- -- -- -- -- 29 -- -- -- -- -- --
> 30: 30 -- -- -- -- 35 UU UU -- -- -- -- -- -- -- --
> 40: -- -- -- -- 44 -- -- -- -- -- -- -- -- -- -- --
> 50: UU -- 52 -- -- -- -- -- -- -- -- -- -- -- -- --
> 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 70: -- -- -- -- -- -- -- --
>
> $ echo lis3lv02d 0x29 | sudo tee /sys/bus/i2c/devices/i2c-6/new_device
> $ sudo dmesg
> […]
> [ 2110.787000] i2c i2c-6: new_device: Instantiated device lis3lv02d at 0x29
> [ 2110.791932] lis3lv02d_i2c 6-0029: supply Vdd not found, using dummy regulator
> [ 2110.791981] lis3lv02d_i2c 6-0029: supply Vdd_IO not found, using dummy regulator
> [ 2110.809233] lis3lv02d: 8 bits 3DC sensor found
> [ 2110.900668] input: ST LIS3LV02DL Accelerometer as /devices/platform/lis3lv02d/input/input23
>
> So, the device has that accelerometer. Add the I2C address to the
> mapping list.
>
> Link: https://lore.kernel.org/linux-i2c/[email protected]/
> Signed-off-by: Paul Menzel <[email protected]>

Applied to for-next, thanks!


Attachments:
(No filename) (1.98 kB)
signature.asc (849.00 B)
Download all attachments

2023-12-22 10:40:47

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH 2/2] i2c: i801: Add 0 x29 as I²C address for lis3lv02d in Dell XPS 15 7590

On Wed, Dec 20, 2023 at 05:10:02PM +0100, Paul Menzel wrote:
> On the Dell XPS 15 7590/0VYV0G, BIOS 1.24.0 09/11/2023, Linux prints the
> warning below.
>
> i801_smbus 0000:00:1f.4: Accelerometer lis3lv02d is present on SMBus but its address is unknown, skipping registration
>
> Following the same suggestions by Wolfram Sang as for the Dell Precision
> 3540 [1], the accelerometer can be successfully found on I²C bus 2 at
> address 0x29.
>
> $ echo lis3lv02d 0x29 | sudo tee /sys/bus/i2c/devices/i2c-2/new_device
> lis3lv02d 0x29
> $ dmesg | tail -5
> [ 549.522876] lis3lv02d_i2c 2-0029: supply Vdd not found, using dummy regulator
> [ 549.522904] lis3lv02d_i2c 2-0029: supply Vdd_IO not found, using dummy regulator
> [ 549.542486] lis3lv02d: 8 bits 3DC sensor found
> [ 549.630022] input: ST LIS3LV02DL Accelerometer as /devices/platform/lis3lv02d/input/input35
> [ 549.630586] i2c i2c-2: new_device: Instantiated device lis3lv02d at 0x29
>
> So, the device has that accelerometer. Add the I²C address to the
> mapping list, and test it successfully on the device.
>
> [1]: https://lore.kernel.org/linux-i2c/[email protected]/
>
> Signed-off-by: Paul Menzel <[email protected]>

Applied to for-next, thanks!

(fixed I²C to I2C in both patches)


Attachments:
(No filename) (1.33 kB)
signature.asc (849.00 B)
Download all attachments