From patchwork Fri Oct 14 09:27:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 9376313 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6112B60779 for ; Fri, 14 Oct 2016 09:31:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5176E2A55A for ; Fri, 14 Oct 2016 09:31:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 465DB2A562; Fri, 14 Oct 2016 09:31:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7786A2A55A for ; Fri, 14 Oct 2016 09:31:35 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1buyoh-0006p5-H1; Fri, 14 Oct 2016 09:30:15 +0000 Received: from casper.infradead.org ([85.118.1.10]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1buynJ-0005bJ-IT for linux-arm-kernel@bombadil.infradead.org; Fri, 14 Oct 2016 09:28:49 +0000 Received: from mail-pa0-f66.google.com ([209.85.220.66]) by casper.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1buynH-0005Vu-GC for linux-arm-kernel@lists.infradead.org; Fri, 14 Oct 2016 09:28:48 +0000 Received: by mail-pa0-f66.google.com with SMTP id qn10so5888035pac.2 for ; Fri, 14 Oct 2016 02:28:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=aKtvGTY66q222QIMeCzdpqF9cfG2X3GgSJzs6fEb43s=; b=Cmg1+PkynM82HFoz6mHQ7r73enFUcsNVPnboVku4zTNbulb0sBD/j7J6wei1hr/Y3I t8rLYdnlAlsFVKsx5J3cW/jdaKKALYgSPsha55K6TH7InqXZ4vwpgFih0euMLZzUF5Hs dFuZgTm781aElXhgyBNCSVW490sV8THBEN2yu8PFiYxXhfwIJR4Tk/aE/ILQ7yY6TzCB 49fNaRlwtm8Yk0tWB6KxH4VVouh4Whhknye1KbH3oLEXcecgxiPez/RKT1moyq+oUDow G9gtkmGadrq+K8XUDXb4ce83fUlOtKdxwMdBHUfc0gIWY0ORjBh1PQuZyhZEo5Glui1i Vd2w== X-Gm-Message-State: AA6/9RlJTFGHGWDAoTtgaPqiJYgAHJe8qBVZi/e1lG/Ig2QuiMXCw74emOOKnH7a66UAHw== X-Received: by 10.66.121.49 with SMTP id lh17mr13902710pab.191.1476437305753; Fri, 14 Oct 2016 02:28:25 -0700 (PDT) Received: from Mr.J ([49.204.230.134]) by smtp.gmail.com with ESMTPSA id f2sm25715651pfj.68.2016.10.14.02.28.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Oct 2016 02:28:24 -0700 (PDT) From: Jagan Teki To: Shawn Guo Subject: [PATCH v7 5/5] ARM: dts: imx6qdl-icore: Add FEC support Date: Fri, 14 Oct 2016 14:57:23 +0530 Message-Id: <1476437243-13297-6-git-send-email-jteki@openedev.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1476437243-13297-1-git-send-email-jteki@openedev.com> References: <1476437243-13297-1-git-send-email-jteki@openedev.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161014_102847_673971_E4E94DAB X-CRM114-Status: GOOD ( 11.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Matteo Lisi , linux-kernel@vger.kernel.org, Jagan Teki , Sascha Hauer , Fabio Estevam , Michael Trimarchi , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jagan Teki Add FEC support for Engicam i.CoreM6 dql modules. Observed similar 'eth0: link is not ready' issue which was discussed in [1] due rmii mode with external ref_clk, so added clock node along with the properties mentioned by Shawn in [2] FEC link log: ------------ $ ifconfig eth0 up [ 27.905187] SMSC LAN8710/LAN8720 2188000.ethernet:00: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=2188000.ethernet:00, irq=-1) [ 27.918982] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready [1] https://patchwork.kernel.org/patch/3491061/ [2] https://patchwork.kernel.org/patch/3490511/ Cc: Sascha Hauer Cc: Fabio Estevam Cc: Shawn Guo Cc: Matteo Lisi Cc: Michael Trimarchi Signed-off-by: Jagan Teki --- Changes for v7: - none Changes for v6: - none Changes for v5: - new patch arch/arm/boot/dts/imx6qdl-icore.dtsi | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/arch/arm/boot/dts/imx6qdl-icore.dtsi b/arch/arm/boot/dts/imx6qdl-icore.dtsi index 4e79858..972f48f 100644 --- a/arch/arm/boot/dts/imx6qdl-icore.dtsi +++ b/arch/arm/boot/dts/imx6qdl-icore.dtsi @@ -48,6 +48,18 @@ reg = <0x10000000 0x80000000>; }; + clocks { + #address-cells = <1>; + #size-cells = <0>; + + rmii_clk: clock@0 { + compatible = "fixed-clock"; + reg = <0>; + #clock-cells = <0>; + clock-frequency = <25000000>; /* 25MHz for example */ + }; + }; + reg_3p3v: regulator-3p3v { compatible = "regulator-fixed"; regulator-name = "3P3V"; @@ -93,6 +105,15 @@ assigned-clock-parents = <&clks IMX6QDL_CLK_OSC>; }; +&fec { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_enet>; + phy-reset-gpios = <&gpio7 12 GPIO_ACTIVE_LOW>; + clocks = <&clks 117>, <&clks 117>, <&rmii_clk>; + phy-mode = "rmii"; + status = "okay"; +}; + &gpmi { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_gpmi_nand>; @@ -150,6 +171,22 @@ }; &iomuxc { + pinctrl_enet: enetgrp { + fsl,pins = < + MX6QDL_PAD_ENET_CRS_DV__ENET_RX_EN 0x1b0b0 + MX6QDL_PAD_GPIO_16__ENET_REF_CLK 0x1b0b1 + MX6QDL_PAD_ENET_TX_EN__ENET_TX_EN 0x1b0b0 + MX6QDL_PAD_ENET_RXD1__ENET_RX_DATA1 0x1b0b0 + MX6QDL_PAD_ENET_RXD0__ENET_RX_DATA0 0x1b0b0 + MX6QDL_PAD_ENET_TXD1__ENET_TX_DATA1 0x1b0b0 + MX6QDL_PAD_ENET_TXD0__ENET_TX_DATA0 0x1b0b0 + MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0 + MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b0b0 + MX6QDL_PAD_ENET_REF_CLK__GPIO1_IO23 0x1b0b0 + MX6QDL_PAD_GPIO_17__GPIO7_IO12 0x1b0b0 + >; + }; + pinctrl_flexcan1: flexcan1grp { fsl,pins = < MX6QDL_PAD_KEY_ROW2__FLEXCAN1_RX 0x1b020