Skip to contentSkip to conversation

ARM: dts: aspeed: Add ASRock Rack B650D4U BMC

PATCH Superseded Prasanth Kumar Padarthi 3 participants 17 messages Aug 30 – Sep 17

Subsystems (2)

v4 of 10 Superseded Latest is v10 →

lore
Share & tools
lore
#0 lore raw

v4 cover ARM: dts: aspeed: Add ASRock Rack B650D4U BMC

Add device tree support for the ASRock Rack B650D4U BMC, which is based on the ASPEED AST2600 SoC.

The series adds the board compatible and describes the BMC memory, SPI NOR flash layout, UART console, and MAC0 connected to an RTL8211F Ethernet PHY.

The MAC0 RGMII timing configuration was validated on B650D4U hardware. With plain "rgmii", the PHY negotiated 1000baseT/Full but received no valid packets and accumulated RX CRC errors. With "rgmii-rxid", a 5000-packet test completed with 0% packet loss and no RX CRC errors. "rgmii-id" was also tested successfully, but the additional TX delay is not required, so "rgmii-rxid" is retained.

Changes in v4:
- Validate the MAC0 RGMII timing configuration on B650D4U hardware.
- Keep phy-mode = "rgmii-rxid" based on hardware A/B testing.
- Add the SPI NOR fixed partition layout validated on B650D4U hardware.
- Correct the BMC memory size to 512 MiB.
- Order peripheral nodes alphabetically by label.

Prasanth Kumar Padarthi (2):
dt-bindings: arm: aspeed: Add ASRock Rack B650D4U
ARM: dts: aspeed: Add ASRock Rack B650D4U BMC

 .../bindings/arm/aspeed/aspeed.yaml           |  1 +
 arch/arm/boot/dts/aspeed/Makefile             |  1 +
 .../dts/aspeed/aspeed-bmc-asrock-b650d4u.dts  | 95 +++++++++++++++++++
 3 files changed, 97 insertions(+)
 create mode 100644 arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts
Signature · 1 line
2.47.3
#1 lore raw

PATCH v4 1/2 dt-bindings: arm: aspeed: Add ASRock Rack B650D4U

Add the compatible string for the ASRock Rack B650D4U BMC, which is an AST2600-based server motherboard.

---
 Documentation/devicetree/bindings/arm/aspeed/aspeed.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/aspeed/aspeed.yaml +1 -0
index 9ba195b8f22d..4c9e96801c1a 100644
@@ -81,6 +81,7 @@ properties:
               - ampere,mtmitchell-bmc
               - aspeed,ast2600-evb
               - aspeed,ast2600-evb-a1
+              - asrock,b650d4u-bmc
               - asus,ast2600-kommando-ipmi-card
               - asus,x4tf-bmc
               - facebook,anacapa-bmc
Signature · 1 line
2.47.3
#2 lore raw

PATCH v4 2/2 ARM: dts: aspeed: Add ASRock Rack B650D4U BMC

In reply to Prasanth Kumar Padarthi

Add the device tree for the ASRock Rack B650D4U BMC, which is based on the ASPEED AST2600 SoC.

Describe the BMC memory, SPI NOR flash layout, UART console, and MAC0 connected to an RTL8211F Ethernet PHY.

The MAC0 RGMII RX delay configuration was validated on hardware. The RTL8211F requires its internal RX delay for reliable operation, while an additional TX delay is not required.

---
 arch/arm/boot/dts/aspeed/Makefile             |  1 +
 .../dts/aspeed/aspeed-bmc-asrock-b650d4u.dts  | 95 +++++++++++++++++++
 2 files changed, 96 insertions(+)
 create mode 100644 arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts
arch/arm/boot/dts/aspeed/Makefile +1 -0
index 6b68671f9379..b109491d5c8f 100644
@@ -10,6 +10,7 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
 	aspeed-bmc-ampere-mtmitchell.dtb \
 	aspeed-bmc-arm-stardragon4800-rep2.dtb \
 	aspeed-bmc-asrock-altrad8.dtb \
+	aspeed-bmc-asrock-b650d4u.dtb \
 	aspeed-bmc-asrock-e3c246d4i.dtb \
 	aspeed-bmc-asrock-e3c256d4i.dtb \
 	aspeed-bmc-asrock-paul-ipmi-card.dtb \
arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts new file +95 -0

95 lines not on this page · raw message

Signature · 1 line
2.47.3
NACKed-by on v4 2/2 NAK
#3 lore raw

Hi Prasanth,

Quoted 5 lines · Prasanth Kumar Padarthi

Add the device tree for the ASRock Rack B650D4U BMC, which is based on the ASPEED AST2600 SoC.

Describe the BMC memory, SPI NOR flash layout, UART console, and MAC0 connected to an RTL8211F Ethernet PHY.

Why no GPIOs? Why no I2C buses? You'd need at least i2c7 with an at24c128 to populate the MAC address on MAC0.

Quoted 4 lines

The MAC0 RGMII RX delay configuration was validated on hardware. The RTL8211F requires its internal RX delay for reliable operation, while an additional TX delay is not required.

No, it does not. The traces have the same length and don't require special delays. If you use u-boot/next, then it might be true because it still misses the correct SoC-specific delays. This is, however, fixed in openbmc/u-boot.

I know that this is not optimal. I'm already working on getting this fixed in upstream U-Boot too.

Quoted 32 lines
arch/arm/boot/dts/aspeed/Makefile +1 -0
index 6b68671f9379..b109491d5c8f 100644
@@ -10,6 +10,7 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
 	aspeed-bmc-ampere-mtmitchell.dtb \
 	aspeed-bmc-arm-stardragon4800-rep2.dtb \
 	aspeed-bmc-asrock-altrad8.dtb \
+	aspeed-bmc-asrock-b650d4u.dtb \
 	aspeed-bmc-asrock-e3c246d4i.dtb \
 	aspeed-bmc-asrock-e3c256d4i.dtb \
 	aspeed-bmc-asrock-paul-ipmi-card.dtb \
arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts new file +11 -0
new file mode 100644
index 000000000000..aa623f0ca36c
@@ -0,0 +1,95 @@
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+
+#include "aspeed-g6.dtsi"
+
+/ {
+	model = "ASRock Rack B650D4U BMC";
+	compatible = "asrock,b650d4u-bmc", "aspeed,ast2600";
+
+	aliases {
+		serial0 = &uart5;

arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts line 21

Quoted 10 lines
arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts new file +10 -0
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory@80000000 {
+		device_type = "memory";
+		reg = <0x80000000 0x20000000>;
+	};

Where's the reservation for video?

arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts line 29

Quoted 8 lines
arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts new file +8 -0
+};
+
+&fmc {
+	status = "okay";
+
+	flash@0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;

That's already defined in aspeed-g6.dtsi

Quoted 27 lines
arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts new file +27 -0
+		label = "bmc";
+		m25p,fast-read;
+		spi-max-frequency = <50000000>;
+		spi-rx-bus-width = <4>;
+		status = "okay";
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			u-boot@0 {
+				reg = <0x00000000 0x000e0000>;
+				label = "u-boot";
+				read-only;
+			};
+
+			u-boot-env@e0000 {
+				reg = <0x000e0000 0x00020000>;
+				label = "u-boot-env";
+			};
+
+			kernel@200000 {
+				reg = <0x00200000 0x00800000>;
+				label = "kernel";
+			};
+

arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts line 66

Quoted 10 lines
arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts new file +10 -0
+			rofs@a00000 {
+				reg = <0x00a00000 0x02000000>;
+				label = "rofs";
+				read-only;
+			};
+
+			rwfs@2a00000 {
+				reg = <0x02a00000 0x01600000>;
+				label = "rwfs";
+			};

No. Include the partitions via #include openbmc-flash-layout-64.dtsi.

arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts line 77

Quoted 11 lines
arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts new file +11 -0
+		};
+	};
+};
+
+&mac0 {
+	status = "okay";
+
+	/*
+	 * The RTL8211F provides the required RGMII RX delay. No additional
+	 * TX delay is required for this board.
+	 */

No? I do have this board myself with a custom BMC ROM and I can tell you that you don't have to set delays other than the described SoC-specific delays, but this is, as mentioned, already done in the BSP. (And no, I haven't upstreamed my DTS yet bc I haven't had the time to do it.)

arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts line 78

Quoted 1 line
arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts new file +1 -0
+	phy-mode = "rgmii-rxid";

rgmii-id

arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts line 81

Quoted 3 lines
arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts new file +3 -0
+	phy-handle = <&ethphy0>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_rgmii1_default>;

No nvmem cell to set the MAC address? i2c7@57 offset 0x3f80? Please see the other device-trees for ASRock Rack mainboards.

For me, it is a:

Tan

Signature · 1 line
Tan Siewert <[email protected]>
author
#4 lore raw

Hi Tan,

Thanks, this is very helpful, especially since you have tested the same board.

I will rework the next revision to use the existing ASRock Rack DTS patterns, including the I2C7 EEPROM/NVMEM MAC address handling and the standard 64 MiB OpenBMC flash layout. I will also investigate the GPIOs and video memory reservation you mentioned.

For MAC0, I will change the PHY mode to rgmii-id and remove the claim that the board requires RX-only PHY delay. I will also investigate the ASPEED SoC-specific MAC delay configuration and the difference between upstream U-Boot and openbmc/u-boot before sending the next revision.

Thanks,
Prasanth

Quoted 157 lines · Tan Siewert

Hi Prasanth,

Quoted 5 lines · Prasanth Kumar Padarthi

Add the device tree for the ASRock Rack B650D4U BMC, which is based on the ASPEED AST2600 SoC.

Describe the BMC memory, SPI NOR flash layout, UART console, and MAC0 connected to an RTL8211F Ethernet PHY.

Why no GPIOs? Why no I2C buses? You'd need at least i2c7 with an at24c128 to populate the MAC address on MAC0.

Quoted 4 lines

The MAC0 RGMII RX delay configuration was validated on hardware. The RTL8211F requires its internal RX delay for reliable operation, while an additional TX delay is not required.

No, it does not. The traces have the same length and don't require special delays. If you use u-boot/next, then it might be true because it still misses the correct SoC-specific delays. This is, however, fixed in openbmc/u-boot.

I know that this is not optimal. I'm already working on getting this fixed in upstream U-Boot too.

Quoted 32 lines
arch/arm/boot/dts/aspeed/Makefile +1 -0
index 6b68671f9379..b109491d5c8f 100644
@@ -10,6 +10,7 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
      aspeed-bmc-ampere-mtmitchell.dtb \
      aspeed-bmc-arm-stardragon4800-rep2.dtb \
      aspeed-bmc-asrock-altrad8.dtb \
+     aspeed-bmc-asrock-b650d4u.dtb \
      aspeed-bmc-asrock-e3c246d4i.dtb \
      aspeed-bmc-asrock-e3c256d4i.dtb \
      aspeed-bmc-asrock-paul-ipmi-card.dtb \
arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts new file +11 -0
new file mode 100644
index 000000000000..aa623f0ca36c
@@ -0,0 +1,95 @@
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+
+#include "aspeed-g6.dtsi"
+
+/ {
+     model = "ASRock Rack B650D4U BMC";
+     compatible = "asrock,b650d4u-bmc", "aspeed,ast2600";
+
+     aliases {
+             serial0 = &uart5;

arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts line 21

Quoted 10 lines
arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts new file +10 -0
+     };
+
+     chosen {
+             stdout-path = "serial0:115200n8";
+     };
+
+     memory@80000000 {
+             device_type = "memory";
+             reg = <0x80000000 0x20000000>;
+     };

Where's the reservation for video?

arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts line 29

Quoted 8 lines
arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts new file +8 -0
+};
+
+&fmc {
+     status = "okay";
+
+     flash@0 {
+             compatible = "jedec,spi-nor";
+             reg = <0>;

That's already defined in aspeed-g6.dtsi

Quoted 27 lines
arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts new file +27 -0
+             label = "bmc";
+             m25p,fast-read;
+             spi-max-frequency = <50000000>;
+             spi-rx-bus-width = <4>;
+             status = "okay";
+
+             partitions {
+                     compatible = "fixed-partitions";
+                     #address-cells = <1>;
+                     #size-cells = <1>;
+
+                     u-boot@0 {
+                             reg = <0x00000000 0x000e0000>;
+                             label = "u-boot";
+                             read-only;
+                     };
+
+                     u-boot-env@e0000 {
+                             reg = <0x000e0000 0x00020000>;
+                             label = "u-boot-env";
+                     };
+
+                     kernel@200000 {
+                             reg = <0x00200000 0x00800000>;
+                             label = "kernel";
+                     };
+

arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts line 66

Quoted 10 lines
arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts new file +10 -0
+                     rofs@a00000 {
+                             reg = <0x00a00000 0x02000000>;
+                             label = "rofs";
+                             read-only;
+                     };
+
+                     rwfs@2a00000 {
+                             reg = <0x02a00000 0x01600000>;
+                             label = "rwfs";
+                     };

No. Include the partitions via #include openbmc-flash-layout-64.dtsi.

arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts line 77

Quoted 11 lines
arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts new file +11 -0
+             };
+     };
+};
+
+&mac0 {
+     status = "okay";
+
+     /*
+      * The RTL8211F provides the required RGMII RX delay. No additional
+      * TX delay is required for this board.
+      */

No? I do have this board myself with a custom BMC ROM and I can tell you that you don't have to set delays other than the described SoC-specific delays, but this is, as mentioned, already done in the BSP. (And no, I haven't upstreamed my DTS yet bc I haven't had the time to do it.)

arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts line 78

Quoted 1 line
arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts new file +1 -0
+     phy-mode = "rgmii-rxid";

rgmii-id

arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts line 81

Quoted 3 lines
arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts new file +3 -0
+     phy-handle = <&ethphy0>;
+     pinctrl-names = "default";
+     pinctrl-0 = <&pinctrl_rgmii1_default>;

No nvmem cell to set the MAC address? i2c7@57 offset 0x3f80? Please see the other device-trees for ASRock Rack mainboards.

For me, it is a:

Tan

--
Tan Siewert <[email protected]>

#5 lore raw
In reply to Prasanth Kumar Padarthi
Quoted 7 lines · Prasanth Kumar Padarthi

Add device tree support for the ASRock Rack B650D4U BMC, which is based on the ASPEED AST2600 SoC.

The series adds the board compatible and describes the BMC memory, SPI NOR flash layout, UART console, and MAC0 connected to an RTL8211F Ethernet PHY.

Quoted 6 lines

The MAC0 RGMII timing configuration was validated on B650D4U hardware. With plain "rgmii", the PHY negotiated 1000baseT/Full but received no valid packets and accumulated RX CRC errors. With "rgmii-rxid", a 5000-packet test completed with 0% packet loss and no RX CRC errors. "rgmii-id" was also tested successfully, but the additional TX delay is not required, so "rgmii-rxid" is retained.

Please take a read of:

https://elixir.bootlin.com/linux/v6.15/source/Documentation/devicetree/bindings/net/ethernet-controller.yaml#L287

Does the PCB have 2ns of delay for TX, but notR RX?

Andrew

author
#6 lore raw

Hi Andrew,

I do not currently have the PCB layout or trace-length information, so I cannot prove that the board provides the TX delay externally.

What I have validated on hardware is:

rgmii: fails, with RX CRC errors and no valid RX traffic
rgmii-rxid: passes, 5000/5000 packets, 0% loss, no RX CRC errors
rgmii-id: also passes with the same traffic test

This shows that the RTL8211F RX internal delay is required, but it does not establish where the TX delay is provided.

Given that I cannot provide PCB-level evidence for the TX delay, would you prefer that I use rgmii-id for the next revision?

Thanks,
Prasanth

Quoted 24 lines · Andrew Lunn,
Quoted 7 lines · Prasanth Kumar Padarthi

Add device tree support for the ASRock Rack B650D4U BMC, which is based on the ASPEED AST2600 SoC.

The series adds the board compatible and describes the BMC memory, SPI NOR flash layout, UART console, and MAC0 connected to an RTL8211F Ethernet PHY.

Quoted 6 lines

The MAC0 RGMII timing configuration was validated on B650D4U hardware. With plain "rgmii", the PHY negotiated 1000baseT/Full but received no valid packets and accumulated RX CRC errors. With "rgmii-rxid", a 5000-packet test completed with 0% packet loss and no RX CRC errors. "rgmii-id" was also tested successfully, but the additional TX delay is not required, so "rgmii-rxid" is retained.

Please take a read of:

https://elixir.bootlin.com/linux/v6.15/source/Documentation/devicetree/bindings/net/ethernet-controller.yaml#L287

Does the PCB have 2ns of delay for TX, but notR RX?

Andrew

#7 lore raw
Quoted 11 lines · Prasanth

Hi Andrew,

I do not currently have the PCB layout or trace-length information, so I cannot prove that the board provides the TX delay externally.

What I have validated on hardware is:

rgmii: fails, with RX CRC errors and no valid RX traffic
rgmii-rxid: passes, 5000/5000 packets, 0% loss, no RX CRC errors
rgmii-id: also passes with the same traffic test

Quoted 5 lines

This shows that the RTL8211F RX internal delay is required, but it does not establish where the TX delay is provided.

Given that I cannot provide PCB-level evidence for the TX delay, would you prefer that I use rgmii-id for the next revision?

There has been a number of threads about the Aspeed SoC. It typically has delays enabled in its MAC, by the bootloader. The Linux MAC driver does not disable this, nor does it mask the value passed to the PHY. So you see many Aspeed .dts files incorrectly using 'rgmii'. Over the last couple of years i have been pointing out this problem, but nobody has stepped up to fix the issue. Most DT developers just leave the Ethernet node out, in order to get something merged.

You case is interesting, because you are not suggesting 'rgmii'. So it could be there is more going on.

If you look in the email archives you should find the information about where to configure the delay in the hardware. You might want to read it out to understand how the bootloader has configured the hardware.

Andrew

author
#8 lore raw

Hi Andrew,

Thanks. As I mentioned earlier, I had already found that the AST2600 has MAC-side RGMII delay configuration.

I will now check the actual delay register values on this board after U-Boot has initialized the MAC, and compare them with the corresponding U-Boot configuration. That should help determine how much of the observed behavior is coming from the MAC-side delays left configured by the bootloader.

Tan Siewert has also confirmed that the RGMII traces on the B650D4U do not provide the delay, and pointed out the difference between the SoC-specific delay handling in upstream U-Boot and openbmc/u-boot.

I will investigate that before preparing the next revision and will remove the RX-only delay claim from the current patch.

Thanks,
Prasanth

Quoted 36 lines · Andrew Lunn
Quoted 11 lines · Prasanth

Hi Andrew,

I do not currently have the PCB layout or trace-length information, so I cannot prove that the board provides the TX delay externally.

What I have validated on hardware is:

rgmii: fails, with RX CRC errors and no valid RX traffic
rgmii-rxid: passes, 5000/5000 packets, 0% loss, no RX CRC errors
rgmii-id: also passes with the same traffic test

Quoted 5 lines

This shows that the RTL8211F RX internal delay is required, but it does not establish where the TX delay is provided.

Given that I cannot provide PCB-level evidence for the TX delay, would you prefer that I use rgmii-id for the next revision?

There has been a number of threads about the Aspeed SoC. It typically has delays enabled in its MAC, by the bootloader. The Linux MAC driver does not disable this, nor does it mask the value passed to the PHY. So you see many Aspeed .dts files incorrectly using 'rgmii'. Over the last couple of years i have been pointing out this problem, but nobody has stepped up to fix the issue. Most DT developers just leave the Ethernet node out, in order to get something merged.

You case is interesting, because you are not suggesting 'rgmii'. So it could be there is more going on.

If you look in the email archives you should find the information about where to configure the delay in the hardware. You might want to read it out to understand how the bootloader has configured the hardware.

Andrew

author
#9 lore raw
In reply to Andrew Lunn

Hi Andrew,

I do not currently have the PCB layout or RGMII trace-length information, so I cannot confirm that the PCB provides approximately 2 ns of TX delay but no RX delay.

My hardware results are:

rgmii negotiates 1000baseT/Full, but RX traffic fails with CRC errors. rgmii-rxid passes a 5000-packet test with no loss or RX CRC errors. rgmii-id also passes the same test.

These results indicate that an RX delay is required, but they do not establish whether the TX delay is provided by the PCB, MAC, or PHY. I therefore agree that the traffic test alone is insufficient to justify rgmii-rxid.

I have contacted ASRock Rack requesting confirmation of the RGMII timing and PCB trace-delay configuration. I will wait for that information before selecting the phy-mode for the next revision or making a claim about where the TX delay is implemented.

Thanks,
Prasanth

Quoted 23 lines · Andrew Lunn
Quoted 7 lines · Prasanth Kumar Padarthi

Add device tree support for the ASRock Rack B650D4U BMC, which is based on the ASPEED AST2600 SoC.

The series adds the board compatible and describes the BMC memory, SPI NOR flash layout, UART console, and MAC0 connected to an RTL8211F Ethernet PHY.

Quoted 6 lines

The MAC0 RGMII timing configuration was validated on B650D4U hardware. With plain "rgmii", the PHY negotiated 1000baseT/Full but received no valid packets and accumulated RX CRC errors. With "rgmii-rxid", a 5000-packet test completed with 0% packet loss and no RX CRC errors. "rgmii-id" was also tested successfully, but the additional TX delay is not required, so "rgmii-rxid" is retained.

Please take a read of:

https://elixir.bootlin.com/linux/v6.15/source/Documentation/devicetree/bindings/net/ethernet-controller.yaml#L287

Does the PCB have 2ns of delay for TX, but notR RX?

Andrew

#10 lore raw

v5 cover ARM: dts: aspeed: Add ASRock Rack B650D4U BMC

In reply to Prasanth Kumar Padarthi

Add device tree support for the ASRock Rack B650D4U BMC, which is based on the ASPEED AST2600 SoC.

The series adds the board compatible and describes the BMC memory, SPI NOR flash layout, UART console, GPIO line names, graphics reserved memory, I2C EEPROM, and MAC0 connected to an RTL8211F Ethernet PHY.

MAC0 uses the EEPROM on I2C7 as the NVMEM provider for its MAC address and is configured to use the RTL8211F in RGMII-ID mode.

Changes in v5:
- Use the I2C7 EEPROM as the NVMEM provider for the MAC0 address.
- Configure MAC0 to use the RTL8211F in RGMII-ID mode.
- Use the standard OpenBMC 64 MiB flash layout.
- Add confirmed GPIO line names for the reset button and host power control.
- Add the reusable 16 MiB reserved-memory pool used by the graphics device.
- Drop the previous RX-delay-specific description.

Changes in v4:
- Validate the MAC0 RGMII timing configuration on B650D4U hardware.
- Keep phy-mode = "rgmii-rxid" based on hardware A/B testing.
- Add the SPI NOR fixed partition layout validated on B650D4U hardware.
- Correct the BMC memory size to 512 MiB.
- Order peripheral nodes alphabetically by label.

Prasanth Kumar Padarthi (2):
dt-bindings: arm: aspeed: Add ASRock Rack B650D4U
ARM: dts: aspeed: Add ASRock Rack B650D4U BMC

 .../bindings/arm/aspeed/aspeed.yaml           |   1 +
 arch/arm/boot/dts/aspeed/Makefile             |   1 +
 .../dts/aspeed/aspeed-bmc-asrock-b650d4u.dts  | 120 ++++++++++++++++++
 3 files changed, 122 insertions(+)
 create mode 100644 arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts

base-commit: fcf94f5431858d83003cf18d60df67bd87b20ad2

Signature · 1 line
2.47.3
#11 lore raw

PATCH v5 1/2 dt-bindings: arm: aspeed: Add ASRock Rack B650D4U

Add the compatible string for the ASRock Rack B650D4U BMC, which is an AST2600-based server motherboard.

---
 Documentation/devicetree/bindings/arm/aspeed/aspeed.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/aspeed/aspeed.yaml +1 -0
index 9ba195b8f22d..4c9e96801c1a 100644
@@ -81,6 +81,7 @@ properties:
               - ampere,mtmitchell-bmc
               - aspeed,ast2600-evb
               - aspeed,ast2600-evb-a1
+              - asrock,b650d4u-bmc
               - asus,ast2600-kommando-ipmi-card
               - asus,x4tf-bmc
               - facebook,anacapa-bmc
Signature · 1 line
2.47.3
#12 lore raw

PATCH v5 2/2 ARM: dts: aspeed: Add ASRock Rack B650D4U BMC

In reply to Prasanth Kumar Padarthi

Add the device tree for the ASRock Rack B650D4U BMC, which is based on the ASPEED AST2600 SoC.

Describe the BMC memory, SPI NOR flash layout, UART console, GPIO line names, video framebuffer memory, I2C EEPROM, and MAC0 connected to an RTL8211F Ethernet PHY.

Use the EEPROM on I2C7 as the NVMEM provider for the MAC0 address.

Configure MAC0 to use the RTL8211F in RGMII-ID mode.

---
 arch/arm/boot/dts/aspeed/Makefile             |   1 +
 .../dts/aspeed/aspeed-bmc-asrock-b650d4u.dts  | 120 ++++++++++++++++++
 2 files changed, 121 insertions(+)
 create mode 100644 arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts
arch/arm/boot/dts/aspeed/Makefile +1 -0
index 6b68671f9379..b109491d5c8f 100644
@@ -10,6 +10,7 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
 	aspeed-bmc-ampere-mtmitchell.dtb \
 	aspeed-bmc-arm-stardragon4800-rep2.dtb \
 	aspeed-bmc-asrock-altrad8.dtb \
+	aspeed-bmc-asrock-b650d4u.dtb \
 	aspeed-bmc-asrock-e3c246d4i.dtb \
 	aspeed-bmc-asrock-e3c256d4i.dtb \
 	aspeed-bmc-asrock-paul-ipmi-card.dtb \
arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts new file +120 -0

120 lines not on this page · raw message

Signature · 1 line
2.47.3
Reviewed-by on v5 2/2
#13 lore raw
Quoted 9 lines

+&mac0 {

arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts new file +8 -0
+	status = "okay";
+	phy-mode = "rgmii-id";
+	phy-handle = <&ethphy0>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_rgmii1_default>;
+
+	nvmem-cells = <&eth0_macaddress>;
+	nvmem-cell-names = "mac-address";

arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts line 96

Quoted 10 lines
arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts new file +10 -0
+};
+
+&mdio0 {
+	status = "okay";
+
+	ethphy0: ethernet-phy@0 {
+		compatible = "ethernet-phy-ieee802.3-c22";
+		reg = <0>;
+	};
+};

For these nodes only:

Andrew

#14 lore raw
In reply to Prasanth Kumar Padarthi
Quoted 7 lines

Add the device tree for the ASRock Rack B650D4U BMC, which is based on the ASPEED AST2600 SoC.

Describe the BMC memory, SPI NOR flash layout, UART console, GPIO line names, video framebuffer memory, I2C EEPROM, and MAC0 connected to an RTL8211F Ethernet PHY.

Quoted 5 lines

Use the EEPROM on I2C7 as the NVMEM provider for the MAC0 address.

Configure MAC0 to use the RTL8211F in RGMII-ID mode.

dt-check-style --mode strict reports issues:

arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts:8: [property-order] property 'compatible' out of canonical order (should sort before 'model') arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts:26: [property-order] property 'ranges' out of canonical order (should sort before '#size-cells') arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts:30: [property-order] property 'alignment' out of canonical order (should sort before 'size') arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts:31: [property-order] property 'compatible' out of canonical order (should sort before 'alignment') arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts:39: [property-order] property 'memory-region' out of canonical order (should sort before 'status') arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts:70: [property-order] property 'spi-max-frequency' out of canonical order (should sort before 'm25p,fast-read') arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts:72: [required-blank-lines] "status" must be preceded by a blank line arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts:80: [property-order] property 'phy-mode' out of canonical order (should sort before 'status') arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts:81: [property-order] property 'phy-handle' out of canonical order (should sort before 'phy-mode') arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts:83: [property-order] property 'pinctrl-0' out of canonical order (should sort before 'pinctrl-names') arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts:85: [property-order] property 'nvmem-cells' out of canonical order (should sort before 'pinctrl-0')

Quoted 58 lines
arch/arm/boot/dts/aspeed/Makefile +1 -0
index 6b68671f9379..b109491d5c8f 100644
@@ -10,6 +10,7 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
 	aspeed-bmc-ampere-mtmitchell.dtb \
 	aspeed-bmc-arm-stardragon4800-rep2.dtb \
 	aspeed-bmc-asrock-altrad8.dtb \
+	aspeed-bmc-asrock-b650d4u.dtb \
 	aspeed-bmc-asrock-e3c246d4i.dtb \
 	aspeed-bmc-asrock-e3c256d4i.dtb \
 	aspeed-bmc-asrock-paul-ipmi-card.dtb \
arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts new file +39 -0
new file mode 100644
index 000000000000..6585bda56a4c
@@ -0,0 +1,120 @@
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+
+#include "aspeed-g6.dtsi"
+
+/ {
+	model = "ASRock Rack B650D4U BMC";
+	compatible = "asrock,b650d4u-bmc", "aspeed,ast2600";
+
+	aliases {
+		serial0 = &uart5;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory@80000000 {
+		device_type = "memory";
+		reg = <0x80000000 0x20000000>;
+	};
+
+	reserved-memory {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+
+		gfx_memory: framebuffer {
+			size = <0x01000000>;
+			alignment = <0x01000000>;
+			compatible = "shared-dma-pool";
+			reusable;
+		};
+	};
+};
+
+&gfx {
+	status = "okay";
+	memory-region = <&gfx_memory>;

arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts line 49

Quoted 10 lines
arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts new file +10 -0
+};
+
+&gpio0 {
+	gpio-line-names =
+		/* A0-A7 */	"","","","","","","","",
+		/* B0-B7 */	"","","","","","","","",
+		/* C0-C7 */	"","","","","","","","",
+		/* D0-D7 */	"","","","","","","","",
+		/* E0-E7 */	"","","","","","","","",
+		/* F0-F7 */	"","","","","","button-reset-n","","",

How did you confirm this? According to the schematic it should be P0 (P0-P5 have GPIO passthrough functionality).

arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts line 59

Quoted 10 lines
arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts new file +10 -0
+		/* G0-G7 */	"","","","","","","","",
+		/* H0-H7 */	"","","","","","","","",
+		/* I0-I7 */	"","","","","","","","",
+		/* J0-J7 */	"","","","","","","","",
+		/* K0-K7 */	"","","","","","","","",
+		/* L0-L7 */	"","","","","","","","",
+		/* M0-M7 */	"","","","","","","","",
+		/* N0-N7 */	"","","","","","","","",
+		/* O0-O7 */	"","","","","","","","",
+		/* P0-P3 */	"","","","control-power-n";

Personally, I'm not a fan when gpio-line-names doesn't match with the amount of defined ngpios, but that doesn't mean it's wrong. Maybe Andrew Jeffrey has a different opinion on that.

Quoted 33 lines
arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts new file +33 -0
+};
+
+&fmc {
+	status = "okay";
+
+	flash@0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		label = "bmc";
+		m25p,fast-read;
+		spi-max-frequency = <50000000>;
+		spi-rx-bus-width = <4>;
+		status = "okay";
+
+#include "openbmc-flash-layout-64.dtsi"
+	};
+};
+
+&mac0 {
+	status = "okay";
+	phy-mode = "rgmii-id";
+	phy-handle = <&ethphy0>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_rgmii1_default>;
+
+	nvmem-cells = <&eth0_macaddress>;
+	nvmem-cell-names = "mac-address";
+};
+
+&mdio0 {
+	status = "okay";
+
+	ethphy0: ethernet-phy@0 {

arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts line 102

Quoted 10 lines
arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts new file +10 -0
+		compatible = "ethernet-phy-ieee802.3-c22";
+		reg = <0>;
+	};
+};
+
+&uart5 {
+	status = "okay";
+};
+
+&i2c7 {

Please sort your nodes, as per the device-tree style guideline [0].

[0] https://docs.kernel.org/devicetree/bindings/dts-coding-style.html

Tan

Signature · 1 line
Tan Siewert <[email protected]>
author
#15 lore raw

Hi Tan,

Thanks for pointing this out. I had identified P3 from runtime GPIO observations while exercising host power control, but after checking the AST2600 pinctrl definitions I see that P0-P5 provide the THRUIN/THRUOUT functions, so that observation alone was not sufficient to establish the board-level signal mapping. I'll update this in the next revision based on your schematic information.

Thanks,
Prasanth

Quoted 167 lines · Tan Siewert
Quoted 8 lines

Add the device tree for the ASRock Rack B650D4U BMC, which is based on the ASPEED AST2600 SoC.

Describe the BMC memory, SPI NOR flash layout, UART console, GPIO line names, video framebuffer memory, I2C EEPROM, and MAC0 connected to an RTL8211F Ethernet PHY.

Quoted 5 lines

Use the EEPROM on I2C7 as the NVMEM provider for the MAC0 address.

Configure MAC0 to use the RTL8211F in RGMII-ID mode.

dt-check-style --mode strict reports issues:

arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts:8: [property-order] property 'compatible' out of canonical order (should sort before 'model') arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts:26: [property-order] property 'ranges' out of canonical order (should sort before '#size-cells') arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts:30: [property-order] property 'alignment' out of canonical order (should sort before 'size') arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts:31: [property-order] property 'compatible' out of canonical order (should sort before 'alignment') arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts:39: [property-order] property 'memory-region' out of canonical order (should sort before 'status') arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts:70: [property-order] property 'spi-max-frequency' out of canonical order (should sort before 'm25p,fast-read') arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts:72: [required-blank-lines] "status" must be preceded by a blank line arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts:80: [property-order] property 'phy-mode' out of canonical order (should sort before 'status') arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts:81: [property-order] property 'phy-handle' out of canonical order (should sort before 'phy-mode') arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts:83: [property-order] property 'pinctrl-0' out of canonical order (should sort before 'pinctrl-names') arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts:85: [property-order] property 'nvmem-cells' out of canonical order (should sort before 'pinctrl-0')

Quoted 58 lines
arch/arm/boot/dts/aspeed/Makefile +1 -0
index 6b68671f9379..b109491d5c8f 100644
@@ -10,6 +10,7 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
      aspeed-bmc-ampere-mtmitchell.dtb \
      aspeed-bmc-arm-stardragon4800-rep2.dtb \
      aspeed-bmc-asrock-altrad8.dtb \
+     aspeed-bmc-asrock-b650d4u.dtb \
      aspeed-bmc-asrock-e3c246d4i.dtb \
      aspeed-bmc-asrock-e3c256d4i.dtb \
      aspeed-bmc-asrock-paul-ipmi-card.dtb \
arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts new file +39 -0
new file mode 100644
index 000000000000..6585bda56a4c
@@ -0,0 +1,120 @@
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+
+#include "aspeed-g6.dtsi"
+
+/ {
+     model = "ASRock Rack B650D4U BMC";
+     compatible = "asrock,b650d4u-bmc", "aspeed,ast2600";
+
+     aliases {
+             serial0 = &uart5;
+     };
+
+     chosen {
+             stdout-path = "serial0:115200n8";
+     };
+
+     memory@80000000 {
+             device_type = "memory";
+             reg = <0x80000000 0x20000000>;
+     };
+
+     reserved-memory {
+             #address-cells = <1>;
+             #size-cells = <1>;
+             ranges;
+
+             gfx_memory: framebuffer {
+                     size = <0x01000000>;
+                     alignment = <0x01000000>;
+                     compatible = "shared-dma-pool";
+                     reusable;
+             };
+     };
+};
+
+&gfx {
+     status = "okay";
+     memory-region = <&gfx_memory>;

arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts line 49

Quoted 10 lines
arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts new file +10 -0
+};
+
+&gpio0 {
+     gpio-line-names =
+             /* A0-A7 */     "","","","","","","","",
+             /* B0-B7 */     "","","","","","","","",
+             /* C0-C7 */     "","","","","","","","",
+             /* D0-D7 */     "","","","","","","","",
+             /* E0-E7 */     "","","","","","","","",
+             /* F0-F7 */     "","","","","","button-reset-n","","",

How did you confirm this? According to the schematic it should be P0 (P0-P5 have GPIO passthrough functionality).

arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts line 59

Quoted 10 lines
arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts new file +10 -0
+             /* G0-G7 */     "","","","","","","","",
+             /* H0-H7 */     "","","","","","","","",
+             /* I0-I7 */     "","","","","","","","",
+             /* J0-J7 */     "","","","","","","","",
+             /* K0-K7 */     "","","","","","","","",
+             /* L0-L7 */     "","","","","","","","",
+             /* M0-M7 */     "","","","","","","","",
+             /* N0-N7 */     "","","","","","","","",
+             /* O0-O7 */     "","","","","","","","",
+             /* P0-P3 */     "","","","control-power-n";

Personally, I'm not a fan when gpio-line-names doesn't match with the amount of defined ngpios, but that doesn't mean it's wrong. Maybe Andrew Jeffrey has a different opinion on that.

Quoted 33 lines
arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts new file +33 -0
+};
+
+&fmc {
+     status = "okay";
+
+     flash@0 {
+             compatible = "jedec,spi-nor";
+             reg = <0>;
+             label = "bmc";
+             m25p,fast-read;
+             spi-max-frequency = <50000000>;
+             spi-rx-bus-width = <4>;
+             status = "okay";
+
+#include "openbmc-flash-layout-64.dtsi"
+     };
+};
+
+&mac0 {
+     status = "okay";
+     phy-mode = "rgmii-id";
+     phy-handle = <&ethphy0>;
+     pinctrl-names = "default";
+     pinctrl-0 = <&pinctrl_rgmii1_default>;
+
+     nvmem-cells = <&eth0_macaddress>;
+     nvmem-cell-names = "mac-address";
+};
+
+&mdio0 {
+     status = "okay";
+
+     ethphy0: ethernet-phy@0 {

arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts line 102

Quoted 10 lines
arch/arm/boot/dts/aspeed/aspeed-bmc-asrock-b650d4u.dts new file +10 -0
+             compatible = "ethernet-phy-ieee802.3-c22";
+             reg = <0>;
+     };
+};
+
+&uart5 {
+     status = "okay";
+};
+
+&i2c7 {

Please sort your nodes, as per the device-tree style guideline [0].

[0] https://docs.kernel.org/devicetree/bindings/dts-coding-style.html

Tan

--
Tan Siewert <[email protected]>

#16 lore raw
In reply to Prasanth Kumar Padarthi
Quoted 11 lines

Add device tree support for the ASRock Rack B650D4U BMC, which is based on the ASPEED AST2600 SoC.

The series adds the board compatible and describes the BMC memory, SPI NOR flash layout, UART console, GPIO line names, graphics reserved memory, I2C EEPROM, and MAC0 connected to an RTL8211F Ethernet PHY.

MAC0 uses the EEPROM on I2C7 as the NVMEM provider for its MAC address and is configured to use the RTL8211F in RGMII-ID mode.

Your threading seems to be broken (In-reply-to + References are set to the previous version). Please keep that in mind for the next revision. See [0] for more information.

[0] https://www.kernel.org/doc/html/latest/process/submitting-patches.html#explicit-in-reply-to-headers

Tan

Signature · 1 line
Tan Siewert <[email protected]>