summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJan Remmet <j.remmet@phytec.de>2018-12-04 11:43:45 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2018-12-05 08:55:35 +0100
commita134704c91dfd353180c5dfc16114c40582a23c0 (patch)
tree737a8ae02621a67eebf97073ccbf38b63dfac164 /arch
parent6400620c4c955e89ba500add85aa2a50d2094f05 (diff)
downloadbarebox-a134704c91dfd353180c5dfc16114c40582a23c0.tar.gz
barebox-a134704c91dfd353180c5dfc16114c40582a23c0.tar.xz
phytec-som-imx6: ksz8081_phy_fixup: Don't override B-CAST_OFF strap-in
As PHY address 0 is not used on PHYTEC i.MX 6 and i.MX 6UL SOMs we do not have to override the B-CAST_OFF strap-in which disables broadcast on PHY address 0. Also add some comments about the magic values. Signed-off-by: Jan Remmet <j.remmet@phytec.de> Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boards/phytec-som-imx6/board.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/arm/boards/phytec-som-imx6/board.c b/arch/arm/boards/phytec-som-imx6/board.c
index 4079bc9de1..38a2ef641e 100644
--- a/arch/arm/boards/phytec-som-imx6/board.c
+++ b/arch/arm/boards/phytec-som-imx6/board.c
@@ -99,8 +99,17 @@ static unsigned int get_module_rev(void)
static int ksz8081_phy_fixup(struct phy_device *phydev)
{
+ /*
+ * 0x8100 default
+ * 0x0080 RMII 50 MHz clock mode
+ * 0x0010 LED Mode 1
+ */
phy_write(phydev, 0x1f, 0x8190);
- phy_write(phydev, 0x16, 0x202);
+ /*
+ * 0x0002 Override strap-in for RMII mode
+ * This should be default but after reset we occasionally read 0x0001
+ */
+ phy_write(phydev, 0x16, 0x2);
return 0;
}