Skip to contentSkip to conversation

of: Add MIPI DSI bus device tree bindings

PATCH In review Thierry Reding 4 participants 4 messages Dec 2, 2013 – Dec 24, 2013 1 message not in the archive Device tree bindings

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 of: Add MIPI DSI bus device tree bindings

Document the device tree bindings for the MIPI DSI bus. The MIPI Display Serial Interface specifies a serial bus and a protocol for communication between a host and up to four peripherals.

---
 .../devicetree/bindings/mipi/dsi/mipi-dsi-bus.txt  | 54 ++++++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mipi/dsi/mipi-dsi-bus.txt
Documentation/devicetree/bindings/mipi/dsi/mipi-dsi-bus.txt new file +54 -0
new file mode 100644
index 000000000000..f58ca4485a2f
@@ -0,0 +1,54 @@
+MIPI DSI (Display Serial Interface) busses
+==========================================
+
+The MIPI Display Serial Interface specifies a serial bus and a protocol for
+communication between a host and up to four peripherals. This document will
+define the syntax used to represent a DSI bus in a device tree.
+
+This document describes DSI bus-specific properties only or defines existing
+standard properties in the context of the DSI bus.
+
+Each DSI host provides a DSI bus. The DSI host controller's node contains a
+set of properties that characterize the bus. Child nodes describe individual
+peripherals on that bus.
+
+DSI host
+--------
+
+In addition to the standard properties and those defined by the parent bus of
+a DSI host, the following properties apply to a node representing a DSI host.
+
+Required properties:
+- #address-cells: The number of cells required to represent an address on the
+  bus. DSI peripherals are addressed using a 2-bit virtual channel number, so
+  a maximum of 4 devices can be addressed on a single bus. Hence the value of
+  this property should be 1.
+- #size-cells: Should be 0.
+
+DSI peripheral
+--------------
+
+Peripherals are represented as child nodes of the DSI host's node. Properties
+described here apply to all DSI peripherals, but individual bindings may want
+to define additional, device-specific properties.
+
+Required properties:
+- reg: The virtual channel number of a DSI peripheral. Must be in the range
+  from 0 to 3.
+
+Example
+-------
+
+	dsi-host {
+		...
+
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		peripheral@0 {
+			compatible = "...";
+			reg = <0>;
+		};
+
+		...
+	};
Signature · 1 line
1.8.4.2
Reviewed-by on v1 1/1
#1 lore raw

Hi Thierry,

Quoted 61 lines · On Monday 02 of December 2013 16:37:11 Thierry Reding wrote:

Document the device tree bindings for the MIPI DSI bus. The MIPI Display Serial Interface specifies a serial bus and a protocol for communication between a host and up to four peripherals.

---
 .../devicetree/bindings/mipi/dsi/mipi-dsi-bus.txt  | 54 ++++++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mipi/dsi/mipi-dsi-bus.txt
Documentation/devicetree/bindings/mipi/dsi/mipi-dsi-bus.txt new file +44 -0
new file mode 100644
index 000000000000..f58ca4485a2f
@@ -0,0 +1,54 @@
+MIPI DSI (Display Serial Interface) busses
+==========================================
+
+The MIPI Display Serial Interface specifies a serial bus and a protocol for
+communication between a host and up to four peripherals. This document will
+define the syntax used to represent a DSI bus in a device tree.
+
+This document describes DSI bus-specific properties only or defines existing
+standard properties in the context of the DSI bus.
+
+Each DSI host provides a DSI bus. The DSI host controller's node contains a
+set of properties that characterize the bus. Child nodes describe individual
+peripherals on that bus.
+
+DSI host
+--------
+
+In addition to the standard properties and those defined by the parent bus of
+a DSI host, the following properties apply to a node representing a DSI host.
+
+Required properties:
+- #address-cells: The number of cells required to represent an address on the
+  bus. DSI peripherals are addressed using a 2-bit virtual channel number, so
+  a maximum of 4 devices can be addressed on a single bus. Hence the value of
+  this property should be 1.
+- #size-cells: Should be 0.
+
+DSI peripheral
+--------------
+
+Peripherals are represented as child nodes of the DSI host's node. Properties
+described here apply to all DSI peripherals, but individual bindings may want
+to define additional, device-specific properties.
+
+Required properties:
+- reg: The virtual channel number of a DSI peripheral. Must be in the range
+  from 0 to 3.
+
+Example
+-------
+
+	dsi-host {
+		...
+

Documentation/devicetree/bindings/mipi/dsi/mipi-dsi-bus.txt line 54

Quoted 10 lines
Documentation/devicetree/bindings/mipi/dsi/mipi-dsi-bus.txt new file +10 -0
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		peripheral@0 {
+			compatible = "...";
+			reg = <0>;
+		};
+
+		...
+	};

In general, this looks good to me as a starter, so we could have support for DSI bus merged. IMHO we should consider adding some generic bus properties in future, though.

Anyway, have my

Best regards,
Tomasz

#2 lore raw
Quoted 1 line · Tomasz Figa

On Monday 02 of December 2013 16:37:11 Thierry Reding wrote:

[...]

Quoted 13 lines
Quoted 13 lines
Documentation/devicetree/bindings/mipi/dsi/mipi-dsi-bus.txt new file +13 -0
+Example
+-------
+
+	dsi-host {
+		...
+
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		peripheral@0 {
+			compatible = "...";
+			reg = <0>;
+		};
Quoted 8 lines

Documentation/devicetree/bindings/mipi/dsi/mipi-dsi-bus.txt line 51

Quoted 4 lines
Documentation/devicetree/bindings/mipi/dsi/mipi-dsi-bus.txt new file +3 -0
+
+		...
+	};

In general, this looks good to me as a starter, so we could have support for DSI bus merged. IMHO we should consider adding some generic bus properties in future, though.

To be honest this looked somewhat minimal to me too at first, and then I tried to come up with any other properties but couldn't think of any. Of course anything that we add later on has the potential to break ABI compatibility.

A few of the things I had in mind that might be added as properties were the number of lanes or the video format. But those will already be implied by the compatible value and therefore don't really belong in the DT.

But if anyone can think of other properties that would be useful for DSI host or peripherals, by all means, let me know.

Quoted 3 lines

Anyway, have my

Thanks,
Thierry

A message that is not in the archive (sent off-list or not yet received): 20131202210435.GA19644-AwZRO8vwLAwmlAP/[email protected]

#4 lore raw

SGVsbG8uIExhdGUgdG8gdGhlIHBhcnR5Li4uDQoNCk9uIE1vbmRheSBEZWNlbWJlciAyIDIwMTMg YXQgMjE6MDUsIFRoaWVycnkgUmVkaW5nIHdyb3RlOg0KPiBPbiBNb24sIERlYyAwMiwgMjAxMyBh dCAwODo1NzoyMFBNICswMTAwLCBUb21hc3ogRmlnYSB3cm90ZToNCj4gPiBJbiBnZW5lcmFsLCB0 aGlzIGxvb2tzIGdvb2QgdG8gbWUgYXMgYSBzdGFydGVyLCBzbyB3ZSBjb3VsZCBoYXZlIHN1cHB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ByYXRlIGZyZXF1ZW50bHkgZGVwZW5k aW5nIG9uIFJGIGNvbmNlcm5zLg0KDQpCZXJ0Lg0K
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html