2024-06-04 14:42:31

by Christophe Roullier

[permalink] [raw]
Subject: [PATCH v4 10/11] ARM: dts: stm32: add ethernet1 for STM32MP135F-DK board

Ethernet1: RMII with crystal
PHY used is SMSC (LAN8742A)

Signed-off-by: Christophe Roullier <[email protected]>
---
arch/arm/boot/dts/st/stm32mp135f-dk.dts | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

diff --git a/arch/arm/boot/dts/st/stm32mp135f-dk.dts b/arch/arm/boot/dts/st/stm32mp135f-dk.dts
index 567e53ad285fa..16e91b9d812d8 100644
--- a/arch/arm/boot/dts/st/stm32mp135f-dk.dts
+++ b/arch/arm/boot/dts/st/stm32mp135f-dk.dts
@@ -19,6 +19,7 @@ / {
compatible = "st,stm32mp135f-dk", "st,stm32mp135";

aliases {
+ ethernet0 = &ethernet1;
serial0 = &uart4;
serial1 = &usart1;
serial2 = &uart8;
@@ -141,6 +142,28 @@ &cryp {
status = "okay";
};

+&ethernet1 {
+ status = "okay";
+ pinctrl-0 = <&eth1_rmii_pins_a>;
+ pinctrl-1 = <&eth1_rmii_sleep_pins_a>;
+ pinctrl-names = "default", "sleep";
+ phy-mode = "rmii";
+ phy-handle = <&phy0_eth1>;
+
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "snps,dwmac-mdio";
+
+ phy0_eth1: ethernet-phy@0 {
+ compatible = "ethernet-phy-id0007.c131";
+ reset-gpios = <&mcp23017 9 GPIO_ACTIVE_LOW>;
+ reg = <0>;
+ wakeup-source;
+ };
+ };
+};
+
&i2c1 {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&i2c1_pins_a>;
--
2.25.1



2024-06-04 17:27:32

by Marek Vasut

[permalink] [raw]
Subject: Re: [PATCH v4 10/11] ARM: dts: stm32: add ethernet1 for STM32MP135F-DK board

On 6/4/24 4:35 PM, Christophe Roullier wrote:
> Ethernet1: RMII with crystal
> PHY used is SMSC (LAN8742A)

Doesn't the STM32MP135F-DK come with two ethernet ports ?
Why not enable both ?

2024-06-05 06:06:54

by Christophe Roullier

[permalink] [raw]
Subject: Re: [PATCH v4 10/11] ARM: dts: stm32: add ethernet1 for STM32MP135F-DK board


On 6/4/24 18:52, Marek Vasut wrote:
> On 6/4/24 4:35 PM, Christophe Roullier wrote:
>> Ethernet1: RMII with crystal
>> PHY used is SMSC (LAN8742A)
>
> Doesn't the STM32MP135F-DK come with two ethernet ports ?
> Why not enable both ?

Hi Marek,

As already discussed in V2, second ethernet have no cristal and need
"phy-supply" property to work, today this property is managed by
Ethernet glue, but

should be present and managed in PHY node (as explained by Rob). So I
will push second Ethernet in next step ;-)


2024-06-05 11:35:11

by Marek Vasut

[permalink] [raw]
Subject: Re: [PATCH v4 10/11] ARM: dts: stm32: add ethernet1 for STM32MP135F-DK board

On 6/5/24 8:00 AM, Christophe ROULLIER wrote:
>
> On 6/4/24 18:52, Marek Vasut wrote:
>> On 6/4/24 4:35 PM, Christophe Roullier wrote:
>>> Ethernet1: RMII with crystal
>>> PHY used is SMSC (LAN8742A)
>>
>> Doesn't the STM32MP135F-DK come with two ethernet ports ?
>> Why not enable both ?
>
> Hi Marek,
>
> As already discussed in V2, second ethernet have no cristal and need
> "phy-supply" property to work, today this property is managed by
> Ethernet glue, but
>
> should be present and managed in PHY node (as explained by Rob). So I
> will push second Ethernet in next step ;-)

Please add that ^ information into the commit message.