xref: /linux/Documentation/devicetree/bindings/media/mediatek,mdp3-rdma.yaml (revision 8da17fe240f573101672cf3fe7c8b9fe0acda80a)
14ad7b396SMoudy Ho# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
24ad7b396SMoudy Ho%YAML 1.2
34ad7b396SMoudy Ho---
44ad7b396SMoudy Ho$id: http://devicetree.org/schemas/media/mediatek,mdp3-rdma.yaml#
54ad7b396SMoudy Ho$schema: http://devicetree.org/meta-schemas/core.yaml#
64ad7b396SMoudy Ho
74ad7b396SMoudy Hotitle: MediaTek Read Direct Memory Access
84ad7b396SMoudy Ho
94ad7b396SMoudy Homaintainers:
104ad7b396SMoudy Ho  - Matthias Brugger <matthias.bgg@gmail.com>
114ad7b396SMoudy Ho  - Moudy Ho <moudy.ho@mediatek.com>
124ad7b396SMoudy Ho
134ad7b396SMoudy Hodescription: |
144ad7b396SMoudy Ho  MediaTek Read Direct Memory Access(RDMA) component used to do read DMA.
154ad7b396SMoudy Ho  It contains one line buffer to store the sufficient pixel data, and
164ad7b396SMoudy Ho  must be siblings to the central MMSYS_CONFIG node.
174ad7b396SMoudy Ho  For a description of the MMSYS_CONFIG binding, see
184ad7b396SMoudy Ho  Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml
194ad7b396SMoudy Ho  for details.
204ad7b396SMoudy Ho
214ad7b396SMoudy Hoproperties:
224ad7b396SMoudy Ho  compatible:
233bae0d63SMoudy Ho    oneOf:
243bae0d63SMoudy Ho      - enum:
253bae0d63SMoudy Ho          - mediatek,mt8183-mdp3-rdma
26*8da17fe2SAngeloGioacchino Del Regno          - mediatek,mt8188-mdp3-rdma
27f0c9cafdSMoudy Ho          - mediatek,mt8195-mdp3-rdma
283bae0d63SMoudy Ho          - mediatek,mt8195-vdo1-rdma
293bae0d63SMoudy Ho      - items:
303bae0d63SMoudy Ho          - const: mediatek,mt8188-vdo1-rdma
313bae0d63SMoudy Ho          - const: mediatek,mt8195-vdo1-rdma
324ad7b396SMoudy Ho
334ad7b396SMoudy Ho  reg:
344ad7b396SMoudy Ho    maxItems: 1
354ad7b396SMoudy Ho
364ad7b396SMoudy Ho  mediatek,gce-client-reg:
37ab190665SRob Herring    $ref: /schemas/types.yaml#/definitions/phandle-array
384ad7b396SMoudy Ho    items:
394ad7b396SMoudy Ho      items:
404ad7b396SMoudy Ho        - description: phandle of GCE
414ad7b396SMoudy Ho        - description: GCE subsys id
424ad7b396SMoudy Ho        - description: register offset
434ad7b396SMoudy Ho        - description: register size
444ad7b396SMoudy Ho    description: The register of client driver can be configured by gce with
454ad7b396SMoudy Ho      4 arguments defined in this property. Each GCE subsys id is mapping to
464ad7b396SMoudy Ho      a client defined in the header include/dt-bindings/gce/<chip>-gce.h.
474ad7b396SMoudy Ho
484ad7b396SMoudy Ho  mediatek,gce-events:
494ad7b396SMoudy Ho    description:
504ad7b396SMoudy Ho      The event id which is mapping to the specific hardware event signal
514ad7b396SMoudy Ho      to gce. The event id is defined in the gce header
524ad7b396SMoudy Ho      include/dt-bindings/gce/<chip>-gce.h of each chips.
534ad7b396SMoudy Ho    $ref: /schemas/types.yaml#/definitions/uint32-array
544ad7b396SMoudy Ho
55a17cf4c6SAngeloGioacchino Del Regno  mediatek,scp:
56a17cf4c6SAngeloGioacchino Del Regno    $ref: /schemas/types.yaml#/definitions/phandle
57a17cf4c6SAngeloGioacchino Del Regno    description:
58a17cf4c6SAngeloGioacchino Del Regno      Phandle to the System Control Processor (SCP) used for initializing
59a17cf4c6SAngeloGioacchino Del Regno      and stopping the MDP3, for sending frame data locations to the MDP3's
60a17cf4c6SAngeloGioacchino Del Regno      VPU and to install Inter-Processor Interrupt handlers to control
61a17cf4c6SAngeloGioacchino Del Regno      processing states.
62a17cf4c6SAngeloGioacchino Del Regno
634ad7b396SMoudy Ho  power-domains:
644ad7b396SMoudy Ho    maxItems: 1
654ad7b396SMoudy Ho
664ad7b396SMoudy Ho  clocks:
674ad7b396SMoudy Ho    items:
684ad7b396SMoudy Ho      - description: RDMA clock
694ad7b396SMoudy Ho      - description: RSZ clock
703bae0d63SMoudy Ho    minItems: 1
714ad7b396SMoudy Ho
724ad7b396SMoudy Ho  iommus:
734ad7b396SMoudy Ho    maxItems: 1
744ad7b396SMoudy Ho
754ad7b396SMoudy Ho  mboxes:
764ad7b396SMoudy Ho    items:
774ad7b396SMoudy Ho      - description: used for 1st data pipe from RDMA
784ad7b396SMoudy Ho      - description: used for 2nd data pipe from RDMA
79f0c9cafdSMoudy Ho      - description: used for 3rd data pipe from RDMA
80f0c9cafdSMoudy Ho      - description: used for 4th data pipe from RDMA
81f0c9cafdSMoudy Ho      - description: used for the data pipe from SPLIT
823bae0d63SMoudy Ho    minItems: 1
833bae0d63SMoudy Ho
843bae0d63SMoudy Ho  interrupts:
853bae0d63SMoudy Ho    maxItems: 1
864ad7b396SMoudy Ho
87f5f185bfSMoudy Ho  '#dma-cells':
88f5f185bfSMoudy Ho    const: 1
89f5f185bfSMoudy Ho
904ad7b396SMoudy Horequired:
914ad7b396SMoudy Ho  - compatible
924ad7b396SMoudy Ho  - reg
934ad7b396SMoudy Ho  - mediatek,gce-client-reg
944ad7b396SMoudy Ho  - power-domains
954ad7b396SMoudy Ho  - clocks
964ad7b396SMoudy Ho  - iommus
97f5f185bfSMoudy Ho  - '#dma-cells'
984ad7b396SMoudy Ho
993bae0d63SMoudy HoallOf:
1003bae0d63SMoudy Ho  - if:
1013bae0d63SMoudy Ho      properties:
1023bae0d63SMoudy Ho        compatible:
1033bae0d63SMoudy Ho          contains:
1043bae0d63SMoudy Ho            const: mediatek,mt8183-mdp3-rdma
1053bae0d63SMoudy Ho
1063bae0d63SMoudy Ho    then:
1073bae0d63SMoudy Ho      properties:
1083bae0d63SMoudy Ho        clocks:
1093bae0d63SMoudy Ho          minItems: 2
1103bae0d63SMoudy Ho
1113bae0d63SMoudy Ho        mboxes:
1123bae0d63SMoudy Ho          minItems: 2
1133bae0d63SMoudy Ho
1143bae0d63SMoudy Ho      required:
1153bae0d63SMoudy Ho        - mboxes
1163bae0d63SMoudy Ho        - mediatek,gce-events
1173bae0d63SMoudy Ho
1183bae0d63SMoudy Ho  - if:
1193bae0d63SMoudy Ho      properties:
1203bae0d63SMoudy Ho        compatible:
1213bae0d63SMoudy Ho          contains:
122f0c9cafdSMoudy Ho            const: mediatek,mt8195-mdp3-rdma
123f0c9cafdSMoudy Ho
124f0c9cafdSMoudy Ho    then:
125f0c9cafdSMoudy Ho      properties:
126f0c9cafdSMoudy Ho        clocks:
127f0c9cafdSMoudy Ho          maxItems: 1
128f0c9cafdSMoudy Ho
129f0c9cafdSMoudy Ho        mboxes:
130f0c9cafdSMoudy Ho          minItems: 5
131f0c9cafdSMoudy Ho
132f0c9cafdSMoudy Ho      required:
133f0c9cafdSMoudy Ho        - mediatek,gce-events
134f0c9cafdSMoudy Ho
135f0c9cafdSMoudy Ho  - if:
136f0c9cafdSMoudy Ho      properties:
137f0c9cafdSMoudy Ho        compatible:
138f0c9cafdSMoudy Ho          contains:
1393bae0d63SMoudy Ho            const: mediatek,mt8195-vdo1-rdma
1403bae0d63SMoudy Ho
1413bae0d63SMoudy Ho    then:
1423bae0d63SMoudy Ho      properties:
1433bae0d63SMoudy Ho        clocks:
1443bae0d63SMoudy Ho          maxItems: 1
1453bae0d63SMoudy Ho
1464ad7b396SMoudy HoadditionalProperties: false
1474ad7b396SMoudy Ho
1484ad7b396SMoudy Hoexamples:
1494ad7b396SMoudy Ho  - |
1504ad7b396SMoudy Ho    #include <dt-bindings/clock/mt8183-clk.h>
1514ad7b396SMoudy Ho    #include <dt-bindings/gce/mt8183-gce.h>
1524ad7b396SMoudy Ho    #include <dt-bindings/power/mt8183-power.h>
1534ad7b396SMoudy Ho    #include <dt-bindings/memory/mt8183-larb-port.h>
1544ad7b396SMoudy Ho
155f5f185bfSMoudy Ho    dma-controller@14001000 {
1564ad7b396SMoudy Ho        compatible = "mediatek,mt8183-mdp3-rdma";
1574ad7b396SMoudy Ho        reg = <0x14001000 0x1000>;
1584ad7b396SMoudy Ho        mediatek,gce-client-reg = <&gce SUBSYS_1400XXXX 0x1000 0x1000>;
1594ad7b396SMoudy Ho        mediatek,gce-events = <CMDQ_EVENT_MDP_RDMA0_SOF>,
1604ad7b396SMoudy Ho                              <CMDQ_EVENT_MDP_RDMA0_EOF>;
1614ad7b396SMoudy Ho        power-domains = <&spm MT8183_POWER_DOMAIN_DISP>;
1624ad7b396SMoudy Ho        clocks = <&mmsys CLK_MM_MDP_RDMA0>,
1634ad7b396SMoudy Ho                 <&mmsys CLK_MM_MDP_RSZ1>;
1644ad7b396SMoudy Ho        iommus = <&iommu>;
1654ad7b396SMoudy Ho        mboxes = <&gce 20 CMDQ_THR_PRIO_LOWEST>,
1664ad7b396SMoudy Ho                 <&gce 21 CMDQ_THR_PRIO_LOWEST>;
167f5f185bfSMoudy Ho        #dma-cells = <1>;
1684ad7b396SMoudy Ho    };
169