be22dd33167774c3274b5cb79da8cf4f367a99d7
[openwrt/staging/blocktrron.git] /
1 From 30fbdcf8d58658860e43c0396cb50c5d4ade2dc5 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: imx219: 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/imx219-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 @@ -1433,8 +1433,9 @@ Name: imx219
20 Info: Sony IMX219 camera module.
21 Uses Unicam 1, which is the standard camera connector on most Pi
22 variants.
23 -Load: dtoverlay=imx219
24 -Params: <None>
25 +Load: dtoverlay=imx219,<param>=<val>
26 +Params: rotation Mounting rotation of the camera sensor (0 or
27 + 180, default 180)
28
29
30 Name: imx290
31 --- a/arch/arm/boot/dts/overlays/imx219-overlay.dts
32 +++ b/arch/arm/boot/dts/overlays/imx219-overlay.dts
33 @@ -27,6 +27,8 @@
34 VDIG-supply = <&imx219_vdig>; /* 1.8v */
35 VDDL-supply = <&imx219_vddl>; /* 1.2v */
36
37 + rotation = <180>;
38 +
39 port {
40 imx219_0: endpoint {
41 remote-endpoint = <&csi1_ep>;
42 @@ -110,4 +112,8 @@
43 cam0-pwdn = <&imx219_vana>,"gpio:4";
44 };
45 };
46 +
47 + __overrides__ {
48 + rotation = <&imx219>,"rotation:0";
49 + };
50 };