Re: [PATCH v5 0/2] Add device driver for APU2/APU3 GPIOs

From: Florian Eckert
Date: Tue Dec 04 2018 - 04:58:28 EST


>> Yes i will fix your hints tomorrow and send a v6 of my patchset.
>> Thank you for your hints and time
>> It would be nice if you could fix ACPI problemmatik.
>
> I would like to see the ACPI dump for that...

See https://github.com/openwrt/openwrt/pull/1232#issuecomment-443224576
In this comment MichaÅ Åygowski appended to this thread the missing
files you want to have.

So, let me clarify what we have:
- some platforms are in the wild with old BIOS with broken ACPI tables

correct

- you still may fix the things for new BIOS version for all affected platforms

I have seen that this is a lot of work and I didn't think it was so complicated!
To get the GPIO support for APU2/APU3 merged into the gpio subsystem.
I am little confused what i should do now. By the way I only have one board (APU3).

- you need to support both

That is not necessary from my point of view. I am fine if the driver supports at least
the current BIOS version. And if the coreboot maintainer fixes the ACPI problem
then we could extend the driver and add the ACPI stuff.
But this not in my hand, right?

For broken firmware you need to do the following:
- create an MFD driver, which would instantiate GPIO and GPIO keys
support (at least)
- create one of each above drivers w/o any DMI crap (should be done
as a part of MFD driver)

I will have a look how to achieve this.
If we want to support all BIOS version.
And is a must have to get the driver into mainline.

For fixed BIOS you need to add the following (example, not a fully
correct solution) at the level behind SB:

I do not understand how I could fix this. I have no idea from ACPI.
I have not found any driver where I can inspire myself.


Scope (SB)
{
Device(GPIO)
{

After updating firmware you would need just an ACPI ID table to be
added to the GPIO driver. MFD driver should not be enumerated at all.

That's maybe coming next when the coreboot maintainers have their bios fixed, right?