7f776948825dd10386b15722ece9c0fff74787b3
[openwrt/staging/lynxis.git] / target / linux / brcm2708 / patches-4.14 / 950-0418-dtoverlays-Correct-DT-handling-camera-GPIOs.patch
1 From ea59741f2679e30d765b6a9e0d45265e3033a38c Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.org>
3 Date: Tue, 18 Sep 2018 10:47:38 +0100
4 Subject: [PATCH 418/454] dtoverlays: Correct DT handling camera GPIOs
5
6 The firmware has support for updating overrides with the correct
7 GPIO settings for the camera GPIOs, but the wrong device tree
8 setup ended up being merged.
9 Correct the DT configuration so that the firmware does set it
10 up correctly.
11
12 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
13 ---
14 arch/arm/boot/dts/bcm270x.dtsi | 7 +++++++
15 arch/arm/boot/dts/overlays/README | 10 +---------
16 arch/arm/boot/dts/overlays/ov5647-overlay.dts | 12 ++++++++++--
17 3 files changed, 18 insertions(+), 11 deletions(-)
18
19 --- a/arch/arm/boot/dts/bcm270x.dtsi
20 +++ b/arch/arm/boot/dts/bcm270x.dtsi
21 @@ -152,6 +152,13 @@
22 regulator-max-microvolt = <3300000>;
23 regulator-always-on;
24 };
25 +
26 + __overrides__ {
27 + cam0-pwdn-ctrl;
28 + cam0-pwdn;
29 + cam0-led-ctrl;
30 + cam0-led;
31 + };
32 };
33
34 /* Configure and use the auxilliary interrupt controller */
35 --- a/arch/arm/boot/dts/overlays/README
36 +++ b/arch/arm/boot/dts/overlays/README
37 @@ -1283,15 +1283,7 @@ Info: Omnivision OV5647 camera module.
38 Uses Unicam 1, which is the standard camera connector on most Pi
39 variants.
40 Load: dtoverlay=ov5647,<param>=<val>
41 -Params: cam0-pwdn GPIO used to control the sensor powerdown line.
42 -
43 - cam0-led GPIO used to control the sensor led
44 - Both these fields should be automatically filled
45 - in by the firmware to reflect the default GPIO
46 - configuration of the particular Pi variant in
47 - use.
48 -
49 - i2c_pins_28_29 Use pins 28&29 for the I2C instead of 44&45.
50 +Params: i2c_pins_28_29 Use pins 28&29 for the I2C instead of 44&45.
51 This is required for Pi B+, 2, 0, and 0W.
52
53
54 --- a/arch/arm/boot/dts/overlays/ov5647-overlay.dts
55 +++ b/arch/arm/boot/dts/overlays/ov5647-overlay.dts
56 @@ -78,9 +78,17 @@
57 };
58 };
59
60 + fragment@5 {
61 + target-path="/__overrides__";
62 + __overlay__ {
63 + cam0-pwdn-ctrl = <&ov5647>,"pwdn-gpios:0";
64 + cam0-pwdn = <&ov5647>,"pwdn-gpios:4";
65 + cam0-led-ctrl = <&ov5647>,"pwdn-gpios:12";
66 + cam0-led = <&ov5647>,"pwdn-gpios:16";
67 + };
68 + };
69 +
70 __overrides__ {
71 i2c_pins_28_29 = <0>,"+4-5";
72 - cam0-pwdn = <&ov5647>,"pwdn-gpios:4";
73 - cam0-led = <&ov5647>,"pwdn-gpios:16";
74 };
75 };