Skip to contentSkip to conversation

phy/micrel: disable Asym_Pause support

PATCH Applied Christian Hemp 2 participants 5 messages Sep 15, 2014 – Sep 17, 2014

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

PATCH 1/4 phy/micrel: disable Asym_Pause support

From: Jan Weitzel <[email protected]>

With SUPPORTED_Asym_Pause enabled we need to hotplug the ethernet cable. So disable it like done with PHY_ID_KSZ9021.

---
 drivers/net/phy/micrel.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/phy/micrel.c +2 -2
index 8aea653..88c64e5 100644
@@ -254,11 +254,11 @@ static struct phy_driver ksphy_driver[] = {
 	.config_aneg	= genphy_config_aneg,
 	.read_status	= genphy_read_status,
 }, {
+	/* I saw the same issue like PHY_ID_KSZ9021 for Asym_Pause */
 	.phy_id		= PHY_ID_KSZ9031,
 	.phy_id_mask	= 0x00fffff0,
 	.drv.name	= "Micrel KSZ9031 Gigabit PHY",
-	.features	= (PHY_GBIT_FEATURES | SUPPORTED_Pause
-				| SUPPORTED_Asym_Pause),
+	.features	= (PHY_GBIT_FEATURES | SUPPORTED_Pause),
 	.config_init	= kszphy_config_init,
 	.config_aneg	= genphy_config_aneg,
 	.read_status	= genphy_read_status,
Signature · 7 lines
1.7.0.4


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

PATCH 2/4 ARM:phyFLEX-iMX6: Remove eth phy reset form board

Remove ethernet phy reset from board file. The reset is now made by the fec driver since commit:

	|commit 5c1846b625247f4b99eb429dcd5b0854699a4298
	|Author: Rostislav Lisovy <[email protected]>
	|Date:   Wed Nov 20 22:22:25 2013 +0100
	|
	|	ARM: i.mx53: Parse Reset GPIO pin in FEC driver from Devicetree
	|
	|	Signed-off-by: Rostislav Lisovy <[email protected]>
	|	Signed-off-by: Sascha Hauer <[email protected]>
---
 arch/arm/boards/phytec-phyflex-imx6/board.c |   13 -------------
 1 files changed, 0 insertions(+), 13 deletions(-)
arch/arm/boards/phytec-phyflex-imx6/board.c +0 -13
index fe3d1b2..131861d 100644
@@ -32,8 +32,6 @@
 #include <mach/iomux-mx6.h>
 #include <mach/imx6.h>
 
-#define ETH_PHY_RST	IMX_GPIO_NR(3, 23)
-
 #define GPIO_2_11_PD_CTL	MX6_PAD_CTL_PUS_100K_DOWN | MX6_PAD_CTL_PUE | MX6_PAD_CTL_PKE | \
 				MX6_PAD_CTL_SPEED_MED | MX6_PAD_CTL_DSE_40ohm | MX6_PAD_CTL_HYS
 
@@ -65,16 +63,6 @@ static void phyflex_err006282_workaround(void)
 	gpio_direction_input(MX6_PHYFLEX_ERR006282);
 }
 
-static int eth_phy_reset(void)
-{
-	gpio_request(ETH_PHY_RST, "phy reset");
-	gpio_direction_output(ETH_PHY_RST, 0);
-	mdelay(1);
-	gpio_set_value(ETH_PHY_RST, 1);
-
-	return 0;
-}
-
 static void mmd_write_reg(struct phy_device *dev, int device, int reg, int val)
 {
 	phy_write(dev, 0x0d, device);
@@ -99,7 +87,6 @@ static int phytec_pfla02_init(void)
 
 	phyflex_err006282_workaround();
 
-	eth_phy_reset();
 	phy_register_fixup_for_uid(PHY_ID_KSZ9031, MICREL_PHY_ID_MASK,
 					   ksz9031rn_phy_fixup);
 
Signature · 7 lines
1.7.0.4


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

PATCH 3/4 ARM:phyFLEX-iMX6: Remove mmd_write_reg from board

In reply to Christian Hemp

Remove mmd_write_reg function from board file and use phy_write_mmd_indirect.

---
 arch/arm/boards/phytec-phyflex-imx6/board.c |   10 +---------
 1 files changed, 1 insertions(+), 9 deletions(-)
arch/arm/boards/phytec-phyflex-imx6/board.c +1 -9
index 131861d..09a5c79 100644
@@ -63,17 +63,9 @@ static void phyflex_err006282_workaround(void)
 	gpio_direction_input(MX6_PHYFLEX_ERR006282);
 }
 
-static void mmd_write_reg(struct phy_device *dev, int device, int reg, int val)
-{
-	phy_write(dev, 0x0d, device);
-	phy_write(dev, 0x0e, reg);
-	phy_write(dev, 0x0d, (1 << 14) | device);
-	phy_write(dev, 0x0e, val);
-}
-
 static int ksz9031rn_phy_fixup(struct phy_device *dev)
 {
-	mmd_write_reg(dev, 2, 8, 0x039F);
+	phy_write_mmd_indirect(dev, 8, 2, 0x039F);
 
 	return 0;
 }
Signature · 7 lines
1.7.0.4


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

PATCH 4/4 ARM:phyFLEX-iMX6 New Ram Timings for Q/DL

In reply to Christian Hemp

From: Maik Otto <[email protected]>

---
 .../flash-header-phytec-pfla02-1gib.imxcfg         |    2 +
 .../flash-header-phytec-pfla02-2gib.imxcfg         |    2 +
 .../flash-header-phytec-pfla02-4gib.imxcfg         |    7 +-
 .../flash-header-phytec-pfla02.h                   |  138 ++++++++++----------
 .../flash-header-phytec-pfla02dl-1gib.imxcfg       |    2 +
 .../flash-header-phytec-pfla02dl.h                 |  125 +++++++++---------
 .../flash-header-phytec-pfla02s-512mb.imxcfg       |    2 +
 7 files changed, 148 insertions(+), 130 deletions(-)
arch/arm/boards/phytec-phyflex-imx6/flash-header-phytec-pfla02-1gib.imxcfg +2 -0
index d73207c..f6061f2 100644
@@ -1,3 +1,5 @@
+#define SETUP_MDCFG0			\
+	wm 32 0x021b000c 0x3c409b85
 
 #define SETUP_1GIB_2GIB_4GIB		\
 	wm 32 0x021b0040 0x00000017;	\
arch/arm/boards/phytec-phyflex-imx6/flash-header-phytec-pfla02-2gib.imxcfg +2 -0
index 2291b71..2bfa836 100644
@@ -1,3 +1,5 @@
+#define SETUP_MDCFG0                    \
+	wm 32 0x021b000c 0x565c9b85
 
 #define SETUP_1GIB_2GIB_4GIB		\
 	wm 32 0x021b0040 0x00000027;	\
arch/arm/boards/phytec-phyflex-imx6/flash-header-phytec-pfla02-4gib.imxcfg +5 -2
index c6dc775..4121018 100644
@@ -1,6 +1,9 @@
+#define SETUP_MDCFG0                    \
+	wm 32 0x021b000c 0x8c929b85
 
 #define SETUP_1GIB_2GIB_4GIB             \
-        wm 32 0x021b0040 0x00000047;    \
-        wm 32 0x021b0000 0xC41A0000
+	wm 32 0x021b0040 0x00000047;	\
+	wm 32 0x021b0000 0xC41A0000
 
 #include "flash-header-phytec-pfla02.h"
+
arch/arm/boards/phytec-phyflex-imx6/flash-header-phytec-pfla02.h +71 -67

166 lines not on this page · raw message

arch/arm/boards/phytec-phyflex-imx6/flash-header-phytec-pfla02dl-1gib.imxcfg +2 -0
index e5a7292..dfd4336 100644
@@ -1,3 +1,5 @@
+#define SETUP_MDCFG0			\
+	wm 32 0x021b000c 0x8c929b85
 
 #define SETUP_S_DL_512MB_1GB		\
 	wm 32 0x021b0040 0x00000017;	\
arch/arm/boards/phytec-phyflex-imx6/flash-header-phytec-pfla02dl.h +64 -61

149 lines not on this page · raw message

arch/arm/boards/phytec-phyflex-imx6/flash-header-phytec-pfla02s-512mb.imxcfg +2 -0
index 3116e36..2e428f9 100644
@@ -1,3 +1,5 @@
+#define SETUP_MDCFG0			\
+	wm 32 0x021b000c 0x565c9b85
 
 #define SETUP_S_DL_512MB_1GB		\
 	wm 32 0x021b0040 0x00000017;	\
Signature · 7 lines
1.7.0.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
maintainer Applied
#4 lore raw
In reply to Christian Hemp
Quoted 7 lines · Christian Hemp

From: Jan Weitzel <[email protected]>

With SUPPORTED_Asym_Pause enabled we need to hotplug the ethernet cable. So disable it like done with PHY_ID_KSZ9021.

Applied all, thanks

Sascha

Quoted 31 lines
---
 drivers/net/phy/micrel.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/phy/micrel.c +2 -2
index 8aea653..88c64e5 100644
@@ -254,11 +254,11 @@ static struct phy_driver ksphy_driver[] = {
 	.config_aneg	= genphy_config_aneg,
 	.read_status	= genphy_read_status,
 }, {
+	/* I saw the same issue like PHY_ID_KSZ9021 for Asym_Pause */
 	.phy_id		= PHY_ID_KSZ9031,
 	.phy_id_mask	= 0x00fffff0,
 	.drv.name	= "Micrel KSZ9031 Gigabit PHY",
-	.features	= (PHY_GBIT_FEATURES | SUPPORTED_Pause
-				| SUPPORTED_Asym_Pause),
+	.features	= (PHY_GBIT_FEATURES | SUPPORTED_Pause),
 	.config_init	= kszphy_config_init,
 	.config_aneg	= genphy_config_aneg,
 	.read_status	= genphy_read_status,
Signature · 7 lines
1.7.0.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