Merge tag 'v5.15.57' into rpi-5.15.y
[platform/kernel/linux-rpi.git] / Documentation / devicetree / bindings / media / i2c / imx258.yaml
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/media/i2c/imx258.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Sony IMX258 13 Mpixel CMOS Digital Image Sensor
8
9 maintainers:
10   - Krzysztof Kozlowski <krzk@kernel.org>
11
12 description: |-
13   IMX258 is a diagonal 5.867mm (Type 1/3.06) 13 Mega-pixel CMOS active pixel
14   type stacked image sensor with a square pixel array of size 4208 x 3120. It
15   is programmable through I2C interface.  Image data is sent through MIPI
16   CSI-2.
17   There are a number of variants of the sensor which cannot be detected at
18   runtime, so multiple compatible strings are required to differentiate these.
19
20 properties:
21   compatible:
22     const: sony,imx258
23     const: sony,imx258-pdaf
24
25   assigned-clocks: true
26   assigned-clock-parents: true
27   assigned-clock-rates: true
28
29   clocks:
30     description:
31       Clock frequency from 6 to 27 MHz.
32     maxItems: 1
33
34   reg:
35     maxItems: 1
36
37   reset-gpios:
38     description: |-
39       Reference to the GPIO connected to the XCLR pin, if any.
40
41   vana-supply:
42     description:
43       Analog voltage (VANA) supply, 2.7 V
44
45   vdig-supply:
46     description:
47       Digital I/O voltage (VDIG) supply, 1.2 V
48
49   vif-supply:
50     description:
51       Interface voltage (VIF) supply, 1.8 V
52
53   # See ../video-interfaces.txt for more details
54   port:
55     $ref: /schemas/graph.yaml#/$defs/port-base
56     additionalProperties: false
57
58     properties:
59       endpoint:
60         $ref: /schemas/media/video-interfaces.yaml#
61         unevaluatedProperties: false
62
63         properties:
64           data-lanes:
65             oneOf:
66               - items:
67                   - const: 1
68                   - const: 2
69                   - const: 3
70                   - const: 4
71               - items:
72                   - const: 1
73                   - const: 2
74
75           link-frequencies: true
76
77         required:
78           - data-lanes
79           - link-frequencies
80
81 required:
82   - compatible
83   - reg
84   - port
85
86 additionalProperties: false
87
88 examples:
89   - |
90     i2c0 {
91         #address-cells = <1>;
92         #size-cells = <0>;
93
94         sensor@6c {
95             compatible = "sony,imx258";
96             reg = <0x6c>;
97             clocks = <&imx258_clk>;
98
99             port {
100                 endpoint {
101                     remote-endpoint = <&csi1_ep>;
102                     data-lanes = <1 2 3 4>;
103                     link-frequencies = /bits/ 64 <320000000>;
104                 };
105             };
106         };
107     };
108
109     /* Oscillator on the camera board */
110     imx258_clk: clk {
111         compatible = "fixed-clock";
112         #clock-cells = <0>;
113         clock-frequency = <19200000>;
114     };
115
116   - |
117     i2c0 {
118         #address-cells = <1>;
119         #size-cells = <0>;
120
121         sensor@6c {
122             compatible = "sony,imx258";
123             reg = <0x6c>;
124             clocks = <&imx258_clk>;
125
126             assigned-clocks = <&imx258_clk>;
127             assigned-clock-rates = <19200000>;
128
129             port {
130                 endpoint {
131                     remote-endpoint = <&csi1_ep>;
132                     data-lanes = <1 2 3 4>;
133                     link-frequencies = /bits/ 64 <633600000>;
134                 };
135             };
136         };
137     };