[v4] media: et8ek8: add device tree binding documentation

Message ID 20161023191706.GA25754@amd (mailing list archive)
State Superseded, archived
Headers

Commit Message

Pavel Machek Oct. 23, 2016, 7:17 p.m. UTC
  Add device tree binding documentation for toshiba et8ek8 sensor.

Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>

---
  

Comments

Sakari Ailus Oct. 23, 2016, 8:06 p.m. UTC | #1
Hi Pavel,

On Sun, Oct 23, 2016 at 09:17:06PM +0200, Pavel Machek wrote:
> 
> Add device tree binding documentation for toshiba et8ek8 sensor.

How about the et8ek8 driver itself? And the N900 DT snippet? What's their
status?
  
Rob Herring Oct. 30, 2016, 8:41 p.m. UTC | #2
On Sun, Oct 23, 2016 at 09:17:06PM +0200, Pavel Machek wrote:
> 
> Add device tree binding documentation for toshiba et8ek8 sensor.
> 
> Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
> Signed-off-by: Pavel Machek <pavel@ucw.cz>
> 
> ---
> 
> diff from v3: explain what clock-frequency means
> 
> 
> diff --git a/Documentation/devicetree/bindings/media/i2c/toshiba,et8ek8.txt b/Documentation/devicetree/bindings/media/i2c/toshiba,et8ek8.txt
> new file mode 100644
> index 0000000..54863cf
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/i2c/toshiba,et8ek8.txt
> @@ -0,0 +1,51 @@
> +Toshiba et8ek8 5MP sensor
> +
> +Toshiba et8ek8 5MP sensor is an image sensor found in Nokia N900 device
> +
> +More detailed documentation can be found in
> +Documentation/devicetree/bindings/media/video-interfaces.txt .
> +
> +
> +Mandatory properties
> +--------------------
> +
> +- compatible: "toshiba,et8ek8"
> +- reg: I2C address (0x3e, or an alternative address)
> +- vana-supply: Analogue voltage supply (VANA), 2.8 volts
> +- clocks: External clock to the sensor
> +- clock-frequency: Frequency of the external clock to the sensor. Camera
> +  driver will set this frequency on the external clock.

This is fine if the frequency is fixed (e.g. an oscillator), but you 
should use the clock binding if clocks are programable.

> +- reset-gpios: XSHUTDOWN GPIO

Please state what the active polarity is.

> +
> +
> +Endpoint node mandatory properties
> +----------------------------------
> +
> +- remote-endpoint: A phandle to the bus receiver's endpoint node.
> +
> +Endpoint node optional properties
> +----------------------------------
> +
> +- clock-lanes: <0>
> +- data-lanes: <1..n>
> +
> +Example
> +-------
> +
> +&i2c3 {
> +	clock-frequency = <400000>;
> +
> +	cam1: camera@3e {
> +		compatible = "toshiba,et8ek8";
> +		reg = <0x3e>;
> +		vana-supply = <&vaux4>;
> +		clocks = <&isp 0>;
> +		clock-frequency = <9600000>;
> +		reset-gpio = <&gpio4 6 GPIO_ACTIVE_HIGH>; /* 102 */
> +		port {
> +			csi_cam1: endpoint {
> +				remote-endpoint = <&csi_out1>;
> +			};
> +		};
> +	};
> +};
> 
> -- 
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
Sakari Ailus Oct. 31, 2016, 10:47 p.m. UTC | #3
Hi Rob and Pavel,

On Sun, Oct 30, 2016 at 03:41:34PM -0500, Rob Herring wrote:
> On Sun, Oct 23, 2016 at 09:17:06PM +0200, Pavel Machek wrote:
> > 
> > Add device tree binding documentation for toshiba et8ek8 sensor.
> > 
> > Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
> > Signed-off-by: Pavel Machek <pavel@ucw.cz>
> > 
> > ---
> > 
> > diff from v3: explain what clock-frequency means
> > 
> > 
> > diff --git a/Documentation/devicetree/bindings/media/i2c/toshiba,et8ek8.txt b/Documentation/devicetree/bindings/media/i2c/toshiba,et8ek8.txt
> > new file mode 100644
> > index 0000000..54863cf
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/media/i2c/toshiba,et8ek8.txt
> > @@ -0,0 +1,51 @@
> > +Toshiba et8ek8 5MP sensor
> > +
> > +Toshiba et8ek8 5MP sensor is an image sensor found in Nokia N900 device
> > +
> > +More detailed documentation can be found in
> > +Documentation/devicetree/bindings/media/video-interfaces.txt .
> > +
> > +
> > +Mandatory properties
> > +--------------------
> > +
> > +- compatible: "toshiba,et8ek8"
> > +- reg: I2C address (0x3e, or an alternative address)
> > +- vana-supply: Analogue voltage supply (VANA), 2.8 volts
> > +- clocks: External clock to the sensor
> > +- clock-frequency: Frequency of the external clock to the sensor. Camera
> > +  driver will set this frequency on the external clock.
> 
> This is fine if the frequency is fixed (e.g. an oscillator), but you 
> should use the clock binding if clocks are programable.

We've discussed the matter here (v3):

<URL:http://www.spinics.net/lists/linux-media/msg101210.html>

<URL:http://www.spinics.net/lists/linux-media/msg101233.html>

Pavel, could you add to the desciption e.g.:

"The clock frequency is a pre-determined frequency known to be suitable to
the board."
  
Pavel Machek Nov. 3, 2016, 12:47 p.m. UTC | #4
Hi!

> > +Mandatory properties
> > +--------------------
> > +
> > +- compatible: "toshiba,et8ek8"
> > +- reg: I2C address (0x3e, or an alternative address)
> > +- vana-supply: Analogue voltage supply (VANA), 2.8 volts
> > +- clocks: External clock to the sensor
> > +- clock-frequency: Frequency of the external clock to the sensor. Camera
> > +  driver will set this frequency on the external clock.
> 
> This is fine if the frequency is fixed (e.g. an oscillator), but you 
> should use the clock binding if clocks are programable.

It is fixed. So I assume this can stay as is? Or do you want me to add
"The clock frequency is a pre-determined frequency known to be
suitable to the board." as Sakari suggests?

> > +- reset-gpios: XSHUTDOWN GPIO
> 
> Please state what the active polarity is.

As in "This gpio will be set to 1 when the chip is powered." ?

Thanks,
									Pavel
  
Sakari Ailus Nov. 3, 2016, 10:20 p.m. UTC | #5
Hi Pavel and Rob,

On Thu, Nov 03, 2016 at 01:47:49PM +0100, Pavel Machek wrote:
> Hi!
> 
> > > +Mandatory properties
> > > +--------------------
> > > +
> > > +- compatible: "toshiba,et8ek8"
> > > +- reg: I2C address (0x3e, or an alternative address)
> > > +- vana-supply: Analogue voltage supply (VANA), 2.8 volts
> > > +- clocks: External clock to the sensor
> > > +- clock-frequency: Frequency of the external clock to the sensor. Camera
> > > +  driver will set this frequency on the external clock.
> > 
> > This is fine if the frequency is fixed (e.g. an oscillator), but you 
> > should use the clock binding if clocks are programable.
> 
> It is fixed. So I assume this can stay as is? Or do you want me to add
> "The clock frequency is a pre-determined frequency known to be
> suitable to the board." as Sakari suggests?
> 
> > > +- reset-gpios: XSHUTDOWN GPIO
> > 
> > Please state what the active polarity is.
> 
> As in "This gpio will be set to 1 when the chip is powered." ?

How about:

"The XSHUTDOWN signal is active high. The sensor is in hardware standby
mode when the signal is in low state."

These bindings start looking more precise than the smiapp ones. :-)
  
Pavel Machek Nov. 7, 2016, 10:36 a.m. UTC | #6
On Fri 2016-11-04 00:20:14, Sakari Ailus wrote:
> Hi Pavel and Rob,
> 
> On Thu, Nov 03, 2016 at 01:47:49PM +0100, Pavel Machek wrote:
> > Hi!
> > 
> > > > +Mandatory properties
> > > > +--------------------
> > > > +
> > > > +- compatible: "toshiba,et8ek8"
> > > > +- reg: I2C address (0x3e, or an alternative address)
> > > > +- vana-supply: Analogue voltage supply (VANA), 2.8 volts
> > > > +- clocks: External clock to the sensor
> > > > +- clock-frequency: Frequency of the external clock to the sensor. Camera
> > > > +  driver will set this frequency on the external clock.
> > > 
> > > This is fine if the frequency is fixed (e.g. an oscillator), but you 
> > > should use the clock binding if clocks are programable.
> > 
> > It is fixed. So I assume this can stay as is? Or do you want me to add
> > "The clock frequency is a pre-determined frequency known to be
> > suitable to the board." as Sakari suggests?

Rob?
								Pavel

> > > > +- reset-gpios: XSHUTDOWN GPIO
> > > 
> > > Please state what the active polarity is.
> > 
> > As in "This gpio will be set to 1 when the chip is powered." ?
> 
> How about:
> 
> "The XSHUTDOWN signal is active high. The sensor is in hardware standby
> mode when the signal is in low state."
> 
> These bindings start looking more precise than the smiapp ones. :-)
>
  

Patch

diff from v3: explain what clock-frequency means


diff --git a/Documentation/devicetree/bindings/media/i2c/toshiba,et8ek8.txt b/Documentation/devicetree/bindings/media/i2c/toshiba,et8ek8.txt
new file mode 100644
index 0000000..54863cf
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/i2c/toshiba,et8ek8.txt
@@ -0,0 +1,51 @@ 
+Toshiba et8ek8 5MP sensor
+
+Toshiba et8ek8 5MP sensor is an image sensor found in Nokia N900 device
+
+More detailed documentation can be found in
+Documentation/devicetree/bindings/media/video-interfaces.txt .
+
+
+Mandatory properties
+--------------------
+
+- compatible: "toshiba,et8ek8"
+- reg: I2C address (0x3e, or an alternative address)
+- vana-supply: Analogue voltage supply (VANA), 2.8 volts
+- clocks: External clock to the sensor
+- clock-frequency: Frequency of the external clock to the sensor. Camera
+  driver will set this frequency on the external clock.
+- reset-gpios: XSHUTDOWN GPIO
+
+
+Endpoint node mandatory properties
+----------------------------------
+
+- remote-endpoint: A phandle to the bus receiver's endpoint node.
+
+Endpoint node optional properties
+----------------------------------
+
+- clock-lanes: <0>
+- data-lanes: <1..n>
+
+Example
+-------
+
+&i2c3 {
+	clock-frequency = <400000>;
+
+	cam1: camera@3e {
+		compatible = "toshiba,et8ek8";
+		reg = <0x3e>;
+		vana-supply = <&vaux4>;
+		clocks = <&isp 0>;
+		clock-frequency = <9600000>;
+		reset-gpio = <&gpio4 6 GPIO_ACTIVE_HIGH>; /* 102 */
+		port {
+			csi_cam1: endpoint {
+				remote-endpoint = <&csi_out1>;
+			};
+		};
+	};
+};