diff mbox series

[v1,2/8] ARM: dts: aspeed: yosemite4: Add i2c-mux for four NICs

Message ID 20240930070500.3174431-3-Delphine_CC_Chiu@wiwynn.com (mailing list archive)
State New, archived
Headers show
Series Add I2C mux devices for yosemite4 | expand

Commit Message

Delphine CC Chiu Sept. 30, 2024, 7:04 a.m. UTC
From: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com>

Add i2c-mux on Spider board for four NICs and add the temperature sensor
and EEPROM for the NICs.

Signed-off-by: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com>
Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
---
 .../aspeed/aspeed-bmc-facebook-yosemite4.dts  | 75 ++++++++++++++++++-
 1 file changed, 72 insertions(+), 3 deletions(-)

Comments

Andrew Jeffery Oct. 1, 2024, 12:37 a.m. UTC | #1
On Mon, 2024-09-30 at 15:04 +0800, Delphine CC Chiu wrote:
> From: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com>
> 
> Add i2c-mux on Spider board for four NICs and add the temperature sensor
> and EEPROM for the NICs.
> 
> Signed-off-by: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com>
> Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
> ---
>  .../aspeed/aspeed-bmc-facebook-yosemite4.dts  | 75 ++++++++++++++++++-
>  1 file changed, 72 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts
> index dbc992a625b7..b813140b3c5b 100644
> --- a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts
> +++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts
> @@ -26,6 +26,10 @@ aliases {
>  		i2c21 = &imux21;
>  		i2c22 = &imux22;
>  		i2c23 = &imux23;
> +		i2c24 = &imux24;
> +		i2c25 = &imux25;
> +		i2c26 = &imux26;
> +		i2c27 = &imux27;
>  		i2c34 = &imux34;
>  		i2c35 = &imux35;
>  	};
> @@ -1196,8 +1200,9 @@ adc@35 {
>  };
>  
>  &i2c15 {
> +	#address-cells = <1>;
> +	#size-cells = <0>;
>  	status = "okay";
> -	mctp-controller;

Why are you deleting this if you're not also deleting the MCTP endpoint
node?

Unless there's some reason this is related to the NICs, this should be
its own patch with its own justification.

Andrew
Delphine CC Chiu Oct. 1, 2024, 7:52 a.m. UTC | #2
> -----Original Message-----
> From: Andrew Jeffery <andrew@codeconstruct.com.au>
> Sent: Tuesday, October 1, 2024 8:37 AM
> To: Delphine_CC_Chiu/WYHQ/Wiwynn <Delphine_CC_Chiu@wiwynn.com>;
> patrick@stwcx.xyz; Rob Herring <robh@kernel.org>; Krzysztof Kozlowski
> <krzk+dt@kernel.org>; Conor Dooley <conor+dt@kernel.org>; Joel Stanley
> <joel@jms.id.au>
> Cc: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com>;
> devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
> linux-aspeed@lists.ozlabs.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH v1 2/8] ARM: dts: aspeed: yosemite4: Add i2c-mux for four
> NICs
> 
>  [External Sender]
> 
>  [External Sender]
> 
> On Mon, 2024-09-30 at 15:04 +0800, Delphine CC Chiu wrote:
> > From: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com>
> >
> > Add i2c-mux on Spider board for four NICs and add the temperature
> > sensor and EEPROM for the NICs.
> >
> > Signed-off-by: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com>
> > Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
> > ---
> >  .../aspeed/aspeed-bmc-facebook-yosemite4.dts  | 75
> > ++++++++++++++++++-
> >  1 file changed, 72 insertions(+), 3 deletions(-)
> >
> > diff --git
> > a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts
> > b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts
> > index dbc992a625b7..b813140b3c5b 100644
> > --- a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts
> > +++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts
> > @@ -26,6 +26,10 @@ aliases {
> >               i2c21 = &imux21;
> >               i2c22 = &imux22;
> >               i2c23 = &imux23;
> > +             i2c24 = &imux24;
> > +             i2c25 = &imux25;
> > +             i2c26 = &imux26;
> > +             i2c27 = &imux27;
> >               i2c34 = &imux34;
> >               i2c35 = &imux35;
> >       };
> > @@ -1196,8 +1200,9 @@ adc@35 {
> >  };
> >
> >  &i2c15 {
> > +     #address-cells = <1>;
> > +     #size-cells = <0>;
> >       status = "okay";
> > -     mctp-controller;
> 
> Why are you deleting this if you're not also deleting the MCTP endpoint node?
> 
> Unless there's some reason this is related to the NICs, this should be its own
> patch with its own justification.
> 
> Andrew
Hi Andrew,

We have discussed with Jeremy from Code Construct about removing the
mctp-controller on bus 15 before.

He thought it would be better to add the mctp-controller on each i2c mux port
so the MCTP driver would ensure that the mux was configured properly before
communicating with the device.

I'll split a patch to remove the mctp-controller on bus 15 in next serial of patches.

Regards,
Ricky
Andrew Jeffery Oct. 2, 2024, 1:47 a.m. UTC | #3
On Tue, 2024-10-01 at 07:52 +0000, Delphine_CC_Chiu/WYHQ/Wiwynn wrote:
> 
> > -----Original Message-----
> > From: Andrew Jeffery <andrew@codeconstruct.com.au>
> > Sent: Tuesday, October 1, 2024 8:37 AM
> > To: Delphine_CC_Chiu/WYHQ/Wiwynn <Delphine_CC_Chiu@wiwynn.com>;
> > patrick@stwcx.xyz; Rob Herring <robh@kernel.org>; Krzysztof Kozlowski
> > <krzk+dt@kernel.org>; Conor Dooley <conor+dt@kernel.org>; Joel Stanley
> > <joel@jms.id.au>
> > Cc: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com>;
> > devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
> > linux-aspeed@lists.ozlabs.org; linux-kernel@vger.kernel.org
> > Subject: Re: [PATCH v1 2/8] ARM: dts: aspeed: yosemite4: Add i2c-mux for four
> > NICs
> > 
> >  [External Sender]
> > 
> >  [External Sender]
> > 
> > On Mon, 2024-09-30 at 15:04 +0800, Delphine CC Chiu wrote:
> > > From: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com>
> > > 
> > > Add i2c-mux on Spider board for four NICs and add the temperature
> > > sensor and EEPROM for the NICs.
> > > 
> > > Signed-off-by: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com>
> > > Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
> > > ---
> > >  .../aspeed/aspeed-bmc-facebook-yosemite4.dts  | 75
> > > ++++++++++++++++++-
> > >  1 file changed, 72 insertions(+), 3 deletions(-)
> > > 
> > > diff --git
> > > a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts
> > > b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts
> > > index dbc992a625b7..b813140b3c5b 100644
> > > --- a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts
> > > +++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts
> > > @@ -26,6 +26,10 @@ aliases {
> > >               i2c21 = &imux21;
> > >               i2c22 = &imux22;
> > >               i2c23 = &imux23;
> > > +             i2c24 = &imux24;
> > > +             i2c25 = &imux25;
> > > +             i2c26 = &imux26;
> > > +             i2c27 = &imux27;
> > >               i2c34 = &imux34;
> > >               i2c35 = &imux35;
> > >       };
> > > @@ -1196,8 +1200,9 @@ adc@35 {
> > >  };
> > > 
> > >  &i2c15 {
> > > +     #address-cells = <1>;
> > > +     #size-cells = <0>;
> > >       status = "okay";
> > > -     mctp-controller;
> > 
> > Why are you deleting this if you're not also deleting the MCTP endpoint node?
> > 
> > Unless there's some reason this is related to the NICs, this should be its own
> > patch with its own justification.
> > 
> > Andrew
> Hi Andrew,
> 
> We have discussed with Jeremy from Code Construct about removing the
> mctp-controller on bus 15 before.
> 
> He thought it would be better to add the mctp-controller on each i2c mux port
> so the MCTP driver would ensure that the mux was configured properly before
> communicating with the device.
> 
> I'll split a patch to remove the mctp-controller on bus 15 in next serial of patches.

Ah, so having looked through v2, I can see what you're trying to
achieve. I don't think it's necessary to split this out from the NIC
mux patch, they are related.

Andrew
Delphine CC Chiu Oct. 3, 2024, 7:42 a.m. UTC | #4
> -----Original Message-----
> From: Andrew Jeffery <andrew@codeconstruct.com.au>
> Sent: Wednesday, October 2, 2024 9:48 AM
> To: Delphine_CC_Chiu/WYHQ/Wiwynn <Delphine_CC_Chiu@wiwynn.com>;
> patrick@stwcx.xyz; Rob Herring <robh@kernel.org>; Krzysztof Kozlowski
> <krzk+dt@kernel.org>; Conor Dooley <conor+dt@kernel.org>; Joel Stanley
> <joel@jms.id.au>
> Cc: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com>;
> devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
> linux-aspeed@lists.ozlabs.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH v1 2/8] ARM: dts: aspeed: yosemite4: Add i2c-mux for four
> NICs
> 
>  [External Sender]
> 
>  [External Sender]
> 
> On Tue, 2024-10-01 at 07:52 +0000, Delphine_CC_Chiu/WYHQ/Wiwynn wrote:
> >
> > > -----Original Message-----
> > > From: Andrew Jeffery <andrew@codeconstruct.com.au>
> > > Sent: Tuesday, October 1, 2024 8:37 AM
> > > To: Delphine_CC_Chiu/WYHQ/Wiwynn
> <Delphine_CC_Chiu@wiwynn.com>;
> > > patrick@stwcx.xyz; Rob Herring <robh@kernel.org>; Krzysztof
> > > Kozlowski <krzk+dt@kernel.org>; Conor Dooley <conor+dt@kernel.org>;
> > > Joel Stanley <joel@jms.id.au>
> > > Cc: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com>;
> > > devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
> > > linux-aspeed@lists.ozlabs.org; linux-kernel@vger.kernel.org
> > > Subject: Re: [PATCH v1 2/8] ARM: dts: aspeed: yosemite4: Add i2c-mux
> > > for four NICs
> > >
> > >  [External Sender]
> > >
> > >  [External Sender]
> > >
> > > On Mon, 2024-09-30 at 15:04 +0800, Delphine CC Chiu wrote:
> > > > From: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com>
> > > >
> > > > Add i2c-mux on Spider board for four NICs and add the temperature
> > > > sensor and EEPROM for the NICs.
> > > >
> > > > Signed-off-by: Ricky CX Wu <ricky.cx.wu.wiwynn@gmail.com>
> > > > Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
> > > > ---
> > > >  .../aspeed/aspeed-bmc-facebook-yosemite4.dts  | 75
> > > > ++++++++++++++++++-
> > > >  1 file changed, 72 insertions(+), 3 deletions(-)
> > > >
> > > > diff --git
> > > > a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts
> > > > b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts
> > > > index dbc992a625b7..b813140b3c5b 100644
> > > > --- a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts
> > > > +++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts
> > > > @@ -26,6 +26,10 @@ aliases {
> > > >               i2c21 = &imux21;
> > > >               i2c22 = &imux22;
> > > >               i2c23 = &imux23;
> > > > +             i2c24 = &imux24;
> > > > +             i2c25 = &imux25;
> > > > +             i2c26 = &imux26;
> > > > +             i2c27 = &imux27;
> > > >               i2c34 = &imux34;
> > > >               i2c35 = &imux35;
> > > >       };
> > > > @@ -1196,8 +1200,9 @@ adc@35 {
> > > >  };
> > > >
> > > >  &i2c15 {
> > > > +     #address-cells = <1>;
> > > > +     #size-cells = <0>;
> > > >       status = "okay";
> > > > -     mctp-controller;
> > >
> > > Why are you deleting this if you're not also deleting the MCTP endpoint
> node?
> > >
> > > Unless there's some reason this is related to the NICs, this should
> > > be its own patch with its own justification.
> > >
> > > Andrew
> > Hi Andrew,
> >
> > We have discussed with Jeremy from Code Construct about removing the
> > mctp-controller on bus 15 before.
> >
> > He thought it would be better to add the mctp-controller on each i2c
> > mux port so the MCTP driver would ensure that the mux was configured
> > properly before communicating with the device.
> >
> > I'll split a patch to remove the mctp-controller on bus 15 in next serial of
> patches.
> 
> Ah, so having looked through v2, I can see what you're trying to achieve. I don't
> think it's necessary to split this out from the NIC mux patch, they are related.
> 
> Andrew
Sure, I'll merge the patch to the NIC mux patch in the next version of patches.

Regards,
Ricky
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts
index dbc992a625b7..b813140b3c5b 100644
--- a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts
+++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts
@@ -26,6 +26,10 @@  aliases {
 		i2c21 = &imux21;
 		i2c22 = &imux22;
 		i2c23 = &imux23;
+		i2c24 = &imux24;
+		i2c25 = &imux25;
+		i2c26 = &imux26;
+		i2c27 = &imux27;
 		i2c34 = &imux34;
 		i2c35 = &imux35;
 	};
@@ -1196,8 +1200,9 @@  adc@35 {
 };
 
 &i2c15 {
+	#address-cells = <1>;
+	#size-cells = <0>;
 	status = "okay";
-	mctp-controller;
 	multi-master;
 	bus-frequency = <400000>;
 
@@ -1208,9 +1213,73 @@  mctp@10 {
 
 	i2c-mux@72 {
 		compatible = "nxp,pca9544";
-		idle-state = <0>;
-		i2c-mux-idle-disconnect;
 		reg = <0x72>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		imux24: i2c@0 {
+			reg = <0>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			mctp-controller;
+			temperature-sensor@1f {
+				compatible = "ti,tmp421";
+				reg = <0x1f>;
+			};
+
+			eeprom@50 {
+				compatible = "atmel,24c64";
+				reg = <0x50>;
+			};
+		};
+
+		imux25: i2c@1 {
+			reg = <1>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			mctp-controller;
+			temperature-sensor@1f {
+				compatible = "ti,tmp421";
+				reg = <0x1f>;
+			};
+
+			eeprom@50 {
+				compatible = "atmel,24c64";
+				reg = <0x50>;
+			};
+		};
+
+		imux26: i2c@2 {
+			reg = <2>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			mctp-controller;
+			temperature-sensor@1f {
+				compatible = "ti,tmp421";
+				reg = <0x1f>;
+			};
+
+			eeprom@50 {
+				compatible = "atmel,24c64";
+				reg = <0x50>;
+			};
+		};
+
+		imux27: i2c@3 {
+			reg = <3>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			mctp-controller;
+			temperature-sensor@1f {
+				compatible = "ti,tmp421";
+				reg = <0x1f>;
+			};
+
+			eeprom@50 {
+				compatible = "atmel,24c64";
+				reg = <0x50>;
+			};
+		};
 	};
 };