11cb17866SLeo YanHisilicon Hi6220 Mailbox Driver 21cb17866SLeo Yan=============================== 31cb17866SLeo Yan 41cb17866SLeo YanHisilicon Hi6220 mailbox supports up to 32 channels. Each channel 51cb17866SLeo Yanis unidirectional with a maximum message size of 8 words. I/O is 61cb17866SLeo Yanperformed using register access (there is no DMA) and the cell 71cb17866SLeo Yanraises an interrupt when messages are received. 81cb17866SLeo Yan 91cb17866SLeo YanMailbox Device Node: 101cb17866SLeo Yan==================== 111cb17866SLeo Yan 121cb17866SLeo YanRequired properties: 131cb17866SLeo Yan-------------------- 141cb17866SLeo Yan- compatible: Shall be "hisilicon,hi6220-mbox" 151cb17866SLeo Yan- reg: Contains the mailbox register address range (base 161cb17866SLeo Yan address and length); the first item is for IPC 171cb17866SLeo Yan registers, the second item is shared buffer for 181cb17866SLeo Yan slots. 191cb17866SLeo Yan- #mbox-cells: Common mailbox binding property to identify the number 201cb17866SLeo Yan of cells required for the mailbox specifier. Must be 3. 211cb17866SLeo Yan <&phandle slot_id dst_irq ack_irq> 221cb17866SLeo Yan phandle: Label name of mailbox controller 231cb17866SLeo Yan slot_id: Slot id used either for TX or RX 241cb17866SLeo Yan dst_irq: IRQ identifier index number which used by MCU 251cb17866SLeo Yan ack_irq: IRQ identifier index number with generating a 261cb17866SLeo Yan TX/RX interrupt to application processor, 271cb17866SLeo Yan mailbox driver uses it to acknowledge interrupt 281cb17866SLeo Yan- interrupts: Contains the interrupt information for the mailbox 291cb17866SLeo Yan device. The format is dependent on which interrupt 301cb17866SLeo Yan controller the SoCs use. 311cb17866SLeo Yan 321cb17866SLeo YanOptional Properties: 331cb17866SLeo Yan-------------------- 341cb17866SLeo Yan- hi6220,mbox-tx-noirq: Property of MCU firmware's feature, so mailbox driver 351cb17866SLeo Yan use this flag to ask MCU to enable "automatic idle 361cb17866SLeo Yan flag" mode or IRQ generated mode to acknowledge a TX 371cb17866SLeo Yan completion. 381cb17866SLeo Yan 391cb17866SLeo YanExample: 401cb17866SLeo Yan-------- 411cb17866SLeo Yan 421cb17866SLeo Yan mailbox: mailbox@f7510000 { 431cb17866SLeo Yan compatible = "hisilicon,hi6220-mbox"; 441cb17866SLeo Yan reg = <0x0 0xf7510000 0x0 0x1000>, /* IPC_S */ 451cb17866SLeo Yan <0x0 0x06dff800 0x0 0x0800>; /* Mailbox */ 461cb17866SLeo Yan interrupt-parent = <&gic>; 471cb17866SLeo Yan interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>; 481cb17866SLeo Yan #mbox-cells = <3>; 491cb17866SLeo Yan }; 501cb17866SLeo Yan 511cb17866SLeo Yan 521cb17866SLeo YanMailbox client 531cb17866SLeo Yan=============== 541cb17866SLeo Yan 551cb17866SLeo YanRequired properties: 561cb17866SLeo Yan-------------------- 571cb17866SLeo Yan- compatible: Many (See the client docs). 581cb17866SLeo Yan- mboxes: Standard property to specify a Mailbox (See ./mailbox.txt) 591cb17866SLeo Yan Cells must match 'mbox-cells' (See Mailbox Device Node above). 601cb17866SLeo Yan 611cb17866SLeo YanOptional Properties: 621cb17866SLeo Yan-------------------- 631cb17866SLeo Yan- mbox-names: Name given to channels seen in the 'mboxes' property. 641cb17866SLeo Yan 651cb17866SLeo YanExample: 661cb17866SLeo Yan-------- 671cb17866SLeo Yan 681cb17866SLeo Yan stub_clock: stub_clock { 691cb17866SLeo Yan compatible = "hisilicon,hi6220-stub-clk"; 701cb17866SLeo Yan hisilicon,hi6220-clk-sram = <&sram>; 711cb17866SLeo Yan #clock-cells = <1>; 721cb17866SLeo Yan mbox-names = "mbox-tx", "mbox-rx"; 731cb17866SLeo Yan mboxes = <&mailbox 1 0 11>, <&mailbox 0 1 10>; 741cb17866SLeo Yan }; 75