From patchwork Tue Jul 8 18:40:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 4508201 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 461EBBEEAA for ; Tue, 8 Jul 2014 18:44:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6037C202E5 for ; Tue, 8 Jul 2014 18:44:18 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B12AD20270 for ; Tue, 8 Jul 2014 18:44:16 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X4aKm-0001qW-25; Tue, 08 Jul 2014 18:41:44 +0000 Received: from galois.linutronix.de ([2001:470:1f0b:db:abcd:42:0:1]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X4aKe-0001oW-Ee for linux-arm-kernel@lists.infradead.org; Tue, 08 Jul 2014 18:41:37 +0000 Received: from localhost ([127.0.0.1] helo=bazinga.breakpoint.cc) by Galois.linutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1X4aKH-0004wv-O1; Tue, 08 Jul 2014 20:41:14 +0200 From: Sebastian Andrzej Siewior To: linux-omap@vger.kernel.org Subject: [PATCH 2/3] arm: dts: dra7: Enable CPSW and MDIO for dra7xx EVM Date: Tue, 8 Jul 2014 20:40:51 +0200 Message-Id: <1404844852-19980-2-git-send-email-bigeasy@linutronix.de> X-Mailer: git-send-email 2.0.1 In-Reply-To: <1404844852-19980-1-git-send-email-bigeasy@linutronix.de> References: <1404844852-19980-1-git-send-email-bigeasy@linutronix.de> X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1, SHORTCIRCUIT=-0.0001 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140708_114136_653053_5F8473E4 X-CRM114-Status: UNSURE ( 8.94 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) Cc: devicetree@vger.kernel.org, Mugunthan V N , Tony Lindgren , Sebastian Andrzej Siewior , Felipe Balbi , Praveen Rao , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Mugunthan V N Adding CPSW phy-id, CPSW and MDIO pinmux configuration for active and sleep states and enable them in board evm dts file. Signed-off-by: Mugunthan V N [Resolved merge conflict and rebased on 3.8 kernel. Update the pinmux configuration for CPSW and MDIO by removing the macro definitons to match the 3.8 implementation.] Signed-off-by: Praveen Rao Signed-off-by: Sebastian Andrzej Siewior --- arch/arm/boot/dts/dra7-evm.dts | 61 ++++++++++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/dra7.dtsi | 48 +++++++++++++++++++++++++++++++++ 2 files changed, 109 insertions(+) diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts index 4adc280..956a7bd 100644 --- a/arch/arm/boot/dts/dra7-evm.dts +++ b/arch/arm/boot/dts/dra7-evm.dts @@ -94,6 +94,46 @@ >; }; + cpsw_default_pins: pinmux_cpsw_default_pins { + pinctrl-single,pins = < + /* Slave 1 */ + 0x250 0x0 /* rgmii1_tclk PIN_OUTPUT | MUX_MODE0 */ + 0x254 0x0 /* rgmii1_tctl PIN_OUTPUT | MUX_MODE0 */ + 0x258 0x0 /* rgmii1_td3 PIN_OUTPUT | MUX_MODE0 */ + 0x25c 0x0 /* rgmii1_td2 PIN_OUTPUT | MUX_MODE0 */ + 0x260 0x0 /* rgmii1_td1 PIN_OUTPUT | MUX_MODE0 */ + 0x264 0x0 /* rgmii1_td0 PIN_OUTPUT | MUX_MODE0 */ + 0x268 0x00040000 /* rgmii1_rclk PIN_INPUT | MUX_MODE0 */ + 0x26c 0x00040000 /* rgmii1_rctl PIN_INPUT | MUX_MODE0 */ + 0x270 0x00040000 /* rgmii1_rd3 PIN_INPUT | MUX_MODE0 */ + 0x274 0x00040000 /* rgmii1_rd2 PIN_INPUT | MUX_MODE0 */ + 0x278 0x00040000 /* rgmii1_rd1 PIN_INPUT | MUX_MODE0 */ + 0x27c 0x00040000 /* rgmii1_rd0 PIN_INPUT | MUX_MODE0 */ + + /* Slave 2 */ + 0x198 0x4 /* rgmii2_tclk PIN_OUTPUT | MUX_MODE4 */ + 0x19c 0x4 /* rgmii2_tctl PIN_OUTPUT | MUX_MODE4 */ + 0x1a0 0x4 /* rgmii2_td3 PIN_OUTPUT | MUX_MODE4 */ + 0x1a4 0x4 /* rgmii2_td2 PIN_OUTPUT | MUX_MODE4 */ + 0x1a8 0x4 /* rgmii2_td1 PIN_OUTPUT | MUX_MODE4 */ + 0x1ac 0x4 /* rgmii2_td0 PIN_OUTPUT | MUX_MODE4 */ + 0x1b0 0x00040004 /* rgmii2_rclk PIN_INPUT | MUX_MODE4 */ + 0x1b4 0x00040004 /* rgmii2_rctl PIN_INPUT | MUX_MODE4 */ + 0x1b8 0x00040004 /* rgmii2_rd3 PIN_INPUT | MUX_MODE4 */ + 0x1bc 0x00040004 /* rgmii2_rd2 PIN_INPUT | MUX_MODE4 */ + 0x1c0 0x00040004 /* rgmii2_rd1 PIN_INPUT | MUX_MODE4 */ + 0x1c4 0x00040004 /* rgmii2_rd0 PIN_INPUT | MUX_MODE4 */ + >; + }; + + davinci_mdio_default_pins: pinmux_davinci_mdio_default_pins { + pinctrl-single,pins = < + /* MDIO */ + 0x23c 0x30000 /* mdio_data PIN_OUTPUT_PULLUP | MUX_MODE0 */ + 0x240 0x70000 /* mdio_clk PIN_INPUT_PULLUP | MUX_MODE0 */ + >; + }; + qspi1_pins: pinmux_qspi1_pins { pinctrl-single,pins = < 0x4c (PIN_INPUT | MUX_MODE1) /* gpmc_a3.qspi1_cs2 */ @@ -332,6 +372,27 @@ cpu0-supply = <&smps123_reg>; }; +&gmac { + status="okay"; + pinctrl-names = "default"; + pinctrl-0 = <&cpsw_default_pins>; +}; + +&davinci_mdio { + pinctrl-names = "default"; + pinctrl-0 = <&davinci_mdio_default_pins>; +}; + +&cpsw_emac0 { + phy_id = <&davinci_mdio>, <2>; + phy-mode = "rgmii-txid"; +}; + +&cpsw_emac1 { + phy_id = <&davinci_mdio>, <3>; + phy-mode = "rgmii-txid"; +}; + &qspi { status = "okay"; pinctrl-names = "default"; diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi index c29945e..daf7d36 100644 --- a/arch/arm/boot/dts/dra7.dtsi +++ b/arch/arm/boot/dts/dra7.dtsi @@ -763,6 +763,54 @@ status = "disabled"; }; + gmac: ethernet@48484000 { + compatible = "ti,cpsw"; + ti,hwmods = "gmac"; + cpdma_channels = <8>; + ale_entries = <1024>; + bd_ram_size = <0x2000>; + no_bd_ram = <0>; + rx_descs = <64>; + mac_control = <0x20>; + slaves = <2>; + active_slave = <0>; + cpts_clock_mult = <0x80000000>; + cpts_clock_shift = <29>; + reg = <0x48484000 0x800 + 0x48485200 0x100>; + #address-cells = <1>; + #size-cells = <1>; + /* + * rx_thresh_pend + * rx_pend + * tx_pend + * misc_pend + */ + interrupts = <0 50 0x4>, + <0 51 0x4>, + <0 52 0x4>, + <0 53 0x4>; + ranges; + status = "disabled"; + + davinci_mdio: mdio@48485000 { + compatible = "ti,davinci_mdio"; + #address-cells = <1>; + #size-cells = <0>; + ti,hwmods = "davinci_mdio"; + bus_freq = <1000000>; + reg = <0x48485000 0x100>; + }; + + cpsw_emac0: slave@48484200 { + mac-address = [ 00 00 00 00 00 00 ]; + }; + + cpsw_emac1: slave@48484300 { + mac-address = [ 00 00 00 00 00 00 ]; + }; + }; + qspi: qspi@4b300000 { compatible = "ti,dra7xxx-qspi"; reg = <0x4b300000 0x100>;