diff mbox

[linux,dev-4.10] arm/dts: Add I2C master and ports to FSI cfam

Message ID 1498505585-1820-1-git-send-email-eajames@linux.vnet.ibm.com
State Superseded, archived
Headers show

Commit Message

Eddie James June 26, 2017, 7:33 p.m. UTC
From: "Edward A. James" <eajames@us.ibm.com>

FSI I2C master algorithm probes port devices based on dts.

Signed-off-by: Edward A. James <eajames@us.ibm.com>
---
 arch/arm/boot/dts/ibm-power9-cfam.dtsi | 134 +++++++++++++++++++++++++++++++++
 1 file changed, 134 insertions(+)

Comments

Joel Stanley June 28, 2017, 4:57 a.m. UTC | #1
On Tue, Jun 27, 2017 at 5:03 AM, Eddie James <eajames@linux.vnet.ibm.com> wrote:
> From: "Edward A. James" <eajames@us.ibm.com>
>
> FSI I2C master algorithm probes port devices based on dts.

Do you need all 28 ports enabled?

>
> Signed-off-by: Edward A. James <eajames@us.ibm.com>
> ---
>  arch/arm/boot/dts/ibm-power9-cfam.dtsi | 134 +++++++++++++++++++++++++++++++++
>  1 file changed, 134 insertions(+)
>
> diff --git a/arch/arm/boot/dts/ibm-power9-cfam.dtsi b/arch/arm/boot/dts/ibm-power9-cfam.dtsi
> index f29c6e3..a0b5c97 100644
> --- a/arch/arm/boot/dts/ibm-power9-cfam.dtsi
> +++ b/arch/arm/boot/dts/ibm-power9-cfam.dtsi
> @@ -4,6 +4,73 @@
>                 #address-cells = <1>;
>                 #size-cells = <1>;
>
> +               i2cm@1800 {
> +                       compatible = "ibm,fsi-i2c-master";
> +                       reg = <0x1800 0x400>;
> +                       #address-cells = <1>;
> +                       #size-cells = <0>;
> +
> +                       port@0 {
> +                               port = <0>;
> +                       };
> +
> +                       port@1 {
> +                               port = <1>;
> +                       };
> +
> +                       port@2 {
> +                               port = <2>;
> +                       };
> +
> +                       port@3 {
> +                               port = <3>;
> +                       };
> +
> +                       port@4 {
> +                               port = <4>;
> +                       };
> +
> +                       port@5 {
> +                               port = <5>;
> +                       };
> +
> +                       port@6 {
> +                               port = <6>;
> +                       };
> +
> +                       port@7 {
> +                               port = <7>;
> +                       };
> +
> +                       port@8 {
> +                               port = <8>;
> +                       };
> +
> +                       port@9 {
> +                               port = <9>;
> +                       };
> +
> +                       port@10 {
> +                               port = <10>;
> +                       };
> +
> +                       port@11 {
> +                               port = <11>;
> +                       };
> +
> +                       port@12 {
> +                               port = <12>;
> +                       };
> +
> +                       port@13 {
> +                               port = <13>;
> +                       };
> +
> +                       port@14 {
> +                               port = <14>;
> +                       };
> +               };
> +
>                 sbefifo@2400 {
>                         compatible = "ibm,p9-sbefifo";
>                         reg = <0x2400 0x400>;
> @@ -31,6 +98,73 @@
>                                 #address-cells = <1>;
>                                 #size-cells = <1>;
>
> +                               i2cm@1800 {
> +                                       compatible = "ibm,fsi-i2c-master";
> +                                       reg = <0x1800 0x400>;
> +                                       #address-cells = <1>;
> +                                       #size-cells = <0>;
> +
> +                                       port@0 {
> +                                               port = <0>;
> +                                       };
> +
> +                                       port@1 {
> +                                               port = <1>;
> +                                       };
> +
> +                                       port@2 {
> +                                               port = <2>;
> +                                       };
> +
> +                                       port@3 {
> +                                               port = <3>;
> +                                       };
> +
> +                                       port@4 {
> +                                               port = <4>;
> +                                       };
> +
> +                                       port@5 {
> +                                               port = <5>;
> +                                       };
> +
> +                                       port@6 {
> +                                               port = <6>;
> +                                       };
> +
> +                                       port@7 {
> +                                               port = <7>;
> +                                       };
> +
> +                                       port@8 {
> +                                               port = <8>;
> +                                       };
> +
> +                                       port@9 {
> +                                               port = <9>;
> +                                       };
> +
> +                                       port@10 {
> +                                               port = <10>;
> +                                       };
> +
> +                                       port@11 {
> +                                               port = <11>;
> +                                       };
> +
> +                                       port@12 {
> +                                               port = <12>;
> +                                       };
> +
> +                                       port@13 {
> +                                               port = <13>;
> +                                       };
> +
> +                                       port@14 {
> +                                               port = <14>;
> +                                       };
> +                               };
> +
>                                 sbefifo@2400 {
>                                         compatible = "ibm,p9-sbefifo";
>                                         reg = <0x2400 0x400>;
> --
> 1.8.3.1
>
Eddie James June 28, 2017, 2:09 p.m. UTC | #2
On 06/27/2017 11:57 PM, Joel Stanley wrote:
> On Tue, Jun 27, 2017 at 5:03 AM, Eddie James <eajames@linux.vnet.ibm.com> wrote:
>> From: "Edward A. James" <eajames@us.ibm.com>
>>
>> FSI I2C master algorithm probes port devices based on dts.
> Do you need all 28 ports enabled?

I think so. All of those are valid I2C busses on P9. I'm not sure who 
uses them all.

Thanks,
Eddie

>
>> Signed-off-by: Edward A. James <eajames@us.ibm.com>
>> ---
>>   arch/arm/boot/dts/ibm-power9-cfam.dtsi | 134 +++++++++++++++++++++++++++++++++
>>   1 file changed, 134 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/ibm-power9-cfam.dtsi b/arch/arm/boot/dts/ibm-power9-cfam.dtsi
>> index f29c6e3..a0b5c97 100644
>> --- a/arch/arm/boot/dts/ibm-power9-cfam.dtsi
>> +++ b/arch/arm/boot/dts/ibm-power9-cfam.dtsi
>> @@ -4,6 +4,73 @@
>>                  #address-cells = <1>;
>>                  #size-cells = <1>;
>>
>> +               i2cm@1800 {
>> +                       compatible = "ibm,fsi-i2c-master";
>> +                       reg = <0x1800 0x400>;
>> +                       #address-cells = <1>;
>> +                       #size-cells = <0>;
>> +
>> +                       port@0 {
>> +                               port = <0>;
>> +                       };
>> +
>> +                       port@1 {
>> +                               port = <1>;
>> +                       };
>> +
>> +                       port@2 {
>> +                               port = <2>;
>> +                       };
>> +
>> +                       port@3 {
>> +                               port = <3>;
>> +                       };
>> +
>> +                       port@4 {
>> +                               port = <4>;
>> +                       };
>> +
>> +                       port@5 {
>> +                               port = <5>;
>> +                       };
>> +
>> +                       port@6 {
>> +                               port = <6>;
>> +                       };
>> +
>> +                       port@7 {
>> +                               port = <7>;
>> +                       };
>> +
>> +                       port@8 {
>> +                               port = <8>;
>> +                       };
>> +
>> +                       port@9 {
>> +                               port = <9>;
>> +                       };
>> +
>> +                       port@10 {
>> +                               port = <10>;
>> +                       };
>> +
>> +                       port@11 {
>> +                               port = <11>;
>> +                       };
>> +
>> +                       port@12 {
>> +                               port = <12>;
>> +                       };
>> +
>> +                       port@13 {
>> +                               port = <13>;
>> +                       };
>> +
>> +                       port@14 {
>> +                               port = <14>;
>> +                       };
>> +               };
>> +
>>                  sbefifo@2400 {
>>                          compatible = "ibm,p9-sbefifo";
>>                          reg = <0x2400 0x400>;
>> @@ -31,6 +98,73 @@
>>                                  #address-cells = <1>;
>>                                  #size-cells = <1>;
>>
>> +                               i2cm@1800 {
>> +                                       compatible = "ibm,fsi-i2c-master";
>> +                                       reg = <0x1800 0x400>;
>> +                                       #address-cells = <1>;
>> +                                       #size-cells = <0>;
>> +
>> +                                       port@0 {
>> +                                               port = <0>;
>> +                                       };
>> +
>> +                                       port@1 {
>> +                                               port = <1>;
>> +                                       };
>> +
>> +                                       port@2 {
>> +                                               port = <2>;
>> +                                       };
>> +
>> +                                       port@3 {
>> +                                               port = <3>;
>> +                                       };
>> +
>> +                                       port@4 {
>> +                                               port = <4>;
>> +                                       };
>> +
>> +                                       port@5 {
>> +                                               port = <5>;
>> +                                       };
>> +
>> +                                       port@6 {
>> +                                               port = <6>;
>> +                                       };
>> +
>> +                                       port@7 {
>> +                                               port = <7>;
>> +                                       };
>> +
>> +                                       port@8 {
>> +                                               port = <8>;
>> +                                       };
>> +
>> +                                       port@9 {
>> +                                               port = <9>;
>> +                                       };
>> +
>> +                                       port@10 {
>> +                                               port = <10>;
>> +                                       };
>> +
>> +                                       port@11 {
>> +                                               port = <11>;
>> +                                       };
>> +
>> +                                       port@12 {
>> +                                               port = <12>;
>> +                                       };
>> +
>> +                                       port@13 {
>> +                                               port = <13>;
>> +                                       };
>> +
>> +                                       port@14 {
>> +                                               port = <14>;
>> +                                       };
>> +                               };
>> +
>>                                  sbefifo@2400 {
>>                                          compatible = "ibm,p9-sbefifo";
>>                                          reg = <0x2400 0x400>;
>> --
>> 1.8.3.1
>>
Joel Stanley June 28, 2017, 10:46 p.m. UTC | #3
On Wed, Jun 28, 2017 at 11:39 PM, Eddie James
<eajames@linux.vnet.ibm.com> wrote:
>
>
> On 06/27/2017 11:57 PM, Joel Stanley wrote:
>>
>> On Tue, Jun 27, 2017 at 5:03 AM, Eddie James <eajames@linux.vnet.ibm.com>
>> wrote:
>>>
>>> From: "Edward A. James" <eajames@us.ibm.com>
>>>
>>> FSI I2C master algorithm probes port devices based on dts.
>>
>> Do you need all 28 ports enabled?
>
>
> I think so. All of those are valid I2C busses on P9. I'm not sure who uses
> them all.

Convention has been to only enable the buses that are active. Set the
default to be status = "disabled"; and then in the .dts files for each
machine that uses these will set the status = "okay".

I know that the Cronus tools use one of these for updating the SBE EEPROM.

Cheers,

Joel
diff mbox

Patch

diff --git a/arch/arm/boot/dts/ibm-power9-cfam.dtsi b/arch/arm/boot/dts/ibm-power9-cfam.dtsi
index f29c6e3..a0b5c97 100644
--- a/arch/arm/boot/dts/ibm-power9-cfam.dtsi
+++ b/arch/arm/boot/dts/ibm-power9-cfam.dtsi
@@ -4,6 +4,73 @@ 
 		#address-cells = <1>;
 		#size-cells = <1>;
 
+		i2cm@1800 {
+			compatible = "ibm,fsi-i2c-master";
+			reg = <0x1800 0x400>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				port = <0>;
+			};
+
+			port@1 {
+				port = <1>;
+			};
+
+			port@2 {
+				port = <2>;
+			};
+
+			port@3 {
+				port = <3>;
+			};
+
+			port@4 {
+				port = <4>;
+			};
+
+			port@5 {
+				port = <5>;
+			};
+
+			port@6 {
+				port = <6>;
+			};
+
+			port@7 {
+				port = <7>;
+			};
+
+			port@8 {
+				port = <8>;
+			};
+
+			port@9 {
+				port = <9>;
+			};
+
+			port@10 {
+				port = <10>;
+			};
+
+			port@11 {
+				port = <11>;
+			};
+
+			port@12 {
+				port = <12>;
+			};
+
+			port@13 {
+				port = <13>;
+			};
+
+			port@14 {
+				port = <14>;
+			};
+		};
+
 		sbefifo@2400 {
 			compatible = "ibm,p9-sbefifo";
 			reg = <0x2400 0x400>;
@@ -31,6 +98,73 @@ 
 				#address-cells = <1>;
 				#size-cells = <1>;
 
+				i2cm@1800 {
+					compatible = "ibm,fsi-i2c-master";
+					reg = <0x1800 0x400>;
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					port@0 {
+						port = <0>;
+					};
+
+					port@1 {
+						port = <1>;
+					};
+
+					port@2 {
+						port = <2>;
+					};
+
+					port@3 {
+						port = <3>;
+					};
+
+					port@4 {
+						port = <4>;
+					};
+
+					port@5 {
+						port = <5>;
+					};
+
+					port@6 {
+						port = <6>;
+					};
+
+					port@7 {
+						port = <7>;
+					};
+
+					port@8 {
+						port = <8>;
+					};
+
+					port@9 {
+						port = <9>;
+					};
+
+					port@10 {
+						port = <10>;
+					};
+
+					port@11 {
+						port = <11>;
+					};
+
+					port@12 {
+						port = <12>;
+					};
+
+					port@13 {
+						port = <13>;
+					};
+
+					port@14 {
+						port = <14>;
+					};
+				};
+
 				sbefifo@2400 {
 					compatible = "ibm,p9-sbefifo";
 					reg = <0x2400 0x400>;