From: "Ondřej Jirman" <megous-5qf/QAjKc83QT0dZR+AlfA@public.gmane.org>
To: Samuel Holland <samuel-RkNLwX/CsU9g9hUCZPvPmw@public.gmane.org>
Cc: Maxime Ripard
<maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org>,
Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>,
Jassi Brar
<jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Michael Turquette
<mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>,
Stephen Boyd <sboyd-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
Corentin Labbe
<clabbe.montjoie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Vasily Khoruzhick
<anarsoul-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org,
linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH v4 00/10] Allwinner sunxi message box support
Date: Mon, 9 Sep 2019 05:22:08 +0200 [thread overview]
Message-ID: <20190909032208.rlorx2ppytymtyej@core.my.home> (raw)
In-Reply-To: <20190820032311.6506-1-samuel-RkNLwX/CsU9g9hUCZPvPmw@public.gmane.org>
Hello Samuel,
On Mon, Aug 19, 2019 at 10:23:01PM -0500, Samuel Holland wrote:
> This series adds support for the "hardware message box" in sun8i, sun9i,
> and sun50i SoCs, used for communication with the ARISC management
> processor (the platform's equivalent of the ARM SCP). The end goal is to
> use the arm_scpi driver as a client, communicating with firmware running
> on the AR100 CPU, or to use the mailbox to forward NMIs that the
> firmware picks up from R_INTC.
>
> Unfortunately, the ARM SCPI client no longer works with this driver
> since it now exposes all 8 hardware FIFOs individually. The SCPI client
> could be made to work (and I posted proof-of-concept code to that effect
> with v1 of this series), but that is a low priority, as Linux does not
> directly use SCPI with the current firmware version; all SCPI use goes
> through ATF via PSCI.
>
> As requested in the comments to v3 of this patchset, a demo client is
> provided in the final patch. This demo goes along with a toy firmware
> which shows that the driver does indeed work for two-way communication
> on all channels. To build the firmware component, run:
I've tried using this driver with mainline arm_scpi driver (which is probably
an expected future use, since crust provides SCPI interface).
The problem I've found is that arm_scpi expects message box to be
bi-directional, but this driver provides uni-directional interface.
What do you think about making this driver provide bi-directional interface?
We could halve the number of channels to 4 and mandate TX/RX configuration
(from main CPU's PoV) as ABI.
Otherwise it's impossible to use it with the arm_scpi driver.
Or do you have any other ideas? I guess arm_scpi can be fixed to add a
property that would make it possible to use single shmem with two
mailboxes, one for rx and one for tx, but making sun6i mailbox have
bi-directional interface sounds easier.
regards,
o.
> git clone https://github.com/crust-firmware/meta meta
> git clone -b mailbox-demo https://github.com/crust-firmware/crust meta/crust
> cd meta
> make
>
> That will by default produce a U-Boot + ATF + SCP firmware image in
> [meta/]build/pinebook/u-boot-sunxi-with-spl.bin. See the top-level
> README.md for more information, such as cross-compiler setup.
>
> I've now used this driver with three separate clients over the past two
> years, and they all work. If there are no remaining concerns with the
> driver, I'd like it to get merged.
>
> Even without the driver, the clock patches (1-2) can go in at any time.
>
> Changes from v3:
> - Rebased on sunxi-next
> - Added Rob's Reviewed-by for patch 3
> - Fixed a crash when receiving a message on a disabled channel
> - Cleaned up some comments/formatting in the driver
> - Fixed #mbox-cells in sunxi-h3-h5.dtsi (patch 7)
> - Removed the irqchip example (no longer relevant to the fw design)
> - Added a demo/example client that uses the driver and a toy firmware
>
> Changes from v2:
> - Merge patches 1-3
> - Add a comment in the code explaining the CLK_IS_CRITICAL usage
> - Add a patch to mark the AR100 clocks as critical
> - Use YAML for the device tree binding
> - Include a not-for-merge example usage of the mailbox
>
> Changes from v1:
> - Marked message box clocks as critical instead of hacks in the driver
> - 8 unidirectional channels instead of 4 bidirectional pairs
> - Use per-SoC compatible strings and an A31 fallback compatible
> - Dropped the mailbox framework patch
> - Include DT patches for SoCs that document the message box
>
> Samuel Holland (10):
> clk: sunxi-ng: Mark msgbox clocks as critical
> clk: sunxi-ng: Mark AR100 clocks as critical
> dt-bindings: mailbox: Add a sunxi message box binding
> mailbox: sunxi-msgbox: Add a new mailbox driver
> ARM: dts: sunxi: a80: Add msgbox node
> ARM: dts: sunxi: a83t: Add msgbox node
> ARM: dts: sunxi: h3/h5: Add msgbox node
> arm64: dts: allwinner: a64: Add msgbox node
> arm64: dts: allwinner: h6: Add msgbox node
> [DO NOT MERGE] drivers: firmware: msgbox demo
>
> .../mailbox/allwinner,sunxi-msgbox.yaml | 79 +++++
> arch/arm/boot/dts/sun8i-a83t.dtsi | 10 +
> arch/arm/boot/dts/sun9i-a80.dtsi | 10 +
> arch/arm/boot/dts/sunxi-h3-h5.dtsi | 10 +
> arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 34 ++
> arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi | 24 ++
> arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 10 +
> drivers/clk/sunxi-ng/ccu-sun50i-a64.c | 3 +-
> drivers/clk/sunxi-ng/ccu-sun50i-h6-r.c | 2 +-
> drivers/clk/sunxi-ng/ccu-sun50i-h6.c | 3 +-
> drivers/clk/sunxi-ng/ccu-sun8i-a23.c | 3 +-
> drivers/clk/sunxi-ng/ccu-sun8i-a33.c | 3 +-
> drivers/clk/sunxi-ng/ccu-sun8i-a83t.c | 3 +-
> drivers/clk/sunxi-ng/ccu-sun8i-h3.c | 3 +-
> drivers/clk/sunxi-ng/ccu-sun8i-r.c | 2 +-
> drivers/clk/sunxi-ng/ccu-sun9i-a80.c | 3 +-
> drivers/firmware/Kconfig | 6 +
> drivers/firmware/Makefile | 1 +
> drivers/firmware/sunxi_msgbox_demo.c | 307 +++++++++++++++++
> drivers/mailbox/Kconfig | 10 +
> drivers/mailbox/Makefile | 2 +
> drivers/mailbox/sunxi-msgbox.c | 323 ++++++++++++++++++
> 22 files changed, 842 insertions(+), 9 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/mailbox/allwinner,sunxi-msgbox.yaml
> create mode 100644 drivers/firmware/sunxi_msgbox_demo.c
> create mode 100644 drivers/mailbox/sunxi-msgbox.c
>
> --
> 2.21.0
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-09-09 3:22 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-20 3:23 [PATCH v4 00/10] Allwinner sunxi message box support Samuel Holland
2019-08-20 3:23 ` [PATCH v4 01/10] clk: sunxi-ng: Mark msgbox clocks as critical Samuel Holland
[not found] ` <20190820032311.6506-1-samuel-RkNLwX/CsU9g9hUCZPvPmw@public.gmane.org>
2019-08-20 3:23 ` [PATCH v4 02/10] clk: sunxi-ng: Mark AR100 " Samuel Holland
[not found] ` <20190820032311.6506-3-samuel-RkNLwX/CsU9g9hUCZPvPmw@public.gmane.org>
2019-08-20 7:11 ` Maxime Ripard
2019-08-20 13:02 ` Samuel Holland
[not found] ` <3b67534a-eb1b-c1e8-b5e8-e0a74ae85792-RkNLwX/CsU9g9hUCZPvPmw@public.gmane.org>
2019-08-21 12:24 ` Maxime Ripard
2019-09-05 18:56 ` Stephen Boyd
2019-08-20 3:23 ` [PATCH v4 03/10] dt-bindings: mailbox: Add a sunxi message box binding Samuel Holland
[not found] ` <20190820032311.6506-4-samuel-RkNLwX/CsU9g9hUCZPvPmw@public.gmane.org>
2019-08-20 7:14 ` Maxime Ripard
2019-08-20 13:04 ` Samuel Holland
[not found] ` <8947f4d1-3bb4-11b8-b114-5016339514b8-RkNLwX/CsU9g9hUCZPvPmw@public.gmane.org>
2019-08-21 12:07 ` Maxime Ripard
2019-08-20 3:23 ` [PATCH v4 04/10] mailbox: sunxi-msgbox: Add a new mailbox driver Samuel Holland
[not found] ` <20190820032311.6506-5-samuel-RkNLwX/CsU9g9hUCZPvPmw@public.gmane.org>
2019-08-20 8:27 ` Maxime Ripard
2019-08-20 11:18 ` Ondřej Jirman
[not found] ` <20190820111825.2w55fleehrnon27u-9v8tmBix7cb9zxVx7UNMDg@public.gmane.org>
2019-08-20 13:07 ` Samuel Holland
[not found] ` <bc09e14c-1cf5-8124-fc34-c651b78577ce-RkNLwX/CsU9g9hUCZPvPmw@public.gmane.org>
2019-08-20 13:34 ` Ondřej Jirman
2019-08-21 12:30 ` Maxime Ripard
2019-08-20 3:23 ` [PATCH v4 05/10] ARM: dts: sunxi: a80: Add msgbox node Samuel Holland
[not found] ` <20190820032311.6506-6-samuel-RkNLwX/CsU9g9hUCZPvPmw@public.gmane.org>
2019-08-20 8:15 ` Maxime Ripard
2019-08-20 13:17 ` Samuel Holland
[not found] ` <f3e3420e-450a-7d41-edf8-776c0cd5a320-RkNLwX/CsU9g9hUCZPvPmw@public.gmane.org>
2019-08-23 14:56 ` Maxime Ripard
2019-08-20 3:23 ` [PATCH v4 06/10] ARM: dts: sunxi: a83t: " Samuel Holland
2019-08-20 3:23 ` [PATCH v4 07/10] ARM: dts: sunxi: h3/h5: " Samuel Holland
2019-08-20 3:23 ` [PATCH v4 08/10] arm64: dts: allwinner: a64: " Samuel Holland
2019-08-20 3:23 ` [PATCH v4 09/10] arm64: dts: allwinner: h6: " Samuel Holland
2019-08-20 3:23 ` [PATCH v4 10/10] [DO NOT MERGE] drivers: firmware: msgbox demo Samuel Holland
2019-09-09 3:22 ` Ondřej Jirman [this message]
[not found] ` <20190909032208.rlorx2ppytymtyej-9v8tmBix7cb9zxVx7UNMDg@public.gmane.org>
2019-09-09 3:54 ` [PATCH v4 00/10] Allwinner sunxi message box support Samuel Holland
[not found] ` <bb6eab9a-f9cc-81ca-5e8c-9fb867c61ec2-RkNLwX/CsU9g9hUCZPvPmw@public.gmane.org>
2019-09-09 12:36 ` Ondřej Jirman
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=20190909032208.rlorx2ppytymtyej@core.my.home \
--to=megous-5qf/qajkc83qt0dzr+alfa@public.gmane.org \
--cc=anarsoul-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=clabbe.montjoie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org \
--cc=mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=samuel-RkNLwX/CsU9g9hUCZPvPmw@public.gmane.org \
--cc=sboyd-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=wens-jdAy2FN1RRM@public.gmane.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;
as well as URLs for NNTP newsgroup(s).