summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2024-10-29memory: ti-aemif-cs: Compute timing configuration from DT parsingBastien Curutchet
The Linux bindings of the AEMIF offer properties that specify the transaction timings for each chips select. Add parsing of these properties to calculate the chip select's configuration from them and the rate of the AEMIF's reference clock. Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
2024-10-29memory: ti-aemif: Add DM supportBastien Curutchet
The AEMIF's bindings in the Linux tree have a node for the AEMIF controller and then a node for each AEMIF's chip select. This CS node doesn't have a compatible property but describes the timing parameters used by a given chip select. The U-Boot DM framework expects every node to have a 'compatible' property. If no 'compatible' is present in a node, its children won't be parsed by u-boot. Add DM support to the ti-aemif driver. Add a new ti-aemif-cs driver to comply with the Linux bindings and the U-Boot's DM philosophy. This driver handles the timing parameters of an AEMIF's chip select so move aemif_cs_configure() from ti-aemif.c to ti-aemif-cs.c. Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
2024-10-29memory: ti-aemif: Wrap the CS configuration into a functionBastien Curutchet
Wrap the CS configuration into a aemif_configure_cs() to ease its migration to another driver when adding DM support. Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
2024-10-29memory: ti-aemif: Add ARCH_DAVINCI to architectures that uses TI_AEMIFBastien Curutchet
TI_AEMIF configuration doesn't depend on ARCH_DAVINCI while the AEMIF controller is present in the DaVinci SoCs. Add ARCH_DAVINCI to the potential users of the TI_AEMIF driver Add <asm/io.h> to driver's includes to fix build issue on ARCH_DAVINCI Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2024-10-29memory: ti-aemif: Make AEMIF driver architecture agnosticBastien Curutchet
AEMIF controller is present on other SoCs than the Keystone ones. Remove Keystone specificities from the driver to be able to use it from other architectures. Adapt the ks2_evm/board.c to fit the new driver. Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2024-10-29memory: ti-aemif: Correct macro to ensure avoiding precedence issuesBastien Curutchet
Fix following CHECK pointed out by checkpatch: CHECK: Macro argument 'cs' may be better as '(cs)' to avoid precedence issues #62: FILE: drivers/memory/ti-aemif.c:15: +#define AEMIF_CONFIG(cs) (0x10 + (cs * 4)) Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2024-10-29Merge patch series "Support Aspeed SGPIO controller"Tom Rini
Billy Tsai <billy_tsai@aspeedtech.com> says: AST2600 SoC has 2 SGPIO master interfaces one with 128 pins another one with 80 pins, AST2500/AST2400 SoC has 1 SGPIO master interface that supports up to 80 pins. Link: https://lore.kernel.org/r/20241016085955.314236-1-billy_tsai@aspeedtech.com
2024-10-29net: dwc_eth_qos: Remove obsolete imx8 includesErik Schumacher
They were added with commit 0e9d23945ce0 ("net: eqos: implement callbaks to get interface and set txclk rate") but were not removed with commit 5fc783b5d9c9 ("net: dwc_eth_qos: move i.MX code out") when i.MX specific code was moved to a separate file. Signed-off-by: Erik Schumacher <erik.schumacher@iris-sensing.com>
2024-10-29net: dwc_eth_qos_imx: Add platform specific reset for i.MX93Erik Schumacher
The EQOS on i.MX93 fails to finish the reset procedure in RMII mode. This is described in errata ERR051683. This patch implements the provided workaround which sets the PS and FES bits after the SWR is set by using the eqos_fix_soc_reset function. Adapted from linux-kernel commit b536f32b5b03 ("net: stmmac: dwmac-imx: use platform specific reset for imx93 SoCs") Signed-off-by: Erik Schumacher <erik.schumacher@iris-sensing.com>
2024-10-29net: dwc_eth_qos: Add support for platform specific resetErik Schumacher
This patch adds support for optional platform specific reset logic in the dwc_eth_qos driver. This new function 'eqos_fix_soc_reset' is called after the EQOS_DMA_MODE_SWR is set and before the driver waits for this bit to clear. Signed-off-by: Erik Schumacher <erik.schumacher@iris-sensing.com>
2024-10-29ARM: dts: ast2600: Add SGPIO to device treeBilly Tsai
Add SGPIO DTS node and enable them for AST2600 EVB. Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
2024-10-29ARM: dts: ast2500: Add SGPIO to device treeBilly Tsai
Add SGPIO DTS node and enable it for AST2500 EVB. Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
2024-10-29gpio: Add Aspeed SGPIO driverBilly Tsai
The Aspeed SGPIO driver supports the SGPIO controllers found in the AST2400, AST2500 and AST2600 BMC SoCs. The implementation is a cut-down copy of the upstream Linux kernel driver, adapted for u-boot. Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
2024-10-29dm: core: downgrade some dm_warn messages to log_debug()Quentin Schulz
People complained that enabling (SPL_)DM_WARN was now totally unusable due to the amount of messages printed on the console. Let's downgrade the log level of some messages that are clearly not on the error path. Note that there's one pr_debug in there, because it is followed by pr_cont so it made sense to reuse the same family of functions. Reported-by: Alexander Dahl <ada@thorsis.com> Fixes: 6afdb1585112 ("dm: core: migrate debug() messages to use dm_warn") Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-10-29Merge https://source.denx.de/u-boot/custodians/u-boot-shTom Rini
2024-10-29clk: microchip: mpfs: support new syscon based devicetree configurationConor Dooley
Why get a devicetree description wrong once when you can get it wrong twice? The original mistake, which the driver supports was failing to describe the main PLL that the "cfg" and "periph" clocks parented by. The second mistake was describing the "cfg" and "periph" clocks a reg region within the clock controller, rather as two registers within a syscon region that also contains pinctrl, interrupt muxing controls and other functions. Make up for lost time and describe these regions as they should have been originally, preserving support for the existing two configurations for the sake of existing systems with firmware-provided devicetrees. Signed-off-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-10-28mmc: renesas-sdhi: Add compatible string for rzg2l-sdhiPaul Barker
After the recent dts/upstream subtree merge, the sdhi compatible string used in the device tree for RZ/G2L family SoCs is "renesas,rzg2l-sdhi" not "renesas,rcar-gen3-sdhi". This broke the ability to access the eMMC and SD card devices on RZ/G2L boards. Fix this by adding the new compatible string to the sdhi driver. Fixes: 136b7b6d2e98 ("Subtree merge tag 'v6.11-dts' of dts repo [1] into dts/upstream") Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
2024-10-28gpio: dw: Add ngpios DT-property supportMaksim Kiselev
Starting with Linux commit 7569486d79ae ("gpio: dwapb: Add ngpios DT-property support") the "snps,nr-gpios" property was marked as deprecated. And since all newly added dw-apb-gpio nodes are described using generic "ngpios" property, it's time to add support for it. Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-10-27Merge patch series "Implement ACPI on aarch64"Tom Rini
Patrick Rudolph <patrick.rudolph@9elements.com> says: Based on the existing work done by Simon Glass this series adds support for booting aarch64 devices using ACPI only. As first target QEMU SBSA support is added, which relies on ACPI only to boot an OS. As secondary target the Raspberry Pi4 was used, which is broadly available and allows easy testing of the proposed solution. The series is split into ACPI cleanups and code movements, adding Arm specific ACPI tables and finally SoC and mainboard related changes to boot a Linux on the QEMU SBSA and RPi4. Currently only the mandatory ACPI tables are supported, allowing to boot into Linux without errors. The QEMU SBSA support is feature complete and provides the same functionality as the EDK2 implementation. The changes were tested on real hardware as well on QEMU v9.0: qemu-system-aarch64 -machine sbsa-ref -nographic -cpu cortex-a57 \ -pflash secure-world.rom \ -pflash unsecure-world.rom qemu-system-aarch64 -machine raspi4b -kernel u-boot.bin -cpu cortex-a72 \ -smp 4 -m 2G -drive file=raspbian.img,format=raw,index=0 \ -dtb bcm2711-rpi-4-b.dtb -nographic Tested against FWTS V24.03.00. Known issues: - The QEMU rpi4 support is currently limited as it doesn't emulate PCI, USB or ethernet devices! - The SMP bringup doesn't work on RPi4, but works in QEMU (Possibly cache related). - PCI on RPI4 isn't working on real hardware since the pcie_brcmstb Linux kernel module doesn't support ACPI yet. Link: https://lore.kernel.org/r/20241023132116.970117-1-patrick.rudolph@9elements.com
2024-10-27arm: mach-bcm283x: Add ARMV8_MULTIENTRY supportPatrick Rudolph
When ACPI is enabled over FDT the APs cannot be brought out of reset by the OS using the "FDT spin-table" mechanism, as no FDT is provided to the OS. The APs must be released out of reset in u-boot and then brought up in an ACPI compliant fashion. When ARMV8_MULTIENTRY is specified, the APs are released from reset and will enter U-Boot after it has been relocated as well. By default ARMV8_MULTIENTRY is not selected, keeping existing behaviour. TEST: All APs enter U-Boot when run on qemu-system-aarch64 and on real hardware. Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-by: Simon Glass <sjg@chromium.org> Cc: Matthias Brugger <mbrugger@suse.com> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Tom Rini <trini@konsulko.com>
2024-10-27arm: mach-bcm283x: Bring in some header files from tianocoreSimon Glass
These header files presumably duplicate things already in the U-Boot devicetree. For now, bring them in to get the ASL code and ACPI table code to compile. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Matthias Brugger <mbrugger@suse.com> Cc: Matthias Brugger <mbrugger@suse.com> Cc: Peter Robinson <pbrobinson@gmail.com> Cc: Tom Rini <trini@konsulko.com>
2024-10-27drivers/arm: Implement acpi_fill_madtPatrick Rudolph
Fill the MADT table in the GIC driver and armv8 CPU driver to drop SoC specific code. While the GIC only needs devicetree data, the CPU driver needs additional information stored in the cpu_plat struct. While on it update the only board making use of the existing drivers and writing ACPI MADT in mainboard code. TEST: Booted on QEMU sbsa-ref using GICV3 driver model generated MADT. Booted on QEMU raspb4 using GICV2 driver model generated MADT. Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-by: Simon Glass <sjg@chromium.org> Cc: Simon Glass <sjg@chromium.org>
2024-10-27drivers: misc: irq-uclass: Update irq_get_by_indexPatrick Rudolph
Support reading the "interrupts" property from the devicetree in case the "interrupts-extended" property isn't found. As the "interrupts" property is commonly used, this allows to parse all existing FDT and makes irq_get_by_index() more useful. The "interrupts" property doesn't contain a phandle as "interrupts-extended" does, so implement a new method to locate the interrupt-parent called irq_get_interrupt_parent(). TEST: Read the interrupts from the GIC node for ACPI MADT generation. Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-by: Moritz Fischer <moritzf@google.com>
2024-10-27drivers/cpu: Add generic armv8 cpu driverPatrick Rudolph
Add a generic driver that binds to armv8 CPU nodes. The generic driver allows - to enumerate CPUs present in a system, even when no other driver binds it - generates ACPI SSDT code for each CPU - Fill the ACPI MADT table (implemented in a follow up patch) The newly introduced code could also be reused on other CPU drivers that are compatible with armv8. TEST: Booted on QEMU sbsa and verify the driver binds to CPU nodes. Confirmed with FWTS that all ACPI processor devices are present. Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-by: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Cc: Simon Glass <sjg@chromium.org>
2024-10-27drivers: ata: Rename ahci_mvebuPatrick Rudolph
Rename 'ahci_mvebu' to 'ahci_generic' and select it by default. The AHCI driver contains no SoC specific code and only expects the base address to be passed, thus rename it to ahci_generic and add the DT compatible string "generic-ahci". Update existing defconfigs to use the new Kconfig name as well. TEST: Booted on QEMU sbsa using the generic-ahci node. Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-by: Stefan Roese <sr@denx.de> Cc: Tom Rini <trini@konsulko.com> Cc: Stefan Roese <sr@denx.de> Acked-by: Tony Dinh <mibodhi@gmail.com>
2024-10-27drivers: usb: Add generic XHCIPatrick Rudolph
Add support for the generic XHCI driver that contains no SoC specific code. It can be used on platforms that simply work out of the box, like on emulated platforms. TEST: Booted on QEMU sbsa machine using the generic xhci driver. Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-by: Marek Vasut <marex@denx.de> Cc: Tom Rini <trini@konsulko.com> Cc: Marek Vasut <marex@denx.de>
2024-10-27acpi: Add fill_madt to acpi_opsPatrick Rudolph
Add a new method to acpi_ops to let drivers fill out ACPI MADT. The code is unused for now until drivers implement the new ops. TEST: Booted on QEMU sbsa using driver model generated MADT. Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-by: Simon Glass <sjg@chromium.org> Cc: Simon Glass <sjg@chromium.org>
2024-10-27serial: serial_pl01x: Implement .getinfo() for PL01Maximilian Brune
When ACPI is enabled on arm it will use the getinfo function to fill the SPCR ACPI table. Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Reviewed-by: Simon Glass <sjg@chromium.org> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Moritz Fischer <moritzf@google.com>
2024-10-27Merge a patch series to improve dc2114x supportTom Rini
This patch series by Hanyuan Zhao <hanyuan-z@qq.com> provides a number of improvements to the dc2114x driver. Link: https://lore.kernel.org/r/tencent_BD4B002FC63A5F77969D9BD1FFF125371C08@qq.com
2024-10-27Merge patch series "net: ksz9477: add support for KSZ GbE switches using SPI ↵Tom Rini
bus" Romain Naour <romain.naour@smile.fr> says: We are using a custom board where an ethernet switch device KSZ9896 is available. This family of devices can use several types of serial bus as management interface: mdio, i2c or SPI. Due to board design constraints and because we initially planned to use this device only from Linux, the SPI bus was used. Luckily we are using a recent enough u-boot release where KSZ9477 driver is available... but only for the i2c interface. Indeed, unlike the kernel driver, the KSZ9477 driver doesn't use the regmap API to access the underlying bus since the regmap API is limited to direct memory access [1]. Until regmap API with bus support is available in U-boot, we introduced struct ksz_phy_ops to store low-level ksz bus operations (I2C or SPI). This series has been tested on the current master branch (after v2024.10 release). [1] https://source.denx.de/u-boot/u-boot/-/blob/v2024.10-rc5/drivers/core/Kconfig?ref_type=tags#L188 Link: https://lore.kernel.org/r/20241008075435.1572727-1-romain.naour@smile.fr
2024-10-27Merge patch series "Add driver for Motorcomm YT8821 2.5G ethernet phy"Tom Rini
Frank Sae <Frank.Sae@motor-comm.com> says: YT8531 as Gigabit transceiver uses bit15:14(bit9 reserved default 0) as phy speed mask, YT8821 as 2.5 Gigabit transceiver uses bit9 bit15:14 as phy speed mask. Be compatible to YT8821, reform phy speed mask and phy speed macro. Based on update above, add YT8821 2.5G phy driver. Link: https://lore.kernel.org/r/20240912120225.28884-1-Frank.Sae@motor-comm.com
2024-10-27net: recv(): return -EAGAIN instead of 0 when no cleanup is expectedJerome Forissier
Some drivers do not behave properly when free_pkt() is called with a length of zero. It is an issue I observed when developing the lwIP series [1] (see "QEMU CI tests for r2dplus_i82557c, r2dplus_rtl8139" in the change log) and which I fixed incorrectly by not calling free_pkt() when recv() returns 0. That turned out to be wrong for two reasons: 1. The DM documentation [2] clearly requires it: "The **recv** function polls for availability of a new packet. [...] If there is an error [...], return 0 if you require the packet to be cleaned up normally, or a negative error code otherwise (cleanup not necessary or already done). If **free_pkt** is defined, U-Boot will call it after a received packet has been processed [...]. free_pkt() will be called after recv(), for the same packet [...]" 2. The imx8mp_evk platform will fail with OOM errors if free_pkt() is not called after recv() returns 0: u-boot=> tftp 192.168.0.16:50M Using ethernet@30be0000 device TFTP from server 192.168.0.16; our IP address is 192.168.0.48 Filename '50M'. Load address: 0x40480000 Loading: #######################fecmxc_recv: error allocating packetp fecmxc_recv: error allocating packetp fecmxc_recv: error allocating packetp ... Therefore, make recv() return -EAGAIN instead of 0 when no packet is available and the driver doesn't expect free_pkt() to be called subsequently. [1] https://lists.denx.de/pipermail/u-boot/2024-August/562861.html [2] doc/develop/driver-model/ethernet.rst Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-10-27net: ksz9477: add support for KSZ GbE switches using SPI busRomain Naour
The Microchip KSZ Gigabit Ethernet Switches support SGMII/RGMII/MII/RMII with register access via SPI, I2C, or MDIO. Since this driver is now able to check the underlying bus type, handle the case when the SPI bus is used. The SPI bus is only used for 8/16/32 wide access of registers. Reword Kconfig option to include SPI bus support. Signed-off-by: Romain Naour <romain.naour@smile.fr>
2024-10-27net: ksz9477: prepare ksz9477 without I2C supportRomain Naour
With the upcoming ksz9477 SPI support added, the I2C support will be optional. Either the I2C or the SPI bus will be used. For now, DM_I2C is still mandatory. Signed-off-by: Romain Naour <romain.naour@smile.fr>
2024-10-27net: ksz9477: rename ksz_i2c_probe() to ksz_probe()Romain Naour
In order to support management bus other than the I2C, rename ksz_i2c_probe() to ksz_probe() since this function is no longer specific to the I2C bus. Signed-off-by: Romain Naour <romain.naour@smile.fr>
2024-10-27net: ksz9477: store ksz bus operations functionsRomain Naour
The ksz9477 Linux kernel driver is based on regmap API to seamlessly communicate to switch devices connected via different buses like SPI or I2C. The current regmap implementation in U-Boot only supports memory-mapped registers access [1]. Until regmap API with bus support is available in U-boot, introduce struct ksz_phy_ops to store low-level ksz bus operations (I2C for now). [1] https://lists.denx.de/pipermail/u-boot/2018-May/329392.html Signed-off-by: Romain Naour <romain.naour@smile.fr>
2024-10-27net: ksz9477: set i2c bus offset length only when neededRomain Naour
In order to add ksz9477 SPI bus support, check parent bus is an I2C bus before calling i2c_set_offset_len(). Doing so, ksz_i2c_probe() will now return an error (-EINVAL) if the parent bus is not the one expected by the ksz-switch u-boot driver. Indeed, the DSA KSZ devicetree binding doesn't specify anything about the underlying bus between the SoC and the DSA switch, so the same "compatible" string can be used wathever the management interface used (SPI or I2C). The ksz-switch u-boot driver currently only support I2C interface but will match a compatible "microchip,ksz9xxx" located under under an SPI bus node. Signed-off-by: Romain Naour <romain.naour@smile.fr>
2024-10-27net: ksz9477: rename udevice_id tab to ksz_idsRomain Naour
The DSA KSZ devicetree binding doesn't specify anything about the underlying bus between the SoC and the DSA switch, so the same "compatible" string can be used wathever the management interface used. The driver must be able to access the underlying bus without any help from the compatible string (like for TPM2 TIS devices). So, rename udevice_id tab to ksz_ids since it's not specific to i2c bus. Signed-off-by: Romain Naour <romain.naour@smile.fr>
2024-10-27net: ksz9477: add KSZ9896 switch supportRomain Naour
Add support for the KSZ9896 6-port Gigabit Ethernet Switch to the ksz9477 driver. The KSZ9896 is similar to KSZ9897 but has only one configurable MII/RMII/RGMII/GMII cpu port. Signed-off-by: Romain Naour <romain.naour@smile.fr>
2024-10-27net: ksz9477: remove dev_set_parent_priv() callRomain Naour
The ksz9477 is currently the only driver using dev_set_parent_priv() outside of the driver model. Also, there was no explanation in the commit adding ksz9477 driver and why dev_set_parent_priv() is required. Actually there is a typo in ksz_mdio_probe() while retrieving the parent (switch@0) private data: - priv->ksz = dev_get_parent_priv(dev->parent); + priv->ksz = dev_get_priv(dev->parent); Printing the address of struct ksz_dsa_priv *priv allows to notice the slight difference: ksz_i2c_probe: ksz_dsa_priv *priv 0xfdf45768 // address of the saved priv ksz_mdio_bind: ksz_dsa_priv *priv 0xfdf45798 // address returned by dev_get_parent_priv(dev->parent) ksz_mdio_bind: ksz_dsa_priv *priv 0xfdf45768 // address returned by dev_get_priv(dev->parent) The ksz_mdio driver get the wrong data and without dev_set_parent_priv() the mdio driver fail to access the underlying bus. While it doesn't cause any issue with I2C bus, it override the per-child data used by the SPI bus (struct spi_slave) and prevent further bus access (even with sspi command). Signed-off-by: Romain Naour <romain.naour@smile.fr>
2024-10-27net: ksz9477: move struct ksz_dsa_priv *priv declarationRomain Naour
struct ksz_dsa_priv *priv should be declared before dev_dbg() Signed-off-by: Romain Naour <romain.naour@smile.fr>
2024-10-27net: phy: motorcomm: Add driver for Motorcomm YT8821 2.5G ethernet phyFrank Sae
Add a driver for the motorcomm YT8821 2.5G ethernet phy which works in 2500base-x mode. Verify the driver on BPI-R3(with MediaTek MT7986(Filogic 830) SoC) evb. Signed-off-by: Frank Sae <Frank.Sae@motor-comm.com>
2024-10-27net: phy: motorcomm: Optimize phy speed mask to be compatible to YT8821Frank Sae
YT8531 as Gigabit transceiver uses bit15:14(bit9 reserved default 0) as phy speed mask, YT8821 as 2.5 Gigabit transceiver uses bit9 bit15:14 as phy speed mask. Be compatible to YT8821, reform phy speed mask and phy speed macro. Signed-off-by: Frank Sae <Frank.Sae@motor-comm.com>
2024-10-27net: dc2114x: remove the pass all multicast flag in operation mode settingsHanyuan Zhao
Remove the OMR_PM flag and choose 16 perfect filtering mode since in modern networks there're plenty of multicasts and set ORM_PM flag will increase the dc2114x's workload and ask the U-Boot to handle packets not related to itself. And most of the time, U-Boot does not need this feature. Signed-off-by: Hanyuan Zhao <zhaohy22@mails.tsinghua.edu.cn>
2024-10-27net: dc2114x: allow users to decide how to tx packets according to IP coreHanyuan Zhao
Some IP cores of dc2114x or its variants do not comply so well with the behaviors described by the official document. Originally this driver uses only one tx descriptor and organizes it as a ring buffer, which would lead to a problem that one packet would be sent twice. This commit adds support to prevent this bug if you are using IP cores with this issue, by using multiple tx descriptors and organizing them as a real well-defined ring buffer. Signed-off-by: Hanyuan Zhao <zhaohy22@mails.tsinghua.edu.cn>
2024-10-27net: dc2114x: allow users to decide whether to detect the tx No Carrier errorsHanyuan Zhao
Some IP cores of dc2114x or its variants do not comply so well with the behaviors described by the official document. A packet could be sent successfully but reported with No Carrier error. Latest drivers of this IP core have not detect this error anymore. Signed-off-by: Hanyuan Zhao <zhaohy22@mails.tsinghua.edu.cn>
2024-10-27net: dc2114x: remove unused lines and change the var and print typesHanyuan Zhao
This commit fixes a problem that even though the network card does not report any issues in transmitting a setup frame, the driver prints the error status every time. Let's set it for debug use. Signed-off-by: Hanyuan Zhao <zhaohy22@mails.tsinghua.edu.cn>
2024-10-27net: dc2114x: add support for CPUs that have cache between the memory and ↵Hanyuan Zhao
the card This commit adds support for the MIPS and LoongArch CPUs, which would use cache after they jump into U-Boot. This commit requests the CPU to return the addresses in uncached windows and flushes the cache in need, to make sure the memory between the CPU and the network card is in consistency. Signed-off-by: Hanyuan Zhao <zhaohy22@mails.tsinghua.edu.cn>
2024-10-27net: dc2114x: set the card number to start at zeroHanyuan Zhao
Otherwise the number might get kind of weird. Signed-off-by: Hanyuan Zhao <zhaohy22@mails.tsinghua.edu.cn>
2024-10-27net: dc2114x: get mac address from environmentHanyuan Zhao
Let this old driver work like the other newer network card drivers, loading the MAC address from environment, which could be more flexible to set. Signed-off-by: Hanyuan Zhao <zhaohy22@mails.tsinghua.edu.cn>