From patchwork Thu Sep 15 19:16:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 9334637 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 0318D601C2 for ; Thu, 15 Sep 2016 19:21:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E4C6A29ADD for ; Thu, 15 Sep 2016 19:21:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D877129B05; Thu, 15 Sep 2016 19:21:22 +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.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_MED,T_DKIM_INVALID 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 6C58029ADD for ; Thu, 15 Sep 2016 19:21:22 +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 1bkcCQ-0001S0-CZ; Thu, 15 Sep 2016 19:19:54 +0000 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bkcAv-0000TP-9n for linux-arm-kernel@lists.infradead.org; Thu, 15 Sep 2016 19:18:25 +0000 Received: by mail-pf0-x242.google.com with SMTP id 21so1138473pfy.1 for ; Thu, 15 Sep 2016 12:18:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=vXGX4e1aMTumR7WSOCh9idH4AQg/I0sKqkrcPeA6vgE=; b=NlFYxXxWdMgOrcbUNB7zxlc+gnI3l3E98dpI9j8fcCPGhwm5djUSzjJXsubWxZ7rcg 7qo+TV9YIipoK+14lsq95nlNHThPpY+z/5iBhR+fDuphQSnL3iMCiVgr8L8+f11+RMWD hoRtmLJQjtt+A1YN6OJ1DD1XYaEL6rlGy2l3h8T3KHKZ72E6zOladfW39lYGYfPDZYwH oOk95YMzl3Ga/kmG3uiwDY98+W31dIb4HIcd2CyQnwr+ZwtJqIrnGsKyYmj/FmCte7fY 1LbvKALd39SOQAKd/W+IlqiT3Jmf/t4xIosl85tAeKMrxk4DCMhQzKG8G+rMQ4PZuhaI 1nMQ== 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=vXGX4e1aMTumR7WSOCh9idH4AQg/I0sKqkrcPeA6vgE=; b=DO58xHHqqrc89/4/y0Jxnl/7nR8cjwcWyC9xp92Pz9uHywvnDgzeNtHTdzJD2LH4oh zyfJOAn89C1rQyTmzXMG2ZXmoZ+XclYW03rtmkThtXBXBhXcpuSLOE8X8NQtmIkHbqaS TpFeADiF+HOc1zQtDZ63ofcT43K88j56QDyDxuTaVvLUZnVn3n5YHBXEtaX1wyAjYSkb nj5vErc41anvK7gTkEj2YcJIhJVwvdXwUIISQD8zTnrwRiwlcPDBxFh2FW/eESejI9zO xPpkX2v6znSwZ3tpQH4L+5mCv3B6Mn+K2LAou53x2JvN9oefVRV2E4T0BLIZu54nU0Kq YZ3Q== X-Gm-Message-State: AE9vXwN7ub5+FlnVyLsCG8/9qdVao99v9YOmrr+ldKNMfcgcT4znIPpGjov9MwJ2l4ONkw== X-Received: by 10.98.66.212 with SMTP id h81mr17021641pfd.51.1473967084286; Thu, 15 Sep 2016 12:18:04 -0700 (PDT) Received: from Mr.J ([49.204.230.134]) by smtp.gmail.com with ESMTPSA id m5sm6803252paw.40.2016.09.15.12.18.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Sep 2016 12:18:03 -0700 (PDT) From: Jagan Teki X-Google-Original-From: Jagan Teki To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v5 6/6] ARM: dts: imx6qdl-icore: Add FEC support Date: Fri, 16 Sep 2016 00:46:55 +0530 Message-Id: <1473967015-8523-7-git-send-email-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1473967015-8523-1-git-send-email-jagan@amarulasolutions.com> References: <1473967015-8523-1-git-send-email-jagan@amarulasolutions.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160915_121821_532472_AD48E4F8 X-CRM114-Status: GOOD ( 11.21 ) 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 , Shawn Guo 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 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 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 a0ca442..77df730 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"; @@ -91,6 +103,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>; @@ -148,6 +169,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