[PATCH 3/4] arm64: dts: st: enable ethernet1 controller on stm32mp257f-ev1

Gatien Chevallier posted 4 patches 4 weeks, 1 day ago
There is a newer version of this series
[PATCH 3/4] arm64: dts: st: enable ethernet1 controller on stm32mp257f-ev1
Posted by Gatien Chevallier 4 weeks, 1 day ago
ethernet1 controller is connected to the RTL8211F-CG Realtek PHY in
RGMII mode. It can either be used as a standalone Ethernet controller
or be connected to the internal TSN capable switch. For this board,
keep the standalone setup. Also enable this peripheral on the
stm32mp257f-ev1 board.

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

diff --git a/arch/arm64/boot/dts/st/stm32mp257f-ev1.dts b/arch/arm64/boot/dts/st/stm32mp257f-ev1.dts
index 4ff334563599b46e987474076798337e75e16ef7..725846dfaac925646f43db542ed803dd7b9d85dd 100644
--- a/arch/arm64/boot/dts/st/stm32mp257f-ev1.dts
+++ b/arch/arm64/boot/dts/st/stm32mp257f-ev1.dts
@@ -19,6 +19,7 @@ / {
 
 	aliases {
 		ethernet0 = &ethernet2;
+		ethernet1 = &ethernet1;
 		serial0 = &usart2;
 		serial1 = &usart6;
 	};
@@ -133,6 +134,30 @@ dcmipp_0: endpoint {
 	};
 };
 
+&ethernet1 {
+	pinctrl-0 = <&eth1_rgmii_pins_a &eth1_mdio_pins_a>;
+	pinctrl-1 = <&eth1_rgmii_sleep_pins_a &eth1_mdio_sleep_pins_a>;
+	pinctrl-names = "default", "sleep";
+	max-speed = <1000>;
+	phy-handle = <&phy1_eth1>;
+	phy-mode = "rgmii-id";
+	st,ext-phyclk;
+	status = "okay";
+
+	mdio {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		compatible = "snps,dwmac-mdio";
+		phy1_eth1: ethernet-phy@4 {
+			compatible = "ethernet-phy-id001c.c916";
+			reset-gpios =  <&gpioj 9 GPIO_ACTIVE_LOW>;
+			reset-assert-us = <10000>;
+			reset-deassert-us = <80000>;
+			reg = <4>;
+		};
+	};
+};
+
 &ethernet2 {
 	pinctrl-names = "default", "sleep";
 	pinctrl-0 = <&eth2_rgmii_pins_a>;

-- 
2.25.1
Re: [PATCH 3/4] arm64: dts: st: enable ethernet1 controller on stm32mp257f-ev1
Posted by Andrew Lunn 4 weeks, 1 day ago
> +		phy1_eth1: ethernet-phy@4 {
> +			compatible = "ethernet-phy-id001c.c916";
> +			reset-gpios =  <&gpioj 9 GPIO_ACTIVE_LOW>;
> +			reset-assert-us = <10000>;
> +			reset-deassert-us = <80000>;
> +			reg = <4>;

The DT coding style would suggest reg comes after compatible.

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

On 9/3/25 14:24, Andrew Lunn wrote:
>> +		phy1_eth1: ethernet-phy@4 {
>> +			compatible = "ethernet-phy-id001c.c916";
>> +			reset-gpios =  <&gpioj 9 GPIO_ACTIVE_LOW>;
>> +			reset-assert-us = <10000>;
>> +			reset-deassert-us = <80000>;
>> +			reg = <4>;
> 
> The DT coding style would suggest reg comes after compatible.
> 
> 	Andrew

Hi Andrew,

Right, I will fix that for V2!

Best regards,
Gatien