From: Conor Dooley <conor@kernel.org>
To: Yuntao Dai <d1581209858@live.com>
Cc: jassisinghbrar@gmail.com, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, unicorn_wang@outlook.com,
inochiama@outlook.com, paul.walmsley@sifive.com,
palmer@dabbelt.com, aou@eecs.berkeley.edu,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
linux-riscv@lists.infradead.org
Subject: Re: [PATCH 1/3] dt-bindings: mailbox: add Sophgo cv18x SoCs mailbox
Date: Tue, 18 Jun 2024 16:38:38 +0100 [thread overview]
Message-ID: <20240618-monastery-manger-1a7d9a272f11@spud> (raw)
In-Reply-To: <SYBP282MB22389FD1E07BBDC6FE1D90A0C4CE2@SYBP282MB2238.AUSP282.PROD.OUTLOOK.COM>
[-- Attachment #1: Type: text/plain, Size: 2944 bytes --]
On Tue, Jun 18, 2024 at 11:12:33PM +0800, Yuntao Dai wrote:
> Add devicetree bindings documentation for Sophgo cv18x SoCs mailbox
>
> Signed-off-by: Yuntao Dai <d1581209858@live.com>
> ---
> .../mailbox/sophgo,cv1800b-mailbox.yaml | 75 +++++++++++++++++++
> 1 file changed, 75 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/mailbox/sophgo,cv1800b-mailbox.yaml
>
> diff --git a/Documentation/devicetree/bindings/mailbox/sophgo,cv1800b-mailbox.yaml b/Documentation/devicetree/bindings/mailbox/sophgo,cv1800b-mailbox.yaml
> new file mode 100644
> index 000000000..e1868aaf2
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mailbox/sophgo,cv1800b-mailbox.yaml
> @@ -0,0 +1,75 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mailbox/sophgo,cv1800b-mailbox.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Sophgo cv1800b mailbox controller
> +
> +maintainers:
> + - Yuntao Dai <d1581209858@live.com>
> +
> +description:
> + The Sophgo cv18x SoCs mailbox has 8 channels and 8 bytes per channel for
> + different processors. Any processer can write data in a channel, and
> + set co-responding register to raise interrupt to notice another processor,
> + and it is allowed to send data to itself.
> + Sophgo cv18x SoCs has 3 processors and numbered as
> + <1> C906L
> + <2> C906B
> + <3> 8051
> +
> +properties:
> + compatible:
> + enum:
> + - sophgo,cv1800b-mailbox
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + interrupt-names:
> + const: mailbox
> +
> + recvid:
> + maxItems: 1
> + description:
> + This cell indicates the mailbox controller is running on which processor
You can just look up your hartid at runtime, wouldn't that be
sufficient?
> +
> + sendto:
> + maxItems: 1
> + description:
> + This cell indicates the message sends to which processor
Can't this go into an mbox cell? Having this property would limit the
mailbox to only communicating with 1 of the 2 available processors.
Cheers,
Conor.
> +
> +
> + "#mbox-cells":
> + const: 1
> + description:
> + This cell indicates which channel is used
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - recvid
> + - sendto
> + - "#mbox-cells"
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/interrupt-controller/irq.h>
> +
> + mailbox: mailbox@1900000 {
> + compatible = "sophgo,cv1800b-mailbox";
> + reg = <0x01900000 0x1000>;
> + interrupts = <101 IRQ_TYPE_LEVEL_HIGH>;
> + interrupt-names = "mailbox";
> + interrupt-parent = <&plic>;
> + recvid = <1>;
> + sendto = <2>;
> + #mbox-cells = <1>;
> + };
> --
> 2.17.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2024-06-18 15:38 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-18 15:03 [PATCH 0/3] riscv: sophgo: add mailbox support for cv18x SoCs Yuntao Dai
2024-06-18 15:12 ` [PATCH 1/3] dt-bindings: mailbox: add Sophgo cv18x SoCs mailbox Yuntao Dai
2024-06-18 15:38 ` Conor Dooley [this message]
2024-06-19 14:33 ` 韵涛 代
2024-06-19 18:07 ` Conor Dooley
2024-06-18 16:54 ` Rob Herring (Arm)
2024-06-19 14:40 ` 韵涛 代
2024-06-18 22:33 ` Inochi Amaoto
2024-06-19 14:42 ` 韵涛 代
2024-06-18 22:45 ` Inochi Amaoto
[not found] ` <IA1PR20MB4953CE25C805EB66EFFDC36DBBCE2@IA1PR20MB4953.namprd20.prod.outlook.c om>
2024-07-14 16:04 ` Yuntao Dai
2024-06-18 23:21 ` kernel test robot
2024-06-18 15:12 ` [PATCH 2/3] riscv: dts: add mailbox for Sophgo cv18x SoCs Yuntao Dai
2024-06-18 15:12 ` [PATCH 3/3] mailbox: sophgo: add mailbox driver for " Yuntao Dai
2024-06-19 18:15 ` kernel test robot
2024-06-20 1:27 ` kernel test robot
2024-06-21 0:21 ` kernel test robot
2024-06-21 13:37 ` kernel test robot
2024-07-02 15:08 ` Junhui Liu
2024-07-14 16:09 ` Yuntao Dai
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=20240618-monastery-manger-1a7d9a272f11@spud \
--to=conor@kernel.org \
--cc=aou@eecs.berkeley.edu \
--cc=conor+dt@kernel.org \
--cc=d1581209858@live.com \
--cc=devicetree@vger.kernel.org \
--cc=inochiama@outlook.com \
--cc=jassisinghbrar@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=robh@kernel.org \
--cc=unicorn_wang@outlook.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;
as well as URLs for NNTP newsgroup(s).