Re: Registering IRQ for MT7530 internal PHYs

2021-01-18 Thread Landen Chao
Hi Qingfang, On Wed, 2021-01-06 at 16:54 +0800, DENG Qingfang wrote: > Hi Andrew, > > On Wed, Dec 30, 2020 at 11:23 PM Andrew Lunn wrote: > > > > On Wed, Dec 30, 2020 at 09:42:09AM +, Marc Zyngier wrote: > > > > +static irqreturn_t > > > > +mt7530_irq(int irq, void *data) > > > > +{ > > > >

Re: [PATCH v2] net: dsa: mt7530: Add some return-value checks

2020-09-24 Thread Landen Chao
On Thu, 2020-09-24 at 14:11 +0100, Alex Dewar wrote: > On 2020-09-24 13:13, Landen Chao wrote: > > Hi Alex, > > > > Thanks for your patch. By linux/scripts/checkpatch.pl > > > > On Sun, 2020-09-20 at 03:28 +0800, Alex Dewar wrote: > > [..] > >> @@ -1

Re: [PATCH v2] net: dsa: mt7530: Add some return-value checks

2020-09-24 Thread Landen Chao
Hi Alex, Thanks for your patch. By linux/scripts/checkpatch.pl On Sun, 2020-09-20 at 03:28 +0800, Alex Dewar wrote: [..] > @@ -1631,9 +1635,11 @@ mt7530_setup(struct dsa_switch *ds) > mt7530_rmw(priv, MT7530_PCR_P(i), PCR_MATRIX_MASK, > PCR_MATRIX_CLR); >

Re: [PATCH] net: dsa: mt7530: Add some return-value checks

2020-09-17 Thread Landen Chao
Hi Alex, Thanks for your review and fixing. On Thu, 2020-09-17 at 03:50 +0800, Alex Dewar wrote: [..] > > If it is not expected that these functions will throw errors (i.e. > because the parameters passed will always be correct), we could dispense > with the use of EINVAL errors and just use

[PATCH net-next v4 0/6] net-next: dsa: mt7530: add support for MT7531

2020-09-11 Thread Landen Chao
ink speed of 2500base-x in dts. - add MT7531 port mirror setting. Landen Chao (6): net: dsa: mt7530: Refine message in Kconfig net: dsa: mt7530: Extend device data ready for adding a new hardware dt-bindings: net: dsa: add new MT7531 binding to support MT7531 net: dsa: mt7530: Add th

[PATCH net-next v4 3/6] dt-bindings: net: dsa: add new MT7531 binding to support MT7531

2020-09-11 Thread Landen Chao
Add devicetree binding to support the compatible mt7531 switch as used in the MediaTek MT7531 switch. Signed-off-by: Sean Wang Signed-off-by: Landen Chao --- .../devicetree/bindings/net/dsa/mt7530.txt | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git

[PATCH net-next v4 1/6] net: dsa: mt7530: Refine message in Kconfig

2020-09-11 Thread Landen Chao
Refine message in Kconfig with fixing typo and an explicit MT7621 support. Signed-off-by: Landen Chao Signed-off-by: Sean Wang Reviewed-by: Florian Fainelli --- drivers/net/dsa/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/dsa/Kconfig b/drivers

[PATCH net-next v4 6/6] arm64: dts: mt7622: add mt7531 dsa to bananapi-bpi-r64 board

2020-09-11 Thread Landen Chao
Add mt7531 dsa to bananapi-bpi-r64 board for 5 giga Ethernet ports support. Signed-off-by: Landen Chao --- .../dts/mediatek/mt7622-bananapi-bpi-r64.dts | 44 +++ 1 file changed, 44 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts b/arch

[PATCH net-next v4 5/6] arm64: dts: mt7622: add mt7531 dsa to mt7622-rfb1 board

2020-09-11 Thread Landen Chao
Add mt7531 dsa to mt7622-rfb1 board for 5 giga Ethernet ports support. mt7622 only supports 1 sgmii interface, so either gmac0 or gmac1 can be configured as sgmii interface. In this patch, change to connect mt7622 gmac0 and mt7531 port6 through sgmii interface. Signed-off-by: Landen Chao

[PATCH net-next v5 6/6] arm64: dts: mt7622: add mt7531 dsa to bananapi-bpi-r64 board

2020-09-11 Thread Landen Chao
Add mt7531 dsa to bananapi-bpi-r64 board for 5 giga Ethernet ports support. Signed-off-by: Landen Chao --- .../dts/mediatek/mt7622-bananapi-bpi-r64.dts | 50 +++ 1 file changed, 50 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts b/arch

[PATCH net-next v5 3/6] dt-bindings: net: dsa: add new MT7531 binding to support MT7531

2020-09-11 Thread Landen Chao
Add devicetree binding to support the compatible mt7531 switch as used in the MediaTek MT7531 switch. Signed-off-by: Sean Wang Signed-off-by: Landen Chao --- .../devicetree/bindings/net/dsa/mt7530.txt | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git

[PATCH net-next v5 4/6] net: dsa: mt7530: Add the support of MT7531 switch

2020-09-11 Thread Landen Chao
negotiation which is compatible with 10B/8B encoding of PHY_INTERFACE_MODE_2500BASEX with fixed full-duplex and fixed pause. Signed-off-by: Landen Chao Signed-off-by: Sean Wang --- drivers/net/dsa/Kconfig | 6 +- drivers/net/dsa/mt7530.c | 911

[PATCH net-next v5 0/6] net-next: dsa: mt7530: add support for MT7531

2020-09-11 Thread Landen Chao
al conflicts. - Add wrapper function for mdio read/write to support both C22 and C45. - correct fixed-link speed of 2500base-x in dts. - add MT7531 port mirror setting. Landen Chao (6): net: dsa: mt7530: Refine message in Kconfig net: dsa: mt7530: Extend device data ready for adding a new hardware

[PATCH net-next v5 1/6] net: dsa: mt7530: Refine message in Kconfig

2020-09-11 Thread Landen Chao
Refine message in Kconfig with fixing typo and an explicit MT7621 support. Signed-off-by: Landen Chao Signed-off-by: Sean Wang Reviewed-by: Florian Fainelli --- drivers/net/dsa/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/dsa/Kconfig b/drivers

[PATCH net-next v5 5/6] arm64: dts: mt7622: add mt7531 dsa to mt7622-rfb1 board

2020-09-11 Thread Landen Chao
Add mt7531 dsa to mt7622-rfb1 board for 5 giga Ethernet ports support. mt7622 only supports 1 sgmii interface, so either gmac0 or gmac1 can be configured as sgmii interface. In this patch, change to connect mt7622 gmac0 and mt7531 port6 through sgmii interface. Signed-off-by: Landen Chao

[PATCH net-next v5 2/6] net: dsa: mt7530: Extend device data ready for adding a new hardware

2020-09-11 Thread Landen Chao
MT7531, and keep the same setup logic of existing hardware. Signed-off-by: Landen Chao Signed-off-by: Sean Wang --- drivers/net/dsa/mt7530.c | 271 --- drivers/net/dsa/mt7530.h | 37 +- 2 files changed, 234 insertions(+), 74 deletions(-) diff --git a/drivers

[PATCH net-next v4 4/6] net: dsa: mt7530: Add the support of MT7531 switch

2020-09-11 Thread Landen Chao
negotiation which is compatible with 10B/8B encoding of PHY_INTERFACE_MODE_2500BASEX with fixed full-duplex and fixed pause. Signed-off-by: Landen Chao Signed-off-by: Sean Wang --- drivers/net/dsa/Kconfig | 6 +- drivers/net/dsa/mt7530.c | 911

[PATCH net-next v4 2/6] net: dsa: mt7530: Extend device data ready for adding a new hardware

2020-09-11 Thread Landen Chao
MT7531, and keep the same setup logic of existing hardware. Signed-off-by: Landen Chao Signed-off-by: Sean Wang --- drivers/net/dsa/mt7530.c | 271 --- drivers/net/dsa/mt7530.h | 37 +- 2 files changed, 234 insertions(+), 74 deletions(-) diff --git a/drivers

[PATCH net-next v3 2/6] net: dsa: mt7530: Extend device data ready for adding a new hardware

2020-09-04 Thread Landen Chao
MT7531, and keep the same setup logic of existing hardware. Signed-off-by: Landen Chao Signed-off-by: Sean Wang --- drivers/net/dsa/mt7530.c | 272 +-- drivers/net/dsa/mt7530.h | 37 +- 2 files changed, 240 insertions(+), 69 deletions(-) diff --git a/drivers

[PATCH net-next v3 5/6] arm64: dts: mt7622: add mt7531 dsa to mt7622-rfb1 board

2020-09-04 Thread Landen Chao
Add mt7531 dsa to mt7622-rfb1 board for 5 giga Ethernet ports support. mt7622 only supports 1 sgmii interface, so either gmac0 or gmac1 can be configured as sgmii interface. In this patch, change to connect mt7622 gmac0 and mt7531 port6 through sgmii interface. Signed-off-by: Landen Chao

[PATCH net-next v3 6/6] arm64: dts: mt7622: add mt7531 dsa to bananapi-bpi-r64 board

2020-09-04 Thread Landen Chao
Add mt7531 dsa to bananapi-bpi-r64 board for 5 giga Ethernet ports support. Signed-off-by: Landen Chao --- .../dts/mediatek/mt7622-bananapi-bpi-r64.dts | 44 +++ 1 file changed, 44 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts b/arch

[PATCH net-next v3 4/6] net: dsa: mt7530: Add the support of MT7531 switch

2020-09-04 Thread Landen Chao
negotiation which is compatible with 10B/8B encoding of PHY_INTERFACE_MODE_2500BASEX with fixed full-duplex and fixed pause. Signed-off-by: Landen Chao Signed-off-by: Sean Wang --- drivers/net/dsa/Kconfig | 6 +- drivers/net/dsa/mt7530.c | 918

[PATCH net-next v3 0/6] net-next: dsa: mt7530: add support for MT7531

2020-09-04 Thread Landen Chao
nction for mdio read/write to support both C22 and C45. - correct fixed-link speed of 2500base-x in dts. - add MT7531 port mirror setting. Landen Chao (6): net: dsa: mt7530: Refine message in Kconfig net: dsa: mt7530: Extend device data ready for adding a new hardware dt-bindings: net: dsa: a

[PATCH net-next v3 3/6] dt-bindings: net: dsa: add new MT7531 binding to support MT7531

2020-09-04 Thread Landen Chao
Add devicetree binding to support the compatible mt7531 switch as used in the MediaTek MT7531 switch. Signed-off-by: Sean Wang Signed-off-by: Landen Chao --- Documentation/devicetree/bindings/net/dsa/mt7530.txt | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git

[PATCH net-next v3 1/6] net: dsa: mt7530: Refine message in Kconfig

2020-09-04 Thread Landen Chao
Refine message in Kconfig with fixing typo and an explicit MT7621 support. Signed-off-by: Landen Chao Signed-off-by: Sean Wang Reviewed-by: Florian Fainelli --- drivers/net/dsa/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/dsa/Kconfig b/drivers

[PATCH net v2] net: dsa: mt7530: fix advertising unsupported 1000baseT_Half

2020-08-28 Thread Landen Chao
Remove 1000baseT_Half to advertise correct hardware capability in phylink_validate() callback function. Fixes: 38f790a80560 ("net: dsa: mt7530: Add support for port 5") Signed-off-by: Landen Chao Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli --- v1->v2 - fix the c

[PATCH] net: dsa: mt7530: fix advertising unsupported

2020-08-27 Thread Landen Chao
1000baseT_Half Remove 1000baseT_Half to advertise correct hardware capability in phylink_validate() callback function. Fixes: 38f790a80560 ("net: dsa: mt7530: Add support for port 5") Signed-off-by: Landen Chao --- drivers/net/dsa/mt7530.c | 2 +- 1 file changed, 1 insertion(+),

Re: [PATCH net-next v2 5/7] net: dsa: mt7530: Add the support of MT7531 switch

2020-08-19 Thread Landen Chao
On Wed, 2020-08-19 at 00:09 +0800, Andrew Lunn wrote: > On Tue, Aug 18, 2020 at 03:14:10PM +0800, Landen Chao wrote: > > Add new support for MT7531: > > > > MT7531 is the next generation of MT7530. It is also a 7-ports switch with > > 5 giga embedded phys, 2 cpu po

Re: [PATCH net-next v2 5/7] net: dsa: mt7530: Add the support of MT7531 switch

2020-08-19 Thread Landen Chao
Hi Jakub, These 2 function are used in the same file only. I'll fix warnings by making 2 functions 'static' in v3. Landen On Tue, 2020-08-18 at 23:23 +0800, Jakub Kicinski wrote: [snip] > Please fix these W=1 warnings: > > ../drivers/net/dsa/mt7530.c:1976:1: warning: no previous prototype for

Re: [PATCH net-next v2 7/7] arm64: dts: mt7622: add mt7531 dsa to bananapi-bpi-r64 board

2020-08-19 Thread Landen Chao
On Wed, 2020-08-19 at 00:24 +0800, Vladimir Oltean wrote: > On Tue, Aug 18, 2020 at 03:14:12PM +0800, Landen Chao wrote: > > Add mt7531 dsa to bananapi-bpi-r64 board for 5 giga Ethernet ports support. > > > > Signed-off-by: Landen Chao > > --- > > .../dts/med

Re: [PATCH net-next v2 0/7] net-next: dsa: mt7530: add support for MT7531

2020-08-19 Thread Landen Chao
Hi DENG, MT7531 mirror port has been fixed by new definition of register base in header file. The logic of mirror port setting in 7530.c is reused. @@ -41,6 +42,33 @@ enum mt753x_id { #define MIRROR_PORT(x)((x) & 0x7) #define MIRROR_MASK 0x7 +/*

[PATCH net-next v2 6/7] arm64: dts: mt7622: add mt7531 dsa to mt7622-rfb1 board

2020-08-18 Thread Landen Chao
Add mt7531 dsa to mt7622-rfb1 board for 5 giga Ethernet ports support. mt7622 only supports 1 sgmii interface, so either gmac0 or gmac1 can be configured as sgmii interface. In this patch, change to connet mt7622 gmac0 and mt7531 port6 through sgmii interface. Signed-off-by: Landen Chao

[PATCH net-next v2 3/7] net: dsa: mt7530: Extend device data ready for adding a new hardware

2020-08-18 Thread Landen Chao
MT7531. Signed-off-by: Landen Chao Signed-off-by: Sean Wang --- drivers/net/dsa/mt7530.c | 272 +-- drivers/net/dsa/mt7530.h | 37 +- 2 files changed, 240 insertions(+), 69 deletions(-) diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c index

[PATCH net-next v2 2/7] net: dsa: mt7530: support full-duplex gigabit only

2020-08-18 Thread Landen Chao
Remove 1000baseT_Half to advertise correct hardware capability in phylink_validate() callback function. Signed-off-by: Landen Chao --- drivers/net/dsa/mt7530.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c index

[PATCH net-next v2 7/7] arm64: dts: mt7622: add mt7531 dsa to bananapi-bpi-r64 board

2020-08-18 Thread Landen Chao
Add mt7531 dsa to bananapi-bpi-r64 board for 5 giga Ethernet ports support. Signed-off-by: Landen Chao --- .../dts/mediatek/mt7622-bananapi-bpi-r64.dts | 44 +++ 1 file changed, 44 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts b/arch

[PATCH net-next v2 1/7] net: dsa: mt7530: Refine message in Kconfig

2020-08-18 Thread Landen Chao
Refine message in Kconfig with fixing typo and an explicit MT7621 support. Signed-off-by: Landen Chao Signed-off-by: Sean Wang --- drivers/net/dsa/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/dsa/Kconfig b/drivers/net/dsa/Kconfig index

[PATCH net-next v2 4/7] dt-bindings: net: dsa: add new MT7531 binding to support MT7531

2020-08-18 Thread Landen Chao
Add devicetree binding to support the compatible mt7531 switch as used in the MediaTek MT7531 switch. Signed-off-by: Sean Wang Signed-off-by: Landen Chao --- .../devicetree/bindings/net/dsa/mt7530.txt| 71 ++- 1 file changed, 68 insertions(+), 3 deletions(-) diff --git

[PATCH net-next v2 5/7] net: dsa: mt7530: Add the support of MT7531 switch

2020-08-18 Thread Landen Chao
of PHY_INTERFACE_MODE_2500BASEX with fixed full-duplex and fixed pause. Signed-off-by: Landen Chao Signed-off-by: Sean Wang --- drivers/net/dsa/Kconfig | 6 +- drivers/net/dsa/mt7530.c | 908 +-- drivers/net/dsa/mt7530.h | 222 ++ 3 files changed

[PATCH net-next v2 0/7] net-next: dsa: mt7530: add support for MT7531

2020-08-18 Thread Landen Chao
peed of 2500base-x in dts. - add MT7531 port mirror setting. Landen Chao (7): net: dsa: mt7530: Refine message in Kconfig net: dsa: mt7530: support full-duplex gigabit only net: dsa: mt7530: Extend device data ready for adding a new hardware dt-bindings: net: dsa: add new MT7531 binding to sup

Re: [PATCH v3] net: ethernet: mtk_eth_soc: fix mtu warning

2020-07-29 Thread Landen Chao
Hi Frank, If you send next version of patch, you can help to add the Signed-off line. Thanks. Signed-off-by: Landen Chao On Tue, 2020-07-28 at 23:53 +0800, Jakub Kicinski wrote: > On Tue, 28 Jul 2020 14:27:43 +0200 Frank Wunderlich wrote: > > From: Landen Chao > > Hi gents, &g