mbox series

[v2,0/3] tpm: tsi-i2c: Add compatible strings

Message ID 20220928043957.2636877-1-joel@jms.id.au
Headers show
Series tpm: tsi-i2c: Add compatible strings | expand

Message

Joel Stanley Sept. 28, 2022, 4:39 a.m. UTC
v2 removes the string from trivial devices and changes some of the
strings in the bindings.

Joel Stanley (2):
  dt-bindings: trivial-devices: Remove Infineon SLB9673 TPM
  tpm: tis-i2c: Add more compatible strings

Johannes Holland (1):
  dt-bindings: tpm: Add schema for TIS I2C devices

 drivers/char/tpm/tpm_tis_i2c.c                |  2 +
 .../bindings/security/tpm/tpm-tis-i2c.yaml    | 50 +++++++++++++++++++
 .../devicetree/bindings/trivial-devices.yaml  |  2 -
 3 files changed, 52 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/security/tpm/tpm-tis-i2c.yaml

Comments

Rob Herring (Arm) Sept. 30, 2022, 2:44 p.m. UTC | #1
On Wed, Sep 28, 2022 at 02:09:57PM +0930, Joel Stanley wrote:
> The NPCT75x TPM is TIS compatible. It has an I2C and SPI interface.
> 
> https://www.nuvoton.com/products/cloud-computing/security/trusted-platform-module-tpm/
> 
> Add a compatible string for it, and the generic compatible.
> 
> Signed-off-by: Joel Stanley <joel@jms.id.au>
> ---
>  drivers/char/tpm/tpm_tis_i2c.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/char/tpm/tpm_tis_i2c.c b/drivers/char/tpm/tpm_tis_i2c.c
> index 0692510dfcab..4af27b7ec5b1 100644
> --- a/drivers/char/tpm/tpm_tis_i2c.c
> +++ b/drivers/char/tpm/tpm_tis_i2c.c
> @@ -368,6 +368,8 @@ MODULE_DEVICE_TABLE(i2c, tpm_tis_i2c_id);
>  #ifdef CONFIG_OF
>  static const struct of_device_id of_tis_i2c_match[] = {
>  	{ .compatible = "infineon,slb9673", },
> +	{ .compatible = "nuvoton,npct75x", },
> +	{ .compatible = "tcg,tpm-tis-i2c", },

If there is not currently any distinction that the kernel makes, you 
only need to add "tcg,tpm-tis-i2c".

>  	{}
>  };
>  MODULE_DEVICE_TABLE(of, of_tis_i2c_match);
> -- 
> 2.35.1
> 
>
Jarkko Sakkinen Sept. 30, 2022, 9:47 p.m. UTC | #2
On Wed, Sep 28, 2022 at 02:09:57PM +0930, Joel Stanley wrote:
> The NPCT75x TPM is TIS compatible. It has an I2C and SPI interface.
> 
> https://www.nuvoton.com/products/cloud-computing/security/trusted-platform-module-tpm/
> 
> Add a compatible string for it, and the generic compatible.
> 
> Signed-off-by: Joel Stanley <joel@jms.id.au>
> ---
>  drivers/char/tpm/tpm_tis_i2c.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/char/tpm/tpm_tis_i2c.c b/drivers/char/tpm/tpm_tis_i2c.c
> index 0692510dfcab..4af27b7ec5b1 100644
> --- a/drivers/char/tpm/tpm_tis_i2c.c
> +++ b/drivers/char/tpm/tpm_tis_i2c.c
> @@ -368,6 +368,8 @@ MODULE_DEVICE_TABLE(i2c, tpm_tis_i2c_id);
>  #ifdef CONFIG_OF
>  static const struct of_device_id of_tis_i2c_match[] = {
>  	{ .compatible = "infineon,slb9673", },
> +	{ .compatible = "nuvoton,npct75x", },
> +	{ .compatible = "tcg,tpm-tis-i2c", },
>  	{}
>  };
>  MODULE_DEVICE_TABLE(of, of_tis_i2c_match);
> -- 
> 2.35.1
> 

Acked-by: Jarkko Sakkinen <jarkko@kernel.org>

IMHO could be picked to the same tree with DT changes instead
of my tree.

BR, Jarkko
Rob Herring Oct. 4, 2022, 9:20 p.m. UTC | #3
On Fri, Sep 30, 2022 at 4:47 PM Jarkko Sakkinen <jarkko@kernel.org> wrote:
>
> On Wed, Sep 28, 2022 at 02:09:57PM +0930, Joel Stanley wrote:
> > The NPCT75x TPM is TIS compatible. It has an I2C and SPI interface.
> >
> > https://www.nuvoton.com/products/cloud-computing/security/trusted-platform-module-tpm/
> >
> > Add a compatible string for it, and the generic compatible.
> >
> > Signed-off-by: Joel Stanley <joel@jms.id.au>
> > ---
> >  drivers/char/tpm/tpm_tis_i2c.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/char/tpm/tpm_tis_i2c.c b/drivers/char/tpm/tpm_tis_i2c.c
> > index 0692510dfcab..4af27b7ec5b1 100644
> > --- a/drivers/char/tpm/tpm_tis_i2c.c
> > +++ b/drivers/char/tpm/tpm_tis_i2c.c
> > @@ -368,6 +368,8 @@ MODULE_DEVICE_TABLE(i2c, tpm_tis_i2c_id);
> >  #ifdef CONFIG_OF
> >  static const struct of_device_id of_tis_i2c_match[] = {
> >       { .compatible = "infineon,slb9673", },
> > +     { .compatible = "nuvoton,npct75x", },
> > +     { .compatible = "tcg,tpm-tis-i2c", },
> >       {}
> >  };
> >  MODULE_DEVICE_TABLE(of, of_tis_i2c_match);
> > --
> > 2.35.1
> >
>
> Acked-by: Jarkko Sakkinen <jarkko@kernel.org>
>
> IMHO could be picked to the same tree with DT changes instead
> of my tree.

It's supposed to be the other way around. DT bindings go with drivers
via subsystem tree. I don't take drivers.

But it seems this first needs some coordination with this[1] series.

Rob

[1] https://lore.kernel.org/all/20220930165116.13329-1-Alexander.Steffen@infineon.com/
Jarkko Sakkinen Oct. 4, 2022, 11:10 p.m. UTC | #4
On Tue, Oct 04, 2022 at 04:20:56PM -0500, Rob Herring wrote:
> On Fri, Sep 30, 2022 at 4:47 PM Jarkko Sakkinen <jarkko@kernel.org> wrote:
> >
> > On Wed, Sep 28, 2022 at 02:09:57PM +0930, Joel Stanley wrote:
> > > The NPCT75x TPM is TIS compatible. It has an I2C and SPI interface.
> > >
> > > https://www.nuvoton.com/products/cloud-computing/security/trusted-platform-module-tpm/
> > >
> > > Add a compatible string for it, and the generic compatible.
> > >
> > > Signed-off-by: Joel Stanley <joel@jms.id.au>
> > > ---
> > >  drivers/char/tpm/tpm_tis_i2c.c | 2 ++
> > >  1 file changed, 2 insertions(+)
> > >
> > > diff --git a/drivers/char/tpm/tpm_tis_i2c.c b/drivers/char/tpm/tpm_tis_i2c.c
> > > index 0692510dfcab..4af27b7ec5b1 100644
> > > --- a/drivers/char/tpm/tpm_tis_i2c.c
> > > +++ b/drivers/char/tpm/tpm_tis_i2c.c
> > > @@ -368,6 +368,8 @@ MODULE_DEVICE_TABLE(i2c, tpm_tis_i2c_id);
> > >  #ifdef CONFIG_OF
> > >  static const struct of_device_id of_tis_i2c_match[] = {
> > >       { .compatible = "infineon,slb9673", },
> > > +     { .compatible = "nuvoton,npct75x", },
> > > +     { .compatible = "tcg,tpm-tis-i2c", },
> > >       {}
> > >  };
> > >  MODULE_DEVICE_TABLE(of, of_tis_i2c_match);
> > > --
> > > 2.35.1
> > >
> >
> > Acked-by: Jarkko Sakkinen <jarkko@kernel.org>
> >
> > IMHO could be picked to the same tree with DT changes instead
> > of my tree.
> 
> It's supposed to be the other way around. DT bindings go with drivers
> via subsystem tree. I don't take drivers.
> 
> But it seems this first needs some coordination with this[1] series.
> 
> Rob
> 
> [1] https://lore.kernel.org/all/20220930165116.13329-1-Alexander.Steffen@infineon.com/

WFM, I can pick it (once the issues are fixed).

BR, Jarkko
Joel Stanley Oct. 5, 2022, 2:28 a.m. UTC | #5
On Fri, 30 Sept 2022 at 14:44, Rob Herring <robh@kernel.org> wrote:
>
> On Wed, Sep 28, 2022 at 02:09:57PM +0930, Joel Stanley wrote:
> > The NPCT75x TPM is TIS compatible. It has an I2C and SPI interface.
> >
> > https://www.nuvoton.com/products/cloud-computing/security/trusted-platform-module-tpm/
> >
> > Add a compatible string for it, and the generic compatible.
> >
> > Signed-off-by: Joel Stanley <joel@jms.id.au>
> > ---
> >  drivers/char/tpm/tpm_tis_i2c.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/char/tpm/tpm_tis_i2c.c b/drivers/char/tpm/tpm_tis_i2c.c
> > index 0692510dfcab..4af27b7ec5b1 100644
> > --- a/drivers/char/tpm/tpm_tis_i2c.c
> > +++ b/drivers/char/tpm/tpm_tis_i2c.c
> > @@ -368,6 +368,8 @@ MODULE_DEVICE_TABLE(i2c, tpm_tis_i2c_id);
> >  #ifdef CONFIG_OF
> >  static const struct of_device_id of_tis_i2c_match[] = {
> >       { .compatible = "infineon,slb9673", },
> > +     { .compatible = "nuvoton,npct75x", },
> > +     { .compatible = "tcg,tpm-tis-i2c", },
>
> If there is not currently any distinction that the kernel makes, you
> only need to add "tcg,tpm-tis-i2c".

There are device trees that just have one or the other, so it makes
sense to list both.

>
> >       {}
> >  };
> >  MODULE_DEVICE_TABLE(of, of_tis_i2c_match);
> > --
> > 2.35.1
> >
> >
Guenter Roeck Dec. 12, 2023, 6:40 a.m. UTC | #6
On Wed, Sep 28, 2022 at 02:09:57PM +0930, Joel Stanley wrote:
> The NPCT75x TPM is TIS compatible. It has an I2C and SPI interface.
> 
> https://www.nuvoton.com/products/cloud-computing/security/trusted-platform-module-tpm/
> 
> Add a compatible string for it, and the generic compatible.
> 
> Signed-off-by: Joel Stanley <joel@jms.id.au>

Does anyone happen to know why this patch never made it upstream ?

Thanks,
Guenter

> ---
>  drivers/char/tpm/tpm_tis_i2c.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/char/tpm/tpm_tis_i2c.c b/drivers/char/tpm/tpm_tis_i2c.c
> index 0692510dfcab..4af27b7ec5b1 100644
> --- a/drivers/char/tpm/tpm_tis_i2c.c
> +++ b/drivers/char/tpm/tpm_tis_i2c.c
> @@ -368,6 +368,8 @@ MODULE_DEVICE_TABLE(i2c, tpm_tis_i2c_id);
>  #ifdef CONFIG_OF
>  static const struct of_device_id of_tis_i2c_match[] = {
>  	{ .compatible = "infineon,slb9673", },
> +	{ .compatible = "nuvoton,npct75x", },
> +	{ .compatible = "tcg,tpm-tis-i2c", },
>  	{}
>  };
>  MODULE_DEVICE_TABLE(of, of_tis_i2c_match);
> -- 
> 2.35.1
>