diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2013-03-29 13:12:39 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-31 09:54:18 -0400 |
commit | 2b13f7d4e3822ed4de37b73b009ff81932e884bb (patch) | |
tree | 15a7e2ffc126318fdfd6244957ae64b18b03ddc9 /Documentation/devicetree/bindings/media | |
parent | e2985a260e6615503b4fa8e66788708e750c7750 (diff) |
[media] s5p-fimc: Add device tree based sensors registration
The sensor (I2C and/or SPI client) devices are instantiated by their
corresponding control bus drivers. Since the I2C client's master clock
is often provided by a video bus receiver (host interface) or other
than I2C/SPI controller device, the drivers of those client devices
are not accessing hardware in their driver's probe() callback. Instead,
after enabling clock, the host driver calls back into a sub-device
when it wants to activate them. This pattern is used by some in-tree
drivers and this patch also uses it for DT case. This patch is intended
as a first step for adding device tree support to the S5P/Exynos SoC
camera drivers. The second one is adding support for asynchronous
sub-devices registration and clock control from sub-device driver
level. The bindings shall not change when asynchronous probing support
is added.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'Documentation/devicetree/bindings/media')
-rw-r--r-- | Documentation/devicetree/bindings/media/samsung-fimc.txt | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/media/samsung-fimc.txt b/Documentation/devicetree/bindings/media/samsung-fimc.txt index 22e2889162c3..bcb0de7462a2 100644 --- a/Documentation/devicetree/bindings/media/samsung-fimc.txt +++ b/Documentation/devicetree/bindings/media/samsung-fimc.txt | |||
@@ -72,18 +72,95 @@ Optional properties: | |||
72 | writeback input. | 72 | writeback input. |
73 | 73 | ||
74 | 74 | ||
75 | 'parallel-ports' node | ||
76 | --------------------- | ||
77 | |||
78 | This node should contain child 'port' nodes specifying active parallel video | ||
79 | input ports. It includes camera A and camera B inputs. 'reg' property in the | ||
80 | port nodes specifies data input - 0, 1 indicates input A, B respectively. | ||
81 | |||
82 | Optional properties | ||
83 | |||
84 | - samsung,camclk-out : specifies clock output for remote sensor, | ||
85 | 0 - CAM_A_CLKOUT, 1 - CAM_B_CLKOUT; | ||
86 | |||
87 | Image sensor nodes | ||
88 | ------------------ | ||
89 | |||
90 | The sensor device nodes should be added to their control bus controller (e.g. | ||
91 | I2C0) nodes and linked to a port node in the csis or the parallel-ports node, | ||
92 | using the common video interfaces bindings, defined in video-interfaces.txt. | ||
93 | The implementation of this bindings requires clock-frequency property to be | ||
94 | present in the sensor device nodes. | ||
95 | |||
75 | Example: | 96 | Example: |
76 | 97 | ||
77 | aliases { | 98 | aliases { |
78 | fimc0 = &fimc_0; | 99 | fimc0 = &fimc_0; |
79 | }; | 100 | }; |
80 | 101 | ||
102 | /* Parallel bus IF sensor */ | ||
103 | i2c_0: i2c@13860000 { | ||
104 | s5k6aa: sensor@3c { | ||
105 | compatible = "samsung,s5k6aafx"; | ||
106 | reg = <0x3c>; | ||
107 | vddio-supply = <...>; | ||
108 | |||
109 | clock-frequency = <24000000>; | ||
110 | clocks = <...>; | ||
111 | clock-names = "mclk"; | ||
112 | |||
113 | port { | ||
114 | s5k6aa_ep: endpoint { | ||
115 | remote-endpoint = <&fimc0_ep>; | ||
116 | bus-width = <8>; | ||
117 | hsync-active = <0>; | ||
118 | vsync-active = <1>; | ||
119 | pclk-sample = <1>; | ||
120 | }; | ||
121 | }; | ||
122 | }; | ||
123 | }; | ||
124 | |||
125 | /* MIPI CSI-2 bus IF sensor */ | ||
126 | s5c73m3: sensor@0x1a { | ||
127 | compatible = "samsung,s5c73m3"; | ||
128 | reg = <0x1a>; | ||
129 | vddio-supply = <...>; | ||
130 | |||
131 | clock-frequency = <24000000>; | ||
132 | clocks = <...>; | ||
133 | clock-names = "mclk"; | ||
134 | |||
135 | port { | ||
136 | s5c73m3_1: endpoint { | ||
137 | data-lanes = <1 2 3 4>; | ||
138 | remote-endpoint = <&csis0_ep>; | ||
139 | }; | ||
140 | }; | ||
141 | }; | ||
142 | |||
81 | camera { | 143 | camera { |
82 | compatible = "samsung,fimc", "simple-bus"; | 144 | compatible = "samsung,fimc", "simple-bus"; |
83 | #address-cells = <1>; | 145 | #address-cells = <1>; |
84 | #size-cells = <1>; | 146 | #size-cells = <1>; |
85 | status = "okay"; | 147 | status = "okay"; |
86 | 148 | ||
149 | /* parallel camera ports */ | ||
150 | parallel-ports { | ||
151 | /* camera A input */ | ||
152 | port@0 { | ||
153 | reg = <0>; | ||
154 | fimc0_ep: endpoint { | ||
155 | remote-endpoint = <&s5k6aa_ep>; | ||
156 | bus-width = <8>; | ||
157 | hsync-active = <0>; | ||
158 | vsync-active = <1>; | ||
159 | pclk-sample = <1>; | ||
160 | }; | ||
161 | }; | ||
162 | }; | ||
163 | |||
87 | fimc_0: fimc@11800000 { | 164 | fimc_0: fimc@11800000 { |
88 | compatible = "samsung,exynos4210-fimc"; | 165 | compatible = "samsung,exynos4210-fimc"; |
89 | reg = <0x11800000 0x1000>; | 166 | reg = <0x11800000 0x1000>; |
@@ -95,6 +172,15 @@ Example: | |||
95 | compatible = "samsung,exynos4210-csis"; | 172 | compatible = "samsung,exynos4210-csis"; |
96 | reg = <0x11880000 0x1000>; | 173 | reg = <0x11880000 0x1000>; |
97 | interrupts = <0 78 0>; | 174 | interrupts = <0 78 0>; |
175 | /* camera C input */ | ||
176 | port@3 { | ||
177 | reg = <3>; | ||
178 | csis0_ep: endpoint { | ||
179 | remote-endpoint = <&s5c73m3_ep>; | ||
180 | data-lanes = <1 2 3 4>; | ||
181 | samsung,csis-hs-settle = <12>; | ||
182 | }; | ||
183 | }; | ||
98 | }; | 184 | }; |
99 | }; | 185 | }; |
100 | 186 | ||