Re: [PATCH 6/6] Documentation/devicetree: Add FSI-attached I2C master dt bindings

2017-06-28 Thread Rob Herring
On Mon, Jun 26, 2017 at 02:29:35PM -0500, Eddie James wrote:
> From: "Edward A. James" 

"dt-bindings: i2c: ..." for the subject.

> 
> Document the bindings.
> 
> Signed-off-by: Edward A. James 
> ---
>  Documentation/devicetree/bindings/i2c/i2c-fsi.txt | 31 
> +++
>  1 file changed, 31 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/i2c/i2c-fsi.txt
> 
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-fsi.txt 
> b/Documentation/devicetree/bindings/i2c/i2c-fsi.txt
> new file mode 100644
> index 000..fffc067
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/i2c/i2c-fsi.txt
> @@ -0,0 +1,31 @@
> +Device-tree bindings for FSI-attached I2C master driver
> +---
> +
> +Required properties:
> + - compatible = "ibm,i2cm-fsi";

Only one version?

> + - reg = < address size >;   : The FSI CFAM address and address space
> +   size.
> + - #address-cells = <1>; : Number of address cells in child nodes
> + - #size-cells = <0>;: Number of size cells in child 
> nodes.
> + - child nodes   : Nodes to describe ports off 
> the I2C
> +   master.
> +
> +Child node required properties:
> + - reg = < port number > : The port number on the I2C master.
> +
> +Examples:
> +
> +i2cm@1800 {

i2c@1800

> +compatible = "ibm,i2cm-fsi";
> +reg = < 0x1800 0x400 >;
> +#address-cells = <1>;
> +#size-cells = <0>;
> +
> +port@0 {

The ports are separate i2c buses? Use i2c-bus@... instead. "ports" is 
already used by OF graph binding.

> +reg = <0>;
> +};
> +
> +port@1 {
> +reg = <1>;
> +};
> +};
> -- 
> 1.8.3.1
> 


Re: [PATCH 6/6] Documentation/devicetree: Add FSI-attached I2C master dt bindings

2017-06-28 Thread Rob Herring
On Mon, Jun 26, 2017 at 02:29:35PM -0500, Eddie James wrote:
> From: "Edward A. James" 

"dt-bindings: i2c: ..." for the subject.

> 
> Document the bindings.
> 
> Signed-off-by: Edward A. James 
> ---
>  Documentation/devicetree/bindings/i2c/i2c-fsi.txt | 31 
> +++
>  1 file changed, 31 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/i2c/i2c-fsi.txt
> 
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-fsi.txt 
> b/Documentation/devicetree/bindings/i2c/i2c-fsi.txt
> new file mode 100644
> index 000..fffc067
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/i2c/i2c-fsi.txt
> @@ -0,0 +1,31 @@
> +Device-tree bindings for FSI-attached I2C master driver
> +---
> +
> +Required properties:
> + - compatible = "ibm,i2cm-fsi";

Only one version?

> + - reg = < address size >;   : The FSI CFAM address and address space
> +   size.
> + - #address-cells = <1>; : Number of address cells in child nodes
> + - #size-cells = <0>;: Number of size cells in child 
> nodes.
> + - child nodes   : Nodes to describe ports off 
> the I2C
> +   master.
> +
> +Child node required properties:
> + - reg = < port number > : The port number on the I2C master.
> +
> +Examples:
> +
> +i2cm@1800 {

i2c@1800

> +compatible = "ibm,i2cm-fsi";
> +reg = < 0x1800 0x400 >;
> +#address-cells = <1>;
> +#size-cells = <0>;
> +
> +port@0 {

The ports are separate i2c buses? Use i2c-bus@... instead. "ports" is 
already used by OF graph binding.

> +reg = <0>;
> +};
> +
> +port@1 {
> +reg = <1>;
> +};
> +};
> -- 
> 1.8.3.1
> 


Re: [PATCH 6/6] Documentation/devicetree: Add FSI-attached I2C master dt bindings

2017-06-27 Thread Jeremy Kerr
Hi Eddie,

>> Those child nodes represent the downstream i2c buses, and so also
>> contain the i2c slave devices, right? If so, you may want to document
>> that, and/or add a simple device to that example (say, an EEPROM).
> 
> Yes, good point, but the driver currently wouldn't do anything with that
> device information. It doesn't keep a list of populated devices on the
> bus or anything. Still worth adding them to the device tree?

Surely the i2c core needs this to be able to find i2c slave devices on
the bus though?

[You'll need to set i2c_adapter->dev.of_node for this to work though,
which I don't think you are with the current patch set]

Cheers,


Jeremy


Re: [PATCH 6/6] Documentation/devicetree: Add FSI-attached I2C master dt bindings

2017-06-27 Thread Jeremy Kerr
Hi Eddie,

>> Those child nodes represent the downstream i2c buses, and so also
>> contain the i2c slave devices, right? If so, you may want to document
>> that, and/or add a simple device to that example (say, an EEPROM).
> 
> Yes, good point, but the driver currently wouldn't do anything with that
> device information. It doesn't keep a list of populated devices on the
> bus or anything. Still worth adding them to the device tree?

Surely the i2c core needs this to be able to find i2c slave devices on
the bus though?

[You'll need to set i2c_adapter->dev.of_node for this to work though,
which I don't think you are with the current patch set]

Cheers,


Jeremy


Re: [PATCH 6/6] Documentation/devicetree: Add FSI-attached I2C master dt bindings

2017-06-27 Thread Eddie James



On 06/26/2017 08:06 PM, Jeremy Kerr wrote:

Hi Eddie,


+Required properties:
+ - compatible = "ibm,i2cm-fsi";
+ - reg = < address size >;   : The FSI CFAM address and address 
space
+ size.
+ - #address-cells = <1>; : Number of address cells in child nodes
+ - #size-cells = <0>;: Number of size cells in child nodes.
+ - child nodes : Nodes to describe ports off the I2C
+ master.
+
+Child node required properties:
+ - reg = < port number > : The port number on the I2C master.
+
+Examples:
+
+i2cm@1800 {
+compatible = "ibm,i2cm-fsi";
+reg = < 0x1800 0x400 >;
+#address-cells = <1>;
+#size-cells = <0>;
+
+port@0 {
+reg = <0>;
+};
+
+port@1 {
+reg = <1>;
+};
+};

Those child nodes represent the downstream i2c buses, and so also
contain the i2c slave devices, right? If so, you may want to document
that, and/or add a simple device to that example (say, an EEPROM).


Yes, good point, but the driver currently wouldn't do anything with that 
device information. It doesn't keep a list of populated devices on the 
bus or anything. Still worth adding them to the device tree?


Thanks,
Eddie



Cheers,


Jeremy





Re: [PATCH 6/6] Documentation/devicetree: Add FSI-attached I2C master dt bindings

2017-06-27 Thread Eddie James



On 06/26/2017 08:06 PM, Jeremy Kerr wrote:

Hi Eddie,


+Required properties:
+ - compatible = "ibm,i2cm-fsi";
+ - reg = < address size >;   : The FSI CFAM address and address 
space
+ size.
+ - #address-cells = <1>; : Number of address cells in child nodes
+ - #size-cells = <0>;: Number of size cells in child nodes.
+ - child nodes : Nodes to describe ports off the I2C
+ master.
+
+Child node required properties:
+ - reg = < port number > : The port number on the I2C master.
+
+Examples:
+
+i2cm@1800 {
+compatible = "ibm,i2cm-fsi";
+reg = < 0x1800 0x400 >;
+#address-cells = <1>;
+#size-cells = <0>;
+
+port@0 {
+reg = <0>;
+};
+
+port@1 {
+reg = <1>;
+};
+};

Those child nodes represent the downstream i2c buses, and so also
contain the i2c slave devices, right? If so, you may want to document
that, and/or add a simple device to that example (say, an EEPROM).


Yes, good point, but the driver currently wouldn't do anything with that 
device information. It doesn't keep a list of populated devices on the 
bus or anything. Still worth adding them to the device tree?


Thanks,
Eddie



Cheers,


Jeremy





Re: [PATCH 6/6] Documentation/devicetree: Add FSI-attached I2C master dt bindings

2017-06-26 Thread Jeremy Kerr
Hi Eddie,

> +Required properties:
> + - compatible = "ibm,i2cm-fsi";
> + - reg = < address size >;   : The FSI CFAM address and address space
> +   size.
> + - #address-cells = <1>; : Number of address cells in child nodes
> + - #size-cells = <0>;: Number of size cells in child 
> nodes.
> + - child nodes   : Nodes to describe ports off 
> the I2C
> +   master.
> +
> +Child node required properties:
> + - reg = < port number > : The port number on the I2C master.
> +
> +Examples:
> +
> +i2cm@1800 {
> +compatible = "ibm,i2cm-fsi";
> +reg = < 0x1800 0x400 >;
> +#address-cells = <1>;
> +#size-cells = <0>;
> +
> +port@0 {
> +reg = <0>;
> +};
> +
> +port@1 {
> +reg = <1>;
> +};
> +};

Those child nodes represent the downstream i2c buses, and so also
contain the i2c slave devices, right? If so, you may want to document
that, and/or add a simple device to that example (say, an EEPROM).

Cheers,


Jeremy


Re: [PATCH 6/6] Documentation/devicetree: Add FSI-attached I2C master dt bindings

2017-06-26 Thread Jeremy Kerr
Hi Eddie,

> +Required properties:
> + - compatible = "ibm,i2cm-fsi";
> + - reg = < address size >;   : The FSI CFAM address and address space
> +   size.
> + - #address-cells = <1>; : Number of address cells in child nodes
> + - #size-cells = <0>;: Number of size cells in child 
> nodes.
> + - child nodes   : Nodes to describe ports off 
> the I2C
> +   master.
> +
> +Child node required properties:
> + - reg = < port number > : The port number on the I2C master.
> +
> +Examples:
> +
> +i2cm@1800 {
> +compatible = "ibm,i2cm-fsi";
> +reg = < 0x1800 0x400 >;
> +#address-cells = <1>;
> +#size-cells = <0>;
> +
> +port@0 {
> +reg = <0>;
> +};
> +
> +port@1 {
> +reg = <1>;
> +};
> +};

Those child nodes represent the downstream i2c buses, and so also
contain the i2c slave devices, right? If so, you may want to document
that, and/or add a simple device to that example (say, an EEPROM).

Cheers,


Jeremy


[PATCH 6/6] Documentation/devicetree: Add FSI-attached I2C master dt bindings

2017-06-26 Thread Eddie James
From: "Edward A. James" 

Document the bindings.

Signed-off-by: Edward A. James 
---
 Documentation/devicetree/bindings/i2c/i2c-fsi.txt | 31 +++
 1 file changed, 31 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/i2c/i2c-fsi.txt

diff --git a/Documentation/devicetree/bindings/i2c/i2c-fsi.txt 
b/Documentation/devicetree/bindings/i2c/i2c-fsi.txt
new file mode 100644
index 000..fffc067
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/i2c-fsi.txt
@@ -0,0 +1,31 @@
+Device-tree bindings for FSI-attached I2C master driver
+---
+
+Required properties:
+ - compatible = "ibm,i2cm-fsi";
+ - reg = < address size >; : The FSI CFAM address and address space
+ size.
+ - #address-cells = <1>;   : Number of address cells in child nodes
+ - #size-cells = <0>;  : Number of size cells in child nodes.
+ - child nodes : Nodes to describe ports off the I2C
+ master.
+
+Child node required properties:
+ - reg = < port number >   : The port number on the I2C master.
+
+Examples:
+
+i2cm@1800 {
+compatible = "ibm,i2cm-fsi";
+reg = < 0x1800 0x400 >;
+#address-cells = <1>;
+#size-cells = <0>;
+
+port@0 {
+reg = <0>;
+};
+
+port@1 {
+reg = <1>;
+};
+};
-- 
1.8.3.1



[PATCH 6/6] Documentation/devicetree: Add FSI-attached I2C master dt bindings

2017-06-26 Thread Eddie James
From: "Edward A. James" 

Document the bindings.

Signed-off-by: Edward A. James 
---
 Documentation/devicetree/bindings/i2c/i2c-fsi.txt | 31 +++
 1 file changed, 31 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/i2c/i2c-fsi.txt

diff --git a/Documentation/devicetree/bindings/i2c/i2c-fsi.txt 
b/Documentation/devicetree/bindings/i2c/i2c-fsi.txt
new file mode 100644
index 000..fffc067
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/i2c-fsi.txt
@@ -0,0 +1,31 @@
+Device-tree bindings for FSI-attached I2C master driver
+---
+
+Required properties:
+ - compatible = "ibm,i2cm-fsi";
+ - reg = < address size >; : The FSI CFAM address and address space
+ size.
+ - #address-cells = <1>;   : Number of address cells in child nodes
+ - #size-cells = <0>;  : Number of size cells in child nodes.
+ - child nodes : Nodes to describe ports off the I2C
+ master.
+
+Child node required properties:
+ - reg = < port number >   : The port number on the I2C master.
+
+Examples:
+
+i2cm@1800 {
+compatible = "ibm,i2cm-fsi";
+reg = < 0x1800 0x400 >;
+#address-cells = <1>;
+#size-cells = <0>;
+
+port@0 {
+reg = <0>;
+};
+
+port@1 {
+reg = <1>;
+};
+};
-- 
1.8.3.1