From patchwork Thu Mar 27 03:45:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: dinguyen@altera.com X-Patchwork-Id: 334186 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id A8746140094 for ; Thu, 27 Mar 2014 14:48:15 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753315AbaC0DsJ (ORCPT ); Wed, 26 Mar 2014 23:48:09 -0400 Received: from mail-bn1bn0103.outbound.protection.outlook.com ([157.56.110.103]:36111 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752136AbaC0DsH (ORCPT ); Wed, 26 Mar 2014 23:48:07 -0400 Received: from BN1BFFO11FD007.protection.gbl (10.58.144.34) by BN1BFFO11HUB031.protection.gbl (10.58.144.178) with Microsoft SMTP Server (TLS) id 15.0.908.10; Thu, 27 Mar 2014 03:48:04 +0000 Received: from SJ-ITEXEDGE02.altera.priv.altera.com (66.35.236.232) by BN1BFFO11FD007.mail.protection.outlook.com (10.58.144.70) with Microsoft SMTP Server (TLS) id 15.0.908.10 via Frontend Transport; Thu, 27 Mar 2014 03:48:04 +0000 Received: from sj-mail01.altera.com (137.57.1.6) by SJ-ITEXEDGE02.altera.priv.altera.com (66.35.236.232) with Microsoft SMTP Server id 8.3.348.2; Wed, 26 Mar 2014 20:34:57 -0700 Received: from linux-builds1.altera.com (linux-builds1.altera.com [137.57.188.114]) by sj-mail01.altera.com (8.13.7+Sun/8.13.7) with ESMTP id s2R3ltAn013151; Wed, 26 Mar 2014 20:47:59 -0700 (PDT) From: To: , , , CC: , , , , , , , , , , Dinh Nguyen Subject: [PATCH 2/3] dts: socfpga: Add DTS entry for adding the stmmac glue layer for stmmac. Date: Wed, 26 Mar 2014 22:45:11 -0500 Message-ID: <1395891912-26855-3-git-send-email-dinguyen@altera.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1395891912-26855-1-git-send-email-dinguyen@altera.com> References: <1395891912-26855-1-git-send-email-dinguyen@altera.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: =?us-ascii?Q?CIP:66.35.236.232; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(1001?= =?us-ascii?Q?9001)(6009001)(458001)(189002)(199002)(85852003)(90146001)(8?= =?us-ascii?Q?7286001)(56816005)(94946001)(86152002)(84676001)(95416001)(7?= =?us-ascii?Q?6796001)(74876001)(74662001)(86362001)(93916002)(575784001)(?= =?us-ascii?Q?97186001)(51856001)(89996001)(81816001)(87266001)(85306002)(?= =?us-ascii?Q?95666003)(81686001)(2009001)(93136001)(92566001)(92726001)(2?= =?us-ascii?Q?201001)(83072002)(74502001)(47446002)(76786001)(77096001)(53?= =?us-ascii?Q?806001)(76482001)(97736001)(98676001)(77156001)(97336001)(94?= =?us-ascii?Q?316002)(36756003)(62966002)(54316002)(63696002)(80976001)(50?= =?us-ascii?Q?226001)(4396001)(47736001)(47976001)(50986001)(87936001)(195?= =?us-ascii?Q?80395003)(6806004)(19580405001)(83322001)(49866001)(47776003?= =?us-ascii?Q?)(20776003)(79102001)(74706001)(48376002)(65816001)(80022001?= =?us-ascii?Q?)(59766001)(77982001)(31966008)(50466002)(33646001)(74366001?= =?us-ascii?Q?)(44976005)(69226001)(53416003)(93516002)(56776001)(81342001?= =?us-ascii?Q?)(46102001)(81542001); DIR:OUT; SFP:1102; SCL:1; SRVR:BN1BFFO11H?= =?us-ascii?Q?UB031; H:SJ-ITEXEDGE02.altera.priv.altera.com; FPR:EC24E60E.3B?= =?us-ascii?Q?36B419.4878913B.8FE122BD.20361; MLV:sfv; PTR:InfoDomainNonexis?= =?us-ascii?Q?tent;MX:1;A:1;LANG:en;?= X-OriginatorOrg: altera.onmicrosoft.com X-Forefront-PRVS: 01630974C0 Received-SPF: SoftFail (: domain of transitioning altera.com discourages use of 66.35.236.232 as permitted sender) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Dinh Nguyen This patch adds the dts bindings documenation for the Altera SOCFPGA glue layer for the Synopsys STMMAC ethernet driver. Signed-off-by: Dinh Nguyen --- .../devicetree/bindings/net/socfpga-dwmac.txt | 27 ++++++++++++++++++++ arch/arm/boot/dts/socfpga.dtsi | 2 ++ arch/arm/boot/dts/socfpga_arria5_socdk.dts | 21 +++++++++++++++ arch/arm/boot/dts/socfpga_cyclone5_socdk.dts | 14 ++++++++++ arch/arm/boot/dts/socfpga_cyclone5_sockit.dts | 17 ++++++++++++ arch/arm/boot/dts/socfpga_vt.dts | 5 ++++ 6 files changed, 86 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/socfpga-dwmac.txt diff --git a/Documentation/devicetree/bindings/net/socfpga-dwmac.txt b/Documentation/devicetree/bindings/net/socfpga-dwmac.txt new file mode 100644 index 0000000..636f0ac --- /dev/null +++ b/Documentation/devicetree/bindings/net/socfpga-dwmac.txt @@ -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"; +}; diff --git a/arch/arm/boot/dts/socfpga.dtsi b/arch/arm/boot/dts/socfpga.dtsi index 537f1a5..ba51d69 100644 --- a/arch/arm/boot/dts/socfpga.dtsi +++ b/arch/arm/boot/dts/socfpga.dtsi @@ -443,6 +443,7 @@ 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"; @@ -454,6 +455,7 @@ 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"; diff --git a/arch/arm/boot/dts/socfpga_arria5_socdk.dts b/arch/arm/boot/dts/socfpga_arria5_socdk.dts index 5beffb2..a87ee1c 100644 --- a/arch/arm/boot/dts/socfpga_arria5_socdk.dts +++ b/arch/arm/boot/dts/socfpga_arria5_socdk.dts @@ -37,4 +37,25 @@ */ 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>; }; diff --git a/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts b/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts index 2ee52ab..ae16d97 100644 --- a/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts +++ b/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts @@ -38,3 +38,17 @@ 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>; +}; diff --git a/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts b/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts index 50b99a2..b79e2a2 100644 --- a/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts +++ b/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts @@ -30,8 +30,25 @@ 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>; }; diff --git a/arch/arm/boot/dts/socfpga_vt.dts b/arch/arm/boot/dts/socfpga_vt.dts index d1ec0ca..dde2c66 100644 --- a/arch/arm/boot/dts/socfpga_vt.dts +++ b/arch/arm/boot/dts/socfpga_vt.dts @@ -75,3 +75,8 @@ }; }; }; + +&gmac0 { + status = "okay"; + phy-mode = "gmii"; +};