xref: /openbmc/linux/Documentation/devicetree/bindings/media/amlogic,gx-vdec.yaml (revision 70ae805a0bb9b926d5c92321ee8018f99638a9a0)
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:
30*70ae805aSNeil Armstrong    oneOf:
31*70ae805aSNeil 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
37*70ae805aSNeil Armstrong      - enum:
38*70ae805aSNeil Armstrong        - amlogic,g12a-vdec # G12A (S905X2, S905D2)
39604bd5aeSNeil Armstrong
40604bd5aeSNeil Armstrong  interrupts:
41604bd5aeSNeil Armstrong    minItems: 2
42604bd5aeSNeil Armstrong
43604bd5aeSNeil Armstrong  interrupt-names:
44604bd5aeSNeil Armstrong    items:
45604bd5aeSNeil Armstrong      - const: vdec
46604bd5aeSNeil Armstrong      - const: esparser
47604bd5aeSNeil Armstrong
48604bd5aeSNeil Armstrong  reg:
49604bd5aeSNeil Armstrong    minItems: 2
50604bd5aeSNeil Armstrong
51604bd5aeSNeil Armstrong  reg-names:
52604bd5aeSNeil Armstrong    items:
53604bd5aeSNeil Armstrong      - const: dos
54604bd5aeSNeil Armstrong      - const: esparser
55604bd5aeSNeil Armstrong
56604bd5aeSNeil Armstrong  resets:
57604bd5aeSNeil Armstrong    maxItems: 1
58604bd5aeSNeil Armstrong
59604bd5aeSNeil Armstrong  reset-names:
60604bd5aeSNeil Armstrong    items:
61604bd5aeSNeil Armstrong      - const: esparser
62604bd5aeSNeil Armstrong
63604bd5aeSNeil Armstrong  clocks:
64604bd5aeSNeil Armstrong    minItems: 4
65*70ae805aSNeil Armstrong    maxItems: 5
66604bd5aeSNeil Armstrong
67604bd5aeSNeil Armstrong  clock-names:
68*70ae805aSNeil Armstrong    minItems: 4
69*70ae805aSNeil Armstrong    maxItems: 5
70604bd5aeSNeil Armstrong    items:
71604bd5aeSNeil Armstrong      - const: dos_parser
72604bd5aeSNeil Armstrong      - const: dos
73604bd5aeSNeil Armstrong      - const: vdec_1
74604bd5aeSNeil Armstrong      - const: vdec_hevc
75*70ae805aSNeil Armstrong      - const: vdec_hevcf
76604bd5aeSNeil Armstrong
77604bd5aeSNeil Armstrong  amlogic,ao-sysctrl:
78604bd5aeSNeil Armstrong    description: should point to the AOBUS sysctrl node
79604bd5aeSNeil Armstrong    allOf:
80604bd5aeSNeil Armstrong      - $ref: /schemas/types.yaml#/definitions/phandle
81604bd5aeSNeil Armstrong
82604bd5aeSNeil Armstrong  amlogic,canvas:
83604bd5aeSNeil Armstrong    description: should point to a canvas provider node
84604bd5aeSNeil Armstrong    allOf:
85604bd5aeSNeil Armstrong      - $ref: /schemas/types.yaml#/definitions/phandle
86604bd5aeSNeil Armstrong
87*70ae805aSNeil ArmstrongallOf:
88*70ae805aSNeil Armstrong  - if:
89*70ae805aSNeil Armstrong      properties:
90*70ae805aSNeil Armstrong        compatible:
91*70ae805aSNeil Armstrong          contains:
92*70ae805aSNeil Armstrong            enum:
93*70ae805aSNeil Armstrong              - amlogic,gx-vdec
94*70ae805aSNeil Armstrong
95*70ae805aSNeil Armstrong    then:
96*70ae805aSNeil Armstrong      properties:
97*70ae805aSNeil Armstrong        clock-names:
98*70ae805aSNeil Armstrong          maxItems: 4
99*70ae805aSNeil Armstrong
100*70ae805aSNeil Armstrong  - if:
101*70ae805aSNeil Armstrong      properties:
102*70ae805aSNeil Armstrong        compatible:
103*70ae805aSNeil Armstrong          contains:
104*70ae805aSNeil Armstrong            enum:
105*70ae805aSNeil Armstrong              - amlogic,g12a-vdec
106*70ae805aSNeil Armstrong
107*70ae805aSNeil Armstrong    then:
108*70ae805aSNeil Armstrong      properties:
109*70ae805aSNeil Armstrong        clock-names:
110*70ae805aSNeil Armstrong          minItems: 5
111*70ae805aSNeil Armstrong
112604bd5aeSNeil Armstrongrequired:
113604bd5aeSNeil Armstrong  - compatible
114604bd5aeSNeil Armstrong  - reg
115604bd5aeSNeil Armstrong  - reg-names
116604bd5aeSNeil Armstrong  - interrupts
117604bd5aeSNeil Armstrong  - interrupt-names
118604bd5aeSNeil Armstrong  - clocks
119604bd5aeSNeil Armstrong  - clock-names
120604bd5aeSNeil Armstrong  - resets
121604bd5aeSNeil Armstrong  - reset-names
122604bd5aeSNeil Armstrong  - amlogic,ao-sysctrl
123604bd5aeSNeil Armstrong  - amlogic,canvas
124604bd5aeSNeil Armstrong
125604bd5aeSNeil Armstrongexamples:
126604bd5aeSNeil Armstrong  - |
127604bd5aeSNeil Armstrong    vdec: video-decoder@c8820000 {
128604bd5aeSNeil Armstrong          compatible = "amlogic,gxl-vdec", "amlogic,gx-vdec";
129604bd5aeSNeil Armstrong          reg = <0xc8820000 0x10000>, <0xc110a580 0xe4>;
130604bd5aeSNeil Armstrong          reg-names = "dos", "esparser";
131604bd5aeSNeil Armstrong          interrupts = <44>, <32>;
132604bd5aeSNeil Armstrong          interrupt-names = "vdec", "esparser";
133604bd5aeSNeil Armstrong          clocks = <&clk_dos_parser> ,<&clk_dos>, <&clk_vdec_1>, <&clk_vdec_hevc>;
134604bd5aeSNeil Armstrong          clock-names = "dos_parser", "dos", "vdec_1", "vdec_hevc";
135604bd5aeSNeil Armstrong          resets = <&reset_parser>;
136604bd5aeSNeil Armstrong          reset-names = "esparser";
137604bd5aeSNeil Armstrong          amlogic,ao-sysctrl = <&sysctrl_AO>;
138604bd5aeSNeil Armstrong          amlogic,canvas = <&canvas>;
139604bd5aeSNeil Armstrong    };
140