From: Souvik Chakravarty <souvik.chakravarty@arm.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Cristian Marussi <cristian.marussi@arm.com>,
Takahiro Akashi <takahiro.akashi@linaro.org>,
Oleksii Moisieiev <Oleksii_Moisieiev@epam.com>,
"sudeep.holla@arm.com" <sudeep.holla@arm.com>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>
Subject: Re: [RFC v5 5/5] dt-bindings: firmware: arm,scmi: Add support for pinctrl protocol
Date: Mon, 13 Nov 2023 14:23:23 +0000 [thread overview]
Message-ID: <604aee95-ad46-4102-80aa-71c2c9d1729c@arm.com> (raw)
In-Reply-To: <CACRpkdaRY+rU+md-r5gVyFH5ATt3Pqp9=M4=+WArYkfVLAFdpw@mail.gmail.com>
Hi Linus,
On 13/11/2023 13:32, Linus Walleij wrote:
> Hi Souvik,
>
> thanks for looking into this!
>
> On Mon, Nov 13, 2023 at 1:56 PM Souvik Chakravarty
> <souvik.chakravarty@arm.com> wrote:
>
>> The initial assumption always was that GPIOs can be considered as a
>> specific function. Note that the spec does not define the types of
>> function and leaves it to the DT binding (or driver) to figure out the
>> function descriptions/names.
>
> Does this mean that each system using pinctrl-SCMI will need
> to specify the available pins, groups and functions in a device tree
> binding? For e.g. DT validation using schema?
Sorry seems I made a typo above ("descriptions/names" should have been
"description from names") which resulted in turning things on its head.
I really meant that the driver has to figure out the exact type or
meaning of what the function does from its name. SCMI still continues to
provide the list of pins/groups/functions and their names.
Regards,
Souvik
>
> This creates the problem of where to put it since
> Documentation/devicetree/bindings/firmware/arm,scmi.yaml
> is all we have, and for schemas to be applicable the implicit
> assumption is that this is done per-compatible.
>
> If we want to use device tree validation of the strings put into
> the pinctrl node we need to allow for a per-soc compatible
> under the pinctrl node like:
>
> protocol@19 {
> compatible = "vendor,soc-scmi-pinctrl";
> (...)
>
> Then a DT schema can be made to match that and check it.
>
> I'm uncertain about that because the SCMI binding has nothing
> like this at the moment, all the protocol nodes are pretty
> self-describing and don't seem to need any further configuration
> to be used, but pin control may be the first instance where we
> have to add some per-soc configuration into the protocol nodes :/
>
> It's easy to do:
>
> + protocol@19:
> + type: object
> + allOf:
> + - $ref: "#/$defs/protocol-node"
> + - $ref: "../pinctrl/pinctrl.yaml"
> + unevaluatedProperties: false
> +
> + properties:
>
> compatible:
> items:
> - enum:
> - vendor1,soc1-scmi-pinctrl
> - vendor2,soc2-scmi-pinctrl
> - vendor3,soc3-scmi-pinctrl
>
> This should be enough for just establishing the different
> pin control configurations we can have in the device tree.
>
> We are then able to put a more detailed schema for the
> specific SoC pin control, such as a list of valid groups and
> functions etc under the ordinary pinctrl bindings such as
> Documentation/devicetree/bindings/pinctrl/vendor1,soc1-scmi-pinctrl.yaml
> etc.
>
> We should preferably put some pattern like this in place from
> day 1 so developers know what is expected here. A mock
> SoC is fine for the time being (we can delete it later when there
> are some serious ones).
>
> I'm uncertain because it feels like a first thing, but I can't really
> think how it would work otherwise, part of me don't want to
> pollute the SCMI binding with any per-soc compatibles, but
> yet since these group and function strings will be per-soc I don't
> see any other way, if they are supposed to be validated
> with schema.
>
> Yours,
> Linus Walleij
next prev parent reply other threads:[~2023-11-13 14:23 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-27 6:28 [RFC v5 0/4] firmware: arm_scmi: Add SCMI v3.2 pincontrol protocol basic support Oleksii Moisieiev
2023-10-27 6:28 ` [RFC v5 1/5] firmware: arm_scmi: Add optional flags to extended names helper Oleksii Moisieiev
2023-11-02 7:06 ` Cristian Marussi
2023-10-27 6:28 ` [RFC v5 2/5] drivers: firmware: scmi: Introduce scmi_get_max_msg_size function Oleksii Moisieiev
2023-11-02 7:29 ` Cristian Marussi
2023-11-02 13:57 ` Oleksii Moisieiev
2023-11-02 15:04 ` Cristian Marussi
2023-10-27 6:28 ` [RFC v5 3/5] firmware: arm_scmi: Add SCMI v3.2 pincontrol protocol basic support Oleksii Moisieiev
2023-11-02 8:06 ` Cristian Marussi
2023-11-06 2:26 ` AKASHI Takahiro
2023-11-06 2:28 ` AKASHI Takahiro
2023-10-27 6:28 ` [RFC v5 4/5] pinctrl: Implementation of the generic scmi-pinctrl driver Oleksii Moisieiev
2023-10-27 6:28 ` [RFC v5 5/5] dt-bindings: firmware: arm,scmi: Add support for pinctrl protocol Oleksii Moisieiev
2023-10-27 8:56 ` Krzysztof Kozlowski
2023-11-01 14:09 ` Oleksii Moisieiev
2023-10-27 11:54 ` Rob Herring
2023-11-06 13:12 ` Linus Walleij
2023-11-10 0:58 ` Takahiro Akashi
2023-11-10 15:24 ` Cristian Marussi
2023-11-13 12:56 ` Souvik Chakravarty
2023-11-13 13:32 ` Linus Walleij
2023-11-13 14:23 ` Souvik Chakravarty [this message]
2023-11-14 13:13 ` Linus Walleij
2023-11-05 21:50 ` [RFC v5 0/4] firmware: arm_scmi: Add SCMI v3.2 pincontrol protocol basic support Linus Walleij
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=604aee95-ad46-4102-80aa-71c2c9d1729c@arm.com \
--to=souvik.chakravarty@arm.com \
--cc=Oleksii_Moisieiev@epam.com \
--cc=conor+dt@kernel.org \
--cc=cristian.marussi@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=sudeep.holla@arm.com \
--cc=takahiro.akashi@linaro.org \
/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
all inboxes | Powered by JetHome®