Re: [RFC 0/4] net: l2switch: Provide support for L2 switch on i.MX28 SoC

2020-11-29 Thread Lukasz Majewski
Hi Florian, > On 11/27/2020 4:33 PM, Lukasz Majewski wrote: > >> So why use DSA at all? What benefit does it bring you? Why not do > >> the entire switch configuration from within FEC, or a separate > >> driver very closely related to it? > > > > Min

Re: [RFC 0/4] net: l2switch: Provide support for L2 switch on i.MX28 SoC

2020-11-27 Thread Lukasz Majewski
Hi Vladimir, > On Fri, Nov 27, 2020 at 12:35:49AM +0100, Lukasz Majewski wrote: > > > > - The question regarding power management - at least for my use > > > > case there is no need for runtime power management. The L2 > > > > switch shall w

Re: [RFC 0/4] net: l2switch: Provide support for L2 switch on i.MX28 SoC

2020-11-27 Thread Lukasz Majewski
I cannot find such chapter in the official documentation from NXP: "VFxxx Controller Reference Manual, Rev. 0, 10/2016" Maybe you have more verbose version? Could you share how the document is named? > >Andrew Best regards, Lukasz Majewski -- DENX Software Engineering GmbH,

Re: [RFC 0/4] net: l2switch: Provide support for L2 switch on i.MX28 SoC

2020-11-27 Thread Lukasz Majewski
the degree of control you need over the DMA > channel. If you can reuse the FEC driver, then a DSA driver might > work. If the coupling it too loose, and you have to take control of > the DMA, then a pure switchdev driver seems more appropriate. > > Andrew > Thanks for th

Re: [RFC 0/4] net: l2switch: Provide support for L2 switch on i.MX28 SoC

2020-11-26 Thread Lukasz Majewski
is and statically > assign VLANs. Frames sent with VLAN 1 are forwarded out port 1. Frames > sent with VLAN 2 are sent out port 2. You need the port to > append/strip these VLAN tags for ingress/egress. tag_8021q.c gives you > some code to help with this. But can you still use the hardware

Re: [RFC 0/4] net: l2switch: Provide support for L2 switch on i.MX28 SoC

2020-11-26 Thread Lukasz Majewski
Hi Vladimir, > Hi Lukasz, > > On Thu, Nov 26, 2020 at 12:24:55AM +0100, Lukasz Majewski wrote: > > This is the first attempt to add support for L2 switch available on > > some NXP devices - i.e. iMX287 or VF610. This patch set uses common > > FEC and DSA code. > &

Re: [RFC 0/4] net: l2switch: Provide support for L2 switch on i.MX28 SoC

2020-11-26 Thread Lukasz Majewski
Hi Andrew, Florian, > On Wed, Nov 25, 2020 at 05:30:04PM -0800, Florian Fainelli wrote: > > > > > > On 11/25/2020 4:00 PM, Andrew Lunn wrote: > > > On Thu, Nov 26, 2020 at 12:24:55AM +0100, Lukasz Majewski wrote: > > >> This is the first atte

[RFC 4/4] ARM: dts: imx28: Add description for L2 switch on XEA board

2020-11-25 Thread Lukasz Majewski
The 'eth_switch' node is now used to enable support for L2 switch. Moreover, a separate 'switch' node was introduced to keep the code more clean. Signed-off-by: Lukasz Majewski --- arch/arm/boot/dts/imx28-xea.dts | 55 + 1 file changed, 55

[RFC 2/4] net: dsa: Provide DSA driver for NXP's More Than IP L2 switch

2020-11-25 Thread Lukasz Majewski
s FEC (fec_main.c). Signed-off-by: Lukasz Majewski --- drivers/net/dsa/Kconfig | 11 + drivers/net/dsa/Makefile| 1 + drivers/net/dsa/mtip-l2switch.c | 399 drivers/net/dsa/mtip-l2switch.h | 239 +++ 4 files changed, 650 inser

[RFC 1/4] net: fec: Move some defines to ./drivers/net/ethernet/freescale/fec.h header

2020-11-25 Thread Lukasz Majewski
After this change ECR (control register) defines are moved to fec.h, so they can be reused by L2 switch code. Signed-off-by: Lukasz Majewski --- drivers/net/ethernet/freescale/fec.h | 3 +++ drivers/net/ethernet/freescale/fec_main.c | 3 --- 2 files changed, 3 insertions(+), 3 deletions

[RFC 3/4] net: imx: l2switch: Adjust fec_main.c to provide support for L2 switch

2020-11-25 Thread Lukasz Majewski
.freescale.com/imx/linux-2.6-imx.git Branch: imx_2.6.35_maintain SHA1: b3912bb8a4caf3ec50909135e88af959982c43ca [2] - https://github.com/lmajewski/linux-imx28-l2switch/commits/master Signed-off-by: Lukasz Majewski --- drivers/net/ethernet/freescale/fec.h | 39 ++ drivers/net

[RFC 0/4] net: l2switch: Provide support for L2 switch on i.MX28 SoC

2020-11-25 Thread Lukasz Majewski
o/?l=devicetree&m=160632123203787&w=2 Those patches has been tested (applied) on 4.9.130-cip and v5.9 (vanila mainline kernel) Lukasz Majewski (4): net: fec: Move some defines to ./drivers/net/ethernet/freescale/fec.h header net: dsa: Provide DSA driver for NXP's More Than IP L

[PATCH v3 1/3] Documentation: devicetree: Add PHY no lane swap binding

2017-02-06 Thread Lukasz Majewski
Add the documentation to avoid PHY lane swapping. This is a boolean entry to notify the phy device drivers that the TX/RX lanes NO need to be swapped. The use case for this binding mostly happens after wrong HW configuration of PHY IC during bootstrap. Signed-off-by: Lukasz Majewski --- Changes

[PATCH v3 2/3] net: phy: dp83867: Add lane swapping support in the DP83867 TI's PHY driver

2017-02-06 Thread Lukasz Majewski
eds to disable it in software (at u-boot/Linux). Signed-off-by: Lukasz Majewski --- Changes for v3: - Add "line swapping" to the patch description - Add DP83867_PORT_MIRROING_KEEP enum for better code readability Changes for v2: - use "net-phy-lane-swap" and "net-phy-lane-

[PATCH v3 3/3] net: phy: dp83867: Recover from "port mirroring" N/A MODE4

2017-02-06 Thread Lukasz Majewski
e found at following e2e thread: "DP83867IR: Problem with RESERVED bits in PHY Control Register (PHYCR) - Linux driver" https://e2e.ti.com/support/interface/ethernet/f/903/p/571313/2096954#2096954 Signed-off-by: Lukasz Majewski --- Changes for v3: - None --- drivers/ne

Re: [PATCH] Documentation: devicetree: Add PHY no lane swap binding

2017-02-06 Thread Lukasz Majewski
Hi Florian, Andrew, > Le 02/04/17 à 09:23, Andrew Lunn a écrit : > > On Sat, Feb 04, 2017 at 04:47:47PM +0100, Lukasz Majewski wrote: > >> Add the documentation to avoid PHY lane swapping. This is a boolean > >> entry to notify the phy device drivers that the TX/RX lane

Re: [PATCH v2 1/2] net: phy: dp83867: Port mirroring support in the DP83867 TI's PHY driver

2017-02-05 Thread Lukasz Majewski
Hi Andrew, > On Sat, Feb 04, 2017 at 05:02:11PM +0100, Lukasz Majewski wrote: > > This patch adds support for enabling or disabling the port > > mirroring (at CFG4 register) feature of the DP83867 TI's PHY device. > > As we discussed before, "port mirroring"

[PATCH v2 2/2] net: phy: dp83867: Recover from "port mirroring" N/A MODE4

2017-02-04 Thread Lukasz Majewski
e found at following e2e thread: "DP83867IR: Problem with RESERVED bits in PHY Control Register (PHYCR) - Linux driver" https://e2e.ti.com/support/interface/ethernet/f/903/p/571313/2096954#2096954 Signed-off-by: Lukasz Majewski --- drivers/net/phy/dp83867.c | 23 ++-

[PATCH v2 1/2] net: phy: dp83867: Port mirroring support in the DP83867 TI's PHY driver

2017-02-04 Thread Lukasz Majewski
d-off-by: Lukasz Majewski --- Changes for v2: - use "net-phy-lane-swap" and "net-phy-lane-no-swap" generic PHY properties. instead of TI specific one --- drivers/net/phy/dp83867.c | 37 + 1 file changed, 37 insertions(+) diff --git a/dr

[PATCH] Documentation: devicetree: Add PHY no lane swap binding

2017-02-04 Thread Lukasz Majewski
Add the documentation to avoid PHY lane swapping. This is a boolean entry to notify the phy device drivers that the TX/RX lanes NO need to be swapped. The use case for this binding mostly happens after wrong HW configuration of PHY IC during bootstrap. Signed-off-by: Lukasz Majewski

Re: [PATCH] net: phy: dp83867: Port mirroring support in the DP83867 TI's PHY driver

2017-02-02 Thread Lukasz Majewski
d define it and use. > > This is the most flexible solution. Yes, that is O.K. for me. Ok. thanks. > > Andrew Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groe

Re: [PATCH] net: phy: dp83867: Port mirroring support in the DP83867 TI's PHY driver

2017-02-02 Thread Lukasz Majewski
Hi Andrew, > On Wed, Feb 01, 2017 at 11:13:23PM +0100, Lukasz Majewski wrote: > > Hi Andrew, > > > > > > We would need a tri-state device tree properly: > > > > > > > > 1. Not defined - do nothing > > > > 2. Defined as 0 -> expli

Re: [PATCH] net: phy: dp83867: Port mirroring support in the DP83867 TI's PHY driver

2017-02-01 Thread Lukasz Majewski
set "net-phy-lane-swap" Unconditionally setting this field to 0 (as we expect the reset default setting) seems to me like a good solution. However, I was not sure if such approach is acceptable by the community. > >Andrew Best regards, Lukasz Majewski -- DENX Softwa

Re: [PATCH] net: phy: dp83867: Port mirroring support in the DP83867 TI's PHY driver

2017-02-01 Thread Lukasz Majewski
Dear All, Thanks for prompt reply. > On 02/01/2017 09:16 AM, Andrew Lunn wrote: > > On Wed, Feb 01, 2017 at 03:43:35PM +0100, Lukasz Majewski wrote: > >> This patch adds support for enabling or disabling the port > >> mirroring feature of the DP83867 TI's PHY d

[PATCH] net: phy: dp83867: Port mirroring support in the DP83867 TI's PHY driver

2017-02-01 Thread Lukasz Majewski
This patch adds support for enabling or disabling the port mirroring feature of the DP83867 TI's PHY device. One use case is when bootstrap configuration enables this feature (because of e.g. LED wiring) so then one needs to disable it in software (u-boot/Linux). Signed-off-by: Lukasz Maj