dts: socfpga: Add DTS entry for adding the stmmac glue layer for stmmac.
authorDinh Nguyen <dinguyen@altera.com>
Thu, 27 Mar 2014 03:45:11 +0000 (22:45 -0500)
committerArnd Bergmann <arnd@arndb.de>
Sat, 29 Mar 2014 00:11:46 +0000 (01:11 +0100)
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>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Documentation/devicetree/bindings/net/socfpga-dwmac.txt [new file with mode: 0644]
arch/arm/boot/dts/socfpga.dtsi
arch/arm/boot/dts/socfpga_arria5_socdk.dts
arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
arch/arm/boot/dts/socfpga_cyclone5_sockit.dts
arch/arm/boot/dts/socfpga_vt.dts

diff --git a/Documentation/devicetree/bindings/net/socfpga-dwmac.txt b/Documentation/devicetree/bindings/net/socfpga-dwmac.txt
new file mode 100644 (file)
index 0000000..636f0ac
--- /dev/null
@@ -0,0 +1,27 @@
+Altera SOCFPGA SoC DWMAC controller
+
+This is a variant of the dwmac/stmmac driver an inherits all descriptions
+present in Documentation/devicetree/bindings/net/stmmac.txt.
+
+The device node has additional properties:
+
+Required properties:
+ - compatible  : Should contain "altr,socfpga-stmmac" along with
+                 "snps,dwmac" and any applicable more detailed
+                 designware version numbers documented in stmmac.txt
+ - altr,sysmgr-syscon : Should be the phandle to the system manager node that
+   encompasses the glue register, the register offset, and the register shift.
+
+Example:
+
+gmac0: ethernet@ff700000 {
+       compatible = "altr,socfpga-stmmac", "snps,dwmac-3.70a", "snps,dwmac";
+       altr,sysmgr-syscon = <&sysmgr 0x60 0>;
+       status = "disabled";
+       reg = <0xff700000 0x2000>;
+       interrupts = <0 115 4>;
+       interrupt-names = "macirq";
+       mac-address = [00 00 00 00 00 00];/* Filled in by U-Boot */
+       clocks = <&emac_0_clk>;
+       clocks-names = "stmmaceth";
+};
index 537f1a5c07f55538ca161a16f8d0594b6170ca62..ba51d69abbeaf8bb5691cf3a4f3f917dd2fa165e 100644 (file)
 
                gmac0: ethernet@ff700000 {
                        compatible = "altr,socfpga-stmmac", "snps,dwmac-3.70a", "snps,dwmac";
+                       altr,sysmgr-syscon = <&sysmgr 0x60 0>;
                        reg = <0xff700000 0x2000>;
                        interrupts = <0 115 4>;
                        interrupt-names = "macirq";
 
                gmac1: ethernet@ff702000 {
                        compatible = "altr,socfpga-stmmac", "snps,dwmac-3.70a", "snps,dwmac";
+                       altr,sysmgr-syscon = <&sysmgr 0x60 2>;
                        reg = <0xff702000 0x2000>;
                        interrupts = <0 120 4>;
                        interrupt-names = "macirq";
index 5beffb2265f4869c0f38ca97385d35b0ebfb5555..a87ee1c07661b466d9d8abc8ca323739f82d6b69 100644 (file)
                */
                ethernet0 = &gmac1;
        };
+
+       aliases {
+               /* this allow the ethaddr uboot environmnet variable contents
+                * to be added to the gmac1 device tree blob.
+                */
+               ethernet0 = &gmac1;
+       };
+};
+
+&gmac1 {
+       status = "okay";
+       phy-mode = "rgmii";
+
+       rxd0-skew-ps = <0>;
+       rxd1-skew-ps = <0>;
+       rxd2-skew-ps = <0>;
+       rxd3-skew-ps = <0>;
+       txen-skew-ps = <0>;
+       txc-skew-ps = <2600>;
+       rxdv-skew-ps = <0>;
+       rxc-skew-ps = <2000>;
 };
index 2ee52ab8cabbbb3613d03d3d832ccfd16ff21233..ae16d975196d62c1947cbf41187d0e47cb6a5e9a 100644 (file)
                ethernet0 = &gmac1;
        };
 };
+
+&gmac1 {
+       status = "okay";
+       phy-mode = "rgmii";
+
+       rxd0-skew-ps = <0>;
+       rxd1-skew-ps = <0>;
+       rxd2-skew-ps = <0>;
+       rxd3-skew-ps = <0>;
+       txen-skew-ps = <0>;
+       txc-skew-ps = <2600>;
+       rxdv-skew-ps = <0>;
+       rxc-skew-ps = <2000>;
+};
index 50b99a2c12aeb9549d70e09f9ea18c6bca797f1a..b79e2a2bf17522504e5384a929ee2d3226a42654 100644 (file)
                device_type = "memory";
                reg = <0x0 0x40000000>; /* 1GB */
        };
+
+       aliases {
+               /* this allow the ethaddr uboot environmnet variable contents
+                * to be added to the gmac1 device tree blob.
+                */
+               ethernet0 = &gmac1;
+       };
 };
 
 &gmac1 {
        status = "okay";
+       phy-mode = "rgmii";
+
+       rxd0-skew-ps = <0>;
+       rxd1-skew-ps = <0>;
+       rxd2-skew-ps = <0>;
+       rxd3-skew-ps = <0>;
+       txen-skew-ps = <0>;
+       txc-skew-ps = <2600>;
+       rxdv-skew-ps = <0>;
+       rxc-skew-ps = <2000>;
 };
index d1ec0cab2dee0daa986a8ddd75f10222cbcd25bb..dde2c66c50eb37f79e8c896d004177d26bdb4d2f 100644 (file)
@@ -75,3 +75,8 @@
                };
        };
 };
+
+&gmac0 {
+       status = "okay";
+       phy-mode = "gmii";
+};