xref: /freebsd/sys/contrib/device-tree/Bindings/mailbox/ti,omap-mailbox.yaml (revision aa1a8ff2d6dbc51ef058f46f3db5a8bb77967145)
1*aa1a8ff2SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
25956d97fSEmmanuel Vadot%YAML 1.2
35956d97fSEmmanuel Vadot---
45956d97fSEmmanuel Vadot$id: http://devicetree.org/schemas/mailbox/ti,omap-mailbox.yaml#
55956d97fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
65956d97fSEmmanuel Vadot
75956d97fSEmmanuel Vadottitle: TI OMAP2+ and K3 Mailbox devices
85956d97fSEmmanuel Vadot
95956d97fSEmmanuel Vadotmaintainers:
105956d97fSEmmanuel Vadot  - Suman Anna <s-anna@ti.com>
115956d97fSEmmanuel Vadot
125956d97fSEmmanuel Vadotdescription: |
135956d97fSEmmanuel Vadot  The OMAP Mailbox hardware facilitates communication between different
145956d97fSEmmanuel Vadot  processors using a queued mailbox interrupt mechanism. The IP block is
155956d97fSEmmanuel Vadot  external to the various processor subsystems and is connected on an
165956d97fSEmmanuel Vadot  interconnect bus. The communication is achieved through a set of registers
175956d97fSEmmanuel Vadot  for message storage and interrupt configuration registers.
185956d97fSEmmanuel Vadot
195956d97fSEmmanuel Vadot  Each mailbox IP block/cluster has a certain number of h/w fifo queues and
205956d97fSEmmanuel Vadot  output interrupt lines. An output interrupt line is routed to an interrupt
215956d97fSEmmanuel Vadot  controller within a processor subsystem, and there can be more than one line
225956d97fSEmmanuel Vadot  going to a specific processor's interrupt controller. The interrupt line
235956d97fSEmmanuel Vadot  connections are fixed for an instance and are dictated by the IP integration
245956d97fSEmmanuel Vadot  into the SoC (excluding the SoCs that have an Interrupt Crossbar or an
255956d97fSEmmanuel Vadot  Interrupt Router IP). Each interrupt line is programmable through a set of
265956d97fSEmmanuel Vadot  interrupt configuration registers, and have a rx and tx interrupt source per
275956d97fSEmmanuel Vadot  h/w fifo. Communication between different processors is achieved through the
285956d97fSEmmanuel Vadot  appropriate programming of the rx and tx interrupt sources on the appropriate
295956d97fSEmmanuel Vadot  interrupt lines.
305956d97fSEmmanuel Vadot
315956d97fSEmmanuel Vadot  The number of h/w fifo queues and interrupt lines dictate the usable
325956d97fSEmmanuel Vadot  registers. All the current OMAP SoCs except for the newest DRA7xx SoC has a
335956d97fSEmmanuel Vadot  single IP instance. DRA7xx has multiple instances with different number of
345956d97fSEmmanuel Vadot  h/w fifo queues and interrupt lines between different instances. The interrupt
355956d97fSEmmanuel Vadot  lines can also be routed to different processor sub-systems on DRA7xx as they
365956d97fSEmmanuel Vadot  are routed through the Crossbar, a kind of interrupt router/multiplexer. The
375956d97fSEmmanuel Vadot  K3 AM65x, J721E and J7200 SoCs has each of these instances form a cluster and
385956d97fSEmmanuel Vadot  combine multiple clusters into a single IP block present within the Main
395956d97fSEmmanuel Vadot  NavSS. The interrupt lines from all these clusters are multiplexed and routed
405956d97fSEmmanuel Vadot  to different processor subsystems over a limited number of common interrupt
415956d97fSEmmanuel Vadot  output lines of an Interrupt Router. The AM64x SoCS also uses a single IP
425956d97fSEmmanuel Vadot  block comprising of multiple clusters, but the number of clusters are
435956d97fSEmmanuel Vadot  smaller, and the interrupt output lines are connected directly to various
445956d97fSEmmanuel Vadot  processors.
455956d97fSEmmanuel Vadot
465956d97fSEmmanuel Vadot  Mailbox Controller Nodes
475956d97fSEmmanuel Vadot  =========================
485956d97fSEmmanuel Vadot  A Mailbox device node is used to represent a Mailbox IP instance/cluster
495956d97fSEmmanuel Vadot  within a SoC. The sub-mailboxes (actual communication channels) are
505956d97fSEmmanuel Vadot  represented as child nodes of this parent node.
515956d97fSEmmanuel Vadot
525956d97fSEmmanuel Vadot  Mailbox Users
535956d97fSEmmanuel Vadot  ==============
545956d97fSEmmanuel Vadot  A device needing to communicate with a target processor device should specify
555956d97fSEmmanuel Vadot  them using the common mailbox binding properties, "mboxes" and the optional
565956d97fSEmmanuel Vadot  "mbox-names" (please see Documentation/devicetree/bindings/mailbox/mailbox.txt
575956d97fSEmmanuel Vadot  for details). Each value of the mboxes property should contain a phandle to
585956d97fSEmmanuel Vadot  the mailbox controller device node and an args specifier that will be the
595956d97fSEmmanuel Vadot  phandle to the intended sub-mailbox child node to be used for communication.
605956d97fSEmmanuel Vadot  The equivalent "mbox-names" property value can be used to give a name to the
615956d97fSEmmanuel Vadot  communication channel to be used by the client user.
625956d97fSEmmanuel Vadot
635956d97fSEmmanuel Vadot$defs:
645956d97fSEmmanuel Vadot  omap-mbox-descriptor:
655956d97fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-array
665956d97fSEmmanuel Vadot    description:
675956d97fSEmmanuel Vadot      The omap-mbox-descriptor is made of up of 3 cells and represents a single
685956d97fSEmmanuel Vadot      uni-directional communication channel. A typical sub-mailbox device uses
695956d97fSEmmanuel Vadot      two such channels - one for transmitting (Tx) and one for receiving (Rx).
705956d97fSEmmanuel Vadot    items:
715956d97fSEmmanuel Vadot      - description:
725956d97fSEmmanuel Vadot          mailbox fifo id used either for transmitting on ti,mbox-tx channel or
735956d97fSEmmanuel Vadot          for receiving on ti,mbox-rx channel (fifo_id). This is the hardware
745956d97fSEmmanuel Vadot          fifo number within a mailbox cluster.
755956d97fSEmmanuel Vadot      - description:
765956d97fSEmmanuel Vadot          irq identifier index number to use from the parent's interrupts data.
775956d97fSEmmanuel Vadot          Should be 0 for most of the cases, a positive index value is seen only
785956d97fSEmmanuel Vadot          on mailboxes that have multiple interrupt lines connected to the MPU
795956d97fSEmmanuel Vadot          processor (irq_id). This is an index number in the listed interrupts
805956d97fSEmmanuel Vadot          property in the DT nodes.
815956d97fSEmmanuel Vadot      - description:
825956d97fSEmmanuel Vadot          mailbox user id for identifying the interrupt line associated with
835956d97fSEmmanuel Vadot          generating a tx/rx fifo interrupt (usr_id). This is the hardware
845956d97fSEmmanuel Vadot          user id number within a mailbox cluster.
855956d97fSEmmanuel Vadot
865956d97fSEmmanuel Vadot  omap-sub-mailbox:
875956d97fSEmmanuel Vadot    type: object
885956d97fSEmmanuel Vadot    description:
895956d97fSEmmanuel Vadot      The omap-sub-mailbox is a child node within a Mailbox controller device
905956d97fSEmmanuel Vadot      node and represents the actual communication channel used to send and
915956d97fSEmmanuel Vadot      receive messages between the host processor and a remote processor. Each
925956d97fSEmmanuel Vadot      child node should have a unique node name across all the different mailbox
935956d97fSEmmanuel Vadot      device nodes.
945956d97fSEmmanuel Vadot
955956d97fSEmmanuel Vadot    properties:
965956d97fSEmmanuel Vadot      ti,mbox-tx:
975956d97fSEmmanuel Vadot        $ref: "#/$defs/omap-mbox-descriptor"
985956d97fSEmmanuel Vadot        description: sub-mailbox descriptor property defining a Tx fifo.
995956d97fSEmmanuel Vadot
1005956d97fSEmmanuel Vadot      ti,mbox-rx:
1015956d97fSEmmanuel Vadot        $ref: "#/$defs/omap-mbox-descriptor"
1025956d97fSEmmanuel Vadot        description: sub-mailbox descriptor property defining a Rx fifo.
1035956d97fSEmmanuel Vadot
1045956d97fSEmmanuel Vadot      ti,mbox-send-noirq:
1055956d97fSEmmanuel Vadot        type: boolean
1065956d97fSEmmanuel Vadot        description:
1075956d97fSEmmanuel Vadot          Quirk flag to allow the client user of this sub-mailbox to send
1085956d97fSEmmanuel Vadot          messages without triggering a Tx ready interrupt, and to control
1095956d97fSEmmanuel Vadot          the Tx ticker. Should be used only on sub-mailboxes used to
1105956d97fSEmmanuel Vadot          communicate with WkupM3 remote processor on AM33xx/AM43xx SoCs.
1115956d97fSEmmanuel Vadot
1125956d97fSEmmanuel Vadot    required:
1135956d97fSEmmanuel Vadot      - ti,mbox-tx
1145956d97fSEmmanuel Vadot      - ti,mbox-rx
1155956d97fSEmmanuel Vadot
1165956d97fSEmmanuel Vadotproperties:
1175956d97fSEmmanuel Vadot  compatible:
1185956d97fSEmmanuel Vadot    enum:
1195956d97fSEmmanuel Vadot      - ti,omap2-mailbox # for OMAP2420, OMAP2430 SoCs
1205956d97fSEmmanuel Vadot      - ti,omap3-mailbox # for OMAP3430, OMAP3630 SoCs
1215956d97fSEmmanuel Vadot      - ti,omap4-mailbox # for OMAP44xx, OMAP54xx, AM33xx, AM43xx and DRA7xx SoCs
1225956d97fSEmmanuel Vadot      - ti,am654-mailbox # for K3 AM65x, J721E and J7200 SoCs
1235956d97fSEmmanuel Vadot      - ti,am64-mailbox  # for K3 AM64x SoCs
1245956d97fSEmmanuel Vadot
1255956d97fSEmmanuel Vadot  reg:
1265956d97fSEmmanuel Vadot    maxItems: 1
1275956d97fSEmmanuel Vadot
1285956d97fSEmmanuel Vadot  interrupts:
1295956d97fSEmmanuel Vadot    description:
1305956d97fSEmmanuel Vadot      Contains the interrupt information for the mailbox device. The format is
1315956d97fSEmmanuel Vadot      dependent on which interrupt controller the Mailbox device uses. The
1325956d97fSEmmanuel Vadot      number of interrupts listed will at most be the value specified in
1335956d97fSEmmanuel Vadot      ti,mbox-num-users property, but is usually limited by the number of
1345956d97fSEmmanuel Vadot      interrupts reaching the main processor. An interrupt-parent property
1355956d97fSEmmanuel Vadot      is required on SoCs where the interrupt lines are connected through a
1365956d97fSEmmanuel Vadot      Interrupt Router before reaching the main processor's GIC.
1375956d97fSEmmanuel Vadot
1385956d97fSEmmanuel Vadot  "#mbox-cells":
1395956d97fSEmmanuel Vadot    const: 1
1405956d97fSEmmanuel Vadot    description:
1415956d97fSEmmanuel Vadot      The specifier is a phandle to an omap-sub-mailbox device.
1425956d97fSEmmanuel Vadot
1435956d97fSEmmanuel Vadot  ti,mbox-num-users:
1445956d97fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
1455956d97fSEmmanuel Vadot    description:
1465956d97fSEmmanuel Vadot      Number of targets (processor devices) that the mailbox device can
1475956d97fSEmmanuel Vadot      interrupt.
1485956d97fSEmmanuel Vadot
1495956d97fSEmmanuel Vadot  ti,mbox-num-fifos:
1505956d97fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
1515956d97fSEmmanuel Vadot    description: Number of h/w fifo queues within the mailbox IP block.
1525956d97fSEmmanuel Vadot
1535956d97fSEmmanuel Vadot  ti,hwmods:
1545956d97fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/string
1555956d97fSEmmanuel Vadot    deprecated: true
1565956d97fSEmmanuel Vadot    description:
1575956d97fSEmmanuel Vadot      Name of the hwmod associated with the mailbox. This should be defined
1585956d97fSEmmanuel Vadot      in the mailbox node only if the node is not defined as a child node of
1595956d97fSEmmanuel Vadot      a corresponding sysc interconnect node.
1605956d97fSEmmanuel Vadot
1615956d97fSEmmanuel Vadot      This property is only needed on some legacy OMAP SoCs which have not
162*aa1a8ff2SEmmanuel Vadot      yet been converted to the ti,sysc interconnect hierarchy, but is
1635956d97fSEmmanuel Vadot      otherwise considered obsolete.
1645956d97fSEmmanuel Vadot
1655956d97fSEmmanuel VadotpatternProperties:
1665956d97fSEmmanuel Vadot  "^mbox-[a-z0-9-]+$":
1675956d97fSEmmanuel Vadot    $ref: "#/$defs/omap-sub-mailbox"
1685956d97fSEmmanuel Vadot
1695956d97fSEmmanuel Vadotrequired:
1705956d97fSEmmanuel Vadot  - compatible
1715956d97fSEmmanuel Vadot  - reg
1725956d97fSEmmanuel Vadot  - interrupts
1735956d97fSEmmanuel Vadot  - "#mbox-cells"
1745956d97fSEmmanuel Vadot  - ti,mbox-num-users
1755956d97fSEmmanuel Vadot  - ti,mbox-num-fifos
1765956d97fSEmmanuel Vadot
1775956d97fSEmmanuel VadotallOf:
1785956d97fSEmmanuel Vadot  - if:
1795956d97fSEmmanuel Vadot      properties:
1805956d97fSEmmanuel Vadot        compatible:
1815956d97fSEmmanuel Vadot          enum:
1825956d97fSEmmanuel Vadot            - ti,am654-mailbox
1835956d97fSEmmanuel Vadot            - ti,am64-mailbox
1845956d97fSEmmanuel Vadot    then:
1855956d97fSEmmanuel Vadot      properties:
1865956d97fSEmmanuel Vadot        ti,mbox-num-users:
1875956d97fSEmmanuel Vadot          const: 4
1885956d97fSEmmanuel Vadot        ti,mbox-num-fifos:
1895956d97fSEmmanuel Vadot          const: 16
1905956d97fSEmmanuel Vadot        interrupts:
1915956d97fSEmmanuel Vadot          minItems: 1
1925956d97fSEmmanuel Vadot          maxItems: 4
1935956d97fSEmmanuel Vadot
1945956d97fSEmmanuel Vadot  - if:
1955956d97fSEmmanuel Vadot      properties:
1965956d97fSEmmanuel Vadot        compatible:
1975956d97fSEmmanuel Vadot          enum:
1985956d97fSEmmanuel Vadot            - ti,omap4-mailbox
1995956d97fSEmmanuel Vadot    then:
2005956d97fSEmmanuel Vadot      properties:
2015956d97fSEmmanuel Vadot        ti,mbox-num-users:
2025956d97fSEmmanuel Vadot          enum: [3, 4]
2035956d97fSEmmanuel Vadot        ti,mbox-num-fifos:
2045956d97fSEmmanuel Vadot          enum: [8, 12]
2055956d97fSEmmanuel Vadot        interrupts:
2065956d97fSEmmanuel Vadot          minItems: 1
2075956d97fSEmmanuel Vadot          maxItems: 4
2085956d97fSEmmanuel Vadot
2095956d97fSEmmanuel Vadot  - if:
2105956d97fSEmmanuel Vadot      properties:
2115956d97fSEmmanuel Vadot        compatible:
2125956d97fSEmmanuel Vadot          enum:
2135956d97fSEmmanuel Vadot            - ti,omap3-mailbox
2145956d97fSEmmanuel Vadot    then:
2155956d97fSEmmanuel Vadot      properties:
2165956d97fSEmmanuel Vadot        ti,mbox-num-users:
2175956d97fSEmmanuel Vadot          const: 2
2185956d97fSEmmanuel Vadot        ti,mbox-num-fifos:
2195956d97fSEmmanuel Vadot          const: 2
2205956d97fSEmmanuel Vadot        interrupts:
2215956d97fSEmmanuel Vadot          minItems: 1
2225956d97fSEmmanuel Vadot          maxItems: 1
2235956d97fSEmmanuel Vadot
2245956d97fSEmmanuel Vadot  - if:
2255956d97fSEmmanuel Vadot      properties:
2265956d97fSEmmanuel Vadot        compatible:
2275956d97fSEmmanuel Vadot          enum:
2285956d97fSEmmanuel Vadot            - ti,omap2-mailbox
2295956d97fSEmmanuel Vadot    then:
2305956d97fSEmmanuel Vadot      properties:
2315956d97fSEmmanuel Vadot        ti,mbox-num-users:
2325956d97fSEmmanuel Vadot          const: 4
2335956d97fSEmmanuel Vadot        ti,mbox-num-fifos:
2345956d97fSEmmanuel Vadot          const: 6
2355956d97fSEmmanuel Vadot        interrupts:
2365956d97fSEmmanuel Vadot          minItems: 1
2375956d97fSEmmanuel Vadot          maxItems: 2
2385956d97fSEmmanuel Vadot
2395956d97fSEmmanuel VadotadditionalProperties: false
2405956d97fSEmmanuel Vadot
2415956d97fSEmmanuel Vadotexamples:
2425956d97fSEmmanuel Vadot  - |
2435956d97fSEmmanuel Vadot    /* OMAP4 */
2445956d97fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
2455956d97fSEmmanuel Vadot    mailbox: mailbox@4a0f4000 {
2465956d97fSEmmanuel Vadot        compatible = "ti,omap4-mailbox";
2475956d97fSEmmanuel Vadot        reg = <0x4a0f4000 0x200>;
2485956d97fSEmmanuel Vadot        interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
2495956d97fSEmmanuel Vadot        #mbox-cells = <1>;
2505956d97fSEmmanuel Vadot        ti,mbox-num-users = <3>;
2515956d97fSEmmanuel Vadot        ti,mbox-num-fifos = <8>;
2525956d97fSEmmanuel Vadot
2535956d97fSEmmanuel Vadot        mbox_ipu: mbox-ipu {
2545956d97fSEmmanuel Vadot            ti,mbox-tx = <0 0 0>;
2555956d97fSEmmanuel Vadot            ti,mbox-rx = <1 0 0>;
2565956d97fSEmmanuel Vadot        };
2575956d97fSEmmanuel Vadot        mbox_dsp: mbox-dsp {
2585956d97fSEmmanuel Vadot            ti,mbox-tx = <3 0 0>;
2595956d97fSEmmanuel Vadot            ti,mbox-rx = <2 0 0>;
2605956d97fSEmmanuel Vadot        };
2615956d97fSEmmanuel Vadot    };
2625956d97fSEmmanuel Vadot
2635956d97fSEmmanuel Vadot    dsp {
2645956d97fSEmmanuel Vadot        mboxes = <&mailbox &mbox_dsp>;
2655956d97fSEmmanuel Vadot    };
2665956d97fSEmmanuel Vadot
2675956d97fSEmmanuel Vadot  - |
2685956d97fSEmmanuel Vadot    /* AM33xx */
2695956d97fSEmmanuel Vadot    mailbox1: mailbox@480c8000 {
2705956d97fSEmmanuel Vadot        compatible = "ti,omap4-mailbox";
2715956d97fSEmmanuel Vadot        reg = <0x480c8000 0x200>;
2725956d97fSEmmanuel Vadot        interrupts = <77>;
2735956d97fSEmmanuel Vadot        #mbox-cells = <1>;
2745956d97fSEmmanuel Vadot        ti,mbox-num-users = <4>;
2755956d97fSEmmanuel Vadot        ti,mbox-num-fifos = <8>;
2765956d97fSEmmanuel Vadot
2775956d97fSEmmanuel Vadot        mbox_wkupm3: mbox-wkup-m3 {
2785956d97fSEmmanuel Vadot            ti,mbox-tx = <0 0 0>;
2795956d97fSEmmanuel Vadot            ti,mbox-rx = <0 0 3>;
2805956d97fSEmmanuel Vadot            ti,mbox-send-noirq;
2815956d97fSEmmanuel Vadot        };
2825956d97fSEmmanuel Vadot    };
2835956d97fSEmmanuel Vadot
2845956d97fSEmmanuel Vadot  - |
2855956d97fSEmmanuel Vadot    /* AM65x */
2865956d97fSEmmanuel Vadot    mailbox0_cluster0: mailbox@31f80000 {
2875956d97fSEmmanuel Vadot        compatible = "ti,am654-mailbox";
2885956d97fSEmmanuel Vadot        reg = <0x31f80000 0x200>;
2895956d97fSEmmanuel Vadot        #mbox-cells = <1>;
2905956d97fSEmmanuel Vadot        ti,mbox-num-users = <4>;
2915956d97fSEmmanuel Vadot        ti,mbox-num-fifos = <16>;
2925956d97fSEmmanuel Vadot        interrupt-parent = <&intr_main_navss>;
2935956d97fSEmmanuel Vadot        interrupts = <436>;
2945956d97fSEmmanuel Vadot
2955956d97fSEmmanuel Vadot        mbox_mcu_r5fss0_core0: mbox-mcu-r5fss0-core0 {
2965956d97fSEmmanuel Vadot            ti,mbox-tx = <1 0 0>;
2975956d97fSEmmanuel Vadot            ti,mbox-rx = <0 0 0>;
2985956d97fSEmmanuel Vadot        };
2995956d97fSEmmanuel Vadot    };
300