From: Tudor Ambarus <tudor.ambarus@linaro.org>
To: Jassi Brar <jassisinghbrar@gmail.com>
Cc: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Alim Akhtar <alim.akhtar@samsung.com>,
linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
andre.draszik@linaro.org, peter.griffin@linaro.org,
kernel-team@android.com, willmcvicker@google.com,
daniel.lezcano@linaro.org, vincent.guittot@linaro.org,
ulf.hansson@linaro.org, arnd@arndb.de
Subject: Re: [PATCH v5 1/3] dt-bindings: mailbox: add google,gs101-mbox
Date: Sat, 21 Dec 2024 06:45:27 +0000 [thread overview]
Message-ID: <eaab647a-f6f4-4562-89fa-e64daa80bdf4@linaro.org> (raw)
In-Reply-To: <CABb+yY0rBzP8JPAik5aaXp6GivQKEf++sgiMM9fTPgd_5YXT1w@mail.gmail.com>
Hi, Jassi,
Thanks for the review!
On 12/21/24 2:19 AM, Jassi Brar wrote:
> On Thu, Dec 19, 2024 at 4:51 AM Tudor Ambarus <tudor.ambarus@linaro.org> wrote:
>>
>> Hi, Krzysztof, Jassi,
>>
>> On 12/17/24 9:40 AM, Tudor Ambarus wrote:
>>
>>> diff --git a/Documentation/devicetree/bindings/mailbox/google,gs101-mbox.yaml b/Documentation/devicetree/bindings/mailbox/google,gs101-mbox.yaml
>>
>> cut
>>
>>> +
>>> + '#mbox-cells':
>>> + description: |
>>> + <&phandle type channel>
>>> + phandle : label name of controller.
>>> + type : channel type, doorbell or data-transfer.
>>> + channel : channel number.
>>> +
>>> + Here is how a client can reference them:
>>> + mboxes = <&ap2apm_mailbox DOORBELL 2>;
>>> + mboxes = <&ap2apm_mailbox DATA 3>;
>>> + const: 2
>>> +
>>
>> Revisiting this, I think that for the ACPM interface mailbox client use
>> case, it would be better to introduce a mbox property where I reference
>> just the phandle to the controller:
>> mbox = <&ap2apm_mailbox>;
>>
>> The ACPM interface discovers the mailbox channel IDs at runtime by
>> parsing SRAM. And all ACPM's channels are of type DOORBELL, thus
>> specifying the type and channel in DT is redundant.
>>
>> It would require to extend a bit the mailbox core to provide a
>> mbox_request_channel_by_args() method. I already wrote a draft and
>> tested it.
>>
>> Do you find the idea fine?
>>
> Looking at v6, I prefer this version... maybe modify it a bit.
Just to summarize for the readers, in the end I chose for the
controllers to allow #mbox-cells = <0>; and for the clients to still use
the mboxes property, but just to reference the phandle to the controller:
mboxes = <&ap2apm_mailbox>;
Then I updated the mailbox core to allow clients to request channels by
passing some args containing channel identifiers to the controllers,
that the controllers xlate() using their own method.
>
> Even if you get the channel number at runtime, the type (Data vs
> Doorbell) is static and needs to be passed via DT. You may have
> mbox = <&ap2apm_mailbox DOORBELL>;
The ACPM interface uses mailbox always in DOORBELL mode. If it has some
data to send, it will always send it via SRAM. Do I still need to
specify the channel type in DT?
For all the other mailbox clients than ACPM, that will reference the
same mailbox controller (same compatible if you want), I'm thinking that
we'll update the #mbox-cells to have an maxItems of 2, where they'll be
able to pass the channel ID and type via DT.
ACPM has its own dedicated mailbox controller ap2apm_mailbox, thus it uses:
#mbox-cells = <0>;
channels IDs are from SRAM and type is always DOORBELL.
All the other mailbox controllers using the same compatible will use
#mbox-cells = <2>;
> and in your custom of_xlate implementation return any available
> "virtual" channel. You could use 'void *data' in
Would you please extend this idea a little bit? What is a virtual channel?
In the ACPM interface mailbox client I request all the channels that are
advertised in SRAM, each mailbox channel has a 1 to 1 relation with a
h/w channel ID.
Cheers,
ta
> exynos_mbox_send_data() to pass the h/w channel-id, instead of the
> index of the virtual channel.
>
> Thanks.
next prev parent reply other threads:[~2024-12-21 6:45 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-17 9:40 [PATCH v5 0/3] mailbox: add Samsung Exynos driver Tudor Ambarus
2024-12-17 9:40 ` [PATCH v5 1/3] dt-bindings: mailbox: add google,gs101-mbox Tudor Ambarus
2024-12-18 9:29 ` Krzysztof Kozlowski
2024-12-18 11:23 ` Peter Griffin
2024-12-18 12:39 ` Tudor Ambarus
2024-12-19 10:50 ` Tudor Ambarus
2024-12-21 2:19 ` Jassi Brar
2024-12-21 6:45 ` Tudor Ambarus [this message]
2025-01-03 3:39 ` Jassi Brar
2025-01-03 9:57 ` Tudor Ambarus
2025-01-08 9:38 ` Tudor Ambarus
2025-01-12 16:59 ` Jassi Brar
2025-01-13 9:34 ` Tudor Ambarus
2025-01-13 16:52 ` Jassi Brar
2024-12-17 9:40 ` [PATCH v5 2/3] mailbox: add Samsung Exynos driver Tudor Ambarus
2024-12-18 10:20 ` Krzysztof Kozlowski
2024-12-18 11:58 ` Peter Griffin
2024-12-18 16:58 ` Jassi Brar
2024-12-17 9:40 ` [PATCH v5 3/3] MAINTAINERS: add entry for Samsung Exynos mailbox driver Tudor Ambarus
2024-12-18 10:20 ` Krzysztof Kozlowski
2024-12-18 11:08 ` Peter Griffin
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=eaab647a-f6f4-4562-89fa-e64daa80bdf4@linaro.org \
--to=tudor.ambarus@linaro.org \
--cc=alim.akhtar@samsung.com \
--cc=andre.draszik@linaro.org \
--cc=arnd@arndb.de \
--cc=conor+dt@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=jassisinghbrar@gmail.com \
--cc=kernel-team@android.com \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=peter.griffin@linaro.org \
--cc=robh@kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=vincent.guittot@linaro.org \
--cc=willmcvicker@google.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
all inboxes | Powered by JetHome®