aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDinh Nguyen <dinguyen@altera.com>2014-02-06 17:48:43 -0500
committerDinh Nguyen <dinguyen@altera.com>2014-03-02 15:57:57 -0500
commit7e0b4cd06201ee9dbdf2d13bfd7b8a021b414e42 (patch)
tree6038d7dc6e2fa04a9b1430cb036809f1fadad78a
parent2d237c06a4161767fe1da598d15291914a7bbeed (diff)
dts: socfpga: Add DTS entry for adding the stmmac glue layer for stmmac.
This patch adds the dts bindings documenation for the Altera SOCFPGA glue layer for the Synopsys STMMAC ethernet driver. Signed-off-by: Dinh Nguyen <dinguyen@altera.com> Acked-by: David S. Miller <davem@davemloft.net> --- v3: Remove stray empty line at end of socfpga_cyclone5_socdk.dts v2: Use the dwmac-sti as an example for a glue layer and split patch up to have dts as a separate patch. Also cc dts maintainers since there is a new binding.
-rw-r--r--Documentation/devicetree/bindings/net/socfpga-dwmac.txt35
-rw-r--r--arch/arm/boot/dts/socfpga.dtsi49
-rw-r--r--arch/arm/boot/dts/socfpga_arria5_socdk.dts24
-rw-r--r--arch/arm/boot/dts/socfpga_cyclone5_socdk.dts17
-rw-r--r--arch/arm/boot/dts/socfpga_cyclone5_sockit.dts22
-rw-r--r--arch/arm/boot/dts/socfpga_vt.dts8
6 files changed, 138 insertions, 17 deletions
diff --git a/Documentation/devicetree/bindings/net/socfpga-dwmac.txt b/Documentation/devicetree/bindings/net/socfpga-dwmac.txt
new file mode 100644
index 000000000000..d53d3765b2c6
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/socfpga-dwmac.txt
@@ -0,0 +1,35 @@
1Altera SOCFPGA SoC DWMAC controller
2
3The device node has following properties.
4
5Required properties:
6 - compatible : Should contain "altr,socfpga-stmmac"
7 - altr,sysmgr-syscon : Should be the phandle to the system manager node that
8 encompasses the glue register, and the register offset.
9
10Sub-nodes:
11The dwmac core should be added as subnode to SOCFPGA dwmac glue.
12- dwmac : The binding details of dwmac can be found in
13 Documentation/devicetree/bindings/net/stmmac.txt
14
15Example:
16
17ethernet0: ethernet0 {
18 #address-cells = <1>;
19 #size-cells = <1>;
20
21 compatible = "altr,socfpga-stmmac";
22 altr,sysmgr-syscon = <&sysmgr 0x60>;
23 status = "disabled";
24 ranges;
25
26 gmac0: gmac0@ff700000 {
27 compatible = "snps,dwmac-3.70a", "snps,dwmac";
28 reg = <0xff700000 0x2000>;
29 interrupts = <0 115 4>;
30 interrupt-names = "macirq";
31 mac-address = [00 00 00 00 00 00];/* Filled in by U-Boot */
32 clocks = <&emac0_clk>;
33 clock-names = "stmmaceth";
34 };
35};
diff --git a/arch/arm/boot/dts/socfpga.dtsi b/arch/arm/boot/dts/socfpga.dtsi
index 537f1a5c07f5..3796141fb8bd 100644
--- a/arch/arm/boot/dts/socfpga.dtsi
+++ b/arch/arm/boot/dts/socfpga.dtsi
@@ -441,26 +441,43 @@
441 }; 441 };
442 }; 442 };
443 443
444 gmac0: ethernet@ff700000 { 444 ethernet0: ethernet0 {
445 compatible = "altr,socfpga-stmmac", "snps,dwmac-3.70a", "snps,dwmac"; 445 #address-cells = <1>;
446 reg = <0xff700000 0x2000>; 446 #size-cells = <1>;
447 interrupts = <0 115 4>; 447 compatible = "altr,socfpga-stmmac";
448 interrupt-names = "macirq"; 448 altr,sysmgr-syscon = <&sysmgr 0x60>;
449 mac-address = [00 00 00 00 00 00];/* Filled in by U-Boot */
450 clocks = <&emac0_clk>;
451 clock-names = "stmmaceth";
452 status = "disabled"; 449 status = "disabled";
450 ranges;
451
452 gmac0: gmac0@ff700000 {
453 compatible = "snps,dwmac-3.70a", "snps,dwmac";
454 reg = <0xff700000 0x2000>;
455 interrupts = <0 115 4>;
456 interrupt-names = "macirq";
457 mac-address = [00 00 00 00 00 00];/* Filled in by U-Boot */
458 clocks = <&emac0_clk>;
459 clock-names = "stmmaceth";
460 };
453 }; 461 };
454 462
455 gmac1: ethernet@ff702000 { 463 ethernet1: ethernet1 {
456 compatible = "altr,socfpga-stmmac", "snps,dwmac-3.70a", "snps,dwmac"; 464 #address-cells = <1>;
457 reg = <0xff702000 0x2000>; 465 #size-cells = <1>;
458 interrupts = <0 120 4>; 466 compatible = "altr,socfpga-stmmac";
459 interrupt-names = "macirq"; 467 altr,sysmgr-syscon = <&sysmgr 0x60>;
460 mac-address = [00 00 00 00 00 00];/* Filled in by U-Boot */
461 clocks = <&emac1_clk>;
462 clock-names = "stmmaceth";
463 status = "disabled"; 468 status = "disabled";
469 ranges;
470
471 gmac1: gmac1@ff702000 {
472 device_type = "network";
473 compatible = "snps,dwmac-3.70a", "snps,dwmac";
474 reg = <0xff702000 0x2000>;
475 interrupts = <0 120 4>;
476 interrupt-names = "macirq";
477 mac-address = [00 00 00 00 00 00];/* Filled in by U-Boot */
478 clocks = <&emac1_clk>;
479 clock-names = "stmmaceth";
480 };
464 }; 481 };
465 482
466 L2: l2-cache@fffef000 { 483 L2: l2-cache@fffef000 {
diff --git a/arch/arm/boot/dts/socfpga_arria5_socdk.dts b/arch/arm/boot/dts/socfpga_arria5_socdk.dts
index 5beffb2265f4..2d6b38ba9370 100644
--- a/arch/arm/boot/dts/socfpga_arria5_socdk.dts
+++ b/arch/arm/boot/dts/socfpga_arria5_socdk.dts
@@ -37,4 +37,28 @@
37 */ 37 */
38 ethernet0 = &gmac1; 38 ethernet0 = &gmac1;
39 }; 39 };
40
41 aliases {
42 /* this allow the ethaddr uboot environmnet variable contents
43 * to be added to the gmac1 device tree blob.
44 */
45 ethernet0 = &gmac1;
46 };
47};
48
49&ethernet1 {
50 status = "okay";
51};
52
53&gmac1 {
54 phy-mode = "rgmii";
55
56 rxd0-skew-ps = <0>;
57 rxd1-skew-ps = <0>;
58 rxd2-skew-ps = <0>;
59 rxd3-skew-ps = <0>;
60 txen-skew-ps = <0>;
61 txc-skew-ps = <2600>;
62 rxdv-skew-ps = <0>;
63 rxc-skew-ps = <2000>;
40}; 64};
diff --git a/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts b/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
index 2ee52ab8cabb..26c63a07f8b9 100644
--- a/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
+++ b/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
@@ -38,3 +38,20 @@
38 ethernet0 = &gmac1; 38 ethernet0 = &gmac1;
39 }; 39 };
40}; 40};
41
42&ethernet1 {
43 status = "okay";
44};
45
46&gmac1 {
47 phy-mode = "rgmii";
48
49 rxd0-skew-ps = <0>;
50 rxd1-skew-ps = <0>;
51 rxd2-skew-ps = <0>;
52 rxd3-skew-ps = <0>;
53 txen-skew-ps = <0>;
54 txc-skew-ps = <2600>;
55 rxdv-skew-ps = <0>;
56 rxc-skew-ps = <2000>;
57};
diff --git a/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts b/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts
index 50b99a2c12ae..469bb5cac886 100644
--- a/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts
+++ b/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts
@@ -30,8 +30,28 @@
30 device_type = "memory"; 30 device_type = "memory";
31 reg = <0x0 0x40000000>; /* 1GB */ 31 reg = <0x0 0x40000000>; /* 1GB */
32 }; 32 };
33
34 aliases {
35 /* this allow the ethaddr uboot environmnet variable contents
36 * to be added to the gmac1 device tree blob.
37 */
38 ethernet0 = &gmac1;
39 };
33}; 40};
34 41
35&gmac1 { 42&ethernet1 {
36 status = "okay"; 43 status = "okay";
37}; 44};
45
46&gmac1 {
47 phy-mode = "rgmii";
48
49 rxd0-skew-ps = <0>;
50 rxd1-skew-ps = <0>;
51 rxd2-skew-ps = <0>;
52 rxd3-skew-ps = <0>;
53 txen-skew-ps = <0>;
54 txc-skew-ps = <2600>;
55 rxdv-skew-ps = <0>;
56 rxc-skew-ps = <2000>;
57};
diff --git a/arch/arm/boot/dts/socfpga_vt.dts b/arch/arm/boot/dts/socfpga_vt.dts
index d1ec0cab2dee..c01acce2e8a5 100644
--- a/arch/arm/boot/dts/socfpga_vt.dts
+++ b/arch/arm/boot/dts/socfpga_vt.dts
@@ -75,3 +75,11 @@
75 }; 75 };
76 }; 76 };
77}; 77};
78
79&ethernet0 {
80 status = "okay";
81};
82
83&gmac0 {
84 phy-mode = "gmii";
85};