xref: /linux/Documentation/devicetree/bindings/media/i2c/sony,imx258.yaml (revision 0cdee263bc5e7b20f657ea09f9272f50c568f35b)
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/sony,imx258.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Sony IMX258 13 Mpixel CMOS Digital Image Sensor
8
9maintainers:
10  - Krzysztof Kozlowski <krzk@kernel.org>
11
12description: |-
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. The sensor exists in two different models, a standard variant
17  (IMX258) and a variant with phase detection autofocus (IMX258-PDAF).
18  The camera module does not expose the model through registers, so the
19  exact model needs to be specified.
20
21$ref: /schemas/media/video-interface-devices.yaml#
22
23properties:
24  compatible:
25    enum:
26      - sony,imx258
27      - sony,imx258-pdaf
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
81required:
82  - compatible
83  - reg
84  - port
85
86unevaluatedProperties: false
87
88examples:
89  - |
90    i2c {
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    i2c {
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            port {
127                endpoint {
128                    remote-endpoint = <&csi1_ep>;
129                    data-lanes = <1 2 3 4>;
130                    link-frequencies = /bits/ 64 <633600000>;
131                };
132            };
133        };
134    };
135