Add a device tree binding for the Omnivision OV8858 image sensor. The OV8858 is an 8 megapixel image sensor which provides images in RAW format over MIPI CSI-2 data bus and is controlled through an I2C-compatibile SCCB bus. Tested on PinePhone Pro with libcamera cam and qcam. Signed-off-by: Nicholas Roth <nicholas@xxxxxxxxxxxxx> --- .../devicetree/bindings/media/i2c/ov8858.yaml | 139 ++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/ov8858.yaml diff --git a/Documentation/devicetree/bindings/media/i2c/ov8858.yaml b/Documentation/devicetree/bindings/media/i2c/ov8858.yaml new file mode 100644 index 000000000000..f004e57b05ed --- /dev/null +++ b/Documentation/devicetree/bindings/media/i2c/ov8858.yaml @@ -0,0 +1,139 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/i2c/ov8858.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Omnivision OV8856 CMOS Sensor Device Tree Bindings + +maintainers: + - Nicholas Roth <nicholas@xxxxxxxxxxxxx> + +description: |- + The Omnivision OV8858 is an 8 megapixel image sensor which provides + images in RAW format over MIPI CSI-2 data bus with up to 4 lanes + and is controlled through an I2C-compatibile SCCB bus. + +properties: + compatible: + const: ovti,ov8858 + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + description: + Input clock for the sensor. + items: + - const: xvclk + + clock-frequency: + description: + Frequency of the xvclk clock in Hertz. + minimum: 6000000 + default: 24000000 + maximum: 27000000 + + dovdd-supply: + description: + Definition of the regulator used as interface power supply. + + avdd-supply: + description: + Definition of the regulator used as analog power supply. + + dvdd-supply: + description: + Definition of the regulator used as digital power supply. + + reset-gpios: + description: + The phandle and specifier for the GPIO that controls sensor reset. + This corresponds to the hardware pin XSHUTDN which is physically + active low. + + powerdown-gpios: + description: + The phandle and specifier for the GPIO that controls power down. + This corresponds to the hardware pin PWDNB which is physically + active low. + + port: + $ref: /schemas/graph.yaml#/$defs/port-base + additionalProperties: false + + properties: + endpoint: + $ref: /schemas/media/video-interfaces.yaml# + unevaluatedProperties: false + + properties: + data-lanes: + description: |- + The driver supports both two- and four-lane operation. + items: + - const: 1 + - const: 2 + - const: 3 + - const: 4 + + link-frequencies: + description: Frequencies listed are driver, not h/w limitations. + maxItems: 1 + items: + enum: [ 360000000 ] + + required: + - link-frequencies + +required: + - compatible + - reg + - clocks + - clock-names + - clock-frequency + - dovdd-supply + - avdd-supply + - dvdd-supply + - reset-gpios + - port + +additionalProperties: false + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + ucam: camera@36 { + compatible = "ovti,ov8858"; + reg = <0x36>; + + reset-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>; + powerdown-gpios = <&gpio2 2 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&ucam_pdn &ucam_rst>; + + clocks = <&cam_osc>; + clock-names = "xvclk"; + clock-frequency = <24000000>; + + dovdd-supply = <&vcc1v8_dvp>; + dvdd-supply = <&vcc1v2_dvp>; + avdd-supply = <&vcc2v8_dvp>; + + port { + ucam_out: endpoint { + remote-endpoint = <&mipi_in_ucam>; + data-lanes = <1 2 3 4>; + link-frequencies = /bits/ 64 <360000000>; + }; + }; + }; + }; -- 2.34.1