1*c66ec88fSEmmanuel VadotNVIDIA Tegra Hardware Synchronization Primitives (HSP) 2*c66ec88fSEmmanuel Vadot 3*c66ec88fSEmmanuel VadotThe HSP modules are used for the processors to share resources and communicate 4*c66ec88fSEmmanuel Vadottogether. It provides a set of hardware synchronization primitives for 5*c66ec88fSEmmanuel Vadotinterprocessor communication. So the interprocessor communication (IPC) 6*c66ec88fSEmmanuel Vadotprotocols can use hardware synchronization primitives, when operating between 7*c66ec88fSEmmanuel Vadottwo processors not in an SMP relationship. 8*c66ec88fSEmmanuel Vadot 9*c66ec88fSEmmanuel VadotThe features that HSP supported are shared mailboxes, shared semaphores, 10*c66ec88fSEmmanuel Vadotarbitrated semaphores and doorbells. 11*c66ec88fSEmmanuel Vadot 12*c66ec88fSEmmanuel VadotRequired properties: 13*c66ec88fSEmmanuel Vadot- name : Should be hsp 14*c66ec88fSEmmanuel Vadot- compatible 15*c66ec88fSEmmanuel Vadot Array of strings. 16*c66ec88fSEmmanuel Vadot one of: 17*c66ec88fSEmmanuel Vadot - "nvidia,tegra186-hsp" 18*c66ec88fSEmmanuel Vadot - "nvidia,tegra194-hsp", "nvidia,tegra186-hsp" 19*c66ec88fSEmmanuel Vadot- reg : Offset and length of the register set for the device. 20*c66ec88fSEmmanuel Vadot- interrupt-names 21*c66ec88fSEmmanuel Vadot Array of strings. 22*c66ec88fSEmmanuel Vadot Contains a list of names for the interrupts described by the interrupt 23*c66ec88fSEmmanuel Vadot property. May contain the following entries, in any order: 24*c66ec88fSEmmanuel Vadot - "doorbell" 25*c66ec88fSEmmanuel Vadot - "sharedN", where 'N' is a number from zero up to the number of 26*c66ec88fSEmmanuel Vadot external interrupts supported by the HSP instance minus one. 27*c66ec88fSEmmanuel Vadot Users of this binding MUST look up entries in the interrupt property 28*c66ec88fSEmmanuel Vadot by name, using this interrupt-names property to do so. 29*c66ec88fSEmmanuel Vadot- interrupts 30*c66ec88fSEmmanuel Vadot Array of interrupt specifiers. 31*c66ec88fSEmmanuel Vadot Must contain one entry per entry in the interrupt-names property, 32*c66ec88fSEmmanuel Vadot in a matching order. 33*c66ec88fSEmmanuel Vadot- #mbox-cells : Should be 2. 34*c66ec88fSEmmanuel Vadot 35*c66ec88fSEmmanuel VadotThe mbox specifier of the "mboxes" property in the client node should contain 36*c66ec88fSEmmanuel Vadottwo cells. The first cell determines the HSP type and the second cell is used 37*c66ec88fSEmmanuel Vadotto identify the mailbox that the client is going to use. 38*c66ec88fSEmmanuel Vadot 39*c66ec88fSEmmanuel VadotFor doorbells, the second cell specifies the index of the doorbell to use. 40*c66ec88fSEmmanuel Vadot 41*c66ec88fSEmmanuel VadotFor shared mailboxes, the second cell is composed of two fields: 42*c66ec88fSEmmanuel Vadot- bits 31..24: 43*c66ec88fSEmmanuel Vadot A bit mask of flags that further specify how the shared mailbox will be 44*c66ec88fSEmmanuel Vadot used. Valid flags are: 45*c66ec88fSEmmanuel Vadot - bit 31: 46*c66ec88fSEmmanuel Vadot Defines the direction of the mailbox. If set, the mailbox will be used 47*c66ec88fSEmmanuel Vadot as a producer (i.e. used to send data). If cleared, the mailbox is the 48*c66ec88fSEmmanuel Vadot consumer of data sent by a producer. 49*c66ec88fSEmmanuel Vadot 50*c66ec88fSEmmanuel Vadot- bits 23.. 0: 51*c66ec88fSEmmanuel Vadot The index of the shared mailbox to use. The number of available mailboxes 52*c66ec88fSEmmanuel Vadot may vary by instance of the HSP block and SoC generation. 53*c66ec88fSEmmanuel Vadot 54*c66ec88fSEmmanuel VadotThe following file contains definitions that can be used to construct mailbox 55*c66ec88fSEmmanuel Vadotspecifiers: 56*c66ec88fSEmmanuel Vadot 57*c66ec88fSEmmanuel Vadot <dt-bindings/mailbox/tegra186-hsp.h> 58*c66ec88fSEmmanuel Vadot 59*c66ec88fSEmmanuel VadotExample: 60*c66ec88fSEmmanuel Vadot 61*c66ec88fSEmmanuel Vadothsp_top0: hsp@3c00000 { 62*c66ec88fSEmmanuel Vadot compatible = "nvidia,tegra186-hsp"; 63*c66ec88fSEmmanuel Vadot reg = <0x0 0x03c00000 0x0 0xa0000>; 64*c66ec88fSEmmanuel Vadot interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>; 65*c66ec88fSEmmanuel Vadot interrupt-names = "doorbell"; 66*c66ec88fSEmmanuel Vadot #mbox-cells = <2>; 67*c66ec88fSEmmanuel Vadot}; 68*c66ec88fSEmmanuel Vadot 69*c66ec88fSEmmanuel Vadotclient { 70*c66ec88fSEmmanuel Vadot ... 71*c66ec88fSEmmanuel Vadot mboxes = <&hsp_top0 TEGRA_HSP_MBOX_TYPE_DB TEGRA_HSP_DB_MASTER_XXX>; 72*c66ec88fSEmmanuel Vadot}; 73