mediatek,gce-props.yaml 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/mailbox/mediatek,gce-props.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: MediaTek Global Command Engine Common Properties
  7. maintainers:
  8. - Houlong Wei <houlong.wei@mediatek.com>
  9. description:
  10. The Global Command Engine (GCE) is an instruction based, multi-threaded,
  11. single-core command dispatcher for MediaTek hardware. The Command Queue
  12. (CMDQ) mailbox driver is a driver for GCE, implemented using the Linux
  13. mailbox framework. It is used to receive messages from mailbox consumers
  14. and configure GCE to execute the specified instruction set in the message.
  15. We use mediatek,gce-mailbox.yaml to define the properties for CMDQ mailbox
  16. driver. A device driver that uses the CMDQ driver to configure its hardware
  17. registers is a mailbox consumer. The mailbox consumer can request a mailbox
  18. channel corresponding to a GCE hardware thread to send a message, specifying
  19. that the GCE thread to configure its hardware. The mailbox provider can also
  20. reserve a mailbox channel to configure GCE hardware register by the specific
  21. GCE thread. This binding defines the common GCE properties for both mailbox
  22. provider and consumers.
  23. properties:
  24. mediatek,gce-events:
  25. description:
  26. GCE has an event table in SRAM, consisting of 1024 event IDs (0~1023).
  27. Each event ID has a boolean event value with the default value 0.
  28. The property mediatek,gce-events is used to obtain the event IDs.
  29. Some gce-events are hardware-bound and cannot be changed by software.
  30. For instance, in MT8195, when VDO0_MUTEX is stream done, VDO_MUTEX will
  31. send an event signal to GCE, setting the value of event ID 597 to 1.
  32. Similarly, in MT8188, the value of event ID 574 will be set to 1 when
  33. VOD0_MUTEX is stream done.
  34. On the other hand, some gce-events are not hardware-bound and can be
  35. changed by software. For example, in MT8188, we can set the value of
  36. event ID 855, which is not bound to any hardware, to 1 when the driver
  37. in the secure world completes a task. However, in MT8195, event ID 855
  38. is already bound to VDEC_LAT1, so we need to select another event ID to
  39. achieve the same purpose. This event ID can be any ID that is not bound
  40. to any hardware and is not yet used in any software driver.
  41. To determine if the event ID is bound to the hardware or used by a
  42. software driver, refer to the GCE header
  43. include/dt-bindings/gce/<chip>-gce.h of each chip.
  44. $ref: /schemas/types.yaml#/definitions/uint32-array
  45. minItems: 1
  46. maxItems: 32
  47. additionalProperties: true