Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 1 | # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 | %YAML 1.2 |
| 3 | --- |
Tom Rini | 6b642ac | 2024-10-01 12:20:28 -0600 | [diff] [blame] | 4 | $id: http://devicetree.org/schemas/media/i2c/sony,imx258.yaml# |
Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 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 |
Tom Rini | 6b642ac | 2024-10-01 12:20:28 -0600 | [diff] [blame] | 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. |
Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 20 | |
| 21 | properties: |
| 22 | compatible: |
Tom Rini | 6b642ac | 2024-10-01 12:20:28 -0600 | [diff] [blame] | 23 | enum: |
| 24 | - sony,imx258 |
| 25 | - sony,imx258-pdaf |
Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 26 | |
| 27 | assigned-clocks: true |
| 28 | assigned-clock-parents: true |
| 29 | assigned-clock-rates: true |
| 30 | |
| 31 | clocks: |
| 32 | description: |
| 33 | Clock frequency from 6 to 27 MHz. |
| 34 | maxItems: 1 |
| 35 | |
| 36 | reg: |
| 37 | maxItems: 1 |
| 38 | |
| 39 | reset-gpios: |
| 40 | description: |- |
| 41 | Reference to the GPIO connected to the XCLR pin, if any. |
| 42 | |
| 43 | vana-supply: |
| 44 | description: |
| 45 | Analog voltage (VANA) supply, 2.7 V |
| 46 | |
| 47 | vdig-supply: |
| 48 | description: |
| 49 | Digital I/O voltage (VDIG) supply, 1.2 V |
| 50 | |
| 51 | vif-supply: |
| 52 | description: |
| 53 | Interface voltage (VIF) supply, 1.8 V |
| 54 | |
| 55 | # See ../video-interfaces.txt for more details |
| 56 | port: |
| 57 | $ref: /schemas/graph.yaml#/$defs/port-base |
| 58 | additionalProperties: false |
| 59 | |
| 60 | properties: |
| 61 | endpoint: |
| 62 | $ref: /schemas/media/video-interfaces.yaml# |
| 63 | unevaluatedProperties: false |
| 64 | |
| 65 | properties: |
| 66 | data-lanes: |
| 67 | oneOf: |
| 68 | - items: |
| 69 | - const: 1 |
| 70 | - const: 2 |
| 71 | - const: 3 |
| 72 | - const: 4 |
| 73 | - items: |
| 74 | - const: 1 |
| 75 | - const: 2 |
| 76 | |
| 77 | link-frequencies: true |
| 78 | |
| 79 | required: |
| 80 | - data-lanes |
| 81 | - link-frequencies |
| 82 | |
| 83 | required: |
| 84 | - compatible |
| 85 | - reg |
| 86 | - port |
| 87 | |
| 88 | additionalProperties: false |
| 89 | |
| 90 | examples: |
| 91 | - | |
| 92 | i2c { |
| 93 | #address-cells = <1>; |
| 94 | #size-cells = <0>; |
| 95 | |
| 96 | sensor@6c { |
| 97 | compatible = "sony,imx258"; |
| 98 | reg = <0x6c>; |
| 99 | clocks = <&imx258_clk>; |
| 100 | |
| 101 | port { |
| 102 | endpoint { |
| 103 | remote-endpoint = <&csi1_ep>; |
| 104 | data-lanes = <1 2 3 4>; |
| 105 | link-frequencies = /bits/ 64 <320000000>; |
| 106 | }; |
| 107 | }; |
| 108 | }; |
| 109 | }; |
| 110 | |
| 111 | /* Oscillator on the camera board */ |
| 112 | imx258_clk: clk { |
| 113 | compatible = "fixed-clock"; |
| 114 | #clock-cells = <0>; |
| 115 | clock-frequency = <19200000>; |
| 116 | }; |
| 117 | |
| 118 | - | |
| 119 | i2c { |
| 120 | #address-cells = <1>; |
| 121 | #size-cells = <0>; |
| 122 | |
| 123 | sensor@6c { |
| 124 | compatible = "sony,imx258"; |
| 125 | reg = <0x6c>; |
| 126 | clocks = <&imx258_clk>; |
| 127 | |
| 128 | assigned-clocks = <&imx258_clk>; |
| 129 | assigned-clock-rates = <19200000>; |
| 130 | |
| 131 | port { |
| 132 | endpoint { |
| 133 | remote-endpoint = <&csi1_ep>; |
| 134 | data-lanes = <1 2 3 4>; |
| 135 | link-frequencies = /bits/ 64 <633600000>; |
| 136 | }; |
| 137 | }; |
| 138 | }; |
| 139 | }; |