From: Trevor Woerner <twoerner@gmail.com>
To: yocto@lists.yoctoproject.org
Subject: [meta-rockchip][PATCH] rock-pi-e: fix kernel device-tree
Date: Tue, 16 Jan 2024 17:21:06 -0500 [thread overview]
Message-ID: <20240116222106.24629-1-twoerner@gmail.com> (raw)
The device-tree for the GbE interface of the rock-pi-e had some properties
in the wrong location. Oddly enough the older rock-pi-e devices with
the Realtek 8211e PHY worked fine, but the latest spin (v1.21) with the
rtl8211f PHY didn't. This fixes allows both PHYs to work.
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
...hip-rock-pi-e-adjust-phy-handle-name.patch | 40 +++++++++++++++
...ip-rock-pi-e-fix-location-of-snps-pr.patch | 50 +++++++++++++++++++
recipes-kernel/linux/linux-yocto_%.bbappend | 4 ++
3 files changed, 94 insertions(+)
create mode 100644 recipes-kernel/linux/linux-yocto/0001-arm64-dts-rockchip-rock-pi-e-adjust-phy-handle-name.patch
create mode 100644 recipes-kernel/linux/linux-yocto/0002-arm64-dts-rockchip-rock-pi-e-fix-location-of-snps-pr.patch
diff --git a/recipes-kernel/linux/linux-yocto/0001-arm64-dts-rockchip-rock-pi-e-adjust-phy-handle-name.patch b/recipes-kernel/linux/linux-yocto/0001-arm64-dts-rockchip-rock-pi-e-adjust-phy-handle-name.patch
new file mode 100644
index 000000000000..6ba072732854
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto/0001-arm64-dts-rockchip-rock-pi-e-adjust-phy-handle-name.patch
@@ -0,0 +1,40 @@
+From 58f61444baa53d8818911c43e4060d550d5c19b9 Mon Sep 17 00:00:00 2001
+From: Trevor Woerner <twoerner@gmail.com>
+Date: Tue, 16 Jan 2024 15:03:58 -0500
+Subject: [PATCH 1/2] arm64: dts: rockchip: rock-pi-e: adjust phy-handle name
+
+The rock-pi-e currently comes in 4 board spins, the latest one (v1.21) swaps
+out the Realtek 8211e PHY for an 8211f PHY. Therefore modify the phy-handle
+name to be more generic.
+
+Upstream-Status: Submitted
+Signed-off-by: Trevor Woerner <twoerner@gmail.com>
+---
+ arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts b/arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts
+index 018a3a5075c7..096cfa19036e 100644
+--- a/arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts
+@@ -146,7 +146,7 @@ &gmac2io {
+ assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>;
+ assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>;
+ clock_in_out = "input";
+- phy-handle = <&rtl8211e>;
++ phy-handle = <&rtl8211>;
+ phy-mode = "rgmii";
+ phy-supply = <&vcc_io>;
+ pinctrl-names = "default";
+@@ -163,7 +163,7 @@ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+- rtl8211e: ethernet-phy@1 {
++ rtl8211: ethernet-phy@1 {
+ reg = <1>;
+ pinctrl-0 = <ð_phy_int_pin>, <ð_phy_reset_pin>;
+ pinctrl-names = "default";
+--
+2.43.0.76.g1a87c842ece3
+
diff --git a/recipes-kernel/linux/linux-yocto/0002-arm64-dts-rockchip-rock-pi-e-fix-location-of-snps-pr.patch b/recipes-kernel/linux/linux-yocto/0002-arm64-dts-rockchip-rock-pi-e-fix-location-of-snps-pr.patch
new file mode 100644
index 000000000000..67ed1a09a0c6
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto/0002-arm64-dts-rockchip-rock-pi-e-fix-location-of-snps-pr.patch
@@ -0,0 +1,50 @@
+From 7eaabc1e5047d839376c4d9e511862f7ded67c24 Mon Sep 17 00:00:00 2001
+From: Trevor Woerner <twoerner@gmail.com>
+Date: Tue, 16 Jan 2024 15:09:15 -0500
+Subject: [PATCH 2/2] arm64: dts: rockchip: rock-pi-e: fix location of snps
+ properties
+
+A number of snps (Synopsys) properties are not in their correct location.
+
+Upstream-Status: Submitted
+Fixes: b918e81f2145 ("arm64: dts: rockchip: rk3328: Add Radxa ROCK Pi E")
+Signed-off-by: Trevor Woerner <twoerner@gmail.com>
+---
+ arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts b/arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts
+index 096cfa19036e..0739b8fec86e 100644
+--- a/arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts
+@@ -150,8 +150,11 @@ &gmac2io {
+ phy-mode = "rgmii";
+ phy-supply = <&vcc_io>;
+ pinctrl-names = "default";
+- pinctrl-0 = <&rgmiim1_pins>;
++ pinctrl-0 = <&rgmiim1_pins>, <ð_phy_reset_pin>;
+ snps,aal;
++ snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
++ snps,reset-active-low;
++ snps,reset-delays-us = <0 10000 50000>;
+ snps,rxpbl = <0x4>;
+ snps,txpbl = <0x4>;
+ tx_delay = <0x26>;
+@@ -165,13 +168,10 @@ mdio {
+
+ rtl8211: ethernet-phy@1 {
+ reg = <1>;
+- pinctrl-0 = <ð_phy_int_pin>, <ð_phy_reset_pin>;
++ pinctrl-0 = <ð_phy_int_pin>;
+ pinctrl-names = "default";
+ interrupt-parent = <&gpio1>;
+ interrupts = <24 IRQ_TYPE_LEVEL_LOW>;
+- reset-assert-us = <10000>;
+- reset-deassert-us = <50000>;
+- reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
+ };
+ };
+ };
+--
+2.43.0.76.g1a87c842ece3
+
diff --git a/recipes-kernel/linux/linux-yocto_%.bbappend b/recipes-kernel/linux/linux-yocto_%.bbappend
index 7d8fb8b3d58e..7ab51f082932 100644
--- a/recipes-kernel/linux/linux-yocto_%.bbappend
+++ b/recipes-kernel/linux/linux-yocto_%.bbappend
@@ -19,3 +19,7 @@ COMPATIBLE_MACHINE:rock-pi-s = "rock-pi-s"
SRC_URI:append = " file://rockchip-kmeta;type=kmeta;name=rockchip-kmeta;destsuffix=rockchip-kmeta"
SRC_URI:append:nanopi-r4s = " file://nanopi-r4s.scc"
+SRC_URI:append:rock-pi-e = " \
+ file://0001-arm64-dts-rockchip-rock-pi-e-adjust-phy-handle-name.patch \
+ file://0002-arm64-dts-rockchip-rock-pi-e-fix-location-of-snps-pr.patch \
+ "
--
2.43.0.76.g1a87c842ece3
reply other threads:[~2024-01-16 22:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20240116222106.24629-1-twoerner@gmail.com \
--to=twoerner@gmail.com \
--cc=yocto@lists.yoctoproject.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