2019-05-20 18:05:02

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH] arm64: dts: meson-g12a-x96-max: Add Gigabit Ethernet Support

Enable the network interface of the X96 Mac using an external
Realtek RTL8211F gigabit PHY, needing the same broken-eee properties
as the previous Amlogic SoC generations.

Signed-off-by: Neil Armstrong <[email protected]>
---
.../boot/dts/amlogic/meson-g12a-x96-max.dts | 22 +++++++++++++++++++
1 file changed, 22 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
index 5cdc263b03e6..5ca79109c250 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
@@ -15,6 +15,7 @@

aliases {
serial0 = &uart_AO;
+ ethernet0 = &ethmac;
};
chosen {
stdout-path = "serial0:115200n8";
@@ -150,6 +151,27 @@
pinctrl-names = "default";
};

+&ext_mdio {
+ external_phy: ethernet-phy@0 {
+ /* Realtek RTL8211F (0x001cc916) */
+ reg = <0>;
+ max-speed = <1000>;
+ eee-broken-1000t;
+ };
+};
+
+&ethmac {
+ pinctrl-0 = <&eth_rmii_pins>, <&eth_rgmii_pins>;
+ pinctrl-names = "default";
+ status = "okay";
+ phy-mode = "rgmii";
+ phy-handle = <&external_phy>;
+ amlogic,tx-delay-ns = <2>;
+ snps,reset-gpio = <&gpio GPIOZ_14 0>;
+ snps,reset-delays-us = <0 10000 1000000>;
+ snps,reset-active-low;
+};
+
&uart_A {
status = "okay";
pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
--
2.21.0



2019-05-20 18:23:07

by Martin Blumenstingl

[permalink] [raw]
Subject: Re: [PATCH] arm64: dts: meson-g12a-x96-max: Add Gigabit Ethernet Support

Hi Neil,

On Mon, May 20, 2019 at 3:43 PM Neil Armstrong <[email protected]> wrote:
>
> Enable the network interface of the X96 Mac using an external
> Realtek RTL8211F gigabit PHY, needing the same broken-eee properties
> as the previous Amlogic SoC generations.
>
> Signed-off-by: Neil Armstrong <[email protected]>
> ---
> .../boot/dts/amlogic/meson-g12a-x96-max.dts | 22 +++++++++++++++++++
> 1 file changed, 22 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
> index 5cdc263b03e6..5ca79109c250 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
> @@ -15,6 +15,7 @@
>
> aliases {
> serial0 = &uart_AO;
> + ethernet0 = &ethmac;
> };
> chosen {
> stdout-path = "serial0:115200n8";
> @@ -150,6 +151,27 @@
> pinctrl-names = "default";
> };
>
> +&ext_mdio {
> + external_phy: ethernet-phy@0 {
> + /* Realtek RTL8211F (0x001cc916) */
> + reg = <0>;
> + max-speed = <1000>;
> + eee-broken-1000t;
do we still need eee-broken-1000t? there are only 2 boards left which
set it and I'm not sure whether those still need it after Carlo's
fixes

> + };
> +};
> +
> +&ethmac {
> + pinctrl-0 = <&eth_rmii_pins>, <&eth_rgmii_pins>;
Jerome renamed "eth_rmii_pins" to "eth_pins" in v2 of his Ethernet
pinctrl patch: [0]
you missed his update only by a few minutes


Martin


[0] https://patchwork.kernel.org/patch/10951103/

2019-05-21 08:36:28

by Neil Armstrong

[permalink] [raw]
Subject: Re: [PATCH] arm64: dts: meson-g12a-x96-max: Add Gigabit Ethernet Support

Hi,

On 20/05/2019 19:49, Martin Blumenstingl wrote:
> Hi Neil,
>
> On Mon, May 20, 2019 at 3:43 PM Neil Armstrong <[email protected]> wrote:
>>
>> Enable the network interface of the X96 Mac using an external
>> Realtek RTL8211F gigabit PHY, needing the same broken-eee properties
>> as the previous Amlogic SoC generations.
>>
>> Signed-off-by: Neil Armstrong <[email protected]>
>> ---
>> .../boot/dts/amlogic/meson-g12a-x96-max.dts | 22 +++++++++++++++++++
>> 1 file changed, 22 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
>> index 5cdc263b03e6..5ca79109c250 100644
>> --- a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
>> +++ b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
>> @@ -15,6 +15,7 @@
>>
>> aliases {
>> serial0 = &uart_AO;
>> + ethernet0 = &ethmac;
>> };
>> chosen {
>> stdout-path = "serial0:115200n8";
>> @@ -150,6 +151,27 @@
>> pinctrl-names = "default";
>> };
>>
>> +&ext_mdio {
>> + external_phy: ethernet-phy@0 {
>> + /* Realtek RTL8211F (0x001cc916) */
>> + reg = <0>;
>> + max-speed = <1000>;
>> + eee-broken-1000t;
> do we still need eee-broken-1000t? there are only 2 boards left which
> set it and I'm not sure whether those still need it after Carlo's
> fixes

In our tests, this boards really needs it... otherwise the network stalls
pretty quickly. I'd prefer to avoid it but seems it's necessary.

>
>> + };
>> +};
>> +
>> +&ethmac {
>> + pinctrl-0 = <&eth_rmii_pins>, <&eth_rgmii_pins>;
> Jerome renamed "eth_rmii_pins" to "eth_pins" in v2 of his Ethernet
> pinctrl patch: [0]
> you missed his update only by a few minutes


Damn...
Thx.

Neil

>
>
> Martin
>
>
> [0] https://patchwork.kernel.org/patch/10951103/
>