From: Lukas Wunner <lukas@wunner.de>
To: Rob Herring <robh+dt@kernel.org>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Jarkko Sakkinen <jarkko@kernel.org>,
Peter Huewe <peterhuewe@gmx.de>, Jason Gunthorpe <jgg@ziepe.ca>,
devicetree@vger.kernel.org, linux-integrity@vger.kernel.org,
Lino Sanfilippo <LinoSanfilippo@gmx.de>,
Nayna Jain <nayna@linux.ibm.com>,
Thirupathaiah Annapureddy <thiruan@microsoft.com>,
Sasha Levin <sashal@kernel.org>,
Alexander Steffen <Alexander.Steffen@infineon.com>,
Johannes Holland <Johannes.Holland@infineon.com>,
Amir Mizinski <amirmizi6@gmail.com>,
Benoit HOUYERE <benoit.houyere@st.com>,
Peter Delevoryas <peter@pjd.dev>
Subject: Re: [PATCH v2 1/3] dt-bindings: tpm: Consolidate TCG TIS bindings
Date: Fri, 15 Dec 2023 16:24:11 +0100 [thread overview]
Message-ID: <20231215152411.GA20902@wunner.de> (raw)
In-Reply-To: <CAL_JsqJ=14b19yHZ=rnVd8uLu=kn5W9y0irk0XA983Eo+ByBnA@mail.gmail.com>
On Wed, Dec 13, 2023 at 11:01:21AM -0600, Rob Herring wrote:
> On Wed, Dec 13, 2023 at 10:23AM Lukas Wunner <lukas@wunner.de> 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
next prev parent reply other threads:[~2023-12-15 15:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-27 14:02 [PATCH v2 0/3] dt-bindings: tpm: Clean all the things Lukas Wunner
2023-11-27 14:02 ` [PATCH v2 1/3] dt-bindings: tpm: Consolidate TCG TIS bindings Lukas Wunner
2023-11-27 16:31 ` Rob Herring
2023-12-13 16:23 ` Lukas Wunner
2023-12-13 17:01 ` Rob Herring
2023-12-15 15:24 ` Lukas Wunner [this message]
2023-12-18 21:01 ` Rob Herring
2023-11-27 14:02 ` [PATCH v2 2/3] dt-bindings: tpm: Convert IBM vTPM bindings to DT schema Lukas Wunner
2023-11-27 14:02 ` [PATCH v2 3/3] dt-bindings: tpm: Document Microsoft fTPM bindings Lukas Wunner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231215152411.GA20902@wunner.de \
--to=lukas@wunner.de \
--cc=Alexander.Steffen@infineon.com \
--cc=Johannes.Holland@infineon.com \
--cc=LinoSanfilippo@gmx.de \
--cc=amirmizi6@gmail.com \
--cc=benoit.houyere@st.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jarkko@kernel.org \
--cc=jgg@ziepe.ca \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-integrity@vger.kernel.org \
--cc=nayna@linux.ibm.com \
--cc=peter@pjd.dev \
--cc=peterhuewe@gmx.de \
--cc=robh+dt@kernel.org \
--cc=sashal@kernel.org \
--cc=thiruan@microsoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).