xref: /openbmc/linux/Documentation/devicetree/bindings/media/amlogic,gx-vdec.yaml (revision 7f464532b05dadc8f96acdda7093334c863e7a06)
1604bd5aeSNeil Armstrong# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2604bd5aeSNeil Armstrong# Copyright 2019 BayLibre, SAS
3604bd5aeSNeil Armstrong%YAML 1.2
4604bd5aeSNeil Armstrong---
5604bd5aeSNeil Armstrong$id: "http://devicetree.org/schemas/media/amlogic,gx-vdec.yaml#"
6604bd5aeSNeil Armstrong$schema: "http://devicetree.org/meta-schemas/core.yaml#"
7604bd5aeSNeil Armstrong
8604bd5aeSNeil Armstrongtitle: Amlogic Video Decoder
9604bd5aeSNeil Armstrong
10604bd5aeSNeil Armstrongmaintainers:
11604bd5aeSNeil Armstrong  - Neil Armstrong <narmstrong@baylibre.com>
12604bd5aeSNeil Armstrong  - Maxime Jourdan <mjourdan@baylibre.com>
13604bd5aeSNeil Armstrong
14604bd5aeSNeil Armstrongdescription: |
15604bd5aeSNeil Armstrong  The video decoding IP lies within the DOS memory region,
16604bd5aeSNeil Armstrong  except for the hardware bitstream parser that makes use of an undocumented
17604bd5aeSNeil Armstrong  region.
18604bd5aeSNeil Armstrong
19604bd5aeSNeil Armstrong  It makes use of the following blocks:
20604bd5aeSNeil Armstrong  - ESPARSER is a bitstream parser that outputs to a VIFIFO. Further VDEC blocks
21604bd5aeSNeil Armstrong    then feed from this VIFIFO.
22604bd5aeSNeil Armstrong  - VDEC_1 can decode MPEG-1, MPEG-2, MPEG-4 part 2, MJPEG, H.263, H.264, VC-1.
23604bd5aeSNeil Armstrong  - VDEC_HEVC can decode HEVC and VP9.
24604bd5aeSNeil Armstrong
25604bd5aeSNeil Armstrong  Both VDEC_1 and VDEC_HEVC share the "vdec" IRQ and as such cannot run
26604bd5aeSNeil Armstrong  concurrently.
27604bd5aeSNeil Armstrong
28604bd5aeSNeil Armstrongproperties:
29604bd5aeSNeil Armstrong  compatible:
3070ae805aSNeil Armstrong    oneOf:
3170ae805aSNeil Armstrong      - items:
32604bd5aeSNeil Armstrong        - enum:
33604bd5aeSNeil Armstrong          - amlogic,gxbb-vdec # GXBB (S905)
34604bd5aeSNeil Armstrong          - amlogic,gxl-vdec # GXL (S905X, S905D)
35604bd5aeSNeil Armstrong          - amlogic,gxm-vdec # GXM (S912)
36604bd5aeSNeil Armstrong        - const: amlogic,gx-vdec
3770ae805aSNeil Armstrong      - enum:
3870ae805aSNeil Armstrong        - amlogic,g12a-vdec # G12A (S905X2, S905D2)
393d8af3b4SNeil Armstrong        - amlogic,sm1-vdec # SM1 (S905X3, S905D3)
40604bd5aeSNeil Armstrong
41604bd5aeSNeil Armstrong  interrupts:
42604bd5aeSNeil Armstrong    minItems: 2
43604bd5aeSNeil Armstrong
44604bd5aeSNeil Armstrong  interrupt-names:
45604bd5aeSNeil Armstrong    items:
46604bd5aeSNeil Armstrong      - const: vdec
47604bd5aeSNeil Armstrong      - const: esparser
48604bd5aeSNeil Armstrong
49604bd5aeSNeil Armstrong  reg:
50604bd5aeSNeil Armstrong    minItems: 2
51604bd5aeSNeil Armstrong
52604bd5aeSNeil Armstrong  reg-names:
53604bd5aeSNeil Armstrong    items:
54604bd5aeSNeil Armstrong      - const: dos
55604bd5aeSNeil Armstrong      - const: esparser
56604bd5aeSNeil Armstrong
57604bd5aeSNeil Armstrong  resets:
58604bd5aeSNeil Armstrong    maxItems: 1
59604bd5aeSNeil Armstrong
60604bd5aeSNeil Armstrong  reset-names:
61604bd5aeSNeil Armstrong    items:
62604bd5aeSNeil Armstrong      - const: esparser
63604bd5aeSNeil Armstrong
64604bd5aeSNeil Armstrong  clocks:
65604bd5aeSNeil Armstrong    minItems: 4
6670ae805aSNeil Armstrong    maxItems: 5
67604bd5aeSNeil Armstrong
68604bd5aeSNeil Armstrong  clock-names:
6970ae805aSNeil Armstrong    minItems: 4
7070ae805aSNeil Armstrong    maxItems: 5
71604bd5aeSNeil Armstrong    items:
72604bd5aeSNeil Armstrong      - const: dos_parser
73604bd5aeSNeil Armstrong      - const: dos
74604bd5aeSNeil Armstrong      - const: vdec_1
75604bd5aeSNeil Armstrong      - const: vdec_hevc
7670ae805aSNeil Armstrong      - const: vdec_hevcf
77604bd5aeSNeil Armstrong
78604bd5aeSNeil Armstrong  amlogic,ao-sysctrl:
79604bd5aeSNeil Armstrong    description: should point to the AOBUS sysctrl node
80604bd5aeSNeil Armstrong    allOf:
81604bd5aeSNeil Armstrong      - $ref: /schemas/types.yaml#/definitions/phandle
82604bd5aeSNeil Armstrong
83604bd5aeSNeil Armstrong  amlogic,canvas:
84604bd5aeSNeil Armstrong    description: should point to a canvas provider node
85604bd5aeSNeil Armstrong    allOf:
86604bd5aeSNeil Armstrong      - $ref: /schemas/types.yaml#/definitions/phandle
87604bd5aeSNeil Armstrong
8870ae805aSNeil ArmstrongallOf:
8970ae805aSNeil Armstrong  - if:
9070ae805aSNeil Armstrong      properties:
9170ae805aSNeil Armstrong        compatible:
9270ae805aSNeil Armstrong          contains:
9370ae805aSNeil Armstrong            enum:
9470ae805aSNeil Armstrong              - amlogic,gx-vdec
9570ae805aSNeil Armstrong
9670ae805aSNeil Armstrong    then:
9770ae805aSNeil Armstrong      properties:
9870ae805aSNeil Armstrong        clock-names:
9970ae805aSNeil Armstrong          maxItems: 4
10070ae805aSNeil Armstrong
10170ae805aSNeil Armstrong  - if:
10270ae805aSNeil Armstrong      properties:
10370ae805aSNeil Armstrong        compatible:
10470ae805aSNeil Armstrong          contains:
10570ae805aSNeil Armstrong            enum:
10670ae805aSNeil Armstrong              - amlogic,g12a-vdec
1073d8af3b4SNeil Armstrong              - amlogic,sm1-vdec
10870ae805aSNeil Armstrong
10970ae805aSNeil Armstrong    then:
11070ae805aSNeil Armstrong      properties:
11170ae805aSNeil Armstrong        clock-names:
11270ae805aSNeil Armstrong          minItems: 5
11370ae805aSNeil Armstrong
114604bd5aeSNeil Armstrongrequired:
115604bd5aeSNeil Armstrong  - compatible
116604bd5aeSNeil Armstrong  - reg
117604bd5aeSNeil Armstrong  - reg-names
118604bd5aeSNeil Armstrong  - interrupts
119604bd5aeSNeil Armstrong  - interrupt-names
120604bd5aeSNeil Armstrong  - clocks
121604bd5aeSNeil Armstrong  - clock-names
122604bd5aeSNeil Armstrong  - resets
123604bd5aeSNeil Armstrong  - reset-names
124604bd5aeSNeil Armstrong  - amlogic,ao-sysctrl
125604bd5aeSNeil Armstrong  - amlogic,canvas
126604bd5aeSNeil Armstrong
127*7f464532SRob HerringadditionalProperties: false
128*7f464532SRob Herring
129604bd5aeSNeil Armstrongexamples:
130604bd5aeSNeil Armstrong  - |
131604bd5aeSNeil Armstrong    vdec: video-decoder@c8820000 {
132604bd5aeSNeil Armstrong          compatible = "amlogic,gxl-vdec", "amlogic,gx-vdec";
133604bd5aeSNeil Armstrong          reg = <0xc8820000 0x10000>, <0xc110a580 0xe4>;
134604bd5aeSNeil Armstrong          reg-names = "dos", "esparser";
135604bd5aeSNeil Armstrong          interrupts = <44>, <32>;
136604bd5aeSNeil Armstrong          interrupt-names = "vdec", "esparser";
137604bd5aeSNeil Armstrong          clocks = <&clk_dos_parser> ,<&clk_dos>, <&clk_vdec_1>, <&clk_vdec_hevc>;
138604bd5aeSNeil Armstrong          clock-names = "dos_parser", "dos", "vdec_1", "vdec_hevc";
139604bd5aeSNeil Armstrong          resets = <&reset_parser>;
140604bd5aeSNeil Armstrong          reset-names = "esparser";
141604bd5aeSNeil Armstrong          amlogic,ao-sysctrl = <&sysctrl_AO>;
142604bd5aeSNeil Armstrong          amlogic,canvas = <&canvas>;
143604bd5aeSNeil Armstrong    };
144