summaryrefslogtreecommitdiff
path: root/drivers/net
AgeCommit message (Collapse)Author
2024-02-08net: phy: nxp-c45-tja11xx: read PHY the speed from hardwareRadu Pirea (NXP OSS)
Read PHY speed from hardware instead of assuming 100Mbps by default. The TJA1103 works only at 100Mbps, but the driver will support more PHYs. Signed-off-by: "Radu Pirea (NXP OSS)" <radu-nicolae.pirea@oss.nxp.com>
2024-02-08net: phy: nxp-c45-tja11xx: use local definion of featuresRadu Pirea (NXP OSS)
Use a local definition for the PHY features. PHY_100BT1_FEATURES are not defined using the 100BaseT1 bit, so keep this workaround in the driver. Signed-off-by: "Radu Pirea (NXP OSS)" <radu-nicolae.pirea@oss.nxp.com>
2024-02-04net: designware: Reset eth phy before phy connectJonas Karlman
Some ethernet PHY require being reset before a phy-id can be read back on the MDIO bus. This can result in the following message being show on e.g. a Radxa ROCK Pi E v1.21 with a RTL8211F ethernet PHY. Could not get PHY for ethernet@ff540000: addr -1 Add support to designware ethernet driver to reset eth phy by calling the eth phy uclass function eth_phy_set_mdio_bus(). The call use NULL as bus parameter to not set a shared mdio bus reference that would be freed when probe fails. Also add a eth_phy_get_addr() call to try and get the phy addr from DT when DM_MDIO is disabled. This help fix ethernet on Radxa ROCK Pi E v1.21: => mdio list ethernet@ff540000: 1 - RealTek RTL8211F <--> ethernet@ff540000 Reported-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2024-01-31net: phy: motorcomm: configure pad drive strength registerLukasz Tekieli
This ports the pad drive strength register configuration which can be already found in the Linux driver for this PHY. Signed-off-by: Lukasz Tekieli <tekieli.lukasz@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-01-29treewide: Remove clk_freeSean Anderson
This function is a no-op. Remove it. Signed-off-by: Sean Anderson <seanga2@gmail.com> Link: https://lore.kernel.org/r/20231216193843.2463779-3-seanga2@gmail.com
2024-01-29net: sun8i-emac: Add support for fixed-link phyMaksim Kiselev
Make the "phy-handle" property optional, which allows support for a fixed-link phy configuration. Thus if the "phy-handle" is present in a DT, then driver will work as before. Otherwise, phyaddr initialization will not be necessary, as it is not needed in case of a fixed-link config. Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
2024-01-11Merge patch series "net fixes prior lwip"Tom Rini
Maxim Uvarov <maxim.uvarov@linaro.org> says: Add small net fixes prior lwip patches.
2024-01-11driver/net/rtl8139: remove debug printMaxim Uvarov
debug print delays reset of the driver. Finally I see bunch of "rx error FFFF" errors in the screen. CI can not handle many prints. While network works fine there Reproduced with: make CROSS_COMPILE=sh2-linux- r2dplus_defconfig all qemu-system-sh4 -M r2d -nographic -serial null \ -serial mon:stdio -net user,tftp=`pwd` \ -net nic,model=rtl8139 -kernel ./u-boot.bin Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-01-11net/smc911x: fix return from smc911x_sendMaxim Uvarov
return value of smc911x_send is ignored, but on sucesseful send we need return 0 and or error -ETIMEOUT, not opposite. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-12-21global: Drop common.h inclusionTom Rini
In order to make it easier to move on to dropping common.h from code directly, remove common.h inclusion from the rest of the header file which had been including it. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2023-12-19net: Add Amlogic GXL MDIO Mux driverNeil Armstrong
Port the mdio-mux-meson-gxl.c Linux driver introduced in [1], and adapt it to U-Boot. This driver is needed to boot U-Boot with Linux DT since v6.4, since it switched the MDIO mux from the mmio to a proper GXL driver. [1] 9a24e1ff4326 ("net: mdio: add amlogic gxl mdio mux support") Link: https://lore.kernel.org/r/20231213-u-boot-gxl-mdio-mux-v2-1-c56bb02a75ea@linaro.org Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-12-14Merge tag 'xilinx-for-v2024.04-rc1' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-microblaze into next Xilinx changes for v2024.04-rc1 zynqmp: - Introduce Kria specific defconfig - Calculate SPI image location based on boot offset - DT updates zynqmp-clk: - Fix topsw_lsbus_clock for DP axi-enet: - Support older DT binding mailbox: - Add support for multiple mailboxes pcie-xilinx: - Covert driver to newer interface - Enable MMIO region zynq: - dfu updates - Enable capsule update for Antminer S9 - DT updates xilinx_spi: - Add new xfer callback and support runtime fifo depth discovery
2023-12-13net: phy: realtek: Add support for RTL8211F(D)(I)-VD-CGSébastien Szymanski
Add support for the RTL8211F(D)(I)-VD-CG PHY present on the i.MX93 EVK board. Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
2023-12-13net: dwc_eth_qos: add i.MX93 supportSébastien Szymanski
Add support for DWC EQoS MAC on i.MX93. Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2023-12-13net: axi_emac: Use reg property for DMA registersMayuresh Chitale
As per the xlnx,axi-ethernet-1.00.a DT documentation in linux, the AXI DMA registers can be obtained via the reg property or via a separate node for the axistream DMA controller. Currently only the latter is supported, so add support to fetch the DMA controller registers from the "reg" property. Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com> Reviewed-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/20231116164024.139934-1-mchitale@ventanamicro.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-11-20Merge tag 'v2024.01-rc3' into nextTom Rini
Prepare v2024.01-rc3
2023-11-12net: sun8i_emac: Drop DM_GPIO checksSamuel Holland
DM_GPIO is always enable in U-Boot proper for ARCH_SUNXI, and this driver is never enabled in SPL, so the condition is always true. Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
2023-11-10tree-wide: Replace http:// link with https:// link for ti.comNishanth Menon
Replace instances of http://www.ti.com with https://www.ti.com Signed-off-by: Nishanth Menon <nm@ti.com>
2023-11-07fsl_qe: Drop common.hTom Rini
In both include/fsl_qe.h and then also remove common.h from the files which had included fsl_qe.h Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07m68k: Remove CONFIG_FSLDMAFECTom Rini
There are no platforms which enable this feature, so remove it. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-05net: designware: add DMA offset awarenessBaruch Siach
Older DesignWare Ethernet MAC versions that this driver supports can only work with 32-bit DMA source/destination addresses. Some platforms have no physical RAM at the lowest 4GB address space. For these platforms the driver must translate DMA addresses to/from physical memory addresses. Call translation routines so that properly configured platforms can use the DesignWare Ethernet MAC. For platforms using device-tree this usually means adding dma-ranges property to the bus the device node is in. Signed-off-by: Baruch Siach <baruch@tkos.co.il>
2023-11-05net: e1000: Drop e1000_eth_ids[]Bin Meng
e1000_eth_ids holds compatible strings for e1000 devices, but it is meaningless as e1000 is a PCI device and there is no such compatible string assigned to e1000 by the DT bindings community. Drop it. Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-05net: phy: TI DP83869 fix invalid clock delay configurationFrank de Brabander
Setting the clock delay from the device tree settings rx-internal-delay-ps and tx-internal-delay-ps was broken: - The expected value in the device tree is suppose to be a delay in picoseconds, but the driver only allowed an array index. - Driver converted this array index to the actual delay in picoseconds and tried to apply this in the device register. This however is not a valid register value. The actual logic here was reversed, it converted an register representation of the delay to the device tree delay in picoseconds. Only when the internal delays were NOT configured in the device tree and they default value of 7 (=2000ps) was used, a valid value was loaded in the register. Signed-off-by: Frank de Brabander <debrabander@gmail.com>
2023-11-05net: add hifemac_mdio MDIO bus driver for HiSilicon platformYang Xiwen
It adds the driver for the internal MDIO bus of HIFEMAC Ethernet controller. It's based on the mainstream linux driver. Signed-off-by: Yang Xiwen <forbidden405@outlook.com>
2023-11-05net: add hifemac Ethernet driver for HiSilicon platformYang Xiwen
It adds the driver for HIFEMAC Ethernet controller found on HiSilicon SoCs like Hi3798MV200. It's based on the mainstream linux driver, but quite a lot of code gets rewritten and cleaned up to adopt u-boot driver model. Signed-off-by: Yang Xiwen <forbidden405@outlook.com>
2023-11-05net: mv88e6xxx: add Clause 45 supportRobert Marko
Marvell LinkStreet switches support Clause 45 MDIO on the internal bus. C45 read or writes require the register address to be written first to the SMI PHY Data register, and then a special C45 Write Address Register OP is used on the SMI PHY Register before making a C45 Read Data Register OP and being able to actually read the register. Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2023-11-05net: mv88e6xxx: use generic bitfield macros for MDIORobert Marko
Driver is currently defining the mask and bit shifting itself, there is no need for that as U-Boot has generic bitfield macros that help us achieve the same result but in a cleaner way. Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2023-11-05net: ftgmac100: Add reset controlDylan Hung
Add optional reset control, especially for the Aspeed SOC. For the hardware without a reset line, the reset assertion/deassertion will be skipped. Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com> Reviewed-by: Ryan Chen <ryan_chen@aspeedtech.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-11-05net: dw_eth_qos: Add 64-bit addressingLey Foon Tan
Set upper 32bit address for DMA descriptors and buffer address to support 64-bit addressing. Signed-off-by: Ley Foon Tan <leyfoon.tan@starfivetech.com>
2023-10-22sunxi: remove CONFIG_MACPWRAndre Przywara
The CONFIG_MACPWR Kconfig symbol is used to point to a GPIO that enables the power for the Ethernet "MAC" (mostly PHY, really). In the DT this is described with the phy-supply property in the MAC DT node, pointing to a (GPIO controlled) regulator. Since we need Ethernet only in U-Boot proper, and use a DM driver there, we should use the DT instead of hardcoding this. Add code to the sun8i_emac and sunxi_emac drivers to check the DT for that regulator and enable it, at probe time. Then drop the current code from board.c, which was doing that job before. This allows us to remove the MACPWR Kconfig definition and the respective values from the defconfigs. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Sam Edwards <CFSworks@gmail.com>
2023-10-22net: sunxi_emac: chase DT nodes to find PHY regulatorAndre Przywara
At the moment the sun4i EMAC driver relies on hardcoded CONFIG_MACPWR Kconfig symbols to enable potential PHY regulators. As we want to get rid of those, we need to find the regulator by chasing up the DT. The sun4i-emac binding puts the PHY regulator into the MDIO node, which is the parent of the PHY device. U-Boot does not have (and does not need) an MDIO driver, so we need to chase down the regulator through the EMAC node: we follow the "phy-handle" property to find the PHY node, then go up to its parent, where we find the "phy-supply" link to the regulator. Let U-Boot find the associated regulator device, and put that into the private device struct, so we can find and enable the regulator at probe time, later. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Sam Edwards <CFSworks@gmail.com> Reviewed-by: Samuel Holland <samuel@sholland.org>
2023-10-13Merge tag 'xilinx-for-v2024.01-rc1-v3' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-microblaze Xilinx changes for v2024.01-rc1 v3 clk: - remove additional compatible strings for Versal NET net: - zynq_gem: Fix clock calculation for MDC for higher frequencies pinctrl: - core: Extend pinmux status buffere size - zynqmp driver: Show also tristate configuration test: - add test case for pxe get Xilinx: - describe SelectMAP boot mode Zynq: - Fix nand description in DT ZynqMP: - DTS sync patches with kernel and also W=1 related fixes - Add support for KD240, zcu670, e-a2197 with x-prc cards, SC revB/C with i2c description for other SC based boards - k24 psu_init cleanup
2023-10-10net: phy: xilinx_phy: Get rid of using property xlnx, phy-typeVenkatesh Yadav Abbarapu
As the xlnx,phy-type device tree property is deprecated and phy-mode is being used, so removing the code references of xlnx,phy-type. Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> Link: https://lore.kernel.org/r/20231010030436.11854-1-venkatesh.abbarapu@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-10-10drivers: net: fsl-mc: add support for MC reserved memoryLaurentiu Tudor
Add support for declaring in device tree the reserved memory ranges required for MC. Since the MC firmware acts as any DMA master present in the SoC, the reserved memory ranges need also be identity mapped in the SMMU, so create the required 'iommu-addresses' property in the reserved memory nodes. For now this support is used only on LX2160A SoCs. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-10-09net: zynq_gem: Update the MDC clock divisor in the probe functionVenkatesh Yadav Abbarapu
MDC clock change needs to be done when the driver probe function is called as mdio is enabled at probe and not when the ethernet starts. Setup the MDC clock at the probe itself. Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> Link: https://lore.kernel.org/r/20230922045010.22852-1-venkatesh.abbarapu@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-10-07net: dwc_eth_qos_rockchip: Add support for RK3588Jonas Karlman
Add rk_gmac_ops and other special handling that is needed for GMAC to work on RK3588. rk_gmac_ops was ported from linux commits: 2f2b60a0ec28 ("net: ethernet: stmmac: dwmac-rk: Add gmac support for rk3588") 88619e77b33d ("net: stmmac: rk3588: Allow multiple gmac controller") Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-10-07net: dwc_eth_qos: Add glue driver for GMAC on Rockchip RK3568Jonas Karlman
Add a new glue driver for Rockchip SoCs, i.e RK3568, with a GMAC based on Synopsys DWC Ethernet QoS IP. rk_gmac_ops was ported from linux commit: 3bb3d6b1c195 ("net: stmmac: Add RK3566/RK3568 SoC support") Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-10-07net: dwc_eth_qos: Stop spam of RX packet not available messageJonas Karlman
Remove spam of RX packet not available debug messages when waiting to receive a packet. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-10-07net: dwc_eth_qos: Return error code when start failsJonas Karlman
Return error code when phy_connect fails or no link can be established. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-10-07net: dwc_eth_qos: Drop unused rx_pkt from eqos_privJonas Karlman
rx_pkt is allocated and not used for anything, remove it. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-10-02Merge branch 'next'Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2023-09-24common: Drop linux/printk.h from common headerSimon Glass
This old patch was marked as deferred. Bring it back to life, to continue towards the removal of common.h Move this out of the common header and include it only where needed. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-09-22net: sni_netsec: Add workaround for timeout errorRyosuke Saito
The NETSEC GMAC occasionally falls into a weird state where MAC_REG_DESC_SOFT_RST has never been cleared and shows errors like the below when networking commands are issued: => ping 192.168.1.1 ethernet@522d0000 Waiting for PHY auto negotiation to complete... done netsec_wait_while_busy: timeout Using ethernet@522d0000 device ARP Retry count exceeded; starting again ping failed; host 192.168.1.1 is not alive It happens on not only 'ping' but also 'dhcp', 'tftp' and so on. Luckily, restarting the NETSEC GMAC and trying again seems to fix the problematic state. So first ensure that we haven't entered the state by checking MAC_REG_DESC_SOFT_RST to be cleared; otherwise, restarting NETSEC/PHY and trying again would work as a workaround. Signed-off-by: Ryosuke Saito <ryosuke.saito@linaro.org> Tested-by: Masahisa Kojima <masahisa.kojima@linaro.org>
2023-09-21net: phy: xilinx-gmii2rgmii: Removed hardcoded phy address 0 for bridgeTejas Bhumkar
Current code expects bridge phy address at 0 which is not correct expectation because bridge phy address is configurable. That's why update the code to read reg property to figure it out where bridge is and use it in phy creation code. Signed-off-by: Tejas Bhumkar <tejas.arvind.bhumkar@amd.com> Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/20230915045043.4167628-1-tejas.arvind.bhumkar@amd.com
2023-09-21net: axi_emac: Convert to ofnode functionsMaxim Kochetkov
FDT functions is not working when OF_LIVE is enabled. Convert fdt parsing functions to ofnode parsing functions. Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru> Link: https://lore.kernel.org/r/20230811074351.26916-1-fido_max@inbox.ru
2023-09-14net: phy: Remove unused NEEDS_MANUAL_RELOC code bitsMarek Vasut
The last user of the NEEDS_MANUAL_RELOC has been removed in commit 26af162ac8f8 ("arch: m68k: Implement relocation") Remove now unused NEEDS_MANUAL_RELOC code. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-09-14net: miiphybb: Remove unused NEEDS_MANUAL_RELOC code bitsMarek Vasut
The last user of the NEEDS_MANUAL_RELOC has been removed in commit 26af162ac8f8 ("arch: m68k: Implement relocation") Remove now unused NEEDS_MANUAL_RELOC code. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-09-13net: zynq: Use generic_phy_valid() helperJonas Karlman
The documentation for struct phy state that "The content of the structure is managed solely by the PHY API and PHY drivers". Change to use the generic_phy_valid() helper to check if phy is valid. Fixes: 10c50b1facbf ("net: zynq: Add support for PHY configuration in SGMII mode") Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
2023-09-13net: phy: broadcom: add support for BCM54210EMarek Vasut
It's Broadcom PHY simply described as single-port RGMII 10/100/1000BASE-T PHY. It requires disabling delay skew and GTXCLK bits. BCM54210E support ported from Linux kernel commit 0fc9ae1076697 ("net: phy: broadcom: add support for BCM54210E") AUX/SHD/bcm54xx_config_clock_delay update ported from Linux 6.5-rc4 commit 28e219aea0b9e ("net: phy: broadcom: drop brcm_phy_setbits() and use phy_set_bits() instead") Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Rafał Miłecki <rafal@milecki.pl>
2023-09-13net: phy: motorcomm: Add support for YT8511 PHYNicolas Frattaroli
The YT8511 ethernet PHYs can be found on e.g. the SOQuartz or the Quartz64. Add rudimentary support for them. Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>