Dear Linux folks,
On the Dell Precision 3540, BIOS 1.23.0 12/19/2022, with Debian
sid/unstable, Linux 6.1.12 logs the warning below:
Accelerometer lis3lv02d is present on SMBus but its address is
unknown, skipping registration
This warning was already logged by
Linux version 5.19.0-2-amd64 ([email protected])
(gcc-11 (Debian 11.3.0-6) 11.3.0, GNU ld (GNU Binutils for Debian)
2.38.90.20220713) #1 SMP PREEMPT_DYNAMIC Debian 5.19.11-1 (2022-09-24)
with firmware BIOS 1.15.0 12/08/2021.
What can a user do about this? It looks like the I2C addresses need to
be added to `dell_lis3lv02d_devices[]` in `drivers/i2c/busses/i2c-i801.c`.
Kind regards,
Paul
PS: Some more logs:
```
[ 0.000000] Linux version 6.1.0-5-amd64
([email protected]) (gcc-12 (Debian 12.2.0-14) 12.2.0, GNU
ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Debian
6.1.12-1 (2023-02-15)
[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-6.1.0-5-amd64
root=UUID=c9342a55-b747-4442-b2f4-bc03eb7a51cf ro quiet noisapnp
log_buf_len=2M cryptomgr.notests btusb.enable_autosuspend=y
random.trust_cpu=on drm.debug=0xe log_buf_len=8M
[…]
[ 0.000000] DMI: Dell Inc. Precision 3540/0M14W7, BIOS 1.23.0 12/19/2022
[…]
[ 20.631866] i801_smbus 0000:00:1f.4: SPD Write Disable is set
[ 20.631925] i801_smbus 0000:00:1f.4: SMBus using PCI interrupt
[ 20.662022] i801_smbus 0000:00:1f.4: Accelerometer lis3lv02d is
present on SMBus but its address is unknown, skipping registration
[…]
```
Hi Paul,
> What can a user do about this? It looks like the I2C addresses need to be
> added to `dell_lis3lv02d_devices[]` in `drivers/i2c/busses/i2c-i801.c`.
Complain to Dell about the missing address ;)
Until then:
> [ 20.631866] i801_smbus 0000:00:1f.4: SPD Write Disable is set
# cd /sys/bus/pci/drivers/i801_smbus/0000\:00\:1f.4
# ls -d i2c-?
The last digit of the printout is the bus number. Then:
# modprobe i2c-dev
# i2cdetect <bus_number>
And post the output here. If you are brave and see that the address 0x1d
or 0x29 are printed in your output, you could try adding an entry to the
array you already mentioned above with the address you found. It may be
safer to do some sanity checking before, though.
Happy hacking,
Wolfram
Dear Wolfram,
Thank you for your prompt reply.
Am 27.02.23 um 20:27 schrieb Wolfram Sang:
>> What can a user do about this? It looks like the I2C addresses need to be
>> added to `dell_lis3lv02d_devices[]` in `drivers/i2c/busses/i2c-i801.c`.
>
> Complain to Dell about the missing address ;)
I will. (As “Laptop system certified with Ubuntu“ [1], I was hoping that
Canonical would have solved that with Dell already.)
> Until then:
>
>> [ 20.631866] i801_smbus 0000:00:1f.4: SPD Write Disable is set
>
> # cd /sys/bus/pci/drivers/i801_smbus/0000\:00\:1f.4
> # ls -d i2c-?
>
> The last digit of the printout is the bus number. Then:
>
> # modprobe i2c-dev
> # i2cdetect <bus_number>
>
> And post the output here.
$ 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: -- -- -- -- -- -- -- --
> If you are brave and see that the address 0x1d or 0x29 are printed in
> your output, you could try adding an entry to the array you already
> mentioned above with the address you found. It may be safer to do
> some sanity checking before, though.
So, 29 shows up in the dump. Let’s see if I am going to find the time to
build a Linux kernel. (I couldn’t find a module parameter to force
loading at a specific address.)
Kind regards,
Paul
[1]: https://ubuntu.com/certified/201902-26859
Hi Paul,
> So, 29 shows up in the dump. Let’s see if I am going to find the time to
> build a Linux kernel. (I couldn’t find a module parameter to force loading
> at a specific address.)
We do this via sysfs:
# echo lis3lv02d 0x29 > /sys/bus/i2c/devices/i2c-6/new_device
(Depending on your system, you might need to ensure the lis3 driver is
loaded before)
Hope it works!
Wolfram
Dear Wolfram,
Thank you again for the prompt reply.
Am 28.02.23 um 11:50 schrieb Wolfram Sang:
>> So, 29 shows up in the dump. Let’s see if I am going to find the time to
>> build a Linux kernel. (I couldn’t find a module parameter to force loading
>> at a specific address.)
>
> We do this via sysfs:
>
> # echo lis3lv02d 0x29 > /sys/bus/i2c/devices/i2c-6/new_device
>
> (Depending on your system, you might need to ensure the lis3 driver is
> loaded before)
>
> Hope it works!
It does. After your command, Linux logs:
```
[ 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
```
I can cook up a patch, if you want.
Kind regards,
Paul
Hi Paul,
> It does. After your command, Linux logs:
Cool!
> I can cook up a patch, if you want.
Yes, please.
Happy hacking,
Wolfram
On Tuesday 28 February 2023 12:00:32 Wolfram Sang wrote:
> Hi Paul,
>
>
> > It does. After your command, Linux logs:
>
> Cool!
>
> > I can cook up a patch, if you want.
>
> Yes, please.
>
> Happy hacking,
>
> Wolfram
>
Hello! When you find some time, please send a patch. If needed I can help with it.