Merge pull request #1039 from agners/fix-ethernet-link-restart

Fix ethernet link not comming up (#1038)
This commit is contained in:
Stefan Agner 2020-12-01 01:03:22 +01:00 committed by GitHub
commit 681fe1421a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 67 additions and 65 deletions

View File

@ -1,8 +1,8 @@
From 734f52f38625ce29c964517255538b3b0b546e8d Mon Sep 17 00:00:00 2001
Message-Id: <734f52f38625ce29c964517255538b3b0b546e8d.1603528796.git.stefan@agner.ch>
From 9d2a2b44e67b0ef49e534c097e8b5e3e1173b033 Mon Sep 17 00:00:00 2001
Message-Id: <9d2a2b44e67b0ef49e534c097e8b5e3e1173b033.1606779815.git.stefan@agner.ch>
From: Christian Hewitt <christianshewitt@gmail.com>
Date: Tue, 15 Sep 2020 17:24:30 +0200
Subject: [PATCH 1/7] arm64: dts: meson: convert ODROID-N2 to dtsi
Subject: [PATCH 1/6] arm64: dts: meson: convert ODROID-N2 to dtsi
Convert the current ODROID-N2 dts into a common dtsi in preparation
for adding ODROID-N2+ support.
@ -1282,5 +1282,5 @@ index 000000000000..6982632ae646
+ phy-supply = <&hub_5v>;
+};
--
2.28.0
2.29.2

View File

@ -1,10 +1,10 @@
From 75f1e8330dac46a0bef8a360be0ae4566d9a470c Mon Sep 17 00:00:00 2001
Message-Id: <75f1e8330dac46a0bef8a360be0ae4566d9a470c.1603528796.git.stefan@agner.ch>
In-Reply-To: <734f52f38625ce29c964517255538b3b0b546e8d.1603528796.git.stefan@agner.ch>
References: <734f52f38625ce29c964517255538b3b0b546e8d.1603528796.git.stefan@agner.ch>
From 258f03fa4fd897a61b5861df1f809e234711dd49 Mon Sep 17 00:00:00 2001
Message-Id: <258f03fa4fd897a61b5861df1f809e234711dd49.1606779815.git.stefan@agner.ch>
In-Reply-To: <9d2a2b44e67b0ef49e534c097e8b5e3e1173b033.1606779815.git.stefan@agner.ch>
References: <9d2a2b44e67b0ef49e534c097e8b5e3e1173b033.1606779815.git.stefan@agner.ch>
From: Christian Hewitt <christianshewitt@gmail.com>
Date: Tue, 15 Sep 2020 17:24:31 +0200
Subject: [PATCH 2/7] dt-bindings: arm: amlogic: add support for the ODROID-N2+
Subject: [PATCH 2/6] dt-bindings: arm: amlogic: add support for the ODROID-N2+
HardKernel ODROID-N2+ uses a revised Amlogic S922X v2 chip that supports
higher cpu clock speeds than the original ODROID-N2.
@ -32,5 +32,5 @@ index 5eba9f48823e..12ba8d074370 100644
- ugoos,am6
- const: amlogic,s922x
--
2.28.0
2.29.2

View File

@ -1,10 +1,10 @@
From c714cb26fcb59f5201f7aac68dfd9883319881b2 Mon Sep 17 00:00:00 2001
Message-Id: <c714cb26fcb59f5201f7aac68dfd9883319881b2.1603528796.git.stefan@agner.ch>
In-Reply-To: <734f52f38625ce29c964517255538b3b0b546e8d.1603528796.git.stefan@agner.ch>
References: <734f52f38625ce29c964517255538b3b0b546e8d.1603528796.git.stefan@agner.ch>
From 6cfaddae585e5a87c5253c932b8d58e153159f6b Mon Sep 17 00:00:00 2001
Message-Id: <6cfaddae585e5a87c5253c932b8d58e153159f6b.1606779815.git.stefan@agner.ch>
In-Reply-To: <9d2a2b44e67b0ef49e534c097e8b5e3e1173b033.1606779815.git.stefan@agner.ch>
References: <9d2a2b44e67b0ef49e534c097e8b5e3e1173b033.1606779815.git.stefan@agner.ch>
From: Christian Hewitt <christianshewitt@gmail.com>
Date: Tue, 15 Sep 2020 17:24:32 +0200
Subject: [PATCH 3/7] arm64: dts: meson: add support for the ODROID-N2+
Subject: [PATCH 3/6] arm64: dts: meson: add support for the ODROID-N2+
HardKernel ODROID-N2+ uses an Amlogic S922X rev. C chip capable of higher
clock speeds than the original ODROID-N2.
@ -74,5 +74,5 @@ index 000000000000..5de2815ba99d
+};
+
--
2.28.0
2.29.2

View File

@ -1,10 +1,10 @@
From 0a3a45efeefaf65c170df265126a07da3236e178 Mon Sep 17 00:00:00 2001
Message-Id: <0a3a45efeefaf65c170df265126a07da3236e178.1603528796.git.stefan@agner.ch>
In-Reply-To: <734f52f38625ce29c964517255538b3b0b546e8d.1603528796.git.stefan@agner.ch>
References: <734f52f38625ce29c964517255538b3b0b546e8d.1603528796.git.stefan@agner.ch>
From 47f804dc970e2b1f71f1f032a0da2ef3b8315be0 Mon Sep 17 00:00:00 2001
Message-Id: <47f804dc970e2b1f71f1f032a0da2ef3b8315be0.1606779815.git.stefan@agner.ch>
In-Reply-To: <9d2a2b44e67b0ef49e534c097e8b5e3e1173b033.1606779815.git.stefan@agner.ch>
References: <9d2a2b44e67b0ef49e534c097e8b5e3e1173b033.1606779815.git.stefan@agner.ch>
From: Jerome Brunet <jbrunet@baylibre.com>
Date: Fri, 23 Oct 2020 11:41:39 +0200
Subject: [PATCH 5/7] arm64: dts: meson: odroid-n2 plus: fix vddcpu_a pwm
Subject: [PATCH 4/6] arm64: dts: meson: odroid-n2 plus: fix vddcpu_a pwm
On the odroid N2 plus, cpufreq is not available due to an error on the cpu
regulators. vddcpu a and b get the same PWM. The one provided to vddcpu A
@ -38,5 +38,5 @@ index 5de2815ba99d..ce1198ad34e4 100644
&vddcpu_b {
--
2.28.0
2.29.2

View File

@ -1,10 +1,10 @@
From 75b8900d6750fa9d44546219a9b925c5df73a985 Mon Sep 17 00:00:00 2001
Message-Id: <75b8900d6750fa9d44546219a9b925c5df73a985.1605564817.git.stefan@agner.ch>
In-Reply-To: <734f52f38625ce29c964517255538b3b0b546e8d.1605564817.git.stefan@agner.ch>
References: <734f52f38625ce29c964517255538b3b0b546e8d.1605564817.git.stefan@agner.ch>
From 2c15ad491233a80d61c811a944b86067e2e74686 Mon Sep 17 00:00:00 2001
Message-Id: <2c15ad491233a80d61c811a944b86067e2e74686.1606779815.git.stefan@agner.ch>
In-Reply-To: <9d2a2b44e67b0ef49e534c097e8b5e3e1173b033.1606779815.git.stefan@agner.ch>
References: <9d2a2b44e67b0ef49e534c097e8b5e3e1173b033.1606779815.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Mon, 16 Nov 2020 23:11:02 +0100
Subject: [PATCH 8/8] arm64: dts: meson: add RTC to ODROID-N2 boards
Subject: [PATCH 5/6] arm64: dts: meson: add RTC to ODROID-N2 boards
All ODROID-N2 boards come with a NXP PCF8563TS RTC connected to I2C bus
3. This is the RTC which is connected to the on-board RTC backup battery.

View File

@ -0,0 +1,40 @@
From 01467c329a3aa70f92ac3cc6d1ab25252889cc34 Mon Sep 17 00:00:00 2001
Message-Id: <01467c329a3aa70f92ac3cc6d1ab25252889cc34.1606779815.git.stefan@agner.ch>
In-Reply-To: <9d2a2b44e67b0ef49e534c097e8b5e3e1173b033.1606779815.git.stefan@agner.ch>
References: <9d2a2b44e67b0ef49e534c097e8b5e3e1173b033.1606779815.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Tue, 1 Dec 2020 00:32:23 +0100
Subject: [PATCH 6/6] arm64: dts: meson: fix PHY deassert timing requirements
According to the datasheet (Rev. 1.4, page 30) the RTL8211F requires
at least 50ms "for internal circuits settling time" before accessing
the PHY registers. This fixes an issue where the Ethernet link doesn't
come up when using ip link set down/up:
[ 29.360965] meson8b-dwmac ff3f0000.ethernet eth0: Link is Down
[ 34.569012] meson8b-dwmac ff3f0000.ethernet eth0: PHY [0.0:00] driver [RTL8211F Gigabit Ethernet] (irq=31)
[ 34.676732] meson8b-dwmac ff3f0000.ethernet: Failed to reset the dma
[ 34.678874] meson8b-dwmac ff3f0000.ethernet eth0: stmmac_hw_setup: DMA engine initialization failed
[ 34.687850] meson8b-dwmac ff3f0000.ethernet eth0: stmmac_open: Hw setup failed
Fixes: 658e4129bb81 ("arm64: dts: meson: g12b: odroid-n2: add the Ethernet PHY reset line")
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
index 40390feba053..08c44fb0ccd0 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
@@ -415,7 +415,7 @@ external_phy: ethernet-phy@0 {
max-speed = <1000>;
reset-assert-us = <10000>;
- reset-deassert-us = <30000>;
+ reset-deassert-us = <50000>;
reset-gpios = <&gpio GPIOZ_15 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;
interrupt-parent = <&gpio_intc>;
--
2.29.2

View File

@ -1,38 +0,0 @@
From 03041630d824a775b71f6008067955a51d069845 Mon Sep 17 00:00:00 2001
Message-Id: <03041630d824a775b71f6008067955a51d069845.1603528796.git.stefan@agner.ch>
In-Reply-To: <734f52f38625ce29c964517255538b3b0b546e8d.1603528796.git.stefan@agner.ch>
References: <734f52f38625ce29c964517255538b3b0b546e8d.1603528796.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Thu, 27 Aug 2020 23:29:57 +0200
Subject: [PATCH 6/7] clk: meson: g12a: mark fclk_div2 as critical
On Amlogic Meson G12b platform, similar to fclk_div3, the fclk_div2
seems to be necessary for the system to operate correctly as well.
Typically, the clock also gets chosen by the eMMC peripheral. This
probably masked the problem so far. However, when booting from a SD
card the clock seems to get disabled which leads to a system freeze.
Let's mark this clock as critical, fixing boot from SD card on G12b
platforms.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
drivers/clk/meson/g12a.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c
index 9803d44bb157..9a6722a1dc19 100644
--- a/drivers/clk/meson/g12a.c
+++ b/drivers/clk/meson/g12a.c
@@ -298,6 +298,7 @@ static struct clk_regmap g12a_fclk_div2 = {
&g12a_fclk_div2_div.hw
},
.num_parents = 1,
+ .flags = CLK_IS_CRITICAL,
},
};
--
2.28.0