Add bindings for the already upstream OV08X40 to enable usage of this
sensor on dts based systems.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
.../bindings/media/i2c/ovti,ov08x40.yaml | 130 +++++++++++++++++++++
1 file changed, 130 insertions(+)
diff --git a/Documentation/devicetree/bindings/media/i2c/ovti,ov08x40.yaml b/Documentation/devicetree/bindings/media/i2c/ovti,ov08x40.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..250785f062d0146e8615d8f3e7700aebbd40b1dc
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/i2c/ovti,ov08x40.yaml
@@ -0,0 +1,130 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright (c) 2024 Linaro Ltd.
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/i2c/ovti,ov08x40.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Omnivision OV08X40 CMOS Sensor
+
+maintainers:
+ - Bryan O'Donoghue <bryan.odonoghue@linaro.org>
+
+description: |-
+ The Omnivision OV08X40 is a 9.2 megapixel, CMOS image sensor which supports.
+ - Automatic black level calibration (ABLC)
+ - Programmable controls for frame rate, mirror and flip, binning, cropping
+ and windowing
+ - Output formats 10-bit 4C RGB RAW, 10-bit Bayer RAW
+ - 4-lane MIPI D-PHY TX @ 1 Gbps per lane
+ - 2-lane MPIP D-PHY TX @ 2 Gbps per lane
+ - Dynamic defect pixel cancellation
+ - Standard SCCB command interface
+
+properties:
+ compatible:
+ const: ovti,ov08x40
+
+ 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.
+
+ avdd-supply:
+ description: Analogue circuit voltage supply.
+
+ dovdd-supply:
+ description: I/O circuit voltage supply.
+
+ dvdd-supply:
+ description: Digital circuit voltage supply.
+
+ reset-gpios:
+ description: Active low GPIO connected to XSHUTDOWN pad of the sensor.
+
+ port:
+ $ref: /schemas/graph.yaml#/$defs/port-base
+ additionalProperties: false
+
+ properties:
+ endpoint:
+ $ref: /schemas/media/video-interfaces.yaml#
+ unevaluatedProperties: false
+
+ properties:
+ data-lanes:
+ oneOf:
+ - items:
+ - const: 1
+ - const: 2
+ - items:
+ - const: 1
+ - const: 2
+ - const: 3
+ - const: 4
+
+ link-frequencies: true
+
+ required:
+ - data-lanes
+ - 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>;
+
+ ov08x40: camera@36 {
+ compatible = "ovti,ov08x40";
+ reg = <0x36>;
+
+ reset-gpios = <&tlmm 111 GPIO_ACTIVE_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&cam_rgb_defaultt>;
+
+ clocks = <&ov08x40_clk>;
+ clock-names = "xvclk";
+ clock-frequency = <19200000>;
+
+ avdd-supply = <&vreg_l7b_2p8>;
+ dvdd-supply = <&vreg_l7b_1p8>;
+ dovdd-supply = <&vreg_l3m_1p8>;
+
+ port {
+ ov08x40_ep: endpoint {
+ remote-endpoint = <&csiphy4_ep>;
+ data-lanes = <1 2 3 4>;
+ link-frequencies = /bits/ 64 <400000000>;
+ };
+ };
+ };
+ };
+...
--
2.46.2
On Thu, Sep 26, 2024 at 04:46:38PM +0100, Bryan O'Donoghue wrote: > Add bindings for the already upstream OV08X40 to enable usage of this > sensor on dts based systems. s/dts/DT/ > > Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> > --- > .../bindings/media/i2c/ovti,ov08x40.yaml | 130 +++++++++++++++++++++ > 1 file changed, 130 insertions(+) > > diff --git a/Documentation/devicetree/bindings/media/i2c/ovti,ov08x40.yaml b/Documentation/devicetree/bindings/media/i2c/ovti,ov08x40.yaml > new file mode 100644 > index 0000000000000000000000000000000000000000..250785f062d0146e8615d8f3e7700aebbd40b1dc > --- /dev/null > +++ b/Documentation/devicetree/bindings/media/i2c/ovti,ov08x40.yaml > @@ -0,0 +1,130 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +# Copyright (c) 2024 Linaro Ltd. > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/media/i2c/ovti,ov08x40.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Omnivision OV08X40 CMOS Sensor > + > +maintainers: > + - Bryan O'Donoghue <bryan.odonoghue@linaro.org> > + > +description: |- Drop the '-'. > + The Omnivision OV08X40 is a 9.2 megapixel, CMOS image sensor which supports. supports: > + - Automatic black level calibration (ABLC) > + - Programmable controls for frame rate, mirror and flip, binning, cropping > + and windowing > + - Output formats 10-bit 4C RGB RAW, 10-bit Bayer RAW > + - 4-lane MIPI D-PHY TX @ 1 Gbps per lane > + - 2-lane MPIP D-PHY TX @ 2 Gbps per lane > + - Dynamic defect pixel cancellation > + - Standard SCCB command interface > +
Hi Bryan, Thanks for the set. On Thu, Sep 26, 2024 at 04:46:38PM +0100, Bryan O'Donoghue wrote: > Add bindings for the already upstream OV08X40 to enable usage of this > sensor on dts based systems. > > Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> > --- > .../bindings/media/i2c/ovti,ov08x40.yaml | 130 +++++++++++++++++++++ > 1 file changed, 130 insertions(+) > > diff --git a/Documentation/devicetree/bindings/media/i2c/ovti,ov08x40.yaml b/Documentation/devicetree/bindings/media/i2c/ovti,ov08x40.yaml > new file mode 100644 > index 0000000000000000000000000000000000000000..250785f062d0146e8615d8f3e7700aebbd40b1dc > --- /dev/null > +++ b/Documentation/devicetree/bindings/media/i2c/ovti,ov08x40.yaml > @@ -0,0 +1,130 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +# Copyright (c) 2024 Linaro Ltd. > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/media/i2c/ovti,ov08x40.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Omnivision OV08X40 CMOS Sensor > + > +maintainers: > + - Bryan O'Donoghue <bryan.odonoghue@linaro.org> > + > +description: |- > + The Omnivision OV08X40 is a 9.2 megapixel, CMOS image sensor which supports. > + - Automatic black level calibration (ABLC) > + - Programmable controls for frame rate, mirror and flip, binning, cropping > + and windowing > + - Output formats 10-bit 4C RGB RAW, 10-bit Bayer RAW > + - 4-lane MIPI D-PHY TX @ 1 Gbps per lane > + - 2-lane MPIP D-PHY TX @ 2 Gbps per lane > + - Dynamic defect pixel cancellation > + - Standard SCCB command interface > + > +properties: > + compatible: > + const: ovti,ov08x40 > + > + reg: > + maxItems: 1 > + > + clocks: > + maxItems: 1 > + > + clock-names: > + description: > + Input clock for the sensor. > + items: > + - const: xvclk This seems redundant. > + > + clock-frequency: > + description: > + Frequency of the xvclk clock in Hertz. Could you instead use the frequency already set, using assigned-clock* in the example? > + > + avdd-supply: > + description: Analogue circuit voltage supply. > + > + dovdd-supply: > + description: I/O circuit voltage supply. > + > + dvdd-supply: > + description: Digital circuit voltage supply. > + > + reset-gpios: > + description: Active low GPIO connected to XSHUTDOWN pad of the sensor. > + > + port: > + $ref: /schemas/graph.yaml#/$defs/port-base > + additionalProperties: false > + > + properties: > + endpoint: > + $ref: /schemas/media/video-interfaces.yaml# > + unevaluatedProperties: false > + > + properties: > + data-lanes: > + oneOf: > + - items: > + - const: 1 > + - const: 2 > + - items: > + - const: 1 > + - const: 2 > + - const: 3 > + - const: 4 > + > + link-frequencies: true > + > + required: > + - data-lanes > + - 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>; > + > + ov08x40: camera@36 { > + compatible = "ovti,ov08x40"; > + reg = <0x36>; > + > + reset-gpios = <&tlmm 111 GPIO_ACTIVE_LOW>; > + pinctrl-names = "default"; > + pinctrl-0 = <&cam_rgb_defaultt>; > + > + clocks = <&ov08x40_clk>; > + clock-names = "xvclk"; > + clock-frequency = <19200000>; > + > + avdd-supply = <&vreg_l7b_2p8>; > + dvdd-supply = <&vreg_l7b_1p8>; > + dovdd-supply = <&vreg_l3m_1p8>; > + > + port { > + ov08x40_ep: endpoint { > + remote-endpoint = <&csiphy4_ep>; > + data-lanes = <1 2 3 4>; > + link-frequencies = /bits/ 64 <400000000>; > + }; > + }; > + }; > + }; > +... > -- Kind regards, Sakari Ailus
On 26/09/2024 16:53, Sakari Ailus wrote: >> + - const: xvclk > This seems redundant. Right so you're saying you'd prefer something like this drivers/media/i2c/ov8865.c I can drop the dependency on "xvclk" as a dependency in this series. >> + >> + clock-frequency: >> + description: >> + Frequency of the xvclk clock in Hertz. > Could you instead use the frequency already set, using assigned-clock* in > the example? Almost certainly yes. Yeah, I do that so. --- bod
On 27/09/2024 01:31, Bryan O'Donoghue wrote: > On 26/09/2024 16:53, Sakari Ailus wrote: >>> + - const: xvclk >> This seems redundant. > > Right so you're saying you'd prefer something like this > > drivers/media/i2c/ov8865.c > > I can drop the dependency on "xvclk" as a dependency in this series. Not sure what do you mean here. Drop the clock-names and clock-frequency. Both are redundant. You should almost never have a clock-frequency in your device bindings. Best regards, Krzysztof
© 2016 - 2024 Red Hat, Inc.