Ticket #1408 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

LiFePo batteries does not indicate /sys/class/battery/psu-0/technology

Reported by: jg Owned by: dwmw2
Priority: normal Milestone: Trial-3
Component: embedded controller Version:
Keywords: power Cc: rsmith, dwmw2
Action Needed: Verified: no
Deployments affected: Blocked By:
Blocking:

Description

The file says "unknown".

Not clear if this is due to the EC, the firmware or the Linux driver.

Attachments

read_battery_id.sh (51 bytes) - added by David.Lin 7 years ago.

Change History

Changed 7 years ago by David.Lin

Changed 7 years ago by David.Lin

The batteries types are in the gas gauge address 0x5f. Please use command 0x18 to read batteries types. Example (read_battery_id.sh):

./iorwb 0x6c 0x18 // Read gas gauge ./iorwb 0x68 0x5f // Read address 0x5f ./iorwb 0x68 // return batteries types

(the scripts do not check the IBF and OBF bits in the 6c status register, so their correct operation depends on timing assumptions that are not guaranteed)

Batteries types define as following: (1)NiMH (GP)

The battery type is 0x11.

(2)LiFePO4 (BYD)

The battery type is 0x22.

(3)LiFePO4 (GP )

The battery type is 0x12.

Changed 7 years ago by wmb@…

We are having reliability problems with the EC commands accessed via ports 68 and 6c. I have tried a lot of different variations of code to access those commands. The work some of the times, but other times the IBF bit fails to go to 0 when expected, and the OBF bit sometimes does not go to 1 when expected.

We need a clear and complete specification for how the EC port 68/6c protocol works. Shell scripts that access the registers slowly without IBF/OBF checking are not an adequate specification. And we need extensive testing to make sure the EC executes the protocol reliably. We also need to do a code review to see if any bugs in the implementation can be found by code inspection.

Changed 7 years ago by David.Lin

I am sorry for reliability problems with EC commands. You can access 0xFB5F via ports 0x380. This data is battery type as above.

Changed 7 years ago by jg

  • keywords power added
  • verified unset

Changed 7 years ago by David.Lin

  • owner changed from David.Lin to dwmw2
  • verified unset

David Woodhouse, Please use command 0x18 to read batteries types. The EC commands protocol reference web http://wiki.laptop.org/go/Ec_specification.

Changed 7 years ago by rsmith

  • status changed from new to closed
  • resolution set to fixed

Fixed in new kernels.

Note: See TracTickets for help on using tickets.