From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id E7745E00978; Mon, 15 Jun 2015 07:50:54 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [193.201.172.119 listed in list.dnswl.org] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (picmaster[at]mail.bg) * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's * domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Received: from mx3.mail.bg (mx3.mail.bg [193.201.172.119]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 27C14E00960 for ; Mon, 15 Jun 2015 07:50:52 -0700 (PDT) Received: from [192.168.0.62] (unknown [93.152.143.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx3.mail.bg (Postfix) with ESMTPSA id 5669B202CE7C; Mon, 15 Jun 2015 17:50:51 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mail.bg; s=default; t=1434379851; bh=I96o8mPOjTRbbDN98YuHO5MynaqURm4OfmDschr/Wvw=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:Content-Type: Content-Transfer-Encoding; b=b8L13E32K4tBAR+FMlDVpPph+KsFk8pFzMORKqvLu+N7Pp5V7BiQuhrqxHm0nobmX qAEwqX1+iY39w+cdRMiz2wRXcE1WYu82YQAJekWCx+Yrq/ENj+OPqHiatRDkytUgsK ZWX2T09nZShRYNcaRBc0+Kmw0pqVRSDCsKOIO8GI= Message-ID: <557EE64B.8050501@mail.bg> Date: Mon, 15 Jun 2015 17:50:51 +0300 From: Nikolay Dimitrov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-Version: 1.0 To: "meta-freescale@yoctoproject.org" Cc: Gary Thomas Subject: Kernel 3.14.28 can't set ENET_REF_CLK to 50 MHz X-BeenThere: meta-freescale@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-fsl-* layers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2015 14:50:55 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi gang, FYI - some time ago I've had such issue, described in this ML thread: https://lists.yoctoproject.org/pipermail/meta-freescale/2015-May/013786.html The issue happens again on FSL kernel 3.14.28, under same HW conditions (imx6q-based board, 100 MBit/s RMII PHY using 50 MHZ refclk from SoC pin GPIO_16). Last time Gary Thomas posted a solution for this issue, which works with slight changes works on 3.14.28: diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index f0d8000..1cab088 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx/clk-imx6q.c @@ -568,8 +568,20 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) imx_clk_prepare_enable(clk[IMX6QDL_CLK_USBPHY2_GATE]); } - /*Set enet_ref clock to 125M to supply for RGMII tx_clk */ - clk_set_rate(clk[IMX6QDL_CLK_ENET_REF], 125000000); + /* Set enet_ref clock to 125M to supply for RGMII tx_clk */ + imx_clk_set_rate(clk[IMX6QDL_CLK_ENET_REF], 125000000); + np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-fec"); + if (np) { + u32 clock_frequency; + int ret; + ret = of_property_read_u32(np, "ref-clock", &clock_frequency); + if (ret == 0) { + printk("ref-clock: %d\n", clock_frequency); + imx_clk_set_rate(clk[IMX6QDL_CLK_ENET_REF], clock_frequency); + } + } + // This clock may be needed very early on + imx_clk_prepare_enable(clk[IMX6QDL_CLK_ENET_REF]); #ifdef CONFIG_MX6_VPU_352M /* Hope this helps. Have a great week everyone, Nikolay