immortalwrt/target/linux/ipq806x
Mark Mentovai 63e8f6fc68 ipq806x: dwmac: fix GMACs connected via SGMII fixed-link
fa731838c5 cleared the forced speed in the QSGMII PCS_ALL_CH_CTL
register during probe, but this is only correct for GMACs that are not
configured with fixed-link. This prevented GMACs configured with both
phy-mode = "sgmii" and fixed-link from working properly, as discussed at
https://github.com/openwrt/openwrt/pull/3954#issuecomment-834625090 and
the comments that follow. Notably, this prevented all communication
between gmac2 and the switch on the Netgear R7800.

The correct behavior is to set the QSGMII PCS_ALL_CH_CTL register by
considering the gmac's fixed-link child, setting the speed as directed by
fixed-link if present, and otherwise clearing it as was done previously.

Fixes: fa731838c5 ("ipq806x: dwmac: clear forced speed during probe")
Signed-off-by: Mark Mentovai <mark@moxienet.com>
Tested-by: Hannu Nyman <hannu.nyman@iki.fi>
Run-tested: ipq806x/ubnt,unifi-ac-hd, ipq806x/netgear,r7800
Cc: Petr Štetiar <ynezz@true.cz>
Cc: Ansuel Smith <ansuelsmth@gmail.com>
Tested-by:  Ansuel Smith <ansuelsmth@gmail.com>
2021-05-11 23:31:59 +08:00
..
base-files treewide: use upstream caldata script 2021-01-30 12:18:02 +08:00
files/arch/arm/boot/dts ipq806x: apply correct voltage tolerance 2021-05-11 23:27:11 +08:00
files-5.4/arch/arm/boot/dts ipq806x: add missing wakeup-source for gpio keys 2021-05-11 23:31:13 +08:00
image ipq806x: work-around borked QCA SDK bootloader 2021-03-07 12:06:39 +08:00
patches-5.4 ipq806x: dwmac: fix GMACs connected via SGMII fixed-link 2021-05-11 23:31:59 +08:00
patches-5.10 ipq806x: apply correct voltage tolerance 2021-05-11 23:27:11 +08:00
config-5.4 ipq806x: backport cpufreq changes to 5.4 2021-05-11 23:18:17 +08:00
config-5.10 ipq806x: refresh config 5.10 2021-05-11 23:21:19 +08:00
Makefile ipq806x: add kernel 5.10 as testing kernel 2021-05-11 23:22:32 +08:00
modules.mk kernel: usb: move phy-qcom-ipq806x-usb to ipq806x modules.mk 2020-08-14 12:08:01 +08:00