diff mbox series

[2/7] dt-bindings: media: i2c: Add documentation for ov8865

Message ID 20200821145935.20346-3-kevin.lhopital@bootlin.com
State Superseded, archived
Headers show
Series Support of MIPI CSI-2 for A83T and OV8865 camera | expand

Checks

Context Check Description
robh/checkpatch warning total: 0 errors, 1 warnings, 51 lines checked

Commit Message

Kévin L'hôpital Aug. 21, 2020, 2:59 p.m. UTC
Add a documentation for the sensor ov8865 from Omnivision.

Signed-off-by: Kévin L'hôpital <kevin.lhopital@bootlin.com>
---
 .../devicetree/bindings/media/i2c/ov8865.txt  | 51 +++++++++++++++++++
 1 file changed, 51 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/i2c/ov8865.txt

Comments

Maxime Ripard Aug. 24, 2020, 4:59 p.m. UTC | #1
Hi,

On Fri, Aug 21, 2020 at 04:59:30PM +0200, Kévin L'hôpital wrote:
> Add a documentation for the sensor ov8865 from Omnivision.
> 
> Signed-off-by: Kévin L'hôpital <kevin.lhopital@bootlin.com>

In order to ease the submission of both drivers, you should probably
split this series into two, one with the MIPI-CSI driver, and one with
the ov8865 driver.

> ---
>  .../devicetree/bindings/media/i2c/ov8865.txt  | 51 +++++++++++++++++++
>  1 file changed, 51 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/media/i2c/ov8865.txt
> 
> diff --git a/Documentation/devicetree/bindings/media/i2c/ov8865.txt b/Documentation/devicetree/bindings/media/i2c/ov8865.txt
> new file mode 100644
> index 000000000000..ac5a662288de
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/i2c/ov8865.txt
> @@ -0,0 +1,51 @@
> +* Omnivision OV8865 MIPI CSI-2
> +
> +Required Properties:
> +- compatible: should be "ovti,ov8865"
> +- clocks: reference to the xclk input clock.
> +- clock-names: should be "xclk".
> +- DOVDD-supply: Digital I/O voltage supply, 2.8 volts
> +- AVDD-supply: Analog voltage supply, 2.8 volts
> +- AFVDD-supply: Analog voltage supply, 2.8 volts
> +- DVDD-supply: Digital core voltage supply, 1.2 volts
> +- reset-gpios: reference to the GPIO connected to the reset pin.
> +	       This is an active low signal to the OV8865.
> +- powerdown-gpios: reference to the GPIO connected to the powerdown pin.
> +		   This is an active low signal to the OV8865.
> +- rotation: as defined in
> +	    Documentation/devicetree/bindings/media/video-interfaces.txt,
> +	    valid values are 0 (sensor mounted upright) and 180 (sensor
> +	    mounted upside down).
> +- remote-endpoint: a phandle to the bus receiver's endpoint node.
> +- clock-lanes: should be set to <0> (clock lane on hardware lane 0).
> +- data-lanes: should be set to <4> (four CSI-2 lanes supported).
> +
> +The device node must contain one 'port' child node for its digital output video
> +port, in accordance with the video interface bindings defined in
> +Documentation/devicetree/bindings/media/video-interfaces.txt.

Free form DT documentation is deprecated nowadays, you should be doing a
YAML schema instead (like the ov8856 driver).

Maxime
Kévin L'hôpital Aug. 25, 2020, 3:17 p.m. UTC | #2
Hello,

Le Mon, 24 Aug 2020 18:59:10 +0200,
Maxime Ripard <maxime@cerno.tech> a écrit :

> Hi,
> 
> On Fri, Aug 21, 2020 at 04:59:30PM +0200, Kévin L'hôpital wrote:
> > Add a documentation for the sensor ov8865 from Omnivision.
> > 
> > Signed-off-by: Kévin L'hôpital <kevin.lhopital@bootlin.com>  
> 
> In order to ease the submission of both drivers, you should probably
> split this series into two, one with the MIPI-CSI driver, and one with
> the ov8865 driver.
> 

Yes, you are right. I will do this.

> > ---
> >  .../devicetree/bindings/media/i2c/ov8865.txt  | 51
> > +++++++++++++++++++ 1 file changed, 51 insertions(+)
> >  create mode 100644
> > Documentation/devicetree/bindings/media/i2c/ov8865.txt
> > 
> > diff --git a/Documentation/devicetree/bindings/media/i2c/ov8865.txt
> > b/Documentation/devicetree/bindings/media/i2c/ov8865.txt new file
> > mode 100644 index 000000000000..ac5a662288de
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/media/i2c/ov8865.txt
> > @@ -0,0 +1,51 @@
> > +* Omnivision OV8865 MIPI CSI-2
> > +
> > +Required Properties:
> > +- compatible: should be "ovti,ov8865"
> > +- clocks: reference to the xclk input clock.
> > +- clock-names: should be "xclk".
> > +- DOVDD-supply: Digital I/O voltage supply, 2.8 volts
> > +- AVDD-supply: Analog voltage supply, 2.8 volts
> > +- AFVDD-supply: Analog voltage supply, 2.8 volts
> > +- DVDD-supply: Digital core voltage supply, 1.2 volts
> > +- reset-gpios: reference to the GPIO connected to the reset pin.
> > +	       This is an active low signal to the OV8865.
> > +- powerdown-gpios: reference to the GPIO connected to the
> > powerdown pin.
> > +		   This is an active low signal to the OV8865.
> > +- rotation: as defined in
> > +
> > Documentation/devicetree/bindings/media/video-interfaces.txt,
> > +	    valid values are 0 (sensor mounted upright) and 180
> > (sensor
> > +	    mounted upside down).
> > +- remote-endpoint: a phandle to the bus receiver's endpoint node.
> > +- clock-lanes: should be set to <0> (clock lane on hardware lane
> > 0). +- data-lanes: should be set to <4> (four CSI-2 lanes
> > supported). +
> > +The device node must contain one 'port' child node for its digital
> > output video +port, in accordance with the video interface bindings
> > defined in
> > +Documentation/devicetree/bindings/media/video-interfaces.txt.  
> 
> Free form DT documentation is deprecated nowadays, you should be
> doing a YAML schema instead (like the ov8856 driver).
> 

All right, I will do a YAML schema.

> Maxime

Thank you very much for the review.
Kévin
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/media/i2c/ov8865.txt b/Documentation/devicetree/bindings/media/i2c/ov8865.txt
new file mode 100644
index 000000000000..ac5a662288de
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/i2c/ov8865.txt
@@ -0,0 +1,51 @@ 
+* Omnivision OV8865 MIPI CSI-2
+
+Required Properties:
+- compatible: should be "ovti,ov8865"
+- clocks: reference to the xclk input clock.
+- clock-names: should be "xclk".
+- DOVDD-supply: Digital I/O voltage supply, 2.8 volts
+- AVDD-supply: Analog voltage supply, 2.8 volts
+- AFVDD-supply: Analog voltage supply, 2.8 volts
+- DVDD-supply: Digital core voltage supply, 1.2 volts
+- reset-gpios: reference to the GPIO connected to the reset pin.
+	       This is an active low signal to the OV8865.
+- powerdown-gpios: reference to the GPIO connected to the powerdown pin.
+		   This is an active low signal to the OV8865.
+- rotation: as defined in
+	    Documentation/devicetree/bindings/media/video-interfaces.txt,
+	    valid values are 0 (sensor mounted upright) and 180 (sensor
+	    mounted upside down).
+- remote-endpoint: a phandle to the bus receiver's endpoint node.
+- clock-lanes: should be set to <0> (clock lane on hardware lane 0).
+- data-lanes: should be set to <4> (four CSI-2 lanes supported).
+
+The device node must contain one 'port' child node for its digital output video
+port, in accordance with the video interface bindings defined in
+Documentation/devicetree/bindings/media/video-interfaces.txt.
+
+Example:
+&i2c2 {
+	ov8865: camera@36 {
+                 compatible = "ovti,ov8865";
+                 reg = <0x36>;
+                 clocks = <&ccu CLK_CSI_MCLK>;
+                 clock-names ="xclk";
+                 AVDD-supply = <&reg_ov8865_avdd>;
+                 DOVDD-supply = <&reg_ov8865_dovdd>;
+                 VDD2-supply = <&reg_ov8865_vdd2>;
+                 AFVDD-supply = <&reg_ov8865_afvdd>;
+                 powerdown-gpios = <&pio 4 17 GPIO_ACTIVE_LOW>; /* PE17 */
+                 reset-gpios = <&pio 4 16 GPIO_ACTIVE_LOW>; /* PE16 */
+                 rotation = <180>;
+
+                 port {
+                         ov8865_to_mipi_csi2: endpoint {
+                                 remote-endpoint = <&mipi_csi2_from_ov8865>;
+                                 data-lanes = <1 2 3 4>;
+                                 clock-lanes = <0>;
+                                 bus-type = <4>; /* V4L2_FWNODE_BUS_TYPE_CSI2_DPHY */
+                         };
+		};
+	};
+};