All of lore.kernel.org
 help / color / mirror / Atom feed
* Apollo Lake GPIO driver with Coreboot/U-Boot
@ 2020-01-15 13:55 Wolfgang Wallner
  2020-01-16  0:10 ` Simon Glass
  2020-01-17 11:56 ` Antwort: " Wolfgang Wallner
  0 siblings, 2 replies; 6+ messages in thread
From: Wolfgang Wallner @ 2020-01-15 13:55 UTC (permalink / raw)
  To: u-boot

Hello Simon, Bin, all,

I have an Apollo Lake based device, where U-Boot is booted as a Coreboot
payload. I would like to utilize the Apollo Lake GPIO driver
(drivers/gpio/intel_gpio.c), but I struggle with the dependencies.

For my use case, I face 2 obstacles:

  1) Some required drivers are not built

    The Apollo Lake GPIO driver requires the P2SB and ITSS drivers, but those
    are located in arch/x86/cpu/apollolake. Drivers in this directory are not
    included in my build as it builds for Coreboot, not for Apollo Lake.

  2) Some header files are not found

    The header files gpio.h and itss.h are located in
    arch/x86/include/asm/arch-apollolake, but as I build for Coreboot the
    symlink arch/x86/include/asm/arch points to arch-coreboot instead of
    arch-apollolake, so those header files are not found.

Does anyone have recommendations on how to solve those issues?
Would it be possible to move the drivers for P2SB and ITSS out of
arch/x86/cpu/apollolake to the generic drivers/ directory?

regards, Wolfgang

PS: Thanks Simon for providing the initial support for Apollo Lake!

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Apollo Lake GPIO driver with Coreboot/U-Boot
  2020-01-15 13:55 Apollo Lake GPIO driver with Coreboot/U-Boot Wolfgang Wallner
@ 2020-01-16  0:10 ` Simon Glass
  2020-01-17 11:56 ` Antwort: " Wolfgang Wallner
  1 sibling, 0 replies; 6+ messages in thread
From: Simon Glass @ 2020-01-16  0:10 UTC (permalink / raw)
  To: u-boot

Hi Wolfgang,

On Thu, 16 Jan 2020 at 02:55, Wolfgang Wallner
<wolfgang.wallner@br-automation.com> wrote:
>
> Hello Simon, Bin, all,
>
> I have an Apollo Lake based device, where U-Boot is booted as a Coreboot
> payload. I would like to utilize the Apollo Lake GPIO driver
> (drivers/gpio/intel_gpio.c), but I struggle with the dependencies.
>
> For my use case, I face 2 obstacles:
>
>   1) Some required drivers are not built
>
>     The Apollo Lake GPIO driver requires the P2SB and ITSS drivers, but those
>     are located in arch/x86/cpu/apollolake. Drivers in this directory are not
>     included in my build as it builds for Coreboot, not for Apollo Lake.
>
>   2) Some header files are not found
>
>     The header files gpio.h and itss.h are located in
>     arch/x86/include/asm/arch-apollolake, but as I build for Coreboot the
>     symlink arch/x86/include/asm/arch points to arch-coreboot instead of
>     arch-apollolake, so those header files are not found.
>
> Does anyone have recommendations on how to solve those issues?
> Would it be possible to move the drivers for P2SB and ITSS out of
> arch/x86/cpu/apollolake to the generic drivers/ directory?

I don't have any great ideas. At present we rely on the device tree to
bind these drivers but I suppose we could add the PCI IDs and then the
coreboot target could bind them.

I did send a series to add checks to skip low-level init as needed
when running from coreboot:

http://patchwork.ozlabs.org/project/uboot/list/?series=149993

>
> regards, Wolfgang
>
> PS: Thanks Simon for providing the initial support for Apollo Lake!

You're welcome. I'm expecting to have full ACPI support around the end
of the month.

Regards,
Simon

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Antwort: Re: Apollo Lake GPIO driver with Coreboot/U-Boot
  2020-01-15 13:55 Apollo Lake GPIO driver with Coreboot/U-Boot Wolfgang Wallner
  2020-01-16  0:10 ` Simon Glass
@ 2020-01-17 11:56 ` Wolfgang Wallner
  2020-01-19  7:39   ` Simon Glass
  2020-01-22 14:48   ` Antwort: Re: " Wolfgang Wallner
  1 sibling, 2 replies; 6+ messages in thread
From: Wolfgang Wallner @ 2020-01-17 11:56 UTC (permalink / raw)
  To: u-boot

Hello Simon, 
 
> -----"Simon Glass" <sjg@chromium.org> schrieb: -----
> On Thu, 16 Jan 2020 at 02:55, Wolfgang Wallner
> <wolfgang.wallner@br-automation.com> wrote:
> >
> > Hello Simon, Bin, all,
> >
> > I have an Apollo Lake based device, where U-Boot is booted as a Coreboot
> > payload. I would like to utilize the Apollo Lake GPIO driver
> > (drivers/gpio/intel_gpio.c), but I struggle with the dependencies.
> >
> > For my use case, I face 2 obstacles:
> >
> >   1) Some required drivers are not built
> >
> >     The Apollo Lake GPIO driver requires the P2SB and ITSS drivers, but those
> >     are located in arch/x86/cpu/apollolake. Drivers in this directory are not
> >     included in my build as it builds for Coreboot, not for Apollo Lake.
> >
> >   2) Some header files are not found
> >
> >     The header files gpio.h and itss.h are located in
> >     arch/x86/include/asm/arch-apollolake, but as I build for Coreboot the
> >     symlink arch/x86/include/asm/arch points to arch-coreboot instead of
> >     arch-apollolake, so those header files are not found.
> >
> > Does anyone have recommendations on how to solve those issues?
> > Would it be possible to move the drivers for P2SB and ITSS out of
> > arch/x86/cpu/apollolake to the generic drivers/ directory?
> 
> I don't have any great ideas. At present we rely on the device tree to
> bind these drivers but I suppose we could add the PCI IDs and then the
> coreboot target could bind them.

I have added the relevant entries in my device tree, the point is that the
required drivers are not even built, because they are located in the
Apollo Lake directory. This is why I asked wheter we could move them to the
generic drivers directory. (This could also make sense IMHO as they are not
specific for Apollo Lake, but could be used for mulitple generations of chips)

Also the header files are not found during compilation, as the symlink for
"arch" points to "arch-coreboot" in my case, not to "arch-apollolake" where
the header files are located.

At the moment I have modified the build system so taht the drivers are
compiled for my setup. This works, and the drivers are correctly bound
according to the device tree entries. But this is just a hack, not a proper
solution.

> I did send a series to add checks to skip low-level init as needed
> when running from coreboot:
> 
> http://patchwork.ozlabs.org/project/uboot/list/?series=149993

Thanks for pointing that out, I have missed it on the mailing list.
I will have a look at them.

Btw, did you see my patches regarding fixes for Apollo Lake GPIO and SPI?

GPIO:   https://patchwork.ozlabs.org/patch/1220857/
SPI:    https://patchwork.ozlabs.org/patch/1222779/

> You're welcome. I'm expecting to have full ACPI support around the end
> of the month.

If I can help by testing I would be interested.
What is the current state? What is still missing?

regards, Wolfgang

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Apollo Lake GPIO driver with Coreboot/U-Boot
  2020-01-17 11:56 ` Antwort: " Wolfgang Wallner
@ 2020-01-19  7:39   ` Simon Glass
  2020-01-22 14:48   ` Antwort: Re: " Wolfgang Wallner
  1 sibling, 0 replies; 6+ messages in thread
From: Simon Glass @ 2020-01-19  7:39 UTC (permalink / raw)
  To: u-boot

Hi Wolfgang,

On Sat, 18 Jan 2020 at 00:56, Wolfgang Wallner
<wolfgang.wallner@br-automation.com> wrote:
>
> Hello Simon,
>
> > -----"Simon Glass" <sjg@chromium.org> schrieb: -----
> > On Thu, 16 Jan 2020 at 02:55, Wolfgang Wallner
> > <wolfgang.wallner@br-automation.com> wrote:
> > >
> > > Hello Simon, Bin, all,
> > >
> > > I have an Apollo Lake based device, where U-Boot is booted as a Coreboot
> > > payload. I would like to utilize the Apollo Lake GPIO driver
> > > (drivers/gpio/intel_gpio.c), but I struggle with the dependencies.
> > >
> > > For my use case, I face 2 obstacles:
> > >
> > >   1) Some required drivers are not built
> > >
> > >     The Apollo Lake GPIO driver requires the P2SB and ITSS drivers, but those
> > >     are located in arch/x86/cpu/apollolake. Drivers in this directory are not
> > >     included in my build as it builds for Coreboot, not for Apollo Lake.
> > >
> > >   2) Some header files are not found
> > >
> > >     The header files gpio.h and itss.h are located in
> > >     arch/x86/include/asm/arch-apollolake, but as I build for Coreboot the
> > >     symlink arch/x86/include/asm/arch points to arch-coreboot instead of
> > >     arch-apollolake, so those header files are not found.
> > >
> > > Does anyone have recommendations on how to solve those issues?
> > > Would it be possible to move the drivers for P2SB and ITSS out of
> > > arch/x86/cpu/apollolake to the generic drivers/ directory?
> >
> > I don't have any great ideas. At present we rely on the device tree to
> > bind these drivers but I suppose we could add the PCI IDs and then the
> > coreboot target could bind them.
>
> I have added the relevant entries in my device tree, the point is that the
> required drivers are not even built, because they are located in the
> Apollo Lake directory. This is why I asked wheter we could move them to the
> generic drivers directory. (This could also make sense IMHO as they are not
> specific for Apollo Lake, but could be used for mulitple generations of chips)

Yes that sounds OK to me.

>
> Also the header files are not found during compilation, as the symlink for
> "arch" points to "arch-coreboot" in my case, not to "arch-apollolake" where
> the header files are located.
>
> At the moment I have modified the build system so taht the drivers are
> compiled for my setup. This works, and the drivers are correctly bound
> according to the device tree entries. But this is just a hack, not a proper
> solution.
>
> > I did send a series to add checks to skip low-level init as needed
> > when running from coreboot:
> >
> > http://patchwork.ozlabs.org/project/uboot/list/?series=149993
>
> Thanks for pointing that out, I have missed it on the mailing list.
> I will have a look at them.
>
> Btw, did you see my patches regarding fixes for Apollo Lake GPIO and SPI?
>
> GPIO:   https://patchwork.ozlabs.org/patch/1220857/
> SPI:    https://patchwork.ozlabs.org/patch/1222779/

Yes looks good. Will review.

>
> > You're welcome. I'm expecting to have full ACPI support around the end
> > of the month.
>
> If I can help by testing I would be interested.
> What is the current state? What is still missing?

The current state as of early January is that the ACPI tables for
Coral are complete with the possible exception of USB. It builds and
boots Linux but there is a lot of cleaning up to do. I've created some
rough commits - see u-boot-dm/acpi-working

There are about 40 commits left to clean up. I still expect to have
this done around the end of January.

Regards,
Simon

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Antwort: Re: Re: Apollo Lake GPIO driver with Coreboot/U-Boot
  2020-01-17 11:56 ` Antwort: " Wolfgang Wallner
  2020-01-19  7:39   ` Simon Glass
@ 2020-01-22 14:48   ` Wolfgang Wallner
  2020-01-30  2:17     ` Simon Glass
  1 sibling, 1 reply; 6+ messages in thread
From: Wolfgang Wallner @ 2020-01-22 14:48 UTC (permalink / raw)
  To: u-boot

Hi Simon,

> Hi Wolfgang,
> 
> On Sat, 18 Jan 2020 at 00:56, Wolfgang Wallner
> <wolfgang.wallner@br-automation.com> wrote:
> >
> > Hello Simon,
> >
> > > -----"Simon Glass" <sjg@chromium.org> schrieb: -----
> > > On Thu, 16 Jan 2020 at 02:55, Wolfgang Wallner
> > > <wolfgang.wallner@br-automation.com> wrote:
> > > >
> > > > Hello Simon, Bin, all,
> > > >
> > > > I have an Apollo Lake based device, where U-Boot is booted as a Coreboot
> > > > payload. I would like to utilize the Apollo Lake GPIO driver
> > > > (drivers/gpio/intel_gpio.c), but I struggle with the dependencies.
> > > >
> > > > For my use case, I face 2 obstacles:
> > > >
> > > >   1) Some required drivers are not built
> > > >
> > > >     The Apollo Lake GPIO driver requires the P2SB and ITSS drivers, but those
> > > >     are located in arch/x86/cpu/apollolake. Drivers in this directory are not
> > > >     included in my build as it builds for Coreboot, not for Apollo Lake.
> > > >
> > > >   2) Some header files are not found
> > > >
> > > >     The header files gpio.h and itss.h are located in
> > > >     arch/x86/include/asm/arch-apollolake, but as I build for Coreboot the
> > > >     symlink arch/x86/include/asm/arch points to arch-coreboot instead of
> > > >     arch-apollolake, so those header files are not found.
> > > >
> > > > Does anyone have recommendations on how to solve those issues?
> > > > Would it be possible to move the drivers for P2SB and ITSS out of
> > > > arch/x86/cpu/apollolake to the generic drivers/ directory?
> > >
> > > I don't have any great ideas. At present we rely on the device tree to
> > > bind these drivers but I suppose we could add the PCI IDs and then the
> > > coreboot target could bind them.
> >
> > I have added the relevant entries in my device tree, the point is that the
> > required drivers are not even built, because they are located in the
> > Apollo Lake directory. This is why I asked wheter we could move them to the
> > generic drivers directory. (This could also make sense IMHO as they are not
> > specific for Apollo Lake, but could be used for mulitple generations of chips)
> 
> Yes that sounds OK to me.

Ok, thanks for the feedback.
As a first step, I will send a patch series to move the ITSS driver to a
more common location within arch/x86.

regards, Wolfgang

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Apollo Lake GPIO driver with Coreboot/U-Boot
  2020-01-22 14:48   ` Antwort: Re: " Wolfgang Wallner
@ 2020-01-30  2:17     ` Simon Glass
  0 siblings, 0 replies; 6+ messages in thread
From: Simon Glass @ 2020-01-30  2:17 UTC (permalink / raw)
  To: u-boot

Hi Wolfgang,

On Wed, 22 Jan 2020 at 07:48, Wolfgang Wallner
<wolfgang.wallner@br-automation.com> wrote:
>
> Hi Simon,
>
> > Hi Wolfgang,
> >
> > On Sat, 18 Jan 2020 at 00:56, Wolfgang Wallner
> > <wolfgang.wallner@br-automation.com> wrote:
> > >
> > > Hello Simon,
> > >
> > > > -----"Simon Glass" <sjg@chromium.org> schrieb: -----
> > > > On Thu, 16 Jan 2020 at 02:55, Wolfgang Wallner
> > > > <wolfgang.wallner@br-automation.com> wrote:
> > > > >
> > > > > Hello Simon, Bin, all,
> > > > >
> > > > > I have an Apollo Lake based device, where U-Boot is booted as a Coreboot
> > > > > payload. I would like to utilize the Apollo Lake GPIO driver
> > > > > (drivers/gpio/intel_gpio.c), but I struggle with the dependencies.
> > > > >
> > > > > For my use case, I face 2 obstacles:
> > > > >
> > > > >   1) Some required drivers are not built
> > > > >
> > > > >     The Apollo Lake GPIO driver requires the P2SB and ITSS drivers, but those
> > > > >     are located in arch/x86/cpu/apollolake. Drivers in this directory are not
> > > > >     included in my build as it builds for Coreboot, not for Apollo Lake.
> > > > >
> > > > >   2) Some header files are not found
> > > > >
> > > > >     The header files gpio.h and itss.h are located in
> > > > >     arch/x86/include/asm/arch-apollolake, but as I build for Coreboot the
> > > > >     symlink arch/x86/include/asm/arch points to arch-coreboot instead of
> > > > >     arch-apollolake, so those header files are not found.
> > > > >
> > > > > Does anyone have recommendations on how to solve those issues?
> > > > > Would it be possible to move the drivers for P2SB and ITSS out of
> > > > > arch/x86/cpu/apollolake to the generic drivers/ directory?
> > > >
> > > > I don't have any great ideas. At present we rely on the device tree to
> > > > bind these drivers but I suppose we could add the PCI IDs and then the
> > > > coreboot target could bind them.
> > >
> > > I have added the relevant entries in my device tree, the point is that the
> > > required drivers are not even built, because they are located in the
> > > Apollo Lake directory. This is why I asked wheter we could move them to the
> > > generic drivers directory. (This could also make sense IMHO as they are not
> > > specific for Apollo Lake, but could be used for mulitple generations of chips)
> >
> > Yes that sounds OK to me.
>
> Ok, thanks for the feedback.
> As a first step, I will send a patch series to move the ITSS driver to a
> more common location within arch/x86.

I've sent out the acpi series, available at u-boot-dm/coral-working

Regards,
Simon

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-01-30  2:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-15 13:55 Apollo Lake GPIO driver with Coreboot/U-Boot Wolfgang Wallner
2020-01-16  0:10 ` Simon Glass
2020-01-17 11:56 ` Antwort: " Wolfgang Wallner
2020-01-19  7:39   ` Simon Glass
2020-01-22 14:48   ` Antwort: Re: " Wolfgang Wallner
2020-01-30  2:17     ` Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.