mtk-gce.txt 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. MediaTek GCE
  2. ===============
  3. The Global Command Engine (GCE) is used to help read/write registers with
  4. critical time limitation, such as updating display configuration during the
  5. vblank. The GCE can be used to implement the Command Queue (CMDQ) driver.
  6. CMDQ driver uses mailbox framework for communication. Please refer to
  7. mailbox.txt for generic information about mailbox device-tree bindings.
  8. Required properties:
  9. - compatible: Must be "mediatek,mt8173-gce"
  10. - reg: Address range of the GCE unit
  11. - interrupts: The interrupt signal from the GCE block
  12. - clock: Clocks according to the common clock binding
  13. - clock-names: Must be "gce" to stand for GCE clock
  14. - #mbox-cells: Should be 3.
  15. <&phandle channel priority atomic_exec>
  16. phandle: Label name of a gce node.
  17. channel: Channel of mailbox. Be equal to the thread id of GCE.
  18. priority: Priority of GCE thread.
  19. atomic_exec: GCE processing continuous packets of commands in atomic
  20. way.
  21. Required properties for a client device:
  22. - mboxes: Client use mailbox to communicate with GCE, it should have this
  23. property and list of phandle, mailbox specifiers.
  24. - mediatek,gce-subsys: u32, specify the sub-system id which is corresponding
  25. to the register address.
  26. Some vaules of properties are defined in 'dt-bindings/gce/mt8173-gce.h'. Such as
  27. sub-system ids, thread priority, event ids.
  28. Example:
  29. gce: gce@10212000 {
  30. compatible = "mediatek,mt8173-gce";
  31. reg = <0 0x10212000 0 0x1000>;
  32. interrupts = <GIC_SPI 135 IRQ_TYPE_LEVEL_LOW>;
  33. clocks = <&infracfg CLK_INFRA_GCE>;
  34. clock-names = "gce";
  35. thread-num = CMDQ_THR_MAX_COUNT;
  36. #mbox-cells = <3>;
  37. };
  38. Example for a client device:
  39. mmsys: clock-controller@14000000 {
  40. compatible = "mediatek,mt8173-mmsys";
  41. mboxes = <&gce 0 CMDQ_THR_PRIO_LOWEST 1>,
  42. <&gce 1 CMDQ_THR_PRIO_LOWEST 1>;
  43. mediatek,gce-subsys = <SUBSYS_1400XXXX>;
  44. mutex-event-eof = <CMDQ_EVENT_MUTEX0_STREAM_EOF
  45. CMDQ_EVENT_MUTEX1_STREAM_EOF>;
  46. ...
  47. };