[PATCH] dt-bindings: net: mediatek: support MT7621 SoC

2021-04-18 Thread Ilya Lipnitskiy
Add missing binding documentation for SoC support that has been in place since v5.1 Fixes: 889bcbdeee57 ("net: ethernet: mediatek: support MT7621 SoC ethernet hardware") Cc: Bjørn Mork Signed-off-by: Ilya Lipnitskiy --- Documentation/devicetree/bindings/net/mediatek-net.txt | 1

[PATCH net-next 0/2] net: ethernet: mediatek: support custom GMAC label

2021-04-18 Thread Ilya Lipnitskiy
Add support for specifying GMAC label via DTS. Useful when it is desired to use a master DSA interface name that is different from the "eth%d" pattern. Ilya Lipnitskiy (2): dt-bindings: net: mediatek: add optional GMAC labels net: ethernet: mediatek: support custom GMAC label Doc

[PATCH net-next 1/2] dt-bindings: net: mediatek: add optional GMAC labels

2021-04-18 Thread Ilya Lipnitskiy
Document the mediatek ethernet driver change that adds support for custom labels and provide an example. Signed-off-by: Ilya Lipnitskiy --- Documentation/devicetree/bindings/net/mediatek-net.txt | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/net

[PATCH net-next 2/2] net: ethernet: mediatek: support custom GMAC label

2021-04-18 Thread Ilya Lipnitskiy
the master GMAC with a different prefix than DSA ports helps with clarity. Suggested-by: René van Dorst Signed-off-by: Ilya Lipnitskiy --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/ne

Re: [PATCH net-next 2/2] net: ethernet: mediatek: support custom GMAC label

2021-04-19 Thread Ilya Lipnitskiy
On Mon, Apr 19, 2021 at 5:15 AM Andrew Lunn wrote: > > On Sun, Apr 18, 2021 at 09:03:52PM -0700, Ilya Lipnitskiy wrote: > > The MAC device name can now be set within DTS file instead of always > > being "ethX". This is helpful for DSA to clearly label the DSA master &

Re: [PATCH] dt-bindings: net: mediatek: support MT7621 SoC

2021-04-19 Thread Ilya Lipnitskiy
On Sun, Apr 18, 2021 at 11:24 PM Bjørn Mork wrote: > > Ilya Lipnitskiy writes: > > > Add missing binding documentation for SoC support that has been in place > > since v5.1 > > > > Fixes: 889bcbdeee57 ("net: ethernet: mediatek: support MT7621 SoC ether

[PATCH net-next v2 0/2] net: ethernet: mediatek: support custom GMAC label

2021-04-19 Thread Ilya Lipnitskiy
Add support for specifying GMAC label via DTS. Useful when it is desired to use a master DSA interface name that is different from the "eth%d" pattern. v2: - Use alloc_netdev instead of alloc_etherdev followed by rename Ilya Lipnitskiy (2): dt-bindings: net: mediatek: add opt

[PATCH net-next v2 2/2] net: ethernet: mediatek: support custom GMAC label

2021-04-19 Thread Ilya Lipnitskiy
the master GMAC with a different prefix than DSA ports helps with clarity. Suggested-by: René van Dorst Signed-off-by: Ilya Lipnitskiy --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mediatek/mtk_et

[PATCH net-next v2 1/2] dt-bindings: net: mediatek: add optional GMAC labels

2021-04-19 Thread Ilya Lipnitskiy
Document the mediatek ethernet driver change that adds support for custom labels and provide an example. Signed-off-by: Ilya Lipnitskiy --- Documentation/devicetree/bindings/net/mediatek-net.txt | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/net

[PATCH] dt-bindings: net: mediatek/ralink: remove unused bindings

2021-04-19 Thread Ilya Lipnitskiy
hn Crispin Signed-off-by: Ilya Lipnitskiy --- .../bindings/net/mediatek,mt7620-gsw.txt | 24 .../bindings/net/ralink,rt2880-net.txt| 59 --- .../bindings/net/ralink,rt3050-esw.txt| 30 -- 3 files changed, 113 deletions(-) delete m

Re: [PATCH] dt-bindings: net: mediatek: support MT7621 SoC

2021-04-19 Thread Ilya Lipnitskiy
On Sun, Apr 18, 2021 at 11:24 PM Bjørn Mork wrote: > > Ilya Lipnitskiy writes: > > > Add missing binding documentation for SoC support that has been in place > > since v5.1 > > > > Fixes: 889bcbdeee57 ("net: ethernet: mediatek: support MT7621 SoC ether

Re: [PATCH net-next v2 2/2] net: ethernet: mediatek: support custom GMAC label

2021-04-20 Thread Ilya Lipnitskiy
On Tue, Apr 20, 2021 at 12:51 PM Rob Herring wrote: > > On Mon, Apr 19, 2021 at 08:46:59AM -0700, Ilya Lipnitskiy wrote: > > The MAC device name can now be set within DTS file instead of always > > being "ethX". This is helpful for DSA to clearly label the DSA master &

[PATCH net-next] net: dsa: mt7530: clean up core and TRGMII clock setup

2021-03-26 Thread Ilya Lipnitskiy
written redundantly three times. Simplify the code and only write the register only once at the end of clock reconfiguration to enable both core and TRGMII Tx clocks. Tested on Ubiquiti ER-X running the GMAC0 and MT7530 in TRGMII mode. Signed-off-by: Ilya Lipnitskiy --- drivers/net/dsa/mt7530.c

[PATCH net-next,v2] net: dsa: mt7530: clean up core and TRGMII clock setup

2021-03-26 Thread Ilya Lipnitskiy
redundantly three times. Simplify the code and only write the register only once at the end of clock reconfiguration to enable both core and TRGMII Tx clocks. Tested on Ubiquiti ER-X running the GMAC0 and MT7530 in TRGMII mode. Signed-off-by: Ilya Lipnitskiy --- drivers/net/dsa/mt7530.c

[PATCH net-next] net: ethernet: mediatek: ppe: fix busy wait loop

2021-04-15 Thread Ilya Lipnitskiy
intended behavior here. Fixes: ba37b7caf1ed ("net: ethernet: mtk_eth_soc: add support for initializing the PPE") Signed-off-by: Ilya Lipnitskiy Cc: Felix Fietkau --- drivers/net/ethernet/mediatek/mtk_ppe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ne

[PATCH net-next,v2] net: ethernet: mediatek: ppe: fix busy wait loop

2021-04-15 Thread Ilya Lipnitskiy
: ba37b7caf1ed ("net: ethernet: mtk_eth_soc: add support for initializing the PPE") Signed-off-by: Ilya Lipnitskiy Cc: Felix Fietkau --- drivers/net/ethernet/mediatek/mtk_ppe.c | 18 +- drivers/net/ethernet/mediatek/mtk_ppe.h | 1 + 2 files changed, 10 insertions(+), 9 deletion

[PATCH net-next,v3] net: ethernet: mediatek: ppe: fix busy wait loop

2021-04-15 Thread Ilya Lipnitskiy
: ba37b7caf1ed ("net: ethernet: mtk_eth_soc: add support for initializing the PPE") Signed-off-by: Ilya Lipnitskiy Cc: Felix Fietkau Reviewed-by: Andrew Lunn --- v2: - Use readl_poll_timeout as suggested by Andrew Lunn v3: - Remove unused #include's drivers/net/ethernet/mediatek

[PATCH 2/3] net: dsa: mt7530: use core_write wrapper

2021-03-10 Thread Ilya Lipnitskiy
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 --- drivers/net/dsa/mt7530.c | 5 + 1 file

[PATCH 3/3] net: dsa: mt7530: setup core clock even in TRGMII mode

2021-03-10 Thread Ilya Lipnitskiy
e clock in TRGMII mode to fix the issue. Also, disable both core and TRGMII Tx clocks prior to reconfiguring. Previously, only the core clock was disabled, but not TRGMII Tx clock. Tested on Ubiquity ER-X (MT7621) with TRGMII mode enabled. Signed-off-by: Ilya Lipnitskiy --- drivers/net/dsa/mt7

[PATCH 1/3] net: dsa: mt7530: remove redundant clock enables

2021-03-10 Thread Ilya Lipnitskiy
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. Signed-off-by: Ilya Lipnitskiy --- drivers/net/dsa/mt7530.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions

[PATCH net] net: dsa: mt7530: setup core clock even in TRGMII mode

2021-03-10 Thread Ilya Lipnitskiy
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 --- drivers/net/dsa/mt7530.c | 52 +++- 1 file changed, 25 insertions(+), 27

[PATCH net-next,v2 1/3] net: dsa: mt7530: setup core clock even in TRGMII mode

2021-03-10 Thread Ilya Lipnitskiy
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 --- drivers/net/dsa/mt7530.c | 52 +++- 1 file changed, 25 insertions(+), 27

[PATCH net-next,v2 2/3] net: dsa: mt7530: clean up redundant clock enables

2021-03-10 Thread Ilya Lipnitskiy
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 --- drivers/net/dsa/mt7530.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/net/dsa/mt7530.c b

[PATCH net-next,v2 3/3] net: dsa: mt7530: disable TRGMII clock at reconfigure

2021-03-10 Thread Ilya Lipnitskiy
running the GMAC and MT7530 in TRGMII mode. Signed-off-by: Ilya Lipnitskiy --- 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

Re: [PATCH 3/3] net: dsa: mt7530: setup core clock even in TRGMII mode

2021-03-10 Thread Ilya Lipnitskiy
Hi Vladimir, On Wed, Mar 10, 2021 at 3:10 PM Vladimir Oltean wrote: > > Hello Ilya, > > On Wed, Mar 10, 2021 at 01:14:20PM -0800, Ilya Lipnitskiy wrote: > > 3f9ef7785a9c ("MIPS: ralink: manage low reset lines") made it so mt7530 > > actually resets the switch

Re: [PATCH 3/3] net: dsa: mt7530: setup core clock even in TRGMII mode

2021-03-10 Thread Ilya Lipnitskiy
Hi Vladimir, On Wed, Mar 10, 2021 at 3:10 PM Vladimir Oltean wrote: > > Hello Ilya, > > On Wed, Mar 10, 2021 at 01:14:20PM -0800, Ilya Lipnitskiy wrote: > > 3f9ef7785a9c ("MIPS: ralink: manage low reset lines") made it so mt7530 > > actually resets the switch

Re: [PATCH 3/3] net: dsa: mt7530: setup core clock even in TRGMII mode

2021-03-10 Thread Ilya Lipnitskiy
Hi Florian, On Wed, Mar 10, 2021 at 7:20 PM Florian Fainelli wrote: > > > > On 3/10/2021 7:17 PM, Ilya Lipnitskiy wrote: > > Hi Vladimir, > > > > On Wed, Mar 10, 2021 at 3:10 PM Vladimir Oltean wrote: > >> > >> Hello Ilya, > >> >

[PATCH net,v2] net: dsa: mt7530: setup core clock even in TRGMII mode

2021-03-12 Thread Ilya Lipnitskiy
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 --- drivers/net/dsa/mt7530.c | 52 +++- 1 file changed, 25 insertions(+), 27

Re: [PATCH net-next,v2 1/3] net: dsa: mt7530: setup core clock even in TRGMII mode

2021-03-23 Thread Ilya Lipnitskiy
On Thu, Mar 11, 2021 at 9:41 AM Andrew Lunn 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 >

Re: [PATCH net-next,v2 1/3] net: dsa: mt7530: setup core clock even in TRGMII mode

2021-03-23 Thread Ilya Lipnitskiy
On Tue, Mar 23, 2021 at 6:33 PM Ilya Lipnitskiy wrote: > > On Thu, Mar 11, 2021 at 9:41 AM Andrew Lunn 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 > >