[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250520-cv18xx-mbox-v4-0-fd4f1c676d6e@pigmoral.tech>
Date: Tue, 20 May 2025 15:44:22 +0800
From: Junhui Liu <junhui.liu@...moral.tech>
To: Jassi Brar <jassisinghbrar@...il.com>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Chen Wang <unicorn_wang@...look.com>,
Inochi Amaoto <inochiama@...il.com>, Yuntao Dai <d1581209858@...e.com>,
Junhui Liu <junhui.liu@...moral.tech>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>, Albert Ou <aou@...s.berkeley.edu>,
Alexandre Ghiti <alex@...ti.fr>
Cc: linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
sophgo@...ts.linux.dev, linux-riscv@...ts.infradead.org
Subject: [PATCH v4 0/2] riscv: sophgo: add mailbox support for CV18XX
series SoC
Sophgo CV18XX series SoC has a mailbox module used to pass messages to
asymmetric processors. It has a total of 8 channels, each channel has a
length of 64bit.
Since the dts of cv18xx series are undergoing rework [1], the mailbox
node is not added in dts. It will be added later with the user (the
remoteproc node) together.
Tested on Milk-V Duo with CV1800B SoC, Milk-V Duo256M with SG2002 SoC
and Milk-V Duo S with SG2000 SoC by the mailbox-test client [2].
link: https://lore.kernel.org/sophgo/174710989159.597941.17259091695735282020.b4-ty@gmail.com/T/#m159cc72c6e4f89bfe14932f38ae93991e8cfa712 [1]
link: https://gist.github.com/pigmoral/70d0d0164dff7f9b95f59df50ef309d8 [2]
---
Changes in v4:
- Move processor ID description to the mbox-cells property in
dt-bindings.
- Drop the patch of adding mailbox node in dts for now.
- Add missing `__iomem` in the `MBOX_CONTEXT_BASE_INDEX` macro.
- Pass the address of the value read from the mailbox to
`mbox_chan_received_data()` instead of the mailbox's address.
- Link to v3: https://lore.kernel.org/r/20250428-cv18xx-mbox-v3-0-ed18dfd836d1@pigmoral.tech
Changes in v3:
- Update cv18x to CV18XX in commit messages and descriptions.
- Remove the `interrupt-names` property in dt-bindings, dts and driver.
- Move the mailbox node in dts to satisfy the address order.
- Remove `OF` dependency in Kconfig and the driver.
- Add copyright in the driver.
- Reorder the processes in dt-bindings and change the `RECV_CPU` macro
definition from 2 to 1 in the driver.
- Clean up and improve macro definitions and register access methods in
the driver.
- Improve the return value handling in the interrupt handler functions.
- Implement the `cv1800_last_tx_done` function.
- Link to v2: https://lore.kernel.org/r/SYBP282MB223825D5903777B937A8A377C4A02@SYBP282MB2238.AUSP282.PROD.OUTLOOK.COM
Changes in v2:
- drop 'recvid' 'sender' in dt-bindings
- fix compatible to 'cv1800-mailbox', and change filenames too
- change #mbox-cell to 2, for <channel tagert_cpu>
- add struct cv1800_mbox_chan_priv and function cv1800_mbox_xlate to extract
informations in mbox devicetree node of mailbox client
- Link to v1: https://lore.kernel.org/r/SYBP282MB2238DE0DA19C6EF411B2356CC4CE2@SYBP282MB2238.AUSP282.PROD.OUTLOOK.COM
---
Yuntao Dai (2):
dt-bindings: mailbox: add Sophgo CV18XX series SoC
mailbox: sophgo: add mailbox driver for CV18XX series SoC
.../bindings/mailbox/sophgo,cv1800b-mailbox.yaml | 60 ++++++
drivers/mailbox/Kconfig | 10 +
drivers/mailbox/Makefile | 2 +
drivers/mailbox/cv1800-mailbox.c | 220 +++++++++++++++++++++
4 files changed, 292 insertions(+)
---
base-commit: a5806cd506af5a7c19bcd596e4708b5c464bfd21
change-id: 20250421-cv18xx-mbox-6282d1e1734c
Best regards,
--
Junhui Liu <junhui.liu@...moral.tech>
Powered by blists - more mailing lists