mbox series

[v3,00/17] x86: coral: Add support for Cr50

Message ID 20200205020328.193225-1-sjg@chromium.org
Headers show
Series x86: coral: Add support for Cr50 | expand

Message

Simon Glass Feb. 5, 2020, 2:03 a.m. UTC
This series adds a driver for the Cr50 security chip and enables it on
coral. This supports the 'tpm' command.

In order to make this work a few other changes are included:
- Additional UCLASS_IRQ operations to support requesting and reading
  interrupts, using the device tree
- A driver for ACPI general-purpose events

There are also a few small clean-ups to the recently landed Apollo Lake
support.

This series relies on this patch:

   http://patchwork.ozlabs.org/patch/1214541/

Changes in v3:
- Fix 'devuce' typo
- s/@tpm/@dev/ in function comments
- Use log_debug() instead of debug()
- Fix 'consceivably' typo
- Rewrite comment for claim_locality()
- Shorten comment in cr50_i2c_wait_tpm_ready() to fit on one line

Changes in v2:
- Add new patch to allow iterating devices without uclass_get()
- Add new patch to find a device by drvdata
- Add new patch to change syscon to use helper function
- Add new patch to change tegra driver to use helper function
- Move intel-clock.h inclusion to the correct patch
- Move 'success' comment into this patch
- Update to use the new DM helper function
- Move 'success' comment into previous patch
- Move intel-clock.h inclusion to the correct patch
- Significant rewrite of cr50 init procedure
- Support use of interrupts
- Update the commit message
- Add new patches to handle requesting interrupts and interrupt state

Simon Glass (17):
  dm: core: Allow iterating devices without uclass_get()
  dm: core: Add a function to find a device by drvdata
  dm: core: Change syscon to use helper function
  tegra: i2c: Change driver to use helper function
  x86: Add a clock driver for Intel devices
  x86: apl: Use the clock driver
  x86: apl: Drop the I2C config in FSP-S
  x86: coral: Update i2c and rtc status
  dm: irq: Add support for interrupt controller types
  x86: Give each driver an IRQ type
  x86: itss: Add of-platdata support
  dm: irq: Add support for requesting interrupts
  x86: Add support for ACPI general-purpose events
  x86: coral: Add I2C and TPM device-tree definitions
  tpm: Add more TPM2 definitions
  tpm: Add a driver for H1/Cr50
  x86: coral: Enable TPM

 arch/sandbox/dts/test.dts                     |   5 +-
 arch/sandbox/include/asm/test.h               |   4 +
 arch/x86/Kconfig                              |  33 +
 arch/x86/cpu/Makefile                         |   1 +
 arch/x86/cpu/acpi_gpe.c                       |  85 +++
 arch/x86/cpu/apollolake/Kconfig               |   4 +
 arch/x86/cpu/apollolake/fsp_s.c               |  62 +-
 arch/x86/cpu/i386/interrupt.c                 |   3 +-
 arch/x86/cpu/intel_common/itss.c              |  12 +-
 arch/x86/cpu/irq.c                            |   3 +-
 arch/x86/dts/chromebook_coral.dts             |  93 +++
 configs/chromebook_coral_defconfig            |   3 +-
 doc/board/google/chromebook_coral.rst         |   2 -
 .../interrupt-controller/intel,acpi-gpe.txt   |  30 +
 .../interrupt-controller/interrupts.txt       | 131 ++++
 drivers/clk/Kconfig                           |  10 +
 drivers/clk/Makefile                          |   1 +
 drivers/clk/intel/Makefile                    |   6 +
 drivers/clk/intel/clk_intel.c                 |  41 ++
 drivers/core/syscon-uclass.c                  |  15 +-
 drivers/core/uclass.c                         |  17 +
 drivers/i2c/tegra_i2c.c                       |  13 +-
 drivers/misc/irq-uclass.c                     | 131 +++-
 drivers/misc/irq_sandbox.c                    |  43 +-
 drivers/pinctrl/intel/pinctrl.c               |   2 +-
 drivers/tpm/Kconfig                           |  10 +
 drivers/tpm/Makefile                          |   1 +
 drivers/tpm/cr50_i2c.c                        | 659 ++++++++++++++++++
 include/dm/test.h                             |   2 +
 include/dm/uclass.h                           |  31 +
 include/dt-bindings/clock/intel-clock.h       |  15 +
 include/irq.h                                 | 138 ++++
 include/tpm-v2.h                              |  31 +
 test/dm/irq.c                                 |  45 ++
 test/dm/test-fdt.c                            |  42 ++
 35 files changed, 1631 insertions(+), 93 deletions(-)
 create mode 100644 arch/x86/cpu/acpi_gpe.c
 create mode 100644 doc/device-tree-bindings/interrupt-controller/intel,acpi-gpe.txt
 create mode 100644 doc/device-tree-bindings/interrupt-controller/interrupts.txt
 create mode 100644 drivers/clk/intel/Makefile
 create mode 100644 drivers/clk/intel/clk_intel.c
 create mode 100644 drivers/tpm/cr50_i2c.c
 create mode 100644 include/dt-bindings/clock/intel-clock.h

Comments

Bin Meng Feb. 6, 2020, 6:22 a.m. UTC | #1
Hi Simon,

On Wed, Feb 5, 2020 at 10:03 AM Simon Glass <sjg at chromium.org> wrote:
>
> This series adds a driver for the Cr50 security chip and enables it on
> coral. This supports the 'tpm' command.
>
> In order to make this work a few other changes are included:
> - Additional UCLASS_IRQ operations to support requesting and reading
>   interrupts, using the device tree
> - A driver for ACPI general-purpose events
>
> There are also a few small clean-ups to the recently landed Apollo Lake
> support.
>
> This series relies on this patch:
>
>    http://patchwork.ozlabs.org/patch/1214541/
>

This series does not apply on top of u-boot-x86/master:

Applying: x86: apl: Use the clock driver
error: patch failed: arch/x86/cpu/apollolake/Kconfig:40
error: arch/x86/cpu/apollolake/Kconfig: patch does not apply
Patch failed at 0006 x86: apl: Use the clock driver

I tried to apply it on top of an old commit and got no luck.

Would you please rebase this series against u-boot-x86/master and resend?

Regards,
Bin
Simon Glass Feb. 6, 2020, 4:55 p.m. UTC | #2
Hi Bin,

On Wed, 5 Feb 2020 at 23:22, Bin Meng <bmeng.cn at gmail.com> wrote:
>
> Hi Simon,
>
> On Wed, Feb 5, 2020 at 10:03 AM Simon Glass <sjg at chromium.org> wrote:
> >
> > This series adds a driver for the Cr50 security chip and enables it on
> > coral. This supports the 'tpm' command.
> >
> > In order to make this work a few other changes are included:
> > - Additional UCLASS_IRQ operations to support requesting and reading
> >   interrupts, using the device tree
> > - A driver for ACPI general-purpose events
> >
> > There are also a few small clean-ups to the recently landed Apollo Lake
> > support.
> >
> > This series relies on this patch:
> >
> >    http://patchwork.ozlabs.org/patch/1214541/
> >
>
> This series does not apply on top of u-boot-x86/master:
>
> Applying: x86: apl: Use the clock driver
> error: patch failed: arch/x86/cpu/apollolake/Kconfig:40
> error: arch/x86/cpu/apollolake/Kconfig: patch does not apply
> Patch failed at 0006 x86: apl: Use the clock driver
>
> I tried to apply it on top of an old commit and got no luck.
>
> Would you please rebase this series against u-boot-x86/master and resend?

Yes, will do.

Any thoughts on the ACPI series? I need to rebase that as well.

Regards,
Simon
Bin Meng Feb. 7, 2020, 3:36 a.m. UTC | #3
Hi Simon,

On Fri, Feb 7, 2020 at 12:55 AM Simon Glass <sjg at chromium.org> wrote:
>
> Hi Bin,
>
> On Wed, 5 Feb 2020 at 23:22, Bin Meng <bmeng.cn at gmail.com> wrote:
> >
> > Hi Simon,
> >
> > On Wed, Feb 5, 2020 at 10:03 AM Simon Glass <sjg at chromium.org> wrote:
> > >
> > > This series adds a driver for the Cr50 security chip and enables it on
> > > coral. This supports the 'tpm' command.
> > >
> > > In order to make this work a few other changes are included:
> > > - Additional UCLASS_IRQ operations to support requesting and reading
> > >   interrupts, using the device tree
> > > - A driver for ACPI general-purpose events
> > >
> > > There are also a few small clean-ups to the recently landed Apollo Lake
> > > support.
> > >
> > > This series relies on this patch:
> > >
> > >    http://patchwork.ozlabs.org/patch/1214541/
> > >
> >
> > This series does not apply on top of u-boot-x86/master:
> >
> > Applying: x86: apl: Use the clock driver
> > error: patch failed: arch/x86/cpu/apollolake/Kconfig:40
> > error: arch/x86/cpu/apollolake/Kconfig: patch does not apply
> > Patch failed at 0006 x86: apl: Use the clock driver
> >
> > I tried to apply it on top of an old commit and got no luck.
> >
> > Would you please rebase this series against u-boot-x86/master and resend?
>
> Yes, will do.
>
> Any thoughts on the ACPI series? I need to rebase that as well.

Which series? I do not find that in my patch queue.

Regards,
Bin
Simon Glass Feb. 7, 2020, 3:52 p.m. UTC | #4
Hi Bin,

On Thu, 6 Feb 2020 at 20:36, Bin Meng <bmeng.cn at gmail.com> wrote:
>
> Hi Simon,
>
> On Fri, Feb 7, 2020 at 12:55 AM Simon Glass <sjg at chromium.org> wrote:
> >
> > Hi Bin,
> >
> > On Wed, 5 Feb 2020 at 23:22, Bin Meng <bmeng.cn at gmail.com> wrote:
> > >
> > > Hi Simon,
> > >
> > > On Wed, Feb 5, 2020 at 10:03 AM Simon Glass <sjg at chromium.org> wrote:
> > > >
> > > > This series adds a driver for the Cr50 security chip and enables it on
> > > > coral. This supports the 'tpm' command.
> > > >
> > > > In order to make this work a few other changes are included:
> > > > - Additional UCLASS_IRQ operations to support requesting and reading
> > > >   interrupts, using the device tree
> > > > - A driver for ACPI general-purpose events
> > > >
> > > > There are also a few small clean-ups to the recently landed Apollo Lake
> > > > support.
> > > >
> > > > This series relies on this patch:
> > > >
> > > >    http://patchwork.ozlabs.org/patch/1214541/
> > > >
> > >
> > > This series does not apply on top of u-boot-x86/master:
> > >
> > > Applying: x86: apl: Use the clock driver
> > > error: patch failed: arch/x86/cpu/apollolake/Kconfig:40
> > > error: arch/x86/cpu/apollolake/Kconfig: patch does not apply
> > > Patch failed at 0006 x86: apl: Use the clock driver
> > >
> > > I tried to apply it on top of an old commit and got no luck.
> > >
> > > Would you please rebase this series against u-boot-x86/master and resend?
> >
> > Yes, will do.
> >
> > Any thoughts on the ACPI series? I need to rebase that as well.
>
> Which series? I do not find that in my patch queue.

http://patchwork.ozlabs.org/project/uboot/list/?series=&submitter=&state=5&q=&archive=&delegate=

Oh dear...because I put RFC on it, it seems to hide itself. I found it
here and turned off the RFC.

Regards,
Simon