xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/mailbox/hisilicon,hi6220-mailbox.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunHisilicon Hi6220 Mailbox Driver
2*4882a593Smuzhiyun===============================
3*4882a593Smuzhiyun
4*4882a593SmuzhiyunHisilicon Hi6220 mailbox supports up to 32 channels. Each channel
5*4882a593Smuzhiyunis unidirectional with a maximum message size of 8 words. I/O is
6*4882a593Smuzhiyunperformed using register access (there is no DMA) and the cell
7*4882a593Smuzhiyunraises an interrupt when messages are received.
8*4882a593Smuzhiyun
9*4882a593SmuzhiyunMailbox Device Node:
10*4882a593Smuzhiyun====================
11*4882a593Smuzhiyun
12*4882a593SmuzhiyunRequired properties:
13*4882a593Smuzhiyun--------------------
14*4882a593Smuzhiyun- compatible:		Shall be "hisilicon,hi6220-mbox"
15*4882a593Smuzhiyun- reg:			Contains the mailbox register address range (base
16*4882a593Smuzhiyun			address and length); the first item is for IPC
17*4882a593Smuzhiyun			registers, the second item is shared buffer for
18*4882a593Smuzhiyun			slots.
19*4882a593Smuzhiyun- #mbox-cells:		Common mailbox binding property to identify the number
20*4882a593Smuzhiyun			of cells required for the mailbox specifier. Must be 3.
21*4882a593Smuzhiyun			<&phandle slot_id dst_irq ack_irq>
22*4882a593Smuzhiyun			  phandle: Label name of mailbox controller
23*4882a593Smuzhiyun			  slot_id: Slot id used either for TX or RX
24*4882a593Smuzhiyun			  dst_irq: IRQ identifier index number which used by MCU
25*4882a593Smuzhiyun			  ack_irq: IRQ identifier index number with generating a
26*4882a593Smuzhiyun			           TX/RX interrupt to application processor,
27*4882a593Smuzhiyun				   mailbox driver uses it to acknowledge interrupt
28*4882a593Smuzhiyun- interrupts:		Contains the interrupt information for the mailbox
29*4882a593Smuzhiyun			device. The format is dependent on which interrupt
30*4882a593Smuzhiyun			controller the SoCs use.
31*4882a593Smuzhiyun
32*4882a593SmuzhiyunOptional Properties:
33*4882a593Smuzhiyun--------------------
34*4882a593Smuzhiyun- hi6220,mbox-tx-noirq: Property of MCU firmware's feature, so mailbox driver
35*4882a593Smuzhiyun			use this flag to ask MCU to enable "automatic idle
36*4882a593Smuzhiyun			flag" mode or IRQ generated mode to acknowledge a TX
37*4882a593Smuzhiyun			completion.
38*4882a593Smuzhiyun
39*4882a593SmuzhiyunExample:
40*4882a593Smuzhiyun--------
41*4882a593Smuzhiyun
42*4882a593Smuzhiyun	mailbox: mailbox@f7510000 {
43*4882a593Smuzhiyun		compatible = "hisilicon,hi6220-mbox";
44*4882a593Smuzhiyun		reg = <0x0 0xf7510000 0x0 0x1000>, /* IPC_S */
45*4882a593Smuzhiyun		      <0x0 0x06dff800 0x0 0x0800>; /* Mailbox */
46*4882a593Smuzhiyun		interrupt-parent = <&gic>;
47*4882a593Smuzhiyun		interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
48*4882a593Smuzhiyun		#mbox-cells = <3>;
49*4882a593Smuzhiyun	};
50*4882a593Smuzhiyun
51*4882a593Smuzhiyun
52*4882a593SmuzhiyunMailbox client
53*4882a593Smuzhiyun===============
54*4882a593Smuzhiyun
55*4882a593SmuzhiyunRequired properties:
56*4882a593Smuzhiyun--------------------
57*4882a593Smuzhiyun- compatible:		Many (See the client docs).
58*4882a593Smuzhiyun- mboxes:		Standard property to specify a Mailbox (See ./mailbox.txt)
59*4882a593Smuzhiyun			Cells must match 'mbox-cells' (See Mailbox Device Node above).
60*4882a593Smuzhiyun
61*4882a593SmuzhiyunOptional Properties:
62*4882a593Smuzhiyun--------------------
63*4882a593Smuzhiyun- mbox-names:		Name given to channels seen in the 'mboxes' property.
64*4882a593Smuzhiyun
65*4882a593SmuzhiyunExample:
66*4882a593Smuzhiyun--------
67*4882a593Smuzhiyun
68*4882a593Smuzhiyun	stub_clock: stub_clock {
69*4882a593Smuzhiyun		compatible = "hisilicon,hi6220-stub-clk";
70*4882a593Smuzhiyun		hisilicon,hi6220-clk-sram = <&sram>;
71*4882a593Smuzhiyun		#clock-cells = <1>;
72*4882a593Smuzhiyun		mbox-names = "mbox-tx", "mbox-rx";
73*4882a593Smuzhiyun		mboxes = <&mailbox 1 0 11>, <&mailbox 0 1 10>;
74*4882a593Smuzhiyun	};
75