[PATCH v4 0/5] FSL/Layerscape gen 3: export serdes cfg to env

2020-01-10 Thread Alex Marginean
://patchwork.ozlabs.org/project/uboot/list/?series=146468 and v3: https://patchwork.ozlabs.org/project/uboot/list/?series=152569 Alex Marginean (5): board: fsl: lx2160a: free up arch_misc_init board: fsl: ls2080a/ls2081a: remove empty arch_misc_init board: fsl: ls1088a: remove empty arch_misc_init board: fsl

[PATCH v4 1/5] board: fsl: lx2160a: free up arch_misc_init

2020-01-10 Thread Alex Marginean
Currently LX2 board code uses arch_misc_init to set up the board mux on RDB and QDS. Move this code to misc_init_r. This is consistent with LS gen 2 and T series SoCs/boards. Signed-off-by: Alex Marginean --- arch/arm/Kconfig | 2 -- board/freescale/lx2160a

[PATCH v4 5/5] arch: armv8: fsl-layerscape: export serdes config to environment

2020-01-10 Thread Alex Marginean
serdes_init function because it depends on U-Boot environment being set up. Signed-off-by: Alex Marginean --- arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 1 + arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 14 + .../armv8/fsl-layerscape/fsl_lsch3_serdes.c | 59 +++ .../include

[PATCH v4 4/5] board: fsl: ls1028a: free up arch_misc_init

2020-01-10 Thread Alex Marginean
Currently LS1028A board code uses arch_misc_init to set up the board mux on QDS. Move this code to misc_init_r. This is consistent with LS gen 2 and T series SoCs/boards. Signed-off-by: Alex Marginean --- arch/arm/Kconfig | 1 - board/freescale/ls1028a/ls1028a.c

[PATCH v4 3/5] board: fsl: ls1088a: remove empty arch_misc_init

2020-01-10 Thread Alex Marginean
The arch_misc_init function is empty on LS108x SoCs/boards, remove it. Signed-off-by: Alex Marginean --- arch/arm/Kconfig | 2 -- board/freescale/ls1088a/ls1088a.c | 7 --- 2 files changed, 9 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 38bf420feb

[PATCH v4 2/5] board: fsl: ls2080a/ls2081a: remove empty arch_misc_init

2020-01-10 Thread Alex Marginean
The arch_misc_init function is empty on LS2 SoCs/boards, remove it. Signed-off-by: Alex Marginean --- arch/arm/Kconfig| 5 - board/freescale/ls2080a/ls2080a.c | 7 --- board/freescale/ls2080aqds/ls2080aqds.c | 7 --- board/freescale/ls2080ardb

[PATCH v3 5/5] arch: armv8: fsl-layerscape: export serdes config to environment

2020-01-10 Thread Alex Marginean
serdes_init function because it depends on U-Boot environment being set up. Signed-off-by: Alex Marginean --- arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 1 + arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 14 + .../armv8/fsl-layerscape/fsl_lsch3_serdes.c | 57 +++ .../include

[PATCH v3 4/5] board: fsl: ls1028a: free up arch_misc_init

2020-01-10 Thread Alex Marginean
Currently LS1028A board code uses arch_misc_init to set up the board mux on QDS. Move this code to misc_init_r. This is consistent with LS gen 2 and T series SoCs/boards. Signed-off-by: Alex Marginean --- arch/arm/Kconfig | 1 - board/freescale/ls1028a/ls1028a.c

[PATCH v3 2/5] board: fsl: ls2080a/ls2081a: remove empty arch_misc_init

2020-01-10 Thread Alex Marginean
The arch_misc_init function is empty on LS2 SoCs/boards, remove it. Signed-off-by: Alex Marginean --- arch/arm/Kconfig| 5 - board/freescale/ls2080a/ls2080a.c | 7 --- board/freescale/ls2080aqds/ls2080aqds.c | 7 --- board/freescale/ls2080ardb

[PATCH v3 3/5] board: fsl: ls1088a: remove empty arch_misc_init

2020-01-10 Thread Alex Marginean
The arch_misc_init function is empty on LS108x SoCs/boards, remove it. Signed-off-by: Alex Marginean --- arch/arm/Kconfig | 2 -- board/freescale/ls1088a/ls1088a.c | 7 --- 2 files changed, 9 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 38bf420feb

[PATCH v3 1/5] board: fsl: lx2160a: free up arch_misc_init

2020-01-10 Thread Alex Marginean
Currently LX2 board code uses arch_misc_init to set up the board mux on RDB and QDS. Move this code to misc_init_r. This is consistent with LS gen 2 and T series SoCs/boards. Signed-off-by: Alex Marginean --- arch/arm/Kconfig | 2 -- board/freescale/lx2160a

[PATCH v3 0/5] FSL/Layerscape gen 3: export serdes cfg to env

2020-01-10 Thread Alex Marginean
the protocol on each lane (LS1028 and LS1088). For the others (LS2, LX2) leave the number unchanged. In previous versions for instance LX2 serdes read 9000 instead of 9. This set replaces v2: https://patchwork.ozlabs.org/project/uboot/list/?series=146468 Alex Marginean (5): board: fsl

[PATCH v2] armv8: ls1028a_serdes: add a few missing serdes protocols to supported list

2020-01-10 Thread Alex Marginean
These protocols are supported and functional but they trigger a warning in U-Boot console at boot because they are not on this list. Signed-off-by: Alex Marginean --- Changes in v2: - added one more, 65bb - changed subject This patch replaces v1: https://patchwork.ozlabs.org/patch/1220248

[PATCH] drivers: net: fsl_enetc: fix SXGMII MAC configuration

2020-01-10 Thread Alex Marginean
Separate MAC and serdes configuration, MAC configuration must be applied at each enetc_start() as FLR clears it. This restores traffic for ENETC interfaces in USXGMII mode. Signed-off-by: Alex Marginean --- drivers/net/fsl_enetc.c | 36 +--- 1 file changed, 25

[PATCH] armv8: ls1028a_serdes: add 7777, 9999, 899b to the list of serdes protocols

2020-01-09 Thread Alex Marginean
These protocols are supported and functional but they trigger a warning in U-Boot console at boot because they are not on this list. Signed-off-by: Alex Marginean --- arch/arm/cpu/armv8/fsl-layerscape/ls1028a_serdes.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/cpu/armv8/fsl

[PATCH v2] net: phy: add XFI, USXGMII types to is_10g_interface() helper

2020-01-09 Thread Alex Marginean
The helper is used to reset PHYs on connect and it determines the clause to use (C22/C45) based on interface type. This fixes 'PHY reset timed out' warnings in console for USXGMII/XFI PHYs. Signed-off-by: Alex Marginean --- Changes in v2: - updated helper comment, I missed that in v1

[PATCH] net: phy: add XFI, USXGMII types to is_10g_interface helper

2020-01-08 Thread Alex Marginean
The helper is used to reset PHYs on connect and it determines the clause to use (c22/c45) based on interface type. This fixes 'PHY reset timed out' warnings in console for USXGMII/XFI PHYs. Signed-off-by: Alex Marginean --- include/phy.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion

[PATCH] drivers: net: bcm-sf2: pass -1 to phy_connect()

2019-12-19 Thread Alex Marginean
Passing 0 to PHY connect used to trigger a MDIO scan due to a bug fixed in the meantime. It's unclear if bcm-sf2 wants to connect to PHY @ addr 0 or is scanning the bus, passing -1 here should keep it functional either way. Signed-off-by: Alex Marginean Cc: Jiandong Zheng --- drivers/net/bcm

[PATCH v2] drivers: net: fsl_enetc: Pass on primary MAC address to Linux

2019-12-10 Thread Alex Marginean
Passes on the primary address used by u-boot to Linux. The code does a DT fix-up for ENETC PFs and sets the primary MAC address in IERB. The address in IERB is restored on ENETC PCI functions at FLR. Signed-off-by: Alex Marginean --- The code is called fom ft_board_setup in board/freescale

[PATCH] drivers: net: fsl_enetc: Pass on primary MAC address to Linux

2019-12-10 Thread Alex Marginean
Passes on the primary address used by u-boot to Linux. The code does a DT fix-up for ENETC PFs and sets the primary MAC address in IERB. The address in IERB is restored on ENETC PCI functions at FLR. Signed-off-by: Alex Marginean --- The code is called fom ft_board_setup in board/freescale

[PATCH v2 5/5] arch: armv8: fsl-layerscape: export serdes config to environment

2019-12-04 Thread Alex Marginean
serdes_init function because it depends on U-Boot environment being set up. Signed-off-by: Alex Marginean --- arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 1 + arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 14 ++ .../armv8/fsl-layerscape/fsl_lsch3_serdes.c | 43 +++ 3 files

[PATCH 2/2] drivers: net: phy: aquantia: make it less verbose

2019-12-04 Thread Alex Marginean
The driver now unconditionally prints some information that's not universally useful. Replace printf with debug. Signed-off-by: Alex Marginean --- drivers/net/phy/aquantia.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/net/phy

[PATCH 1/2] drivers: net: phy: aquantia: drop XGMII as a valid system interface proto

2019-12-04 Thread Alex Marginean
Use either USXGMII or XFI in aquantia_set_proto and drop XGMII as a valid protocol configuration. The PHY doesn't support it, it's just used as an alias for one of the other two protocols. Signed-off-by: Florin Chiculita Signed-off-by: Alex Marginean --- Depends on: https

[PATCH v2 2/5] board: fsl: ls2080a/ls2081a: remove empty arch_misc_init

2019-12-04 Thread Alex Marginean
The arch_misc_init function is empty on LS2 SoCs/boards, remove it. Signed-off-by: Alex Marginean --- arch/arm/Kconfig| 5 - board/freescale/ls2080a/ls2080a.c | 7 --- board/freescale/ls2080aqds/ls2080aqds.c | 7 --- board/freescale/ls2080ardb

[PATCH v2 4/5] board: fsl: ls1028a: free up arch_misc_init

2019-12-04 Thread Alex Marginean
Currently LS1028A board code uses arch_misc_init to set up the board mux on QDS. Move this code to misc_init_r. This is consistent with LS gen 2 and T series SoCs/boards. Signed-off-by: Alex Marginean --- arch/arm/Kconfig | 1 - board/freescale/ls1028a/ls1028a.c

[PATCH v2 1/5] board: fsl: lx2160a: free up arch_misc_init

2019-12-04 Thread Alex Marginean
Currently LX2 board code uses arch_misc_init to set up the board mux on RDB and QDS. Move this code to misc_init_r. This is consistent with LS gen 2 and T series SoCs/boards. Signed-off-by: Alex Marginean --- arch/arm/Kconfig | 2 -- board/freescale/lx2160a

[PATCH v2 3/5] board: fsl: ls1088a: remove empty arch_misc_init

2019-12-04 Thread Alex Marginean
The arch_misc_init function is empty on LS108x SoCs/boards, remove it. Signed-off-by: Alex Marginean --- arch/arm/Kconfig | 2 -- board/freescale/ls1088a/ls1088a.c | 7 --- 2 files changed, 9 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 459876b543

[PATCH v2 0/5] FSL/Layerscape gen 3: export serdes cfg to env

2019-12-04 Thread Alex Marginean
/?series=146202 Alex Marginean (5): board: fsl: lx2160a: free up arch_misc_init board: fsl: ls2080a/ls2081a: remove empty arch_misc_init board: fsl: ls1088a: remove empty arch_misc_init board: fsl: ls1028a: free up arch_misc_init arch: armv8: fsl-layerscape: export serdes config

[PATCH v3 3/6] test: dm: add a simple unit test for DSA class

2019-12-03 Thread Alex Marginean
The test pings the local IP address though different ports of a sandbox DSA device. Port traffic is filtered and the test verifies that ping works only on enabled ports. The additional interfaces require MAC addresses, these have been added to sandbox default environment. Signed-off-by: Alex

[PATCH v3 0/6] Introduce DSA Ethernet switch class and Felix driver

2019-12-03 Thread Alex Marginean
comments - Added address/size-cells to LS1028A DT ports node This patch set replaces v2: https://patchwork.ozlabs.org/project/uboot/list/?series=144912 and depends on: https://patchwork.ozlabs.org/project/uboot/list/?series=144907 https://patchwork.ozlabs.org/project/uboot/list/?series=142879 Alex Margi

[PATCH v3 2/6] drivers: net: add a DSA sandbox driver

2019-12-03 Thread Alex Marginean
The DSA sandbox driver is used for DSA unit testing. It implements a simple 4 port switch that uses a very simple tag to identify the ports. The DSA driver comes paired with an Ethernet driver that loops packets back and can selectively filter traffic on DSA switch ports. Signed-off-by: Alex

[PATCH v3 4/6] drivers: net: add Felix DSA switch driver

2019-12-03 Thread Alex Marginean
with the typical network commands like tftp. Signed-off-by: Alex Marginean Tested-by: Michael Walle --- drivers/net/fsl_enetc.h | 5 + drivers/net/mscc_eswitch/Kconfig| 8 + drivers/net/mscc_eswitch/Makefile | 1 + drivers/net/mscc_eswitch/felix_switch.c | 454

[PATCH v3 6/6] configs: ls1028a: enable the Ethernet switch driver in defconfig

2019-12-03 Thread Alex Marginean
The switch driver for LS1028A Ethernet switch is now compiled in for both LS1028A boards. Signed-off-by: Alex Marginean --- configs/ls1028aqds_tfa_SECURE_BOOT_defconfig | 3 ++- configs/ls1028aqds_tfa_defconfig | 3 ++- configs/ls1028ardb_tfa_SECURE_BOOT_defconfig | 3 ++- configs

[PATCH v3 5/6] arm: dts: ls1028a: adds Ethernet switch node and its dependencies

2019-12-03 Thread Alex Marginean
The definition follows the DSA binding in kernel and describes the switch, its ports and PHYs. ENETC PF6 is the 2nd Eth controller linked to the switch on LS1028A, it is not used in U-Boot and was disabled. Signed-off-by: Alex Marginean Tested-by: Michael Walle --- arch/arm/dts/fsl-ls1028a

[PATCH v3 1/6] net: introduce DSA class for Ethernet switches

2019-12-03 Thread Alex Marginean
and they are expected to support the typical networking commands. DSA switches may be cascaded, DSA class code does not currently support this. Signed-off-by: Alex Marginean --- drivers/net/Kconfig| 13 ++ include/dm/uclass-id.h | 1 + include/net/dsa.h | 141 net/Makefile

[U-Boot] [PATCH 3/5] board: fsl: ls1088a: remove empty arch_misc_init

2019-12-03 Thread Alex Marginean
The arch_misc_init function is emtpy on LS108x SoCs/boards, remove it. Signed-off-by: Alex Marginean --- arch/arm/Kconfig | 2 -- board/freescale/ls1088a/ls1088a.c | 7 --- 2 files changed, 9 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 459876b543

[U-Boot] [PATCH 0/5] FSL/Layerscape gen 3: export serdes cfg to env

2019-12-03 Thread Alex Marginean
/cpu/armv8/fsl-layerscape/cpu.c. For LS1028A and LX2 the board_mux_init code is now under misc_init_r. MISC_INIT_R is now enabled for the relavant boards. Alex Marginean (5): board: fsl: lx2160a: free up arch_misc_init board: fsl: ls2080a/ls2081a: remove empty arch_misc_init board: fsl

[U-Boot] [PATCH 5/5] arch: armv8: fsl-layerscape: export serdes config to environment

2019-12-03 Thread Alex Marginean
serdes_init function because it depends on U-Boot environment being set up. Signed-off-by: Alex Marginean --- arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 1 + arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 14 ++ .../armv8/fsl-layerscape/fsl_lsch3_serdes.c | 43 +++ 3 files

[U-Boot] [PATCH 2/5] board: fsl: ls2080a/ls2081a: remove empty arch_misc_init

2019-12-03 Thread Alex Marginean
The arch_misc_init function is emtpy on LS2 SoCs/boards, remove it. Signed-off-by: Alex Marginean --- arch/arm/Kconfig| 5 - board/freescale/ls2080a/ls2080a.c | 7 --- board/freescale/ls2080aqds/ls2080aqds.c | 7 --- board/freescale/ls2080ardb

[U-Boot] [PATCH 4/5] board: fsl: ls1028a: free up arch_misc_init

2019-12-03 Thread Alex Marginean
Currently LS1028A board code uses arch_misc_init to set up the board mux on QDS. Move this code to misc_init_r. This is consistent with LS gen 2 and T series SoCs/boards. Signed-off-by: Alex Marginean --- arch/arm/Kconfig | 1 - board/freescale/ls1028a/ls1028a.c

[U-Boot] [PATCH 1/5] board: fsl: lx2160a: free up arch_misc_init

2019-12-03 Thread Alex Marginean
Currently LX2 board code uses arch_misc_init to set up the board mux on RDB and QDS. Move this code to misc_init_r. This is consistent with LS gen 2 and T series SoCs/boards. Signed-off-by: Alex Marginean --- arch/arm/Kconfig | 2 -- board/freescale/lx2160a

[U-Boot] [PATCH] configs: ls1028aqds: enable mdio muxing by default

2019-12-02 Thread Alex Marginean
LS1028A QDS boards have a MDIO MUX and they require the driver for it for PHYs to work. Signed-off-by: Alex Marginean --- configs/ls1028aqds_tfa_SECURE_BOOT_defconfig | 2 ++ configs/ls1028aqds_tfa_defconfig | 2 ++ 2 files changed, 4 insertions(+) diff --git a/configs

[U-Boot] [PATCH v2] ls1028a: Configure stream IDs for integrated PCI and fix up Linux DT

2019-11-27 Thread Alex Marginean
Hardware comes out of reset with implicit values, but these are outside the accepted range for Layerscape gen 3 chassis spec used on LS1028A. Allocate different IDs and fix up Linux DT to use them. Signed-off-by: Alex Marginean Reviewed-by: Bin Meng --- Changes in v2: - moved code under arm

[U-Boot] [PATCH] ls1028a: Configure stream IDs for integrated PCI and fix up Linux DT

2019-11-27 Thread Alex Marginean
Hardware comes out of reset with implicit values, but these are outside the accepted range for Layerscape gen 3 chassis spec used on LS1028A. Allocate different IDs and fix up Linux DT to use them. Signed-off-by: Alex Marginean --- arch/arm/cpu/armv8/fsl-layerscape/fdt.c | 9 ++ .../asm

[U-Boot] [PATCH] drivers: net: fsl_enetc: register internal MDIO bus

2019-11-25 Thread Alex Marginean
This bus is used to access internal SoC PHYs. These PHYs are configured by the ENETC driver directly, but it's useful to have command line access to this MDIO to debug the system especially when using new external PHYs. Signed-off-by: Alex Marginean --- drivers/net/fsl_enetc.c | 15

[U-Boot] [PATCH v2 6/6] configs: ls1028a: enable the Ethernet switch driver in defconfig

2019-11-25 Thread Alex Marginean
The switch driver for LS1028A Ethernet switch is now compiled in for both LS1028A boards. Signed-off-by: Alex Marginean --- configs/ls1028aqds_tfa_SECURE_BOOT_defconfig | 3 ++- configs/ls1028aqds_tfa_defconfig | 3 ++- configs/ls1028ardb_tfa_SECURE_BOOT_defconfig | 3 ++- configs

[U-Boot] [PATCH v2 3/6] test: dm: add a simple unit test for DSA class

2019-11-25 Thread Alex Marginean
The test pings the local IP address though different ports of a sandbox DSA device. Port traffic is filtered and the test verifies that ping works only on enabled ports. The additional interfaces require MAC addresses, these have been added to sandbox default environment. Signed-off-by: Alex

[U-Boot] [PATCH v2 5/6] arm: dts: ls1028a: adds Ethernet switch node and its dependencies

2019-11-25 Thread Alex Marginean
The definition follows the DSA binding in kernel and describes the switch, its ports and PHYs. ENETC PF6 is the 2nd Eth controller linked to the switch on LS1028A, it is not used in U-Boot and was disabled. Signed-off-by: Alex Marginean Tested-by: Michael Walle --- arch/arm/dts/fsl-ls1028a

[U-Boot] [PATCH v2 4/6] drivers: net: add Felix DSA switch driver

2019-11-25 Thread Alex Marginean
with the typical network commands like tftp. Signed-off-by: Alex Marginean Tested-by: Michael Walle --- drivers/net/fsl_enetc.h | 5 + drivers/net/mscc_eswitch/Kconfig| 8 + drivers/net/mscc_eswitch/Makefile | 1 + drivers/net/mscc_eswitch/felix_switch.c | 454

[U-Boot] [PATCH v2 2/6] drivers: net: add a DSA sandbox driver

2019-11-25 Thread Alex Marginean
The DSA sandbox driver is used for DSA unit testing. It implements a simple 4 port switch that uses a very simple tag to identify the ports. The DSA driver comes paired with an Ethernet driver that loops packets back and can selectively filter traffic on DSA switch ports. Signed-off-by: Alex

[U-Boot] [PATCH v2 0/6] Introduce DSA Ethernet switch class and Felix driver

2019-11-25 Thread Alex Marginean
ries=18 and depends on: https://patchwork.ozlabs.org/project/uboot/list/?series=144907 https://patchwork.ozlabs.org/project/uboot/list/?series=142879 Alex Marginean (6): net: introduce DSA class for Ethernet switches drivers: net: add a DSA sandbox driver test: dm: add a simple unit test

[U-Boot] [PATCH v2 1/6] net: introduce DSA class for Ethernet switches

2019-11-25 Thread Alex Marginean
and they are expected to support the typical networking commands. DSA switches may be cascaded, DSA class code does not currently support this. Signed-off-by: Alex Marginean --- drivers/net/Kconfig| 13 ++ include/dm/uclass-id.h | 1 + include/dsa.h | 140 net/Makefile

[U-Boot] [PATCH v5 1/3] net: mdio-uclass: rename arguments of dm_mdio_phy_connect for clarity

2019-11-25 Thread Alex Marginean
Renamed dm_mdio_phy_connect arguments dev to mdiodev and addr to phyaddr for a bit more clarity and consistency with the following patches. Also use NULL instead of 0 on error return path. Signed-off-by: Alex Marginean --- include/miiphy.h | 6 +++--- net/mdio-uclass.c | 10 +- 2

[U-Boot] [PATCH v5 2/3] net: mdio-uclass: add dm_eth_phy_connect helper function

2019-11-25 Thread Alex Marginean
The function connects an ethernet device to a PHY using DT information. This API is only available for eth devices with an associated device tree node. Signed-off-by: Alex Marginean --- include/miiphy.h | 12 +++ net/mdio-uclass.c | 91 +++ 2

[U-Boot] [PATCH v5 3/3] drivers: net: fsl_enetc: use the new MDIO DM helper functions

2019-11-25 Thread Alex Marginean
Uses the new dm_eth_phy_connect helper to connect to the PHY to simplify the code. Signed-off-by: Alex Marginean --- drivers/net/fsl_enetc.c | 53 +++-- drivers/net/fsl_enetc.h | 1 + 2 files changed, 10 insertions(+), 44 deletions(-) diff --git a/drivers

[U-Boot] [PATCH v5 0/3] Add helper function for linking a DM Eth device to a PHY

2019-11-25 Thread Alex Marginean
into dm_mdio_phy_scan which is also exported - Use interface instead of if_type for consistency - don't use phy pointer if NULL in fsl_enetc code Alex Marginean (3): net: mdio-uclass: rename arguments of dm_mdio_phy_connect for clarity net: mdio-uclass: add dm_eth_phy_connect helper function drivers

[U-Boot] [PATCH v2] configs: ls1028a: enable CMD_DM

2019-11-22 Thread Alex Marginean
Since at least some of the drivers relevant to LS1028A are now following DM, it's useful to have dm command enabled by default. Signed-off-by: Alex Marginean --- Changes in v2: fixed checkpatch warning configs/ls1028aqds_tfa_SECURE_BOOT_defconfig | 1 + configs/ls1028aqds_tfa_defconfig

[U-Boot] [PATCH 4/6] drivers: net: add Felix DSA switch driver

2019-11-21 Thread Alex Marginean
with the typical network commands like tftp. Signed-off-by: Alex Marginean --- drivers/net/fsl_enetc.h | 5 + drivers/net/mscc_eswitch/Kconfig| 8 + drivers/net/mscc_eswitch/Makefile | 1 + drivers/net/mscc_eswitch/felix_switch.c | 453 4 files

[U-Boot] [PATCH 3/6] test: dm: add a simple unit test for DSA class

2019-11-21 Thread Alex Marginean
The test pings the local IP address though different ports of a sandbox DSA device. Port traffic is filtered and the test verifies that ping works only on enabled ports. The additional interfaces require MAC addresses, these have been added to sandbox default environment. Signed-off-by: Alex

[U-Boot] [PATCH 5/6] arm: dts: ls1028a: adds Ethernet switch node and its dependencies

2019-11-21 Thread Alex Marginean
The definition follows the DSA binding in kernel and describes the switch, its ports and PHYs. ENETC PF6 is the 2nd Eth controller linked to the switch on LS1028, it is not used in U-Boot and was disabled. Signed-off-by: Alex Marginean --- arch/arm/dts/fsl-ls1028a-rdb.dts | 36

[U-Boot] [PATCH 6/6] configs: ls1028a: enable the Ethernet switch driver in defconfig

2019-11-21 Thread Alex Marginean
The switch driver for LS1028A Ethernet switch is now compiled in for both LS1028A boards. Signed-off-by: Alex Marginean --- configs/ls1028aqds_tfa_SECURE_BOOT_defconfig | 3 ++- configs/ls1028aqds_tfa_defconfig | 3 ++- configs/ls1028ardb_tfa_SECURE_BOOT_defconfig | 3 ++- configs

[U-Boot] [PATCH 2/6] drivers: net: add a DSA sandbox driver

2019-11-21 Thread Alex Marginean
The DSA sandbox driver is used for DSA unit testing. It implements a simple 4 port switch that uses a very simple tag to identify the ports. The DSA driver comes paired with an Ethernet driver that loops packets back and can selectively filter traffic on DSA switch ports. Signed-off-by: Alex

[U-Boot] [PATCH 1/6] net: introduce DSA class for Ethernet switches

2019-11-21 Thread Alex Marginean
and they are expected to support the typical networking commands. DSA switches may be cascaded, DSA class code does not currently support this. Signed-off-by: Alex Marginean --- drivers/net/Kconfig| 13 ++ include/dm/uclass-id.h | 1 + include/dsa.h | 132 +++ net/Makefile

[U-Boot] [PATCH 0/6] Introduce DSA Ethernet switch class and Felix driver

2019-11-21 Thread Alex Marginean
ver: https://patchwork.ozlabs.org/project/uboot/list/?series=143126=* and depends on: https://patchwork.ozlabs.org/project/uboot/list/?series=142858 https://patchwork.ozlabs.org/project/uboot/list/?series=142879 Alex Marginean (6): net: introduce DSA class for Ethernet switches drivers: net: ad

[U-Boot] [RFC PATCH v3 2/3] arm: dts: ls1028a: add node for the integrated Ethernet switch

2019-11-15 Thread Alex Marginean
Adds a device tree node to ls1028a dtsi that describes the Ethernet switch integrated in LS1028A SoC. Signed-off-by: Alex Marginean --- arch/arm/dts/fsl-ls1028a-rdb.dts | 36 arch/arm/dts/fsl-ls1028a.dtsi| 31 +++ 2 files changed, 67

[U-Boot] [RFC PATCH v3 1/3] drivers: net: Add a driver for the Felix Ethernet switch on NXP LS1028A

2019-11-15 Thread Alex Marginean
, external ports can also be used in basic switching mode too. Signed-off-by: Alex Marginean --- drivers/net/Kconfig | 7 + drivers/net/Makefile| 1 + drivers/net/fsl_enetc.h | 5 + drivers/net/fsl_felix.c | 421 4 files changed, 434 insertions

[U-Boot] [RFC PATCH v3 3/3] configs: ls1028a: enable FSL_FELIX switch driver

2019-11-15 Thread Alex Marginean
Enable by default the driver for the Ethernet switch integrated in the SoC. Signed-off-by: Alex Marginean --- configs/ls1028aqds_tfa_SECURE_BOOT_defconfig | 1 + configs/ls1028aqds_tfa_defconfig | 1 + configs/ls1028ardb_tfa_SECURE_BOOT_defconfig | 1 + configs

[U-Boot] [RFC PATCH v3 0/3] Felix Eth switch driver and questions on DSA switches

2019-11-15 Thread Alex Marginean
work.ozlabs.org/project/uboot/list/?series=142879 Thank you! Alex Marginean (3): drivers: net: Add a driver for the Felix Ethernet switch on NXP LS1028A arm: dts: ls1028a: add node for the integrated Ethernet switch configs: ls1028a: enable FSL_FELIX switch driver arch/arm/dts/fsl-ls10

[U-Boot] [PATCH 3/3] drivers: net: fsl_enetc_mdio: return with time-out if HW is stuck

2019-11-14 Thread Alex Marginean
On some boards MDIO may get stuck if it detects echo on the line. This is a know hardware issue, there is a board fix for it. In case we're running on a board that doesn't have the fix, we don't want to loop here forever and freeze U-Boot. Signed-off-by: Alex Marginean --- drivers/net

[U-Boot] [PATCH 2/3] drivers: net: fsl_enetc: move PCS and PHY config to probe

2019-11-14 Thread Alex Marginean
This reduces the time needed to establish a link as we don't reset the link each time the interface is used. Our Link capabilities do not change at run-time so there is no need to re-apply PHY configuration each time. Signed-off-by: Alex Marginean --- I have these patches on top

[U-Boot] [PATCH 1/3] drivers: net: fsl_enetc: Add 2.5Gbps to supported link speeds

2019-11-14 Thread Alex Marginean
The original code enabled link speeds up to 1Gbps, but the interface can go up to 2.5G, enable that speed to in PHY AN mask. Signed-off-by: Alex Marginean --- I have these patches on top of the following two patch sets, they don't apply cleanly without them: https://patchwork.ozlabs.org/project

[U-Boot] [PATCH v3 04/11] drivers: net: aquantia: add PHY generation information

2019-11-14 Thread Alex Marginean
Uses the data field in phy_driver structure to identify the PHY generation. This is useful for custom configuration as non-generic PHY registers are not 100% compatible between generations. Signed-off-by: Alex Marginean --- drivers/net/phy/aquantia.c | 11 +++ 1 file changed, 11

[U-Boot] [PATCH v3 07/11] drivers: net: aquantia: set SMBus addr based on DT property

2019-11-14 Thread Alex Marginean
Aquantia PHYs have a SMBus interface mostly used for debug. The addresses on this interface are normally set up by PHY firmware, but depending on the board they may end up not being unique. Add an optional DT property used to change SMBus address if needed. Signed-off-by: Alex Marginean

[U-Boot] [PATCH v3 08/11] drivers: net: aquantia: check system interface too when checking for link up

2019-11-14 Thread Alex Marginean
to avoid losing the 1st packet. Signed-off-by: Alex Marginean --- drivers/net/phy/aquantia.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/phy/aquantia.c b/drivers/net/phy/aquantia.c index 151e0ee9e9..7817d3cb8d 100644 --- a/drivers/net/phy/aquantia.c +++ b

[U-Boot] [PATCH v3 09/11] doc: bindings: add bindings document for PHY nodes

2019-11-14 Thread Alex Marginean
It defines that PHY nodes must be children on MDIO bus nodes and defines the only required property in U-Boot, reg. This property along with the example provided are copied over from Linux. Signed-off-by: Alex Marginean --- doc/device-tree-bindings/net/phy.txt | 24 1

[U-Boot] [PATCH v3 03/11] drivers: net: aquantia: use XFI, USXGMII interface types

2019-11-14 Thread Alex Marginean
-off-by: Razvan Ionut Cirjan Signed-off-by: Alex Marginean --- drivers/net/phy/aquantia.c | 47 ++ 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/drivers/net/phy/aquantia.c b/drivers/net/phy/aquantia.c index 465ec2d342..7be1a40608 100644

[U-Boot] [PATCH v3 10/11] doc: bindings: Aquantia PHY node binding

2019-11-14 Thread Alex Marginean
A couple of optional properties have been introduced for Aquantia PHY allowing the driver to set up wiring related configuration points that are otherwise driven by firmware. Signed-off-by: Alex Marginean --- doc/device-tree-bindings/net/aquantia-phy.txt | 25 +++ 1 file changed

[U-Boot] [PATCH v3 06/11] drivers: net: aquantia: set MDI reversal based on DT property

2019-11-14 Thread Alex Marginean
MDI pins up to the RJ45 connector may be reversed on the board and the default PHY configuration applied by firmware may or may not match that. Add an optional DT property to configure MDI reversal for this case. Signed-off-by: Alex Marginean --- drivers/net/phy/aquantia.c | 39

[U-Boot] [PATCH v3 11/11] drivers: net: fsl_enetc: use XFI, USXGMII interface type macros

2019-11-14 Thread Alex Marginean
Apply 10G PCS init for USXGMII, XFI interface types. Signed-off-by: Alex Marginean --- drivers/net/fsl_enetc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/fsl_enetc.c b/drivers/net/fsl_enetc.c index e1713a3337..c94ba240f8 100644 --- a/drivers/net/fsl_enetc.c +++ b/drivers

[U-Boot] [PATCH v3 05/11] drivers: net: aquantia: set up SI protocol based on interface type

2019-11-14 Thread Alex Marginean
If PHY is not ready for data by the time _config is called, reconfigure the PHY system interface to use the proper protocol based on phydev->interface, just in case the defaults set by PHY firmware don't match current configuration. Signed-off-by: Florin Laurentiu Chiculita Signed-off-by: A

[U-Boot] [PATCH v3 01/11] include: phy: define XFI and USXGMII interface types

2019-11-14 Thread Alex Marginean
Drivers currently use XGMII for XFI and USXGMII and, where needed, use other information to identify the actual protocol on the board. With these two defined drivers can now rely on DT phy-mode property. Signed-off-by: Alex Marginean --- include/phy_interface.h | 4 1 file changed, 4

[U-Boot] [PATCH v3 00/11] Add XFI, USXGMII net protocols, use them in Aquantia driver

2019-11-14 Thread Alex Marginean
ncy with the rest of the code. Alex Marginean (11): include: phy: define XFI and USXGMII interface types include: phy: add data field for private driver data drivers: net: aquantia: use XFI, USXGMII interface types drivers: net: aquantia: add PHY generation information drivers: net: aquantia:

[U-Boot] [PATCH v3 02/11] include: phy: add data field for private driver data

2019-11-14 Thread Alex Marginean
This is useful to carry custom information between the driver structure associated with a specific HW and the driver code. Signed-off-by: Alex Marginean --- include/phy.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/phy.h b/include/phy.h index e50f56b6eb..6ace9b3a0c 100644

[U-Boot] [PATCH v4 5/5] drivers: net: fsl_enetc: use the new MDIO DM helper functions

2019-11-14 Thread Alex Marginean
Uses the new dm_eth_phy_connect helper to connect to the PHY to simplify the code. Signed-off-by: Alex Marginean --- drivers/net/fsl_enetc.c | 53 +++-- drivers/net/fsl_enetc.h | 1 + 2 files changed, 10 insertions(+), 44 deletions(-) diff --git a/drivers

[U-Boot] [PATCH v4 2/5] net: mdio-uclass: add dm_eth_phy_connect helper function

2019-11-14 Thread Alex Marginean
The function connects an ethernet device to a PHY using DT information. This API is only available for eth devices with an associated device tree node. Signed-off-by: Alex Marginean --- include/miiphy.h | 12 net/mdio-uclass.c | 72 +++ 2

[U-Boot] [PATCH v4 4/5] doc: bindings: add mdio-handle property to ethernet nodes

2019-11-14 Thread Alex Marginean
Adds an optional mdio-handle property which identifies a MDIO bus which can be scanned to find the relevant PHY. The property is ignored if phy-handle is also present. Signed-off-by: Alex Marginean --- doc/device-tree-bindings/net/ethernet.txt | 2 ++ 1 file changed, 2 insertions(+) diff

[U-Boot] [PATCH v4 3/5] net: mdio-uclass: Add helper functions for scanning the MDIO bus

2019-11-14 Thread Alex Marginean
The patch introduces dm_mdio_phy_scan which is a DM wrapper over phy_find_by_mask. It also updates dm_eth_phy_connect to scan a MDIO bus for PHYs if the ethernet node contains a mdio-handle property. Signed-off-by: Alex Marginean --- include/miiphy.h | 14 net/mdio-uclass.c | 57

[U-Boot] [PATCH v4 1/5] net: mdio-uclass: rename arguments of dm_mdio_phy_connect for clarity

2019-11-14 Thread Alex Marginean
Renamed dm_mdio_phy_connect arguments dev to mdiodev and addr to phyaddr for a bit more clarity and consistency with the following patches. Also use NULL instead of 0 on error return path. Signed-off-by: Alex Marginean --- include/miiphy.h | 6 +++--- net/mdio-uclass.c | 10 +- 2

[U-Boot] [PATCH v4 0/5] Add helper function for linking a DM Eth device to a PHY

2019-11-14 Thread Alex Marginean
several arguments and variables for a bit more clarity and consistency Changes in v2: - Moved MDIO scan code into dm_mdio_phy_scan which is also exported - Use interface instead of if_type for consistency - don't use phy pointer if NULL in fsl_enetc code Alex Marginean (5): net: mdio-uclass

[U-Boot] [PATCH] configs: ls1028a: enable OF_LIBFDT_OVERLAY

2019-11-14 Thread Alex Marginean
LS1028A QDS board supports multiple combinations of SerDes protocols and multiple add-on cards with Ethernet PHYs. Some of them require specific configuration in Linux DT, and the plan is to use DT overlays for them. Signed-off-by: Alex Marginean --- configs

[U-Boot] [PATCH v3 3/5] net: mdio-uclass: Add helper functions for scanning the MDIO bus

2019-11-01 Thread Alex Marginean
The patch introduces dm_mdio_phy_scan which is a DM wrapper over phy_find_by_mask. It also updates dm_eth_phy_connect to scan a MDIO bus for PHYs if the ethernet node contains a mdio-handle property. Signed-off-by: Alex Marginean --- include/miiphy.h | 14 net/mdio-uclass.c | 57

[U-Boot] [PATCH v3 1/5] net: mdio-uclass: rename arguments of dm_mdio_phy_connect for clarity

2019-11-01 Thread Alex Marginean
Renamed dm_mdio_phy_connect arguments dev to mdiodev and addr to phyaddr for a bit more clarity and consistency with the following patches. Also use NULL instead of 0 on error return path. Signed-off-by: Alex Marginean --- include/miiphy.h | 6 +++--- net/mdio-uclass.c | 10 +- 2

[U-Boot] [PATCH v3 5/5] drivers: net: fsl_enetc: use the new MDIO DM helper functions

2019-11-01 Thread Alex Marginean
Uses the new dm_eth_phy_connect helper to connect to the PHY to simplify the code. Signed-off-by: Alex Marginean --- drivers/net/fsl_enetc.c | 52 +++-- drivers/net/fsl_enetc.h | 1 + 2 files changed, 10 insertions(+), 43 deletions(-) diff --git a/drivers

[U-Boot] [PATCH v3 4/5] doc: bindings: add mdio-handle property to ethernet nodes

2019-11-01 Thread Alex Marginean
Adds an optional mdio-handle property which identifies a MDIO bus which can be scanned to find the relevant PHY. The property is ignored if phy-handle is also present. Signed-off-by: Alex Marginean --- doc/device-tree-bindings/net/ethernet.txt | 2 ++ 1 file changed, 2 insertions(+) diff

[U-Boot] [PATCH v3 0/5] Add helper function for linking a DM Eth device to a PHY

2019-11-01 Thread Alex Marginean
and variables for a bit more clarity and consistency Changes in v2: - Moved MDIO scan code into dm_mdio_phy_scan which is also exported - Use interface instead of if_type for consistency - don't use phy pointer if NULL in fsl_enetc code Alex Marginean (5): net: mdio-uclass: rename arguments

[U-Boot] [PATCH v3 2/5] net: mdio-uclass: add dm_eth_phy_connect helper function

2019-11-01 Thread Alex Marginean
The function connects an ethernet device to a PHY using DT information. This API is only available for eth devices with an associated device tree node. Signed-off-by: Alex Marginean --- include/miiphy.h | 12 net/mdio-uclass.c | 72 +++ 2

[U-Boot] [PATCH 2/2] configs: ls1028a: enable CMD_DM

2019-11-01 Thread Alex Marginean
Since at least some of the drivers relevant to LS1028A are now following DM, it's useful to have dm command enabled by default. Signed-off-by: Alex Marginean --- configs/ls1028aqds_tfa_SECURE_BOOT_defconfig | 1 + configs/ls1028aqds_tfa_defconfig | 1 + configs

[U-Boot] [PATCH 1/2] configs: ls1028a: Resync with savedefconfig

2019-11-01 Thread Alex Marginean
Replace ls1028a defconfig files with the output of savedefconfig Signed-off-by: Alex Marginean --- configs/ls1028aqds_tfa_SECURE_BOOT_defconfig | 2 -- configs/ls1028aqds_tfa_defconfig | 2 -- configs/ls1028ardb_tfa_SECURE_BOOT_defconfig | 2 -- configs/ls1028ardb_tfa_defconfig

[U-Boot] [RFC PATCH v2 1/2] drivers: net: Add a driver for the Felix Ethernet switch on NXP LS1028A

2019-08-23 Thread Alex Marginean
, external ports can also be used in basic switching mode too. Signed-off-by: Alex Marginean --- drivers/net/Kconfig | 7 + drivers/net/Makefile| 1 + drivers/net/fsl_enetc.h | 5 + drivers/net/fsl_felix.c | 420 4 files changed, 433 insertions

[U-Boot] [RFC PATCH v2 0/2] Add a driver for the Felix Ethernet switch on NXP LS1028A

2019-08-23 Thread Alex Marginean
edback is welcome, of course :) Thank you! Alex Depends on https://patchwork.ozlabs.org/project/uboot/list/?series=123813 Changes in v2: - added empty _stop function for switch ports, stop is not optional, - added switch port PHYs in RDB board DT - cosmetic fixes Alex M

  1   2   3   >