2020-10-20 12:06:12

by Jerome Brunet

[permalink] [raw]
Subject: [PATCH] arm64: dts: amlogic: add missing ethernet reset ID

From: Anand Moon <[email protected]>

Add reset external reset of the ethernet mac controller

Signed-off-by: Anand Moon <[email protected]>
Signed-off-by: Jerome Brunet <[email protected]>
---
arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 2 ++
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 2 ++
arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 3 +++
3 files changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
index fae48efae83e..724ee179b316 100644
--- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
@@ -227,6 +227,8 @@ ethmac: ethernet@ff3f0000 {
"timing-adjustment";
rx-fifo-depth = <4096>;
tx-fifo-depth = <2048>;
+ resets = <&reset RESET_ETHERNET>;
+ reset-names = "stmmaceth";
status = "disabled";
};

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
index c95ebe615176..8514fe6a275a 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
@@ -224,6 +224,8 @@ ethmac: ethernet@ff3f0000 {
"timing-adjustment";
rx-fifo-depth = <4096>;
tx-fifo-depth = <2048>;
+ resets = <&reset RESET_ETHERNET>;
+ reset-names = "stmmaceth";
status = "disabled";

mdio0: mdio {
diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
index 0edd137151f8..726b91d3a905 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
@@ -13,6 +13,7 @@
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/power/meson-gxbb-power.h>
+#include <dt-bindings/reset/amlogic,meson-gxbb-reset.h>
#include <dt-bindings/thermal/thermal.h>

/ {
@@ -575,6 +576,8 @@ ethmac: ethernet@c9410000 {
interrupt-names = "macirq";
rx-fifo-depth = <4096>;
tx-fifo-depth = <2048>;
+ resets = <&reset RESET_ETHERNET>;
+ reset-names = "stmmaceth";
power-domains = <&pwrc PWRC_GXBB_ETHERNET_MEM_ID>;
status = "disabled";
};
--
2.25.4


2020-10-20 13:14:42

by Neil Armstrong

[permalink] [raw]
Subject: Re: [PATCH] arm64: dts: amlogic: add missing ethernet reset ID

On 20/10/2020 14:01, Jerome Brunet wrote:
> From: Anand Moon <[email protected]>
>
> Add reset external reset of the ethernet mac controller
>
> Signed-off-by: Anand Moon <[email protected]>
> Signed-off-by: Jerome Brunet <[email protected]>
> ---
> arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 2 ++
> arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 2 ++
> arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 3 +++
> 3 files changed, 7 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
> index fae48efae83e..724ee179b316 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
> @@ -227,6 +227,8 @@ ethmac: ethernet@ff3f0000 {
> "timing-adjustment";
> rx-fifo-depth = <4096>;
> tx-fifo-depth = <2048>;
> + resets = <&reset RESET_ETHERNET>;
> + reset-names = "stmmaceth";
> status = "disabled";
> };
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
> index c95ebe615176..8514fe6a275a 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
> @@ -224,6 +224,8 @@ ethmac: ethernet@ff3f0000 {
> "timing-adjustment";
> rx-fifo-depth = <4096>;
> tx-fifo-depth = <2048>;
> + resets = <&reset RESET_ETHERNET>;
> + reset-names = "stmmaceth";
> status = "disabled";
>
> mdio0: mdio {
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
> index 0edd137151f8..726b91d3a905 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
> @@ -13,6 +13,7 @@
> #include <dt-bindings/interrupt-controller/irq.h>
> #include <dt-bindings/interrupt-controller/arm-gic.h>
> #include <dt-bindings/power/meson-gxbb-power.h>
> +#include <dt-bindings/reset/amlogic,meson-gxbb-reset.h>
> #include <dt-bindings/thermal/thermal.h>
>
> / {
> @@ -575,6 +576,8 @@ ethmac: ethernet@c9410000 {
> interrupt-names = "macirq";
> rx-fifo-depth = <4096>;
> tx-fifo-depth = <2048>;
> + resets = <&reset RESET_ETHERNET>;
> + reset-names = "stmmaceth";
> power-domains = <&pwrc PWRC_GXBB_ETHERNET_MEM_ID>;
> status = "disabled";
> };
>

Reviewed-by: Neil Armstrong <[email protected]>

2020-10-21 05:42:27

by Kevin Hilman

[permalink] [raw]
Subject: Re: [PATCH] arm64: dts: amlogic: add missing ethernet reset ID

Neil Armstrong <[email protected]> writes:

> On 20/10/2020 14:01, Jerome Brunet wrote:
>> From: Anand Moon <[email protected]>
>>
>> Add reset external reset of the ethernet mac controller
>>
>> Signed-off-by: Anand Moon <[email protected]>
>> Signed-off-by: Jerome Brunet <[email protected]>

[...]

> Reviewed-by: Neil Armstrong <[email protected]>

Neil, do we need this in u-boot also? I seem to have network issues in
u-boot on board with external PHY running mainline u-boot.

Kevin

2020-10-21 06:34:17

by Neil Armstrong

[permalink] [raw]
Subject: Re: [PATCH] arm64: dts: amlogic: add missing ethernet reset ID

On 20/10/2020 16:49, Kevin Hilman wrote:
> Neil Armstrong <[email protected]> writes:
>
>> On 20/10/2020 14:01, Jerome Brunet wrote:
>>> From: Anand Moon <[email protected]>
>>>
>>> Add reset external reset of the ethernet mac controller
>>>
>>> Signed-off-by: Anand Moon <[email protected]>
>>> Signed-off-by: Jerome Brunet <[email protected]>
>
> [...]
>
>> Reviewed-by: Neil Armstrong <[email protected]>
>
> Neil, do we need this in u-boot also? I seem to have network issues in
> u-boot on board with external PHY running mainline u-boot.

Yes, U-boot supports it, but simply does "reset_deassert", so I don't think
it would have any impact, the real issue is the PHY reset.

Without a proper reset line, no idea how to do that cleanly.

Neil

>
> Kevin
>

2020-10-21 09:55:41

by Martin Blumenstingl

[permalink] [raw]
Subject: Re: [PATCH] arm64: dts: amlogic: add missing ethernet reset ID

On Tue, Oct 20, 2020 at 2:10 PM Jerome Brunet <[email protected]> wrote:
>
> From: Anand Moon <[email protected]>
>
> Add reset external reset of the ethernet mac controller
>
> Signed-off-by: Anand Moon <[email protected]>
> Signed-off-by: Jerome Brunet <[email protected]>
Reviewed-by: Martin Blumenstingl <[email protected]>

note to self:
we're using the Ethernet reset on Meson8b and Meson8m2 for a long time
and I don't remember any problems with it *knocks on wood*

2020-10-21 18:36:17

by Kevin Hilman

[permalink] [raw]
Subject: Re: [PATCH] arm64: dts: amlogic: add missing ethernet reset ID

On Tue, 20 Oct 2020 14:01:41 +0200, Jerome Brunet wrote:
> Add reset external reset of the ethernet mac controller

Applied, thanks!

[1/1] arm64: dts: amlogic: add missing ethernet reset ID
commit: f3362f0c18174a1f334a419ab7d567a36bd1b3f3

Best regards,
--
Kevin Hilman <[email protected]>