]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.19/arm-dts-meson8b-fix-the-ethernet-data-line-signals-i.patch
Linux 4.14.111
[thirdparty/kernel/stable-queue.git] / queue-4.19 / arm-dts-meson8b-fix-the-ethernet-data-line-signals-i.patch
1 From 5672ddcc219522e612159eb083f991018f526054 Mon Sep 17 00:00:00 2001
2 From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
3 Date: Sat, 29 Dec 2018 15:35:56 +0100
4 Subject: ARM: dts: meson8b: fix the Ethernet data line signals in
5 eth_rgmii_pins
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 [ Upstream commit 29f0023d01f063feacfc404f0446905aee4f82ee ]
11
12 According to the Odroid-C1+ schematics the Ethernet TXD1 signal is
13 routed to GPIOH_5 and the TXD0 signal is routed to GPIOH_6.
14 The public S805 datasheet shows that TXD0 can be routed to DIF_2_P and
15 TXD1 can be routed to DIF_2_N instead.
16
17 The pin groups eth_txd0_0 (GPIOH_6) and eth_txd0_1 (DIF_2_P) are both
18 configured as Ethernet TXD0 and TXD1 data lines in meson8b.dtsi. At the
19 same time eth_txd1_0 (GPIOH_5) and eth_txd1_1 (DIF_2_N) are configured
20 as TXD0 and TXD1 data lines as well.
21 This results in a bad Ethernet receive performance. Presumably this is
22 due to the eth_txd0 and eth_txd1 signal being routed to the wrong pins.
23 As a result of that data can only be transmitted on eth_txd2 and
24 eth_txd3. However, I have no scope to fully confirm this assumption.
25
26 The vendor u-boot sources for Odroid-C1 use the following Ethernet
27 pinmux configuration:
28 SET_CBUS_REG_MASK(PERIPHS_PIN_MUX_6, 0x3f4f);
29 SET_CBUS_REG_MASK(PERIPHS_PIN_MUX_7, 0xf00000);
30 This translates to the following pin groups in the mainline kernel:
31 - register 6 bit 0: eth_rxd1 (DIF_0_P)
32 - register 6 bit 1: eth_rxd0 (DIF_0_N)
33 - register 6 bit 2: eth_rx_dv (DIF_1_P)
34 - register 6 bit 3: eth_rx_clk (DIF_1_N)
35 - register 6 bit 6: eth_tx_en (DIF_3_P)
36 - register 6 bit 8: eth_ref_clk (DIF_3_N)
37 - register 6 bit 9: eth_mdc (DIF_4_P)
38 - register 6 bit 10: eth_mdio_en (DIF_4_N)
39 - register 6 bit 11: eth_tx_clk (GPIOH_9)
40 - register 6 bit 12: eth_txd2 (GPIOH_8)
41 - register 6 bit 13: eth_txd3 (GPIOH_7)
42 - register 7 bit 20: eth_txd0_0 (GPIOH_6)
43 - register 7 bit 21: eth_txd1_0 (GPIOH_5)
44 - register 7 bit 22: eth_rxd3 (DIF_2_P)
45 - register 7 bit 23: eth_rxd2 (DIF_2_N)
46
47 Drop the eth_txd0_1 and eth_txd1_1 groups from eth_rgmii_pins to fix the
48 Ethernet transmit performance on Odroid-C1. Also add the eth_rxd2 and
49 eth_rxd3 groups so we don't rely on the bootloader to set them up.
50
51 iperf3 statistics before this change:
52 - transmitting from Odroid-C1: 741 Mbits/sec (0 retries)
53 - receiving on Odroid-C1: 199 Mbits/sec (1713 retries)
54
55 iperf3 statistics after this change:
56 - transmitting from Odroid-C1: 667 Mbits/sec (0 retries)
57 - receiving on Odroid-C1: 750 Mbits/sec (0 retries)
58
59 Fixes: b96446541d8390 ("ARM: dts: meson8b: extend ethernet controller description")
60 Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
61 Cc: Emiliano Ingrassia <ingrassia@epigenesys.com>
62 Cc: Linus Lüssing <linus.luessing@c0d3.blue>
63 Tested-by: Emiliano Ingrassia <ingrassia@epigenesys.com>
64 Reviewed-by: Emiliano Ingrassia <ingrassia@epigenesys.com>
65 Signed-off-by: Kevin Hilman <khilman@baylibre.com>
66 Signed-off-by: Sasha Levin <sashal@kernel.org>
67 ---
68 arch/arm/boot/dts/meson8b.dtsi | 6 +++---
69 1 file changed, 3 insertions(+), 3 deletions(-)
70
71 diff --git a/arch/arm/boot/dts/meson8b.dtsi b/arch/arm/boot/dts/meson8b.dtsi
72 index 08f7f6be7254..5b3e5c50c72f 100644
73 --- a/arch/arm/boot/dts/meson8b.dtsi
74 +++ b/arch/arm/boot/dts/meson8b.dtsi
75 @@ -207,9 +207,7 @@
76 groups = "eth_tx_clk",
77 "eth_tx_en",
78 "eth_txd1_0",
79 - "eth_txd1_1",
80 "eth_txd0_0",
81 - "eth_txd0_1",
82 "eth_rx_clk",
83 "eth_rx_dv",
84 "eth_rxd1",
85 @@ -218,7 +216,9 @@
86 "eth_mdc",
87 "eth_ref_clk",
88 "eth_txd2",
89 - "eth_txd3";
90 + "eth_txd3",
91 + "eth_rxd3",
92 + "eth_rxd2";
93 function = "ethernet";
94 };
95 };
96 --
97 2.19.1
98