Message ID | 20190910130446.26413-2-dongchun.zhu@mediatek.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [V2,1/2] media: dt-bindings: media: i2c: Add bindings for ov8856 | expand |
On Tue, Sep 10, 2019 at 09:04:45PM +0800, dongchun.zhu@mediatek.com wrote: > From: Dongchun Zhu <dongchun.zhu@mediatek.com> > > This patch adds device tree bindings documentation for the ov8856 CMOS > image sensor. New bindings in YAML, please.
On Tue, Sep 10, 2019 at 08:37:43PM +0300, Andy Shevchenko wrote: > On Tue, Sep 10, 2019 at 09:04:45PM +0800, dongchun.zhu@mediatek.com wrote: > > From: Dongchun Zhu <dongchun.zhu@mediatek.com> > > > > This patch adds device tree bindings documentation for the ov8856 CMOS > > image sensor. > > New bindings in YAML, please. My understanding is text documents are still fine. We don't have things like graph.txt or video-interfaces.txt in YAML yet either.
On Tue, Sep 17, 2019 at 03:02:06PM +0300, Sakari Ailus wrote: > On Tue, Sep 10, 2019 at 08:37:43PM +0300, Andy Shevchenko wrote: > > On Tue, Sep 10, 2019 at 09:04:45PM +0800, dongchun.zhu@mediatek.com wrote: > > > From: Dongchun Zhu <dongchun.zhu@mediatek.com> > > > > > > This patch adds device tree bindings documentation for the ov8856 CMOS > > > image sensor. > > > > New bindings in YAML, please. > > My understanding is text documents are still fine. Schema are preferred, but still up to the subsystem for now. > We don't have things like graph.txt or video-interfaces.txt in YAML yet > either. That doesn't really matter too much. You can assume common properties will have a common schema and just define what's device specific. The device specific bindings have to define 'port' or 'port@N' nodes. Rob
Hi Rob, On Tue, 2019-09-17 at 09:44 -0500, Rob Herring wrote: > On Tue, Sep 17, 2019 at 03:02:06PM +0300, Sakari Ailus wrote: > > On Tue, Sep 10, 2019 at 08:37:43PM +0300, Andy Shevchenko wrote: > > > On Tue, Sep 10, 2019 at 09:04:45PM +0800, dongchun.zhu@mediatek.com wrote: > > > > From: Dongchun Zhu <dongchun.zhu@mediatek.com> > > > > > > > > This patch adds device tree bindings documentation for the ov8856 CMOS > > > > image sensor. > > > > > > New bindings in YAML, please. > > > > My understanding is text documents are still fine. > > Schema are preferred, but still up to the subsystem for now. > It seems that there are no bindings in YAML under the path: Documentation/devicetree/bindings/media/i2c. So we would keep the text documents for OV8856. > > We don't have things like graph.txt or video-interfaces.txt in YAML yet > > either. > > That doesn't really matter too much. You can assume common properties > will have a common schema and just define what's device specific. The > device specific bindings have to define 'port' or 'port@N' nodes. > > Rob
Hi Dongchun, On Wed, Oct 30, 2019 at 05:00:23PM +0800, Dongchun Zhu wrote: > Hi Rob, > > On Tue, 2019-09-17 at 09:44 -0500, Rob Herring wrote: > > On Tue, Sep 17, 2019 at 03:02:06PM +0300, Sakari Ailus wrote: > > > On Tue, Sep 10, 2019 at 08:37:43PM +0300, Andy Shevchenko wrote: > > > > On Tue, Sep 10, 2019 at 09:04:45PM +0800, dongchun.zhu@mediatek.com wrote: > > > > > From: Dongchun Zhu <dongchun.zhu@mediatek.com> > > > > > > > > > > This patch adds device tree bindings documentation for the ov8856 CMOS > > > > > image sensor. > > > > > > > > New bindings in YAML, please. > > > > > > My understanding is text documents are still fine. > > > > Schema are preferred, but still up to the subsystem for now. > > > > It seems that there are no bindings in YAML under the path: > Documentation/devicetree/bindings/media/i2c. > So we would keep the text documents for OV8856. That is going to change very soon with the addition of IMX296 bindings: <URL:https://lore.kernel.org/linux-media/20191029220928.GA17996@bogus/T/#mdd27731659215b1e35049892ef82bb6b62e80b61>
diff --git a/Documentation/devicetree/bindings/media/i2c/ov8856.txt b/Documentation/devicetree/bindings/media/i2c/ov8856.txt new file mode 100644 index 0000000..99c654a --- /dev/null +++ b/Documentation/devicetree/bindings/media/i2c/ov8856.txt @@ -0,0 +1,51 @@ +* Omnivision OV8856 MIPI CSI-2 sensor + +Required Properties: +- compatible: Shall be "ovti,ov8856" +- reg: I2C bus address of the device. Depending on how the sensor is wired, + it shall be <0x10>. +- clocks: Reference to the xvclk input clock. +- clock-names: Shall be "xvclk". +- clock-frequency: Frequency of the xclk clock. +- dovdd-supply: Digital I/O voltage supply, 1.8 volts +- avdd-supply: Analog voltage supply, 2.8 volts +- dvdd-supply: Digital core voltage supply, 1.5 volts +- reset-gpios: High active reset gpio + +The device node shall contain one 'port' child node with +an 'endpoint' subnode. For further reading on port node refer to +Documentation/devicetree/bindings/media/video-interfaces.txt. + +Required Properties on endpoint: +- data-lanes: check ../video-interfaces.txt +- link-frequencies: check ../video-interfaces.txt +- remote-endpoint: check ../video-interfaces.txt + +Example: + +&i2c1 { + ov8856: camera-sensor@10 { + compatible = "ovti,ov8856"; + reg = <0x10>; + pinctrl-names = "default"; + pinctrl-0 = <&clk_24m_cam>; + + clocks = <&cru SCLK_TESTCLKOUT1>; + clock-names = "xvclk"; + clock-frequency = <19200000>; + + avdd-supply = <&mt6358_vcama2_reg>; + dvdd-supply = <&mt6358_vcamd_reg>; + dovdd-supply = <&mt6358_vcamio_reg>; + reset-gpios = <&pio 111 GPIO_ACTIVE_HIGH>; + + port { + /* MIPI CSI-2 bus endpoint */ + wcam_out: endpoint { + remote-endpoint = <&mipi_in_wcam>; + data-lanes = <1 2 3 4>; + link-frequencies = /bits/ 64 <360000000 180000000>; + }; + }; + }; +}; diff --git a/MAINTAINERS b/MAINTAINERS index 783569e..7746c6b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -11889,6 +11889,7 @@ L: linux-media@vger.kernel.org T: git git://linuxtv.org/media_tree.git S: Maintained F: drivers/media/i2c/ov8856.c +F: Documentation/devicetree/bindings/media/i2c/ov8856.txt OMNIVISION OV9650 SENSOR DRIVER M: Sakari Ailus <sakari.ailus@linux.intel.com>