Microsoft has some documentation on GPIO handling with SD card controllers,
which should apply to most Cherryview devices:

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

I have some further (more prototype level) code which also contains some
code for Intel sdhci controller integration:

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:

We need to map ACPI nodes to the device objects (and at least track a
reference count for debugging):

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):

And I have a prototype of adapting the sdhci driver to handle the GPIO
ACPI resources, as described in 

Imre Vadász
freebsd-current@freebsd.org mailing list
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to