Skip to contentSkip to conversation

Revise Meta(Facebook) Harma BMC(AST2600)

PATCH In review Peter Yin 2 participants 15 messages Apr 12, 2024 – Apr 15, 2024

Subsystems (2)
lore
Share & tools
lore

Peter Yin

author
#0 lore raw

v5 cover Revise Meta(Facebook) Harma BMC(AST2600)

Summary:
Revise linux device tree entry related to Meta(Facebook) Harma specific devices connected to BMC(AST2600) SoC.

Base on : https://lore.kernel.org/all/CACPK8XePx+PvDKzPMjPRn_g9z8yrtAmLvP8Qbepm1AVjuCbaKw at mail.gmail.com/

Change log:

v4 -> v5
- Patch 0011 - Add retimer device
- Patch 0012 - Modify gpio line name

v3 -> v4
- Patch 0010 - Revise node name
- fixed PDB temperature node name in Patch 0006

v2 -> v3
- Patch 0007 - Revise max31790 address
- Patch 0008 - Harma: Add NIC Fru device
- Patch 0009 - Add ltc4286 device

v1 -> v2
- Add infineon,slb9670 information for tpm.
- Patch 0006 - Add PDB temperature.

v1
- Patch 0001 - Revise SGPIO line name.
- Patch 0002 - Mapping ttyS2 to UART4.
- Patch 0003 - Remove Vuart.
- Patch 0004 - Add cpu power good line name.
- Patch 0005 - Add spi-gpio.

Peter Yin (12):
ARM: dts: aspeed: Harma: Revise SGPIO line name.
ARM: dts: aspeed: Harma: mapping ttyS2 to UART4.
ARM: dts: aspeed: Harma: Remove Vuart
ARM: dts: aspeed: Harma: Add cpu power good line name
ARM: dts: aspeed: Harma: Add spi-gpio
ARM: dts: aspeed: Harma: Add PDB temperature
ARM: dts: aspeed: Harma: Revise max31790 address
ARM: dts: aspeed: Harma: Add NIC Fru device
ARM: dts: aspeed: Harma: Add ltc4286 device
ARM: dts: aspeed: Harma: Revise node name
ARM: dts: aspeed: Harma: Add retimer device
ARM: dts: aspeed: Harma: Modify GPIO line name

 .../dts/aspeed/aspeed-bmc-facebook-harma.dts  | 107 ++++++++++++++----
 1 file changed, 85 insertions(+), 22 deletions(-)
Signature · 1 line
2.25.1
author
#1 lore raw

PATCH v5 1/12 ARM: dts: aspeed: Harma: Revise SGPIO line name.

The same name as reset-control-smb-e1s
change to reset-control-smb-e1s-0 and reset-control-smb-e1s-0.

---
 arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-harma.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-harma.dts +2 -2
index 7db3f9eb0016..8a173863ef24 100644
@@ -505,9 +505,9 @@ &sgpiom0 {
 	"","reset-control-cpu0-p1-mux",
 	"","reset-control-e1s-mux",
 	"power-host-good","reset-control-mb-mux",
-	"","reset-control-smb-e1s",
+	"","reset-control-smb-e1s-0",
 	/*E0-E3 line 64-71*/
-	"","reset-control-smb-e1s",
+	"","reset-control-smb-e1s-1",
 	"host-ready-n","reset-control-srst",
 	"presence-e1s-0","reset-control-usb-hub",
 	"","reset-control",
Signature · 1 line
2.25.1
author
#2 lore raw

PATCH v5 2/12 ARM: dts: aspeed: Harma: mapping ttyS2 to UART4.

In reply to Peter Yin

Change routing to match SOL(Serial Over LAN) settings.

---
 arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-harma.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-harma.dts +2 -2
index 8a173863ef24..a0056d633eb1 100644
@@ -12,8 +12,8 @@ / {
 
 	aliases {
 		serial0 = &uart1;
-		serial1 = &uart6;
-		serial2 = &uart2;
+		serial1 = &uart2;
+		serial2 = &uart4;
 		serial4 = &uart5;
 
 		i2c20 = &imux20;
Signature · 1 line
2.25.1
author
#3 lore raw

PATCH v5 3/12 ARM: dts: aspeed: Harma: Remove Vuart

In reply to Peter Yin

Remove vuart to avoid port conflict with uart2

---
 arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-harma.dts | 4 ----
 1 file changed, 4 deletions(-)
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-harma.dts +0 -4
index a0056d633eb1..5d692e9f541e 100644
@@ -100,10 +100,6 @@ &uart_routing {
 	status = "okay";
 };
 
-&vuart1 {
-	status = "okay";
-};
-
 &wdt1 {
 	status = "okay";
 	pinctrl-names = "default";
Signature · 1 line
2.25.1
author
#4 lore raw

PATCH v5 4/12 ARM: dts: aspeed: Harma: Add cpu power good line name

In reply to Peter Yin

Add a line name for cpu power good.

---
 arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-harma.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-harma.dts +1 -1
index 5d692e9f541e..36aad01dda20 100644
@@ -501,7 +501,7 @@ &sgpiom0 {
 	"","reset-control-cpu0-p1-mux",
 	"","reset-control-e1s-mux",
 	"power-host-good","reset-control-mb-mux",
-	"","reset-control-smb-e1s-0",
+	"power-cpu-good","reset-control-smb-e1s-0",
 	/*E0-E3 line 64-71*/
 	"","reset-control-smb-e1s-1",
 	"host-ready-n","reset-control-srst",
Signature · 1 line
2.25.1
author
#5 lore raw

PATCH v5 5/12 ARM: dts: aspeed: Harma: Add spi-gpio

In reply to Peter Yin

Add spi-gpio for tpm device.

---
 .../dts/aspeed/aspeed-bmc-facebook-harma.dts  | 21 +++++++++++++++++++
 1 file changed, 21 insertions(+)
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-harma.dts +21 -0
index 36aad01dda20..ca3052cce0e0 100644
@@ -28,6 +28,8 @@ aliases {
 		i2c29 = &imux29;
 		i2c30 = &imux30;
 		i2c31 = &imux31;
+
+		spi1 = &spi_gpio;
 	};
 
 	chosen {
@@ -67,6 +69,25 @@ led-2 {
 			gpios = <&gpio0 124 GPIO_ACTIVE_HIGH>;
 		};
 	};
+
+	spi_gpio: spi-gpio {
+		status = "okay";
+		compatible = "spi-gpio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		gpio-sck = <&gpio0 ASPEED_GPIO(Z, 3) GPIO_ACTIVE_HIGH>;
+		gpio-mosi = <&gpio0 ASPEED_GPIO(Z, 4) GPIO_ACTIVE_HIGH>;
+		gpio-miso = <&gpio0 ASPEED_GPIO(Z, 5) GPIO_ACTIVE_HIGH>;
+		num-chipselects = <1>;
+		cs-gpios = <&gpio0 ASPEED_GPIO(Z, 0) GPIO_ACTIVE_LOW>;
+
+		tpmdev at 0 {
+			compatible = "infineon,slb9670", "tcg,tpm_tis-spi";
+			spi-max-frequency = <33000000>;
+			reg = <0>;
+		};
+	};
 };
 
 // HOST BIOS Debug
Signature · 1 line
2.25.1
author
#6 lore raw

PATCH v5 6/12 ARM: dts: aspeed: Harma: Add PDB temperature

In reply to Peter Yin

Add PDB temperature sensor.

---
 arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-harma.dts | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-harma.dts +6 -1
index ca3052cce0e0..5c3fa8bbaced 100644
@@ -203,7 +203,7 @@ max31790 at 30{
 &i2c1 {
 	status = "okay";
 
-	tmp75 at 4b {
+	temperature-sensor at 4b {
 		compatible = "ti,tmp75";
 		reg = <0x4b>;
 	};
@@ -260,6 +260,11 @@ delta_brick at 69 {
 		compatible = "pmbus";
 		reg = <0x69>;
 	};
+
+	temperature-sensor at 49 {
+		compatible = "ti,tmp75";
+		reg = <0x49>;
+	};
 };
 
 &i2c5 {
Signature · 1 line
2.25.1
author
#7 lore raw

PATCH v5 7/12 ARM: dts: aspeed: Harma: Revise max31790 address

In reply to Peter Yin

Revise max31790 address from 0x30 to 0x5e

---
 arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-harma.dts | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-harma.dts +4 -4
index 5c3fa8bbaced..7e98af5836cf 100644
@@ -192,9 +192,9 @@ &kcs3 {
 &i2c0 {
 	status = "okay";
 
-	max31790 at 30{
+	max31790 at 5e{
 		compatible = "max31790";
-		reg = <0x30>;
+		reg = <0x5e>;
 		#address-cells = <1>;
 		#size-cells = <0>;
 	};
@@ -212,9 +212,9 @@ temperature-sensor at 4b {
 &i2c2 {
 	status = "okay";
 
-	max31790 at 30{
+	max31790 at 5e{
 		compatible = "max31790";
-		reg = <0x30>;
+		reg = <0x5e>;
 		#address-cells = <1>;
 		#size-cells = <0>;
 	};
Signature · 1 line
2.25.1
author
#8 lore raw

PATCH v5 8/12 ARM: dts: aspeed: Harma: Add NIC Fru device

In reply to Peter Yin

Add MB NIC Device

---
 arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-harma.dts | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-harma.dts +6 -0
index 7e98af5836cf..6e9e6e559838 100644
@@ -207,6 +207,12 @@ temperature-sensor at 4b {
 		compatible = "ti,tmp75";
 		reg = <0x4b>;
 	};
+
+	// MB NIC FRU
+	eeprom at 50 {
+		compatible = "atmel,24c64";
+		reg = <0x50>;
+	};
 };
 
 &i2c2 {
Signature · 1 line
2.25.1
author
#9 lore raw

PATCH v5 9/12 ARM: dts: aspeed: Harma: Add ltc4286 device

In reply to Peter Yin

Add ltc4286 device.

---
 arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-harma.dts | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-harma.dts +7 -0
index 6e9e6e559838..7dd48c384a4d 100644
@@ -271,6 +271,13 @@ temperature-sensor at 49 {
 		compatible = "ti,tmp75";
 		reg = <0x49>;
 	};
+
+	power-monitor at 22 {
+		compatible = "lltc,ltc4286";
+		reg = <0x22>;
+		adi,vrange-low-enable;
+		shunt-resistor-micro-ohms = <500>;
+	};
 };
 
 &i2c5 {
Signature · 1 line
2.25.1
author
#10 lore raw

PATCH v5 10/12 ARM: dts: aspeed: Harma: Revise node name

In reply to Peter Yin

Revise max31790 and delta_brick node name.

---
 arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-harma.dts | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-harma.dts +3 -3
index 7dd48c384a4d..530f69005857 100644
@@ -192,7 +192,7 @@ &kcs3 {
 &i2c0 {
 	status = "okay";
 
-	max31790 at 5e{
+	pwm at 5e{
 		compatible = "max31790";
 		reg = <0x5e>;
 		#address-cells = <1>;
@@ -218,7 +218,7 @@ eeprom at 50 {
 &i2c2 {
 	status = "okay";
 
-	max31790 at 5e{
+	pwm at 5e{
 		compatible = "max31790";
 		reg = <0x5e>;
 		#address-cells = <1>;
@@ -262,7 +262,7 @@ eeprom at 52 {
 		reg = <0x52>;
 	};
 
-	delta_brick at 69 {
+	power-monitor at 69 {
 		compatible = "pmbus";
 		reg = <0x69>;
 	};
Signature · 1 line
2.25.1
author
#11 lore raw

PATCH v5 11/12 ARM: dts: aspeed: Harma: Add retimer device

In reply to Peter Yin

Add pt5161l device in i2c bus12 and bus21.

---
 arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-harma.dts | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-harma.dts +8 -0
index 530f69005857..a5abb16e5d8b 100644
@@ -250,6 +250,10 @@ imux21: i2c at 1 {
 			#address-cells = <1>;
 			#size-cells = <0>;
 			reg = <1>;
+			retimer at 24 {
+				compatible = "asteralabs,pt5161l";
+				reg = <0x24>;
+			};
 		};
 	};
 };
@@ -370,6 +374,10 @@ &i2c11 {
 
 &i2c12 {
 	status = "okay";
+	retimer at 24 {
+		compatible = "asteralabs,pt5161l";
+		reg = <0x24>;
+	};
 };
 
 &i2c13 {
Signature · 1 line
2.25.1
author
#12 lore raw

PATCH v5 12/12 ARM: dts: aspeed: Harma: Modify GPIO line name

In reply to Peter Yin

Add:
"reset-cause-platrst", "cpu0-err-alert", "leakage-detect-alert", "presence-post-card", "ac-power-button", "P0_I3C_APML_ALERT_L", "irq-uv-detect-alert", "irq-hsc-alert", "cpu0-prochot-alert", "cpu0-thermtrip-alert", "reset-cause-pcie", "pvdd11-ocp-alert"

Rename:
"power-cpu-good" to "host0-ready",
"host-ready-n" to "post-end-n

---
 .../dts/aspeed/aspeed-bmc-facebook-harma.dts  | 38 ++++++++++++++-----
 1 file changed, 29 insertions(+), 9 deletions(-)
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-harma.dts +29 -9
index a5abb16e5d8b..e7f4823ca4b3 100644
@@ -332,6 +332,12 @@ gpio at 31 {
 		reg = <0x31>;
 		gpio-controller;
 		#gpio-cells = <2>;
+
+		gpio-line-names =
+		"","","","",
+		"","","presence-cmm","",
+		"","","","",
+		"","","","";
 	};
 
 	i2c-mux at 71 {
@@ -471,7 +477,8 @@ &gpio0 {
 	/*A0-A7*/	"","","","","","","","",
 	/*B0-B7*/	"","","","",
 			"bmc-spi-mux-select-0","led-identify","","",
-	/*C0-C7*/	"","","","","","","","",
+	/*C0-C7*/	"reset-cause-platrst","","","","",
+			"cpu0-err-alert","","",
 	/*D0-D7*/	"","","sol-uart-select","","","","","",
 	/*E0-E7*/	"","","","","","","","",
 	/*F0-F7*/	"","","","","","","","",
@@ -480,7 +487,8 @@ &gpio0 {
 	/*I0-I7*/	"","","","","","","","",
 	/*J0-J7*/	"","","","","","","","",
 	/*K0-K7*/	"","","","","","","","",
-	/*L0-L7*/	"","","","","","","","",
+	/*L0-L7*/	"","","","",
+			"leakage-detect-alert","","","",
 	/*M0-M7*/	"","","","","","","","",
 	/*N0-N7*/	"led-postcode-0","led-postcode-1",
 			"led-postcode-2","led-postcode-3",
@@ -499,7 +507,16 @@ &gpio0 {
 	/*W0-W7*/	"","","","","","","","",
 	/*X0-X7*/	"","","","","","","","",
 	/*Y0-Y7*/	"","","","","","","","",
-	/*Z0-Z7*/	"","","","","","","","";
+	/*Z0-Z7*/	"","","","","","","presence-post-card","";
+};
+
+&gpio1 {
+	gpio-line-names =
+	/*18A0-18A7*/ "ac-power-button","","","","","","","",
+	/*18B0-18B7*/ "","","","","","","","",
+	/*18C0-18C7*/ "","","","","","","","",
+	/*18D0-18D7*/ "","","","","","","","",
+	/*18E0-18E3*/ "","","","","","","","";
 };
 
 &sgpiom0 {
@@ -548,10 +565,10 @@ &sgpiom0 {
 	"","reset-control-cpu0-p1-mux",
 	"","reset-control-e1s-mux",
 	"power-host-good","reset-control-mb-mux",
-	"power-cpu-good","reset-control-smb-e1s-0",
+	"host0-ready","reset-control-smb-e1s-0",
 	/*E0-E3 line 64-71*/
 	"","reset-control-smb-e1s-1",
-	"host-ready-n","reset-control-srst",
+	"post-end-n","reset-control-srst",
 	"presence-e1s-0","reset-control-usb-hub",
 	"","reset-control",
 	/*E4-E7 line 72-79*/
@@ -602,13 +619,16 @@ &sgpiom0 {
 	"SLOT_ID_BCB_2","",
 	"SLOT_ID_BCB_3","",
 	/*K0-K3 line 160-167*/
-	"","","","","","","","",
+	"","","","","","","P0_I3C_APML_ALERT_L","",
 	/*K4-K7 line 168-175*/
-	"","","","","","","","",
+	"","","","","","","irq-uv-detect-alert","",
 	/*L0-L3 line 176-183*/
-	"","","","","","","","",
+	"irq-hsc-alert","",
+	"cpu0-prochot-alert","",
+	"cpu0-thermtrip-alert","",
+	"reset-cause-pcie","",
 	/*L4-L7 line 184-191*/
-	"","","","","","","","",
+	"pvdd11-ocp-alert","","","","","","","",
 	/*M0-M3 line 192-199*/
 	"","","","","","","","",
 	/*M4-M7 line 200-207*/
Signature · 1 line
2.25.1
maintainer
#13 lore raw
In reply to Peter Yin
Quoted 46 lines · Peter Yin

Summary:
Revise linux device tree entry related to Meta(Facebook) Harma specific devices connected to BMC(AST2600) SoC.

Base on : https://lore.kernel.org/all/CACPK8XePx+PvDKzPMjPRn_g9z8yrtAmLvP8Qbepm1AVjuCbaKw at mail.gmail.com/

Change log:

v4 -> v5
- Patch 0011 - Add retimer device
- Patch 0012 - Modify gpio line name

v3 -> v4
- Patch 0010 - Revise node name
- fixed PDB temperature node name in Patch 0006

v2 -> v3
- Patch 0007 - Revise max31790 address
- Patch 0008 - Harma: Add NIC Fru device
- Patch 0009 - Add ltc4286 device

v1 -> v2
- Add infineon,slb9670 information for tpm.
- Patch 0006 - Add PDB temperature.

v1
- Patch 0001 - Revise SGPIO line name.
- Patch 0002 - Mapping ttyS2 to UART4.
- Patch 0003 - Remove Vuart.
- Patch 0004 - Add cpu power good line name.
- Patch 0005 - Add spi-gpio.

Peter Yin (12):
ARM: dts: aspeed: Harma: Revise SGPIO line name.
ARM: dts: aspeed: Harma: mapping ttyS2 to UART4.
ARM: dts: aspeed: Harma: Remove Vuart
ARM: dts: aspeed: Harma: Add cpu power good line name
ARM: dts: aspeed: Harma: Add spi-gpio
ARM: dts: aspeed: Harma: Add PDB temperature
ARM: dts: aspeed: Harma: Revise max31790 address
ARM: dts: aspeed: Harma: Add NIC Fru device
ARM: dts: aspeed: Harma: Add ltc4286 device
ARM: dts: aspeed: Harma: Revise node name
ARM: dts: aspeed: Harma: Add retimer device
ARM: dts: aspeed: Harma: Modify GPIO line name

Quoted 3 lines
 .../dts/aspeed/aspeed-bmc-facebook-harma.dts  | 107 ++++++++++++++----
 1 file changed, 85 insertions(+), 22 deletions(-)

Joel had applied an earlier version of this series to his for-next branch. I'm collecting patches targeting it while he's on leave. I've updated the series he'd applied to the v5 you've posted here.

Can you please post any further changes as patches on top? You can find my branch here:

https://github.com/amboar/linux/tree/for/bmc/dt-6.10

Andrew

#14 lore raw

Sure thing, I will base on version 5 for future modifications.

Thanks.

Quoted 62 lines · On Mon, Apr 15, 2024 at 10:00?AM Andrew Jeffery <[email protected]>…
Quoted 46 lines · Peter Yin

Summary:
Revise linux device tree entry related to Meta(Facebook) Harma specific devices connected to BMC(AST2600) SoC.

Base on : https://lore.kernel.org/all/CACPK8XePx+PvDKzPMjPRn_g9z8yrtAmLvP8Qbepm1AVjuCbaKw at mail.gmail.com/

Change log:

v4 -> v5
- Patch 0011 - Add retimer device
- Patch 0012 - Modify gpio line name

v3 -> v4
- Patch 0010 - Revise node name
- fixed PDB temperature node name in Patch 0006

v2 -> v3
- Patch 0007 - Revise max31790 address
- Patch 0008 - Harma: Add NIC Fru device
- Patch 0009 - Add ltc4286 device

v1 -> v2
- Add infineon,slb9670 information for tpm.
- Patch 0006 - Add PDB temperature.

v1
- Patch 0001 - Revise SGPIO line name.
- Patch 0002 - Mapping ttyS2 to UART4.
- Patch 0003 - Remove Vuart.
- Patch 0004 - Add cpu power good line name.
- Patch 0005 - Add spi-gpio.

Peter Yin (12):
ARM: dts: aspeed: Harma: Revise SGPIO line name.
ARM: dts: aspeed: Harma: mapping ttyS2 to UART4.
ARM: dts: aspeed: Harma: Remove Vuart
ARM: dts: aspeed: Harma: Add cpu power good line name
ARM: dts: aspeed: Harma: Add spi-gpio
ARM: dts: aspeed: Harma: Add PDB temperature
ARM: dts: aspeed: Harma: Revise max31790 address
ARM: dts: aspeed: Harma: Add NIC Fru device
ARM: dts: aspeed: Harma: Add ltc4286 device
ARM: dts: aspeed: Harma: Revise node name
ARM: dts: aspeed: Harma: Add retimer device
ARM: dts: aspeed: Harma: Modify GPIO line name

Quoted 3 lines
 .../dts/aspeed/aspeed-bmc-facebook-harma.dts  | 107 ++++++++++++++----
 1 file changed, 85 insertions(+), 22 deletions(-)

Joel had applied an earlier version of this series to his for-next branch. I'm collecting patches targeting it while he's on leave. I've updated the series he'd applied to the v5 you've posted here.

Can you please post any further changes as patches on top? You can find my branch here:

https://github.com/amboar/linux/tree/for/bmc/dt-6.10

Andrew