linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Accelerometer lis3lv02d is present on SMBus but its address is unknown, skipping registration
@ 2023-02-27 14:23 Paul Menzel
  2023-02-27 19:27 ` Wolfram Sang
  0 siblings, 1 reply; 7+ messages in thread
From: Paul Menzel @ 2023-02-27 14:23 UTC (permalink / raw)
  To: Jean Delvare; +Cc: linux-i2c, LKML, Dell.Client.Kernel, Pali Rohár

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 (debian-kernel@lists.debian.org) 
(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 
(debian-kernel@lists.debian.org) (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
[…]
```

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Accelerometer lis3lv02d is present on SMBus but its address is unknown, skipping registration
  2023-02-27 14:23 Accelerometer lis3lv02d is present on SMBus but its address is unknown, skipping registration Paul Menzel
@ 2023-02-27 19:27 ` Wolfram Sang
  2023-02-28 10:39   ` Paul Menzel
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfram Sang @ 2023-02-27 19:27 UTC (permalink / raw)
  To: Paul Menzel
  Cc: Jean Delvare, linux-i2c, LKML, Dell.Client.Kernel, Pali Rohár

[-- Attachment #1: Type: text/plain, Size: 754 bytes --]

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


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Accelerometer lis3lv02d is present on SMBus but its address is unknown, skipping registration
  2023-02-27 19:27 ` Wolfram Sang
@ 2023-02-28 10:39   ` Paul Menzel
  2023-02-28 10:50     ` Wolfram Sang
  0 siblings, 1 reply; 7+ messages in thread
From: Paul Menzel @ 2023-02-28 10:39 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Jean Delvare, linux-i2c, LKML, Dell.Client.Kernel, Pali Rohár

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Accelerometer lis3lv02d is present on SMBus but its address is unknown, skipping registration
  2023-02-28 10:39   ` Paul Menzel
@ 2023-02-28 10:50     ` Wolfram Sang
  2023-02-28 10:56       ` Paul Menzel
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfram Sang @ 2023-02-28 10:50 UTC (permalink / raw)
  To: Paul Menzel
  Cc: Jean Delvare, linux-i2c, LKML, Dell.Client.Kernel, Pali Rohár

[-- Attachment #1: Type: text/plain, Size: 411 bytes --]

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


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Accelerometer lis3lv02d is present on SMBus but its address is unknown, skipping registration
  2023-02-28 10:50     ` Wolfram Sang
@ 2023-02-28 10:56       ` Paul Menzel
  2023-02-28 11:00         ` Wolfram Sang
  0 siblings, 1 reply; 7+ messages in thread
From: Paul Menzel @ 2023-02-28 10:56 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Jean Delvare, linux-i2c, LKML, Dell.Client.Kernel, Pali Rohár

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Accelerometer lis3lv02d is present on SMBus but its address is unknown, skipping registration
  2023-02-28 10:56       ` Paul Menzel
@ 2023-02-28 11:00         ` Wolfram Sang
  2023-07-19 19:32           ` Pali Rohár
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfram Sang @ 2023-02-28 11:00 UTC (permalink / raw)
  To: Paul Menzel
  Cc: Jean Delvare, linux-i2c, LKML, Dell.Client.Kernel, Pali Rohár

[-- Attachment #1: Type: text/plain, Size: 143 bytes --]

Hi Paul,


> It does. After your command, Linux logs:

Cool!

> I can cook up a patch, if you want.

Yes, please.

Happy hacking,

   Wolfram


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Accelerometer lis3lv02d is present on SMBus but its address is unknown, skipping registration
  2023-02-28 11:00         ` Wolfram Sang
@ 2023-07-19 19:32           ` Pali Rohár
  0 siblings, 0 replies; 7+ messages in thread
From: Pali Rohár @ 2023-07-19 19:32 UTC (permalink / raw)
  To: Wolfram Sang, Paul Menzel, Jean Delvare, linux-i2c, LKML,
	Dell.Client.Kernel

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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-07-19 19:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-27 14:23 Accelerometer lis3lv02d is present on SMBus but its address is unknown, skipping registration Paul Menzel
2023-02-27 19:27 ` Wolfram Sang
2023-02-28 10:39   ` Paul Menzel
2023-02-28 10:50     ` Wolfram Sang
2023-02-28 10:56       ` Paul Menzel
2023-02-28 11:00         ` Wolfram Sang
2023-07-19 19:32           ` Pali Rohár

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).