firmware-utils: bump to git HEAD
[openwrt/openwrt.git] / target / linux / bcm27xx / patches-5.4 / 950-0875-dtoverlay-Add-overlay-for-Omnivision-OV9281-image-se.patch
1 From 489b7fc3df2013766f3c4d5f682dcc7992950293 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Mon, 6 Jul 2020 17:32:21 +0100
4 Subject: [PATCH] dtoverlay: Add overlay for Omnivision OV9281 image
5 sensor
6
7 Adds an overlay for the OV9281 mono imaging sensor using 2 CSI-2
8 data lanes.
9
10 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
11 ---
12 arch/arm/boot/dts/overlays/Makefile | 1 +
13 arch/arm/boot/dts/overlays/README | 8 ++
14 arch/arm/boot/dts/overlays/ov9281-overlay.dts | 110 ++++++++++++++++++
15 3 files changed, 119 insertions(+)
16 create mode 100644 arch/arm/boot/dts/overlays/ov9281-overlay.dts
17
18 --- a/arch/arm/boot/dts/overlays/Makefile
19 +++ b/arch/arm/boot/dts/overlays/Makefile
20 @@ -115,6 +115,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
21 mpu6050.dtbo \
22 mz61581.dtbo \
23 ov5647.dtbo \
24 + ov9281.dtbo \
25 papirus.dtbo \
26 pibell.dtbo \
27 piglow.dtbo \
28 --- a/arch/arm/boot/dts/overlays/README
29 +++ b/arch/arm/boot/dts/overlays/README
30 @@ -1813,6 +1813,14 @@ Load: dtoverlay=ov5647
31 Params: <None>
32
33
34 +Name: ov9281
35 +Info: Omnivision OV9281 camera module.
36 + Uses Unicam 1, which is the standard camera connector on most Pi
37 + variants.
38 +Load: dtoverlay=ov9281
39 +Params: <None>
40 +
41 +
42 Name: papirus
43 Info: PaPiRus ePaper Screen by Pi Supply (both HAT and pHAT)
44 Load: dtoverlay=papirus,<param>=<val>
45 --- /dev/null
46 +++ b/arch/arm/boot/dts/overlays/ov9281-overlay.dts
47 @@ -0,0 +1,110 @@
48 +// SPDX-License-Identifier: GPL-2.0-only
49 +// Definitions for OV9281 camera module on VC I2C bus
50 +/dts-v1/;
51 +/plugin/;
52 +
53 +#include <dt-bindings/gpio/gpio.h>
54 +
55 +/{
56 + compatible = "brcm,bcm2835";
57 +
58 + fragment@0 {
59 + target = <&i2c_csi_dsi>;
60 + __overlay__ {
61 + #address-cells = <1>;
62 + #size-cells = <0>;
63 + status = "okay";
64 +
65 + ov9281: ov9281@60 {
66 + compatible = "ovti,ov9281";
67 + reg = <0x60>;
68 + status = "okay";
69 +
70 + clocks = <&ov9281_clk>;
71 + clock-names = "xvclk";
72 +
73 + avdd-supply = <&ov9281_avdd>;
74 + dovdd-supply = <&ov9281_dovdd>;
75 + dvdd-supply = <&ov9281_dvdd>;
76 +
77 + port {
78 + ov9281_0: endpoint {
79 + remote-endpoint = <&csi1_ep>;
80 + clock-lanes = <0>;
81 + data-lanes = <1 2>;
82 + clock-noncontinuous;
83 + link-frequencies =
84 + /bits/ 64 <456000000>;
85 + };
86 + };
87 + };
88 + };
89 + };
90 +
91 + fragment@1 {
92 + target = <&csi1>;
93 + __overlay__ {
94 + status = "okay";
95 +
96 + port {
97 + csi1_ep: endpoint {
98 + remote-endpoint = <&ov9281_0>;
99 + data-lanes = <1 2>;
100 + };
101 + };
102 + };
103 + };
104 +
105 + fragment@2 {
106 + target = <&i2c0if>;
107 + __overlay__ {
108 + status = "okay";
109 + };
110 + };
111 +
112 + fragment@3 {
113 + target-path="/";
114 + __overlay__ {
115 + ov9281_avdd: fixedregulator@0 {
116 + compatible = "regulator-fixed";
117 + regulator-name = "ov9281_avdd";
118 + regulator-min-microvolt = <2800000>;
119 + regulator-max-microvolt = <2800000>;
120 + gpio = <&gpio 41 GPIO_ACTIVE_HIGH>;
121 + enable-active-high;
122 + };
123 + ov9281_dovdd: fixedregulator@1 {
124 + compatible = "regulator-fixed";
125 + regulator-name = "ov9281_dovdd";
126 + regulator-min-microvolt = <1800000>;
127 + regulator-max-microvolt = <1800000>;
128 + };
129 + ov9281_dvdd: fixedregulator@2 {
130 + compatible = "regulator-fixed";
131 + regulator-name = "ov9281_dvdd";
132 + regulator-min-microvolt = <1200000>;
133 + regulator-max-microvolt = <1200000>;
134 + };
135 + ov9281_clk: ov9281-clk {
136 + compatible = "fixed-clock";
137 + #clock-cells = <0>;
138 + clock-frequency = <24000000>;
139 + };
140 + };
141 + };
142 +
143 + fragment@4 {
144 + target = <&i2c0mux>;
145 + __overlay__ {
146 + status = "okay";
147 + };
148 + };
149 +
150 + fragment@5 {
151 + target-path="/__overrides__";
152 + __overlay__ {
153 + cam0-pwdn-ctrl = <&ov9281_avdd>,"gpio:0";
154 + cam0-pwdn = <&ov9281_avdd>,"gpio:4";
155 + };
156 + };
157 +};