Documentation / devicetree / bindings / mailbox / mediatek,gce-props.yaml


Based on kernel version 6.11. Page generated on 2024-09-24 08:21 EST.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/mailbox/mediatek,gce-props.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: MediaTek Global Command Engine Common Properties

maintainers:
  - Houlong Wei <houlong.wei@mediatek.com>

description:
  The Global Command Engine (GCE) is an instruction based, multi-threaded,
  single-core command dispatcher for MediaTek hardware. The Command Queue
  (CMDQ) mailbox driver is a driver for GCE, implemented using the Linux
  mailbox framework. It is used to receive messages from mailbox consumers
  and configure GCE to execute the specified instruction set in the message.
  We use mediatek,gce-mailbox.yaml to define the properties for CMDQ mailbox
  driver. A device driver that uses the CMDQ driver to configure its hardware
  registers is a mailbox consumer. The mailbox consumer can request a mailbox
  channel corresponding to a GCE hardware thread to send a message, specifying
  that the GCE thread to configure its hardware. The mailbox provider can also
  reserve a mailbox channel to configure GCE hardware register by the specific
  GCE thread. This binding defines the common GCE properties for both mailbox
  provider and consumers.

properties:
  mediatek,gce-events:
    description:
      GCE has an event table in SRAM, consisting of 1024 event IDs (0~1023).
      Each event ID has a boolean event value with the default value 0.
      The property mediatek,gce-events is used to obtain the event IDs.
      Some gce-events are hardware-bound and cannot be changed by software.
      For instance, in MT8195, when VDO0_MUTEX is stream done, VDO_MUTEX will
      send an event signal to GCE, setting the value of event ID 597 to 1.
      Similarly, in MT8188, the value of event ID 574 will be set to 1 when
      VOD0_MUTEX is stream done.
      On the other hand, some gce-events are not hardware-bound and can be
      changed by software. For example, in MT8188, we can set the value of
      event ID 855, which is not bound to any hardware, to 1 when the driver
      in the secure world completes a task. However, in MT8195, event ID 855
      is already bound to VDEC_LAT1, so we need to select another event ID to
      achieve the same purpose. This event ID can be any ID that is not bound
      to any hardware and is not yet used in any software driver.
      To determine if the event ID is bound to the hardware or used by a
      software driver, refer to the GCE header
      include/dt-bindings/gce/<chip>-gce.h of each chip.
    $ref: /schemas/types.yaml#/definitions/uint32-array
    minItems: 1
    maxItems: 32

additionalProperties: true