xref: /freebsd/sys/contrib/device-tree/Bindings/mailbox/allwinner,sun6i-a31-msgbox.yaml (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0
2*c66ec88fSEmmanuel Vadot%YAML 1.2
3*c66ec88fSEmmanuel Vadot---
4*c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/mailbox/allwinner,sun6i-a31-msgbox.yaml#
5*c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*c66ec88fSEmmanuel Vadot
7*c66ec88fSEmmanuel Vadottitle: Allwinner sunxi Message Box
8*c66ec88fSEmmanuel Vadot
9*c66ec88fSEmmanuel Vadotmaintainers:
10*c66ec88fSEmmanuel Vadot  - Samuel Holland <samuel@sholland.org>
11*c66ec88fSEmmanuel Vadot
12*c66ec88fSEmmanuel Vadotdescription: |
13*c66ec88fSEmmanuel Vadot  The hardware message box on sun6i, sun8i, sun9i, and sun50i SoCs is a
14*c66ec88fSEmmanuel Vadot  two-user mailbox controller containing 8 unidirectional FIFOs. An interrupt
15*c66ec88fSEmmanuel Vadot  is raised for received messages, but software must poll to know when a
16*c66ec88fSEmmanuel Vadot  transmitted message has been acknowledged by the remote user. Each FIFO can
17*c66ec88fSEmmanuel Vadot  hold four 32-bit messages; when a FIFO is full, clients must wait before
18*c66ec88fSEmmanuel Vadot  attempting more transmissions.
19*c66ec88fSEmmanuel Vadot
20*c66ec88fSEmmanuel Vadot  Refer to ./mailbox.txt for generic information about mailbox device-tree
21*c66ec88fSEmmanuel Vadot  bindings.
22*c66ec88fSEmmanuel Vadot
23*c66ec88fSEmmanuel Vadotproperties:
24*c66ec88fSEmmanuel Vadot  compatible:
25*c66ec88fSEmmanuel Vadot    oneOf:
26*c66ec88fSEmmanuel Vadot      - items:
27*c66ec88fSEmmanuel Vadot          - enum:
28*c66ec88fSEmmanuel Vadot              - allwinner,sun8i-a83t-msgbox
29*c66ec88fSEmmanuel Vadot              - allwinner,sun8i-h3-msgbox
30*c66ec88fSEmmanuel Vadot              - allwinner,sun9i-a80-msgbox
31*c66ec88fSEmmanuel Vadot              - allwinner,sun50i-a64-msgbox
32*c66ec88fSEmmanuel Vadot              - allwinner,sun50i-h6-msgbox
33*c66ec88fSEmmanuel Vadot          - const: allwinner,sun6i-a31-msgbox
34*c66ec88fSEmmanuel Vadot      - const: allwinner,sun6i-a31-msgbox
35*c66ec88fSEmmanuel Vadot
36*c66ec88fSEmmanuel Vadot  reg:
37*c66ec88fSEmmanuel Vadot    maxItems: 1
38*c66ec88fSEmmanuel Vadot
39*c66ec88fSEmmanuel Vadot  clocks:
40*c66ec88fSEmmanuel Vadot    maxItems: 1
41*c66ec88fSEmmanuel Vadot    description: bus clock
42*c66ec88fSEmmanuel Vadot
43*c66ec88fSEmmanuel Vadot  resets:
44*c66ec88fSEmmanuel Vadot    maxItems: 1
45*c66ec88fSEmmanuel Vadot    description: bus reset
46*c66ec88fSEmmanuel Vadot
47*c66ec88fSEmmanuel Vadot  interrupts:
48*c66ec88fSEmmanuel Vadot    maxItems: 1
49*c66ec88fSEmmanuel Vadot
50*c66ec88fSEmmanuel Vadot  '#mbox-cells':
51*c66ec88fSEmmanuel Vadot    const: 1
52*c66ec88fSEmmanuel Vadot    description: first cell is the channel number (0-7)
53*c66ec88fSEmmanuel Vadot
54*c66ec88fSEmmanuel Vadotrequired:
55*c66ec88fSEmmanuel Vadot  - compatible
56*c66ec88fSEmmanuel Vadot  - reg
57*c66ec88fSEmmanuel Vadot  - clocks
58*c66ec88fSEmmanuel Vadot  - resets
59*c66ec88fSEmmanuel Vadot  - interrupts
60*c66ec88fSEmmanuel Vadot  - '#mbox-cells'
61*c66ec88fSEmmanuel Vadot
62*c66ec88fSEmmanuel VadotadditionalProperties: false
63*c66ec88fSEmmanuel Vadot
64*c66ec88fSEmmanuel Vadotexamples:
65*c66ec88fSEmmanuel Vadot  - |
66*c66ec88fSEmmanuel Vadot    #include <dt-bindings/clock/sun8i-h3-ccu.h>
67*c66ec88fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
68*c66ec88fSEmmanuel Vadot    #include <dt-bindings/reset/sun8i-h3-ccu.h>
69*c66ec88fSEmmanuel Vadot
70*c66ec88fSEmmanuel Vadot    msgbox: mailbox@1c17000 {
71*c66ec88fSEmmanuel Vadot            compatible = "allwinner,sun8i-h3-msgbox",
72*c66ec88fSEmmanuel Vadot                         "allwinner,sun6i-a31-msgbox";
73*c66ec88fSEmmanuel Vadot            reg = <0x01c17000 0x1000>;
74*c66ec88fSEmmanuel Vadot            clocks = <&ccu CLK_BUS_MSGBOX>;
75*c66ec88fSEmmanuel Vadot            resets = <&ccu RST_BUS_MSGBOX>;
76*c66ec88fSEmmanuel Vadot            interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
77*c66ec88fSEmmanuel Vadot            #mbox-cells = <1>;
78*c66ec88fSEmmanuel Vadot    };
79*c66ec88fSEmmanuel Vadot
80*c66ec88fSEmmanuel Vadot...
81