162306a36Sopenharmony_ciHisilicon Hi6220 Mailbox Driver 262306a36Sopenharmony_ci=============================== 362306a36Sopenharmony_ci 462306a36Sopenharmony_ciHisilicon Hi6220 mailbox supports up to 32 channels. Each channel 562306a36Sopenharmony_ciis unidirectional with a maximum message size of 8 words. I/O is 662306a36Sopenharmony_ciperformed using register access (there is no DMA) and the cell 762306a36Sopenharmony_ciraises an interrupt when messages are received. 862306a36Sopenharmony_ci 962306a36Sopenharmony_ciMailbox Device Node: 1062306a36Sopenharmony_ci==================== 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ciRequired properties: 1362306a36Sopenharmony_ci-------------------- 1462306a36Sopenharmony_ci- compatible: Shall be "hisilicon,hi6220-mbox" 1562306a36Sopenharmony_ci- reg: Contains the mailbox register address range (base 1662306a36Sopenharmony_ci address and length); the first item is for IPC 1762306a36Sopenharmony_ci registers, the second item is shared buffer for 1862306a36Sopenharmony_ci slots. 1962306a36Sopenharmony_ci- #mbox-cells: Common mailbox binding property to identify the number 2062306a36Sopenharmony_ci of cells required for the mailbox specifier. Must be 3. 2162306a36Sopenharmony_ci <&phandle slot_id dst_irq ack_irq> 2262306a36Sopenharmony_ci phandle: Label name of mailbox controller 2362306a36Sopenharmony_ci slot_id: Slot id used either for TX or RX 2462306a36Sopenharmony_ci dst_irq: IRQ identifier index number which used by MCU 2562306a36Sopenharmony_ci ack_irq: IRQ identifier index number with generating a 2662306a36Sopenharmony_ci TX/RX interrupt to application processor, 2762306a36Sopenharmony_ci mailbox driver uses it to acknowledge interrupt 2862306a36Sopenharmony_ci- interrupts: Contains the interrupt information for the mailbox 2962306a36Sopenharmony_ci device. The format is dependent on which interrupt 3062306a36Sopenharmony_ci controller the SoCs use. 3162306a36Sopenharmony_ci 3262306a36Sopenharmony_ciOptional Properties: 3362306a36Sopenharmony_ci-------------------- 3462306a36Sopenharmony_ci- hi6220,mbox-tx-noirq: Property of MCU firmware's feature, so mailbox driver 3562306a36Sopenharmony_ci use this flag to ask MCU to enable "automatic idle 3662306a36Sopenharmony_ci flag" mode or IRQ generated mode to acknowledge a TX 3762306a36Sopenharmony_ci completion. 3862306a36Sopenharmony_ci 3962306a36Sopenharmony_ciExample: 4062306a36Sopenharmony_ci-------- 4162306a36Sopenharmony_ci 4262306a36Sopenharmony_ci mailbox: mailbox@f7510000 { 4362306a36Sopenharmony_ci compatible = "hisilicon,hi6220-mbox"; 4462306a36Sopenharmony_ci reg = <0x0 0xf7510000 0x0 0x1000>, /* IPC_S */ 4562306a36Sopenharmony_ci <0x0 0x06dff800 0x0 0x0800>; /* Mailbox */ 4662306a36Sopenharmony_ci interrupt-parent = <&gic>; 4762306a36Sopenharmony_ci interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>; 4862306a36Sopenharmony_ci #mbox-cells = <3>; 4962306a36Sopenharmony_ci }; 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ci 5262306a36Sopenharmony_ciMailbox client 5362306a36Sopenharmony_ci=============== 5462306a36Sopenharmony_ci 5562306a36Sopenharmony_ciRequired properties: 5662306a36Sopenharmony_ci-------------------- 5762306a36Sopenharmony_ci- compatible: Many (See the client docs). 5862306a36Sopenharmony_ci- mboxes: Standard property to specify a Mailbox (See ./mailbox.txt) 5962306a36Sopenharmony_ci Cells must match 'mbox-cells' (See Mailbox Device Node above). 6062306a36Sopenharmony_ci 6162306a36Sopenharmony_ciOptional Properties: 6262306a36Sopenharmony_ci-------------------- 6362306a36Sopenharmony_ci- mbox-names: Name given to channels seen in the 'mboxes' property. 6462306a36Sopenharmony_ci 6562306a36Sopenharmony_ciExample: 6662306a36Sopenharmony_ci-------- 6762306a36Sopenharmony_ci 6862306a36Sopenharmony_ci stub_clock: stub_clock { 6962306a36Sopenharmony_ci compatible = "hisilicon,hi6220-stub-clk"; 7062306a36Sopenharmony_ci hisilicon,hi6220-clk-sram = <&sram>; 7162306a36Sopenharmony_ci #clock-cells = <1>; 7262306a36Sopenharmony_ci mbox-names = "mbox-tx", "mbox-rx"; 7362306a36Sopenharmony_ci mboxes = <&mailbox 1 0 11>, <&mailbox 0 1 10>; 7462306a36Sopenharmony_ci }; 75