lkml.org 
[lkml]   [2017]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Cherryview wake up events
On Thu, Feb 02, 2017 at 02:16:39PM +0200, Mika Westerberg wrote:
> On Thu, Feb 02, 2017 at 01:35:08PM +0200, Mika Westerberg wrote:
> > On Thu, Feb 02, 2017 at 12:12:22PM +0100, Johannes Stezenbach wrote:
> > > On Thu, Feb 02, 2017 at 12:31:22PM +0200, Mika Westerberg wrote:
> > > > On Thu, Feb 02, 2017 at 10:52:00AM +0100, Johannes Stezenbach wrote:
> > > > > OperationRegion (GPOP, GeneralPurposeIo, Zero, 0x0100)
> > > > > Field (GPOP, ByteAcc, NoLock, Preserve)
> > > > > {
> > > > > Connection (
> > > > > GpioIo (Exclusive, PullDefault, 0x0000, 0x0000, IoRestrictionOutputOnly,
> > > > > "\\_SB.PCI0.I2C7.PMI2", 0x00, ResourceConsumer, ,
> > > > > )
> > > > > { // Pin list
> > > > > 0x0020
> > > > > }
> > > > > ),
> > > > > GMP0, 1,
> > > > > ...
> > > > > (repeat for many more pins)
> > > > >
> > > > > I guess it means it uses chv_gpio pins and can't work
> > > > > if the GPIO opregion is not registered?
> > > >
> > > > That is using GPIO pins of the PMI2 device - the PMIC GPIO driver, I
> > > > suppose.
> > > >
> > > > So in addition to the PMIC MFD driver, you need to have a GPIO driver
> > > > for Dollar Cove (I guess the quilt patch series included that as well?).
> > >
> > > Nope, I see it for AX288 but didn't find it for TI DCove. And in
> > > current Linus' tree axp288_cells[] doesn't include gpio so
> > > I concluded it's not needed... what am I missing?
> >
> > So reading your DSDT there is that GPIO button array device \_SB.TBAD
> > which has one GpioInt() referencing \_SB.PCI0.I2C7.PMI2. I suppose that
> > is the power button GPIO.
> >
> > In order to use that there needs to be a GPIO driver exposing those
> > GPIOs to other drivers. So it is definitely needed.
>
> Actually, looking again the patches you found:
>
> https://github.com/01org/ProductionKernelQuilts/blob/master/uefi/cht-m1stable/patches/mfd-intel_soc_pmic-add-TI-variant-of-dollar-cove.patch
> https://github.com/01org/ProductionKernelQuilts/blob/master/uefi/cht-m1stable/patches/PWRBTN-add-driver-for-TI-PMIC.patch
>
> Did you try to them both? The latter seems to handle the power button
> by talking directly with the PMIC (instead of using a GPIO).

Nope, as I've written earlier:
> In ProductionKernelQuilts I found
> DC-TI-PMIC-disable-power-button-support.patch so I guess it
> might not be needed because it's probably handled by ACPI.

[ +0.000338] input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input0
[ +0.000127] ACPI: Power Button [PWRB]
...
[ +0.000248] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input3
[ +0.000116] ACPI: Power Button [PWRF]

And I also have:

[ +0.000004] soc_button_array INTCFD9:00: GPIO lookup for consumer soc_button_array
[ +0.000002] soc_button_array INTCFD9:00: using ACPI for GPIO lookup
[ +0.000003] acpi INTCFD9:00: GPIO: looking up soc_button_array-gpios
[ +0.000004] acpi INTCFD9:00: GPIO: looking up soc_button_array-gpio
[ +0.000003] acpi INTCFD9:00: GPIO: looking up 0 in _CRS
[ +0.000610] soc_button_array INTCFD9:00: lookup for GPIO soc_button_array failed
(repeats for 5 buttons, one of them should succeed)

> Let's include the original author (Ramakrishna) as well if we could get
> some information from him.

Looking at 0002-GPIO-Adding-AXP288-PMIC-GPIO-driver.patch from ProductionKernelQuilts,
it doesn't seem hard to do the same for the TI PMIC, but it needs information
from the PMIC datasheet for irq and gpio control registers.
Hopefully you have a patch or at least could provide the information.


Thanks,
Johannes

\
 
 \ /
  Last update: 2017-02-02 14:54    [W:0.512 / U:1.528 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site