diff mbox series

ramips: fix Gigabit Ethernet port of the HiWiFi HC5861

Message ID TYAP286MB0315443025BE66CFF11F8897BCC3A@TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM
State Accepted
Delegated to: Hauke Mehrtens
Headers show
Series ramips: fix Gigabit Ethernet port of the HiWiFi HC5861 | expand

Commit Message

Shiji Yang Sept. 26, 2023, 12:12 p.m. UTC
From: Shiji Yang <yangshiji66@qq.com>

HiWiFi HC5861 has a GbE port which connected to the RTL8211E PHY
chip. This patch adds the missing Realtek PHY driver package and
sets the correct external PHYs base address to make it work again.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
---

Hi!

This patch should be backpoted to v22.03 and v23.05 branch. By the
way, I believe a lot of devices need the similar fix. Hope Michael
can have a look.

Thank you!

 target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts | 6 +++++-
 target/linux/ramips/image/mt7620.mk               | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts b/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts
index 87eacb13d7..8b37162f26 100644
--- a/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts
+++ b/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts
@@ -70,7 +70,7 @@ 
 
 &ethernet {
 	pinctrl-names = "default";
-	pinctrl-0 = <&rgmii1_pins &mdio_pins>;
+	pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
 
 	nvmem-cells = <&macaddr_factory_4>;
 	nvmem-cell-names = "mac-address";
@@ -93,6 +93,10 @@ 
 	};
 };
 
+&gsw {
+	mediatek,ephy-base = /bits/ 8 <12>;
+};
+
 &pcie {
 	status = "okay";
 };
diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk
index f3f4873d76..f85f3c8521 100644
--- a/target/linux/ramips/image/mt7620.mk
+++ b/target/linux/ramips/image/mt7620.mk
@@ -578,7 +578,7 @@  define Device/hiwifi_hc5861
   DEVICE_VENDOR := HiWiFi
   DEVICE_MODEL := HC5861
   DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci kmod-sdhci-mt7620 \
-	kmod-usb-ledtrig-usbport
+	kmod-phy-realtek kmod-usb-ledtrig-usbport
   SUPPORTED_DEVICES += hc5861
 endef
 TARGET_DEVICES += hiwifi_hc5861