aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-5.10/950-0726-dtoverlays-Add-orientation-and-rotation-parameter-to.patch
blob: 761b368b445a51646a665db1a0f851e574471bd3 (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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
From 9637391eb4ad9410f4a366b4d78c7cfd909572da Mon Sep 17 00:00:00 2001
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
Date: Mon, 2 Aug 2021 14:30:15 +0100
Subject: [PATCH] dtoverlays: Add orientation (and rotation) parameter
 to sensor overlays

Add the orientation parameter to all the camera sensor overlays to
avoid libcamera complaining, and add the rotation parameter where
it hadn't been added before.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
---
 arch/arm/boot/dts/overlays/README             | 26 ++++++++++++++++---
 arch/arm/boot/dts/overlays/imx219-overlay.dts |  2 ++
 .../boot/dts/overlays/imx290_327-overlay.dtsi |  5 ++++
 .../boot/dts/overlays/imx477_378-overlay.dtsi |  2 ++
 arch/arm/boot/dts/overlays/ov5647-overlay.dts |  2 ++
 arch/arm/boot/dts/overlays/ov7251-overlay.dts |  8 ++++++
 arch/arm/boot/dts/overlays/ov9281-overlay.dts |  7 +++++
 7 files changed, 48 insertions(+), 4 deletions(-)

--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -1682,6 +1682,8 @@ Info:   Sony IMX219 camera module.
 Load:   dtoverlay=imx219,<param>=<val>
 Params: rotation                Mounting rotation of the camera sensor (0 or
                                 180, default 180)
+        orientation             Sensor orientation (0 = front, 1 = rear,
+                                2 = external, default external)
 
 
 Name:   imx290
@@ -1698,6 +1700,10 @@ Params: 4lane                   Enable 4
                                 (the default), whilst those from Innomaker use
                                 74.25MHz.
         mono                    Denote that the module is a mono sensor.
+        orientation             Sensor orientation (0 = front, 1 = rear,
+                                2 = external, default external)
+        rotation                Mounting rotation of the camera sensor (0 or
+                                180, default 0)
 
 
 Name:   imx378
@@ -1707,6 +1713,8 @@ Info:   Sony IMX378 camera module.
 Load:   dtoverlay=imx378,<param>=<val>
 Params: rotation                Mounting rotation of the camera sensor (0 or
                                 180, default 180)
+        orientation             Sensor orientation (0 = front, 1 = rear,
+                                2 = external, default external)
 
 
 Name:   imx477
@@ -1716,6 +1724,8 @@ Info:   Sony IMX477 camera module.
 Load:   dtoverlay=imx477,<param>=<val>
 Params: rotation                Mounting rotation of the camera sensor (0 or
                                 180, default 180)
+        orientation             Sensor orientation (0 = front, 1 = rear,
+                                2 = external, default external)
 
 
 Name:   iqaudio-codec
@@ -2141,22 +2151,30 @@ Info:   Omnivision OV5647 camera module.
 Load:   dtoverlay=ov5647,<param>=<val>
 Params: rotation                Mounting rotation of the camera sensor (0 or
                                 180, default 0)
+        orientation             Sensor orientation (0 = front, 1 = rear,
+                                2 = external, default external)
 
 
 Name:   ov7251
 Info:   Omnivision OV7251 camera module.
         Uses Unicam 1, which is the standard camera connector on most Pi
         variants.
-Load:   dtoverlay=ov7251
-Params: <None>
+Load:   dtoverlay=ov7251,<param>=<val>
+Params: rotation                Mounting rotation of the camera sensor (0 or
+                                180, default 0)
+        orientation             Sensor orientation (0 = front, 1 = rear,
+                                2 = external, default external)
 
 
 Name:   ov9281
 Info:   Omnivision OV9281 camera module.
         Uses Unicam 1, which is the standard camera connector on most Pi
         variants.
-Load:   dtoverlay=ov9281
-Params: <None>
+Load:   dtoverlay=ov9281,<param>=<val>
+Params: rotation                Mounting rotation of the camera sensor (0 or
+                                180, default 0)
+        orientation             Sensor orientation (0 = front, 1 = rear,
+                                2 = external, default external)
 
 
 Name:   papirus
--- a/arch/arm/boot/dts/overlays/imx219-overlay.dts
+++ b/arch/arm/boot/dts/overlays/imx219-overlay.dts
@@ -28,6 +28,7 @@
 				VDDL-supply = <&imx219_vddl>;	/* 1.2v */
 
 				rotation = <180>;
+				orientation = <2>;
 
 				port {
 					imx219_0: endpoint {
@@ -109,5 +110,6 @@
 
 	__overrides__ {
 		rotation = <&imx219>,"rotation:0";
+		orientation = <&imx219>,"orientation:0";
 	};
 };
--- a/arch/arm/boot/dts/overlays/imx290_327-overlay.dtsi
+++ b/arch/arm/boot/dts/overlays/imx290_327-overlay.dtsi
@@ -24,6 +24,9 @@
 				clock-names = "xclk";
 				clock-frequency = <37125000>;
 
+				rotation = <0>;
+				orientation = <2>;
+
 				vdda-supply = <&cam1_reg>;	/* 2.8v */
 				vdddo-supply = <&imx290_vdddo>;	/* 1.8v */
 				vddd-supply = <&imx290_vddd>;	/* 1.5v */
@@ -135,5 +138,7 @@
 		4lane = <0>, "-6+7-8+9";
 		clock-frequency = <&imx290_clk>,"clock-frequency:0",
 				  <&imx290>,"clock-frequency:0";
+		rotation = <&imx290>,"rotation:0";
+		orientation = <&imx290>,"orientation:0";
 	};
 };
--- a/arch/arm/boot/dts/overlays/imx477_378-overlay.dtsi
+++ b/arch/arm/boot/dts/overlays/imx477_378-overlay.dtsi
@@ -23,6 +23,7 @@
 				VDDL-supply = <&imx477_vddl>;	/* 1.8v */
 
 				rotation = <180>;
+				orientation = <2>;
 
 				port {
 					imx477_0: endpoint {
@@ -104,5 +105,6 @@
 
 	__overrides__ {
 		rotation = <&imx477>,"rotation:0";
+		orientation = <&imx477>,"orientation:0";
 	};
 };
--- a/arch/arm/boot/dts/overlays/ov5647-overlay.dts
+++ b/arch/arm/boot/dts/overlays/ov5647-overlay.dts
@@ -22,6 +22,7 @@
 				clocks = <&ov5647_clk>;
 
 				rotation = <0>;
+				orientation = <2>;
 
 				port {
 					ov5647_0: endpoint {
@@ -88,5 +89,6 @@
 
 	__overrides__ {
 		rotation = <&ov5647>,"rotation:0";
+		orientation = <&ov5647>,"orientation:0";
 	};
 };
--- a/arch/arm/boot/dts/overlays/ov7251-overlay.dts
+++ b/arch/arm/boot/dts/overlays/ov7251-overlay.dts
@@ -28,6 +28,9 @@
 				vdda-supply = <&cam1_reg>;
 				vddd-supply = <&ov7251_dvdd>;
 
+				rotation = <0>;
+				orientation = <2>;
+
 				port {
 					ov7251_0: endpoint {
 						remote-endpoint = <&csi1_ep>;
@@ -102,4 +105,9 @@
 			regulator-max-microvolt = <2800000>;
 		};
 	};
+
+	__overrides__ {
+		rotation = <&ov7251>,"rotation:0";
+		orientation = <&ov7251>,"orientation:0";
+	};
 };
--- a/arch/arm/boot/dts/overlays/ov9281-overlay.dts
+++ b/arch/arm/boot/dts/overlays/ov9281-overlay.dts
@@ -27,6 +27,9 @@
 				dovdd-supply = <&ov9281_dovdd>;
 				dvdd-supply = <&ov9281_dvdd>;
 
+				rotation = <0>;
+				orientation = <2>;
+
 				port {
 					ov9281_0: endpoint {
 						remote-endpoint = <&csi1_ep>;
@@ -103,4 +106,8 @@
 		};
 	};
 
+	__overrides__ {
+		rotation = <&ov9281>,"rotation:0";
+		orientation = <&ov9281>,"orientation:0";
+	};
 };