2022-11-11 09:59:33

by Anand Moon

[permalink] [raw]
Subject: [linux-next-v1 1/3] arm64: dts: rockchip: Fix gmac phy mode to rgmii on Rock 3A sbc

On rk356x ethernet phy support reduced media independent interface (RMII)
and reduced gigabit media independent interface (RGMII).
So set the phy mode to rgmii.

Signed-off-by: Anand Moon <[email protected]>
---
arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts b/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts
index ea74ba32fbbd..72e410e3aca8 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts
@@ -253,7 +253,7 @@ &gmac1 {
assigned-clock-rates = <0>, <125000000>;
clock_in_out = "output";
phy-handle = <&rgmii_phy1>;
- phy-mode = "rgmii-id";
+ phy-mode = "rgmii";
pinctrl-names = "default";
pinctrl-0 = <&gmac1m1_miim
&gmac1m1_tx_bus2
--
2.38.1



2022-11-11 12:22:38

by Michael Riesch

[permalink] [raw]
Subject: Re: [linux-next-v1 1/3] arm64: dts: rockchip: Fix gmac phy mode to rgmii on Rock 3A sbc

Hi Anand,

On 11/11/22 10:42, Anand Moon wrote:
> On rk356x ethernet phy support reduced media independent interface (RMII)
> and reduced gigabit media independent interface (RGMII).
> So set the phy mode to rgmii.
>
> Signed-off-by: Anand Moon <[email protected]>
> ---
> arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts b/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts
> index ea74ba32fbbd..72e410e3aca8 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts
> @@ -253,7 +253,7 @@ &gmac1 {
> assigned-clock-rates = <0>, <125000000>;
> clock_in_out = "output";
> phy-handle = <&rgmii_phy1>;
> - phy-mode = "rgmii-id";
> + phy-mode = "rgmii";

What are you trying to fix here? If it ain't broken, don't fix it. I
would assume if you switch from rgmii-id to rgmii you need to adjust the
rx/tx-delays, otherwise this change does not make sense to me. Feel free
to point out what I am missing, though.

Best regards,
Michael

> pinctrl-names = "default";
> pinctrl-0 = <&gmac1m1_miim
> &gmac1m1_tx_bus2

2022-11-11 13:32:51

by Peter Geis

[permalink] [raw]
Subject: Re: [linux-next-v1 1/3] arm64: dts: rockchip: Fix gmac phy mode to rgmii on Rock 3A sbc

On Fri, Nov 11, 2022 at 4:43 AM Anand Moon <[email protected]> wrote:
>
> On rk356x ethernet phy support reduced media independent interface (RMII)
> and reduced gigabit media independent interface (RGMII).
> So set the phy mode to rgmii.

The RTL8211 supports rgmii-id just fine, you only need to go to rgmii
on these boards if you need to tune the delays manually.

>
> Signed-off-by: Anand Moon <[email protected]>
> ---
> arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts b/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts
> index ea74ba32fbbd..72e410e3aca8 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts
> @@ -253,7 +253,7 @@ &gmac1 {
> assigned-clock-rates = <0>, <125000000>;
> clock_in_out = "output";
> phy-handle = <&rgmii_phy1>;
> - phy-mode = "rgmii-id";
> + phy-mode = "rgmii";

You should be setting the delay tuning in this patch as well.

> pinctrl-names = "default";
> pinctrl-0 = <&gmac1m1_miim
> &gmac1m1_tx_bus2
> --
> 2.38.1
>
>
> _______________________________________________
> Linux-rockchip mailing list
> [email protected]
> http://lists.infradead.org/mailman/listinfo/linux-rockchip

2022-11-16 18:51:16

by Anand Moon

[permalink] [raw]
Subject: Re: [linux-next-v1 1/3] arm64: dts: rockchip: Fix gmac phy mode to rgmii on Rock 3A sbc

Hi Petter / Michael.

Thanks for your review comments.

On Fri, 11 Nov 2022 at 18:26, Peter Geis <[email protected]> wrote:
>
> On Fri, Nov 11, 2022 at 4:43 AM Anand Moon <[email protected]> wrote:
> >
> > On rk356x ethernet phy support reduced media independent interface (RMII)
> > and reduced gigabit media independent interface (RGMII).
> > So set the phy mode to rgmii.
>
> The RTL8211 supports rgmii-id just fine, you only need to go to rgmii
> on these boards if you need to tune the delays manually.

Ok rgmii supports internal rx and tx clock delay
whereas rgmii-id does not supports internal clock delay.

>
> >
> > Signed-off-by: Anand Moon <[email protected]>
> > ---
> > arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts b/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts
> > index ea74ba32fbbd..72e410e3aca8 100644
> > --- a/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts
> > +++ b/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts
> > @@ -253,7 +253,7 @@ &gmac1 {
> > assigned-clock-rates = <0>, <125000000>;
> > clock_in_out = "output";
> > phy-handle = <&rgmii_phy1>;
> > - phy-mode = "rgmii-id";
> > + phy-mode = "rgmii";
>
> You should be setting the delay tuning in this patch as well.

I will try to fix this in the next version.

>
> > pinctrl-names = "default";
> > pinctrl-0 = <&gmac1m1_miim
> > &gmac1m1_tx_bus2
> > --
> > 2.38.1
Thanks


-Anand