From: Cristian Marussi <cristian.marussi@arm.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: girish.pathak@arm.com,
Cristian Marussi <cristian.marussi@arm.com>,
arm-scmi@vger.kernel.org, vincent.guittot@linaro.org,
Linus Walleij <linus.walleij@linaro.org>,
Souvik.Chakravarty@arm.com
Subject: Re: Question about identifiers
Date: Tue, 29 Oct 2024 09:42:24 +0000 [thread overview]
Message-ID: <ZyCuAKfqRnuFdAwC@pluto> (raw)
In-Reply-To: <c5fdc171-0dc7-4c38-88e7-fcf9de7cbec2@stanley.mountain>
On Mon, Oct 28, 2024 at 06:09:50PM +0300, Dan Carpenter wrote:
> Two questions:
[CC: Souvik]
Hi Dan,
>
> 1) In SCMI pinctrl protocol each pin, group or function has an identifier.
> uint32 identifier
> Identifiers are limited to 16 bits, and the upper 16 bits of this
> field are ignored by the platform.
> The linux-kernel assumes that the identifiers are basically, 0 to nr_pins,
> 0 to nr_groups and 0 to nr_funcs. Is that a fair assumption to make?
It's not an assumption really, any SCMI resource on the system, across
all of the protocols, is identified by a number in the *contiguos* range
(0... TOT_RESOURCE - 1) where TOT_RESOURCE is usually gathered with some
discovery initial command...looking at Pinctrl specifically in 4.11:
"Protocol commands take integer identifiers to describe a pin, group, or function.
The identifiers are sequential and start from 0."
Pinctrl deviates a bit from this since you have 3 different kind of
resources, so you have 3 different TOT_RESOURCES values to query.
...maybe adding "sequential and contiguos" would have been clearer...or
maybe it is just that I am used to SCMI spec parlance/world so I
implictly interepret like this...
IOW, for any protocol, in general, the platform is expected to expose
to the agent a contiguos set of IDs numbered from zero...i.e. without
holes due to reason like 'resource X is not present on platform Y so
we'll leave a hole in the set of IDs returned at discovery time because
is easier than remap the physical resources to the set of IDs exposed to
the agent'
>
> 2) In the spec 4.11.2.7 PINCTRL_SETTINGS_GET and 4.11.2.8
> PINCTRL_SETTINGS_CONFIGURE it only allows for pins and groups, not functions.
> Meanwhile gpio functions are functions. That's just a mistake, right? I've
> been working under the assumtion that it is.
>
Mmm, there were a lot of discussions around functions and GPIOs (which I
dont recall now) and a last minute rework to some commands in that
regards, so that now you can use those 2 commands to (optionally) get/set
the selected function for a pin or group specified in the command.
All the other configurations are, indeed, only pertaining to pin and groups:
what do you think is missing around functions ?
Moreover, are you sure that you have the latest v3.2 spec from developer.arm.com ?
Since there were a lot of betaS for v3.2 cycle...with changes especially
around functions/gpios...so many betaS that, till last month, AFAICS, even
the ACS SCMI compliance suite on the tip of master (still not an official
release, though) was broken, since it was really implementing Pinctrl
testcases against an old obsolete v3.2-beta (i.e. testing non-existent/older
pinctrl commands...and I have fixes to upstream for this...once I'll have a
bit of time...)
Thanks,
Cristian
next prev parent reply other threads:[~2024-10-29 9:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-28 15:09 Question about identifiers Dan Carpenter
2024-10-29 9:42 ` Cristian Marussi [this message]
2024-10-29 10:09 ` Vincent Guittot
2024-10-29 10:30 ` Dan Carpenter
2024-10-29 10:48 ` Vincent Guittot
2024-10-29 10:20 ` Dan Carpenter
2024-10-29 10:32 ` Cristian Marussi
2024-10-30 10:35 ` Souvik Chakravarty
2024-11-01 16:08 ` Dan Carpenter
2024-11-09 0:04 ` 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=ZyCuAKfqRnuFdAwC@pluto \
--to=cristian.marussi@arm.com \
--cc=Souvik.Chakravarty@arm.com \
--cc=arm-scmi@vger.kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=girish.pathak@arm.com \
--cc=linus.walleij@linaro.org \
--cc=vincent.guittot@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.