Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e4f2379d authored by Alexey Brodkin's avatar Alexey Brodkin Committed by David S. Miller
Browse files

ethernet/arc/arc_emac - Add new driver



Driver for non-standard on-chip ethernet device ARC EMAC 10/100,
instantiated in some legacy ARC (Synopsys) FPGA Boards such as
ARCAngel4/ML50x.

Signed-off-by: default avatarAlexey Brodkin <abrodkin@synopsys.com>

Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Francois Romieu <romieu@fr.zoreil.com>
Cc: Joe Perches <joe@perches.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Mischa Jonker <mjonker@synopsys.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: linux-kernel@vger.kernel.org
Cc: devicetree-discuss@lists.ozlabs.org
Cc: Florian Fainelli <florian@openwrt.org>
Cc: David Laight <david.laight@aculab.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 62208f12
Loading
Loading
Loading
Loading
+38 −0
Original line number Diff line number Diff line
* Synopsys ARC EMAC 10/100 Ethernet driver (EMAC)

Required properties:
- compatible: Should be "snps,arc-emac"
- reg: Address and length of the register set for the device
- interrupts: Should contain the EMAC interrupts
- clock-frequency: CPU frequency. It is needed to calculate and set polling
period of EMAC.
- max-speed: Maximum supported data-rate in Mbit/s. In some HW configurations
bandwidth of external memory controller might be a limiting factor. That's why
it's required to specify which data-rate is supported on current SoC or FPGA.
For example if only 10 Mbit/s is supported (10BASE-T) set "10". If 100 Mbit/s is
supported (100BASE-TX) set "100".
- phy: PHY device attached to the EMAC via MDIO bus

Child nodes of the driver are the individual PHY devices connected to the
MDIO bus. They must have a "reg" property given the PHY address on the MDIO bus.

Optional properties:
- mac-address: 6 bytes, mac address

Examples:

	ethernet@c0fc2000 {
		compatible = "snps,arc-emac";
		reg = <0xc0fc2000 0x3c>;
		interrupts = <6>;
		mac-address = [ 00 11 22 33 44 55 ];
		clock-frequency = <80000000>;
		max-speed = <100>;
		phy = <&phy0>;

		#address-cells = <1>;
		#size-cells = <0>;
		phy0: ethernet-phy@0 {
			reg = <1>;
		};
	};
+1 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ source "drivers/net/ethernet/allwinner/Kconfig"
source "drivers/net/ethernet/alteon/Kconfig"
source "drivers/net/ethernet/amd/Kconfig"
source "drivers/net/ethernet/apple/Kconfig"
source "drivers/net/ethernet/arc/Kconfig"
source "drivers/net/ethernet/atheros/Kconfig"
source "drivers/net/ethernet/cadence/Kconfig"
source "drivers/net/ethernet/adi/Kconfig"
+1 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ obj-$(CONFIG_NET_VENDOR_ALLWINNER) += allwinner/
obj-$(CONFIG_NET_VENDOR_ALTEON) += alteon/
obj-$(CONFIG_NET_VENDOR_AMD) += amd/
obj-$(CONFIG_NET_VENDOR_APPLE) += apple/
obj-$(CONFIG_NET_VENDOR_ARC) += arc/
obj-$(CONFIG_NET_VENDOR_ATHEROS) += atheros/
obj-$(CONFIG_NET_CADENCE) += cadence/
obj-$(CONFIG_NET_BFIN) += adi/
+31 −0
Original line number Diff line number Diff line
#
# ARC EMAC network device configuration
#

config NET_VENDOR_ARC
	bool "ARC devices"
	default y
	---help---
	  If you have a network (Ethernet) card belonging to this class, say Y
	  and read the Ethernet-HOWTO, available from
	  <http://www.tldp.org/docs.html#howto>.

	  Note that the answer to this question doesn't directly affect the
	  kernel: saying N will just cause the configurator to skip all
	  the questions about ARC cards. If you say Y, you will be asked for
	  your specific card in the following questions.

if NET_VENDOR_ARC

config ARC_EMAC
	tristate "ARC EMAC support"
	select MII
	select PHYLIB
	depends on OF_IRQ
	depends on OF_NET
	---help---
	  On some legacy ARC (Synopsys) FPGA boards such as ARCAngel4/ML50x
	  non-standard on-chip ethernet device ARC EMAC 10/100 is used.
	  Say Y here if you have such a board.  If unsure, say N.

endif # NET_VENDOR_ARC
+6 −0
Original line number Diff line number Diff line
#
# Makefile for the ARC network device drivers.
#

arc_emac-objs := emac_main.o emac_mdio.o
obj-$(CONFIG_ARC_EMAC) += arc_emac.o
Loading