mbox series

[v2,00/10] Allwinner sunxi message box support

Message ID 20190301052947.32032-1-samuel@sholland.org (mailing list archive)
Headers show
Series Allwinner sunxi message box support | expand

Message

Samuel Holland March 1, 2019, 5:29 a.m. UTC
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 ARISC CPU, or to use the mailbox to forward NMIs that the
firmware picks up from R_INTC.

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: sun8i: Mark the msgbox clock as critical
  clk: sunxi-ng: sun9i: Mark the msgbox clock as critical
  clk: sunxi-ng: sun50i: Mark the msgbox clock 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

 .../bindings/mailbox/sunxi-msgbox.txt         |  44 +++
 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 |  10 +
 arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi  |  10 +
 drivers/clk/sunxi-ng/ccu-sun50i-a64.c         |   2 +-
 drivers/clk/sunxi-ng/ccu-sun50i-h6.c          |   2 +-
 drivers/clk/sunxi-ng/ccu-sun8i-a23.c          |   2 +-
 drivers/clk/sunxi-ng/ccu-sun8i-a33.c          |   2 +-
 drivers/clk/sunxi-ng/ccu-sun8i-a83t.c         |   2 +-
 drivers/clk/sunxi-ng/ccu-sun8i-h3.c           |   2 +-
 drivers/clk/sunxi-ng/ccu-sun9i-a80.c          |   2 +-
 drivers/mailbox/Kconfig                       |  11 +
 drivers/mailbox/Makefile                      |   2 +
 drivers/mailbox/sunxi-msgbox.c                | 315 ++++++++++++++++++
 16 files changed, 429 insertions(+), 7 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mailbox/sunxi-msgbox.txt
 create mode 100644 drivers/mailbox/sunxi-msgbox.c

Comments

Corentin Labbe March 1, 2019, 5:53 a.m. UTC | #1
On Thu, Feb 28, 2019 at 11:29:37PM -0600, 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 ARISC CPU, or to use the mailbox to forward NMIs that the
> firmware picks up from R_INTC.
> 
> 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: sun8i: Mark the msgbox clock as critical
>   clk: sunxi-ng: sun9i: Mark the msgbox clock as critical
>   clk: sunxi-ng: sun50i: Mark the msgbox clock 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
> 
>  .../bindings/mailbox/sunxi-msgbox.txt         |  44 +++
>  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 |  10 +
>  arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi  |  10 +
>  drivers/clk/sunxi-ng/ccu-sun50i-a64.c         |   2 +-
>  drivers/clk/sunxi-ng/ccu-sun50i-h6.c          |   2 +-
>  drivers/clk/sunxi-ng/ccu-sun8i-a23.c          |   2 +-
>  drivers/clk/sunxi-ng/ccu-sun8i-a33.c          |   2 +-
>  drivers/clk/sunxi-ng/ccu-sun8i-a83t.c         |   2 +-
>  drivers/clk/sunxi-ng/ccu-sun8i-h3.c           |   2 +-
>  drivers/clk/sunxi-ng/ccu-sun9i-a80.c          |   2 +-
>  drivers/mailbox/Kconfig                       |  11 +
>  drivers/mailbox/Makefile                      |   2 +
>  drivers/mailbox/sunxi-msgbox.c                | 315 ++++++++++++++++++
>  16 files changed, 429 insertions(+), 7 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/mailbox/sunxi-msgbox.txt
>  create mode 100644 drivers/mailbox/sunxi-msgbox.c

Hello

Appart from applying/compiling/booting, does it exists some way to test it ? check it works ?

Regards
Maxime Ripard March 1, 2019, 2:47 p.m. UTC | #2
Hi

On Thu, Feb 28, 2019 at 11:29:37PM -0600, 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 ARISC CPU, or to use the mailbox to forward NMIs that the
> firmware picks up from R_INTC.
> 
> 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: sun8i: Mark the msgbox clock as critical
>   clk: sunxi-ng: sun9i: Mark the msgbox clock as critical
>   clk: sunxi-ng: sun50i: Mark the msgbox clock 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

It looks good to me but a few things:

  - There's no reason to split the first three patches, so they should
    all be merged

  - You might consider using a YAML schemas for your DT bindings
    documentation. That will bring a more formal descriptiion and DT
    validation.

Thanks!
Maxime