summaryrefslogtreecommitdiff
path: root/drivers/net
AgeCommit message (Collapse)Author
2025-02-26net: designware: Drop NULL priv assignmentMarek Vasut
This is unnecessary, the unset structure member is initialized to NULL by default, drop the assignment. Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-02-26net: sh_eth: Drop empty init callbackMarek Vasut
The init function does nothing, the bb_miiphy_init() already checks whether the .init callback is assigned, and if not, skips calling it. Remove the empty init function. The entire init callback will be removed in follow up patches. Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-02-26net: ravb: Drop empty init callbackMarek Vasut
The init function does nothing, the bb_miiphy_init() already checks whether the .init callback is assigned, and if not, skips calling it. Remove the empty init function. The entire init callback will be removed in follow up patches. Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-02-24Merge tag 'v2025.04-rc3' into nextTom Rini
Prepare v2025.04-rc3
2025-02-19net: dwc_eth_qos_rockchip: Fix disable of RX/TX delay for RK3588Jonas Karlman
When rgmii-rxid/txid/id phy-mode is used the MAC should not add RX and/or TX delay. Currently RX/TX delay is configured as enabled using zero as delay value for the rgmii-rxid/txid/id modes. Change to disable RX and/or TX delay and using zero as delay value. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-02-19net: dwc_eth_qos_rockchip: Fix disable of RX/TX delay for RK356xJonas Karlman
When rgmii-rxid/txid/id phy-mode is used the MAC should not add RX and/or TX delay. Currently RX/TX delay is configured as enabled using zero as delay value for the rgmii-rxid/txid/id modes. Change to disable RX and/or TX delay and using zero as delay value. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-02-18net: designware: Add npcm8xx sgmii pcs supportJim Liu
The PCS exists only in GMAC1 and relates to SGMII interface and is used to control the SGMII PHY. Signed-off-by: Jim Liu <JJLIU0@nuvoton.com> [trini: Adjust slightly for white space and to move 'start' to within if block]
2025-02-10net: designware: support phy io micro voltage setting.Michael Chang
Support phy io micro voltage setting for NPCM8XX rgmii interface. Signed-off-by: Michael Chang <zhang971090220@gmail.com>
2025-02-04net: miiphybb: Update debug() printMarek Vasut
Update the debug() print, use __func__ to always print matching function name, and also print bus name in case there are multiple busses. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
2025-02-04net: miiphybb: Convert ifdef DEBUG to debug()Marek Vasut
Replace ifdeffery with plain debug() function call. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
2025-01-31net: mediatek: fix coding style of AN8855 switch driverWeijie Gao
This patch fixed the following coding style suggested by checkpatch.pl: 1. Use tab instead of space 2. Use BIT() instead of << 3. Use mdelay for long time delay 4. Remove useless parenthesises Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2025-01-30net: phy: Add RGMII RX/TX delay handling to DP83822 PHYMarek Vasut
The TI DP83822 does have support for configurable RGMII RX/TX clock shift, add support for parsing DT properties which describe the RX/TX clock shift configuration and configuration of the matching bits in RCSR register. The shift is only configurable on DP83822, the other PHYs supported by this PHY driver, namely DP83825/DP83826 variants, do not implement this functionality and the RCSR bits used to configure the clock shift are missing from those PHYs. The shift is configurable separately for RX and TX path. Each path can either enable the shift or disable the shift using single bit. In case the shift is disabled, a delay of 0ns is added to the path, otherwise a delay of 3.5ns is added to the path. Note that the two RCSR bits 11 and 12 have inverted logic, RCSR bit 12 enables RX internal shift when SET, while RCSR bit 11 enables TX shift when UNSET. Signed-off-by: Marek Vasut <marex@denx.de>
2025-01-29net: ravb: Staticize bb_miiphy functionsMarek Vasut
These functions can be static as they are referenced only in this file. Make them static. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
2025-01-29net: miiphybb: configs: Drop CONFIG_BITBANGMII_MULTIMarek Vasut
It seems that every remaining system which enables BITBANGMII also enables BITBANGMII_MULTI . Remove the BITBANGMII_MULTI symbol and assume it is always enabled. This allows removal of a bit of legacy code. No functional change intended. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
2025-01-27net: fsl_enetc: Enable optional ENETREF clock on i.MX95Marek Vasut
The ENETCv4 port DT nodes on i.MX95 may contain optional clock phandle to IMX95_CLK_ENETREF "ref" clock. These "ref" clock must be enabled for the ethernet to work. These "ref" clock are enabled after cold boot, but when the system booted Linux and rebooted, those "ref" clock might have been disabled in the process, which would make ethernet inoperable after reboot. Make sure those "ref" clock are always correctly enabled. Signed-off-by: Marek Vasut <marex@denx.de>
2025-01-23Merge tag 'u-boot-socfpga-next-20250124' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-socfpga 1. Bug fixed for doorbell in secure device manager mailbox driver 2. Enhancement on SoCFPGA dwc_eth_xgmac driver 3. Enhancement on DW MAC driver 4. Improved the error message and status for SoC64 device FPGA configuration driver 5. Updated existing watchdog in system manager to support new SM device
2025-01-24net: dwc_eth_xgmac_socfpga: Add support for distinct mac-mode and phy mode.Boon Khai Ng
This patch adds support for configuring the ethernet MAC mode independently from the PHY mode on our SoC FPGA board. Specifically, this is necessary for a scenario where the ethernet controller MAC is connected to the FPGA HVIO with a different GMII interface, and the FPGA output is routed to the PHY using a RGMII interface. To support this configuration, a mechanism is introduced to handle separate MAC mode settings, ensuring that the MAC controller and PHY can operate correctly with their respective interface modes. If mac-mode is not defined, the MAC mode will default to the PHY mode, ensuring compatibility and proper operation between the MAC and PHY. Signed-off-by: Boon Khai Ng <boon.khai.ng@intel.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@intel.com>
2025-01-24net: dwc_eth_xgmac: Add device name for the error message.Boon Khai Ng
Agilex5 having several ethernet instance, adding the device name at the error message to differentiate between which instance is having issue. Signed-off-by: Boon Khai Ng <boon.khai.ng@intel.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@intel.com>
2025-01-24net: dwc_eth_xgmac_socfpga: Add support for rgmii-id mode.Boon Khai Ng
An issue was identified where selecting the phy-mode as rgmii-id in the device tree source (DTS) would cause the `dwc_eth_xgmac_socfpga` driver to raise an unsupported phy mode error. From the MAC controller's perspective, the rgmii and rgmii-id phy modes are effectively identical. To address this, both modes will now be configured to rgmii in the MAC controller. This change ensures that the rgmii-id phy mode is properly supported without error. Signed-off-by: Boon Khai Ng <boon.khai.ng@intel.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@intel.com>
2025-01-24net: designware: socfpga: Add RGMII-ID supportRufus Segar
This patch adds support for the "rgmii-id", "rgmii-rxid", and "rgmii-txid" modes for the dwmac_socfpga driver. Signed-off-by: Rufus Segar <rhs@riseup.net>
2025-01-23Merge patch series "MediaTek ethernet driver refactor and updates"Tom Rini
Weijie Gao <weijie.gao@mediatek.com> says: This patch series will split the switch initialization code from mtk_eth driver into their own files and then add new SoC and switch support. Link: https://lore.kernel.org/r/cover.1736498083.git.weijie.gao@mediatek.com
2025-01-23Merge patch series "Add bitbang feature for npcm8xx and driver"Tom Rini
Michael Chang <zhang971090220@gmail.com> says: I am resubmitting the patch titled "Add bitbang feature for npcm8xx and driver" for review and inclusion in the upstream project. Driver didn't support bitbang feature. Add bb_miiphy_bus function for driver and open feature for npcm8xx the log is as below: ------------------------------------------------- U-Boot 2024.10-g30b9cdaf2df5-dirty (Jan 09 2025 - 00:57:37 +0000) CPU-0: NPCM845 A1 @ Model: Nuvoton npcm845 Development Board (Device Tree) DRAM: 1 GiB RNG: NPCM RNG module bind OK OTP: NPCM OTP module bind OK AES: NPCM AES module bind OK SHA: NPCM SHA module bind OK I/TC: Reserved shared memory is enabled I/TC: Dynamic shared memory is enabled I/TC: Normal World virtualization support is disabled I/TC: Asynchronous notifications are disabled Core: 649 devices, 28 uclasses, devicetree: separate WDT: Not starting watchdog@901c MMC: sdhci@f0842000: 0 Loading Environment from SPIFlash... SF: Detected w25q512jvq with page size 256 Bytes, erase size 64 KiB, total 64 MiB OK In: serial@0 Out: serial@0 Err: serial@0 Net: eth0: eth@f0802000, eth1: eth@f0804000, eth3: eth@f0808000 Hit any key to stop autoboot: 0 U-Boot> U-Boot> U-Boot>setenv ipaddr 192.168.16.3 U-Boot>ping 192.168.16.12 eth@f0802000 Waiting for PHY auto negotiation to complete ......... TIMEOUT ! Could not initialize PHY eth@f0802000 eth@f0804000 Waiting for PHY auto negotiation to complete ......... TIMEOUT ! Could not initialize PHY eth@f0804000 Speed: 100, full duplex Using eth@f0808000 device host 192.168.16.12 is alive Link: https://lore.kernel.org/r/20250117104540.1580343-1-zhang971090220@gmail.com
2025-01-23net: designware: Add bitbang feature for designware driver.Michael Chang
Add bb_miiphy_bus function for designware bitbang feature. Signed-off-by: Jim Liu <JJLIU0@nuvoton.com> Signed-off-by: Michael Chang <zhang971090220@gmail.com>
2025-01-23net: mediatek: add support for Airoha AN8855 ethernet switchWeijie Gao
Airoha AN8855 is a 5-port gigabit switch with a 2.5G HSGMII CPU port Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2025-01-23net: mediatek: add support for MediaTek MT7987 SoCWeijie Gao
This patch adds support for MediaTek MT7987. MT7987 features MediaTek NETSYS v3, similar to MT7988, features three GMACs which support 2.5Gb HSGMII. One 2.5Gb PHY is also embedded an can be connected to a dedicated GMAC. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2025-01-23net: mediatek: split ethernet switch code from mtk_eth.cWeijie Gao
mtk_eth.c contains not only the ethernet GMAC/DMA driver, but also some ethernet switch initialization code. As we may add more switch support in the future, it's better to move them out of mtk_eth.c to avoid increasing the code complexity. Since not all switches are supported for a particular board, Kconfig options are added to allow user to select which switch should be built into u-boot. If multiple switches are selected, auto-detecting can also be enabled. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2025-01-20net: fsl_enetc: Update enetc driver to support i.MX95Alice Guo
i.MX95 uses enetc version 4.1 controller. Update the enetc for i.MX95. Add ARM-specific cache handling and i.MX95 specific register layout handling. Signed-off-by: Alice Guo <alice.guo@nxp.com> Signed-off-by: Marek Vasut <marex@denx.de> # Clean up Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Tim Harvey <tharvey@gateworks.com>
2025-01-20net: fsl_enetc: add i.MX95 EMDIO supportAlice Guo
The verdor ID and device ID of i.MX95 EMDIO are different from LS1028A EMDIO, so add new vendor ID and device ID to pci_device_id table to support i.MX95 EMDIO. Signed-off-by: Alice Guo <alice.guo@nxp.com> Signed-off-by: Marek Vasut <marex@denx.de> # Clean up Signed-off-by: Ye Li <ye.li@nxp.com>
2025-01-20net: fsl_enetc: Add initial netc-blk-ctrl driver supportMarek Vasut
The netc-blk-ctrl driver is used to configure Integrated Endpoint Register Block (IERB) and Privileged Register Block (PRB) of NETC. For i.MX platforms, it is also used to configure the NETCMIX block. The IERB contains registers that are used for pre-boot initialization, debug, and non-customer configuration. The PRB controls global reset and global error handling for NETC. The NETCMIX block is mainly used to set MII protocol and PCS protocol of the links, it also contains settings for some other functions. Note the IERB configuration registers can only be written after being unlocked by PRB, otherwise, all write operations are inhibited. A warm reset is performed when the IERB is unlocked, and it results in an FLR to all NETC devices. Therefore, all NETC device drivers must be probed or initialized after the warm reset is finished. Ported from Linux 6.13-rc as of commit fe5ba6bf91b3 ("net: enetc: add initial netc-blk-ctrl driver support") Signed-off-by: Marek Vasut <marex@denx.de>
2025-01-20net: fsl_enetc: Pass udevice pointer to accessorsMarek Vasut
Pass struct udevice * into the register accessors, so the accessors can reach driver data, which contain device specific register offsets. Signed-off-by: Marek Vasut <marex@denx.de>
2025-01-20net: fsl_enetc: Introduce driver dataMarek Vasut
Introduce driver data for each PCI device. The driver data carry offsets of registers which differ between different SoCs. Signed-off-by: Marek Vasut <marex@denx.de>
2025-01-20net: fsl_enetc: Split register accessorsMarek Vasut
Split register accessors to the port base/station interface/port/mac registers as those are at different offsets on different SoCs. This is a preparatory patch which will allow addition of adjusted offsets for new SoCs easily. Signed-off-by: Marek Vasut <marex@denx.de>
2025-01-20net: fsl_enetc: Inline register accessorsMarek Vasut
Move register accessors from header files and turn them into proper inline functions, so typechecking can be done on them. Drop no longer enetc_port_regs() and unused enetc_read() and enetc_bdr_read(). Signed-off-by: Marek Vasut <marex@denx.de>
2025-01-20net: fsl_enetc: Introduce enetc_dev_id()Marek Vasut
Introduce mapping function enetc_dev_id(), which converts PCIe BDF of the ENETC into linear incrementing index usable e.g. as interface index. This replaces the current ad-hoc calculation used in the code with a dedicated function. No functional change. Signed-off-by: Marek Vasut <marex@denx.de>
2025-01-20net: fsl_enetc: Rename the driver and related structuresMarek Vasut
Rename the current driver structure and matching ops and PCI IDs and add _ls suffix to indicate this content is LS specific. This is done in preparation for addition of i.MX95 ENETCv4 which will require slightly different structure content. Signed-off-by: Marek Vasut <marex@denx.de>
2025-01-20net: fsl_enetc: Pass udevice pointer into enetc_enable_si_port()Marek Vasut
Pass udevice pointer into enetc_enable_si_port() so tests like enetc_is_ls1028a() an be used in the function. No functional change. Signed-off-by: Marek Vasut <marex@denx.de>
2025-01-20net: fsl_enetc: Fold DT MAC address update into enetc_set_ierb_primary_mac()Marek Vasut
The entire content of the loop can be folded into enetc_set_ierb_primary_mac(), do it. This changes the behavior slightly such that the DT is only updated in case of a LS1028A, which is the only SoC with ethernet MAC path in DT matching "/soc/pcie@1f0000000/ethernet@%x,%x" anyway, so this slight change should have no impact. Signed-off-by: Marek Vasut <marex@denx.de>
2025-01-20net: fsl_enetc: Remove ifdef around enetc_set_ierb_primary_mac()Marek Vasut
Use enetc_is_ls1028() instead of ifdef around enetc_set_ierb_primary_mac() and clean up the function. No functional change intended. Signed-off-by: Marek Vasut <marex@denx.de>
2025-01-20net: fsl_enetc: Introduce enetc_is_ls1028a()Marek Vasut
Introduce accurate test for LS1028A compatibility based both on IS_ENABLED(CONFIG_ARCH_LS1028A) and PCI vendor ID. This is done in preparation for adding ENETCv4 support, which has a different PCI vendor ID. Signed-off-by: Marek Vasut <marex@denx.de>
2025-01-01net: phy: Add driver for Motorcomm YT8521S Gigabit ethernet phyFrank Sae
Add driver for Motorcomm YT8521S Gigabit ethernet phy. Signed-off-by: Frank Sae <Frank.Sae@motor-comm.com>
2025-01-01net: phy: Add driver for Motorcomm YT8531S Gigabit ethernet phyFrank Sae
Add driver for Motorcomm YT8531S Gigabit ethernet phy. Signed-off-by: Frank Sae <Frank.Sae@motor-comm.com>
2025-01-01Bitbanging MDIO driver for DM framework.Markus Gothe
Linux DTS compatible MDIO bitbanging driver. Both clause 22 and clause 45 MDIO supported and validated. Heavily based on the Linux drivers (more or less the same code base). Signed-off-by: Markus Gothe <markus.gothe@genexis.eu>
2025-01-01Revert "net: phy: marvell 88e151x: Fix handling of bare RGMII interface type"Rufus Segar
This reverts commit 431be621c6cbc72efd1d45fa36686a682cbb470a. Section 3.3 of Reduced Gigabit Media Independent Interface (RGMII) Version 2.0 (4/1/2002) details that a PHYs using a ~2ns internal delay are referred to as RGMII-ID. This internal delay is optional. Page 147-148 of the Marvell Doc. No. MV-S107146-U0 Rev. F details timings of the RX/TX delays. We see that with the TX/RX_CLK delay enabled, our RX/TX_CTL signal is shifted w.r.t CLK to reflect the delay added. In 431be62 there is no timing difference between RGMII and RGMII-ID, and so programmers wanting to explicitly set their PHY to RGMII will find that delay added anyway. This could throw off timing if that internal delay is undesired. We should be handling all 4 possible RGMII cases of PHY_INTERFACE_MODE: RGMII, RGMII_ID, RGMII_TXID, and RGMII_RXID. Reverting 431be62 implements this. See also m88e1111_config_init_rgmii_delays in the equivalent driver in Linux (drivers/net/phy/marvell.c), which does not set these delays in RGMII mode. 68e6eca was tested out on an 88E1512 PHY in RGMII-ID mode. This reversion has been tested by myself on an 88E1518 in RGMII-ID mode. This patch affects boards using this driver in "rgmii" mode, as the internal delay will no longer be enabled. Namely kikwood-nsa310s. Signed-off-by: Rufus Segar <rhs@riseup.net>
2024-12-31Merge patch series "Cumulative fixes and updates for MediaTek ethernet driver"Tom Rini
Weijie Gao <weijie.gao@mediatek.com> says: This patch series contains fixes and updates for mtk_eth driver. Link: https://lore.kernel.org/r/cover.1734406967.git.weijie.gao@mediatek.com
2024-12-31net: mediatek: fix usability with wget commandWeijie Gao
The wget command currently cannot work correctly with mtk_eth driver. This patch fixed this by increase DMA ring size and invalidate ring data after use. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2024-12-31net: mediatek: don't enable GDMA cpu bridge unconditionally for NETSYSv3Weijie Gao
Enable GDMA cpu bridge only when 10Gb interface is enabled for GMAC other than GMAC0, or when MT7988 internal switch is used. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2024-12-31net: mediatek: make sgmii/usxgmii optionalWeijie Gao
Not all platforms supports sgmii and/or usxgmii. So we add Kconfig options for these features and enable them only for supported platforms. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2024-12-31net: mediatek: add support for 10GBASE-RWeijie Gao
This patch adds support for 10GBASE-R interface mode Signed-off-by: Bo-Cun Chen <bc-bocun.chen@mediatek.com> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2024-12-31net: mediatek: fix gmac2 usability for mt7629Weijie Gao
MT7629 need extra setting for gmac2 to work. So additional capability is added for mt7629 to handle this case. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2024-12-31net: mediatek: fix sgmii selection for mt7622Weijie Gao
Unlike other platforms, mt7622 has only one SGMII and it can be attached to either gmac1 or gmac2. So the register field of the sgmii selection differs from other platforms as newer platforms can control each sgmii individually. This patch adds a new capability for mt7622 to handle this case. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>