~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/arm64/boot/dts/renesas/gmsl-cameras.dtsi

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 // SPDX-License-Identifier: GPL-2.0+
  2 /*
  3  * Copyright (C) 2017 Ideas on Board <kieran.bingham@ideasonboard.com>
  4  * Copyright (C) 2021 Jacopo Mondi <jacopo+renesas@jmondi.org>
  5  *
  6  * Device Tree Source (overlay) that describes GMSL camera connected to
  7  * Fakra connectors for the Eagle V3M and Condor V3H (and compatible) boards.
  8  *
  9  * The following cameras are currently supported: RDACM20 and RDACM21.
 10  *
 11  * The board .dts file that include this has to select which cameras are in use
 12  * by specifying the camera model with:
 13  *
 14  * #define GMSL_CAMERA_RDACM20
 15  * or
 16  * #define GMSL_CAMERA_RDACM21
 17  *
 18  * And which cameras are connected to the board by defining:
 19  * for GMSL channel 0:
 20  *         #define GMSL_CAMERA_0
 21  *         #define GMSL_CAMERA_1
 22  *         #define GMSL_CAMERA_2
 23  *         #define GMSL_CAMERA_3
 24  *
 25  * for GMSL channel 1:
 26  *         #define GMSL_CAMERA_4
 27  *         #define GMSL_CAMERA_5
 28  *         #define GMSL_CAMERA_6
 29  *         #define GMSL_CAMERA_7
 30  */
 31 
 32 #include <dt-bindings/gpio/gpio.h>
 33 
 34 /* Validate the board file settings. */
 35 #if !defined(GMSL_CAMERA_RDACM20) && !defined(GMSL_CAMERA_RDACM21)
 36 #error "Camera model should be defined by the board file"
 37 #endif
 38 
 39 #if defined(GMSL_CAMERA_RDACM20) && defined(GMSL_CAMERA_RDACM21)
 40 #error "A single camera model should be selected"
 41 #endif
 42 
 43 #if !defined(GMSL_CAMERA_0) && !defined(GMSL_CAMERA_1) && \
 44     !defined(GMSL_CAMERA_2) && !defined(GMSL_CAMERA_3) && \
 45     !defined(GMSL_CAMERA_4) && !defined(GMSL_CAMERA_5) && \
 46     !defined(GMSL_CAMERA_6) && !defined(GMSL_CAMERA_7)
 47 #error "At least one camera should be selected"
 48 #endif
 49 
 50 /* Deduce from the enabled cameras which GMSL channels are active. */
 51 #if defined(GMSL_CAMERA_0) || defined(GMSL_CAMERA_1) || \
 52     defined(GMSL_CAMERA_2) || defined(GMSL_CAMERA_3)
 53 #define GMSL_0
 54 #endif
 55 
 56 #if defined(GMSL_CAMERA_4) || defined(GMSL_CAMERA_5) || \
 57     defined(GMSL_CAMERA_6) || defined(GMSL_CAMERA_7)
 58 #define GMSL_1
 59 #endif
 60 
 61 /* Deduce the camera model compatible string. */
 62 #if defined(GMSL_CAMERA_RDACM20)
 63 #define GMSL_CAMERA_MODEL "imi,rdacm20"
 64 #elif defined(GMSL_CAMERA_RDACM21)
 65 #define GMSL_CAMERA_MODEL "imi,rdacm21"
 66 #endif
 67 
 68 #ifdef GMSL_0
 69 &vin0 {
 70         status = "okay";
 71 };
 72 
 73 &vin1 {
 74         status = "okay";
 75 };
 76 
 77 &vin2 {
 78         status = "okay";
 79 };
 80 
 81 &vin3 {
 82         status = "okay";
 83 };
 84 
 85 &gmsl0 {
 86         status = "okay";
 87 
 88 #if defined(GMSL_CAMERA_RDACM21)
 89         maxim,reverse-channel-microvolt = <100000>;
 90 #endif
 91 
 92         ports {
 93 #ifdef GMSL_CAMERA_0
 94                 port@0 {
 95                         max9286_in0: endpoint {
 96                                 remote-endpoint = <&fakra_con0>;
 97                         };
 98                 };
 99 #endif
100 
101 #ifdef GMSL_CAMERA_1
102                 port@1 {
103                         max9286_in1: endpoint {
104                                 remote-endpoint = <&fakra_con1>;
105                         };
106 
107                 };
108 #endif
109 
110 #ifdef GMSL_CAMERA_2
111                 port@2 {
112                         max9286_in2: endpoint {
113                                 remote-endpoint = <&fakra_con2>;
114                         };
115 
116                 };
117 #endif
118 
119 #ifdef GMSL_CAMERA_3
120                 port@3 {
121                         max9286_in3: endpoint {
122                                 remote-endpoint = <&fakra_con3>;
123                         };
124 
125                 };
126 #endif
127         };
128 
129         i2c-mux {
130 #ifdef GMSL_CAMERA_0
131                 i2c@0 {
132                         status = "okay";
133 
134                         camera@51 {
135                                 compatible = GMSL_CAMERA_MODEL;
136                                 reg = <0x51>, <0x61>;
137 
138                                 port {
139                                         fakra_con0: endpoint {
140                                                 remote-endpoint = <&max9286_in0>;
141                                         };
142                                 };
143                         };
144                 };
145 #endif
146 
147 #ifdef GMSL_CAMERA_1
148                 i2c@1 {
149                         status = "okay";
150 
151                         camera@52 {
152                                 compatible = GMSL_CAMERA_MODEL;
153                                 reg = <0x52>, <0x62>;
154 
155                                 port {
156                                         fakra_con1: endpoint {
157                                                 remote-endpoint = <&max9286_in1>;
158                                         };
159                                 };
160                         };
161                 };
162 #endif
163 
164 #ifdef GMSL_CAMERA_2
165                 i2c@2 {
166                         status = "okay";
167 
168                         camera@53 {
169                                 compatible = GMSL_CAMERA_MODEL;
170                                 reg = <0x53>, <0x63>;
171 
172                                 port {
173                                         fakra_con2: endpoint {
174                                                 remote-endpoint = <&max9286_in2>;
175                                         };
176                                 };
177                         };
178                 };
179 #endif
180 
181 #ifdef GMSL_CAMERA_3
182                 i2c@3 {
183                         status = "okay";
184 
185                         camera@54 {
186                                 compatible = GMSL_CAMERA_MODEL;
187                                 reg = <0x54>, <0x64>;
188 
189                                 port {
190                                         fakra_con3: endpoint {
191                                                 remote-endpoint = <&max9286_in3>;
192                                         };
193                                 };
194                         };
195                 };
196 #endif
197         };
198 };
199 #endif /* ifdef GMSL_0 */
200 
201 #ifdef GMSL_1
202 &vin4 {
203         status = "okay";
204 };
205 
206 &vin5 {
207         status = "okay";
208 };
209 
210 &vin6 {
211         status = "okay";
212 };
213 
214 &vin7 {
215         status = "okay";
216 };
217 
218 &gmsl1 {
219         status = "okay";
220 
221 #if defined(GMSL_CAMERA_RDACM21)
222         maxim,reverse-channel-microvolt = <100000>;
223 #endif
224 
225         ports {
226 #ifdef GMSL_CAMERA_4
227                 port@0 {
228                         max9286_in4: endpoint {
229                                 remote-endpoint = <&fakra_con4>;
230                         };
231                 };
232 #endif
233 
234 #ifdef GMSL_CAMERA_5
235                 port@1 {
236                         max9286_in5: endpoint {
237                                 remote-endpoint = <&fakra_con5>;
238                         };
239 
240                 };
241 #endif
242 
243 #ifdef GMSL_CAMERA_6
244                 port@2 {
245                         max9286_in6: endpoint {
246                                 remote-endpoint = <&fakra_con6>;
247                         };
248 
249                 };
250 #endif
251 
252 #ifdef GMSL_CAMERA_7
253                 port@3 {
254                         max9286_in7: endpoint {
255                                 remote-endpoint = <&fakra_con7>;
256                         };
257 
258                 };
259 #endif
260         };
261 
262         i2c-mux {
263 #ifdef GMSL_CAMERA_4
264                 i2c@0 {
265                         status = "okay";
266 
267                         camera@55 {
268                                 compatible = GMSL_CAMERA_MODEL;
269                                 reg = <0x55>, <0x65>;
270 
271                                 port {
272                                         fakra_con4: endpoint {
273                                                 remote-endpoint = <&max9286_in4>;
274                                         };
275                                 };
276                         };
277                 };
278 #endif
279 
280 #ifdef GMSL_CAMERA_5
281                 i2c@1 {
282                         status = "okay";
283 
284                         camera@56 {
285                                 compatible = GMSL_CAMERA_MODEL;
286                                 reg = <0x56>, <0x66>;
287 
288                                 port {
289                                         fakra_con5: endpoint {
290                                                 remote-endpoint = <&max9286_in5>;
291                                         };
292                                 };
293                         };
294                 };
295 #endif
296 
297 #ifdef GMSL_CAMERA_6
298                 i2c@2 {
299                         status = "okay";
300 
301                         camera@57 {
302                                 compatible = GMSL_CAMERA_MODEL;
303                                 reg = <0x57>, <0x67>;
304 
305                                 port {
306                                         fakra_con6: endpoint {
307                                                 remote-endpoint = <&max9286_in6>;
308                                         };
309                                 };
310                         };
311                 };
312 #endif
313 
314 #ifdef GMSL_CAMERA_7
315                 i2c@3 {
316                         status = "okay";
317 
318                         camera@58 {
319                                 compatible = GMSL_CAMERA_MODEL;
320                                 reg = <0x58>, <0x68>;
321 
322                                 port {
323                                         fakra_con7: endpoint {
324                                                 remote-endpoint = <&max9286_in7>;
325                                         };
326                                 };
327                         };
328                 };
329 #endif
330         };
331 };
332 #endif /* ifdef GMSL_1 */

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php