Commit 9413b1be authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'net-cleanup-arc-emac'



Johan Jonker says:

====================
cleanup arc emac

The Rockchip emac binding for rk3036/rk3066/rk3188 has been converted to YAML
with the ethernet-phy node in a mdio node. This requires some driver fixes
by someone that can do hardware testing.

In order to make a future fix easier make the driver 'Rockchip only'
by removing the obsolete part of the arc emac driver.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 86474dee 8a3913c8
Loading
Loading
Loading
Loading
+0 −46
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
- max-speed: see ethernet.txt file in the same directory.
- phy: see ethernet.txt file in the same directory.

Optional properties:
- phy-reset-gpios : Should specify the gpio for phy reset
- 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.

Clock handling:
The clock frequency is needed to calculate and set polling period of EMAC.
It must be provided by one of:
- clock-frequency: CPU frequency.
- clocks: reference to the clock supplying the EMAC.

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.

Examples:

	ethernet@c0fc2000 {
		compatible = "snps,arc-emac";
		reg = <0xc0fc2000 0x3c>;
		interrupts = <6>;
		mac-address = [ 00 11 22 33 44 55 ];

		clock-frequency = <80000000>;
		/* or */
		clocks = <&emac_clock>;

		max-speed = <100>;
		phy = <&phy0>;

		#address-cells = <1>;
		#size-cells = <0>;
		phy0: ethernet-phy@0 {
			reg = <1>;
		};
	};
+0 −4
Original line number Diff line number Diff line
@@ -879,7 +879,3 @@ &vpu {
&wdt {
	compatible = "rockchip,rk3066-wdt", "snps,dw-wdt";
};

&emac {
	compatible = "rockchip,rk3066-emac";
};
+2 −5
Original line number Diff line number Diff line
@@ -194,17 +194,14 @@ usb_host: usb@101c0000 {
	};

	emac: ethernet@10204000 {
		compatible = "snps,arc-emac";
		compatible = "rockchip,rk3066-emac";
		reg = <0x10204000 0x3c>;
		interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;

		rockchip,grf = <&grf>;

		clocks = <&cru HCLK_EMAC>, <&cru SCLK_MAC>;
		clock-names = "hclk", "macref";
		max-speed = <100>;
		phy-mode = "rmii";

		rockchip,grf = <&grf>;
		status = "disabled";
	};

+0 −10
Original line number Diff line number Diff line
@@ -23,16 +23,6 @@ config ARC_EMAC_CORE
	select PHYLIB
	select CRC32

config ARC_EMAC
	tristate "ARC EMAC support"
	select ARC_EMAC_CORE
	depends on OF_IRQ
	depends on ARC || COMPILE_TEST
	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.

config EMAC_ROCKCHIP
	tristate "Rockchip EMAC support"
	select ARC_EMAC_CORE
+0 −1
Original line number Diff line number Diff line
@@ -5,5 +5,4 @@

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