Re: [PATCH 2/2] arm64: dts: allwinner: h616: update emac properties for Orange Pi Zero 3

From: Jernej Škrabec
Date: Fri Oct 13 2023 - 14:45:54 EST


Hi!

Dne torek, 10. oktober 2023 ob 17:38:12 CEST je Chukun Pan napisal(a):
> Add the correct delay value to emac. Also add missing mdio
> properties for the YT8531 PHY (clock output required).
> With these changes, Ethernet now looks stable.

This is also a fix, so it would also deserve Fixes tag. In fact, please merge
previous and this patch into one. After all, you are fixing only one thing -
ethernet on OrangePi Zero 3 board.

Can you also explain how did you figure out that additional PHY properties
are needed? At first glance, based on description of motorcomm,keep-pll-enabled,
it's not immediately clear why it should be needed. Same goes for second
property.

1800 ps delay basically means that rgmii is not correct type and rgmii-rxid
should be used instead. Indeed, schematic confirms that's the case. With that,
allwinner,rx-delay-ps can be 0 and thus ommited from DT file.

Since there is many differences, I suggest that you remove whole emac0
node from common DTSI file and put specific ones to each board. It will
be less confusing that way.

Best regards,
Jernej

>
> Signed-off-by: Chukun Pan <amadeus@xxxxxxxxxx>
> ---
> arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts
> index 00fe28caac93..02c7836b624a 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts
> @@ -13,10 +13,14 @@ / {
> };
>
> &emac0 {
> + allwinner,rx-delay-ps = <1800>;
> + allwinner,tx-delay-ps = <700>;
> phy-supply = <&reg_dldo1>;
> };
>
> &ext_rgmii_phy {
> + motorcomm,keep-pll-enabled;
> + motorcomm,auto-sleep-disabled;
> motorcomm,clk-out-frequency-hz = <125000000>;
> };
>
>