brcm2708: rename target to bcm27xx
[openwrt/staging/wigyori.git] / target / linux / bcm27xx / patches-4.19 / 950-0280-dtoverlays-Correct-DT-handling-camera-GPIOs.patch
1 From 5c0dfdba54fdaeb813d8535283aa8f75080e1055 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] 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 | 14 +++++++++++---
17 3 files changed, 19 insertions(+), 12 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 &vc4 {
35 --- a/arch/arm/boot/dts/overlays/README
36 +++ b/arch/arm/boot/dts/overlays/README
37 @@ -1366,15 +1366,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_0_1 Use pins 0&1 for the I2C instead of 44&45.
50 +Params: i2c_pins_0_1 Use pins 0&1 for the I2C instead of 44&45.
51 Useful on Compute Modules.
52
53 i2c_pins_28_29 Use pins 28&29 for the I2C instead of 44&45.
54 --- a/arch/arm/boot/dts/overlays/ov5647-overlay.dts
55 +++ b/arch/arm/boot/dts/overlays/ov5647-overlay.dts
56 @@ -14,7 +14,7 @@
57 status = "okay";
58
59 ov5647: ov5647@36 {
60 - compatible = "ov5647";
61 + compatible = "ovti,ov5647";
62 reg = <0x36>;
63 status = "okay";
64
65 @@ -82,10 +82,18 @@
66 };
67 };
68
69 + fragment@6 {
70 + target-path="/__overrides__";
71 + __overlay__ {
72 + cam0-pwdn-ctrl = <&ov5647>,"pwdn-gpios:0";
73 + cam0-pwdn = <&ov5647>,"pwdn-gpios:4";
74 + cam0-led-ctrl = <&ov5647>,"pwdn-gpios:12";
75 + cam0-led = <&ov5647>,"pwdn-gpios:16";
76 + };
77 + };
78 +
79 __overrides__ {
80 i2c_pins_0_1 = <0>,"-2-3+4";
81 i2c_pins_28_29 = <0>,"+2-3-4";
82 - cam0-pwdn = <&ov5647>,"pwdn-gpios:4";
83 - cam0-led = <&ov5647>,"pwdn-gpios:16";
84 };
85 };