summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/media/amlogic,vdec.txt
blob: 9b6aace86ca7e185ba4b6a3428067a2cd7ab7e46 (plain)
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Amlogic Video Decoder
================================

The video decoding IP lies within the DOS memory region,
except for the hardware bitstream parser that makes use of an undocumented
region.

It makes use of the following blocks:

- ESPARSER is a bitstream parser that outputs to a VIFIFO. Further VDEC blocks
then feed from this VIFIFO.
- VDEC_1 can decode MPEG-1, MPEG-2, MPEG-4 part 2, MJPEG, H.263, H.264, VC-1.
- VDEC_HEVC can decode HEVC and VP9.

Both VDEC_1 and VDEC_HEVC share the "vdec" IRQ and as such cannot run
concurrently.

Device Tree Bindings:
---------------------

VDEC: Video Decoder
--------------------------

Required properties:
- compatible: value should be different for each SoC family as :
	- GXBB (S905) : "amlogic,gxbb-vdec"
	- GXL (S905X, S905D) : "amlogic,gxl-vdec"
	- GXM (S912) : "amlogic,gxm-vdec"
	followed by the common "amlogic,gx-vdec"
- reg: base address and size of he following memory-mapped regions :
	- dos
	- esparser
- reg-names: should contain the names of the previous memory regions
- interrupts: should contain the following IRQs:
	- vdec
	- esparser
- interrupt-names: should contain the names of the previous interrupts
- amlogic,ao-sysctrl: should point to the AOBUS sysctrl node
- amlogic,canvas: should point to a canvas provider node
- clocks: should contain the following clocks :
	- dos_parser
	- dos
	- vdec_1
	- vdec_hevc
- clock-names: should contain the names of the previous clocks
- resets: should contain the parser reset
- reset-names: should be "esparser"

Example:

vdec: video-codec@c8820000 {
	compatible = "amlogic,gxbb-vdec", "amlogic,gx-vdec";
	reg = <0x0 0xc8820000 0x0 0x10000>,
	      <0x0 0xc110a580 0x0 0xe4>;
	reg-names = "dos", "esparser";

	interrupts = <GIC_SPI 44 IRQ_TYPE_EDGE_RISING>,
		     <GIC_SPI 32 IRQ_TYPE_EDGE_RISING>;
	interrupt-names = "vdec", "esparser";

	amlogic,ao-sysctrl = <&sysctrl_AO>;
	amlogic,canvas = <&canvas>;

	clocks = <&clkc CLKID_DOS_PARSER>,
		 <&clkc CLKID_DOS>,
		 <&clkc CLKID_VDEC_1>,
		 <&clkc CLKID_VDEC_HEVC>;
	clock-names = "dos_parser", "dos", "vdec_1", "vdec_hevc";

	resets = <&reset RESET_PARSER>;
	reset-names = "esparser";
};