Hi Imre

This is great information. Thank you!

My device have an emmc chip on the pcb (non-removable).
Have you tested you code on that kind of system?

Current unmodified FreeBSD can detect the sdhci_pci controller and a mmc
card on slot0 but timeouts when trying to init the mmc. Not sure why it is
failing. I assumed it needed activating through some gpios but maybe it's
not that easy..

On Mon, Jun 13, 2016 at 2:38 AM, Imre Vadasz <i...@vdsz.com> wrote:

> 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

CONFIDENTIALITY NOTE: The information in this email is confidential
and intended solely for the addressee.
Disclosure, copying, distribution or any other action of use of this
email by person other than intended recipient, is prohibited.
If you are not the intended recipient and have received this email in
error, please destroy the original message.
freebsd-current@freebsd.org mailing list
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to