Skip to contentSkip to conversation

media: et8ek8: add device tree binding documentation

PATCH Superseded Pavel Machek 3 participants 14 messages Oct 23, 2016 – Dec 21, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 media: et8ek8: add device tree binding documentation

Add device tree binding documentation for toshiba et8ek8 sensor.

---

diff from v3: explain what clock-frequency means

Documentation/devicetree/bindings/media/i2c/toshiba,et8ek8.txt new file +51 -0
new file mode 100644
index 0000000..54863cf
@@ -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>;
+			};
+		};
+	};
+};
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#1 lore raw

Hi Pavel,

Quoted 2 lines · Pavel Machek

Add device tree binding documentation for toshiba et8ek8 sensor.

How about the et8ek8 driver itself? And the N900 DT snippet? What's their status?

Signature · 4 lines
Kind regards,

Sakari Ailus
e-mail: [email protected]	XMPP: [email protected]
maintainer
#2 lore raw
In reply to Pavel Machek
Quoted 24 lines · Pavel Machek

Add device tree binding documentation for toshiba et8ek8 sensor.

---

diff from v3: explain what clock-frequency means

Documentation/devicetree/bindings/media/i2c/toshiba,et8ek8.txt new file +7 -0
new file mode 100644
index 0000000..54863cf
@@ -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 .
+

Documentation/devicetree/bindings/media/i2c/toshiba,et8ek8.txt line 17

Quoted 10 lines
Documentation/devicetree/bindings/media/i2c/toshiba,et8ek8.txt new file +10 -0
+
+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.

Documentation/devicetree/bindings/media/i2c/toshiba,et8ek8.txt line 18

Quoted 1 line
Documentation/devicetree/bindings/media/i2c/toshiba,et8ek8.txt new file +1 -0
+- reset-gpios: XSHUTDOWN GPIO

Please state what the active polarity is.

Quoted 37 lines
Documentation/devicetree/bindings/media/i2c/toshiba,et8ek8.txt new file +33 -0
+
+
+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>;
+			};
+		};
+	};
+};
Signature · 3 lines
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#3 lore raw

Hi Rob and Pavel,

Quoted 30 lines · Rob Herring
Quoted 29 lines · Pavel Machek

Add device tree binding documentation for toshiba et8ek8 sensor.

---

diff from v3: explain what clock-frequency means

Documentation/devicetree/bindings/media/i2c/toshiba,et8ek8.txt new file +12 -0
new file mode 100644
index 0000000..54863cf
@@ -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"
Quoted 8 lines

Documentation/devicetree/bindings/media/i2c/toshiba,et8ek8.txt line 17

Quoted 5 lines
Documentation/devicetree/bindings/media/i2c/toshiba,et8ek8.txt new file +5 -0
+- 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."

Signature · 4 lines
Kind regards,

Sakari Ailus
e-mail: [email protected]	XMPP: [email protected]
#4 lore raw
In reply to Rob Herring

Hi!

Quoted 4 lines
Quoted 4 lines
Documentation/devicetree/bindings/media/i2c/toshiba,et8ek8.txt new file +4 -0
+Mandatory properties
+--------------------
+
+- compatible: "toshiba,et8ek8"
Quoted 8 lines
Quoted 5 lines
+- 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?

Quoted 3 lines
Quoted 1 line

+- 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

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#5 lore raw

Hi Pavel and Rob,

Quoted 19 lines · Pavel Machek

Hi!

Quoted 4 lines
Quoted 4 lines
Documentation/devicetree/bindings/media/i2c/toshiba,et8ek8.txt new file +4 -0
+Mandatory properties
+--------------------
+
+- compatible: "toshiba,et8ek8"
Quoted 8 lines
Quoted 5 lines
+- 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?

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

+- 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. :-)

Signature · 2 lines
Sakari Ailus
e-mail: [email protected]	XMPP: [email protected]
#6 lore raw
Quoted 21 lines · Sakari Ailus

Hi Pavel and Rob,

Quoted 18 lines · Pavel Machek

Hi!

Quoted 4 lines
Quoted 4 lines
Documentation/devicetree/bindings/media/i2c/toshiba,et8ek8.txt new file +4 -0
+Mandatory properties
+--------------------
+
+- compatible: "toshiba,et8ek8"
Quoted 8 lines
Quoted 5 lines
+- 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

Quoted 13 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

+- 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. :-)

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#7 lore raw

PATCH v5 1/1 media: et8ek8: add device tree binding documentation

In reply to Rob Herring

Add device tree binding documentation for toshiba et8ek8 sensor.

Documentation/devicetree/bindings/media/i2c/toshiba,et8ek8.txt new file +53 -0
new file mode 100644
index 0000000..b03b21d
@@ -0,0 +1,53 @@
+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. The clock frequency is
+  a pre-determined frequency known to be suitable to the board.
+- reset-gpios: XSHUTDOWN GPIO. The XSHUTDOWN signal is active high. The sensor
+  is in hardware standby mode when the signal is in low state.
+
+
+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>;
+			};
+		};
+	};
+};
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#8 lore raw
Quoted 4 lines · Pavel Machek

Add device tree binding documentation for toshiba et8ek8 sensor.

Rob, can we get an ack here?

Thanks,
Pavel

Quoted 61 lines
Documentation/devicetree/bindings/media/i2c/toshiba,et8ek8.txt new file +53 -0
new file mode 100644
index 0000000..b03b21d
@@ -0,0 +1,53 @@
+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. The clock frequency is
+  a pre-determined frequency known to be suitable to the board.
+- reset-gpios: XSHUTDOWN GPIO. The XSHUTDOWN signal is active high. The sensor
+  is in hardware standby mode when the signal is in low state.
+
+
+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>;
+			};
+		};
+	};
+};
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
maintainer
#9 lore raw
In reply to Pavel Machek
Quoted 21 lines · Pavel Machek

Add device tree binding documentation for toshiba et8ek8 sensor.

Documentation/devicetree/bindings/media/i2c/toshiba,et8ek8.txt new file +10 -0
new file mode 100644
index 0000000..b03b21d
@@ -0,0 +1,53 @@
+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
+--------------------

Documentation/devicetree/bindings/media/i2c/toshiba,et8ek8.txt line 20

Quoted 10 lines
Documentation/devicetree/bindings/media/i2c/toshiba,et8ek8.txt new file +10 -0
+
+- 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. The clock frequency is
+  a pre-determined frequency known to be suitable to the board.
+- reset-gpios: XSHUTDOWN GPIO. The XSHUTDOWN signal is active high. The sensor
+  is in hardware standby mode when the signal is in low state.

Sounds like active low to me. "Active" means when is the defined function of the pin enabled, not when is the chip active/enabled. So in this case reset or shutdown is active when low.

Rob

#10 lore raw

PATCH v6 1/1 media: et8ek8: add device tree binding documentation

In reply to Pavel Machek

Add device tree binding documentation for toshiba et8ek8 sensor.

---

v6: added missing article, fixed signal polarity.

Documentation/devicetree/bindings/media/i2c/toshiba,et8ek8.txt new file +53 -0
new file mode 100644
index 0000000..b03b21d
@@ -0,0 +1,53 @@
+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. The clock frequency is
+  a pre-determined frequency known to be suitable to the board.
+- reset-gpios: XSHUTDOWN GPIO. The XSHUTDOWN signal is active low. The sensor
+  is in hardware standby mode when the signal is in the low state.
+
+
+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>;
+			};
+		};
+	};
+};
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#12 lore raw
In reply to Pavel Machek

Hi Pavel,

Quoted 37 lines · Pavel Machek

Add device tree binding documentation for toshiba et8ek8 sensor.

---

v6: added missing article, fixed signal polarity.

Documentation/devicetree/bindings/media/i2c/toshiba,et8ek8.txt new file +22 -0
new file mode 100644
index 0000000..b03b21d
@@ -0,0 +1,53 @@
+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. The clock frequency is
+  a pre-determined frequency known to be suitable to the board.
+- reset-gpios: XSHUTDOWN GPIO. The XSHUTDOWN signal is active low. The sensor
+  is in hardware standby mode when the signal is in the low state.
+
+

Documentation/devicetree/bindings/media/i2c/toshiba,et8ek8.txt line 32

Quoted 10 lines
Documentation/devicetree/bindings/media/i2c/toshiba,et8ek8.txt new file +10 -0
+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>

The driver makes no use of them and CCP2 only supports a single lane. I'll just remove these and apply it to my tree. Let's continue discussing the driver patch in the other thread.

Quoted 22 lines
Documentation/devicetree/bindings/media/i2c/toshiba,et8ek8.txt new file +21 -0
+
+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>;
+			};
+		};
+	};
+};
Signature · 4 lines
Regards,

Sakari Ailus
e-mail: [email protected]	XMPP: [email protected]
#13 lore raw
Quoted 16 lines · Sakari Ailus

Hi Pavel,

Documentation/devicetree/bindings/media/i2c/toshiba,et8ek8.txt line 32

Quoted 10 lines
Documentation/devicetree/bindings/media/i2c/toshiba,et8ek8.txt new file +10 -0
+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>

The driver makes no use of them and CCP2 only supports a single lane. I'll just remove these and apply it to my tree. Let's continue discussing the driver patch in the other thread.

Ok, thanks!

Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html