diff mbox series

[v7,02/13] dt-bindings: Add SLIMbus bindings

Message ID 20171115141043.29202-3-srinivas.kandagatla@linaro.org
State Superseded
Headers show
Series [v7,01/13] Documentation: Add SLIMbus summary | expand

Commit Message

Srinivas Kandagatla Nov. 15, 2017, 2:10 p.m. UTC
From: Sagar Dharia <sdharia@codeaurora.org>


SLIMbus (Serial Low Power Interchip Media Bus) is a specification
developed by MIPI (Mobile Industry Processor Interface) alliance.
SLIMbus is a 2-wire implementation, which is used to communicate with
peripheral components like audio-codec.

This patch adds device tree bindings for the slimbus.

Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

---
 Documentation/devicetree/bindings/slimbus/bus.txt | 50 +++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/slimbus/bus.txt

-- 
2.15.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Rob Herring (Arm) Nov. 16, 2017, 5:15 a.m. UTC | #1
On Wed, Nov 15, 2017 at 02:10:32PM +0000, srinivas.kandagatla@linaro.org wrote:
> From: Sagar Dharia <sdharia@codeaurora.org>

> 

> SLIMbus (Serial Low Power Interchip Media Bus) is a specification

> developed by MIPI (Mobile Industry Processor Interface) alliance.

> SLIMbus is a 2-wire implementation, which is used to communicate with

> peripheral components like audio-codec.

> 

> This patch adds device tree bindings for the slimbus.

> 

> Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>

> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

> ---

>  Documentation/devicetree/bindings/slimbus/bus.txt | 50 +++++++++++++++++++++++

>  1 file changed, 50 insertions(+)

>  create mode 100644 Documentation/devicetree/bindings/slimbus/bus.txt


Reviewed-by: Rob Herring <robh@kernel.org>


--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Vinod Koul Nov. 17, 2017, 3:55 a.m. UTC | #2
On Thu, Nov 16, 2017 at 01:40:13PM +0000, Srinivas Kandagatla wrote:
> Thanks for the review comments.

> 

> On 16/11/17 13:09, Vinod Koul wrote:

> >On Wed, Nov 15, 2017 at 02:10:32PM +0000, srinivas.kandagatla@linaro.org wrote:

> >>From: Sagar Dharia <sdharia@codeaurora.org>

> >

> >>+

> >>+Child nodes:

> >>+Every SLIMbus controller node can contain zero or more child nodes

> >>+representing slave devices on the bus. Every SLIMbus slave device is

> >>+uniquely determined by the enumeration address containing 4 fields:

> >>+Manufacturer ID, Product code, Device index, and Instance value for

> >>+the device.

> >>+If child node is not present and it is instantiated after device

> >>+discovery (slave device reporting itself present).

> >

> >So you allow the devices to work even if the respective firmware description

> >is absent?

> Yes, As SLIMbus itself itself is discoverable bus.


Okay, in SDW we mandate description be present in respective firmwares so we
dont have this path. In theory this never works for you as driver cant load
without device being created and without driver load device is not powered
up so can't report...

> >>+In some cases it may be necessary to describe non-probeable device

> >>+details such as non-standard ways of powering up a device. In

> >>+such cases, child nodes for those devices will be present as

> >>+slaves of the slimbus-controller, as detailed below.

> >>+

> >>+Required property for SLIMbus child node if it is present:

> >>+- reg		- Should be ('Device index', 'Instance ID') from SLIMbus

> >>+		  Enumeration  Address.

> >>+		  Device Index Uniquely identifies multiple Devices within

> >>+		  a single Component.

> >>+		  Instance ID Is for the cases where multiple Devices of the

> >>+		  same type or Class are attached to the bus.

> >>+

> >>+- compatible	-"slimMID,PID". The textual representation of Manufacturer ID,

> >>+	 	  Product Code, shall be in lower case hexadecimal with leading

> >>+		  zeroes suppressed

> >>+

> 

> >>+		codec: wcd9310@1,0{

> >>+			compatible = "slim217,60";

> >>+			reg = <1 0>;

> >>+		};

> >>+	};

> >

> >Pardon my ignorance as I am not very familiar with DT nodes, but where are

> >the Manufacturer ID, Product code, Device index, and Instance values here?

> 

> Manfacturer ID and Product code is part of compatible string

> Device index and Instance value are part of reg.


hmmm, wouldn't it be more helpful to have a field(s) for these which contain
these numbers rather than coded together in a word

compatible makes sense though

-- 
~Vinod
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/slimbus/bus.txt b/Documentation/devicetree/bindings/slimbus/bus.txt
new file mode 100644
index 000000000000..413b5076858e
--- /dev/null
+++ b/Documentation/devicetree/bindings/slimbus/bus.txt
@@ -0,0 +1,50 @@ 
+SLIM(Serial Low Power Interchip Media Bus) bus
+
+SLIMbus is a 2-wire bus, and is used to communicate with peripheral
+components like audio-codec.
+
+Required property for SLIMbus controller node:
+- compatible	- name of SLIMbus controller
+
+Child nodes:
+Every SLIMbus controller node can contain zero or more child nodes
+representing slave devices on the bus. Every SLIMbus slave device is
+uniquely determined by the enumeration address containing 4 fields:
+Manufacturer ID, Product code, Device index, and Instance value for
+the device.
+If child node is not present and it is instantiated after device
+discovery (slave device reporting itself present).
+
+In some cases it may be necessary to describe non-probeable device
+details such as non-standard ways of powering up a device. In
+such cases, child nodes for those devices will be present as
+slaves of the slimbus-controller, as detailed below.
+
+Required property for SLIMbus child node if it is present:
+- reg		- Should be ('Device index', 'Instance ID') from SLIMbus
+		  Enumeration  Address.
+		  Device Index Uniquely identifies multiple Devices within
+		  a single Component.
+		  Instance ID Is for the cases where multiple Devices of the
+		  same type or Class are attached to the bus.
+
+- compatible	-"slimMID,PID". The textual representation of Manufacturer ID,
+	 	  Product Code, shall be in lower case hexadecimal with leading
+		  zeroes suppressed
+
+SLIMbus example for Qualcomm's slimbus manager component:
+
+	slim@28080000 {
+		compatible = "qcom,apq8064-slim", "qcom,slim";
+		reg = <0x28080000 0x2000>,
+		interrupts = <0 33 0>;
+		clocks = <&lcc SLIMBUS_SRC>, <&lcc AUDIO_SLIMBUS_CLK>;
+		clock-names = "iface", "core";
+		#address-cells = <2>;
+		#size-cell = <0>;
+
+		codec: wcd9310@1,0{
+			compatible = "slim217,60";
+			reg = <1 0>;
+		};
+	};