761b368b445a51646a665db1a0f851e574471bd3
[openwrt/staging/linusw.git] /
1 From 9637391eb4ad9410f4a366b4d78c7cfd909572da Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Mon, 2 Aug 2021 14:30:15 +0100
4 Subject: [PATCH] dtoverlays: Add orientation (and rotation) parameter
5 to sensor overlays
6
7 Add the orientation parameter to all the camera sensor overlays to
8 avoid libcamera complaining, and add the rotation parameter where
9 it hadn't been added before.
10
11 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
12 ---
13 arch/arm/boot/dts/overlays/README | 26 ++++++++++++++++---
14 arch/arm/boot/dts/overlays/imx219-overlay.dts | 2 ++
15 .../boot/dts/overlays/imx290_327-overlay.dtsi | 5 ++++
16 .../boot/dts/overlays/imx477_378-overlay.dtsi | 2 ++
17 arch/arm/boot/dts/overlays/ov5647-overlay.dts | 2 ++
18 arch/arm/boot/dts/overlays/ov7251-overlay.dts | 8 ++++++
19 arch/arm/boot/dts/overlays/ov9281-overlay.dts | 7 +++++
20 7 files changed, 48 insertions(+), 4 deletions(-)
21
22 --- a/arch/arm/boot/dts/overlays/README
23 +++ b/arch/arm/boot/dts/overlays/README
24 @@ -1682,6 +1682,8 @@ Info: Sony IMX219 camera module.
25 Load: dtoverlay=imx219,<param>=<val>
26 Params: rotation Mounting rotation of the camera sensor (0 or
27 180, default 180)
28 + orientation Sensor orientation (0 = front, 1 = rear,
29 + 2 = external, default external)
30
31
32 Name: imx290
33 @@ -1698,6 +1700,10 @@ Params: 4lane Enable 4
34 (the default), whilst those from Innomaker use
35 74.25MHz.
36 mono Denote that the module is a mono sensor.
37 + orientation Sensor orientation (0 = front, 1 = rear,
38 + 2 = external, default external)
39 + rotation Mounting rotation of the camera sensor (0 or
40 + 180, default 0)
41
42
43 Name: imx378
44 @@ -1707,6 +1713,8 @@ Info: Sony IMX378 camera module.
45 Load: dtoverlay=imx378,<param>=<val>
46 Params: rotation Mounting rotation of the camera sensor (0 or
47 180, default 180)
48 + orientation Sensor orientation (0 = front, 1 = rear,
49 + 2 = external, default external)
50
51
52 Name: imx477
53 @@ -1716,6 +1724,8 @@ Info: Sony IMX477 camera module.
54 Load: dtoverlay=imx477,<param>=<val>
55 Params: rotation Mounting rotation of the camera sensor (0 or
56 180, default 180)
57 + orientation Sensor orientation (0 = front, 1 = rear,
58 + 2 = external, default external)
59
60
61 Name: iqaudio-codec
62 @@ -2141,22 +2151,30 @@ Info: Omnivision OV5647 camera module.
63 Load: dtoverlay=ov5647,<param>=<val>
64 Params: rotation Mounting rotation of the camera sensor (0 or
65 180, default 0)
66 + orientation Sensor orientation (0 = front, 1 = rear,
67 + 2 = external, default external)
68
69
70 Name: ov7251
71 Info: Omnivision OV7251 camera module.
72 Uses Unicam 1, which is the standard camera connector on most Pi
73 variants.
74 -Load: dtoverlay=ov7251
75 -Params: <None>
76 +Load: dtoverlay=ov7251,<param>=<val>
77 +Params: rotation Mounting rotation of the camera sensor (0 or
78 + 180, default 0)
79 + orientation Sensor orientation (0 = front, 1 = rear,
80 + 2 = external, default external)
81
82
83 Name: ov9281
84 Info: Omnivision OV9281 camera module.
85 Uses Unicam 1, which is the standard camera connector on most Pi
86 variants.
87 -Load: dtoverlay=ov9281
88 -Params: <None>
89 +Load: dtoverlay=ov9281,<param>=<val>
90 +Params: rotation Mounting rotation of the camera sensor (0 or
91 + 180, default 0)
92 + orientation Sensor orientation (0 = front, 1 = rear,
93 + 2 = external, default external)
94
95
96 Name: papirus
97 --- a/arch/arm/boot/dts/overlays/imx219-overlay.dts
98 +++ b/arch/arm/boot/dts/overlays/imx219-overlay.dts
99 @@ -28,6 +28,7 @@
100 VDDL-supply = <&imx219_vddl>; /* 1.2v */
101
102 rotation = <180>;
103 + orientation = <2>;
104
105 port {
106 imx219_0: endpoint {
107 @@ -109,5 +110,6 @@
108
109 __overrides__ {
110 rotation = <&imx219>,"rotation:0";
111 + orientation = <&imx219>,"orientation:0";
112 };
113 };
114 --- a/arch/arm/boot/dts/overlays/imx290_327-overlay.dtsi
115 +++ b/arch/arm/boot/dts/overlays/imx290_327-overlay.dtsi
116 @@ -24,6 +24,9 @@
117 clock-names = "xclk";
118 clock-frequency = <37125000>;
119
120 + rotation = <0>;
121 + orientation = <2>;
122 +
123 vdda-supply = <&cam1_reg>; /* 2.8v */
124 vdddo-supply = <&imx290_vdddo>; /* 1.8v */
125 vddd-supply = <&imx290_vddd>; /* 1.5v */
126 @@ -135,5 +138,7 @@
127 4lane = <0>, "-6+7-8+9";
128 clock-frequency = <&imx290_clk>,"clock-frequency:0",
129 <&imx290>,"clock-frequency:0";
130 + rotation = <&imx290>,"rotation:0";
131 + orientation = <&imx290>,"orientation:0";
132 };
133 };
134 --- a/arch/arm/boot/dts/overlays/imx477_378-overlay.dtsi
135 +++ b/arch/arm/boot/dts/overlays/imx477_378-overlay.dtsi
136 @@ -23,6 +23,7 @@
137 VDDL-supply = <&imx477_vddl>; /* 1.8v */
138
139 rotation = <180>;
140 + orientation = <2>;
141
142 port {
143 imx477_0: endpoint {
144 @@ -104,5 +105,6 @@
145
146 __overrides__ {
147 rotation = <&imx477>,"rotation:0";
148 + orientation = <&imx477>,"orientation:0";
149 };
150 };
151 --- a/arch/arm/boot/dts/overlays/ov5647-overlay.dts
152 +++ b/arch/arm/boot/dts/overlays/ov5647-overlay.dts
153 @@ -22,6 +22,7 @@
154 clocks = <&ov5647_clk>;
155
156 rotation = <0>;
157 + orientation = <2>;
158
159 port {
160 ov5647_0: endpoint {
161 @@ -88,5 +89,6 @@
162
163 __overrides__ {
164 rotation = <&ov5647>,"rotation:0";
165 + orientation = <&ov5647>,"orientation:0";
166 };
167 };
168 --- a/arch/arm/boot/dts/overlays/ov7251-overlay.dts
169 +++ b/arch/arm/boot/dts/overlays/ov7251-overlay.dts
170 @@ -28,6 +28,9 @@
171 vdda-supply = <&cam1_reg>;
172 vddd-supply = <&ov7251_dvdd>;
173
174 + rotation = <0>;
175 + orientation = <2>;
176 +
177 port {
178 ov7251_0: endpoint {
179 remote-endpoint = <&csi1_ep>;
180 @@ -102,4 +105,9 @@
181 regulator-max-microvolt = <2800000>;
182 };
183 };
184 +
185 + __overrides__ {
186 + rotation = <&ov7251>,"rotation:0";
187 + orientation = <&ov7251>,"orientation:0";
188 + };
189 };
190 --- a/arch/arm/boot/dts/overlays/ov9281-overlay.dts
191 +++ b/arch/arm/boot/dts/overlays/ov9281-overlay.dts
192 @@ -27,6 +27,9 @@
193 dovdd-supply = <&ov9281_dovdd>;
194 dvdd-supply = <&ov9281_dvdd>;
195
196 + rotation = <0>;
197 + orientation = <2>;
198 +
199 port {
200 ov9281_0: endpoint {
201 remote-endpoint = <&csi1_ep>;
202 @@ -103,4 +106,8 @@
203 };
204 };
205
206 + __overrides__ {
207 + rotation = <&ov9281>,"rotation:0";
208 + orientation = <&ov9281>,"orientation:0";
209 + };
210 };