summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/media/s5p-mfc.txt
blob: a1f619286cb662b1df53e03ad7fbe7f86c305580 (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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
* Samsung Multi Format Codec (MFC)

Multi Format Codec (MFC) is the IP present in Samsung SoCs which
supports high resolution decoding and encoding functionalities.
The MFC device driver is a v4l2 driver which can encode/decode
video raw/elementary streams and has support for all popular
video codecs.

The MFC device is connected to system bus with two memory ports (AXI
masters) for better performance. Those memory ports are modelled as
separate child devices, so one can assign some properties to them (like
memory region for dma buffer allocation or sysmmu controller).

Required properties:
  - compatible : value should be either one among the following
	(a) "samsung,mfc-v5" for MFC v5 present in Exynos4 SoCs
	(b) "samsung,mfc-v6" for MFC v6 present in Exynos5 SoCs
	and additionally "simple-bus" to correctly initialize child
	devices for memory ports (AXI masters)

  - reg : Physical base address of the IP registers and length of memory
	  mapped region.

  - interrupts : MFC interrupt number to the CPU.

Optional properties:
  - samsung,power-domain : power-domain property defined with a phandle
			   to respective power domain.

Two child nodes must be defined for MFC device. Their names must be
following: "memport-r" and "memport-l" ("right" and "left"). Required
properties:
  - compatible : value should be "samsung,memport"
  - dma-memory-region : optional property with a phandle to respective memory
			region (see devicetree/bindings/memory.txt), if no region
			is defined, sysmmu controller must be used for managing
			limited dma window of each memory port.


Example:
SoC specific DT entry:

mfc: codec@13400000 {
	compatible = "samsung,mfc-v5", "simple-bus";
	reg = <0x13400000 0x10000>;
	interrupts = <0 94 0>;
	samsung,power-domain = <&pd_mfc>;
	status = "disabled";

	mfc_r: memport-r {
		compatible = "samsung,memport";
	};

	mfc_l: memport-l {
		compatible = "samsung,memport";
	};
};

Board specific DT entry:

memory {
	/* ... */
	reserved-memory {
		#address-cells = <1>;
		#size-cells = <1>;

		mfc_l_mem: mfc_l_region@43000000 {
			compatible = "contiguous-memory-region", "reserved-memory-region";
			reg = <0x43000000 0x1000000>;
		};

		mfc_r_mem: mfc_r_region@52000000 {
			compatible = "contiguous-memory-region", "reserved-memory-region";
			reg = <0x52000000 0x1000000>;
		};
	};
};

codec@13400000 {
	status = "okay";

	memport-r {
		dma-memory-region = <&mfc_r_mem>;
	};

	memport-l {
		dma-memory-region = <&mfc_l_mem>;
	};
};