aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/devicetree/bindings/net/apm-xgene-enet.txt66
-rw-r--r--MAINTAINERS8
-rw-r--r--arch/arm64/boot/dts/apm-mustang.dts4
-rw-r--r--arch/arm64/boot/dts/apm-storm.dtsi30
-rw-r--r--drivers/net/ethernet/Kconfig1
-rw-r--r--drivers/net/ethernet/Makefile1
-rw-r--r--drivers/net/ethernet/apm/Kconfig1
-rw-r--r--drivers/net/ethernet/apm/Makefile5
-rw-r--r--drivers/net/ethernet/apm/xgene/Kconfig9
-rw-r--r--drivers/net/ethernet/apm/xgene/Makefile6
-rw-r--r--drivers/net/ethernet/apm/xgene/xgene_enet_ethtool.c125
-rw-r--r--drivers/net/ethernet/apm/xgene/xgene_enet_hw.c728
-rw-r--r--drivers/net/ethernet/apm/xgene/xgene_enet_hw.h337
-rw-r--r--drivers/net/ethernet/apm/xgene/xgene_enet_main.c951
-rw-r--r--drivers/net/ethernet/apm/xgene/xgene_enet_main.h135
15 files changed, 2404 insertions, 3 deletions
diff --git a/Documentation/devicetree/bindings/net/apm-xgene-enet.txt b/Documentation/devicetree/bindings/net/apm-xgene-enet.txt
new file mode 100644
index 000000000000..ebcad25efd0a
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/apm-xgene-enet.txt
@@ -0,0 +1,66 @@
1APM X-Gene SoC Ethernet nodes
2
3Ethernet nodes are defined to describe on-chip ethernet interfaces in
4APM X-Gene SoC.
5
6Required properties:
7- compatible: Should be "apm,xgene-enet"
8- reg: Address and length of the register set for the device. It contains the
9 information of registers in the same order as described by reg-names
10- reg-names: Should contain the register set names
11 - "enet_csr": Ethernet control and status register address space
12 - "ring_csr": Descriptor ring control and status register address space
13 - "ring_cmd": Descriptor ring command register address space
14- interrupts: Ethernet main interrupt
15- clocks: Reference to the clock entry.
16- local-mac-address: MAC address assigned to this device
17- phy-connection-type: Interface type between ethernet device and PHY device
18- phy-handle: Reference to a PHY node connected to this device
19
20- mdio: Device tree subnode with the following required properties:
21 - compatible: Must be "apm,xgene-mdio".
22 - #address-cells: Must be <1>.
23 - #size-cells: Must be <0>.
24
25 For the phy on the mdio bus, there must be a node with the following fields:
26 - compatible: PHY identifier. Please refer ./phy.txt for the format.
27 - reg: The ID number for the phy.
28
29Optional properties:
30- status: Should be "ok" or "disabled" for enabled/disabled. Default is "ok".
31
32Example:
33 menetclk: menetclk {
34 compatible = "apm,xgene-device-clock";
35 clock-output-names = "menetclk";
36 status = "ok";
37 };
38
39 menet: ethernet@17020000 {
40 compatible = "apm,xgene-enet";
41 status = "disabled";
42 reg = <0x0 0x17020000 0x0 0xd100>,
43 <0x0 0X17030000 0x0 0X400>,
44 <0x0 0X10000000 0x0 0X200>;
45 reg-names = "enet_csr", "ring_csr", "ring_cmd";
46 interrupts = <0x0 0x3c 0x4>;
47 clocks = <&menetclk 0>;
48 local-mac-address = [00 01 73 00 00 01];
49 phy-connection-type = "rgmii";
50 phy-handle = <&menetphy>;
51 mdio {
52 compatible = "apm,xgene-mdio";
53 #address-cells = <1>;
54 #size-cells = <0>;
55 menetphy: menetphy@3 {
56 compatible = "ethernet-phy-id001c.c915";
57 reg = <0x3>;
58 };
59
60 };
61 };
62
63/* Board-specific peripheral configurations */
64&menet {
65 status = "ok";
66};
diff --git a/MAINTAINERS b/MAINTAINERS
index 05e545096100..e8ac35270823 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -719,6 +719,14 @@ S: Maintained
719F: drivers/net/appletalk/ 719F: drivers/net/appletalk/
720F: net/appletalk/ 720F: net/appletalk/
721 721
722APPLIED MICRO (APM) X-GENE SOC ETHERNET DRIVER
723M: Iyappan Subramanian <isubramanian@apm.com>
724M: Keyur Chudgar <kchudgar@apm.com>
725M: Ravi Patel <rapatel@apm.com>
726S: Supported
727F: drivers/net/ethernet/apm/xgene/
728F: Documentation/devicetree/bindings/net/apm-xgene-enet.txt
729
722APTINA CAMERA SENSOR PLL 730APTINA CAMERA SENSOR PLL
723M: Laurent Pinchart <Laurent.pinchart@ideasonboard.com> 731M: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
724L: linux-media@vger.kernel.org 732L: linux-media@vger.kernel.org
diff --git a/arch/arm64/boot/dts/apm-mustang.dts b/arch/arm64/boot/dts/apm-mustang.dts
index 6541962f5d70..b2f56229aa5e 100644
--- a/arch/arm64/boot/dts/apm-mustang.dts
+++ b/arch/arm64/boot/dts/apm-mustang.dts
@@ -28,3 +28,7 @@
28&serial0 { 28&serial0 {
29 status = "ok"; 29 status = "ok";
30}; 30};
31
32&menet {
33 status = "ok";
34};
diff --git a/arch/arm64/boot/dts/apm-storm.dtsi b/arch/arm64/boot/dts/apm-storm.dtsi
index 40aa96ce13c4..c0aceef7f5b3 100644
--- a/arch/arm64/boot/dts/apm-storm.dtsi
+++ b/arch/arm64/boot/dts/apm-storm.dtsi
@@ -167,14 +167,13 @@
167 clock-output-names = "ethclk"; 167 clock-output-names = "ethclk";
168 }; 168 };
169 169
170 eth8clk: eth8clk { 170 menetclk: menetclk {
171 compatible = "apm,xgene-device-clock"; 171 compatible = "apm,xgene-device-clock";
172 #clock-cells = <1>; 172 #clock-cells = <1>;
173 clocks = <&ethclk 0>; 173 clocks = <&ethclk 0>;
174 clock-names = "eth8clk";
175 reg = <0x0 0x1702C000 0x0 0x1000>; 174 reg = <0x0 0x1702C000 0x0 0x1000>;
176 reg-names = "csr-reg"; 175 reg-names = "csr-reg";
177 clock-output-names = "eth8clk"; 176 clock-output-names = "menetclk";
178 }; 177 };
179 178
180 sataphy1clk: sataphy1clk@1f21c000 { 179 sataphy1clk: sataphy1clk@1f21c000 {
@@ -397,5 +396,30 @@
397 #clock-cells = <1>; 396 #clock-cells = <1>;
398 clocks = <&rtcclk 0>; 397 clocks = <&rtcclk 0>;
399 }; 398 };
399
400 menet: ethernet@17020000 {
401 compatible = "apm,xgene-enet";
402 status = "disabled";
403 reg = <0x0 0x17020000 0x0 0xd100>,
404 <0x0 0X17030000 0x0 0X400>,
405 <0x0 0X10000000 0x0 0X200>;
406 reg-names = "enet_csr", "ring_csr", "ring_cmd";
407 interrupts = <0x0 0x3c 0x4>;
408 dma-coherent;
409 clocks = <&menetclk 0>;
410 local-mac-address = [00 01 73 00 00 01];
411 phy-connection-type = "rgmii";
412 phy-handle = <&menetphy>;
413 mdio {
414 compatible = "apm,xgene-mdio";
415 #address-cells = <1>;
416 #size-cells = <0>;
417 menetphy: menetphy@3 {
418 compatible = "ethernet-phy-id001c.c915";
419 reg = <0x3>;
420 };
421
422 };
423 };
400 }; 424 };
401}; 425};
diff --git a/drivers/net/ethernet/Kconfig b/drivers/net/ethernet/Kconfig
index edb718661850..dc7406c81c45 100644
--- a/drivers/net/ethernet/Kconfig
+++ b/drivers/net/ethernet/Kconfig
@@ -24,6 +24,7 @@ source "drivers/net/ethernet/allwinner/Kconfig"
24source "drivers/net/ethernet/alteon/Kconfig" 24source "drivers/net/ethernet/alteon/Kconfig"
25source "drivers/net/ethernet/altera/Kconfig" 25source "drivers/net/ethernet/altera/Kconfig"
26source "drivers/net/ethernet/amd/Kconfig" 26source "drivers/net/ethernet/amd/Kconfig"
27source "drivers/net/ethernet/apm/Kconfig"
27source "drivers/net/ethernet/apple/Kconfig" 28source "drivers/net/ethernet/apple/Kconfig"
28source "drivers/net/ethernet/arc/Kconfig" 29source "drivers/net/ethernet/arc/Kconfig"