| .. | .. |
|---|
| 9 | 9 | mailbox.txt for generic information about mailbox device-tree bindings. |
|---|
| 10 | 10 | |
|---|
| 11 | 11 | Required properties: |
|---|
| 12 | | -- compatible: Must be "mediatek,mt8173-gce" |
|---|
| 12 | +- compatible: can be "mediatek,mt8173-gce", "mediatek,mt8183-gce" or |
|---|
| 13 | + "mediatek,mt6779-gce". |
|---|
| 13 | 14 | - reg: Address range of the GCE unit |
|---|
| 14 | 15 | - interrupts: The interrupt signal from the GCE block |
|---|
| 15 | 16 | - clock: Clocks according to the common clock binding |
|---|
| 16 | 17 | - clock-names: Must be "gce" to stand for GCE clock |
|---|
| 17 | | -- #mbox-cells: Should be 3. |
|---|
| 18 | | - <&phandle channel priority atomic_exec> |
|---|
| 18 | +- #mbox-cells: Should be 2. |
|---|
| 19 | + <&phandle channel priority> |
|---|
| 19 | 20 | phandle: Label name of a gce node. |
|---|
| 20 | 21 | channel: Channel of mailbox. Be equal to the thread id of GCE. |
|---|
| 21 | 22 | priority: Priority of GCE thread. |
|---|
| 22 | | - atomic_exec: GCE processing continuous packets of commands in atomic |
|---|
| 23 | | - way. |
|---|
| 24 | 23 | |
|---|
| 25 | 24 | Required properties for a client device: |
|---|
| 26 | 25 | - mboxes: Client use mailbox to communicate with GCE, it should have this |
|---|
| 27 | 26 | property and list of phandle, mailbox specifiers. |
|---|
| 28 | | -- mediatek,gce-subsys: u32, specify the sub-system id which is corresponding |
|---|
| 29 | | - to the register address. |
|---|
| 27 | +Optional properties for a client device: |
|---|
| 28 | +- mediatek,gce-client-reg: Specify the sub-system id which is corresponding |
|---|
| 29 | + to the register address, it should have this property and list of phandle, |
|---|
| 30 | + sub-system specifiers. |
|---|
| 31 | + <&phandle subsys_number start_offset size> |
|---|
| 32 | + phandle: Label name of a gce node. |
|---|
| 33 | + subsys_number: specify the sub-system id which is corresponding |
|---|
| 34 | + to the register address. |
|---|
| 35 | + start_offset: the start offset of register address that GCE can access. |
|---|
| 36 | + size: the total size of register address that GCE can access. |
|---|
| 30 | 37 | |
|---|
| 31 | | -Some vaules of properties are defined in 'dt-bindings/gce/mt8173-gce.h'. Such as |
|---|
| 38 | +Some vaules of properties are defined in 'dt-bindings/gce/mt8173-gce.h', |
|---|
| 39 | +'dt-binding/gce/mt8183-gce.h' or 'dt-bindings/gce/mt6779-gce.h'. Such as |
|---|
| 32 | 40 | sub-system ids, thread priority, event ids. |
|---|
| 33 | 41 | |
|---|
| 34 | 42 | Example: |
|---|
| .. | .. |
|---|
| 39 | 47 | interrupts = <GIC_SPI 135 IRQ_TYPE_LEVEL_LOW>; |
|---|
| 40 | 48 | clocks = <&infracfg CLK_INFRA_GCE>; |
|---|
| 41 | 49 | clock-names = "gce"; |
|---|
| 42 | | - thread-num = CMDQ_THR_MAX_COUNT; |
|---|
| 43 | | - #mbox-cells = <3>; |
|---|
| 50 | + #mbox-cells = <2>; |
|---|
| 44 | 51 | }; |
|---|
| 45 | 52 | |
|---|
| 46 | 53 | Example for a client device: |
|---|
| 47 | 54 | |
|---|
| 48 | 55 | mmsys: clock-controller@14000000 { |
|---|
| 49 | 56 | compatible = "mediatek,mt8173-mmsys"; |
|---|
| 50 | | - mboxes = <&gce 0 CMDQ_THR_PRIO_LOWEST 1>, |
|---|
| 51 | | - <&gce 1 CMDQ_THR_PRIO_LOWEST 1>; |
|---|
| 52 | | - mediatek,gce-subsys = <SUBSYS_1400XXXX>; |
|---|
| 57 | + mboxes = <&gce 0 CMDQ_THR_PRIO_LOWEST>, |
|---|
| 58 | + <&gce 1 CMDQ_THR_PRIO_LOWEST>; |
|---|
| 53 | 59 | mutex-event-eof = <CMDQ_EVENT_MUTEX0_STREAM_EOF |
|---|
| 54 | 60 | CMDQ_EVENT_MUTEX1_STREAM_EOF>; |
|---|
| 55 | | - |
|---|
| 61 | + mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0x3000 0x1000>, |
|---|
| 62 | + <&gce SUBSYS_1401XXXX 0x2000 0x100>; |
|---|
| 56 | 63 | ... |
|---|
| 57 | 64 | }; |
|---|