From patchwork Mon Jun 16 09:23:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 31924 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f69.google.com (mail-qa0-f69.google.com [209.85.216.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B6F0C206A0 for ; Mon, 16 Jun 2014 09:23:49 +0000 (UTC) Received: by mail-qa0-f69.google.com with SMTP id w8sf17662544qac.0 for ; Mon, 16 Jun 2014 02:23:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:date:from:to:cc:subject:message-id :references:mime-version:in-reply-to:user-agent:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe :content-type:content-disposition; bh=6ixNBONfbg3tjgcItZgZSuPI2rg70fBsBDIyuvCxMsc=; b=AwqH/KE3/cY2LzS1ucS31tH+wWQgfifKmXOD3uUOH9hssbW1bKAGmjd2duhvHro33J AQju4O+pFXndl/3R4/uYcBQG4AegBUENkfeFqCIXHNNFTpkmThsbvLCxg1gkmxwegeWE Ho5nvU9cP2nkmf0ZOlDUZ0JTRNue+VhhrDPM7wZ88XPFsA8xO/AxQPXEtq99E+Lc3S2x stlDzxUmZX0tTKteXmvvFWHUlGGVB2Hz2KTLqy63+ev0v5HT3TydOy64xiHiJRPgfAmi OYah+smfs8Ukpby8X+4B0a8hGYIORL3Wd5TOyAuPQGtpmjz1+VCXvMWKuHHQ7mUg7iTA zCeg== X-Gm-Message-State: ALoCoQndEp5rVHfMECEXIk6cl/ewwuK5U+K7nFfzqcyjOEAfZWqD+oxdHsH0Hv0gLE6oeeYMZGrg X-Received: by 10.236.134.49 with SMTP id r37mr258756yhi.14.1402910629544; Mon, 16 Jun 2014 02:23:49 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.30.165 with SMTP id d34ls4333736qgd.25.gmail; Mon, 16 Jun 2014 02:23:49 -0700 (PDT) X-Received: by 10.58.210.68 with SMTP id ms4mr14752124vec.6.1402910629461; Mon, 16 Jun 2014 02:23:49 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id yf17si3880944vdb.9.2014.06.16.02.23.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 16 Jun 2014 02:23:49 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.182 as permitted sender) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id il7so4738745vcb.27 for ; Mon, 16 Jun 2014 02:23:49 -0700 (PDT) X-Received: by 10.58.109.71 with SMTP id hq7mr4008755veb.26.1402910629360; Mon, 16 Jun 2014 02:23:49 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.54.6 with SMTP id vs6csp120984vcb; Mon, 16 Jun 2014 02:23:48 -0700 (PDT) X-Received: by 10.66.66.202 with SMTP id h10mr22674457pat.70.1402910628567; Mon, 16 Jun 2014 02:23:48 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pt9si10300177pbb.75.2014.06.16.02.23.47; Mon, 16 Jun 2014 02:23:47 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755028AbaFPJXq (ORCPT + 9 others); Mon, 16 Jun 2014 05:23:46 -0400 Received: from mail-wi0-f181.google.com ([209.85.212.181]:38669 "EHLO mail-wi0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754834AbaFPJXp (ORCPT ); Mon, 16 Jun 2014 05:23:45 -0400 Received: by mail-wi0-f181.google.com with SMTP id n3so3661393wiv.8 for ; Mon, 16 Jun 2014 02:23:44 -0700 (PDT) X-Received: by 10.180.221.229 with SMTP id qh5mr25248934wic.33.1402910624185; Mon, 16 Jun 2014 02:23:44 -0700 (PDT) Received: from griffinp-ThinkPad-X1-Carbon-2nd (host86-181-29-77.range86-181.btcentralplus.com. [86.181.29.77]) by mx.google.com with ESMTPSA id pq9sm17835317wjc.35.2014.06.16.02.23.42 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 16 Jun 2014 02:23:43 -0700 (PDT) Date: Mon, 16 Jun 2014 10:23:39 +0100 From: Peter Griffin To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, maxime.coquelin@st.com, patrice.chotard@st.com, srinivas.kandagatla@gmail.com Cc: lee.jones@linaro.org, gabriel.fernandez@st.com, daniel.thompson@linaro.org Subject: [PATCH V2] ARM: STi: DT: Properly define sti-ethclk & stmmaceth for stih415/6 Message-ID: <20140616092339.GB27978@griffinp-ThinkPad-X1-Carbon-2nd> References: <1402345355-5682-1-git-send-email-peter.griffin@linaro.org> MIME-Version: 1.0 In-Reply-To: <1402345355-5682-1-git-send-email-peter.griffin@linaro.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.griffin@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.182 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Content-Disposition: inline This patch fixes two problems: - 1) The device tree isn't currently providing sti-ethclk which is required by the dwmac glue code to correctly configure the ethernet PHY clock speed. This means depending on what the bootloader/jtag has configured this clock to, and what switch/hub the board is plugged into you most likely will NOT successfully negotiate a ethernet link. 2) The stmmaceth clock was associated with the wrong clock. It was referencing the PHY clock rather than the interconnect clock which clocks the IP. This patch also brings us closer to not having to boot the upstream kernel with the clk_ignore_unused parameter. Signed-off-by: Peter Griffin Acked-by: Maxime Coquelin --- arch/arm/boot/dts/stih415.dtsi | 8 ++++---- arch/arm/boot/dts/stih416.dtsi | 8 ++++---- include/dt-bindings/clock/stih415-clks.h | 1 + include/dt-bindings/clock/stih416-clks.h | 1 + 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/arch/arm/boot/dts/stih415.dtsi b/arch/arm/boot/dts/stih415.dtsi index d6f254f..a0f6f75 100644 --- a/arch/arm/boot/dts/stih415.dtsi +++ b/arch/arm/boot/dts/stih415.dtsi @@ -169,8 +169,8 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_mii0>; - clock-names = "stmmaceth"; - clocks = <&clk_s_a1_ls CLK_GMAC0_PHY>; + clock-names = "stmmaceth", "sti-ethclk"; + clocks = <&clk_s_a1_ls CLK_ICN_IF_2>, <&clk_s_a1_ls CLK_GMAC0_PHY>; }; ethernet1: dwmac@fef08000 { @@ -192,8 +192,8 @@ reset-names = "stmmaceth"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_mii1>; - clock-names = "stmmaceth"; - clocks = <&clk_s_a0_ls CLK_ETH1_PHY>; + clock-names = "stmmaceth", "sti-ethclk"; + clocks = <&clk_s_a0_ls CLK_ICN_REG>, <&clk_s_a0_ls CLK_ETH1_PHY>; }; rc: rc@fe518000 { diff --git a/arch/arm/boot/dts/stih416.dtsi b/arch/arm/boot/dts/stih416.dtsi index 06473c5..84758d7 100644 --- a/arch/arm/boot/dts/stih416.dtsi +++ b/arch/arm/boot/dts/stih416.dtsi @@ -175,8 +175,8 @@ reset-names = "stmmaceth"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_mii0>; - clock-names = "stmmaceth"; - clocks = <&clk_s_a1_ls CLK_GMAC0_PHY>; + clock-names = "stmmaceth", "sti-ethclk"; + clocks = <&clk_s_a1_ls CLK_ICN_IF_2>, <&clk_s_a1_ls CLK_GMAC0_PHY>; }; ethernet1: dwmac@fef08000 { @@ -197,8 +197,8 @@ reset-names = "stmmaceth"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_mii1>; - clock-names = "stmmaceth"; - clocks = <&clk_s_a0_ls CLK_ETH1_PHY>; + clock-names = "stmmaceth", "sti-ethclk"; + clocks = <&clk_s_a0_ls CLK_ICN_REG>, <&clk_s_a0_ls CLK_ETH1_PHY>; }; rc: rc@fe518000 { diff --git a/include/dt-bindings/clock/stih415-clks.h b/include/dt-bindings/clock/stih415-clks.h index 0d2c739..d80caa6 100644 --- a/include/dt-bindings/clock/stih415-clks.h +++ b/include/dt-bindings/clock/stih415-clks.h @@ -10,6 +10,7 @@ #define CLK_ETH1_PHY 4 /* CLOCKGEN A1 */ +#define CLK_ICN_IF_2 0 #define CLK_GMAC0_PHY 3 #endif diff --git a/include/dt-bindings/clock/stih416-clks.h b/include/dt-bindings/clock/stih416-clks.h index 552c779..f9bdbd1 100644 --- a/include/dt-bindings/clock/stih416-clks.h +++ b/include/dt-bindings/clock/stih416-clks.h @@ -10,6 +10,7 @@ #define CLK_ETH1_PHY 4 /* CLOCKGEN A1 */ +#define CLK_ICN_IF_2 0 #define CLK_GMAC0_PHY 3 #endif