From: "Petr Štetiar" <ynezz@true.cz>
To: Arnd Bergmann <arnd@arndb.de>, Olof Johansson <olof@lixom.net>,
soc@kernel.org, Rob Herring <robh+dt@kernel.org>,
Maxime Ripard <mripard@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>
Cc: "Petr Štetiar" <ynezz@true.cz>,
stable@vger.kernel.org, "Bastien Roucariès" <rouca@debian.org>,
linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev
Subject: [PATCH v2 2/3] ARM: dts: sun7i: add support for A20-olinuxino-lime2 Revisions G/G1/G2
Date: Tue, 15 Mar 2022 10:52:43 +0100 [thread overview]
Message-ID: <20220315095244.29718-3-ynezz@true.cz> (raw)
In-Reply-To: <20220315095244.29718-1-ynezz@true.cz>
Lime2 HW first public revisions G/G1/G2 used RTL8211E PHYs. Later public
revision K and newest are using KSZ9031 PHYs. Up to commit bbc4d71d6354
("net: phy: realtek: fix rtl8211e rx/tx delay config") it was possible
to use same DTS for A20-olinuxino-lime2 with either KSZ9031 or RTL8211E
PHYs, thus on all HW revisions.
Having commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay
config") applied, Bastien found out, that his board using RTL8211E PHY
doesn't work anymore and tried to fix it by providing proper `phy-mode`
in commit 55dd7e059098 ("ARM: dts: sun7i: A20-olinuxino-lime2: Fix
ethernet phy-mode") with following reasoning:
Commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay
config") sets the RX/TX delay according to the phy-mode property in the
device tree. For the A20-olinuxino-lime2 board this is "rgmii", which is
the wrong setting.
Indeed, the settings were likely wrong, but only for boards with G/G1/G2
revisions using RTL8211E PHY. Those settings were still correct on
boards with HW revisions K and later with KSZ9031 PHY, so this fix was
incorrect.
So fix it properly by introducing separate DTS for boards with G/G1/G2
revisions using proper PHY mode for RTL8211E PHY.
Cc: stable@vger.kernel.org
Cc: Bastien Roucariès <rouca@debian.org>
References: https://github.com/OLIMEX/OLINUXINO/blob/master/HARDWARE/A20-OLinuXino-LIME2/hardware_revision_changes_log.txt
Signed-off-by: Petr Štetiar <ynezz@true.cz>
---
arch/arm/boot/dts/Makefile | 2 ++
.../boot/dts/sun7i-a20-olinuxino-lime2-emmc-revG.dts | 11 +++++++++++
arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-revG.dts | 11 +++++++++++
3 files changed, 24 insertions(+)
create mode 100644 arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc-revG.dts
create mode 100644 arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-revG.dts
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index e41eca79c950..241a1a229f0f 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -1244,7 +1244,9 @@ dtb-$(CONFIG_MACH_SUN7I) += \
sun7i-a20-olinuxino-lime.dtb \
sun7i-a20-olinuxino-lime-emmc.dtb \
sun7i-a20-olinuxino-lime2.dtb \
+ sun7i-a20-olinuxino-lime2-revG.dtb \
sun7i-a20-olinuxino-lime2-emmc.dtb \
+ sun7i-a20-olinuxino-lime2-emmc-revG.dtb \
sun7i-a20-olinuxino-micro.dtb \
sun7i-a20-olinuxino-micro-emmc.dtb \
sun7i-a20-orangepi.dtb \
diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc-revG.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc-revG.dts
new file mode 100644
index 000000000000..1e29f973614d
--- /dev/null
+++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc-revG.dts
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0+
+#include "sun7i-a20-olinuxino-lime2-emmc.dts"
+
+/ {
+ model = "Olimex A20-OLinuXino-LIME2-eMMC (Rev G/G1/G2)";
+ compatible = "olimex,a20-olinuxino-lime2-emmc-revG", "allwinner,sun7i-a20";
+};
+
+&gmac {
+ phy-mode = "rgmii-id";
+};
diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-revG.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-revG.dts
new file mode 100644
index 000000000000..7122dc99810a
--- /dev/null
+++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-revG.dts
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0+
+#include "sun7i-a20-olinuxino-lime2.dts"
+
+/ {
+ model = "Olimex A20-OLinuXino-LIME2 (Rev G/G1/G2)";
+ compatible = "olimex,a20-olinuxino-lime2-revG", "allwinner,sun7i-a20";
+};
+
+&gmac {
+ phy-mode = "rgmii-id";
+};
next prev parent reply other threads:[~2022-03-15 9:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220315095244.29718-1-ynezz@true.cz>
2022-03-15 9:52 ` [PATCH v2 1/3] Revert "ARM: dts: sun7i: A20-olinuxino-lime2: Fix ethernet phy-mode" Petr Štetiar
2022-03-15 18:50 ` Jernej Škrabec
2022-03-15 22:44 ` Andre Przywara
2022-03-15 9:52 ` Petr Štetiar [this message]
2022-03-15 9:52 ` [PATCH v2 3/3] dt-bindings: arm: sunxi: add A20-olinuxino-lime2 Revisions G/G1/G2 Petr Štetiar
2022-03-23 18:39 ` Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220315095244.29718-3-ynezz@true.cz \
--to=ynezz@true.cz \
--cc=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=jernej.skrabec@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=mripard@kernel.org \
--cc=olof@lixom.net \
--cc=robh+dt@kernel.org \
--cc=rouca@debian.org \
--cc=soc@kernel.org \
--cc=stable@vger.kernel.org \
--cc=wens@csie.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox