bcm27xx: add support for linux v5.15
[openwrt/staging/chunkeey.git] / target / linux / bcm27xx / patches-5.15 / 950-0523-overlays-Add-imx519-overlay.dts.patch
1 From d8faff7e7581ee3417675e2f64da18ffb831751a Mon Sep 17 00:00:00 2001
2 From: Lee Jackson <info@arducam.com>
3 Date: Fri, 27 Aug 2021 14:45:43 +0800
4 Subject: [PATCH] overlays: Add imx519-overlay.dts
5
6 Added overlays for enabling IMX519 and add the
7 relevant information to the README.
8
9 Signed-off-by: Lee Jackson <info@arducam.com>
10 ---
11 arch/arm/boot/dts/overlays/Makefile | 1 +
12 arch/arm/boot/dts/overlays/README | 11 ++
13 arch/arm/boot/dts/overlays/imx519-overlay.dts | 115 ++++++++++++++++++
14 3 files changed, 127 insertions(+)
15 create mode 100644 arch/arm/boot/dts/overlays/imx519-overlay.dts
16
17 --- a/arch/arm/boot/dts/overlays/Makefile
18 +++ b/arch/arm/boot/dts/overlays/Makefile
19 @@ -98,6 +98,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
20 imx290.dtbo \
21 imx378.dtbo \
22 imx477.dtbo \
23 + imx519.dtbo \
24 iqaudio-codec.dtbo \
25 iqaudio-dac.dtbo \
26 iqaudio-dacplus.dtbo \
27 --- a/arch/arm/boot/dts/overlays/README
28 +++ b/arch/arm/boot/dts/overlays/README
29 @@ -1738,6 +1738,17 @@ Params: rotation Mounting
30 2 = external, default external)
31
32
33 +Name: imx519
34 +Info: Sony IMX519 camera module.
35 + Uses Unicam 1, which is the standard camera connector on most Pi
36 + variants.
37 +Load: dtoverlay=imx519,<param>=<val>
38 +Params: rotation Mounting rotation of the camera sensor (0 or
39 + 180, default 0)
40 + orientation Sensor orientation (0 = front, 1 = rear,
41 + 2 = external, default external)
42 +
43 +
44 Name: iqaudio-codec
45 Info: Configures the IQaudio Codec audio card
46 Load: dtoverlay=iqaudio-codec
47 --- /dev/null
48 +++ b/arch/arm/boot/dts/overlays/imx519-overlay.dts
49 @@ -0,0 +1,115 @@
50 +// SPDX-License-Identifier: GPL-2.0-only
51 +// Definitions for imx519 camera module on VC I2C bus
52 +/dts-v1/;
53 +/plugin/;
54 +
55 +#include <dt-bindings/gpio/gpio.h>
56 +
57 +/{
58 + compatible = "brcm,bcm2835";
59 +
60 + fragment@0 {
61 + target = <&i2c_csi_dsi>;
62 + __overlay__ {
63 + #address-cells = <1>;
64 + #size-cells = <0>;
65 + status = "okay";
66 +
67 + imx519: imx519@1a {
68 + compatible = "sony,imx519";
69 + reg = <0x1a>;
70 + status = "okay";
71 +
72 + clocks = <&imx519_clk>;
73 + clock-names = "xclk";
74 +
75 + VANA-supply = <&cam1_reg>; /* 2.8v */
76 + VDIG-supply = <&imx519_vdig>; /* 1.8v */
77 + VDDL-supply = <&imx519_vddl>; /* 1.2v */
78 +
79 + rotation = <0>;
80 + orientation = <2>;
81 +
82 + port {
83 + imx519_0: endpoint {
84 + remote-endpoint = <&csi1_ep>;
85 + clock-lanes = <0>;
86 + data-lanes = <1 2>;
87 + clock-noncontinuous;
88 + link-frequencies =
89 + /bits/ 64 <493500000>;
90 + };
91 + };
92 + };
93 + };
94 + };
95 +
96 + fragment@1 {
97 + target = <&csi1>;
98 + __overlay__ {
99 + status = "okay";
100 +
101 + port{
102 + csi1_ep: endpoint{
103 + remote-endpoint = <&imx519_0>;
104 + clock-lanes = <0>;
105 + data-lanes = <1 2>;
106 + clock-noncontinuous;
107 + };
108 + };
109 + };
110 + };
111 +
112 + fragment@2 {
113 + target = <&i2c0if>;
114 + __overlay__ {
115 + status = "okay";
116 + };
117 + };
118 +
119 + fragment@3 {
120 + target-path="/";
121 + __overlay__ {
122 + imx519_vdig: fixedregulator@1 {
123 + compatible = "regulator-fixed";
124 + regulator-name = "imx519_vdig";
125 + regulator-min-microvolt = <1800000>;
126 + regulator-max-microvolt = <1800000>;
127 + };
128 + imx519_vddl: fixedregulator@2 {
129 + compatible = "regulator-fixed";
130 + regulator-name = "imx519_vddl";
131 + regulator-min-microvolt = <1200000>;
132 + regulator-max-microvolt = <1200000>;
133 + };
134 +
135 + imx519_clk: camera-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 = <&cam1_reg>;
152 + __overlay__ {
153 + status = "okay";
154 + regulator-name = "imx519_vana";
155 + regulator-min-microvolt = <2800000>;
156 + regulator-max-microvolt = <2800000>;
157 + };
158 + };
159 +
160 + __overrides__ {
161 + rotation = <&imx519>,"rotation:0";
162 + orientation = <&imx519>,"orientation:0";
163 + };
164 +};