Skip to contentSkip to conversation

Add Meta (Facebook) Ventura BMC (AST2600)

PATCH Superseded P.K. Lee 2 participants 10 messages Feb 26 – Apr 15

Subsystems (2)

v12 of 13 Superseded Latest is v13 →

lore
Share & tools
lore

P.K. Lee

author
#0 lore raw

v12 cover Add Meta (Facebook) Ventura BMC (AST2600)

Add Linux device tree entry related to Meta (Facebook) Ventura specific devices connected to the BMC (AST2600) SoC. The purpose of Ventura is to detect liquid leakage from all compute trays, switch trays and rack sensors within the rack, log the events, and take necessary actions accordingly.

---
v1:
1. Create ventura dts file.
2. Add commit msg.
3. Use format-patch to generate patch.
4. Add subject prefixes matching the subsystem.
---
v2:
1. Modify email content.
---
v3:
1. Add mail list.
---
v4:
1. Apply git send-email --thread option.
2. Sort nodes in the dts alphanumerically.
---
v5:
1. Run scripts/checkpatch.pl and fix reported warnings.
2. Remove unnecessary 88E6393X CONFIG FRU.
---
v6:
1. Add a new stage for the DTS change.
2. Run scripts/checkpatch.pl and fix reported error.
3. Fix the issue in a separate patch.
---
v7:
1. Fix broken indentation in the device tree file.
2. Sort nodes alphabetically, then by address if equal.
3. Rename fan sensor nodes from 'hwmon' to 'fan-controller'.
---
v8:
1. This patch series has significant changes compared to previous versions, and quite some time has passed since the last submission.Therefore, previously received Acked-by/Reviewed-by/Tested-by tags are not included in this version.
If needed, tags can be added again after review of thisnew version.
---
v9:
1. Reordered the node sequence under i2c5.
2. Added a description of the platform's intended use to the commit messages.
3. Added 3 GPIO expanders to i2c10 and defined the necessary GPIO line names.
---
v10:
1. Added IRQ support in GPIO expanders under i2c10 to handle edge-triggered events.
2. Reordered the nodes.
---
v11:
1. Modified the position for i2c3mux0ch6 and i2c3mux0ch7.
---
v12:
1. Added a GPIO expander at address 0x11 on i2c10, and assign an SGPIO pin as the IRQ for it.
2. Fixed the "failed to match any schema with compatible" issues.
3. Reorder the nodes in alphabetically.

P.K. Lee (2):
dt-bindings: arm: aspeed: add Meta Ventura board
arm: dts: aspeed: ventura: add Meta Ventura BMC

 .../bindings/arm/aspeed/aspeed.yaml           |    1 +
 arch/arm/boot/dts/aspeed/Makefile             |    1 +
 .../aspeed/aspeed-bmc-facebook-ventura.dts    | 1592 +++++++++++++++++
 3 files changed, 1594 insertions(+)
 create mode 100644 arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-ventura.dts

base-commit: e11fa6b1ff6c27c808d17e479bd7d5582e772062
branch: dev-6.6

Signature · 1 line
2.43.0
author
#1 lore raw

PATCH v12 1/2 dt-bindings: arm: aspeed: add Meta Ventura board

Document the new compatibles used on Meta Ventura.

---
 Documentation/devicetree/bindings/arm/aspeed/aspeed.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/aspeed/aspeed.yaml +1 -0
index aedefca7cf4a..afabfe22c8f3 100644
@@ -92,6 +92,7 @@ properties:
               - facebook,harma-bmc
               - facebook,minerva-cmc
               - facebook,santabarbara-bmc
+              - facebook,ventura-rmc
               - facebook,yosemite4-bmc
               - ibm,blueridge-bmc
               - ibm,everest-bmc
Signature · 1 line
2.43.0
author
#2 lore raw

PATCH v12 2/2 arm: dts: aspeed: ventura: add Meta Ventura BMC

In reply to P.K. Lee

Add Linux device tree related to Meta (Facebook) Ventura specific devices connected to the BMC (AST2600) SoC. The purpose of Ventura is to detect liquid leakage from all compute trays, switch trays and rack sensors within the rack, log the events, and take necessary actions accordingly.

---
 arch/arm/boot/dts/aspeed/Makefile             |    1 +
 .../aspeed/aspeed-bmc-facebook-ventura.dts    | 1592 +++++++++++++++++
 2 files changed, 1593 insertions(+)
 create mode 100644 arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-ventura.dts
arch/arm/boot/dts/aspeed/Makefile +1 -0
index 0f0b5b707654..f5ac72d5933c 100644
@@ -32,6 +32,7 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
 	aspeed-bmc-facebook-minipack.dtb \
 	aspeed-bmc-facebook-santabarbara.dtb \
 	aspeed-bmc-facebook-tiogapass.dtb \
+	aspeed-bmc-facebook-ventura.dtb \
 	aspeed-bmc-facebook-wedge40.dtb \
 	aspeed-bmc-facebook-wedge100.dtb \
 	aspeed-bmc-facebook-wedge400-data64.dtb \
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-ventura.dts new file +1592 -0

1,592 lines not on this page · raw message

Signature · 1 line
2.43.0
#3 lore raw

Re: [PATCH v12 2/2] arm: dts: aspeed: ventura: add Meta Ventura BMC

arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-ventura.dts line 1419

Quoted 9 lines

+&mac3 {

arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-ventura.dts new file +8 -0
+	status = "okay";
+	phy-mode = "rmii";
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_rmii4_default>;
+	fixed-link {
+		speed = <100>;
+		full-duplex;
+	};

What is on the other end of this fixed link?

arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-ventura.dts line 1424

Quoted 5 lines
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-ventura.dts new file +5 -0
+};
+
+&mdio0 {
+	status = "okay";
+};

If there are no devices on the bus, why enable it?

Andrew

author
#4 lore raw

Re: [PATCH v12 2/2] arm: dts: aspeed: ventura: add Meta Ventura BMC

Quoted 11 lines

arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-ventura.dts line 1419

Quoted 9 lines

+&mac3 {

arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-ventura.dts new file +8 -0
+     status = "okay";
+     phy-mode = "rmii";
+     pinctrl-names = "default";
+     pinctrl-0 = <&pinctrl_rmii4_default>;
+     fixed-link {
+             speed = <100>;
+             full-duplex;
+     };

What is on the other end of this fixed link?

The other end of this fixed link is the CPU port of a Marvell 88E6393X switch. We are using this switch in unmanaged mode rather than using the DSA subsystem. Therefore, we use a fixed-link to force the mac3 to 100Mbps full-duplex RMII to match the CPU port configuration.

Quoted 8 lines

arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-ventura.dts line 1424

Quoted 6 lines
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-ventura.dts new file +5 -0
+};
+
+&mdio0 {
+     status = "okay";
+};

If there are no devices on the bus, why enable it?

We intentionally enable it so user-space tools can access the switch registers. I have added a comment in v13 to clarify this.

Quoted 2 lines

Andrew

P.K. Lee

#5 lore raw

Re: [PATCH v12 2/2] arm: dts: aspeed: ventura: add Meta Ventura BMC

Quoted 10 lines · PK Lee
Quoted 10 lines
Quoted 9 lines

+&mac3 {

arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-ventura.dts new file +8 -0
+     status = "okay";
+     phy-mode = "rmii";
+     pinctrl-names = "default";
+     pinctrl-0 = <&pinctrl_rmii4_default>;
+     fixed-link {
+             speed = <100>;
+             full-duplex;
+     };
Quoted 6 lines
Quoted 1 line

What is on the other end of this fixed link?

The other end of this fixed link is the CPU port of a Marvell 88E6393X switch. We are using this switch in unmanaged mode rather than using the DSA subsystem. Therefore, we use a fixed-link to force the mac3 to 100Mbps full-duplex RMII to match the CPU port configuration.

You are mixing up terms. The 88E6393X does not have a dedicated port for connecting to the host CPU. Any port can be connected to the host, using DSA tags. And all the ports are 1G or faster, so it seems odd to limit it to 100Mbps. There is something consider a CPU port, but that connects the internal Z80 CPU to the switch fabric.

Quoted 10 lines
Quoted 7 lines

arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-ventura.dts line 1424

Quoted 5 lines
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-ventura.dts new file +5 -0
+};
+
+&mdio0 {
+     status = "okay";
+};

If there are no devices on the bus, why enable it?

We intentionally enable it so user-space tools can access the switch registers. I have added a comment in v13 to clarify this.

Why would user space want to access the switch registers for an unmanaged switch? It sounds like you are using Marvells SDK in userspace to manage the switch, rather than using DSA.

Andrew

author
#6 lore raw

Re: [PATCH v12 2/2] arm: dts: aspeed: ventura: add Meta Ventura BMC

Quoted 17 lines
Quoted 10 lines
Quoted 10 lines
Quoted 9 lines

+&mac3 {

arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-ventura.dts new file +8 -0
+     status = "okay";
+     phy-mode = "rmii";
+     pinctrl-names = "default";
+     pinctrl-0 = <&pinctrl_rmii4_default>;
+     fixed-link {
+             speed = <100>;
+             full-duplex;
+     };
Quoted 6 lines
Quoted 1 line

What is on the other end of this fixed link?

The other end of this fixed link is the CPU port of a Marvell 88E6393X switch. We are using this switch in unmanaged mode rather than using the DSA subsystem. Therefore, we use a fixed-link to force the mac3 to 100Mbps full-duplex RMII to match the CPU port configuration.

Quoted 6 lines

You are mixing up terms. The 88E6393X does not have a dedicated port for connecting to the host CPU. Any port can be connected to the host, using DSA tags. And all the ports are 1G or faster, so it seems odd to limit it to 100Mbps. There is something consider a CPU port, but that connects the internal Z80 CPU to the switch fabric.

I apologize for the confusing terminology. I meant the port 0 of the 88E6393X is connected to the AST2600 mac3. Regarding the 100Mbps RMII limitation, this is a strict hardware design constraint on our specific board.

Quoted 8 lines
Quoted 8 lines
Quoted 7 lines

arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-ventura.dts line 1424

Quoted 5 lines
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-ventura.dts new file +5 -0
+};
+
+&mdio0 {
+     status = "okay";
+};

If there are no devices on the bus, why enable it?

Quoted 7 lines
Quoted 2 lines

We intentionally enable it so user-space tools can access the switch registers. I have added a comment in v13 to clarify this.

Why would user space want to access the switch registers for an unmanaged switch? It sounds like you are using Marvells SDK in userspace to manage the switch, rather than using DSA.

We do have a custom user-space daemon that configures the switch registers for our specific use case. Should I remove the &mdio0 node if it is only enabled and has no other configuration in the upstream device tree?

P.K. Lee

#7 lore raw

Re: [PATCH v12 2/2] arm: dts: aspeed: ventura: add Meta Ventura BMC

Quoted 10 lines
Quoted 9 lines
Quoted 4 lines
Quoted 1 line

If there are no devices on the bus, why enable it?

We intentionally enable it so user-space tools can access the switch registers. I have added a comment in v13 to clarify this.

Why would user space want to access the switch registers for an unmanaged switch? It sounds like you are using Marvells SDK in userspace to manage the switch, rather than using DSA.

Quoted 4 lines

We do have a custom user-space daemon that configures the switch registers for our specific use case. Should I remove the &mdio0 node if it is only enabled and has no other configuration in the upstream device tree?

Please just be truthful that you have a user space driver, so need the bus enabled.

I also guess you have some other kernel code that allows you to actually use the bus from user space? The typical ethernet IOCTL handler does not work for you, since you don't have an ethernet device using this bus. Such code is unlikely to be accepted into mainline. We don't like user space drivers when there is a perfectly good kernel driver for this switch.

Andrew

author
#8 lore raw

Re: [PATCH v12 2/2] arm: dts: aspeed: ventura: add Meta Ventura BMC

Quoted 18 lines
Quoted 10 lines
Quoted 9 lines
Quoted 4 lines
Quoted 1 line

If there are no devices on the bus, why enable it?

We intentionally enable it so user-space tools can access the switch registers. I have added a comment in v13 to clarify this.

Why would user space want to access the switch registers for an unmanaged switch? It sounds like you are using Marvells SDK in userspace to manage the switch, rather than using DSA.

Quoted 4 lines

We do have a custom user-space daemon that configures the switch registers for our specific use case. Should I remove the &mdio0 node if it is only enabled and has no other configuration in the upstream device tree?

Please just be truthful that you have a user space driver, so need the bus enabled.

Quoted 6 lines

I also guess you have some other kernel code that allows you to actually use the bus from user space? The typical ethernet IOCTL handler does not work for you, since you don't have an ethernet device using this bus. Such code is unlikely to be accepted into mainline. We don't like user space drivers when there is a perfectly good kernel driver for this switch.

Since the kernel driver for mv88e6xxx in kernel 6.6 used by this project does not support LED control, and this feature is only available starting from kernel 6.13, I had to initialize the LEDs of the 88E6393X from user space.

In this case, should I remove the &mdio0 node?

P.K. Lee

#9 lore raw

Re: [PATCH v12 2/2] arm: dts: aspeed: ventura: add Meta Ventura BMC

Quoted 25 lines · P.K. Lee
Quoted 18 lines
Quoted 10 lines
Quoted 9 lines
Quoted 4 lines
Quoted 1 line

If there are no devices on the bus, why enable it?

We intentionally enable it so user-space tools can access the switch registers. I have added a comment in v13 to clarify this.

Why would user space want to access the switch registers for an unmanaged switch? It sounds like you are using Marvells SDK in userspace to manage the switch, rather than using DSA.

Quoted 4 lines

We do have a custom user-space daemon that configures the switch registers for our specific use case. Should I remove the &mdio0 node if it is only enabled and has no other configuration in the upstream device tree?

Please just be truthful that you have a user space driver, so need the bus enabled.

Quoted 6 lines

I also guess you have some other kernel code that allows you to actually use the bus from user space? The typical ethernet IOCTL handler does not work for you, since you don't have an ethernet device using this bus. Such code is unlikely to be accepted into mainline. We don't like user space drivers when there is a perfectly good kernel driver for this switch.

Quoted 6 lines

Since the kernel driver for mv88e6xxx in kernel 6.6 used by this project does not support LED control, and this feature is only available starting from kernel 6.13, I had to initialize the LEDs of the 88E6393X from user space.

In this case, should I remove the &mdio0 node?

I would keep it, and add a comment why it is there. And upgrade the kernel to 6.18, or backport the LED code.

Andrew