From: Joel Stanley <[email protected]>
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.
OpenBMC-Staging-Count: 3
Signed-off-by: Joel Stanley <[email protected]>
Acked-by: Jarkko Sakkinen <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Ninad Palsule <[email protected]>
---
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 a897402cc36a..9511c0d50185 100644
--- a/drivers/char/tpm/tpm_tis_i2c.c
+++ b/drivers/char/tpm/tpm_tis_i2c.c
@@ -383,6 +383,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.39.2
On Tue, Dec 12, 2023 at 10:40:03AM -0600, Ninad Palsule wrote:
> From: Joel Stanley <[email protected]>
>
> 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.
>
> OpenBMC-Staging-Count: 3
Delete this from every patch that it appears from.
> Signed-off-by: Joel Stanley <[email protected]>
> Acked-by: Jarkko Sakkinen <[email protected]>
> Link: https://lore.kernel.org/r/[email protected]
> Signed-off-by: Ninad Palsule <[email protected]>
> ---
> 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 a897402cc36a..9511c0d50185 100644
> --- a/drivers/char/tpm/tpm_tis_i2c.c
> +++ b/drivers/char/tpm/tpm_tis_i2c.c
> @@ -383,6 +383,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", },
What's the point of the generic compatible if you are adding the device
specific ones to the driver anyway?
Thanks,
Conor.
> {}
> };
> MODULE_DEVICE_TABLE(of, of_tis_i2c_match);
> --
> 2.39.2
>
On Tue, Dec 12, 2023 at 05:15:51PM +0000, Conor Dooley wrote:
> On Tue, Dec 12, 2023 at 10:40:03AM -0600, Ninad Palsule wrote:
> > From: Joel Stanley <[email protected]>
> >
> > 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.
> >
> > OpenBMC-Staging-Count: 3
>
> Delete this from every patch that it appears from.
>
> > Signed-off-by: Joel Stanley <[email protected]>
> > Acked-by: Jarkko Sakkinen <[email protected]>
> > Link: https://lore.kernel.org/r/[email protected]
> > Signed-off-by: Ninad Palsule <[email protected]>
> > ---
> > 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 a897402cc36a..9511c0d50185 100644
> > --- a/drivers/char/tpm/tpm_tis_i2c.c
> > +++ b/drivers/char/tpm/tpm_tis_i2c.c
> > @@ -383,6 +383,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", },
>
> What's the point of the generic compatible if you are adding the device
> specific ones to the driver anyway?
>
$ git grep infineon,slb9673
Documentation/devicetree/bindings/trivial-devices.yaml: - infineon,slb9673
drivers/char/tpm/tpm_tis_i2c.c: { .compatible = "infineon,slb9673", },
$ git grep nuvoton,npct75x
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-bonnell.dts: compatible = "nuvoton,npct75x", "tcg,tpm-tis-i2c";
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-everest.dts: compatible = "nuvoton,npct75x", "tcg,tpm-tis-i2c";
$ git grep tcg,tpm-tis-i2c
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-bonnell.dts: compatible = "nuvoton,npct75x", "tcg,tpm-tis-i2c";
arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-everest.dts: compatible = "nuvoton,npct75x", "tcg,tpm-tis-i2c";
arch/arm/boot/dts/aspeed/aspeed-bmc-opp-tacoma.dts: compatible = "tcg,tpm-tis-i2c";
It looks like at least the generic entry is needed, given that it is quite
likely that there is hardware out there using it. Other than that, this
makes me wonder: Is there some official guideline describing if and when
to use (only) generic devicetree compatible entries and when specific ones
may / should / have to be used ? I suspect the answer to your question might
simply be "because we did not know better", and it might be helpful to be
able to say "please see XXX for details".
Thanks,
Guenter
On Tue, Dec 12, 2023 at 10:00:39AM -0800, Guenter Roeck wrote:
> On Tue, Dec 12, 2023 at 05:15:51PM +0000, Conor Dooley wrote:
> > On Tue, Dec 12, 2023 at 10:40:03AM -0600, Ninad Palsule wrote:
> > > From: Joel Stanley <[email protected]>
> > >
> > > 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.
> > >
> > > OpenBMC-Staging-Count: 3
> >
> > Delete this from every patch that it appears from.
> >
> > > Signed-off-by: Joel Stanley <[email protected]>
> > > Acked-by: Jarkko Sakkinen <[email protected]>
> > > Link: https://lore.kernel.org/r/[email protected]
> > > Signed-off-by: Ninad Palsule <[email protected]>
> > > ---
> > > 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 a897402cc36a..9511c0d50185 100644
> > > --- a/drivers/char/tpm/tpm_tis_i2c.c
> > > +++ b/drivers/char/tpm/tpm_tis_i2c.c
> > > @@ -383,6 +383,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", },
> >
> > What's the point of the generic compatible if you are adding the device
> > specific ones to the driver anyway?
> >
>
> $ git grep infineon,slb9673
> Documentation/devicetree/bindings/trivial-devices.yaml: - infineon,slb9673
Hmm, this would then need to be moved into the new schema, out of
trivial devices.
> drivers/char/tpm/tpm_tis_i2c.c: { .compatible = "infineon,slb9673", },
> $ git grep nuvoton,npct75x
> arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-bonnell.dts: compatible = "nuvoton,npct75x", "tcg,tpm-tis-i2c";
> arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-everest.dts: compatible = "nuvoton,npct75x", "tcg,tpm-tis-i2c";
> $ git grep tcg,tpm-tis-i2c
> arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-bonnell.dts: compatible = "nuvoton,npct75x", "tcg,tpm-tis-i2c";
> arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-everest.dts: compatible = "nuvoton,npct75x", "tcg,tpm-tis-i2c";
> arch/arm/boot/dts/aspeed/aspeed-bmc-opp-tacoma.dts: compatible = "tcg,tpm-tis-i2c";
pog, undocumented compatibles.
> It looks like at least the generic entry is needed, given that it is quite
> likely that there is hardware out there using it. Other than that, this
> makes me wonder: Is there some official guideline describing if and when
> to use (only) generic devicetree compatible entries and when specific ones
> may / should / have to be used ? I suspect the answer to your question might
> simply be "because we did not know better", and it might be helpful to be
> able to say "please see XXX for details".
To me using generic compatibles is okay when there is another mechanism
to identify the device. This patch would make more sense if the addition
of nuvoton,npct75x was omitted and the dt-binding had
properties:
compatible:
items:
- enum:
- infineon,slb9673
- nuvoton,npct75x
- const: tcg,tpm-tis-i2c
And whenever new i2c tpms showed up the device specific compatible was
added to the bindings and the driver had only* the generic compatible
static const struct of_device_id of_tis_i2c_match[] = {
{ .compatible = "infineon,slb9673", },
{ .compatible = "tcg,tpm-tis-i2c", },
};
* well, and the existing one since that cannot be removed.
On 12/12/23 10:51, Conor Dooley wrote:
> On Tue, Dec 12, 2023 at 10:00:39AM -0800, Guenter Roeck wrote:
>> On Tue, Dec 12, 2023 at 05:15:51PM +0000, Conor Dooley wrote:
>>> On Tue, Dec 12, 2023 at 10:40:03AM -0600, Ninad Palsule wrote:
>>>> From: Joel Stanley <[email protected]>
>>>>
>>>> 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.
>>>>
>>>> OpenBMC-Staging-Count: 3
>>>
>>> Delete this from every patch that it appears from.
>>>
>>>> Signed-off-by: Joel Stanley <[email protected]>
>>>> Acked-by: Jarkko Sakkinen <[email protected]>
>>>> Link: https://lore.kernel.org/r/[email protected]
>>>> Signed-off-by: Ninad Palsule <[email protected]>
>>>> ---
>>>> 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 a897402cc36a..9511c0d50185 100644
>>>> --- a/drivers/char/tpm/tpm_tis_i2c.c
>>>> +++ b/drivers/char/tpm/tpm_tis_i2c.c
>>>> @@ -383,6 +383,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", },
>>>
>>> What's the point of the generic compatible if you are adding the device
>>> specific ones to the driver anyway?
>>>
>>
>> $ git grep infineon,slb9673
>> Documentation/devicetree/bindings/trivial-devices.yaml: - infineon,slb9673
>
> Hmm, this would then need to be moved into the new schema, out of
> trivial devices.
>
>> drivers/char/tpm/tpm_tis_i2c.c: { .compatible = "infineon,slb9673", },
>> $ git grep nuvoton,npct75x
>> arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-bonnell.dts: compatible = "nuvoton,npct75x", "tcg,tpm-tis-i2c";
>> arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-everest.dts: compatible = "nuvoton,npct75x", "tcg,tpm-tis-i2c";
>> $ git grep tcg,tpm-tis-i2c
>> arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-bonnell.dts: compatible = "nuvoton,npct75x", "tcg,tpm-tis-i2c";
>> arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-everest.dts: compatible = "nuvoton,npct75x", "tcg,tpm-tis-i2c";
>> arch/arm/boot/dts/aspeed/aspeed-bmc-opp-tacoma.dts: compatible = "tcg,tpm-tis-i2c";
>
> pog, undocumented compatibles.
>
Yes, I know, quite annoying. Though, to be fair, a generic "tcg,tpm-tis-i2c"
would make a lot of sense.
Note that Rob had rejected the original addition (into trivial devices)
with the argument that it is not a trivial device
(https://lore.kernel.org/lkml/[email protected]/).
>> It looks like at least the generic entry is needed, given that it is quite
>> likely that there is hardware out there using it. Other than that, this
>> makes me wonder: Is there some official guideline describing if and when
>> to use (only) generic devicetree compatible entries and when specific ones
>> may / should / have to be used ? I suspect the answer to your question might
>> simply be "because we did not know better", and it might be helpful to be
>> able to say "please see XXX for details".
>
> To me using generic compatibles is okay when there is another mechanism
> to identify the device. This patch would make more sense if the addition
> of nuvoton,npct75x was omitted and the dt-binding had
>
> properties:
> compatible:
> items:
> - enum:
> - infineon,slb9673
> - nuvoton,npct75x
> - const: tcg,tpm-tis-i2c
>
> And whenever new i2c tpms showed up the device specific compatible was
> added to the bindings and the driver had only* the generic compatible
> static const struct of_device_id of_tis_i2c_match[] = {
> { .compatible = "infineon,slb9673", },
> { .compatible = "tcg,tpm-tis-i2c", },
> };
>
> * well, and the existing one since that cannot be removed.
That would be perfectly fine with me. All I personally care about is to get
"tcg,tpm-tis-i2c" added to the kernel source so I can start testing the
code in qemu.
Thanks,
Guenter
Hello Conor,
On 12/12/23 11:15, Conor Dooley wrote:
> On Tue, Dec 12, 2023 at 10:40:03AM -0600, Ninad Palsule wrote:
>> From: Joel Stanley <[email protected]>
>>
>> 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.
>>
>> OpenBMC-Staging-Count: 3
> Delete this from every patch that it appears from.
Removed.
>
>> Signed-off-by: Joel Stanley <[email protected]>
>> Acked-by: Jarkko Sakkinen <[email protected]>
>> Link: https://lore.kernel.org/r/[email protected]
>> Signed-off-by: Ninad Palsule <[email protected]>
>> ---
>> 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 a897402cc36a..9511c0d50185 100644
>> --- a/drivers/char/tpm/tpm_tis_i2c.c
>> +++ b/drivers/char/tpm/tpm_tis_i2c.c
>> @@ -383,6 +383,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", },
> What's the point of the generic compatible if you are adding the device
> specific ones to the driver anyway?
>
> Thanks,
> Conor.
I have removed this commit from this patchset and send it as a separate
patch.
Regards,
Ninad
Hello Guenter,
On 12/12/23 13:50, Guenter Roeck wrote:
> On 12/12/23 10:51, Conor Dooley wrote:
>> On Tue, Dec 12, 2023 at 10:00:39AM -0800, Guenter Roeck wrote:
>>> On Tue, Dec 12, 2023 at 05:15:51PM +0000, Conor Dooley wrote:
>>>> On Tue, Dec 12, 2023 at 10:40:03AM -0600, Ninad Palsule wrote:
>>>>> From: Joel Stanley <[email protected]>
>>>>>
>>>>> 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.
>>>>>
>>>>> OpenBMC-Staging-Count: 3
>>>>
>>>> Delete this from every patch that it appears from.
I have send it as a separate commit.
https://lore.kernel.org/linux-kernel/[email protected]/
On Mon, Jan 08, 2024 at 02:05:53PM -0600, Ninad Palsule wrote:
> Hello Guenter,
>
> On 12/12/23 13:50, Guenter Roeck wrote:
> > On 12/12/23 10:51, Conor Dooley wrote:
> > > On Tue, Dec 12, 2023 at 10:00:39AM -0800, Guenter Roeck wrote:
> > > > On Tue, Dec 12, 2023 at 05:15:51PM +0000, Conor Dooley wrote:
> > > > > On Tue, Dec 12, 2023 at 10:40:03AM -0600, Ninad Palsule wrote:
> > > > > > From: Joel Stanley <[email protected]>
> > > > > >
> > > > > > 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.
> > > > > >
> > > > > > OpenBMC-Staging-Count: 3
> > > > >
> > > > > Delete this from every patch that it appears from.
>
>
> I have send it as a separate commit. https://lore.kernel.org/linux-kernel/[email protected]/
Why did you do that? It now just adds undocumented compatibles to the
driver. Please, as Rob requested, work with Lukas on his series to make
sure that these devices are documented.
Thanks,
Conor.
Hi Conor,
On 1/9/24 11:14, Conor Dooley wrote:
> On Mon, Jan 08, 2024 at 02:05:53PM -0600, Ninad Palsule wrote:
>> Hello Guenter,
>>
>> On 12/12/23 13:50, Guenter Roeck wrote:
>>> On 12/12/23 10:51, Conor Dooley wrote:
>>>> On Tue, Dec 12, 2023 at 10:00:39AM -0800, Guenter Roeck wrote:
>>>>> On Tue, Dec 12, 2023 at 05:15:51PM +0000, Conor Dooley wrote:
>>>>>> On Tue, Dec 12, 2023 at 10:40:03AM -0600, Ninad Palsule wrote:
>>>>>>> From: Joel Stanley <[email protected]>
>>>>>>>
>>>>>>> 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.
>>>>>>>
>>>>>>> OpenBMC-Staging-Count: 3
>>>>>> Delete this from every patch that it appears from.
>>
>> I have send it as a separate commit. https://lore.kernel.org/linux-kernel/[email protected]/
> Why did you do that? It now just adds undocumented compatibles to the
> driver. Please, as Rob requested, work with Lukas on his series to make
> sure that these devices are documented.
I think krzysztof kozlowski suggested to send these patches separately:
https://lore.kernel.org/linux-kernel/[email protected]/
Did I misunderstood it? Do you guys want me to include that commit again?
Regards,
Ninad
>
> Thanks,
> Conor.
Hello Conor,
On 1/9/24 11:14, Conor Dooley wrote:
> On Mon, Jan 08, 2024 at 02:05:53PM -0600, Ninad Palsule wrote:
>> Hello Guenter,
>>
>> On 12/12/23 13:50, Guenter Roeck wrote:
>>> On 12/12/23 10:51, Conor Dooley wrote:
>>>> On Tue, Dec 12, 2023 at 10:00:39AM -0800, Guenter Roeck wrote:
>>>>> On Tue, Dec 12, 2023 at 05:15:51PM +0000, Conor Dooley wrote:
>>>>>> On Tue, Dec 12, 2023 at 10:40:03AM -0600, Ninad Palsule wrote:
>>>>>>> From: Joel Stanley <[email protected]>
>>>>>>>
>>>>>>> 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.
>>>>>>>
>>>>>>> OpenBMC-Staging-Count: 3
>>>>>> Delete this from every patch that it appears from.
>>
>> I have send it as a separate commit. https://lore.kernel.org/linux-kernel/[email protected]/
> Why did you do that? It now just adds undocumented compatibles to the
> driver. Please, as Rob requested, work with Lukas on his series to make
> sure that these devices are documented.
I think krzysztof kozlowski suggested to send these patches separately:
https://lore.kernel.org/linux-kernel/[email protected]/
Did I misunderstood it? Do you guys want me to include that commit again?
Regards,
Ninad
On 10/01/2024 00:55, Ninad Palsule wrote:
> Hello Conor,
>
> On 1/9/24 11:14, Conor Dooley wrote:
>> On Mon, Jan 08, 2024 at 02:05:53PM -0600, Ninad Palsule wrote:
>>> Hello Guenter,
>>>
>>> On 12/12/23 13:50, Guenter Roeck wrote:
>>>> On 12/12/23 10:51, Conor Dooley wrote:
>>>>> On Tue, Dec 12, 2023 at 10:00:39AM -0800, Guenter Roeck wrote:
>>>>>> On Tue, Dec 12, 2023 at 05:15:51PM +0000, Conor Dooley wrote:
>>>>>>> On Tue, Dec 12, 2023 at 10:40:03AM -0600, Ninad Palsule wrote:
>>>>>>>> From: Joel Stanley <[email protected]>
>>>>>>>>
>>>>>>>> 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.
>>>>>>>>
>>>>>>>> OpenBMC-Staging-Count: 3
>>>>>>> Delete this from every patch that it appears from.
>>>
>>> I have send it as a separate commit. https://lore.kernel.org/linux-kernel/[email protected]/
>> Why did you do that? It now just adds undocumented compatibles to the
>> driver. Please, as Rob requested, work with Lukas on his series to make
>> sure that these devices are documented.
>
> I think krzysztof kozlowski suggested to send these patches separately:
> https://lore.kernel.org/linux-kernel/[email protected]/
>
> Did I misunderstood it? Do you guys want me to include that commit again?
My comment was in DTS thread under specific DTS patch. How did you
figure out it applies to driver and bindings? This does not make sense.
Best regards,
Krzysztof
Hello Krzysztof,
>>>> I have send it as a separate commit. https://lore.kernel.org/linux-kernel/[email protected]/
>>> Why did you do that? It now just adds undocumented compatibles to the
>>> driver. Please, as Rob requested, work with Lukas on his series to make
>>> sure that these devices are documented.
>> I think krzysztof kozlowski suggested to send these patches separately:
>> https://lore.kernel.org/linux-kernel/[email protected]/
>>
>> Did I misunderstood it? Do you guys want me to include that commit again?
> My comment was in DTS thread under specific DTS patch. How did you
> figure out it applies to driver and bindings? This does not make sense.
Sorry for the misunderstanding. Where do you want me to add driver
patch? Before all DTS patches or after all DTS patches?
tpm: tis-i2c: Add more compatible strings
ARM: dts: aspeed: System1: IBM system1 BMC board
dt-bindings: Add DPS310 as trivial device
dt-bindings: arm: aspeed: add IBM system1-bmc
OR
ARM: dts: aspeed: System1: IBM system1 BMC board
dt-bindings: Add DPS310 as trivial device
dt-bindings: arm: aspeed: add IBM system1-bmc
tpm: tis-i2c: Add more compatible strings
Thanks & Regards,
Ninad Palsule
On 10/01/2024 15:31, Ninad Palsule wrote:
> Hello Krzysztof,
>
>
>
>>>>> I have send it as a separate commit. https://lore.kernel.org/linux-kernel/[email protected]/
>>>> Why did you do that? It now just adds undocumented compatibles to the
>>>> driver. Please, as Rob requested, work with Lukas on his series to make
>>>> sure that these devices are documented.
>>> I think krzysztof kozlowski suggested to send these patches separately:
>>> https://lore.kernel.org/linux-kernel/[email protected]/
>>>
>>> Did I misunderstood it? Do you guys want me to include that commit again?
>> My comment was in DTS thread under specific DTS patch. How did you
>> figure out it applies to driver and bindings? This does not make sense.
>
> Sorry for the misunderstanding. Where do you want me to add driver
> patch? Before all DTS patches or after all DTS patches?
Does not matter, why do you insist on combining them with DTS? Drivers
and bindings are going together. DTS better separate, although depending
on the case can be together.
Best regards,
Krzysztof
Hello Krzysztof,
On 1/10/24 09:37, Krzysztof Kozlowski wrote:
> On 10/01/2024 15:31, Ninad Palsule wrote:
>> Hello Krzysztof,
>>
>>
>>
>>>>>> I have send it as a separate commit. https://lore.kernel.org/linux-kernel/[email protected]/
>>>>> Why did you do that? It now just adds undocumented compatibles to the
>>>>> driver. Please, as Rob requested, work with Lukas on his series to make
>>>>> sure that these devices are documented.
>>>> I think krzysztof kozlowski suggested to send these patches separately:
>>>> https://lore.kernel.org/linux-kernel/[email protected]/
>>>>
>>>> Did I misunderstood it? Do you guys want me to include that commit again?
>>> My comment was in DTS thread under specific DTS patch. How did you
>>> figure out it applies to driver and bindings? This does not make sense.
>> Sorry for the misunderstanding. Where do you want me to add driver
>> patch? Before all DTS patches or after all DTS patches?
> Does not matter, why do you insist on combining them with DTS? Drivers
> and bindings are going together. DTS better separate, although depending
> on the case can be together.
>
I have combined DTS and Driver because DTS was using compatibility
string which is not upstream yet hence I thought it is logical to send
it under same patchset.
Conor and Rob, Do you have preference?
Thanks & Regards,
Ninad Palsule
On Wed, Jan 10, 2024 at 09:54:19AM -0600, Ninad Palsule wrote:
> Hello Krzysztof,
>
>
> On 1/10/24 09:37, Krzysztof Kozlowski wrote:
> > On 10/01/2024 15:31, Ninad Palsule wrote:
> > > Hello Krzysztof,
> > >
> > >
> > >
> > > > > > > I have send it as a separate commit. https://lore.kernel.org/linux-kernel/[email protected]/
> > > > > > Why did you do that? It now just adds undocumented compatibles to the
> > > > > > driver. Please, as Rob requested, work with Lukas on his series to make
> > > > > > sure that these devices are documented.
> > > > > I think krzysztof kozlowski suggested to send these patches separately:
> > > > > https://lore.kernel.org/linux-kernel/[email protected]/
> > > > >
> > > > > Did I misunderstood it? Do you guys want me to include that commit again?
> > > > My comment was in DTS thread under specific DTS patch. How did you
> > > > figure out it applies to driver and bindings? This does not make sense.
> > > Sorry for the misunderstanding. Where do you want me to add driver
> > > patch? Before all DTS patches or after all DTS patches?
> > Does not matter, why do you insist on combining them with DTS? Drivers
> > and bindings are going together. DTS better separate, although depending
> > on the case can be together.
> >
> I have combined DTS and Driver because DTS was using compatibility string
> which is not upstream yet hence I thought it is logical to send it under
> same patchset.
>
> Conor and Rob, Do you have preference?
I'm not sure what you want from me that Krzysztof hasn't already
provided. dt-bindings and drivers usually go together, and the dts
patches are often in the same series. If you send dts separately, note
under the --- line the patches adding the binding so that the platform
maintainer knows that the compatible has not yet been documented.
On 10/01/2024 16:54, Ninad Palsule wrote:
> Hello Krzysztof,
>
>
> On 1/10/24 09:37, Krzysztof Kozlowski wrote:
>> On 10/01/2024 15:31, Ninad Palsule wrote:
>>> Hello Krzysztof,
>>>
>>>
>>>
>>>>>>> I have send it as a separate commit. https://lore.kernel.org/linux-kernel/[email protected]/
>>>>>> Why did you do that? It now just adds undocumented compatibles to the
>>>>>> driver. Please, as Rob requested, work with Lukas on his series to make
>>>>>> sure that these devices are documented.
>>>>> I think krzysztof kozlowski suggested to send these patches separately:
>>>>> https://lore.kernel.org/linux-kernel/[email protected]/
>>>>>
>>>>> Did I misunderstood it? Do you guys want me to include that commit again?
>>>> My comment was in DTS thread under specific DTS patch. How did you
>>>> figure out it applies to driver and bindings? This does not make sense.
>>> Sorry for the misunderstanding. Where do you want me to add driver
>>> patch? Before all DTS patches or after all DTS patches?
>> Does not matter, why do you insist on combining them with DTS? Drivers
>> and bindings are going together. DTS better separate, although depending
>> on the case can be together.
>>
> I have combined DTS and Driver because DTS was using compatibility
> string which is not upstream yet hence I thought it is logical to send
> it under same patchset.
Sometimes yes, sometimes not. DTS must not go via driver subsystem, so
sending it in the same patchset has implications on maintainers applying
it. Some like it, some don't and you will be nagged for combining them.
Best regards,
Krzysztof
On 1/10/24 09:54, Krzysztof Kozlowski wrote:
> On 10/01/2024 16:54, Ninad Palsule wrote:
>> Hello Krzysztof,
>>
>>
>> On 1/10/24 09:37, Krzysztof Kozlowski wrote:
>>> On 10/01/2024 15:31, Ninad Palsule wrote:
>>>> Hello Krzysztof,
>>>>
>>>>
>>>>
>>>>>>>> I have send it as a separate commit. https://lore.kernel.org/linux-kernel/[email protected]/
>>>>>>> Why did you do that? It now just adds undocumented compatibles to the
>>>>>>> driver. Please, as Rob requested, work with Lukas on his series to make
>>>>>>> sure that these devices are documented.
>>>>>> I think krzysztof kozlowski suggested to send these patches separately:
>>>>>> https://lore.kernel.org/linux-kernel/[email protected]/
>>>>>>
>>>>>> Did I misunderstood it? Do you guys want me to include that commit again?
>>>>> My comment was in DTS thread under specific DTS patch. How did you
>>>>> figure out it applies to driver and bindings? This does not make sense.
>>>> Sorry for the misunderstanding. Where do you want me to add driver
>>>> patch? Before all DTS patches or after all DTS patches?
>>> Does not matter, why do you insist on combining them with DTS? Drivers
>>> and bindings are going together. DTS better separate, although depending
>>> on the case can be together.
>>>
>> I have combined DTS and Driver because DTS was using compatibility
>> string which is not upstream yet hence I thought it is logical to send
>> it under same patchset.
>
> Sometimes yes, sometimes not. DTS must not go via driver subsystem, so
> sending it in the same patchset has implications on maintainers applying
> it. Some like it, some don't and you will be nagged for combining them.
>
"DTS must not go via driver subsystem"
I always thought the guideline was to submit separate _patches_ for dts
and driver changes, but as part of a single series. I didn't know that
there is a rule to submit separate patch _series_. I also didn't know
(and as far as I know no one called me on it) that I am not supposed
to _apply_ dts changes. So far, I typically applied dts changes together
with driver patches after receiving an Acked-by: or Reviewed-by:
from a devicetree maintainer.
This exchange suggests that I did it all wrong. Should I reject devicetree
patches submitted as part of a driver patch series going forward ?
Should I not apply dts patches submitted as part of a patch series ?
If so, it would help to have some documentation I can point to to explain
the rationale to submitters (and myself). Also, in that case, how is the
synchronization between device tree patches and driver patches supposed
to happen ?
FWIW, if dts changes are sent as separate series, I don't know how I would
be able to review driver changes/submissions without being copied on the
associated dts changes.
Guess I am more than a bit confused.
Thanks,
Guenter
On 10/01/2024 20:06, Guenter Roeck wrote:
> On 1/10/24 09:54, Krzysztof Kozlowski wrote:
>> On 10/01/2024 16:54, Ninad Palsule wrote:
>>> Hello Krzysztof,
>>>
>>>
>>> On 1/10/24 09:37, Krzysztof Kozlowski wrote:
>>>> On 10/01/2024 15:31, Ninad Palsule wrote:
>>>>> Hello Krzysztof,
>>>>>
>>>>>
>>>>>
>>>>>>>>> I have send it as a separate commit. https://lore.kernel.org/linux-kernel/[email protected]/
>>>>>>>> Why did you do that? It now just adds undocumented compatibles to the
>>>>>>>> driver. Please, as Rob requested, work with Lukas on his series to make
>>>>>>>> sure that these devices are documented.
>>>>>>> I think krzysztof kozlowski suggested to send these patches separately:
>>>>>>> https://lore.kernel.org/linux-kernel/[email protected]/
>>>>>>>
>>>>>>> Did I misunderstood it? Do you guys want me to include that commit again?
>>>>>> My comment was in DTS thread under specific DTS patch. How did you
>>>>>> figure out it applies to driver and bindings? This does not make sense.
>>>>> Sorry for the misunderstanding. Where do you want me to add driver
>>>>> patch? Before all DTS patches or after all DTS patches?
>>>> Does not matter, why do you insist on combining them with DTS? Drivers
>>>> and bindings are going together. DTS better separate, although depending
>>>> on the case can be together.
>>>>
>>> I have combined DTS and Driver because DTS was using compatibility
>>> string which is not upstream yet hence I thought it is logical to send
>>> it under same patchset.
>>
>> Sometimes yes, sometimes not. DTS must not go via driver subsystem, so
>> sending it in the same patchset has implications on maintainers applying
>> it. Some like it, some don't and you will be nagged for combining them.
>>
>
> "DTS must not go via driver subsystem"
>
> I always thought the guideline was to submit separate _patches_ for dts
> and driver changes, but as part of a single series. I didn't know that
> there is a rule to submit separate patch _series_. I also didn't know
> (and as far as I know no one called me on it) that I am not supposed
> to _apply_ dts changes. So far, I typically applied dts changes together
> with driver patches after receiving an Acked-by: or Reviewed-by:
> from a devicetree maintainer.
I did not notice you applying them, but such guideline - DTS must go via
respective SoC tree - was always repeated by me and SoC maintainers.
Just like gazillion other things probably was not documented... or even
if it was documented, it would be so deep among hundreds of other rules
nobody would find it. :)
>
> This exchange suggests that I did it all wrong. Should I reject devicetree
> patches submitted as part of a driver patch series going forward ?
I propose: just ignore them. The SoC maintainer will pick them up.
> Should I not apply dts patches submitted as part of a patch series ?
No, please do not apply them.
> If so, it would help to have some documentation I can point to to explain
> the rationale to submitters (and myself). Also, in that case, how is the
Yes, it would. I can try to create something.
> synchronization between device tree patches and driver patches supposed
> to happen ?
There should not be synchronization. Just to remind: we talk about DTS
(so also DTSI and DTSO), thus everything being in arch/*/boot/dts/. We
do not talk about DT bindings, right? The bindings are obvious (and
documented): preferably go via driver subsystem, with fallback/special
cases via SoC tree and fallback to Rob.
The DTS must be independent from driver changes. If synchronization is
needed, it means it is not independent. It happens from time to time,
kind of expected exception, with proper justifications. In such case,
recommendation is to send DTS for the next kernel release, so after the
driver changes hit rc1.
>
> FWIW, if dts changes are sent as separate series, I don't know how I would
> be able to review driver changes/submissions without being copied on the
> associated dts changes.
People are also encouraged to provide links between them. One lore link
is required: the DTS patchset, if sent in parallel, should have a link
to the thread with the bindings being reviewed on the list. Of course if
bindings are already accepted (in linux-next), then it's not necessary.
We all know how to use git grep.
Now about your specific question:
As a driver subsystem maintainer you are not expected, as a requirement,
to review DTS code. You can, you are welcomed, but don't you have
already too much stuff to review? Why would like to jump to DTS? If you
do, your help is appreciated, though. However think for a sec how would
it even work? Imagine we send new driver + bindings + DTS for OMAP in
one thread, so you see the DTS for your review. Now 2 months later I
send DTS for Qualcomm using that driver. You would never be Cc-ed on
this second submission. It wouldn't be even possible: get_maintainers.pl
would not print your email. Why would you be expected to be CCed on
first DTS to review and not on all others/further ones? This does not
make sense, really.
BTW, I am not saying here anything new. I was babbling about this every
second month since few years. :)
Best regards,
Krzysztof
On 10/01/2024 21:34, Krzysztof Kozlowski wrote:
>>>>>>>>>> I have send it as a separate commit. https://lore.kernel.org/linux-kernel/[email protected]/
>>>>>>>>> Why did you do that? It now just adds undocumented compatibles to the
>>>>>>>>> driver. Please, as Rob requested, work with Lukas on his series to make
>>>>>>>>> sure that these devices are documented.
>>>>>>>> I think krzysztof kozlowski suggested to send these patches separately:
>>>>>>>> https://lore.kernel.org/linux-kernel/[email protected]/
>>>>>>>>
>>>>>>>> Did I misunderstood it? Do you guys want me to include that commit again?
>>>>>>> My comment was in DTS thread under specific DTS patch. How did you
>>>>>>> figure out it applies to driver and bindings? This does not make sense.
>>>>>> Sorry for the misunderstanding. Where do you want me to add driver
>>>>>> patch? Before all DTS patches or after all DTS patches?
>>>>> Does not matter, why do you insist on combining them with DTS? Drivers
>>>>> and bindings are going together. DTS better separate, although depending
>>>>> on the case can be together.
>>>>>
>>>> I have combined DTS and Driver because DTS was using compatibility
>>>> string which is not upstream yet hence I thought it is logical to send
>>>> it under same patchset.
>>>
>>> Sometimes yes, sometimes not. DTS must not go via driver subsystem, so
>>> sending it in the same patchset has implications on maintainers applying
>>> it. Some like it, some don't and you will be nagged for combining them.
>>>
>>
>> "DTS must not go via driver subsystem"
>>
>> I always thought the guideline was to submit separate _patches_ for dts
>> and driver changes, but as part of a single series. I didn't know that
>> there is a rule to submit separate patch _series_. I also didn't know
>> (and as far as I know no one called me on it) that I am not supposed
>> to _apply_ dts changes. So far, I typically applied dts changes together
>> with driver patches after receiving an Acked-by: or Reviewed-by:
>> from a devicetree maintainer.
>
> I did not notice you applying them, but such guideline - DTS must go via
> respective SoC tree - was always repeated by me and SoC maintainers.
> Just like gazillion other things probably was not documented... or even
> if it was documented, it would be so deep among hundreds of other rules
> nobody would find it. :)
>
>>
>> This exchange suggests that I did it all wrong. Should I reject devicetree
>> patches submitted as part of a driver patch series going forward ?
>
> I propose: just ignore them. The SoC maintainer will pick them up.
>
>> Should I not apply dts patches submitted as part of a patch series ?
>
> No, please do not apply them.
Eh, English can be confusing. Let's make it easier to grasp:
"Please do not apply DTS patches to a driver subsystem."
Best regards,
Krzysztof
On 1/10/24 12:34, Krzysztof Kozlowski wrote:
> On 10/01/2024 20:06, Guenter Roeck wrote:
>> On 1/10/24 09:54, Krzysztof Kozlowski wrote:
>>> On 10/01/2024 16:54, Ninad Palsule wrote:
>>>> Hello Krzysztof,
>>>>
>>>>
>>>> On 1/10/24 09:37, Krzysztof Kozlowski wrote:
>>>>> On 10/01/2024 15:31, Ninad Palsule wrote:
>>>>>> Hello Krzysztof,
>>>>>>
>>>>>>
>>>>>>
>>>>>>>>>> I have send it as a separate commit. https://lore.kernel.org/linux-kernel/[email protected]/
>>>>>>>>> Why did you do that? It now just adds undocumented compatibles to the
>>>>>>>>> driver. Please, as Rob requested, work with Lukas on his series to make
>>>>>>>>> sure that these devices are documented.
>>>>>>>> I think krzysztof kozlowski suggested to send these patches separately:
>>>>>>>> https://lore.kernel.org/linux-kernel/[email protected]/
>>>>>>>>
>>>>>>>> Did I misunderstood it? Do you guys want me to include that commit again?
>>>>>>> My comment was in DTS thread under specific DTS patch. How did you
>>>>>>> figure out it applies to driver and bindings? This does not make sense.
>>>>>> Sorry for the misunderstanding. Where do you want me to add driver
>>>>>> patch? Before all DTS patches or after all DTS patches?
>>>>> Does not matter, why do you insist on combining them with DTS? Drivers
>>>>> and bindings are going together. DTS better separate, although depending
>>>>> on the case can be together.
>>>>>
>>>> I have combined DTS and Driver because DTS was using compatibility
>>>> string which is not upstream yet hence I thought it is logical to send
>>>> it under same patchset.
>>>
>>> Sometimes yes, sometimes not. DTS must not go via driver subsystem, so
>>> sending it in the same patchset has implications on maintainers applying
>>> it. Some like it, some don't and you will be nagged for combining them.
>>>
>>
>> "DTS must not go via driver subsystem"
>>
>> I always thought the guideline was to submit separate _patches_ for dts
>> and driver changes, but as part of a single series. I didn't know that
>> there is a rule to submit separate patch _series_. I also didn't know
>> (and as far as I know no one called me on it) that I am not supposed
>> to _apply_ dts changes. So far, I typically applied dts changes together
>> with driver patches after receiving an Acked-by: or Reviewed-by:
>> from a devicetree maintainer.
>
> I did not notice you applying them, but such guideline - DTS must go via
> respective SoC tree - was always repeated by me and SoC maintainers.
> Just like gazillion other things probably was not documented... or even
> if it was documented, it would be so deep among hundreds of other rules
> nobody would find it. :)
>
>>
>> This exchange suggests that I did it all wrong. Should I reject devicetree
>> patches submitted as part of a driver patch series going forward ?
>
> I propose: just ignore them. The SoC maintainer will pick them up.
>
>> Should I not apply dts patches submitted as part of a patch series ?
>
> No, please do not apply them.
>
>> If so, it would help to have some documentation I can point to to explain
>> the rationale to submitters (and myself). Also, in that case, how is the
>
> Yes, it would. I can try to create something.
>
>> synchronization between device tree patches and driver patches supposed
>> to happen ?
>
> There should not be synchronization. Just to remind: we talk about DTS
> (so also DTSI and DTSO), thus everything being in arch/*/boot/dts/. We
> do not talk about DT bindings, right? The bindings are obvious (and
> documented): preferably go via driver subsystem, with fallback/special
> cases via SoC tree and fallback to Rob.
>
Sorry, misunderstanding on my side. I do not and never did apply patches
in arch/*/boot/dts/. I referred to patches in Documentation/devicetree/
Sorry, I though you also referred to bindings. My bad.
Guenter