From: Michael Riesch <hidden> Date: 2021-07-28 16:11:25
Hi all,
these patches should be orthogonal to the ongoing work of Peter Geis
that aims to introduce the GMAC1 node to the common RK356x dts.
The GMAC0 node, which is exclusive to the RK3568, and the Ethernet
phy nodes in the RK3568 EVB1 are introduced in this series.
The second patch bases on the dts in barebox by Sascha Hauer.
Best regards,
Michael
Michael Riesch (2):
arm64: dts: rockchip: add gmac0 node to rk3568
arm64: dts: rockchip: rk3568-evb1-v10: add ethernet support
.../boot/dts/rockchip/rk3568-evb1-v10.dts | 69 +++++++++++++++++++
arch/arm64/boot/dts/rockchip/rk3568.dtsi | 51 ++++++++++++++
2 files changed, 120 insertions(+)
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
From: Michael Riesch <hidden> Date: 2021-07-28 16:11:30
While both RK3566 and RK3568 feature the gmac1 node, the gmac0
node is exclusive to the RK3568.
Signed-off-by: Michael Riesch <redacted>
---
arch/arm64/boot/dts/rockchip/rk3568.dtsi | 51 ++++++++++++++++++++++++
1 file changed, 51 insertions(+)
Hi,
Am Mittwoch, 28. Juli 2021, 18:10:19 CEST schrieb Michael Riesch:
quoted hunk
While both RK3566 and RK3568 feature the gmac1 node, the gmac0
node is exclusive to the RK3568.
Signed-off-by: Michael Riesch <redacted>
---
arch/arm64/boot/dts/rockchip/rk3568.dtsi | 51 ++++++++++++++++++++++++
1 file changed, 51 insertions(+)
Am Mittwoch, 28. Juli 2021, 18:43:24 CEST schrieb Heiko Stübner:
Hi,
Am Mittwoch, 28. Juli 2021, 18:10:19 CEST schrieb Michael Riesch:
quoted
While both RK3566 and RK3568 feature the gmac1 node, the gmac0
node is exclusive to the RK3568.
Signed-off-by: Michael Riesch <redacted>
---
arch/arm64/boot/dts/rockchip/rk3568.dtsi | 51 ++++++++++++++++++++++++
1 file changed, 51 insertions(+)
From: Andrew Lunn <andrew@lunn.ch> Date: 2021-07-28 17:55:28
On Wed, Jul 28, 2021 at 06:10:20PM +0200, Michael Riesch wrote:
+&gmac0 {
+ phy-mode = "rgmii";
...
+
+ tx_delay = <0x3c>;
+ rx_delay = <0x2f>;
Hi Michael
In general, we try to have the PHY introduce the RGMII delays, not the
MAC. Did you try
phy-mode = "rgmii-id";
and remove these delay values? It is hard for me to say if that will
work because i've no idea what 0x3c and 0x2f means? Are they
equivalent to 2ns?
Andrew
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
From: Peter Geis <hidden> Date: 2021-07-28 18:30:06
On Wed, Jul 28, 2021 at 1:55 PM Andrew Lunn [off-list ref] wrote:
On Wed, Jul 28, 2021 at 06:10:20PM +0200, Michael Riesch wrote:
quoted
+&gmac0 {
+ phy-mode = "rgmii";
...
quoted
+
+ tx_delay = <0x3c>;
+ rx_delay = <0x2f>;
Hi Michael
In general, we try to have the PHY introduce the RGMII delays, not the
MAC. Did you try
phy-mode = "rgmii-id";
and remove these delay values? It is hard for me to say if that will
work because i've no idea what 0x3c and 0x2f means? Are they
equivalent to 2ns?
Unfortunately the driver and TRM are both rather non-specific as to
how this works.
The driver sets the tx_delay to 0x30 and rx_delay to 0x10 if these
values are not defined, or sets them both to 0 in case of rgmii_id.
Generally all rockchip boards use this value instead of the rgmii_id,
I imagine because it's more consistent to tune here than the hit or
miss support of the phy drivers.
The usual course of action is to test to find the lowest and highest
working values and take the median value to plug in here.
From: Andrew Lunn <andrew@lunn.ch> Date: 2021-07-28 20:38:00
Generally all rockchip boards use this value instead of the rgmii_id,
I imagine because it's more consistent to tune here than the hit or
miss support of the phy drivers.
Most PHY drivers actually implement it correctly, since by default,
most systems get the PHY to do the delays.
But if most Rockchip boards do it this way, there is a lot to be said
for consistence, so this is fine by me.
Andrew
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
From: Michael Riesch <hidden> Date: 2021-07-29 09:07:57
Hello Andrew, Peter,
On 7/28/21 10:37 PM, Andrew Lunn wrote:
quoted
Generally all rockchip boards use this value instead of the rgmii_id,
I imagine because it's more consistent to tune here than the hit or
miss support of the phy drivers.
Most PHY drivers actually implement it correctly, since by default,
most systems get the PHY to do the delays.
But if most Rockchip boards do it this way, there is a lot to be said
for consistence, so this is fine by me.
I have tested a dts without the delays and with phy-mode = "rgmii-id"
and it seems to work just fine.
Although consistency with other Rockchip boards is something one should
consider, I think I'll go along the "rgmii-id" path since this seems to
be a more general convention.
Thanks for your comments, I'll submit a v2.
Regards, Michael
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel