Bug 100411 - No Power Related Items: AC/Battery/Power Button
Summary: No Power Related Items: AC/Battery/Power Button
Status: CLOSED DUPLICATE of bug 88471
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Battery (show other bugs)
Hardware: x86-64 Linux
: P1 normal
Assignee: Aaron Lu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-24 04:30 UTC by Kevin
Modified: 2015-07-15 02:35 UTC (History)
4 users (show)

See Also:
Kernel Version: Linux NotionInk-Sonic 4.1.0-cain #1 SMP Tue Jun 23 23:11:38 IST 2015 x86_64 x86_64 x86_64 GNU/Linux
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg output of 4.1 Kernel (47.96 KB, text/plain)
2015-06-24 04:30 UTC, Kevin
Details
kernel config (176.28 KB, application/octet-stream)
2015-06-24 04:31 UTC, Kevin
Details
dmidecode output (13.34 KB, text/plain)
2015-06-24 04:32 UTC, Kevin
Details
DSDT Information (619.56 KB, application/octet-stream)
2015-06-24 04:33 UTC, Kevin
Details
directory list of sys (1.87 MB, text/plain)
2015-06-24 09:14 UTC, Kevin
Details
acpidump (420.44 KB, text/plain)
2015-06-25 17:52 UTC, Kevin
Details

Description Kevin 2015-06-24 04:30:51 UTC
Created attachment 180681 [details]
dmesg output of 4.1 Kernel

Running on Ubuntu 15.04 with latest updates.Also compiled new 4.1 kernel with ubuntu patches.

The system has no power information. 
No AC adapter presence 
No Battery Information 
No Power Button

The system is a Notion Ink Cain 10 inch 2 in 1 Tablet. This is a baytrail tablet. 
The Chip is _most likely_ X-Powers AXP288 according to logs.

Relevant dmesg logs:

...
[    0.249497] ACPI: Power Resource [USBC] (on)
[    0.250919] ACPI: Power Resource [WWPR] (off)
[    0.256797] ACPI: Power Resource [PLPE] (on)
[    0.266042] ACPI: Power Resource [CLK0] (on)
[    0.266174] ACPI: Power Resource [CLK1] (on)
[    0.266465] ACPI: Power Resource [P28P] (off)
[    0.266590] ACPI: Power Resource [P18P] (off)
[    0.271556] ACPI: Power Resource [CLK0] (on)
[    0.271680] ACPI: Power Resource [CLK1] (on)
[    0.286405] ACPI: Power Resource [P28X] (off)
[    0.286538] ACPI: Power Resource [P18X] (off)
[    0.286673] ACPI: Power Resource [P28T] (off)
[    0.286803] ACPI: Power Resource [P18T] (off)
[    0.286927] ACPI: Power Resource [P1XT] (off)
[    0.296918] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
[    0.296934] acpi PNP0A08:00: _OSC: OS supports [ASPM ClockPM Segments MSI]
[    0.297059] \_SB_.PCI0:_OSC invalid UUID
[    0.297064] _OSC request data:1 1e 0 
[    0.297076] acpi PNP0A08:00: _OSC failed (AE_ERROR); disabling ASPM
[    0.297472] acpi PNP0A08:00: fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge.
...
...
[    3.267300] axp20x i2c-INT33F4:00: AXP20x variant AXP288 found 
...
[    3.519351] axp20x i2c-INT33F4:00: AXP20X driver loaded
...
...
[    7.181783] ACPI Exception: AE_ERROR, Returned by Handler for [GeneralPurposeIo] (20150410/evregion-297)
[    7.181798] ACPI Error: Method parse/execution failed [\_SB_.ADP1._PSR] (Node ffff8800790bf5a0), AE_ERROR (20150410/psparse-536)
[    7.181816] ACPI Exception: AE_ERROR, Error reading AC Adapter state (20150410/ac-132)
...
[    7.195069] ACPI: Battery Slot [BMBT] (battery present)
...
[    7.404271] i2c_designware 80860F41:03: i2c_dw_handle_tx_abort: lost arbitration
[    7.408430] dw_dmac INTL9C60:00: DesignWare DMA Controller, 8 channels
[    7.409119] dw_dmac INTL9C60:01: DesignWare DMA Controller, 8 channels


upower output is 

Device: /org/freedesktop/UPower/devices/battery_BMBT
  native-path:          BMBT
  vendor:               Intel SR 1
  model:                SR Real Battery
  serial:               123456789
  power supply:         yes
  updated:              Wednesday 24 June 2015 06:58:51 AM IST (13 seconds ago)
  has history:          yes
  has statistics:       yes
  battery
    present:             yes
    rechargeable:        yes
    state:               discharging
    warning-level:       none
    energy:              0 Wh
    energy-empty:        0 Wh
    energy-full:         0 Wh
    energy-full-design:  0 Wh
    energy-rate:         0 W
    percentage:          100%
    capacity:            100%
    technology:          lithium-ion
    icon-name:          'battery-full-symbolic'

Device: /org/freedesktop/UPower/devices/DisplayDevice
  power supply:         yes
  updated:              Wednesday 24 June 2015 06:56:52 AM IST (132 seconds ago)
  has history:          no
  has statistics:       no
  battery
    present:             yes
    state:               discharging
    warning-level:       none
    energy:              0 Wh
    energy-full:         0 Wh
    energy-rate:         0 W
    percentage:          100%
    icon-name:          'battery-full-symbolic'

Daemon:
  daemon-version:  0.99.2
  on-battery:      yes
  lid-is-closed:   no
  lid-is-present:  yes
  critical-action: HybridSleep
Comment 1 Kevin 2015-06-24 04:31:35 UTC
Created attachment 180691 [details]
kernel config

Kernel Config used for 4.1
Comment 2 Kevin 2015-06-24 04:32:17 UTC
Created attachment 180701 [details]
dmidecode output
Comment 3 Kevin 2015-06-24 04:33:06 UTC
Created attachment 180711 [details]
DSDT Information

Decompiled DSDT
Comment 4 Aaron Lu 2015-06-24 08:38:07 UTC
From the dsdt,
Comment 5 Aaron Lu 2015-06-24 08:41:27 UTC
From the dsdt, a customized operation region BMOP is used and current Linux kernel doesn't support that, so ACPI battery and AC will not work.

The kernel does have separate drivers for XPower charger and battery(fuel gauge), I saw your config already has set CONFIG_AXP288_FUEL_GAUGE, but somehow it doesn't seem work. We probably need to figure out why that driver failed.

You can list the platform devices available on your system by:
$ ls /sys/bus/platform/devices
and then check if axp288_fuel_gauge is there and if it has a driver bound to it.
Comment 6 Kevin 2015-06-24 09:14:37 UTC
Created attachment 180771 [details]
directory list of sys

recursive directory listing of /sys folder
Comment 7 Kevin 2015-06-24 09:27:51 UTC
these are the devices available 

lrwxrwxrwx 1 root root 0 Jun 24 06:56 axp288_adc -> ../../../devices/platform/80860F41:04/i2c-4/i2c-INT33F4:00/axp288_adc
lrwxrwxrwx 1 root root 0 Jun 24 06:56 axp288_charger -> ../../../devices/platform/80860F41:04/i2c-4/i2c-INT33F4:00/axp288_charger
lrwxrwxrwx 1 root root 0 Jun 24 06:56 axp288_extcon -> ../../../devices/platform/80860F41:04/i2c-4/i2c-INT33F4:00/axp288_extcon
lrwxrwxrwx 1 root root 0 Jun 24 06:56 axp288_fuel_gauge -> ../../../devices/platform/80860F41:04/i2c-4/i2c-INT33F4:00/axp288_fuel_gauge
lrwxrwxrwx 1 root root 0 Jun 24 06:56 axp288_pmic_acpi -> ../../../devices/platform/80860F41:04/i2c-4/i2c-INT33F4:00/axp288_pmic_acpi

It seems that the axp288_fuel_guage is present , but only the axp288_adc provide a iio:device0 

/sys/devices/platform/80860F41:04/i2c-4/i2c-INT33F4:00/axp288_adc:

...
drwxr-xr-x 3 root root    0 Jun 24 06:56 iio:device0
...

interface whereby I could get

...
-rw-r--r-- 1 root root 4.0K Jun 24 06:59 in_current3_raw
-rw-r--r-- 1 root root 4.0K Jun 24 06:59 in_current4_raw
-rw-r--r-- 1 root root 4.0K Jun 24 06:59 in_temp0_raw
-rw-r--r-- 1 root root 4.0K Jun 24 06:59 in_temp1_raw
-rw-r--r-- 1 root root 4.0K Jun 24 06:59 in_temp2_raw
-rw-r--r-- 1 root root 4.0K Jun 24 06:59 in_voltage5_raw
...

No such device for axp288_fuel gauge
Comment 8 Aaron Lu 2015-06-25 02:47:39 UTC
So axp288_fuel_gauge doesn't probe properly, the only possible place its probe function could fail is that the platform device doesn't have platform_data set:
static int axp288_fuel_gauge_probe(struct platform_device *pdev)
{
        ... ...
        if (!info->pdata)
                return -ENODEV;
        ... ...
}

I have no idea where the pdata should be set(the parent driver axp20x doesn't set it), I'm adding the patch author Todd for more information. Todd, any ideas?

Oops, Todd isn't registered here, I'm trying Jacob now.
Comment 9 Aaron Lu 2015-06-25 02:55:57 UTC
I've also written an email with all of you CC-ed.
Comment 10 Kevin 2015-06-25 03:22:08 UTC
Is there any change in dsdt if the acpidump is taken inside windows using windows binaries? The one I've submitted here is the one I took when I had windows. Do you need me to dump the dsdt table from inside linux?
Comment 11 Aaron Lu 2015-06-25 06:03:06 UTC
It should be the same, but you can attach the whole dump if that's convenient for you instead of just dsdt:
# acpidump > acpidump.txt
Comment 12 Kevin 2015-06-25 17:52:13 UTC
Created attachment 180901 [details]
acpidump

Raw acpidump from the command inside linux
sudo acpidump > acpidump.txt
Comment 13 Laszlo Fiat 2015-07-02 16:57:42 UTC
Probably the same problem as in Bug 88471.
Comment 14 Aaron Lu 2015-07-03 05:16:20 UTC
(In reply to Laszlo Fiat from comment #13)
> Probably the same problem as in Bug 88471.

Agreed, both systems are using AXP288 PMIC. We should mark one of them to be duplicate.
Comment 15 Aaron Lu 2015-07-06 02:54:52 UTC

*** This bug has been marked as a duplicate of bug 88471 ***

Note You need to log in before you can comment on or make changes to this bug.