Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Jun 2016 11:24:58 -0700
From:      "Lundberg, Johannes" <johannes@brilliantservice.co.jp>
To:        Imre Vadasz <imre@vdsz.com>
Cc:        FreeBSD Current <freebsd-current@freebsd.org>, Lundberg@polaris.intra.vdsz.de
Subject:   Re: GPIO driver for Intel Atom SoC
Message-ID:  <CAASDrVnoNKfc5MisM3VnH6GsB5K6W7j5Wb1g78QsQoP0JCc%2Bdg@mail.gmail.com>
In-Reply-To: <20160613093857.GA157051@polaris.intra.vdsz.de>
References:  <20160613093857.GA157051@polaris.intra.vdsz.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <imre@vdsz.com> wrote:

> Hi,
>
> Microsoft has some documentation on GPIO handling with SD card controller=
s,
> which should apply to most Cherryview devices:
>
> https://msdn.microsoft.com/windows/hardware/drivers/bringup/other-acpi-na=
mespace-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/head=
s/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 detachabl=
e
> 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/25dec08=
cafa3ce9089eb5b216700f4e678b3356d
>
> 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/2313559=
0ffb33b40f170c786ea95fc133358ebdb
>
> Then some kind of API is needed for handling the GeneralPurposeIo resourc=
es
> 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/d5b3d34=
47bbdd42a68359aebd61f271bfa830951
>
> 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-na=
mespace-objects#sd
> ":
>
> https://gitweb.dragonflybsd.org/~ivadasz/dragonfly.git/commitdiff/5d2844c=
280211cbb256a5ecc3ea27f952149e452
>
> Regards,
> Imre Vad=C3=A1sz
>

--=20
=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D=
-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-
=E7=A7=98=E5=AF=86=E4=BF=9D=E6=8C=81=E3=81=AB=E3=81=A4=E3=81=84=E3=81=A6=EF=
=BC=9A=E3=81=93=E3=81=AE=E9=9B=BB=E5=AD=90=E3=83=A1=E3=83=BC=E3=83=AB=E3=81=
=AF=E3=80=81=E5=90=8D=E5=AE=9B=E4=BA=BA=E3=81=AB=E9=80=81=E4=BF=A1=E3=81=97=
=E3=81=9F=E3=82=82=E3=81=AE=E3=81=A7=E3=81=82=E3=82=8A=E3=80=81=E7=A7=98=E5=
=8C=BF=E7=89=B9=E6=A8=A9=E3=81=AE=E5=AF=BE=E8=B1=A1=E3=81=A8=E3=81=AA=E3=82=
=8B=E6=83=85=E5=A0=B1=E3=82=92=E5=90=AB=E3=82=93=E3=81=A7=E3=81=84=E3=81=BE=
=E3=81=99=E3=80=82
=E3=82=82=E3=81=97=E3=80=81=E5=90=8D=E5=AE=9B=E4=BA=BA=E4=BB=A5=E5=A4=96=E3=
=81=AE=E6=96=B9=E3=81=8C=E5=8F=97=E4=BF=A1=E3=81=95=E3=82=8C=E3=81=9F=E5=A0=
=B4=E5=90=88=E3=80=81=E3=81=93=E3=81=AE=E3=83=A1=E3=83=BC=E3=83=AB=E3=81=AE=
=E7=A0=B4=E6=A3=84=E3=80=81=E3=81=8A=E3=82=88=E3=81=B3=E3=81=93=E3=81=AE=E3=
=83=A1=E3=83=BC=E3=83=AB=E3=81=AB=E9=96=A2=E3=81=99=E3=82=8B=E4=B8=80=E5=88=
=87=E3=81=AE=E9=96=8B=E7=A4=BA=E3=80=81
=E8=A4=87=E5=86=99=E3=80=81=E9=85=8D=E5=B8=83=E3=80=81=E3=81=9D=E3=81=AE=E4=
=BB=96=E3=81=AE=E5=88=A9=E7=94=A8=E3=80=81=E3=81=BE=E3=81=9F=E3=81=AF=E8=A8=
=98=E8=BC=89=E5=86=85=E5=AE=B9=E3=81=AB=E5=9F=BA=E3=81=A5=E3=81=8F=E3=81=84=
=E3=81=8B=E3=81=AA=E3=82=8B=E8=A1=8C=E5=8B=95=E3=82=82=E3=81=95=E3=82=8C=E3=
=81=AA=E3=81=84=E3=82=88=E3=81=86=E3=81=8A=E9=A1=98=E3=81=84=E7=94=B3=E3=81=
=97=E4=B8=8A=E3=81=92=E3=81=BE=E3=81=99=E3=80=82
---
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAASDrVnoNKfc5MisM3VnH6GsB5K6W7j5Wb1g78QsQoP0JCc%2Bdg>