[PATCH] dt-bindings: firmware: arm,scmi: Restrict protocol child node properties

Rob Herring robh at kernel.org
Fri Jan 27 10:52:33 PST 2023


On Thu, Jan 26, 2023 at 11:04 AM Sudeep Holla <sudeep.holla at arm.com> wrote:
>
> On Thu, Jan 26, 2023 at 09:25:12AM -0600, Rob Herring wrote:
> > On Thu, Jan 26, 2023 at 8:46 AM Sudeep Holla <sudeep.holla at arm.com> wrote:
> > >
> > > On Thu, Jan 26, 2023 at 09:43:44AM +0000, Cristian Marussi wrote:
> > > > On Wed, Jan 25, 2023 at 02:11:13PM +0000, Sudeep Holla wrote:
> > > > > On Wed, Jan 25, 2023 at 01:43:48PM +0000, Cristian Marussi wrote:
> > > > > > so now that the catch-all protocol@ patternProperty is gone in favour
> > > > > > of the 'protocol-node' definition and $refs, does that mean that any
> > > > > > current and future SCMI officially published protocol <N> has to be
> > > > > > added to the above explicit protocol list, even though it does not
> > > > > > have any special additional required property beside reg ?
> > > > > > (like protocol at 18 above...)
> > > > > >
> > > > >
> > > > > If there are no consumers, should we just not add and deal with it
> > > > > entirely within the kernel. I know we rely today on presence of node
> > > > > before we initialise, but hey we have exception for system power protocol
> > > > > for other reasons, why not add this one too.
> > > > >
> > > > > In short we shouldn't have to add a node if there are no consumers. It
> > > > > was one of the topic of discussion initially when SCMI binding was added
> > > > > and they exist only for the consumers otherwise we don't need it as
> > > > > everything is discoverable from the interface.
> > > >
> > > > It is fine for me the no-consumers/no-node argument (which anyway would
> > > > require a few changes in the core init logic anyway to work this way...),
> > > > BUT is it not that ANY protocol (even future-ones) does have, potentially,
> > > > consumers indeed, since each protocol-node can potentially have a dedicated
> > > > channel and related DT channel-descriptor ? (when multiple channels are
> > > > allowed by the transport)
> > > >
> > > > I mean, as an example, you dont strictly need protos 0x18/0x12 nodes for
> > > > anything (if we patch the core init as said) UNLESS you want to dedicate
> > > > a channel to those protocols; so I'm just checking here if these kind of
> > > > scenarios will still be allowed with this binding change, or if I am
> > > > missing something.
> > >
> > > Ah, good point on the transport information. Yes we will need a node if
> > > a protocol has a dedicated transport. No one has used so far other than
> > > Juno perf, but we never know. We can always extended the bindings if
> > > needed.
> > >
> > > Sorry for missing the dedicated transport part.
> >
> > So I need to add back 'protocol at .*' or not?
>
> IMO it is better to know what exactly gets added under each of these protocol
> sub-nodes and so better to have entry specific to each known protocols. I
> liked that fact with this change as I have seen some crazy vendor extensions
> adding all sorts of non-sense defining some vendor protocol. For example [1],
> in which case we can catch those better than existing schema which matches
> all. So let's not add protocol at .* if possible or until that becomes the only
> cleaner way to maintain this.

TBC, 'protocol at .*' would not allow anything but the properties defined
in the /$defs/protocol-node. So [1] would throw errors without a
schema addition.

We should either do that along with dropping 'protocol at 18' or we keep
protocol 0x18 node and add all other providerless protocols. I don't
think we need the latter to just check unit-address vs. reg. I want to
come up with a better way to do that (dtc does some, but only for
defined bus types).

Rob



More information about the linux-arm-kernel mailing list