Opened 3 years ago

Closed 3 years ago

#10882 closed defect (fixed)

OFW accelerometer driver fails on some XO-1.75 units

Reported by: wmb@… Owned by: wad
Priority: normal Milestone: 1.75-software
Component: hardware Version: 1.75-A2
Keywords: Cc: saadia
Blocked By: Blocking:
Deployments affected: Action Needed: no action
Verified: no

Description

ok select /accelerometer

Works on XO-1.75 A2 units "owned" by Mitch Bradley, jnettlett, pgf, and smithbone. cjb's and saadia's units fail with "Invalid ihandle", caused by an I2C timeout.

Assigning to hardware because debugging this will require hooking up a cleverscope on the I2C lines attached to the accelerometer chip.

Change History (8)

comment:1 Changed 3 years ago by cjb

  • Milestone changed from Not Triaged to 1.75-software

(Note that, at least on Saadia's machine, the chip actually appears to work under Linux. So something especially wacky is going on.)

comment:2 Changed 3 years ago by saadia

On my machine, the accelerometer fails in OFW but returns values through the kernel accel. driver. On Paul's machine, the accelerometer works in OFW and also returns values through the kernel driver, similar to the values returned on my machine.

comment:3 follow-up: Changed 3 years ago by wad

Can someone please add information to this ticket on how to test the accelerometer from Linux ? And what versions of each are required for the test to be supported ?

And if select works, what are the OFW commands to actually see the accelerometer output ?

Thanks!

comment:4 Changed 3 years ago by pgf

  • Cc saadia added

comment:5 in reply to: ↑ 3 Changed 3 years ago by wmb@…

Replying to wad:

Can someone please add information to this ticket on how to test the accelerometer from Linux ? And what versions of each are required for the test to be supported ?

The accelerometer driver has been in OFW for months, so Q4A13 is certainly good enough.

And if select works, what are the OFW commands to actually see the accelerometer output ?

ok select /accelerometer
ok acceleration@ .d .d .d cr many

Type a key to stop the spewing.

comment:6 Changed 3 years ago by saadia

The patch to use the accelerometer in Linux is contained in this git checkin:

http://dev.laptop.org/git/xo1.75-kernel-bringup/commit/?h=linux-2.6.39&id=f19199013f8369d7119c50a007662a9b3adebf69

You can poll the changes in position every second with this command:
watch -n 1 'cat /sys/devices/platform/lis3lv02d/position'

comment:7 Changed 3 years ago by wad

  • Action Needed changed from diagnose to test in release

This is definitely the same issue as #11041. This ticket is being closed for now, and the problem will be tracked there.

We need to ensure that the I2C bus for the accelerometer runs at around 25 KHz on A3/B1 motherboards. We will fix the hardware to allow full speed operation starting with C1.

The value written to the LSR field of the TWSI_LCR register on the I2C bus talking to the accelerometer should be 0X1FF, not the default 0x7E. This has already been fixed in OFW, starting with Q4B05.

comment:8 Changed 3 years ago by Quozl

  • Action Needed changed from test in release to no action
  • Resolution set to fixed
  • Status changed from new to closed

No longer occurs, kernel was patched.

Note: See TracTickets for help on using tickets.