Skip to contentSkip to conversation

phytec-som-imx6: ksz8081_phy_fixup: Don't override B-CAST_OFF strap-in

PATCH Applied Stefan Riedmueller 2 participants 2 messages Dec 4, 2018 – Dec 5, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 phytec-som-imx6: ksz8081_phy_fixup: Don't override B-CAST_OFF strap-in

From: Jan Remmet <[email protected]>

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.

---
 arch/arm/boards/phytec-som-imx6/board.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
arch/arm/boards/phytec-som-imx6/board.c +10 -1
index 4079bc9de1b3..38a2ef641e47 100644
@@ -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;
 }
Signature · 7 lines
2.7.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
maintainer Applied
#1 lore raw
Quoted 6 lines · Stefan Riedmueller

From: Jan Remmet <[email protected]>

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.

Quoted 7 lines

Also add some comments about the magic values.

---
 arch/arm/boards/phytec-som-imx6/board.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

Applied, thanks

Sascha

Quoted 33 lines
arch/arm/boards/phytec-som-imx6/board.c +10 -1
index 4079bc9de1b3..38a2ef641e47 100644
@@ -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;
 }
Signature · 7 lines
2.7.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox