11a5d3da98aeafe41a1ae5098625577367a1cde3
[openwrt/staging/ldir.git] /
1 From afed51afadb2f5d43e093c969bdf6535b2ea0ad3 Mon Sep 17 00:00:00 2001
2 From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 Date: Sat, 4 Jul 2020 03:04:38 +0300
4 Subject: [PATCH] dt/dtoverlays: imx477: Add parameter to set camera
5 module rotation
6
7 Add a rotation DT overlay parameter to allow specifying the camera
8 module mounting rotation. Set the default rotation to 180 as the module
9 is typically mounted upside-down.
10
11 Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
12 ---
13 arch/arm/boot/dts/overlays/README | 5 +++--
14 arch/arm/boot/dts/overlays/imx477-overlay.dts | 6 ++++++
15 2 files changed, 9 insertions(+), 2 deletions(-)
16
17 --- a/arch/arm/boot/dts/overlays/README
18 +++ b/arch/arm/boot/dts/overlays/README
19 @@ -1458,8 +1458,9 @@ Name: imx477
20 Info: Sony IMX477 camera module.
21 Uses Unicam 1, which is the standard camera connector on most Pi
22 variants.
23 -Load: dtoverlay=imx477
24 -Params: <None>
25 +Load: dtoverlay=imx477,<param>=<val>
26 +Params: rotation Mounting rotation of the camera sensor (0 or
27 + 180, default 180)
28
29
30 Name: iqaudio-codec
31 --- a/arch/arm/boot/dts/overlays/imx477-overlay.dts
32 +++ b/arch/arm/boot/dts/overlays/imx477-overlay.dts
33 @@ -27,6 +27,8 @@
34 VDIG-supply = <&imx477_vdig>; /* 1.05v */
35 VDDL-supply = <&imx477_vddl>; /* 1.8v */
36
37 + rotation = <180>;
38 +
39 port {
40 imx477_0: endpoint {
41 remote-endpoint = <&csi1_ep>;
42 @@ -110,4 +112,8 @@
43 cam0-pwdn = <&imx477_vana>,"gpio:4";
44 };
45 };
46 +
47 + __overrides__ {
48 + rotation = <&imx477>,"rotation:0";
49 + };
50 };