[PATCH 2/4] arm64: dts: st: enable ethernet1 controller on stm32mp257f-dk

Gatien Chevallier posted 4 patches 4 weeks, 1 day ago
There is a newer version of this series
[PATCH 2/4] arm64: dts: st: enable ethernet1 controller on stm32mp257f-dk
Posted by Gatien Chevallier 4 weeks, 1 day ago
ethernet1 controller is connected to the RTL8211F-CG Realtek PHY in
RGMII mode. Enable this peripheral on the stm32mp257f-dk board.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
---
 arch/arm64/boot/dts/st/stm32mp257f-dk.dts | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/arch/arm64/boot/dts/st/stm32mp257f-dk.dts b/arch/arm64/boot/dts/st/stm32mp257f-dk.dts
index a278a1e3ce03aa379d40ef807d268bbf31a04546..1f81f717426afa323a2c1359413c1f439b5f4dd0 100644
--- a/arch/arm64/boot/dts/st/stm32mp257f-dk.dts
+++ b/arch/arm64/boot/dts/st/stm32mp257f-dk.dts
@@ -19,6 +19,7 @@ / {
 	compatible = "st,stm32mp257f-dk", "st,stm32mp257";
 
 	aliases {
+		ethernet0 = &ethernet1;
 		serial0 = &usart2;
 	};
 
@@ -77,6 +78,29 @@ &arm_wdt {
 	status = "okay";
 };
 
+&ethernet1 {
+	pinctrl-0 = <&eth1_rgmii_pins_b>;
+	pinctrl-1 = <&eth1_rgmii_sleep_pins_b>;
+	pinctrl-names = "default", "sleep";
+	max-speed = <1000>;
+	phy-handle = <&phy1_eth1>;
+	phy-mode = "rgmii-id";
+	status = "okay";
+
+	mdio {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		compatible = "snps,dwmac-mdio";
+		phy1_eth1: ethernet-phy@1 {
+			compatible = "ethernet-phy-id001c.c916";
+			reg = <1>;
+			reset-gpios =  <&gpioa 2 GPIO_ACTIVE_LOW>;
+			reset-assert-us = <10000>;
+			reset-deassert-us = <80000>;
+		};
+	};
+};
+
 &scmi_regu {
 	scmi_vddio1: regulator@0 {
 		regulator-min-microvolt = <1800000>;

-- 
2.25.1
Re: [PATCH 2/4] arm64: dts: st: enable ethernet1 controller on stm32mp257f-dk
Posted by Andrew Lunn 4 weeks, 1 day ago
> +&ethernet1 {
> +	pinctrl-0 = <&eth1_rgmii_pins_b>;
> +	pinctrl-1 = <&eth1_rgmii_sleep_pins_b>;
> +	pinctrl-names = "default", "sleep";
> +	max-speed = <1000>;

RGMII naturally has a max-speed of 1G, so this line is pointless.

You only use max-speed when you need to restrict the system below what
it would normally use, for example if the PCB is badly designed and
the tracks don't support 1G, but can do 100Mbps

	Andrew
Re: [PATCH 2/4] arm64: dts: st: enable ethernet1 controller on stm32mp257f-dk
Posted by Gatien CHEVALLIER 4 weeks, 1 day ago

On 9/3/25 14:21, Andrew Lunn wrote:
>> +&ethernet1 {
>> +	pinctrl-0 = <&eth1_rgmii_pins_b>;
>> +	pinctrl-1 = <&eth1_rgmii_sleep_pins_b>;
>> +	pinctrl-names = "default", "sleep";
>> +	max-speed = <1000>;
> 
> RGMII naturally has a max-speed of 1G, so this line is pointless.
> 
> You only use max-speed when you need to restrict the system below what
> it would normally use, for example if the PCB is badly designed and
> the tracks don't support 1G, but can do 100Mbps
> 
> 	Andrew

Right, I'll simply remove these lines.

Gatien