summaryrefslogtreecommitdiff
path: root/drivers/net
AgeCommit message (Collapse)AuthorFilesLines
2023-02-17cpsw_mdio.c: Use correct reg in cpsw_mdio_get_aliveUlf Samuelsson1-3/+3
cpsw_mdio_get_alive reads the wrong register. See page 2316 in SPRUH73Q AM335x TRM Signed-off-by: Ulf Samuelsson <ulf@emagii.com> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Ramon Fried <rfried.dev@gmail.com> Reviewed-by: Siddharth Vadapalli <s-vadapalli@ti.com>
2023-02-10net: ftmac100: add mii read and write callbacksSergei Antonov3-0/+113
Register mii_bus with read and write callbacks to allow the 'mii' command to work. Use a timeout of 10 ms to wait for the R/W operations to complete. Signed-off-by: Sergei Antonov <saproj@gmail.com> Reviewed-by: Rick Chen <rick@andestech.com> Tested-by: Rick Chen <rick@andestech.com>
2023-02-10net: ftmac100: simplify priv->iobase castingSergei Antonov1-7/+7
Replace 'phys_addr_t iobase' with 'struct ftmac100 *ftmac100' in struct ftmac100_data. It allows to remove casting in a number of places. Since priv->iobase is phys_addr_t, use phys_to_virt() to make a pointer from it. Signed-off-by: Sergei Antonov <saproj@gmail.com> Reviewed-by: Rick Chen <rick@andestech.com>
2023-02-10net: ftmac100: change driver name from nds32_mac to ftmac100Sergei Antonov1-1/+1
So it will be named similarly to the related ftgmac100 driver. The old name 'nds32_mac' is not referred to anywhere in U-Boot. Signed-off-by: Sergei Antonov <saproj@gmail.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Reviewed-by: Rick Chen <rick@andestech.com>
2023-02-10net: dwc_eth_qos: Add Qcom ethernet driver glue layerSumit Garg5-0/+630
The Qualcom ETHQOS hardware supports an RGMII macro which needs to be configured according to following link speeds: - SPEED_1000 - SPEED_100 - SPEED_10 So add a corresponding glue driver to configure RGMII macro. Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-02-10net: dwc_eth_qos: Allow platform to override tx/rx_fifo_szSumit Garg2-6/+14
The GMAC controller on QCS404 SoC (support added by upcoming patch) fails to work with maximum tx/rx_fifo_sz supported by the hardware (16K). So allow platforms to override FIFO size using corresponding DT node properties. Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-02-10net: dwc_eth_qos: Make eqos_get_tick_clk_rate callback optionalSumit Garg1-3/+6
Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-02-10Correct SPL uses of IMX_MODULE_FUSESimon Glass1-1/+1
This converts 6 usages of this option to the non-SPL form, since there is no SPL_IMX_MODULE_FUSE defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-02drivers: net: fsl_ls_mdio: prevent a NULL pointer dereferenceIoana Ciornei1-0/+3
Prevent a NULL pointer dereference in the probe path by checking the return valud of dev_read_addr_ptr() against NULL. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-02-02drivers: net: fsl-mc: do not use multiple blank linesIoana Ciornei1-2/+0
Remove the instances in which we have multiple blank lines. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-02-02drivers: net: fsl-mc: align parameters to the open paranthesisIoana Ciornei1-7/+5
There were some cases in which the function parameters were not aligned to the open paranthesis. Fix those instances. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-02-02drivers: net: fsl-mc: remove explicit castIoana Ciornei1-8/+5
Remove all the explicit casts from the void* returned by calloc. With this we also improve a bit the length of those lines and there is no need to split the assignment. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-02-02drivers: net: fsl-mc: do not prefix decimal values with 0xIoana Ciornei1-6/+6
The fsl-mc driver printed debug information which used the 0x prefix for decimal values. This only confuses anyone looking through the log. Because of this, just remove the prefix and use the "DPXY.<id>" notation which is the standard one for the DPAA2 objects. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-02-02drivers: net: fsl-mc: remove an useless break statementIoana Ciornei1-1/+0
The break statement is just after a goto statement, thus it will not get executed. Just remove it. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-02-02drivers: net: fsl-mc: remove useless assignment of variableIoana Ciornei1-1/+0
The cur_ptr variable is set to the start of the log buffer but then it's not used. Just remove the assignment altogether. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-02-02net: add MV88E6xxx DSA driverTim Harvey3-0/+763
Add a DSA driver for the MV88E6xxx compatible Ethernet switches. Cc: Marek Behún <marek.behun@nic.cz> Cc: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Fabio Estevam <festevam@denx.de>
2023-02-02net: fec: add support for DM_MDIOTim Harvey1-2/+88
Add support for DM_MDIO by registering a UCLASS_MDIO driver and attempting to use it. This is necessary if wanting to use a DSA driver for example hanging off of the FEC MAC. Care is taken to fallback to non DM_MDIO mii bus as several boards define DM_MDIO without having the proper device-tree configuration necessary such as an mdio subnode, a phy-mode prop, and either a valid phy-handle prop or fixed-phy subnode which will cause dm_eth_phy_connect() to fail. Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Fabio Estevam <festevam@denx.de>
2023-02-02net: ksz9477: remove unnecessary xmit and recv functionsTim Harvey1-23/+0
Remove the unnecessary xmit and recv functions. Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Fabio Estevam <festevam@denx.de>
2023-02-02net: ravb: Drop SoC-specific compatible supportMarek Vasut1-6/+0
The current set of U-Boot upstream R-Car Gen3 DTs all contain generic "renesas,etheravb-rcar-gen3" compatible strings, drop the SoC specific compatible string support from U-Boot to reduce size and duplication. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-01-27Merge tag 'xilinx-for-v2023.04-rc1' of ↵Tom Rini1-4/+38
https://source.denx.de/u-boot/custodians/u-boot-microblaze Xilinx chnages for v2023.04-rc1 makefile: - Add multi_dtb_fit dependency clk: - Handle error cases microblaze: - Disable falcon mode and cleanup code around xilinx: - Enable regular expression matching in board_fit_config_name_match() - Fix FRU handling for 0xC1 format - Fix Xilinx legacy format eeprom parsing zynqmp: - Some DT updates/cleanups - Fix IDcode for xck24 - Remove empty mini config files - Add support for k24 versal: - Remove empty mini config files versal_net: - Setup timer when runs in EL3 - Build u-boot.elf for mini configurations zynq-gem: - Add support for new compatible strings - Remove support for Avnet Ultrazedev SOM - Handle SGMII with PCS phy spi: - Add support for gigadevice parts misc: - Remove CONFIG_TARGET_VENUS ifdef - Add missing headers to remove sparse warnings
2023-01-27net: zynq_gem: Wait for SGMII PCS link in zynq_gem_init()Stefan Roese1-3/+33
In our system using ZynqMP with an external SGMII PHY it's necessary to wait for the PCS link and auto negotiation to finish before the xfer starts. Otherwise the first packet(s) might get dropped, resulting in a delay at the start of the ethernet transfers. This is only done when the PHY link is already up, which is done in phy_startup(). As waiting for the PHY link bits via pcsstatus does not make much sense, when the link is not available in general (e.g. no cable connected). This patch adds the necessary code including a minimal delay of 1 ms which fixes problems of dropped first packages. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Michal Simek <michal.simek@amd.com> Cc: Katakam Harini <harini.katakam@amd.com> Cc: Ramon Fried <rfried.dev@gmail.com> Cc: Sean Anderson <sean.anderson@seco.com> Link: https://lore.kernel.org/r/20230125070908.1343256-1-sr@denx.de Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-01-20global: Finish CONFIG -> CFG migrationTom Rini15-118/+118
At this point, the remaining places where we have a symbol that is defined as CONFIG_... are in fairly odd locations. While as much dead code has been removed as possible, some of these locations are simply less obvious at first. In other cases, this code is used, but was defined in such a way as to have been missed by earlier checks. Perform a rename of all such remaining symbols to be CFG_... rather than CONFIG_... Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-20net: phy: mv88e61xx: Finish migration of MV88E61XX_FIXED_PORTSTom Rini2-8/+4
Set the default for MV88E61XX_FIXED_PORTS to 0x0 in Kconfig, and move the comment from code to the help to explain what this does. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-01-20global: Remove unused CONFIG definesTom Rini2-4/+0
Remove some CONFIG symbols and related comments, etc, that are unused within the code itself at this point. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-01-12net: fm: Support loading firmware from a filesystemSean Anderson1-1/+24
This adds a new method to load Fman firmware from a filesystem. This allows users to use regular files instead of hard-coded offsets for the firmware. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-01-12net: fm: Add firmware name parameterSean Anderson2-4/+13
In order to read the firmware from the filesystem, we need a file name. Read the firmware name from the device tree, using the firmware-name property. This property is commonly used in Linux to determine the correct name to use (and can be seen in several device trees in U-Boot). Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-01-10net: zynq_gem: Add support for new compatible str with xlnx prefixMichal Simek1-1/+5
cdns prefix was deprecated and replaced by xlnx one. Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/7d1312d741349451b36558baa3e9132247303992.1670599167.git.michal.simek@amd.com
2023-01-09Merge branch 'next'Tom Rini56-6191/+159
Signed-off-by: Tom Rini <trini@konsulko.com>
2023-01-06Revert "Revert "cmd: pxe_utils: Check fdtcontroladdr in label_boot""Marek Vasut1-1/+1
This reverts commit ed6251187afabf811a5fd49a44ebd61c53c7b378. Superseded by "cmd: pxe_utils: Limit fdtcontroladdr usage to non-fitImage" which is less heavy-handed approach and retains part of the original behavior for non-fitImage. Signed-off-by: Marek Vasut <marex@denx.de> Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
2022-12-23global: Migrate CONFIG_TSEC_TBICR_SETTINGS to CFGTom Rini1-4/+4
Perform a simple rename of CONFIG_TSEC_TBICR_SETTINGS to CFG_TSEC_TBICR_SETTINGS Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23global: Migrate CONFIG_SH_ETHER_USE_PORT to CFGTom Rini1-3/+3
Perform a simple rename of CONFIG_SH_ETHER_USE_PORT to CFG_SH_ETHER_USE_PORT Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23global: Migrate CONFIG_SH_ETHER_PHY_ADDR to CFGTom Rini1-3/+3
Perform a simple rename of CONFIG_SH_ETHER_PHY_ADDR to CFG_SH_ETHER_PHY_ADDR Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23global: Migrate CONFIG_SH_ETHER_CACHE_WRITEBACK to CFGTom Rini1-1/+1
Perform a simple rename of CONFIG_SH_ETHER_CACHE_WRITEBACK to CFG_SH_ETHER_CACHE_WRITEBACK Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23global: Migrate CONFIG_SH_ETHER_CACHE_INVALIDATE to CFGTom Rini1-1/+1
Perform a simple rename of CONFIG_SH_ETHER_CACHE_INVALIDATE to CFG_SH_ETHER_CACHE_INVALIDATE Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23global: Migrate CONFIG_SH_ETHER_ALIGNE_SIZE to CFGTom Rini2-10/+10
Perform a simple rename of CONFIG_SH_ETHER_ALIGNE_SIZE to CFG_SH_ETHER_ALIGNE_SIZE Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23global: Migrate CONFIG_PHY_ET1011C_TX_CLK_FIX to CFGTom Rini1-1/+1
Perform a simple rename of CONFIG_PHY_ET1011C_TX_CLK_FIX to CFG_PHY_ET1011C_TX_CLK_FIX Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23global: Migrate CONFIG_KSNET_SERDES_SGMII_BASE to CFGTom Rini1-1/+1
Perform a simple rename of CONFIG_KSNET_SERDES_SGMII_BASE to CFG_KSNET_SERDES_SGMII_BASE Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23global: Migrate CONFIG_KSNET_SERDES_SGMII2_BASE to CFGTom Rini1-1/+1
Perform a simple rename of CONFIG_KSNET_SERDES_SGMII2_BASE to CFG_KSNET_SERDES_SGMII2_BASE Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23global: Migrate CONFIG_KSNET_SERDES_LANES_PER_SGMII to CFGTom Rini1-2/+2
Perform a simple rename of CONFIG_KSNET_SERDES_LANES_PER_SGMII to CFG_KSNET_SERDES_LANES_PER_SGMII Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23global: Migrate CONFIG_FEC_MXC_PHYADDR to CFGTom Rini1-2/+2
Perform a simple rename of CONFIG_FEC_MXC_PHYADDR to CFG_FEC_MXC_PHYADDR Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-22net: nuvoton: fix build broken for use phy_get_interface_by_nameJim Liu1-4/+4
The original patch is use phy_get_interface_by_name to set interface. The new patch is use dev_read_phy_mode to replace it. Signed-off-by: Jim Liu <JJLIU0@nuvoton.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2022-12-22net: vsc9953: Remove this driverTom Rini3-2758/+0
No platforms enable this driver as there's no T1040D4RDB nor T1040RDB support at this time. Remove. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-22net: Remove more legacy functionsTom Rini1-1/+0
Remove some of the board and arch specific non-DM_ETH helper code. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-22arm: ti814x: Remove remaining support codeTom Rini1-4/+0
When the ti814x_evm config was removed most, but not all, of the relevant support code was remove. Get rid of what was missed. Fixes: 50b532686849 ("ti814x: Remove platform") Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-22Convert CONFIG_KSNET_NETCP_V1_0 et al to KconfigTom Rini1-0/+13
This converts the following to Kconfig: CONFIG_KSNET_NETCP_V1_0 CONFIG_KSNET_NETCP_V1_5 Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-22global: Remove unused CONFIG symbolsTom Rini2-11/+0
This removes the following unreferenced CONFIG symbols: CONFIG_FDTADDR CONFIG_FDTFILE CONFIG_FLASH_SECTOR_SIZE CONFIG_FSL_CPLD CONFIG_HDMI_ENCODER_I2C_ADDR CONFIG_I2C_MVTWSI CONFIG_I2C_RTC_ADDR CONFIG_IRAM_END CONFIG_IRAM_SIZE CONFIG_KSNET_MDIO_PHY_CONFIG_ENABLE CONFIG_L1_INIT_RAM CONFIG_MACB_SEARCH_PHY CONFIG_MIU_2BIT_21_7_INTERLEAVED CONFIG_MTD_NAND_VERIFY_WRITE CONFIG_MVGBE_PORTS CONFIG_NETDEV CONFIG_NUM_DSP_CPUS CONFIG_PHY_BASE_ADR CONFIG_PHY_INTERFACE_MODE CONFIG_PSRAM_SCFG CONFIG_RAMBOOT_SPIFLASH CONFIG_RAMBOOT_TEXT_BASE CONFIG_RD_LVL CONFIG_ROCKCHIP_SDHCI_MAX_FREQ CONFIG_SETUP_INITRD_TAG CONFIG_SH_QSPI_BASE CONFIG_SMDK5420 CONFIG_SOCRATES CONFIG_SPI_ADDR CONFIG_SPI_FLASH_QUAD CONFIG_SPI_FLASH_SIZE CONFIG_SPI_HALF_DUPLEX CONFIG_SPI_N25Q256A_RESET CONFIG_TEGRA_SLINK_CTRLS CONFIG_TPM_TIS_BASE_ADDRESS CONFIG_UBOOT_SECTOR_COUNT CONFIG_UBOOT_SECTOR_START CONFIG_VAR_SIZE_SPL CONFIG_VERY_BIG_RAM And also: BL1_SIZE PHY_NO RESERVE_BLOCK_SIZE Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-22Convert CONFIG_FLASH_SPANSION_S29WS_N et al to KconfigTom Rini1-0/+13
This converts the following to Kconfig: CONFIG_FLASH_SPANSION_S29WS_N CONFIG_FLASH_VERIFY CONFIG_FSL_FM_10GEC_REGULAR_NOTATION CONFIG_FSL_ISBC_KEY_EXT CONFIG_FSL_TRUST_ARCH_v1 CONFIG_FSL_SDHC_V2_3 CONFIG_MAX_DSP_CPUS CONFIG_MIU_2BIT_INTERLEAVED CONFIG_SERIAL_BOOT CONFIG_SPI_BOOTING CONFIG_X86EMU_RAW_IO Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-22fec_mxc: Remove CONFIG_FEC_FIXED_SPEED supportTom Rini1-4/+0
This option is only used on one platform currently. However, with PHYLIB enabled, which this platform also does, this option is not checked and the functional use case is handled. Remove this code. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-22Convert CONFIG_DM9000_BYTE_SWAPPED et al to KconfigTom Rini1-0/+12
This converts the following to Kconfig: CONFIG_DM9000_BYTE_SWAPPED CONFIG_DM9000_NO_SROM CONFIG_DM9000_USE_16BIT CONFIG_DM9000_DEBUG CONFIG_MXC_GPT_HCLK CONFIG_NAND_6BYTES_OOB_FREE_10BYTES_ECC Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-21Merge tag 'v2023.01-rc4' into nextTom Rini1-1/+1
Prepare v2023.01-rc4 Signed-off-by: Tom Rini <trini@konsulko.com>