Closed Ham22 closed 7 years ago
For this task, I tried changing the dts such as it has a mdio node:
diff --git a/arch/mips/boot/dts/img/pistachio_marduk_common.dtsi b/arch/mips/boot/dts/img/pistachio_marduk_common.dtsi
index 8f25dd791127..356e95fd41c9 100755
--- a/arch/mips/boot/dts/img/pistachio_marduk_common.dtsi
+++ b/arch/mips/boot/dts/img/pistachio_marduk_common.dtsi
@@ -238,6 +238,18 @@
status = "okay";
mac-address = [0123456789AB];
+
+ phy-handle = <&phy0>;
+ mdio0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "snps,dwmac-mdio";
+ phy0: ethernet-phy@0 {
+ compatible = "ethernet-phy-id0022.1560";
+ micrel,led-mode = <0>;
+ reg = <0>;
+ };
+ };
};
&pin_enet {
With this change, the phy device gets detected:
stmmac_init_phy: eth0: attached to PHY (UID 0x221560) Link = 1
ethernet-phy-id 00221560 comes from include/linux/micrel_phy.h
and is the ID of ksz8091.
However, the LED is still off.
The LED is working with existing patch.
For the 4.4 kernel https://github.com/CreatorDev/openwrt/commit/03578de114f2c3cd3be58db8ec8f78c3a8e682b8 and https://github.com/CreatorDev/openwrt/commit/1e56cf4bf1a5805ef0cdb22efd5a00eea9aecf97 fix the issue but on 4.9 it's changed quite a bit so need to get it working again but should be done the best way considering the new layout.
Please credit the guy that helped us if you end up using any of those changes.