From: Krzysztof Kozlowski <krzk@kernel.org>
To: Icenowy Zheng <uwu@icenowy.me>, Drew Fustini <fustini@kernel.org>,
Guo Ren <guoren@kernel.org>, Fu Wei <wefu@redhat.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Jassi Brar <jassisinghbrar@gmail.com>,
Michal Wilczynski <m.wilczynski@samsung.com>
Cc: Han Gao <rabenda.cn@gmail.com>,
Inochi Amaoto <inochiama@gmail.com>, Yao Zi <ziyao@disroot.org>,
linux-riscv@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 1/4] dt-bindings: mailbox: thead,th1520-mbox: retrofit for other mailboxes
Date: Thu, 14 Aug 2025 09:18:06 +0200 [thread overview]
Message-ID: <d7278d14-2c7e-4414-9ae6-7639d8f69c94@kernel.org> (raw)
In-Reply-To: <20250814070757.2267325-2-uwu@icenowy.me>
On 14/08/2025 09:07, Icenowy Zheng wrote:
> The current binding of thead,th1520-mbox can only apply to the C910T
> mailbox (which has an ID of 0).
>
> Because of the weird mailbox register mapping practice for world
> seperation on TH1520, the binding needs some reword, in addition to add
> a property for mailbox ID, to describe other mailboxes.
>
> Update the binding, in order to make it suitable to describe other
But I do not see any new device being added.
> mailboxes. The example is also updated, with an addition of mbox_c910t
> label to show that the example describes this specfiic mailbox, mailbox
> ID added and the register window sizes updated to the values from the
> manual (previously the remote-icu0 register windows is declared to be
> overly small that it would never work).
>
> Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
> ---
> .../bindings/mailbox/thead,th1520-mbox.yaml | 49 ++++++++++++++-----
> 1 file changed, 36 insertions(+), 13 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/mailbox/thead,th1520-mbox.yaml b/Documentation/devicetree/bindings/mailbox/thead,th1520-mbox.yaml
> index 0971fb97896ef..5a24d2e8a6a8c 100644
> --- a/Documentation/devicetree/bindings/mailbox/thead,th1520-mbox.yaml
> +++ b/Documentation/devicetree/bindings/mailbox/thead,th1520-mbox.yaml
> @@ -12,6 +12,17 @@ description:
> through mailbox channels. It also allows one core to signal another processor
> using interrupts via the Interrupt Controller Unit (ICU).
>
> + The SoC is divided to two worlds, REE and TEE, although it's currently unknown
> + how to enable the seperation between worlds so the seperation does not exist
> + yet. However each mailbox is assigned to a certain world, and register windows
> + for mailboxes are assigned to different worlds too. In a certain world's
> + register windows for mailboxes, only mailboxes assigned to this world will
> + have the local ICU part mapped (in addition to the remote ICU part of the
> + other same-world mailbox), and mailboxes assigned to the other world have
> + only the coressponding remote ICU part mapped to this world. Two mailboxes
> + (C910T and E902) are assigned to the TEE world and two mailboxes (C906 and
> + C910R) are assigned to the REE world.
> +
> maintainers:
> - Michal Wilczynski <m.wilczynski@samsung.com>
>
> @@ -22,9 +33,9 @@ properties:
> clocks:
> items:
> - description: Clock for the local mailbox
> - - description: Clock for remote ICU 0
> - - description: Clock for remote ICU 1
> - - description: Clock for remote ICU 2
> + - description: Clock for the other mailbox in the same world
> + - description: Clock for the first mailbox in the other world
> + - description: Clock for the second mailbox in the other world
>
> clock-names:
> items:
> @@ -35,10 +46,14 @@ properties:
>
> reg:
> items:
> - - description: Mailbox local base address
> - - description: Remote ICU 0 base address
> - - description: Remote ICU 1 base address
> - - description: Remote ICU 2 base address
> + - description: Base address of this specific mailbox
> + - description: Base address of the other mailbox in the same world
> + - description:
> + Base address of the register window in this world corresponding to the
> + first other-world mailbox.
> + - description:
> + Base address of the register window in this world corresponding to the
> + second other-world mailbox.
This feels like ABI change.
>
> reg-names:
> items:
> @@ -50,10 +65,17 @@ properties:
> interrupts:
> maxItems: 1
>
> + thead,mbox-id:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description:
> + The ID of this specific mailbox that this device tree node describes. For
> + compatibility with old device trees, if missing, the ID is default to 0,
> + the C910T mailbox.
No, you cannot have instance IDs. It's even explicitly documented in
writing bindings.
> +
> '#mbox-cells':
> const: 1
> description:
> - The one and only cell describes destination CPU ID.
> + The one and only cell describes destination mailbox ID.
>
> required:
> - compatible
> @@ -72,12 +94,12 @@ examples:
> soc {
> #address-cells = <2>;
> #size-cells = <2>;
> - mailbox@ffffc38000 {
> + mbox_c910t: mailbox@ffffc38000 {
No, don't add unused labels. This is not improving the binding.
Best regards,
Krzysztof
next prev parent reply other threads:[~2025-08-14 7:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-14 7:07 [RFC PATCH 0/4] riscv: dts: thead: th1520: Add mailbox for SBI-to-AON comm Icenowy Zheng
2025-08-14 7:07 ` [RFC PATCH 1/4] dt-bindings: mailbox: thead,th1520-mbox: retrofit for other mailboxes Icenowy Zheng
2025-08-14 7:18 ` Krzysztof Kozlowski [this message]
2025-08-14 7:34 ` Icenowy Zheng
2025-08-14 7:48 ` Krzysztof Kozlowski
2025-08-14 8:02 ` Icenowy Zheng
2025-08-14 7:07 ` [RFC PATCH 2/4] dt-bindings: firmware: thead,th1520-aon: add a mailbox name for SBI Icenowy Zheng
2025-08-14 7:18 ` Krzysztof Kozlowski
2025-08-14 7:30 ` Icenowy Zheng
2025-08-14 7:49 ` Krzysztof Kozlowski
2025-08-14 8:04 ` Icenowy Zheng
2025-08-15 6:14 ` Krzysztof Kozlowski
2025-08-14 7:07 ` [RFC PATCH 3/4] riscv: dts: thead: th1520: add reserved node for C910R mailbox Icenowy Zheng
2025-08-14 7:07 ` [RFC PATCH 4/4] riscv: dts: thead: th1520: add mailbox channel for SBI-to-AON comm Icenowy Zheng
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=d7278d14-2c7e-4414-9ae6-7639d8f69c94@kernel.org \
--to=krzk@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=fustini@kernel.org \
--cc=guoren@kernel.org \
--cc=inochiama@gmail.com \
--cc=jassisinghbrar@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=m.wilczynski@samsung.com \
--cc=rabenda.cn@gmail.com \
--cc=robh@kernel.org \
--cc=uwu@icenowy.me \
--cc=wefu@redhat.com \
--cc=ziyao@disroot.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®