[PATCHv7,1/3] dt-bindings: i2c: document bindings for i2c-slave-mqueue
diff mbox series

Message ID 20190605164651.15991-2-eduval@amazon.com
State Under Review
Headers show
Series
  • [PATCHv7,1/3] dt-bindings: i2c: document bindings for i2c-slave-mqueue
Related show

Commit Message

Eduardo Valentin June 5, 2019, 4:46 p.m. UTC
Document the i2c-slave-mqueue binding by adding
descriptor, required properties, and example.

Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-i2c@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduval@amazon.com>
---

Changes from V6 to V7:
- none

 .../bindings/i2c/i2c-slave-mqueue.txt         | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/i2c/i2c-slave-mqueue.txt

Comments

Rob Herring June 11, 2019, 11:14 p.m. UTC | #1
On Wed, Jun 05, 2019 at 09:46:49AM -0700, Eduardo Valentin wrote:
> Document the i2c-slave-mqueue binding by adding
> descriptor, required properties, and example.
> 
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Wolfram Sang <wsa@the-dreams.de>
> Cc: linux-i2c@vger.kernel.org
> Cc: devicetree@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Eduardo Valentin <eduval@amazon.com>
> ---
> 
> Changes from V6 to V7:
> - none
> 
>  .../bindings/i2c/i2c-slave-mqueue.txt         | 34 +++++++++++++++++++
>  1 file changed, 34 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/i2c/i2c-slave-mqueue.txt
> 
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-slave-mqueue.txt b/Documentation/devicetree/bindings/i2c/i2c-slave-mqueue.txt
> new file mode 100644
> index 000000000000..eb1881a4fc0e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/i2c/i2c-slave-mqueue.txt
> @@ -0,0 +1,34 @@
> +===============================================
> +Device Tree for I2C slave message queue backend
> +===============================================
> +
> +Some protocols over I2C/SMBus are designed for bi-directional transferring
> +messages by using I2C Master Write protocol. This requires that both sides
> +of the communication have slave addresses.

So the address 0x10 in the example below is the address of the I2C 
controller?

> +
> +This I2C slave mqueue (message queue) is used to receive and queue
> +messages from the remote i2c intelligent device; and it will add the target
> +slave address (with R/W# bit is always 0) into the message at the first byte.
> +
> +Links
> +----
> +`Intelligent Platform Management Bus
> +Communications Protocol Specification
> +<https://www.intel.com/content/dam/www/public/us/en/documents/product-briefs/ipmp-spec-v1.0.pdf>`_
> +
> +`Management Component Transport Protocol (MCTP)
> +SMBus/I2C Transport Binding Specification
> +<https://www.dmtf.org/sites/default/files/standards/documents/DSP0237_1.1.0.pdf>`_
> +
> +Required Properties:
> +- compatible		: should be "i2c-slave-mqueue"

There is no mention of mqueue (or queue) in these specs. Where does that 
come from? Perhaps something more closely matching the protocol would be 
better name.

> +- reg			: slave address
> +
> +Example:
> +
> +i2c {

Would there be other slaves? 

The common binding states 'multi-master' property should be present. 

I need a more complete example.

> +	slave_mqueue: i2c-slave-mqueue {
> +		compatible = "i2c-slave-mqueue";
> +		reg = <0x10>;
> +	};
> +};
> -- 
> 2.21.0
>
Wang, Haiyue June 12, 2019, 2:46 a.m. UTC | #2
在 2019-06-12 07:14, Rob Herring 写道:
> On Wed, Jun 05, 2019 at 09:46:49AM -0700, Eduardo Valentin wrote:
>> Document the i2c-slave-mqueue binding by adding
>> descriptor, required properties, and example.
>>
>> Cc: Rob Herring <robh+dt@kernel.org>
>> Cc: Mark Rutland <mark.rutland@arm.com>
>> Cc: Wolfram Sang <wsa@the-dreams.de>
>> Cc: linux-i2c@vger.kernel.org
>> Cc: devicetree@vger.kernel.org
>> Cc: linux-kernel@vger.kernel.org
>> Signed-off-by: Eduardo Valentin <eduval@amazon.com>
>> ---
>>
>> Changes from V6 to V7:
>> - none
>>
>>   .../bindings/i2c/i2c-slave-mqueue.txt         | 34 +++++++++++++++++++
>>   1 file changed, 34 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/i2c/i2c-slave-mqueue.txt
>>
>> diff --git a/Documentation/devicetree/bindings/i2c/i2c-slave-mqueue.txt b/Documentation/devicetree/bindings/i2c/i2c-slave-mqueue.txt
>> new file mode 100644
>> index 000000000000..eb1881a4fc0e
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/i2c/i2c-slave-mqueue.txt
>> @@ -0,0 +1,34 @@
>> +===============================================
>> +Device Tree for I2C slave message queue backend
>> +===============================================
>> +
>> +Some protocols over I2C/SMBus are designed for bi-directional transferring
>> +messages by using I2C Master Write protocol. This requires that both sides
>> +of the communication have slave addresses.
> So the address 0x10 in the example below is the address of the I2C
> controller?
>
>> +
>> +This I2C slave mqueue (message queue) is used to receive and queue
Hi Rob, This is mqueue comes from, not from specs directly.
>> +messages from the remote i2c intelligent device; and it will add the target
>> +slave address (with R/W# bit is always 0) into the message at the first byte.
>> +
>> +Links
>> +----
>> +`Intelligent Platform Management Bus
>> +Communications Protocol Specification
>> +<https://www.intel.com/content/dam/www/public/us/en/documents/product-briefs/ipmp-spec-v1.0.pdf>`_
>> +
>> +`Management Component Transport Protocol (MCTP)
>> +SMBus/I2C Transport Binding Specification
>> +<https://www.dmtf.org/sites/default/files/standards/documents/DSP0237_1.1.0.pdf>`_
>> +
>> +Required Properties:
>> +- compatible		: should be "i2c-slave-mqueue"
> There is no mention of mqueue (or queue) in these specs. Where does that
> come from? Perhaps something more closely matching the protocol would be
> better name.
>
>> +- reg			: slave address
>> +
>> +Example:
>> +
>> +i2c {
> Would there be other slaves?
>
> The common binding states 'multi-master' property should be present.
>
> I need a more complete example.
>
>> +	slave_mqueue: i2c-slave-mqueue {
>> +		compatible = "i2c-slave-mqueue";
>> +		reg = <0x10>;

Hi Eduardo,

Looks like the slave reg missed the key value bit:


https://elinux.org/images/f/f6/ELCE15-WolframSang-ShinyNewI2CSlaveFramework.pdf

Example: reg = <(I2C_OWN_SLAVE_ADDRESS | 0x42)>;


>> +	};
>> +};
>> -- 
>> 2.21.0
>>
Wolfram Sang July 1, 2019, 12:42 p.m. UTC | #3
> Looks like the slave reg missed the key value bit:
> 
> 
> https://elinux.org/images/f/f6/ELCE15-WolframSang-ShinyNewI2CSlaveFramework.pdf
> 
> Example: reg = <(I2C_OWN_SLAVE_ADDRESS | 0x42)>;

Yes.
Wolfram Sang July 1, 2019, 12:43 p.m. UTC | #4
> > +===============================================
> > +Device Tree for I2C slave message queue backend
> > +===============================================
> > +
> > +Some protocols over I2C/SMBus are designed for bi-directional transferring
> > +messages by using I2C Master Write protocol. This requires that both sides
> > +of the communication have slave addresses.
> 
> So the address 0x10 in the example below is the address of the I2C 
> controller?

Yes.

> > +This I2C slave mqueue (message queue) is used to receive and queue
> > +messages from the remote i2c intelligent device; and it will add the target
> > +slave address (with R/W# bit is always 0) into the message at the first byte.
> > +
> > +Links
> > +----
> > +`Intelligent Platform Management Bus
> > +Communications Protocol Specification
> > +<https://www.intel.com/content/dam/www/public/us/en/documents/product-briefs/ipmp-spec-v1.0.pdf>`_
> > +
> > +`Management Component Transport Protocol (MCTP)
> > +SMBus/I2C Transport Binding Specification
> > +<https://www.dmtf.org/sites/default/files/standards/documents/DSP0237_1.1.0.pdf>`_
> > +
> > +Required Properties:
> > +- compatible		: should be "i2c-slave-mqueue"
> 
> There is no mention of mqueue (or queue) in these specs. Where does that 
> come from? Perhaps something more closely matching the protocol would be 
> better name.
> 
> > +- reg			: slave address
> > +
> > +Example:
> > +
> > +i2c {
> 
> Would there be other slaves? 
> 
> The common binding states 'multi-master' property should be present. 
> 
> I need a more complete example.

Ack. Either that or a bit more explanation, e.g. if sending
packets is planned from userspace?

Patch
diff mbox series

diff --git a/Documentation/devicetree/bindings/i2c/i2c-slave-mqueue.txt b/Documentation/devicetree/bindings/i2c/i2c-slave-mqueue.txt
new file mode 100644
index 000000000000..eb1881a4fc0e
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/i2c-slave-mqueue.txt
@@ -0,0 +1,34 @@ 
+===============================================
+Device Tree for I2C slave message queue backend
+===============================================
+
+Some protocols over I2C/SMBus are designed for bi-directional transferring
+messages by using I2C Master Write protocol. This requires that both sides
+of the communication have slave addresses.
+
+This I2C slave mqueue (message queue) is used to receive and queue
+messages from the remote i2c intelligent device; and it will add the target
+slave address (with R/W# bit is always 0) into the message at the first byte.
+
+Links
+----
+`Intelligent Platform Management Bus
+Communications Protocol Specification
+<https://www.intel.com/content/dam/www/public/us/en/documents/product-briefs/ipmp-spec-v1.0.pdf>`_
+
+`Management Component Transport Protocol (MCTP)
+SMBus/I2C Transport Binding Specification
+<https://www.dmtf.org/sites/default/files/standards/documents/DSP0237_1.1.0.pdf>`_
+
+Required Properties:
+- compatible		: should be "i2c-slave-mqueue"
+- reg			: slave address
+
+Example:
+
+i2c {
+	slave_mqueue: i2c-slave-mqueue {
+		compatible = "i2c-slave-mqueue";
+		reg = <0x10>;
+	};
+};