diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-30 12:58:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-30 12:58:16 -0400 |
commit | 240c3c3424366c8109babd2a0fe80855de511b35 (patch) | |
tree | 72eb8652c8e513715efee1e254644b4b670333fd /Documentation/devicetree/bindings/media | |
parent | 19b344efa35dbc253e2d10403dafe6aafda73c56 (diff) | |
parent | df90e2258950fd631cdbf322c1ee1f22068391aa (diff) |
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media update from Mauro Carvalho Chehab:
- OF documentation and patches at core and drivers, to be used by for
embedded media systems
- some I2C drivers used on go7007 were rewritten/promoted from staging:
sony-btf-mpx, tw2804, tw9903, tw9906, wis-ov7640, wis-uda1342
- add fimc-is driver (Exynos)
- add a new radio driver: radio-si476x
- add a two new tuners: r820t and tuner_it913x
- split camera code on em28xx driver and add more models
- the cypress firmware load is used outside dvb usb drivers. So, move
it to a common directory to make easier to re-use it
- siano media driver updated to work with sms2270 devices
- several work done in order to promote go7007 and solo6x1x out of
staging (still, there are some pending issues)
- several API compliance fixes at v4l2 drivers that don't behave as
expected
- as usual, lots of driver fixes, improvements, cleanups and new device
addition at the existing drivers.
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (831 commits)
[media] cx88: make core less verbose
[media] em28xx: fix oops at em28xx_dvb_bus_ctrl()
[media] s5c73m3: fix indentation of the help section in Kconfig
[media] cx25821-alsa: get rid of a __must_check warning
[media] cx25821-video: declare cx25821_vidioc_s_std as static
[media] cx25821-video: remove maxw from cx25821_vidioc_try_fmt_vid_cap
[media] r820t: Remove a warning for an unused value
[media] dib0090: Fix a warning at dib0090_set_EFUSE
[media] dib8000: fix a warning
[media] dib8000: Fix sub-channel range
[media] dib8000: store dtv_property_cache in a temp var
[media] dib8000: warning fix: declare internal functions as static
[media] r820t: quiet gcc warning on n_ring
[media] r820t: memory leak in release()
[media] r820t: precendence bug in r820t_xtal_check()
[media] videodev2.h: Remove the unused old V4L1 buffer types
[media] anysee: Grammar s/report the/report to/
[media] anysee: Initialize ret = 0 in anysee_frontend_attach()
[media] media: videobuf2: fix the length check for mmap
[media] em28xx: save isoc endpoint number for DVB only if endpoint has alt settings with xMaxPacketSize != 0
...
Diffstat (limited to 'Documentation/devicetree/bindings/media')
5 files changed, 569 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/media/exynos-fimc-lite.txt b/Documentation/devicetree/bindings/media/exynos-fimc-lite.txt new file mode 100644 index 000000000000..3f62adfb3e0b --- /dev/null +++ b/Documentation/devicetree/bindings/media/exynos-fimc-lite.txt | |||
@@ -0,0 +1,14 @@ | |||
1 | Exynos4x12/Exynos5 SoC series camera host interface (FIMC-LITE) | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible : should be "samsung,exynos4212-fimc" for Exynos4212 and | ||
6 | Exynos4412 SoCs; | ||
7 | - reg : physical base address and size of the device memory mapped | ||
8 | registers; | ||
9 | - interrupts : should contain FIMC-LITE interrupt; | ||
10 | - clocks : FIMC LITE gate clock should be specified in this property. | ||
11 | - clock-names : should contain "flite" entry. | ||
12 | |||
13 | Each FIMC device should have an alias in the aliases node, in the form of | ||
14 | fimc-lite<n>, where <n> is an integer specifying the IP block instance. | ||
diff --git a/Documentation/devicetree/bindings/media/exynos4-fimc-is.txt b/Documentation/devicetree/bindings/media/exynos4-fimc-is.txt new file mode 100644 index 000000000000..55c9ad6f9599 --- /dev/null +++ b/Documentation/devicetree/bindings/media/exynos4-fimc-is.txt | |||
@@ -0,0 +1,49 @@ | |||
1 | Exynos4x12 SoC series Imaging Subsystem (FIMC-IS) | ||
2 | |||
3 | The FIMC-IS is a subsystem for processing image signal from an image sensor. | ||
4 | The Exynos4x12 SoC series FIMC-IS V1.5 comprises of a dedicated ARM Cortex-A5 | ||
5 | processor, ISP, DRC and FD IP blocks and peripheral devices such as UART, I2C | ||
6 | and SPI bus controllers, PWM and ADC. | ||
7 | |||
8 | fimc-is node | ||
9 | ------------ | ||
10 | |||
11 | Required properties: | ||
12 | - compatible : should be "samsung,exynos4212-fimc-is" for Exynos4212 and | ||
13 | Exynos4412 SoCs; | ||
14 | - reg : physical base address and length of the registers set; | ||
15 | - interrupts : must contain two FIMC-IS interrupts, in order: ISP0, ISP1; | ||
16 | - clocks : list of clock specifiers, corresponding to entries in | ||
17 | clock-names property; | ||
18 | - clock-names : must contain "ppmuispx", "ppmuispx", "lite0", "lite1" | ||
19 | "mpll", "sysreg", "isp", "drc", "fd", "mcuisp", "uart", | ||
20 | "ispdiv0", "ispdiv1", "mcuispdiv0", "mcuispdiv1", "aclk200", | ||
21 | "div_aclk200", "aclk400mcuisp", "div_aclk400mcuisp" entries, | ||
22 | matching entries in the clocks property. | ||
23 | pmu subnode | ||
24 | ----------- | ||
25 | |||
26 | Required properties: | ||
27 | - reg : must contain PMU physical base address and size of the register set. | ||
28 | |||
29 | The following are the FIMC-IS peripheral device nodes and can be specified | ||
30 | either standalone or as the fimc-is node child nodes. | ||
31 | |||
32 | i2c-isp (ISP I2C bus controller) nodes | ||
33 | ------------------------------------------ | ||
34 | |||
35 | Required properties: | ||
36 | |||
37 | - compatible : should be "samsung,exynos4212-i2c-isp" for Exynos4212 and | ||
38 | Exynos4412 SoCs; | ||
39 | - reg : physical base address and length of the registers set; | ||
40 | - clocks : must contain gate clock specifier for this controller; | ||
41 | - clock-names : must contain "i2c_isp" entry. | ||
42 | |||
43 | For the above nodes it is required to specify a pinctrl state named "default", | ||
44 | according to the pinctrl bindings defined in ../pinctrl/pinctrl-bindings.txt. | ||
45 | |||
46 | Device tree nodes of the image sensors' controlled directly by the FIMC-IS | ||
47 | firmware must be child nodes of their corresponding ISP I2C bus controller node. | ||
48 | The data link of these image sensors must be specified using the common video | ||
49 | interfaces bindings, defined in video-interfaces.txt. | ||
diff --git a/Documentation/devicetree/bindings/media/samsung-fimc.txt b/Documentation/devicetree/bindings/media/samsung-fimc.txt new file mode 100644 index 000000000000..51c776b7f7a3 --- /dev/null +++ b/Documentation/devicetree/bindings/media/samsung-fimc.txt | |||
@@ -0,0 +1,197 @@ | |||
1 | Samsung S5P/EXYNOS SoC Camera Subsystem (FIMC) | ||
2 | ---------------------------------------------- | ||
3 | |||
4 | The S5P/Exynos SoC Camera subsystem comprises of multiple sub-devices | ||
5 | represented by separate device tree nodes. Currently this includes: FIMC (in | ||
6 | the S5P SoCs series known as CAMIF), MIPI CSIS, FIMC-LITE and FIMC-IS (ISP). | ||
7 | |||
8 | The sub-subdevices are defined as child nodes of the common 'camera' node which | ||
9 | also includes common properties of the whole subsystem not really specific to | ||
10 | any single sub-device, like common camera port pins or the CAMCLK clock outputs | ||
11 | for external image sensors attached to an SoC. | ||
12 | |||
13 | Common 'camera' node | ||
14 | -------------------- | ||
15 | |||
16 | Required properties: | ||
17 | |||
18 | - compatible : must be "samsung,fimc", "simple-bus" | ||
19 | - clocks : list of clock specifiers, corresponding to entries in | ||
20 | the clock-names property; | ||
21 | - clock-names : must contain "sclk_cam0", "sclk_cam1", "pxl_async0", | ||
22 | "pxl_async1" entries, matching entries in the clocks property. | ||
23 | |||
24 | The pinctrl bindings defined in ../pinctrl/pinctrl-bindings.txt must be used | ||
25 | to define a required pinctrl state named "default" and optional pinctrl states: | ||
26 | "idle", "active-a", active-b". These optional states can be used to switch the | ||
27 | camera port pinmux at runtime. The "idle" state should configure both the camera | ||
28 | ports A and B into high impedance state, especially the CAMCLK clock output | ||
29 | should be inactive. For the "active-a" state the camera port A must be activated | ||
30 | and the port B deactivated and for the state "active-b" it should be the other | ||
31 | way around. | ||
32 | |||
33 | The 'camera' node must include at least one 'fimc' child node. | ||
34 | |||
35 | 'fimc' device nodes | ||
36 | ------------------- | ||
37 | |||
38 | Required properties: | ||
39 | |||
40 | - compatible: "samsung,s5pv210-fimc" for S5PV210, "samsung,exynos4210-fimc" | ||
41 | for Exynos4210 and "samsung,exynos4212-fimc" for Exynos4x12 SoCs; | ||
42 | - reg: physical base address and length of the registers set for the device; | ||
43 | - interrupts: should contain FIMC interrupt; | ||
44 | - clocks: list of clock specifiers, must contain an entry for each required | ||
45 | entry in clock-names; | ||
46 | - clock-names: must contain "fimc", "sclk_fimc" entries. | ||
47 | - samsung,pix-limits: an array of maximum supported image sizes in pixels, for | ||
48 | details refer to Table 2-1 in the S5PV210 SoC User Manual; The meaning of | ||
49 | each cell is as follows: | ||
50 | 0 - scaler input horizontal size, | ||
51 | 1 - input horizontal size for the scaler bypassed, | ||
52 | 2 - REAL_WIDTH without input rotation, | ||
53 | 3 - REAL_HEIGHT with input rotation, | ||
54 | - samsung,sysreg: a phandle to the SYSREG node. | ||
55 | |||
56 | Each FIMC device should have an alias in the aliases node, in the form of | ||
57 | fimc<n>, where <n> is an integer specifying the IP block instance. | ||
58 | |||
59 | Optional properties: | ||
60 | |||
61 | - clock-frequency: maximum FIMC local clock (LCLK) frequency; | ||
62 | - samsung,min-pix-sizes: an array specyfing minimum image size in pixels at | ||
63 | the FIMC input and output DMA, in the first and second cell respectively. | ||
64 | Default value when this property is not present is <16 16>; | ||
65 | - samsung,min-pix-alignment: minimum supported image height alignment (first | ||
66 | cell) and the horizontal image offset (second cell). The values are in pixels | ||
67 | and default to <2 1> when this property is not present; | ||
68 | - samsung,mainscaler-ext: a boolean property indicating whether the FIMC IP | ||
69 | supports extended image size and has CIEXTEN register; | ||
70 | - samsung,rotators: a bitmask specifying whether this IP has the input and | ||
71 | the output rotator. Bits 4 and 0 correspond to input and output rotator | ||
72 | respectively. If a rotator is present its corresponding bit should be set. | ||
73 | Default value when this property is not specified is 0x11. | ||
74 | - samsung,cam-if: a bolean property indicating whether the IP block includes | ||
75 | the camera input interface. | ||
76 | - samsung,isp-wb: this property must be present if the IP block has the ISP | ||
77 | writeback input. | ||
78 | - samsung,lcd-wb: this property must be present if the IP block has the LCD | ||
79 | writeback input. | ||
80 | |||
81 | |||
82 | 'parallel-ports' node | ||
83 | --------------------- | ||
84 | |||
85 | This node should contain child 'port' nodes specifying active parallel video | ||
86 | input ports. It includes camera A and camera B inputs. 'reg' property in the | ||
87 | port nodes specifies data input - 0, 1 indicates input A, B respectively. | ||
88 | |||
89 | Optional properties | ||
90 | |||
91 | - samsung,camclk-out : specifies clock output for remote sensor, | ||
92 | 0 - CAM_A_CLKOUT, 1 - CAM_B_CLKOUT; | ||
93 | |||
94 | Image sensor nodes | ||
95 | ------------------ | ||
96 | |||
97 | The sensor device nodes should be added to their control bus controller (e.g. | ||
98 | I2C0) nodes and linked to a port node in the csis or the parallel-ports node, | ||
99 | using the common video interfaces bindings, defined in video-interfaces.txt. | ||
100 | The implementation of this bindings requires clock-frequency property to be | ||
101 | present in the sensor device nodes. | ||
102 | |||
103 | Example: | ||
104 | |||
105 | aliases { | ||
106 | fimc0 = &fimc_0; | ||
107 | }; | ||
108 | |||
109 | /* Parallel bus IF sensor */ | ||
110 | i2c_0: i2c@13860000 { | ||
111 | s5k6aa: sensor@3c { | ||
112 | compatible = "samsung,s5k6aafx"; | ||
113 | reg = <0x3c>; | ||
114 | vddio-supply = <...>; | ||
115 | |||
116 | clock-frequency = <24000000>; | ||
117 | clocks = <...>; | ||
118 | clock-names = "mclk"; | ||
119 | |||
120 | port { | ||
121 | s5k6aa_ep: endpoint { | ||
122 | remote-endpoint = <&fimc0_ep>; | ||
123 | bus-width = <8>; | ||
124 | hsync-active = <0>; | ||
125 | vsync-active = <1>; | ||
126 | pclk-sample = <1>; | ||
127 | }; | ||
128 | }; | ||
129 | }; | ||
130 | }; | ||
131 | |||
132 | /* MIPI CSI-2 bus IF sensor */ | ||
133 | s5c73m3: sensor@0x1a { | ||
134 | compatible = "samsung,s5c73m3"; | ||
135 | reg = <0x1a>; | ||
136 | vddio-supply = <...>; | ||
137 | |||
138 | clock-frequency = <24000000>; | ||
139 | clocks = <...>; | ||
140 | clock-names = "mclk"; | ||
141 | |||
142 | port { | ||
143 | s5c73m3_1: endpoint { | ||
144 | data-lanes = <1 2 3 4>; | ||
145 | remote-endpoint = <&csis0_ep>; | ||
146 | }; | ||
147 | }; | ||
148 | }; | ||
149 | |||
150 | camera { | ||
151 | compatible = "samsung,fimc", "simple-bus"; | ||
152 | #address-cells = <1>; | ||
153 | #size-cells = <1>; | ||
154 | status = "okay"; | ||
155 | |||
156 | pinctrl-names = "default"; | ||
157 | pinctrl-0 = <&cam_port_a_clk_active>; | ||
158 | |||
159 | /* parallel camera ports */ | ||
160 | parallel-ports { | ||
161 | /* camera A input */ | ||
162 | port@0 { | ||
163 | reg = <0>; | ||
164 | fimc0_ep: endpoint { | ||
165 | remote-endpoint = <&s5k6aa_ep>; | ||
166 | bus-width = <8>; | ||
167 | hsync-active = <0>; | ||
168 | vsync-active = <1>; | ||
169 | pclk-sample = <1>; | ||
170 | }; | ||
171 | }; | ||
172 | }; | ||
173 | |||
174 | fimc_0: fimc@11800000 { | ||
175 | compatible = "samsung,exynos4210-fimc"; | ||
176 | reg = <0x11800000 0x1000>; | ||
177 | interrupts = <0 85 0>; | ||
178 | status = "okay"; | ||
179 | }; | ||
180 | |||
181 | csis_0: csis@11880000 { | ||
182 | compatible = "samsung,exynos4210-csis"; | ||
183 | reg = <0x11880000 0x1000>; | ||
184 | interrupts = <0 78 0>; | ||
185 | /* camera C input */ | ||
186 | port@3 { | ||
187 | reg = <3>; | ||
188 | csis0_ep: endpoint { | ||
189 | remote-endpoint = <&s5c73m3_ep>; | ||
190 | data-lanes = <1 2 3 4>; | ||
191 | samsung,csis-hs-settle = <12>; | ||
192 | }; | ||
193 | }; | ||
194 | }; | ||
195 | }; | ||
196 | |||
197 | The MIPI-CSIS device binding is defined in samsung-mipi-csis.txt. | ||
diff --git a/Documentation/devicetree/bindings/media/samsung-mipi-csis.txt b/Documentation/devicetree/bindings/media/samsung-mipi-csis.txt new file mode 100644 index 000000000000..5f8e28e2484f --- /dev/null +++ b/Documentation/devicetree/bindings/media/samsung-mipi-csis.txt | |||
@@ -0,0 +1,81 @@ | |||
1 | Samsung S5P/EXYNOS SoC series MIPI CSI-2 receiver (MIPI CSIS) | ||
2 | ------------------------------------------------------------- | ||
3 | |||
4 | Required properties: | ||
5 | |||
6 | - compatible : "samsung,s5pv210-csis" for S5PV210 (S5PC110), | ||
7 | "samsung,exynos4210-csis" for Exynos4210 (S5PC210), | ||
8 | "samsung,exynos4212-csis" for Exynos4212/Exynos4412 | ||
9 | SoC series; | ||
10 | - reg : offset and length of the register set for the device; | ||
11 | - interrupts : should contain MIPI CSIS interrupt; the format of the | ||
12 | interrupt specifier depends on the interrupt controller; | ||
13 | - bus-width : maximum number of data lanes supported (SoC specific); | ||
14 | - vddio-supply : MIPI CSIS I/O and PLL voltage supply (e.g. 1.8V); | ||
15 | - vddcore-supply : MIPI CSIS Core voltage supply (e.g. 1.1V); | ||
16 | - clocks : list of clock specifiers, corresponding to entries in | ||
17 | clock-names property; | ||
18 | - clock-names : must contain "csis", "sclk_csis" entries, matching entries | ||
19 | in the clocks property. | ||
20 | |||
21 | Optional properties: | ||
22 | |||
23 | - clock-frequency : The IP's main (system bus) clock frequency in Hz, default | ||
24 | value when this property is not specified is 166 MHz; | ||
25 | - samsung,csis-wclk : CSI-2 wrapper clock selection. If this property is present | ||
26 | external clock from CMU will be used, or the bus clock if | ||
27 | if it's not specified. | ||
28 | |||
29 | The device node should contain one 'port' child node with one child 'endpoint' | ||
30 | node, according to the bindings defined in Documentation/devicetree/bindings/ | ||
31 | media/video-interfaces.txt. The following are properties specific to those nodes. | ||
32 | |||
33 | port node | ||
34 | --------- | ||
35 | |||
36 | - reg : (required) must be 3 for camera C input (CSIS0) or 4 for | ||
37 | camera D input (CSIS1); | ||
38 | |||
39 | endpoint node | ||
40 | ------------- | ||
41 | |||
42 | - data-lanes : (required) an array specifying active physical MIPI-CSI2 | ||
43 | data input lanes and their mapping to logical lanes; the | ||
44 | array's content is unused, only its length is meaningful; | ||
45 | |||
46 | - samsung,csis-hs-settle : (optional) differential receiver (HS-RX) settle time; | ||
47 | |||
48 | |||
49 | Example: | ||
50 | |||
51 | reg0: regulator@0 { | ||
52 | }; | ||
53 | |||
54 | reg1: regulator@1 { | ||
55 | }; | ||
56 | |||
57 | /* SoC properties */ | ||
58 | |||
59 | csis_0: csis@11880000 { | ||
60 | compatible = "samsung,exynos4210-csis"; | ||
61 | reg = <0x11880000 0x1000>; | ||
62 | interrupts = <0 78 0>; | ||
63 | #address-cells = <1>; | ||
64 | #size-cells = <0>; | ||
65 | }; | ||
66 | |||
67 | /* Board properties */ | ||
68 | |||
69 | csis_0: csis@11880000 { | ||
70 | clock-frequency = <166000000>; | ||
71 | vddio-supply = <®0>; | ||
72 | vddcore-supply = <®1>; | ||
73 | port { | ||
74 | reg = <3>; /* 3 - CSIS0, 4 - CSIS1 */ | ||
75 | csis0_ep: endpoint { | ||
76 | remote-endpoint = <...>; | ||
77 | data-lanes = <1>, <2>; | ||
78 | samsung,csis-hs-settle = <12>; | ||
79 | }; | ||
80 | }; | ||
81 | }; | ||
diff --git a/Documentation/devicetree/bindings/media/video-interfaces.txt b/Documentation/devicetree/bindings/media/video-interfaces.txt new file mode 100644 index 000000000000..e022d2dc4962 --- /dev/null +++ b/Documentation/devicetree/bindings/media/video-interfaces.txt | |||
@@ -0,0 +1,228 @@ | |||
1 | Common bindings for video receiver and transmitter interfaces | ||
2 | |||
3 | General concept | ||
4 | --------------- | ||
5 | |||
6 | Video data pipelines usually consist of external devices, e.g. camera sensors, | ||
7 | controlled over an I2C, SPI or UART bus, and SoC internal IP blocks, including | ||
8 | video DMA engines and video data processors. | ||
9 | |||
10 | SoC internal blocks are described by DT nodes, placed similarly to other SoC | ||
11 | blocks. External devices are represented as child nodes of their respective | ||
12 | bus controller nodes, e.g. I2C. | ||
13 | |||
14 | Data interfaces on all video devices are described by their child 'port' nodes. | ||
15 | Configuration of a port depends on other devices participating in the data | ||
16 | transfer and is described by 'endpoint' subnodes. | ||
17 | |||
18 | device { | ||
19 | ... | ||
20 | ports { | ||
21 | #address-cells = <1>; | ||
22 | #size-cells = <0>; | ||
23 | |||
24 | port@0 { | ||
25 | ... | ||
26 | endpoint@0 { ... }; | ||
27 | endpoint@1 { ... }; | ||
28 | }; | ||
29 | port@1 { ... }; | ||
30 | }; | ||
31 | }; | ||
32 | |||
33 | If a port can be configured to work with more than one remote device on the same | ||
34 | bus, an 'endpoint' child node must be provided for each of them. If more than | ||
35 | one port is present in a device node or there is more than one endpoint at a | ||
36 | port, or port node needs to be associated with a selected hardware interface, | ||
37 | a common scheme using '#address-cells', '#size-cells' and 'reg' properties is | ||
38 | used. | ||
39 | |||
40 | All 'port' nodes can be grouped under optional 'ports' node, which allows to | ||
41 | specify #address-cells, #size-cells properties independently for the 'port' | ||
42 | and 'endpoint' nodes and any child device nodes a device might have. | ||
43 | |||
44 | Two 'endpoint' nodes are linked with each other through their 'remote-endpoint' | ||
45 | phandles. An endpoint subnode of a device contains all properties needed for | ||
46 | configuration of this device for data exchange with other device. In most | ||
47 | cases properties at the peer 'endpoint' nodes will be identical, however they | ||
48 | might need to be different when there is any signal modifications on the bus | ||
49 | between two devices, e.g. there are logic signal inverters on the lines. | ||
50 | |||
51 | It is allowed for multiple endpoints at a port to be active simultaneously, | ||
52 | where supported by a device. For example, in case where a data interface of | ||
53 | a device is partitioned into multiple data busses, e.g. 16-bit input port | ||
54 | divided into two separate ITU-R BT.656 8-bit busses. In such case bus-width | ||
55 | and data-shift properties can be used to assign physical data lines to each | ||
56 | endpoint node (logical bus). | ||
57 | |||
58 | |||
59 | Required properties | ||
60 | ------------------- | ||
61 | |||
62 | If there is more than one 'port' or more than one 'endpoint' node or 'reg' | ||
63 | property is present in port and/or endpoint nodes the following properties | ||
64 | are required in a relevant parent node: | ||
65 | |||
66 | - #address-cells : number of cells required to define port/endpoint | ||
67 | identifier, should be 1. | ||
68 | - #size-cells : should be zero. | ||
69 | |||
70 | Optional endpoint properties | ||
71 | ---------------------------- | ||
72 | |||
73 | - remote-endpoint: phandle to an 'endpoint' subnode of a remote device node. | ||
74 | - slave-mode: a boolean property indicating that the link is run in slave mode. | ||
75 | The default when this property is not specified is master mode. In the slave | ||
76 | mode horizontal and vertical synchronization signals are provided to the | ||
77 | slave device (data source) by the master device (data sink). In the master | ||
78 | mode the data source device is also the source of the synchronization signals. | ||
79 | - bus-width: number of data lines actively used, valid for the parallel busses. | ||
80 | - data-shift: on the parallel data busses, if bus-width is used to specify the | ||
81 | number of data lines, data-shift can be used to specify which data lines are | ||
82 | used, e.g. "bus-width=<8>; data-shift=<2>;" means, that lines 9:2 are used. | ||
83 | - hsync-active: active state of the HSYNC signal, 0/1 for LOW/HIGH respectively. | ||
84 | - vsync-active: active state of the VSYNC signal, 0/1 for LOW/HIGH respectively. | ||
85 | Note, that if HSYNC and VSYNC polarities are not specified, embedded | ||
86 | synchronization may be required, where supported. | ||
87 | - data-active: similar to HSYNC and VSYNC, specifies data line polarity. | ||
88 | - field-even-active: field signal level during the even field data transmission. | ||
89 | - pclk-sample: sample data on rising (1) or falling (0) edge of the pixel clock | ||
90 | signal. | ||
91 | - data-lanes: an array of physical data lane indexes. Position of an entry | ||
92 | determines the logical lane number, while the value of an entry indicates | ||
93 | physical lane, e.g. for 2-lane MIPI CSI-2 bus we could have | ||
94 | "data-lanes = <1 2>;", assuming the clock lane is on hardware lane 0. | ||
95 | This property is valid for serial busses only (e.g. MIPI CSI-2). | ||
96 | - clock-lanes: an array of physical clock lane indexes. Position of an entry | ||
97 | determines the logical lane number, while the value of an entry indicates | ||
98 | physical lane, e.g. for a MIPI CSI-2 bus we could have "clock-lanes = <0>;", | ||
99 | which places the clock lane on hardware lane 0. This property is valid for | ||
100 | serial busses only (e.g. MIPI CSI-2). Note that for the MIPI CSI-2 bus this | ||
101 | array contains only one entry. | ||
102 | - clock-noncontinuous: a boolean property to allow MIPI CSI-2 non-continuous | ||
103 | clock mode. | ||
104 | |||
105 | |||
106 | Example | ||
107 | ------- | ||
108 | |||
109 | The example snippet below describes two data pipelines. ov772x and imx074 are | ||
110 | camera sensors with a parallel and serial (MIPI CSI-2) video bus respectively. | ||
111 | Both sensors are on the I2C control bus corresponding to the i2c0 controller | ||
112 | node. ov772x sensor is linked directly to the ceu0 video host interface. | ||
113 | imx074 is linked to ceu0 through the MIPI CSI-2 receiver (csi2). ceu0 has a | ||
114 | (single) DMA engine writing captured data to memory. ceu0 node has a single | ||
115 | 'port' node which may indicate that at any time only one of the following data | ||
116 | pipelines can be active: ov772x -> ceu0 or imx074 -> csi2 -> ceu0. | ||
117 | |||
118 | ceu0: ceu@0xfe910000 { | ||
119 | compatible = "renesas,sh-mobile-ceu"; | ||
120 | reg = <0xfe910000 0xa0>; | ||
121 | interrupts = <0x880>; | ||
122 | |||
123 | mclk: master_clock { | ||
124 | compatible = "renesas,ceu-clock"; | ||
125 | #clock-cells = <1>; | ||
126 | clock-frequency = <50000000>; /* Max clock frequency */ | ||
127 | clock-output-names = "mclk"; | ||
128 | }; | ||
129 | |||
130 | port { | ||
131 | #address-cells = <1>; | ||
132 | #size-cells = <0>; | ||
133 | |||
134 | /* Parallel bus endpoint */ | ||
135 | ceu0_1: endpoint@1 { | ||
136 | reg = <1>; /* Local endpoint # */ | ||
137 | remote = <&ov772x_1_1>; /* Remote phandle */ | ||
138 | bus-width = <8>; /* Used data lines */ | ||
139 | data-shift = <2>; /* Lines 9:2 are used */ | ||
140 | |||
141 | /* If hsync-active/vsync-active are missing, | ||
142 | embedded BT.656 sync is used */ | ||
143 | hsync-active = <0>; /* Active low */ | ||
144 | vsync-active = <0>; /* Active low */ | ||
145 | data-active = <1>; /* Active high */ | ||
146 | pclk-sample = <1>; /* Rising */ | ||
147 | }; | ||
148 | |||
149 | /* MIPI CSI-2 bus endpoint */ | ||
150 | ceu0_0: endpoint@0 { | ||
151 | reg = <0>; | ||
152 | remote = <&csi2_2>; | ||
153 | }; | ||
154 | }; | ||
155 | }; | ||
156 | |||
157 | i2c0: i2c@0xfff20000 { | ||
158 | ... | ||
159 | ov772x_1: camera@0x21 { | ||
160 | compatible = "omnivision,ov772x"; | ||
161 | reg = <0x21>; | ||
162 | vddio-supply = <®ulator1>; | ||
163 | vddcore-supply = <®ulator2>; | ||
164 | |||
165 | clock-frequency = <20000000>; | ||
166 | clocks = <&mclk 0>; | ||
167 | clock-names = "xclk"; | ||
168 | |||
169 | port { | ||
170 | /* With 1 endpoint per port no need for addresses. */ | ||
171 | ov772x_1_1: endpoint { | ||
172 | bus-width = <8>; | ||
173 | remote-endpoint = <&ceu0_1>; | ||
174 | hsync-active = <1>; | ||
175 | vsync-active = <0>; /* Who came up with an | ||
176 | inverter here ?... */ | ||
177 | data-active = <1>; | ||
178 | pclk-sample = <1>; | ||
179 | }; | ||
180 | }; | ||
181 | }; | ||
182 | |||
183 | imx074: camera@0x1a { | ||
184 | compatible = "sony,imx074"; | ||
185 | reg = <0x1a>; | ||
186 | vddio-supply = <®ulator1>; | ||
187 | vddcore-supply = <®ulator2>; | ||
188 | |||
189 | clock-frequency = <30000000>; /* Shared clock with ov772x_1 */ | ||
190 | clocks = <&mclk 0>; | ||
191 | clock-names = "sysclk"; /* Assuming this is the | ||
192 | name in the datasheet */ | ||
193 | port { | ||
194 | imx074_1: endpoint { | ||
195 | clock-lanes = <0>; | ||
196 | data-lanes = <1 2>; | ||
197 | remote-endpoint = <&csi2_1>; | ||
198 | }; | ||
199 | }; | ||
200 | }; | ||
201 | }; | ||
202 | |||
203 | csi2: csi2@0xffc90000 { | ||
204 | compatible = "renesas,sh-mobile-csi2"; | ||
205 | reg = <0xffc90000 0x1000>; | ||
206 | interrupts = <0x17a0>; | ||
207 | #address-cells = <1>; | ||
208 | #size-cells = <0>; | ||
209 | |||
210 | port@1 { | ||
211 | compatible = "renesas,csi2c"; /* One of CSI2I and CSI2C. */ | ||
212 | reg = <1>; /* CSI-2 PHY #1 of 2: PHY_S, | ||
213 | PHY_M has port address 0, | ||
214 | is unused. */ | ||
215 | csi2_1: endpoint { | ||
216 | clock-lanes = <0>; | ||
217 | data-lanes = <2 1>; | ||
218 | remote-endpoint = <&imx074_1>; | ||
219 | }; | ||
220 | }; | ||
221 | port@2 { | ||
222 | reg = <2>; /* port 2: link to the CEU */ | ||
223 | |||
224 | csi2_2: endpoint { | ||
225 | remote-endpoint = <&ceu0_0>; | ||
226 | }; | ||
227 | }; | ||
228 | }; | ||