summaryrefslogtreecommitdiff
path: root/drivers/net
AgeCommit message (Collapse)Author
2018-04-30Merge git://git.denx.de/u-boot-imxTom Rini
2018-04-27Remove unnecessary instances of DECLARE_GLOBAL_DATA_PTRTom Rini
We have a large number of places where while we historically referenced gd in the code we no longer do, as well as cases where the code added that line "just in case" during development and never dropped it. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-04-27Convert CONFIG_SPI to KconfigAdam Ford
This converts the following to Kconfig: CONFIG_SPI This partly involves updating code that assumes that CONFIG_SPI implies things that are specific to the MPC8xx SPI driver. For now, just update the CONFIG tests. This also involves reworking the default for CONFIG_SYS_DEF_EEPROM_ADDR so that we don't set it when we cannot make a reasonable default, as it does not cause any compile failures. Signed-off-by: Adam Ford <aford173@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2018-04-26dts: dm: fec: imx53: Provide proper compatible string for imx53 fec driverLukasz Majewski
After this change the DM FEC ETH driver can be also reused on some imx53 devices. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2018-04-26eth: dm: fec: Change FEC PHY mask setting from CONFIG_PHYLIB to ↵Lukasz Majewski
CONFIG_FEC_MXC_PHYADDR Without this commit we do have an explicit dependency on CONFIG_PHYLIB when one wants to set PHY ADDR on a iMX board (FEC + driver model). This shall be changed to CONFIG_FEC_MXC_PHYADDR, as only when we do have it set, we shall mask out other devices. As a side effect, when CONFIG_FEC_MXC_PHYADDR is not set, we scan PHY bus for connected PHY devices. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2018-04-13net: phy: Don't limit phy addresses by defaultJoe Hershberger
Some boards expect to find more than one phy while other boards are old and need to be limited to a specific phy address. Only limit the phy address for boards that opt in. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Tested-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2018-04-13net: sh_eth: Add remaining Gen2 DT compatibleMarek Vasut
Add compatible strings for R8A7790, R8A7793 and R8A7794, since the contemporary DTs use those don't have a generic match value. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Cc: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-04-13net: zynq_gem: Use max-speed property from dtSiva Durga Prasad Paladugu
Add support to use max-speed property from dt for determining the supported speed. Use 1000Mbps as default. Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-04-13net: 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> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-04-13net: fex_mxc: add i.MX6UL/SX/SL compatiblePeng Fan
Add i.MX6UL/SX/SL compatible. Signed-off-by: Peng Fan <peng.fan@nxp.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-04-13net: 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-13net: 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-13net: 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-13net: 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-04-13net: mvneta: support setting hardware addressMatt Pelland
mvneta already supports setting the MAC address but this was only done internally when some other part of U-Boot tries to actually use the interface. This commit exposes this functionality to the ethernet core code so that the MAC addresses of all interfaces are configured correctly even if they are not used before loading Linux. Signed-off-by: Matt Pelland <mpelland@starry.com> Reviewed-by: Stefan Roese <sr@denx.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-04-09Merge tag 'xilinx-for-v2018.05-rc2' of git://git.denx.de/u-boot-microblazeTom Rini
Xilinx changes for v2018.05-rc2 - Various DT changes and sync with mainline kernel - Various defconfig updates - Add SPL init for zcu102 revA - Add new zynqmp boards zcu100/zcu104/zcu106/zcu111/zc12XX and zc1751-dc3 - Net fixes - xlnx,phy-type - 64bit axi ethernet support - arasan: Fix nand write issue - fpga fixes - Maintainer file updates
2018-04-09net: phy: xilinx_phy: Read phytype using property xlnx,phy-typeSiva Durga Prasad Paladugu
This patch reads phytype from property "xlnx,phy-type" instead od simply looking for "phy-type". This is to be inline with Linux and also fixes the issue of detecting it wrongly in u-boot. Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-04-09axi: ethernet: Added support for 64 bit addressing for axi-ethernetVipul Kumar
This patch uses writeq() function to enable greater than 32 bit addressing of axi-ethernet for the ZynqMP devices. Signed-off-by: Vipul Kumar <vipulk@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-04-08net: Move enetaddr env access code to env config instead of net configAlex Kiernan
In order that we can use eth_env_* even when CONFIG_NET isn't set, move these functions to environment code from net code. This fixes failures such as: board/ti/am335x/built-in.o: In function `board_late_init': board/ti/am335x/board.c:752: undefined reference to `eth_env_set_enetaddr' u-boot/board/ti/am335x/board.c:766: undefined reference to `eth_env_set_enetaddr' which caters for use cases such as: commit f411b5cca48f ("board: am335x: Always set eth/eth1addr environment variable") when Ethernet is required in Linux, but not U-Boot. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
2018-04-08Migrate CONFIG_DRIVER_TI_CPSW to KconfigAlex Kiernan
This converts CONFIG_DRIVER_TI_CPSW to Kconfig Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-04-08treewide: Migrate CONFIG_TSEC_ENET to KconfigMario Six
Migrate the CONFIG_TSEC_ENET option to Kconfig. Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-04-06powercp: mpc8xx: move commproc.hChristophe Leroy
include/commproc.h is dedicated to the 8xx, rename it cpm_8xx.h and move it into arch/powerpc/include/asm Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2018-04-06powerpc: mpc8xx: Change CONFIG_8xx to CONFIG_MPC8xxChristophe Leroy
CONFIG_8xx doesn't mean much outside of arch/powerpc/ This patch renames it CONFIG_MPC8xx just like CONFIG_MPC85xx etc ... It also renames 8xx_immap.h to immap_8xx.h to be consistent with other file names. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2018-04-04Merge git://git.denx.de/u-boot-sunxiTom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2018-04-04net: sun8i-emac: remove support for old bindingAndre Przywara
The original DT binding used by U-Boot's sun8i-emac driver was not really agreed upon, and deviated from the "official" binding now used by the kernel. Since now all U-Boot users have been converted to the new binding, we can remove support for the old DT nodes from the driver. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2018-04-04net: sun8i-emac: add support for new EMAC DT bindingAndre Przywara
The Ethernet MAC used in newer Allwinner SoCs (H3, A64, H5) got an upstream Linux driver in v4.15. This one uses a slightly different binding from the original one used by the U-Boot driver. The differences to the old binding are: - The "syscon" address is held in a separate node, referenced via a phandle in the "syscon" property. - The reference to the PHY is held in a property called "phy-handle", not "phy". - The PHY register is at offset 0x30 in the syscon device, not at 0. - The internal PHY is activated when the node, which phy-handle points to, is a child node of an "allwinner,sun8i-h3-mdio-internal" node. Teach the U-Boot driver how to find its resources in a "new-style" DT, so that we can use a Linux kernel compatible DT for U-Boot as well. This keeps support for the old binding for now, to allow a smooth transition. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2018-04-04net: sun8i-emac: support new pinctrl DT bindingsAndre Przywara
The Linux kernel driver for the Allwinner pin controller gained support for generic properties, which are now also used in the DTs. The sun8i-emac Ethernet driver for new Allwinner MACs reads the pins from the DT, but so far only supported the old binding. Update the parsing routine to cope with both the old and new bindings, so that the newer DTs can be used with U-Boot and its Ethernet driver. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2018-03-23net: zynq_gem: Dont run any phy detection logic for GMII caseSiva Durga Prasad Paladugu
This patch bypasses phy detection logic for GMII interface and just depend on phy address received from DT. This patch is required as phy detection logic is different for some phys like xilinx phy which can be connected over SGMII and GMII interface. This fixes the issue of ethernet failures when xilinx phy is connected over GMII interface. Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-03-22net: Drop CONFIG_ENC28J60Tuomas Tynkkynen
Last user of this driver went away in October 2014 in commit d58a9451e7339ed4 ("ppc/arm: zap EMK boards"). Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-03-22net: macb: remove superfluous logical constraintHeinrich Schuchardt
In if (a > =0) {...} else (a < 0) {...} the second logical constraint is superfluous. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-03-22drivers: net: cpsw: remove superfluous assignment.Heinrich Schuchardt
In int ret = A; ret = B; the first assignment has not effect. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-03-22net/phy/cortina: Add No firmware upload optionPriyanka Jain
Current Cortina phy driver assumes that firmware upload is required during initialization and is dependent on presence of corresponding macros like CONFIG_CORTINA_FW_ADDR for compilation. But Cortina phy has provision to store phy firmware in attached dedicated EEPROM. And boards designed with such EEPROM does not require firmware upload. Add CORTINA_NO_FW_UPLOAD option in cortina.c to support such boards. Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-03-22net/phy/cortina.c: Update get_phy_id implementationPriyanka Jain
Update get_phy_id() implementation in cortina.c to check for Cortina_phy by comparing device phy_id with cortina phy_id instead of relying on presence of CORTINA macros. This will allow get_phy_id to work with non-cortina phy devices which might have same phy address as Cortina device but on different bus. Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-03-22configs: ls1012a: add pfe configuration for LS1012ACalvin Johnson
Add configurations for PFE. Signed-off-by: Calvin Johnson <calvin.johnson@nxp.com> Signed-off-by: Anjaneyulu Jagarlmudi <anji.jagarlmudi@nxp.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-03-22drivers: net: pfe_eth: provide pfe commandsCalvin Johnson
pfe_command provides command line support for several features that support pfe, like starting or stopping the pfe, checking the health of the processor engines and checking status of different units inside pfe. Signed-off-by: Calvin Johnson <calvin.johnson@nxp.com> Signed-off-by: Anjaneyulu Jagarlmudi <anji.jagarlmudi@nxp.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-03-22drivers: net: pfe_eth: LS1012A PFE driver introductionCalvin Johnson
This patch adds PFE driver to U-Boot Following are the main driver files:- pfe_hw.c: provides low level helper functions to initialize PFE internal processor engines and other hardware blocks pfe_driver.c: provides initialization functions and packet send and receive functions pfe_eth.c: provides high level gemac initialization functions pfe_firmware.c: provides functions to load firmware into PFE internal processor engines. pfe_mdio.c: provides functions to initialize phy and mdio. Signed-off-by: Calvin Johnson <calvin.johnson@nxp.com> Signed-off-by: Anjaneyulu Jagarlmudi <anji.jagarlmudi@nxp.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-03-22drivers: net: phy: Fix aquantia compilation with DMCalvin Johnson
With CONFIG_DM_ETH enabled, aquantia driver compilation fails with below error. This patch fixes the issue by including dm.h. drivers/net/phy/aquantia.c: In function ‘aquantia_startup’: drivers/net/phy/aquantia.c:73:21: error: dereferencing pointer to incomplete type ‘struct udevice’ phydev->dev->name); ^~ Signed-off-by: Calvin Johnson <calvin.johnson@nxp.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-03-22net: mvpp2x: add check after callocHeinrich Schuchardt
After allocating plat the pointer is checked. Afterwards name is allocated and not checked. Add the missing check to avoid a possible NULL dereference. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-03-22net: phy: Add PHY_RTL8211E_PINE64_GIGABIT_FIX for realtek physkevans@FreeBSD.org
Setting PHY_RTL8211E_PINE64_GIGABIT_FIX forces internal rx/tx delays off on the PHY, as well as flipping some magical undocumented bits. The magic number comes from the Pine64 engineering team, presumably as a proxy from Realtek. This configuration fixes the throughput on some Pine64 models. Packet loss of up to 60-70% has been observed without this. Signed-off-by: Kyle Evans <kevans@FreeBSD.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-03-13Move CONFIG_PHY_ADDR to KconfigStefan Mavrodiev
CONFIG_PHY_ADDR is used for old-style configuration. This makes impossible changing the PHY address, if multiple boards share a same config header file (for example include/configs/sunxi-common.h). Moving this to Kconfig helps overcoming this issue. It's defined as entry inside PHYLIB section. After the implemention, moveconfig was run. The issues are: - edb9315a - CONFIG_PHYLIB is not enabled. Entry is deleted. - ds414 - CONFIG_PHYLIB is in incompatible format: { 0x1, 0x0 }. This entry is also deleted. - devkit3250 - The PHY_ADDR is in hex format (0x1F). Manually CONFIG_PHY_ADDR=31 is added in the defconfig. After the changes the suspicious defconfigs passes building. Signed-off-by: Stefan Mavrodiev <stefan@olimex.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> [jagan: rebased on master] Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2018-03-13net: sun8i_emac: Fix PHY initializationSamuel Holland
The previous code tried to update the PHY parameters without waiting for autonegotiation to complete. This caused wrong values to be written to the EMAC in sun8i_adjust_link(). As a result, any commands that called eth_start() before autonegotiation completed would find the network nonfunctional. Fix this by using the correct function to start up the PHY. Signed-off-by: Samuel Holland <samuel@sholland.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Jagan Teki <jagan@openedev.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>