All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next,v2 1/3] net: dsa: mt7530: setup core clock even in TRGMII mode
@ 2021-03-11  2:09 ` Ilya Lipnitskiy
  0 siblings, 0 replies; 21+ messages in thread
From: Ilya Lipnitskiy @ 2021-03-11  2:09 UTC (permalink / raw)
  To: Sean Wang, Landen Chao, Andrew Lunn, Vivien Didelot,
	Florian Fainelli, Vladimir Oltean, David S. Miller,
	Jakub Kicinski, Matthias Brugger, Philipp Zabel, Russell King,
	netdev, linux-arm-kernel, linux-mediatek, linux-kernel
  Cc: Ilya Lipnitskiy

A recent change to MIPS ralink reset logic made it so mt7530 actually
resets the switch on platforms such as mt7621 (where bit 2 is the reset
line for the switch). That exposed an issue where the switch would not
function properly in TRGMII mode after a reset.

Reconfigure core clock in TRGMII mode to fix the issue.

Tested on Ubiquiti ER-X (MT7621) with TRGMII mode enabled.

Fixes: 3f9ef7785a9c ("MIPS: ralink: manage low reset lines")
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
---
 drivers/net/dsa/mt7530.c | 52 +++++++++++++++++++---------------------
 1 file changed, 25 insertions(+), 27 deletions(-)

diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
index f06f5fa2f898..9871d7cff93a 100644
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -436,34 +436,32 @@ mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface)
 			     TD_DM_DRVP(8) | TD_DM_DRVN(8));
 
 	/* Setup core clock for MT7530 */
-	if (!trgint) {
-		/* Disable MT7530 core clock */
-		core_clear(priv, CORE_TRGMII_GSW_CLK_CG, REG_GSWCK_EN);
-
-		/* Disable PLL, since phy_device has not yet been created
-		 * provided for phy_[read,write]_mmd_indirect is called, we
-		 * provide our own core_write_mmd_indirect to complete this
-		 * function.
-		 */
-		core_write_mmd_indirect(priv,
-					CORE_GSWPLL_GRP1,
-					MDIO_MMD_VEND2,
-					0);
-
-		/* Set core clock into 500Mhz */
-		core_write(priv, CORE_GSWPLL_GRP2,
-			   RG_GSWPLL_POSDIV_500M(1) |
-			   RG_GSWPLL_FBKDIV_500M(25));
+	/* Disable MT7530 core clock */
+	core_clear(priv, CORE_TRGMII_GSW_CLK_CG, REG_GSWCK_EN);
 
-		/* Enable PLL */
-		core_write(priv, CORE_GSWPLL_GRP1,
-			   RG_GSWPLL_EN_PRE |
-			   RG_GSWPLL_POSDIV_200M(2) |
-			   RG_GSWPLL_FBKDIV_200M(32));
-
-		/* Enable MT7530 core clock */
-		core_set(priv, CORE_TRGMII_GSW_CLK_CG, REG_GSWCK_EN);
-	}
+	/* Disable PLL, since phy_device has not yet been created
+	 * provided for phy_[read,write]_mmd_indirect is called, we
+	 * provide our own core_write_mmd_indirect to complete this
+	 * function.
+	 */
+	core_write_mmd_indirect(priv,
+				CORE_GSWPLL_GRP1,
+				MDIO_MMD_VEND2,
+				0);
+
+	/* Set core clock into 500Mhz */
+	core_write(priv, CORE_GSWPLL_GRP2,
+		   RG_GSWPLL_POSDIV_500M(1) |
+		   RG_GSWPLL_FBKDIV_500M(25));
+
+	/* Enable PLL */
+	core_write(priv, CORE_GSWPLL_GRP1,
+		   RG_GSWPLL_EN_PRE |
+		   RG_GSWPLL_POSDIV_200M(2) |
+		   RG_GSWPLL_FBKDIV_200M(32));
+
+	/* Enable MT7530 core clock */
+	core_set(priv, CORE_TRGMII_GSW_CLK_CG, REG_GSWCK_EN);
 
 	/* Setup the MT7530 TRGMII Tx Clock */
 	core_set(priv, CORE_TRGMII_GSW_CLK_CG, REG_GSWCK_EN);
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH net-next, v2 1/3] net: dsa: mt7530: setup core clock even in TRGMII mode
@ 2021-03-11  2:09 ` Ilya Lipnitskiy
  0 siblings, 0 replies; 21+ messages in thread
From: Ilya Lipnitskiy @ 2021-03-11  2:09 UTC (permalink / raw)
  To: Sean Wang, Landen Chao, Andrew Lunn, Vivien Didelot,
	Florian Fainelli, Vladimir Oltean, David S. Miller,
	Jakub Kicinski, Matthias Brugger, Philipp Zabel, Russell King,
	netdev, linux-arm-kernel, linux-mediatek, linux-kernel
  Cc: Ilya Lipnitskiy

A recent change to MIPS ralink reset logic made it so mt7530 actually
resets the switch on platforms such as mt7621 (where bit 2 is the reset
line for the switch). That exposed an issue where the switch would not
function properly in TRGMII mode after a reset.

Reconfigure core clock in TRGMII mode to fix the issue.

Tested on Ubiquiti ER-X (MT7621) with TRGMII mode enabled.

Fixes: 3f9ef7785a9c ("MIPS: ralink: manage low reset lines")
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
---
 drivers/net/dsa/mt7530.c | 52 +++++++++++++++++++---------------------
 1 file changed, 25 insertions(+), 27 deletions(-)

diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
index f06f5fa2f898..9871d7cff93a 100644
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -436,34 +436,32 @@ mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface)
 			     TD_DM_DRVP(8) | TD_DM_DRVN(8));
 
 	/* Setup core clock for MT7530 */
-	if (!trgint) {
-		/* Disable MT7530 core clock */
-		core_clear(priv, CORE_TRGMII_GSW_CLK_CG, REG_GSWCK_EN);
-
-		/* Disable PLL, since phy_device has not yet been created
-		 * provided for phy_[read,write]_mmd_indirect is called, we
-		 * provide our own core_write_mmd_indirect to complete this
-		 * function.
-		 */
-		core_write_mmd_indirect(priv,
-					CORE_GSWPLL_GRP1,
-					MDIO_MMD_VEND2,
-					0);
-
-		/* Set core clock into 500Mhz */
-		core_write(priv, CORE_GSWPLL_GRP2,
-			   RG_GSWPLL_POSDIV_500M(1) |
-			   RG_GSWPLL_FBKDIV_500M(25));
+	/* Disable MT7530 core clock */
+	core_clear(priv, CORE_TRGMII_GSW_CLK_CG, REG_GSWCK_EN);
 
-		/* Enable PLL */
-		core_write(priv, CORE_GSWPLL_GRP1,
-			   RG_GSWPLL_EN_PRE |
-			   RG_GSWPLL_POSDIV_200M(2) |
-			   RG_GSWPLL_FBKDIV_200M(32));
-
-		/* Enable MT7530 core clock */
-		core_set(priv, CORE_TRGMII_GSW_CLK_CG, REG_GSWCK_EN);
-	}
+	/* Disable PLL, since phy_device has not yet been created
+	 * provided for phy_[read,write]_mmd_indirect is called, we
+	 * provide our own core_write_mmd_indirect to complete this
+	 * function.
+	 */
+	core_write_mmd_indirect(priv,
+				CORE_GSWPLL_GRP1,
+				MDIO_MMD_VEND2,
+				0);
+
+	/* Set core clock into 500Mhz */
+	core_write(priv, CORE_GSWPLL_GRP2,
+		   RG_GSWPLL_POSDIV_500M(1) |
+		   RG_GSWPLL_FBKDIV_500M(25));
+
+	/* Enable PLL */
+	core_write(priv, CORE_GSWPLL_GRP1,
+		   RG_GSWPLL_EN_PRE |
+		   RG_GSWPLL_POSDIV_200M(2) |
+		   RG_GSWPLL_FBKDIV_200M(32));
+
+	/* Enable MT7530 core clock */
+	core_set(priv, CORE_TRGMII_GSW_CLK_CG, REG_GSWCK_EN);
 
 	/* Setup the MT7530 TRGMII Tx Clock */
 	core_set(priv, CORE_TRGMII_GSW_CLK_CG, REG_GSWCK_EN);
-- 
2.30.2


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH net-next, v2 1/3] net: dsa: mt7530: setup core clock even in TRGMII mode
@ 2021-03-11  2:09 ` Ilya Lipnitskiy
  0 siblings, 0 replies; 21+ messages in thread
From: Ilya Lipnitskiy @ 2021-03-11  2:09 UTC (permalink / raw)
  To: Sean Wang, Landen Chao, Andrew Lunn, Vivien Didelot,
	Florian Fainelli, Vladimir Oltean, David S. Miller,
	Jakub Kicinski, Matthias Brugger, Philipp Zabel, Russell King,
	netdev, linux-arm-kernel, linux-mediatek, linux-kernel
  Cc: Ilya Lipnitskiy

A recent change to MIPS ralink reset logic made it so mt7530 actually
resets the switch on platforms such as mt7621 (where bit 2 is the reset
line for the switch). That exposed an issue where the switch would not
function properly in TRGMII mode after a reset.

Reconfigure core clock in TRGMII mode to fix the issue.

Tested on Ubiquiti ER-X (MT7621) with TRGMII mode enabled.

Fixes: 3f9ef7785a9c ("MIPS: ralink: manage low reset lines")
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
---
 drivers/net/dsa/mt7530.c | 52 +++++++++++++++++++---------------------
 1 file changed, 25 insertions(+), 27 deletions(-)

diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
index f06f5fa2f898..9871d7cff93a 100644
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -436,34 +436,32 @@ mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface)
 			     TD_DM_DRVP(8) | TD_DM_DRVN(8));
 
 	/* Setup core clock for MT7530 */
-	if (!trgint) {
-		/* Disable MT7530 core clock */
-		core_clear(priv, CORE_TRGMII_GSW_CLK_CG, REG_GSWCK_EN);
-
-		/* Disable PLL, since phy_device has not yet been created
-		 * provided for phy_[read,write]_mmd_indirect is called, we
-		 * provide our own core_write_mmd_indirect to complete this
-		 * function.
-		 */
-		core_write_mmd_indirect(priv,
-					CORE_GSWPLL_GRP1,
-					MDIO_MMD_VEND2,
-					0);
-
-		/* Set core clock into 500Mhz */
-		core_write(priv, CORE_GSWPLL_GRP2,
-			   RG_GSWPLL_POSDIV_500M(1) |
-			   RG_GSWPLL_FBKDIV_500M(25));
+	/* Disable MT7530 core clock */
+	core_clear(priv, CORE_TRGMII_GSW_CLK_CG, REG_GSWCK_EN);
 
-		/* Enable PLL */
-		core_write(priv, CORE_GSWPLL_GRP1,
-			   RG_GSWPLL_EN_PRE |
-			   RG_GSWPLL_POSDIV_200M(2) |
-			   RG_GSWPLL_FBKDIV_200M(32));
-
-		/* Enable MT7530 core clock */
-		core_set(priv, CORE_TRGMII_GSW_CLK_CG, REG_GSWCK_EN);
-	}
+	/* Disable PLL, since phy_device has not yet been created
+	 * provided for phy_[read,write]_mmd_indirect is called, we
+	 * provide our own core_write_mmd_indirect to complete this
+	 * function.
+	 */
+	core_write_mmd_indirect(priv,
+				CORE_GSWPLL_GRP1,
+				MDIO_MMD_VEND2,
+				0);
+
+	/* Set core clock into 500Mhz */
+	core_write(priv, CORE_GSWPLL_GRP2,
+		   RG_GSWPLL_POSDIV_500M(1) |
+		   RG_GSWPLL_FBKDIV_500M(25));
+
+	/* Enable PLL */
+	core_write(priv, CORE_GSWPLL_GRP1,
+		   RG_GSWPLL_EN_PRE |
+		   RG_GSWPLL_POSDIV_200M(2) |
+		   RG_GSWPLL_FBKDIV_200M(32));
+
+	/* Enable MT7530 core clock */
+	core_set(priv, CORE_TRGMII_GSW_CLK_CG, REG_GSWCK_EN);
 
 	/* Setup the MT7530 TRGMII Tx Clock */
 	core_set(priv, CORE_TRGMII_GSW_CLK_CG, REG_GSWCK_EN);
-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH net-next,v2 2/3] net: dsa: mt7530: clean up redundant clock enables
  2021-03-11  2:09 ` Ilya Lipnitskiy
  (?)
@ 2021-03-11  2:09   ` Ilya Lipnitskiy
  -1 siblings, 0 replies; 21+ messages in thread
From: Ilya Lipnitskiy @ 2021-03-11  2:09 UTC (permalink / raw)
  To: Sean Wang, Landen Chao, Andrew Lunn, Vivien Didelot,
	Florian Fainelli, Vladimir Oltean, David S. Miller,
	Jakub Kicinski, Matthias Brugger, Philipp Zabel, Russell King,
	netdev, linux-arm-kernel, linux-mediatek, linux-kernel
  Cc: Ilya Lipnitskiy

Two minor changes:

- In RGMII mode, the REG_GSWCK_EN bit of CORE_TRGMII_GSW_CLK_CG gets
  set three times in a row. In TRGMII mode, two times. Simplify the code
  and only set it once for both modes.

- When disabling PLL, there is no need to call core_write_mmd_indirect
  directly, use the core_write wrapper instead like the rest of the code
  in the function does. This change helps with consistency and
  readability.

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
---
 drivers/net/dsa/mt7530.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
index 9871d7cff93a..80a35caf920e 100644
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -444,10 +444,7 @@ mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface)
 	 * provide our own core_write_mmd_indirect to complete this
 	 * function.
 	 */
-	core_write_mmd_indirect(priv,
-				CORE_GSWPLL_GRP1,
-				MDIO_MMD_VEND2,
-				0);
+	core_write(priv, CORE_GSWPLL_GRP1, 0);
 
 	/* Set core clock into 500Mhz */
 	core_write(priv, CORE_GSWPLL_GRP2,
@@ -460,11 +457,7 @@ mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface)
 		   RG_GSWPLL_POSDIV_200M(2) |
 		   RG_GSWPLL_FBKDIV_200M(32));
 
-	/* Enable MT7530 core clock */
-	core_set(priv, CORE_TRGMII_GSW_CLK_CG, REG_GSWCK_EN);
-
 	/* Setup the MT7530 TRGMII Tx Clock */
-	core_set(priv, CORE_TRGMII_GSW_CLK_CG, REG_GSWCK_EN);
 	core_write(priv, CORE_PLL_GROUP5, RG_LCDDS_PCW_NCPO1(ncpo1));
 	core_write(priv, CORE_PLL_GROUP6, RG_LCDDS_PCW_NCPO0(0));
 	core_write(priv, CORE_PLL_GROUP10, RG_LCDDS_SSC_DELTA(ssc_delta));
@@ -478,6 +471,8 @@ mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface)
 	core_write(priv, CORE_PLL_GROUP7,
 		   RG_LCDDS_PCW_NCPO_CHG | RG_LCCDS_C(3) |
 		   RG_LCDDS_PWDB | RG_LCDDS_ISO_EN);
+
+	/* Enable MT7530 core and TRGMII Tx clocks */
 	core_set(priv, CORE_TRGMII_GSW_CLK_CG,
 		 REG_GSWCK_EN | REG_TRGMIICK_EN);
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH net-next, v2 2/3] net: dsa: mt7530: clean up redundant clock enables
@ 2021-03-11  2:09   ` Ilya Lipnitskiy
  0 siblings, 0 replies; 21+ messages in thread
From: Ilya Lipnitskiy @ 2021-03-11  2:09 UTC (permalink / raw)
  To: Sean Wang, Landen Chao, Andrew Lunn, Vivien Didelot,
	Florian Fainelli, Vladimir Oltean, David S. Miller,
	Jakub Kicinski, Matthias Brugger, Philipp Zabel, Russell King,
	netdev, linux-arm-kernel, linux-mediatek, linux-kernel
  Cc: Ilya Lipnitskiy

Two minor changes:

- In RGMII mode, the REG_GSWCK_EN bit of CORE_TRGMII_GSW_CLK_CG gets
  set three times in a row. In TRGMII mode, two times. Simplify the code
  and only set it once for both modes.

- When disabling PLL, there is no need to call core_write_mmd_indirect
  directly, use the core_write wrapper instead like the rest of the code
  in the function does. This change helps with consistency and
  readability.

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
---
 drivers/net/dsa/mt7530.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
index 9871d7cff93a..80a35caf920e 100644
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -444,10 +444,7 @@ mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface)
 	 * provide our own core_write_mmd_indirect to complete this
 	 * function.
 	 */
-	core_write_mmd_indirect(priv,
-				CORE_GSWPLL_GRP1,
-				MDIO_MMD_VEND2,
-				0);
+	core_write(priv, CORE_GSWPLL_GRP1, 0);
 
 	/* Set core clock into 500Mhz */
 	core_write(priv, CORE_GSWPLL_GRP2,
@@ -460,11 +457,7 @@ mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface)
 		   RG_GSWPLL_POSDIV_200M(2) |
 		   RG_GSWPLL_FBKDIV_200M(32));
 
-	/* Enable MT7530 core clock */
-	core_set(priv, CORE_TRGMII_GSW_CLK_CG, REG_GSWCK_EN);
-
 	/* Setup the MT7530 TRGMII Tx Clock */
-	core_set(priv, CORE_TRGMII_GSW_CLK_CG, REG_GSWCK_EN);
 	core_write(priv, CORE_PLL_GROUP5, RG_LCDDS_PCW_NCPO1(ncpo1));
 	core_write(priv, CORE_PLL_GROUP6, RG_LCDDS_PCW_NCPO0(0));
 	core_write(priv, CORE_PLL_GROUP10, RG_LCDDS_SSC_DELTA(ssc_delta));
@@ -478,6 +471,8 @@ mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface)
 	core_write(priv, CORE_PLL_GROUP7,
 		   RG_LCDDS_PCW_NCPO_CHG | RG_LCCDS_C(3) |
 		   RG_LCDDS_PWDB | RG_LCDDS_ISO_EN);
+
+	/* Enable MT7530 core and TRGMII Tx clocks */
 	core_set(priv, CORE_TRGMII_GSW_CLK_CG,
 		 REG_GSWCK_EN | REG_TRGMIICK_EN);
 
-- 
2.30.2


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH net-next, v2 2/3] net: dsa: mt7530: clean up redundant clock enables
@ 2021-03-11  2:09   ` Ilya Lipnitskiy
  0 siblings, 0 replies; 21+ messages in thread
From: Ilya Lipnitskiy @ 2021-03-11  2:09 UTC (permalink / raw)
  To: Sean Wang, Landen Chao, Andrew Lunn, Vivien Didelot,
	Florian Fainelli, Vladimir Oltean, David S. Miller,
	Jakub Kicinski, Matthias Brugger, Philipp Zabel, Russell King,
	netdev, linux-arm-kernel, linux-mediatek, linux-kernel
  Cc: Ilya Lipnitskiy

Two minor changes:

- In RGMII mode, the REG_GSWCK_EN bit of CORE_TRGMII_GSW_CLK_CG gets
  set three times in a row. In TRGMII mode, two times. Simplify the code
  and only set it once for both modes.

- When disabling PLL, there is no need to call core_write_mmd_indirect
  directly, use the core_write wrapper instead like the rest of the code
  in the function does. This change helps with consistency and
  readability.

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
---
 drivers/net/dsa/mt7530.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
index 9871d7cff93a..80a35caf920e 100644
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -444,10 +444,7 @@ mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface)
 	 * provide our own core_write_mmd_indirect to complete this
 	 * function.
 	 */
-	core_write_mmd_indirect(priv,
-				CORE_GSWPLL_GRP1,
-				MDIO_MMD_VEND2,
-				0);
+	core_write(priv, CORE_GSWPLL_GRP1, 0);
 
 	/* Set core clock into 500Mhz */
 	core_write(priv, CORE_GSWPLL_GRP2,
@@ -460,11 +457,7 @@ mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface)
 		   RG_GSWPLL_POSDIV_200M(2) |
 		   RG_GSWPLL_FBKDIV_200M(32));
 
-	/* Enable MT7530 core clock */
-	core_set(priv, CORE_TRGMII_GSW_CLK_CG, REG_GSWCK_EN);
-
 	/* Setup the MT7530 TRGMII Tx Clock */
-	core_set(priv, CORE_TRGMII_GSW_CLK_CG, REG_GSWCK_EN);
 	core_write(priv, CORE_PLL_GROUP5, RG_LCDDS_PCW_NCPO1(ncpo1));
 	core_write(priv, CORE_PLL_GROUP6, RG_LCDDS_PCW_NCPO0(0));
 	core_write(priv, CORE_PLL_GROUP10, RG_LCDDS_SSC_DELTA(ssc_delta));
@@ -478,6 +471,8 @@ mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface)
 	core_write(priv, CORE_PLL_GROUP7,
 		   RG_LCDDS_PCW_NCPO_CHG | RG_LCCDS_C(3) |
 		   RG_LCDDS_PWDB | RG_LCDDS_ISO_EN);
+
+	/* Enable MT7530 core and TRGMII Tx clocks */
 	core_set(priv, CORE_TRGMII_GSW_CLK_CG,
 		 REG_GSWCK_EN | REG_TRGMIICK_EN);
 
-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH net-next,v2 3/3] net: dsa: mt7530: disable TRGMII clock at reconfigure
  2021-03-11  2:09 ` Ilya Lipnitskiy
  (?)
@ 2021-03-11  2:09   ` Ilya Lipnitskiy
  -1 siblings, 0 replies; 21+ messages in thread
From: Ilya Lipnitskiy @ 2021-03-11  2:09 UTC (permalink / raw)
  To: Sean Wang, Landen Chao, Andrew Lunn, Vivien Didelot,
	Florian Fainelli, Vladimir Oltean, David S. Miller,
	Jakub Kicinski, Matthias Brugger, Philipp Zabel, Russell King,
	netdev, linux-arm-kernel, linux-mediatek, linux-kernel
  Cc: Ilya Lipnitskiy

Disable both core and TRGMII Tx clocks prior to reconfiguring.
Previously, only the core clock was disabled, but not TRGMII Tx clock.
So disable both, then configure them, then re-enable both, for
consistency.

Reword the comment about core_write_mmd_indirect for clarity.

Tested on Ubiquiti ER-X running the GMAC and MT7530 in TRGMII mode.

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
---
 drivers/net/dsa/mt7530.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
index 80a35caf920e..7ef5e7c23e05 100644
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -435,15 +435,18 @@ mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface)
 		mt7530_write(priv, MT7530_TRGMII_TD_ODT(i),
 			     TD_DM_DRVP(8) | TD_DM_DRVN(8));
 
-	/* Setup core clock for MT7530 */
-	/* Disable MT7530 core clock */
-	core_clear(priv, CORE_TRGMII_GSW_CLK_CG, REG_GSWCK_EN);
-
-	/* Disable PLL, since phy_device has not yet been created
-	 * provided for phy_[read,write]_mmd_indirect is called, we
-	 * provide our own core_write_mmd_indirect to complete this
-	 * function.
+	/* Since phy_device has not yet been created and
+	 * phy_[read,write]_mmd_indirect is not available, we provide our own
+	 * core_write_mmd_indirect with core_{clear,write,set} wrappers to
+	 * complete this function.
 	 */
+
+	/* Disable MT7530 core and TRGMII Tx clocks */
+	core_clear(priv, CORE_TRGMII_GSW_CLK_CG,
+		   REG_GSWCK_EN | REG_TRGMIICK_EN);
+
+	/* Setup core clock for MT7530 */
+	/* Disable PLL */
 	core_write(priv, CORE_GSWPLL_GRP1, 0);
 
 	/* Set core clock into 500Mhz */
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH net-next, v2 3/3] net: dsa: mt7530: disable TRGMII clock at reconfigure
@ 2021-03-11  2:09   ` Ilya Lipnitskiy
  0 siblings, 0 replies; 21+ messages in thread
From: Ilya Lipnitskiy @ 2021-03-11  2:09 UTC (permalink / raw)
  To: Sean Wang, Landen Chao, Andrew Lunn, Vivien Didelot,
	Florian Fainelli, Vladimir Oltean, David S. Miller,
	Jakub Kicinski, Matthias Brugger, Philipp Zabel, Russell King,
	netdev, linux-arm-kernel, linux-mediatek, linux-kernel
  Cc: Ilya Lipnitskiy

Disable both core and TRGMII Tx clocks prior to reconfiguring.
Previously, only the core clock was disabled, but not TRGMII Tx clock.
So disable both, then configure them, then re-enable both, for
consistency.

Reword the comment about core_write_mmd_indirect for clarity.

Tested on Ubiquiti ER-X running the GMAC and MT7530 in TRGMII mode.

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
---
 drivers/net/dsa/mt7530.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
index 80a35caf920e..7ef5e7c23e05 100644
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -435,15 +435,18 @@ mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface)
 		mt7530_write(priv, MT7530_TRGMII_TD_ODT(i),
 			     TD_DM_DRVP(8) | TD_DM_DRVN(8));
 
-	/* Setup core clock for MT7530 */
-	/* Disable MT7530 core clock */
-	core_clear(priv, CORE_TRGMII_GSW_CLK_CG, REG_GSWCK_EN);
-
-	/* Disable PLL, since phy_device has not yet been created
-	 * provided for phy_[read,write]_mmd_indirect is called, we
-	 * provide our own core_write_mmd_indirect to complete this
-	 * function.
+	/* Since phy_device has not yet been created and
+	 * phy_[read,write]_mmd_indirect is not available, we provide our own
+	 * core_write_mmd_indirect with core_{clear,write,set} wrappers to
+	 * complete this function.
 	 */
+
+	/* Disable MT7530 core and TRGMII Tx clocks */
+	core_clear(priv, CORE_TRGMII_GSW_CLK_CG,
+		   REG_GSWCK_EN | REG_TRGMIICK_EN);
+
+	/* Setup core clock for MT7530 */
+	/* Disable PLL */
 	core_write(priv, CORE_GSWPLL_GRP1, 0);
 
 	/* Set core clock into 500Mhz */
-- 
2.30.2


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH net-next, v2 3/3] net: dsa: mt7530: disable TRGMII clock at reconfigure
@ 2021-03-11  2:09   ` Ilya Lipnitskiy
  0 siblings, 0 replies; 21+ messages in thread
From: Ilya Lipnitskiy @ 2021-03-11  2:09 UTC (permalink / raw)
  To: Sean Wang, Landen Chao, Andrew Lunn, Vivien Didelot,
	Florian Fainelli, Vladimir Oltean, David S. Miller,
	Jakub Kicinski, Matthias Brugger, Philipp Zabel, Russell King,
	netdev, linux-arm-kernel, linux-mediatek, linux-kernel
  Cc: Ilya Lipnitskiy

Disable both core and TRGMII Tx clocks prior to reconfiguring.
Previously, only the core clock was disabled, but not TRGMII Tx clock.
So disable both, then configure them, then re-enable both, for
consistency.

Reword the comment about core_write_mmd_indirect for clarity.

Tested on Ubiquiti ER-X running the GMAC and MT7530 in TRGMII mode.

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
---
 drivers/net/dsa/mt7530.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
index 80a35caf920e..7ef5e7c23e05 100644
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -435,15 +435,18 @@ mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface)
 		mt7530_write(priv, MT7530_TRGMII_TD_ODT(i),
 			     TD_DM_DRVP(8) | TD_DM_DRVN(8));
 
-	/* Setup core clock for MT7530 */
-	/* Disable MT7530 core clock */
-	core_clear(priv, CORE_TRGMII_GSW_CLK_CG, REG_GSWCK_EN);
-
-	/* Disable PLL, since phy_device has not yet been created
-	 * provided for phy_[read,write]_mmd_indirect is called, we
-	 * provide our own core_write_mmd_indirect to complete this
-	 * function.
+	/* Since phy_device has not yet been created and
+	 * phy_[read,write]_mmd_indirect is not available, we provide our own
+	 * core_write_mmd_indirect with core_{clear,write,set} wrappers to
+	 * complete this function.
 	 */
+
+	/* Disable MT7530 core and TRGMII Tx clocks */
+	core_clear(priv, CORE_TRGMII_GSW_CLK_CG,
+		   REG_GSWCK_EN | REG_TRGMIICK_EN);
+
+	/* Setup core clock for MT7530 */
+	/* Disable PLL */
 	core_write(priv, CORE_GSWPLL_GRP1, 0);
 
 	/* Set core clock into 500Mhz */
-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [PATCH net-next,v2 1/3] net: dsa: mt7530: setup core clock even in TRGMII mode
  2021-03-11  2:09 ` Ilya Lipnitskiy
  (?)
@ 2021-03-11 17:41   ` Andrew Lunn
  -1 siblings, 0 replies; 21+ messages in thread
From: Andrew Lunn @ 2021-03-11 17:41 UTC (permalink / raw)
  To: Ilya Lipnitskiy
  Cc: Sean Wang, Landen Chao, Vivien Didelot, Florian Fainelli,
	Vladimir Oltean, David S. Miller, Jakub Kicinski,
	Matthias Brugger, Philipp Zabel, Russell King, netdev,
	linux-arm-kernel, linux-mediatek, linux-kernel

On Wed, Mar 10, 2021 at 06:09:52PM -0800, Ilya Lipnitskiy wrote:
> A recent change to MIPS ralink reset logic made it so mt7530 actually
> resets the switch on platforms such as mt7621 (where bit 2 is the reset
> line for the switch). That exposed an issue where the switch would not
> function properly in TRGMII mode after a reset.
> 
> Reconfigure core clock in TRGMII mode to fix the issue.
> 
> Tested on Ubiquiti ER-X (MT7621) with TRGMII mode enabled.

Please don't submit the same patch to net and net-next.  Anything
which is accepted into net, will get merged into net-next about a week
later. If your other two patches depend on this patch, you need to
wait for the merge to happen, then submit them.

	  Andrew

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH net-next,v2 1/3] net: dsa: mt7530: setup core clock even in TRGMII mode
@ 2021-03-11 17:41   ` Andrew Lunn
  0 siblings, 0 replies; 21+ messages in thread
From: Andrew Lunn @ 2021-03-11 17:41 UTC (permalink / raw)
  To: Ilya Lipnitskiy
  Cc: Sean Wang, Landen Chao, Vivien Didelot, Florian Fainelli,
	Vladimir Oltean, David S. Miller, Jakub Kicinski,
	Matthias Brugger, Philipp Zabel, Russell King, netdev,
	linux-arm-kernel, linux-mediatek, linux-kernel

On Wed, Mar 10, 2021 at 06:09:52PM -0800, Ilya Lipnitskiy wrote:
> A recent change to MIPS ralink reset logic made it so mt7530 actually
> resets the switch on platforms such as mt7621 (where bit 2 is the reset
> line for the switch). That exposed an issue where the switch would not
> function properly in TRGMII mode after a reset.
> 
> Reconfigure core clock in TRGMII mode to fix the issue.
> 
> Tested on Ubiquiti ER-X (MT7621) with TRGMII mode enabled.

Please don't submit the same patch to net and net-next.  Anything
which is accepted into net, will get merged into net-next about a week
later. If your other two patches depend on this patch, you need to
wait for the merge to happen, then submit them.

	  Andrew

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH net-next,v2 1/3] net: dsa: mt7530: setup core clock even in TRGMII mode
@ 2021-03-11 17:41   ` Andrew Lunn
  0 siblings, 0 replies; 21+ messages in thread
From: Andrew Lunn @ 2021-03-11 17:41 UTC (permalink / raw)
  To: Ilya Lipnitskiy
  Cc: Sean Wang, Landen Chao, Vivien Didelot, Florian Fainelli,
	Vladimir Oltean, David S. Miller, Jakub Kicinski,
	Matthias Brugger, Philipp Zabel, Russell King, netdev,
	linux-arm-kernel, linux-mediatek, linux-kernel

On Wed, Mar 10, 2021 at 06:09:52PM -0800, Ilya Lipnitskiy wrote:
> A recent change to MIPS ralink reset logic made it so mt7530 actually
> resets the switch on platforms such as mt7621 (where bit 2 is the reset
> line for the switch). That exposed an issue where the switch would not
> function properly in TRGMII mode after a reset.
> 
> Reconfigure core clock in TRGMII mode to fix the issue.
> 
> Tested on Ubiquiti ER-X (MT7621) with TRGMII mode enabled.

Please don't submit the same patch to net and net-next.  Anything
which is accepted into net, will get merged into net-next about a week
later. If your other two patches depend on this patch, you need to
wait for the merge to happen, then submit them.

	  Andrew

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH net-next,v2 1/3] net: dsa: mt7530: setup core clock even in TRGMII mode
  2021-03-11  2:09 ` Ilya Lipnitskiy
  (?)
@ 2021-03-11 17:43   ` Andrew Lunn
  -1 siblings, 0 replies; 21+ messages in thread
From: Andrew Lunn @ 2021-03-11 17:43 UTC (permalink / raw)
  To: Ilya Lipnitskiy
  Cc: Sean Wang, Landen Chao, Vivien Didelot, Florian Fainelli,
	Vladimir Oltean, David S. Miller, Jakub Kicinski,
	Matthias Brugger, Philipp Zabel, Russell King, netdev,
	linux-arm-kernel, linux-mediatek, linux-kernel

On Wed, Mar 10, 2021 at 06:09:52PM -0800, Ilya Lipnitskiy wrote:
> A recent change to MIPS ralink reset logic made it so mt7530 actually
> resets the switch on platforms such as mt7621 (where bit 2 is the reset
> line for the switch). That exposed an issue where the switch would not
> function properly in TRGMII mode after a reset.
> 
> Reconfigure core clock in TRGMII mode to fix the issue.

Hi Ilya

For a patch series, netdev expects there to be a patch 0/X which
explains the big picture. What do these patches as a whole do. This
then gets used in the merge commit message.

     Andrew

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH net-next,v2 1/3] net: dsa: mt7530: setup core clock even in TRGMII mode
@ 2021-03-11 17:43   ` Andrew Lunn
  0 siblings, 0 replies; 21+ messages in thread
From: Andrew Lunn @ 2021-03-11 17:43 UTC (permalink / raw)
  To: Ilya Lipnitskiy
  Cc: Sean Wang, Landen Chao, Vivien Didelot, Florian Fainelli,
	Vladimir Oltean, David S. Miller, Jakub Kicinski,
	Matthias Brugger, Philipp Zabel, Russell King, netdev,
	linux-arm-kernel, linux-mediatek, linux-kernel

On Wed, Mar 10, 2021 at 06:09:52PM -0800, Ilya Lipnitskiy wrote:
> A recent change to MIPS ralink reset logic made it so mt7530 actually
> resets the switch on platforms such as mt7621 (where bit 2 is the reset
> line for the switch). That exposed an issue where the switch would not
> function properly in TRGMII mode after a reset.
> 
> Reconfigure core clock in TRGMII mode to fix the issue.

Hi Ilya

For a patch series, netdev expects there to be a patch 0/X which
explains the big picture. What do these patches as a whole do. This
then gets used in the merge commit message.

     Andrew

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH net-next,v2 1/3] net: dsa: mt7530: setup core clock even in TRGMII mode
@ 2021-03-11 17:43   ` Andrew Lunn
  0 siblings, 0 replies; 21+ messages in thread
From: Andrew Lunn @ 2021-03-11 17:43 UTC (permalink / raw)
  To: Ilya Lipnitskiy
  Cc: Sean Wang, Landen Chao, Vivien Didelot, Florian Fainelli,
	Vladimir Oltean, David S. Miller, Jakub Kicinski,
	Matthias Brugger, Philipp Zabel, Russell King, netdev,
	linux-arm-kernel, linux-mediatek, linux-kernel

On Wed, Mar 10, 2021 at 06:09:52PM -0800, Ilya Lipnitskiy wrote:
> A recent change to MIPS ralink reset logic made it so mt7530 actually
> resets the switch on platforms such as mt7621 (where bit 2 is the reset
> line for the switch). That exposed an issue where the switch would not
> function properly in TRGMII mode after a reset.
> 
> Reconfigure core clock in TRGMII mode to fix the issue.

Hi Ilya

For a patch series, netdev expects there to be a patch 0/X which
explains the big picture. What do these patches as a whole do. This
then gets used in the merge commit message.

     Andrew

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH net-next,v2 1/3] net: dsa: mt7530: setup core clock even in TRGMII mode
  2021-03-11 17:41   ` Andrew Lunn
  (?)
@ 2021-03-24  1:33     ` Ilya Lipnitskiy
  -1 siblings, 0 replies; 21+ messages in thread
From: Ilya Lipnitskiy @ 2021-03-24  1:33 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Sean Wang, Landen Chao, Vivien Didelot, Florian Fainelli,
	Vladimir Oltean, David S. Miller, Jakub Kicinski,
	Matthias Brugger, Philipp Zabel, Russell King, netdev,
	linux-arm-kernel, linux-mediatek, Linux Kernel Mailing List

On Thu, Mar 11, 2021 at 9:41 AM Andrew Lunn <andrew@lunn.ch> wrote:
>
> On Wed, Mar 10, 2021 at 06:09:52PM -0800, Ilya Lipnitskiy wrote:
> > A recent change to MIPS ralink reset logic made it so mt7530 actually
> > resets the switch on platforms such as mt7621 (where bit 2 is the reset
> > line for the switch). That exposed an issue where the switch would not
> > function properly in TRGMII mode after a reset.
> >
> > Reconfigure core clock in TRGMII mode to fix the issue.
> >
> > Tested on Ubiquiti ER-X (MT7621) with TRGMII mode enabled.
>
> Please don't submit the same patch to net and net-next.  Anything
> which is accepted into net, will get merged into net-next about a week
> later. If your other two patches depend on this patch, you need to
> wait for the merge to happen, then submit them.
I don't mind waiting, but it's been more than a week now. When is the
next merge of net-next into net planned to happen?

Ilya

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH net-next,v2 1/3] net: dsa: mt7530: setup core clock even in TRGMII mode
@ 2021-03-24  1:33     ` Ilya Lipnitskiy
  0 siblings, 0 replies; 21+ messages in thread
From: Ilya Lipnitskiy @ 2021-03-24  1:33 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Sean Wang, Landen Chao, Vivien Didelot, Florian Fainelli,
	Vladimir Oltean, David S. Miller, Jakub Kicinski,
	Matthias Brugger, Philipp Zabel, Russell King, netdev,
	linux-arm-kernel, linux-mediatek, Linux Kernel Mailing List

On Thu, Mar 11, 2021 at 9:41 AM Andrew Lunn <andrew@lunn.ch> wrote:
>
> On Wed, Mar 10, 2021 at 06:09:52PM -0800, Ilya Lipnitskiy wrote:
> > A recent change to MIPS ralink reset logic made it so mt7530 actually
> > resets the switch on platforms such as mt7621 (where bit 2 is the reset
> > line for the switch). That exposed an issue where the switch would not
> > function properly in TRGMII mode after a reset.
> >
> > Reconfigure core clock in TRGMII mode to fix the issue.
> >
> > Tested on Ubiquiti ER-X (MT7621) with TRGMII mode enabled.
>
> Please don't submit the same patch to net and net-next.  Anything
> which is accepted into net, will get merged into net-next about a week
> later. If your other two patches depend on this patch, you need to
> wait for the merge to happen, then submit them.
I don't mind waiting, but it's been more than a week now. When is the
next merge of net-next into net planned to happen?

Ilya

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH net-next,v2 1/3] net: dsa: mt7530: setup core clock even in TRGMII mode
@ 2021-03-24  1:33     ` Ilya Lipnitskiy
  0 siblings, 0 replies; 21+ messages in thread
From: Ilya Lipnitskiy @ 2021-03-24  1:33 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Sean Wang, Landen Chao, Vivien Didelot, Florian Fainelli,
	Vladimir Oltean, David S. Miller, Jakub Kicinski,
	Matthias Brugger, Philipp Zabel, Russell King, netdev,
	linux-arm-kernel, linux-mediatek, Linux Kernel Mailing List

On Thu, Mar 11, 2021 at 9:41 AM Andrew Lunn <andrew@lunn.ch> wrote:
>
> On Wed, Mar 10, 2021 at 06:09:52PM -0800, Ilya Lipnitskiy wrote:
> > A recent change to MIPS ralink reset logic made it so mt7530 actually
> > resets the switch on platforms such as mt7621 (where bit 2 is the reset
> > line for the switch). That exposed an issue where the switch would not
> > function properly in TRGMII mode after a reset.
> >
> > Reconfigure core clock in TRGMII mode to fix the issue.
> >
> > Tested on Ubiquiti ER-X (MT7621) with TRGMII mode enabled.
>
> Please don't submit the same patch to net and net-next.  Anything
> which is accepted into net, will get merged into net-next about a week
> later. If your other two patches depend on this patch, you need to
> wait for the merge to happen, then submit them.
I don't mind waiting, but it's been more than a week now. When is the
next merge of net-next into net planned to happen?

Ilya

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH net-next,v2 1/3] net: dsa: mt7530: setup core clock even in TRGMII mode
  2021-03-24  1:33     ` Ilya Lipnitskiy
  (?)
@ 2021-03-24  1:34       ` Ilya Lipnitskiy
  -1 siblings, 0 replies; 21+ messages in thread
From: Ilya Lipnitskiy @ 2021-03-24  1:34 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Sean Wang, Landen Chao, Vivien Didelot, Florian Fainelli,
	Vladimir Oltean, David S. Miller, Jakub Kicinski,
	Matthias Brugger, Philipp Zabel, Russell King, netdev,
	linux-arm-kernel, linux-mediatek, Linux Kernel Mailing List

On Tue, Mar 23, 2021 at 6:33 PM Ilya Lipnitskiy
<ilya.lipnitskiy@gmail.com> wrote:
>
> On Thu, Mar 11, 2021 at 9:41 AM Andrew Lunn <andrew@lunn.ch> wrote:
> >
> > On Wed, Mar 10, 2021 at 06:09:52PM -0800, Ilya Lipnitskiy wrote:
> > > A recent change to MIPS ralink reset logic made it so mt7530 actually
> > > resets the switch on platforms such as mt7621 (where bit 2 is the reset
> > > line for the switch). That exposed an issue where the switch would not
> > > function properly in TRGMII mode after a reset.
> > >
> > > Reconfigure core clock in TRGMII mode to fix the issue.
> > >
> > > Tested on Ubiquiti ER-X (MT7621) with TRGMII mode enabled.
> >
> > Please don't submit the same patch to net and net-next.  Anything
> > which is accepted into net, will get merged into net-next about a week
> > later. If your other two patches depend on this patch, you need to
> > wait for the merge to happen, then submit them.
> I don't mind waiting, but it's been more than a week now. When is the
> next merge of net-next into net planned to happen?
Oops, I meant net into net-next...

Ilya

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH net-next,v2 1/3] net: dsa: mt7530: setup core clock even in TRGMII mode
@ 2021-03-24  1:34       ` Ilya Lipnitskiy
  0 siblings, 0 replies; 21+ messages in thread
From: Ilya Lipnitskiy @ 2021-03-24  1:34 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Sean Wang, Landen Chao, Vivien Didelot, Florian Fainelli,
	Vladimir Oltean, David S. Miller, Jakub Kicinski,
	Matthias Brugger, Philipp Zabel, Russell King, netdev,
	linux-arm-kernel, linux-mediatek, Linux Kernel Mailing List

On Tue, Mar 23, 2021 at 6:33 PM Ilya Lipnitskiy
<ilya.lipnitskiy@gmail.com> wrote:
>
> On Thu, Mar 11, 2021 at 9:41 AM Andrew Lunn <andrew@lunn.ch> wrote:
> >
> > On Wed, Mar 10, 2021 at 06:09:52PM -0800, Ilya Lipnitskiy wrote:
> > > A recent change to MIPS ralink reset logic made it so mt7530 actually
> > > resets the switch on platforms such as mt7621 (where bit 2 is the reset
> > > line for the switch). That exposed an issue where the switch would not
> > > function properly in TRGMII mode after a reset.
> > >
> > > Reconfigure core clock in TRGMII mode to fix the issue.
> > >
> > > Tested on Ubiquiti ER-X (MT7621) with TRGMII mode enabled.
> >
> > Please don't submit the same patch to net and net-next.  Anything
> > which is accepted into net, will get merged into net-next about a week
> > later. If your other two patches depend on this patch, you need to
> > wait for the merge to happen, then submit them.
> I don't mind waiting, but it's been more than a week now. When is the
> next merge of net-next into net planned to happen?
Oops, I meant net into net-next...

Ilya

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH net-next,v2 1/3] net: dsa: mt7530: setup core clock even in TRGMII mode
@ 2021-03-24  1:34       ` Ilya Lipnitskiy
  0 siblings, 0 replies; 21+ messages in thread
From: Ilya Lipnitskiy @ 2021-03-24  1:34 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Sean Wang, Landen Chao, Vivien Didelot, Florian Fainelli,
	Vladimir Oltean, David S. Miller, Jakub Kicinski,
	Matthias Brugger, Philipp Zabel, Russell King, netdev,
	linux-arm-kernel, linux-mediatek, Linux Kernel Mailing List

On Tue, Mar 23, 2021 at 6:33 PM Ilya Lipnitskiy
<ilya.lipnitskiy@gmail.com> wrote:
>
> On Thu, Mar 11, 2021 at 9:41 AM Andrew Lunn <andrew@lunn.ch> wrote:
> >
> > On Wed, Mar 10, 2021 at 06:09:52PM -0800, Ilya Lipnitskiy wrote:
> > > A recent change to MIPS ralink reset logic made it so mt7530 actually
> > > resets the switch on platforms such as mt7621 (where bit 2 is the reset
> > > line for the switch). That exposed an issue where the switch would not
> > > function properly in TRGMII mode after a reset.
> > >
> > > Reconfigure core clock in TRGMII mode to fix the issue.
> > >
> > > Tested on Ubiquiti ER-X (MT7621) with TRGMII mode enabled.
> >
> > Please don't submit the same patch to net and net-next.  Anything
> > which is accepted into net, will get merged into net-next about a week
> > later. If your other two patches depend on this patch, you need to
> > wait for the merge to happen, then submit them.
> I don't mind waiting, but it's been more than a week now. When is the
> next merge of net-next into net planned to happen?
Oops, I meant net into net-next...

Ilya

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2021-03-24  1:36 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-11  2:09 [PATCH net-next,v2 1/3] net: dsa: mt7530: setup core clock even in TRGMII mode Ilya Lipnitskiy
2021-03-11  2:09 ` [PATCH net-next, v2 " Ilya Lipnitskiy
2021-03-11  2:09 ` Ilya Lipnitskiy
2021-03-11  2:09 ` [PATCH net-next,v2 2/3] net: dsa: mt7530: clean up redundant clock enables Ilya Lipnitskiy
2021-03-11  2:09   ` [PATCH net-next, v2 " Ilya Lipnitskiy
2021-03-11  2:09   ` Ilya Lipnitskiy
2021-03-11  2:09 ` [PATCH net-next,v2 3/3] net: dsa: mt7530: disable TRGMII clock at reconfigure Ilya Lipnitskiy
2021-03-11  2:09   ` [PATCH net-next, v2 " Ilya Lipnitskiy
2021-03-11  2:09   ` Ilya Lipnitskiy
2021-03-11 17:41 ` [PATCH net-next,v2 1/3] net: dsa: mt7530: setup core clock even in TRGMII mode Andrew Lunn
2021-03-11 17:41   ` Andrew Lunn
2021-03-11 17:41   ` Andrew Lunn
2021-03-24  1:33   ` Ilya Lipnitskiy
2021-03-24  1:33     ` Ilya Lipnitskiy
2021-03-24  1:33     ` Ilya Lipnitskiy
2021-03-24  1:34     ` Ilya Lipnitskiy
2021-03-24  1:34       ` Ilya Lipnitskiy
2021-03-24  1:34       ` Ilya Lipnitskiy
2021-03-11 17:43 ` Andrew Lunn
2021-03-11 17:43   ` Andrew Lunn
2021-03-11 17:43   ` Andrew Lunn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.