summaryrefslogtreecommitdiff
path: root/drivers/net
AgeCommit message (Collapse)Author
2020-03-10net: fec: Add possibility to enable TXC delayPhilippe Schenker
Related-to: ELB-1299 Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com> (cherry picked from commit f53846c29f76ccee0141f6902703bb6855b14b6a)
2020-03-10drivers: net: phy: micrel_ksz90x1.c: Add basic support for KSZ9131Philippe Schenker
This adds basic support for the new Micrel KSZ9131 phy. Related-to: ELB-1299 Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com> (cherry picked from commit cc96ed419f7585db15855dd53046562aadece3fb) (cherry picked from commit 150e6b7f6c9c8342997245be50f3bc58df78aaf3)
2020-03-10net: phy: micrel: Use defines for PHY_IDs and MASKPhilippe Schenker
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com> (cherry picked from commit 28491c802d36accbb4d8562114ce8085ca53e1b0) (cherry picked from commit 9ee5759d22acc3406bca3b76cb24ed558b64d0df)
2020-03-05net: dm: fec: Fix regulator enable when using DM_REGULATORAdam Ford
When DM_REGULATOR is enabled, the driver attempts to call regulator_autoset() which expects the regulators to be on at boot and/or always on and fails if they are not true. For a more generic approach, this patch just calls regulator_set_enable() which shouldn't have such restrictions. Fixes: ad8c43cbcafb ("net: dm: fec: Support the phy-supply binding") Signed-off-by: Adam Ford <aford173@gmail.com> Tested-by: Martin Fuzzey <martin.fuzzey@flowbird.group> Acked-by: Joe Hershberger <joe.hershberger@ni.com> (cherry picked from commit 8f1a5ac797baac5b40f93eac80a7810f0a771ecf)
2020-03-05net: dm: fec: Support the phy-supply bindingMartin Fuzzey
Configure the phy regulator if defined by the "phy-supply" DT phandle. Signed-off-by: Martin Fuzzey <martin.fuzzey@flowbird.group> Acked-by: Joe Hershberger <joe.hershberger@ni.com> (cherry picked from commit ad8c43cbcafbbb21efc9e26bda7a6b1e37428adc)
2020-03-05fec_mxc.c: add possibility for phy-reset-post-delayPhilippe Schenker
This adds the possibility to add a delay after a reset in DT. Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2020-03-05net: dm: fec: Fix phy-reset-duration clamping and defaultsMartin Fuzzey
The DT binding says: - phy-reset-duration : Reset duration in milliseconds. Should present only if property "phy-reset-gpios" is available. Missing the property will have the duration be 1 millisecond. Numbers greater than 1000 are invalid and 1 millisecond will be used instead. However the current code: - clamps values greater than 1000ms to 1000ms rather than 1. - does not initialize the delay if the property does not exist (else clause mismatch) - returns an error if phy-reset-gpios is not defined Fix all this and simplify by using dev_read_u32_default() Signed-off-by: Martin Fuzzey <martin.fuzzey@flowbird.group> Acked-by: Joe Hershberger <joe.hershberger@ni.com> (cherry picked from commit 331fcabe4f9b4c7ec58d070da039f875673c9c9d) Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2020-03-05net: dm: fec: Fix time unit error in phy-reset-durationMartin Fuzzey
The DT binding says that phy-reset-duration is in ms, but the driver currently uses udelay(). Switch to mdelay() to fix this. Signed-off-by: Martin Fuzzey <martin.fuzzey@flowbird.group> Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> (cherry picked from commit 9b8b91888493d25873b835d262b89f1c4efa0df7) Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2020-03-05eth: dm: fec: Add gpio phy reset bindingMichael Trimarchi
Add the missing gpio phy reset binding to the gpio and reset time configuration Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> (cherry picked from commit efd0b791069af93e9d439a70d1fe2ae8994dbbfa) Conflicts: drivers/net/fec_mxc.c Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2018-04-27MLK-16118-6 net: fec_mxc: Add the init_clk_fec functionYe Li
When the power domain driver is enabled, we need to enable clocks after power domain on. So the clock settings can't set in board_init, needs to set them when the device is probed. Add this weak function in driver, that SoC codes can implement the clock settings. Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit c0e4ac66196b20f363f711fb18e40b70e3be9240)
2018-04-27MLK-14938-16 net: fec: do not access reserved register for i.MX8Ye Li
The MIB RAM and FIFO receive start register does not exist on i.MX8. Accessing these register will cause SERROR in kernel. Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit 2a47ebbccb95e8482360813d6dff5288429f1248)
2018-04-27MLK-18159-1 imx8m: Change name from mx8m to imx8mYe Li
The formal production name starts with imx, so change relevant names in codes to use this prefix. Signed-off-by: Ye Li <ye.li@nxp.com>
2018-04-27MLK-12483-4 mx6: Modify drivers to disable fused modulesYe Li
Add the fuse checking in drivers, when the module is disabled in fuse, the driver will not work. Changed drivers: BEE, GPMI, APBH-DMA, ESDHC, FEC, QSPI, ECSPI, I2C, USB-EHCI, GIS, LCDIF and EPDC. Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit 1704e116f9b39aeb99201919a18bc2b1e19a980e) (cherry picked from commit 2d3b5df8530cd5ef883750378838dea7c40259af)
2018-04-27net: fec: Fix issue in DM probe timeoutYe Li
Since the probe function has changed to reset FEC controller prior than setup PHY. If reset FEC controller timeout, the priv->phydev is not initialized, so can't free it. Signed-off-by: Ye Li <ye.li@nxp.com>
2018-04-27net: fex_mxc: add i.MX6UL/SX/SL/i.MX7D compatiblePeng Fan
Add i.MX6UL/SX/SL/i.MX7D compatible. Signed-off-by: Peng Fan <peng.fan@nxp.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-04-27net: fec: sharing MDIO for two enet controllersPeng Fan
On i.MX6SX, 6UL and 7D, there are two enet controllers each has a MDIO port. But Some boards share one MDIO port for the two enets. So introduce a configuration CONFIG_FEC_MXC_MDIO_BASE to indicate the MDIO port for sharing. In Kconfig, user needs enable CONFIG_FEC_MXC_SHARE_MDIO first to enter the CONFIG_FEC_MXC_MDIO_BASE. To i.MX28, adapt to use the new config Signed-off-by: Peng Fan <peng.fan@nxp.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Cc: Fabio Estevam <fabio.estevam@nxp.com>
2018-04-27net: fec: set dev->seq to priv->dev_idPeng Fan
To platforms has two enet interface, using dev->seq could avoid conflict. i.MX6UL/ULL evk board net get the wrong MAC address from fuse, eth1 get MAC0 address, eth0 get MAC1 address from fuse. Set the priv->dev_id to device->seq as the real net interface alias id then .fec_get_hwaddr() read the related MAC address from fuse. Signed-off-by: Peng Fan <peng.fan@nxp.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-04-27net: fec_mxc: simplify fec_get_miibusPeng Fan
No need to provide two prototype for this function. Use ulong for the first parameter, then this function could be shared for DM/non DM case. Signed-off-by: Peng Fan <peng.fan@nxp.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-04-27net: fec_mxc: Fix DM driver issue in recvYe Li
When using ethernet DM driver, the recv interface has a change with non-DM interface, that driver needs to set the packet pointer and provide it to upper layer to process. In fec driver, the fecmxc_recv functions does not handle the packet pointer parameter. This may cause crash in upper layer processing because the packet pointer is not set. This patch allocates a buffer for the packet pointer and free it through free_pkt interface. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-03-05Merge git://git.denx.de/u-boot-shTom Rini
2018-03-05libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h>Masahiro Yamada
Thomas reported U-Boot failed to build host tools if libfdt-devel package is installed because tools include libfdt headers from /usr/include/ instead of using internal ones. This commit moves the header code: include/libfdt.h -> include/linux/libfdt.h include/libfdt_env.h -> include/linux/libfdt_env.h and replaces include directives: #include <libfdt.h> -> #include <linux/libfdt.h> #include <libfdt_env.h> -> #include <linux/libfdt_env.h> Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-03-05net: ravb: Add R8A77965 M3N entriesMarek Vasut
Add entries for the R8A77965 M3N SoC. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Cc: Joe Hershberger <joe.hershberger@ni.com>
2018-02-26net: phy: smsc: Add SMSC LAN8741 supportArno Steffens
Signed-off-by: Arno Steffens <star@gmx.li> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-02-26net: e1000: Fix e1000_igb semaphore handlingBernhard Messerklinger
Fix commit f1bcad22dd19 ("net: e1000: add support for writing to EEPROM"). Signed-off-by: Bernhard Messerklinger <bernhard.messerklinger@br-automation.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-02-26NET: designware: fix clock enableEugeniy Paltsev
After commit ba1f966725223 ("net: designware: add clock support") we got NET broken on axs101 and axs103 platforms. Some clock don't support gating so their clock drivers don't implement .enable/.disable callbacks. In such case clk_enable returns -ENOSYS. Also some clock drivers implement .enable/.disable callbacks not for all clock IDs and return -ENOSYS (or -ENOTSUPP) for others. If we have such clock in 'clocks' list of designware ethernet controller node we fail to probe designware ethernet. Fix it. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2018-02-26phy: Fix style violationsMario Six
Fix some style violations in the generic PHY management code. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-02-26net: phy: marvell 88e151x: Fix handling of bare RGMII interface typeMario Six
Commit 68e6ecadc551 ("net: phy: marvell 88e151x: Fix handling of RGMII interface types") fixed the initialization of 88e151x phys, but made it so that interfaces of type PHY_INTERFACE_MODE_RGMII had both RX and TX delay bits cleared. The default (like in m88e1111s_config) is to have both bits set. Hence, this patch changes the behavior in the PHY_INTERFACE_MODE_RGMII case so that both bits are set. Signed-off-by: Mario Six <mario.six@gdsys.cc> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-02-26net: phy: marvell: Fix style violationsMario Six
Fix some style violations (mostly wrong indentions) in the Marvell PHY driver. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-02-26net: tsec: Make live-tree compatibleMario Six
Make the tsec ethernet driver compatible with a live device tree. Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-02-26net: tsec: Fix memory leak in error pathMario Six
tsec_initialize allocates a private driver structure using malloc. Should the memory allocation of this private structure fail, the function execution is aborted with a return 0, but the previously allocated device structure is never freed, hence leaked. Free the device structure in the error case. Signed-off-by: Mario Six <mario.six@gdsys.cc> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-02-26net: tsec: Fix style violationsMario Six
Signed-off-by: Mario Six <mario.six@gdsys.cc> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-02-23net: Remove Xilinx ll_temac driverMichal Simek
ll_temac driver was used by Xilinx Microblaze big endian and Xilinx ppc405/ppc440 SoCs. ppc support was removed by: "powerpc: remove 4xx support" (sha1: 98f705c9cefdfdba62c069821bbba10273a0a8ed) and Microblaze BE is not tested for a long time that's why this driver can be removed because none is going to updated it to DM anyway. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-02-18net: sh_eth: Fix DT base address fetchingMarek Vasut
Drop the whole map/unmap_physmem stuff and just use the address already obtained from DT in ofdata_to_platdata(), instead of repeating that, wrongly, in probe. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Cc: Joe Hershberger <joe.hershberger@ni.com>
2018-02-18net: sh_eth: Fix checkpatch warningMarek Vasut
Fix minor checkpatch warning about udelay(3000) being too long and should be replaced by mdelay(3). Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Cc: Joe Hershberger <joe.hershberger@ni.com>
2018-02-18net: sh_eth: Return directly from sh_eth_recv_startMarek Vasut
Drop the len variable, it's useless. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Cc: Joe Hershberger <joe.hershberger@ni.com>
2018-02-18net: sh_eth: Zap port variableMarek Vasut
Inline this variable which is quite useless. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Cc: Joe Hershberger <joe.hershberger@ni.com>
2018-02-16net: ravb: Initialize PHY in probe() onceMarek Vasut
Reset and initialize the PHY once in the probe() function rather than doing it over and over again is start() function. This requires us to keep the clock enabled while the driver is in use. This significantly reduces the time between transfers as the PHY doesn't have to restart autonegotiation between transfers, which takes forever. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Geert Uytterhoeven <geert+renesas@glider.be> Cc: Joe Hershberger <joe.hershberger@ni.com>
2018-02-08Kconfig: net: phylib: Phylib should depends on NETMichal Simek
There is no value to enable phylib without networking support. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-02-04net: e1000: implement eth_write_hwaddrHannu Lounento
Implement programming MAC address to the hardware, i.e. external flash seen as EEPROM. MAC address is only written if it differs from what is already stored in flash or if reading the current MAC address fails. Signed-off-by: Hannu Lounento <hannu.lounento@ge.com> CC: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
2018-02-04net: e1000: split e1000_read_mac_addrHannu Lounento
Split the implementation of e1000_read_mac_addr into eeprom and register versions called by e1000_read_mac_addr. This allows for calling e1000_read_mac_addr when MAC address is needed with no constraints where it is read from, and for calling the register and, especially, the eeprom version directly in order to specify where to read the address from. Signed-off-by: Hannu Lounento <hannu.lounento@ge.com> CC: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
2018-02-04net: e1000: add support for writing to EEPROMHannu Lounento
Port functions for writing to EEPROM, updating the checksum and committing data to flash from the Linux kernel igb driver. Functions were ported from Linux 4.8-rc2 (694d0d0bb20). Signed-off-by: Hannu Lounento <hannu.lounento@ge.com> CC: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk> Reviewed-by: Stefano Babic <sbabic@denx.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
2018-02-04net: fec: fix build warnings for 64bits supportYe Li
When building for 64bits system, we get some warnings about type cast between pointer and integer. This patch eliminates the warnings by using ulong/long type which is 32bits on 32bits system or 64bits on 64bits system. Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Stefano Babic <sbabic@denx.de> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
2018-02-04net: fec: do not access reserved register for i.MX8MPeng Fan
The MIB RAM and FIFO receive start register does not exist on i.MX8M. Accessing these register will cause system hang. Signed-off-by: Peng Fan <peng.fan@nxp.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Stefano Babic <sbabic@denx.de> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Stefano Babic <sbabic@denx.de>
2018-01-31Merge git://git.denx.de/u-boot-fsl-qoriqTom Rini
2018-01-30driver: fsl-mc: Perform fsl-mc fdt fixup for lazyapply dplYogesh Gaur
For for case of lazyapply method, API fdt_fixup_board_enet() gets invoked before DPL being deployed. This leads to an issue that fsl-mc fdt fixup status marked as fail and dprc driver didn't get registered in linux boot. Fixes this issue by calling fdt_fixup_board_enet() for case when DPL is deployed successfully in lazyapply method. Signed-off-by: Yogesh Gaur <yogeshnarayan.gaur@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
2018-01-29mvpp2: Fix warning over 32bit vs 64bit targetsTom Rini
When we have a driver that is used on both 32bit and 64bit targets and we are talking about address space we cannot use u64 nor u32 and instead need to use phys_addr_t. Fixes: 377883f16d36 ("net: mvpp2x: fix phy connected to wrong mdio issue") Cc: Stefan Chulski <stefanc@marvell.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2018-01-28net: gmac_rockchip: Add support for the RK3228 GMACDavid Wu
The GMAC in the RK3228 once again is identical to the incarnation in the RK3288 and the RK3399, except for where some of the configuration and control registers are located in the GRF. This adds the RK3368-specific logic necessary to reuse this driver. Signed-off-by: David Wu <david.wu@rock-chips.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2018-01-28net: gmac_rockchip: Add rk3328 gmac supportDavid Wu
The GMAC2IO in the RK3328 once again is identical to the incarnation in the RK3288 and the RK3399, except for where some of the configuration and control registers are located in the GRF. This adds the RK3328-specific logic necessary to reuse this driver. Signed-off-by: David Wu <david.wu@rock-chips.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2018-01-28net: gmac_rockchip: Add support for the RV1108 GMACDavid Wu
The rv1108 GMAC only support rmii interface, so need to add the set_rmii() ops. Use the phy current interface to set rmii or rgmii ops. At the same time, need to set the mac clock rate of rmii with 50M, the clock rate of rgmii with 125M. Signed-off-by: David Wu <david.wu@rock-chips.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2018-01-27Merge branch 'rmobile-mx' of git://git.denx.de/u-boot-shTom Rini