Re: GPIO driver for Intel Atom SoC

From: Imre Vadasz <imre_at_vdsz.com>
Date: Mon, 13 Jun 2016 11:38:57 +0200
Hi,

Microsoft has some documentation on GPIO handling with SD card controllers,
which should apply to most Cherryview devices:
    https://msdn.microsoft.com/windows/hardware/drivers/bringup/other-acpi-namespace-objects#sd

I did some work on Cherryview SoC support in DragonFlyBSD.
In DragonFly master, there is a simple GPIO driver for cherryview in
/sys/bus/gpio/gpio_intel. In master, it's currently only used for
handling the ACPI GeneralPurposeIo operation regions, and
Acpi-Event-Interrupts (which replace GPE interrupts on reduced-hardware
platforms).

I have some further (more prototype level) code which also contains some
code for Intel sdhci controller integration:
    https://gitweb.dragonflybsd.org/~ivadasz/dragonfly.git/shortlog/refs/heads/cherryview

With this branch everything sdcard/eMMC related works quite nicely, e.g.
it properly handles plugging in/out the sd-card on my HP X2 210 detachable
on DragonFlyBSD.

To handle everything properly this contains a bit of work on mostly ACPI
related stuff:

ACPI device initialization order needs to be according to the ACPI _DEP methods:
    https://gitweb.dragonflybsd.org/~ivadasz/dragonfly.git/commitdiff/25dec08cafa3ce9089eb5b216700f4e678b3356d

We need to map ACPI nodes to the device objects (and at least track a
reference count for debugging):
    https://gitweb.dragonflybsd.org/~ivadasz/dragonfly.git/commitdiff/23135590ffb33b40f170c786ea95fc133358ebdb

Then some kind of API is needed for handling the GeneralPurposeIo resources
declared for the device in the ACPI tables (e.g. the sdhci controller).
(i.e. some way of attempting to "map" the resource from the device driver):
    https://gitweb.dragonflybsd.org/~ivadasz/dragonfly.git/commitdiff/d5b3d3447bbdd42a68359aebd61f271bfa830951

And I have a prototype of adapting the sdhci driver to handle the GPIO
ACPI resources, as described in "https://msdn.microsoft.com/windows/hardware/drivers/bringup/other-acpi-namespace-objects#sd":
    https://gitweb.dragonflybsd.org/~ivadasz/dragonfly.git/commitdiff/5d2844c280211cbb256a5ecc3ea27f952149e452

Regards,
Imre Vadász
Received on Mon Jun 13 2016 - 07:39:11 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:05 UTC