kernel: bump 6.1 to 6.1.72
[openwrt/staging/stintel.git] / target / linux / bcm27xx / patches-6.1 / 950-0649-media-dt-bindings-Convert-imx290.txt-to-YAML.patch
1 From 22774ebfc4073fd3c0fc729e2ae1e0e762ec127e Mon Sep 17 00:00:00 2001
2 From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 Date: Sun, 16 Oct 2022 09:15:04 +0300
4 Subject: [PATCH] media: dt-bindings: Convert imx290.txt to YAML
5
6 Upstream commit a96dfea1df25
7
8 Convert the Sony IMX290 DT binding from text to YAML. Add Manivannan as
9 a maintainer given that he is listed in MAINTAINERS for the file, as
10 volunteering myself.
11
12 The name of the input clock, "xclk", is wrong as the hardware manual
13 names it INCK. As the device has a single clock, the name could be
14 omitted, but that would require a corresponding change to the driver and
15 is thus a candidate for further patches.
16
17 Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
18 Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
19 Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
20 ---
21 .../devicetree/bindings/media/i2c/imx290.txt | 57 --------
22 .../bindings/media/i2c/sony,imx290.yaml | 129 ++++++++++++++++++
23 MAINTAINERS | 2 +-
24 3 files changed, 130 insertions(+), 58 deletions(-)
25 delete mode 100644 Documentation/devicetree/bindings/media/i2c/imx290.txt
26 create mode 100644 Documentation/devicetree/bindings/media/i2c/sony,imx290.yaml
27
28 --- a/Documentation/devicetree/bindings/media/i2c/imx290.txt
29 +++ /dev/null
30 @@ -1,57 +0,0 @@
31 -* Sony IMX290 1/2.8-Inch CMOS Image Sensor
32 -
33 -The Sony IMX290 is a 1/2.8-Inch CMOS Solid-state image sensor with
34 -Square Pixel for Color Cameras. It is programmable through I2C and 4-wire
35 -interfaces. The sensor output is available via CMOS logic parallel SDR output,
36 -Low voltage LVDS DDR output and CSI-2 serial data output. The CSI-2 bus is the
37 -default. No bindings have been defined for the other busses.
38 -
39 -Required Properties:
40 -- compatible: Should be "sony,imx290"
41 -- reg: I2C bus address of the device
42 -- clocks: Reference to the xclk clock.
43 -- clock-names: Should be "xclk".
44 -- clock-frequency: Frequency of the xclk clock in Hz.
45 -- vdddo-supply: Sensor digital IO regulator.
46 -- vdda-supply: Sensor analog regulator.
47 -- vddd-supply: Sensor digital core regulator.
48 -
49 -Optional Properties:
50 -- reset-gpios: Sensor reset GPIO
51 -
52 -The imx290 device node should contain one 'port' child node with
53 -an 'endpoint' subnode. For further reading on port node refer to
54 -Documentation/devicetree/bindings/media/video-interfaces.txt.
55 -
56 -Required Properties on endpoint:
57 -- data-lanes: check ../video-interfaces.txt
58 -- link-frequencies: check ../video-interfaces.txt
59 -- remote-endpoint: check ../video-interfaces.txt
60 -
61 -Example:
62 - &i2c1 {
63 - ...
64 - imx290: camera-sensor@1a {
65 - compatible = "sony,imx290";
66 - reg = <0x1a>;
67 -
68 - reset-gpios = <&msmgpio 35 GPIO_ACTIVE_LOW>;
69 - pinctrl-names = "default";
70 - pinctrl-0 = <&camera_rear_default>;
71 -
72 - clocks = <&gcc GCC_CAMSS_MCLK0_CLK>;
73 - clock-names = "xclk";
74 - clock-frequency = <37125000>;
75 -
76 - vdddo-supply = <&camera_vdddo_1v8>;
77 - vdda-supply = <&camera_vdda_2v8>;
78 - vddd-supply = <&camera_vddd_1v5>;
79 -
80 - port {
81 - imx290_ep: endpoint {
82 - data-lanes = <1 2 3 4>;
83 - link-frequencies = /bits/ 64 <445500000>;
84 - remote-endpoint = <&csiphy0_ep>;
85 - };
86 - };
87 - };
88 --- /dev/null
89 +++ b/Documentation/devicetree/bindings/media/i2c/sony,imx290.yaml
90 @@ -0,0 +1,129 @@
91 +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
92 +%YAML 1.2
93 +---
94 +$id: http://devicetree.org/schemas/media/i2c/sony,imx290.yaml#
95 +$schema: http://devicetree.org/meta-schemas/core.yaml#
96 +
97 +title: Sony IMX290 1/2.8-Inch CMOS Image Sensor
98 +
99 +maintainers:
100 + - Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
101 + - Laurent Pinchart <laurent.pinchart@ideasonboard.com>
102 +
103 +description: |-
104 + The Sony IMX290 is a 1/2.8-Inch CMOS Solid-state image sensor with Square
105 + Pixel for Color Cameras. It is programmable through I2C and 4-wire
106 + interfaces. The sensor output is available via CMOS logic parallel SDR
107 + output, Low voltage LVDS DDR output and CSI-2 serial data output. The CSI-2
108 + bus is the default. No bindings have been defined for the other busses.
109 +
110 +properties:
111 + compatible:
112 + enum:
113 + - sony,imx290
114 +
115 + reg:
116 + maxItems: 1
117 +
118 + clocks:
119 + maxItems: 1
120 +
121 + clock-names:
122 + description: Input clock (37.125 MHz or 74.25 MHz)
123 + items:
124 + - const: xclk
125 +
126 + clock-frequency:
127 + description: Frequency of the xclk clock in Hz
128 +
129 + vdda-supply:
130 + description: Analog power supply (2.9V)
131 +
132 + vddd-supply:
133 + description: Digital core power supply (1.2V)
134 +
135 + vdddo-supply:
136 + description: Digital I/O power supply (1.8V)
137 +
138 + reset-gpios:
139 + description: Sensor reset (XCLR) GPIO
140 + maxItems: 1
141 +
142 + port:
143 + $ref: /schemas/graph.yaml#/$defs/port-base
144 + description: |
145 + Video output port
146 +
147 + properties:
148 + endpoint:
149 + $ref: /schemas/media/video-interfaces.yaml#
150 + unevaluatedProperties: false
151 +
152 + properties:
153 + data-lanes:
154 + anyOf:
155 + - items:
156 + - const: 1
157 + - const: 2
158 + - items:
159 + - const: 1
160 + - const: 2
161 + - const: 3
162 + - const: 4
163 +
164 + link-frequencies: true
165 +
166 + required:
167 + - data-lanes
168 + - link-frequencies
169 +
170 + additionalProperties: false
171 +
172 +required:
173 + - compatible
174 + - reg
175 + - clocks
176 + - clock-names
177 + - clock-frequency
178 + - vdda-supply
179 + - vddd-supply
180 + - vdddo-supply
181 + - port
182 +
183 +additionalProperties: false
184 +
185 +examples:
186 + - |
187 + #include <dt-bindings/gpio/gpio.h>
188 +
189 + i2c {
190 + #address-cells = <1>;
191 + #size-cells = <0>;
192 +
193 + imx290: camera-sensor@1a {
194 + compatible = "sony,imx290";
195 + reg = <0x1a>;
196 +
197 + pinctrl-names = "default";
198 + pinctrl-0 = <&camera_rear_default>;
199 +
200 + clocks = <&gcc 90>;
201 + clock-names = "xclk";
202 + clock-frequency = <37125000>;
203 +
204 + vdddo-supply = <&camera_vdddo_1v8>;
205 + vdda-supply = <&camera_vdda_2v8>;
206 + vddd-supply = <&camera_vddd_1v5>;
207 +
208 + reset-gpios = <&msmgpio 35 GPIO_ACTIVE_LOW>;
209 +
210 + port {
211 + imx290_ep: endpoint {
212 + data-lanes = <1 2 3 4>;
213 + link-frequencies = /bits/ 64 <445500000>;
214 + remote-endpoint = <&csiphy0_ep>;
215 + };
216 + };
217 + };
218 + };
219 +...
220 --- a/MAINTAINERS
221 +++ b/MAINTAINERS
222 @@ -19269,7 +19269,7 @@ M: Manivannan Sadhasivam <manivannan.sad
223 L: linux-media@vger.kernel.org
224 S: Maintained
225 T: git git://linuxtv.org/media_tree.git
226 -F: Documentation/devicetree/bindings/media/i2c/imx290.txt
227 +F: Documentation/devicetree/bindings/media/i2c/sony,imx290.yaml
228 F: drivers/media/i2c/imx290.c
229
230 SONY IMX296 SENSOR DRIVER