Re: [PATCH v2 1/3] dt-bindings: tpm: Consolidate TCG TIS bindings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 13, 2023 at 11:01:21AM -0600, Rob Herring wrote:
> On Wed, Dec 13, 2023 at 10:23AM Lukas Wunner <lukas@xxxxxxxxx> wrote:
> > Ideally the validator would match a regex against the $nodename of the
> > parent and see if it contains "spi" or "i2c".  But I think matching
> > against the parent's $nodename isn't possible, is it?
> 
> No. I've thought of adding something like that, but haven't.

Please consider this a feature request. :)

It would be good if it were possible to define constraints not just
for the $nodename of the parent, but any of its properties.

E.g. with i2c, the clock-frequency is set at the host controller's
devicetree node, not at each attached i2c peripheral's node.
For ACPI, i2c_acpi_find_bus_speed() walks the bus to find the
highest clock speed supported by all attached i2c peripherals,
but for OF, the onus is on the devicetree author to manually
determine the clock.

Thus, for a TPM such as infineon,slb9635tt which only supports 100 kHz,
I want to validate that the parent node's clock-frequency is less than
or equal to that.

In Documentation/devicetree/bindings/security/tpm/st33zp24-i2c.txt
there's an example showing a clock-frequency property at the
peripheral's node and I mistakenly carried that over to the yaml
schema.  A look at the code reveals that's entirely bogus so I'll
drop the clock-frequency property in v3.  I will retain textual
hints that infineon,slb9635tt is limited to 100 kHz and
infineon,slb9645tt to 400 kHz, but as it stands I can't define
rules that would allow the validator to check that automatically.

Thanks,

Lukas




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux