From patchwork Mon Feb 1 13:18:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 60918 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp3072579lbb; Mon, 1 Feb 2016 05:19:09 -0800 (PST) X-Received: by 10.98.19.215 with SMTP id 84mr37041738pft.22.1454332749815; Mon, 01 Feb 2016 05:19:09 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c9si24300193pas.70.2016.02.01.05.19.09; Mon, 01 Feb 2016 05:19:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932146AbcBANTI (ORCPT + 3 others); Mon, 1 Feb 2016 08:19:08 -0500 Received: from mail-lb0-f177.google.com ([209.85.217.177]:35977 "EHLO mail-lb0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932066AbcBANTH (ORCPT ); Mon, 1 Feb 2016 08:19:07 -0500 Received: by mail-lb0-f177.google.com with SMTP id dx2so74562452lbd.3 for ; Mon, 01 Feb 2016 05:19:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=jvQejub1WRoK09P9Nlc24ko0yW8xQGAyxW2d72x6MAg=; b=BRgI7u1keWQirkFZvdmUkpD6TojPHHAh3iw6Mjz49e26NKYkokZnfmv6sU2Nb9b2yK agD8omZXNMGRF+4mQf3Cj9bTtvoIo7chqFnVhuLJifAgSWc2aWDwR7YScB15ijoMt6IB Hw/3umSgdA+3+WD4RITGilyMwOcI/xUgmQ7x0= 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; bh=jvQejub1WRoK09P9Nlc24ko0yW8xQGAyxW2d72x6MAg=; b=LizVu5QKh+T7e+JzS6L6u0paIalkhrram+gIKeDl///FMCmEYX9wVtA31iQCyRZGbM eICDFGF/w5klsfh/SvG0Jz8fSyrDB/ixRlD5QOxPwEsp5+1kr8wtJPLgRPqpVQahE1dJ geizXtnYSUwYqLBM+3VcoiZRVD8c961hLHTp4R45a6G+VkXpdb6yrJSMfwrWWhab5+H0 RvMKF6MnmEjKGUgVOwJVc0541dnvZpVZnTV4st7HnLAjOsnwWWxVK7YN1U5eI/6wx/TH klJqMHfjtqhhbal2dzXY+1L5Hv8h8vvDCFVBkGTuZS20ogaQR7852j2YfIrK0colwoJJ XShA== X-Gm-Message-State: AG10YOT0PwbCyK4KFgQZnB7i4wqAHtn2nmhGt7VuKP7syY6MOSy6licYGcBONVc4l7knI/kR X-Received: by 10.112.198.197 with SMTP id je5mr8876658lbc.23.1454332745393; Mon, 01 Feb 2016 05:19:05 -0800 (PST) Received: from localhost.localdomain.localdomain (c-3d95db54.01-192-6c756e10.cust.bredbandsbolaget.se. [84.219.149.61]) by smtp.gmail.com with ESMTPSA id 88sm3502605lfr.44.2016.02.01.05.19.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Feb 2016 05:19:03 -0800 (PST) From: Linus Walleij To: arm@kernel.org Cc: linux-arm-kernel@lists.infradead.org, Linus Walleij , stable@vger.kernel.org, Ulf Hansson Subject: [PATCH] ARM: nomadik: fix up SD/MMC DT settings Date: Mon, 1 Feb 2016 14:18:57 +0100 Message-Id: <1454332737-631-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.4.3 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The DTSI file for the Nomadik does not properly specify how the PL180 levelshifter is connected: the Nomadik actually needs all the five st,sig-dir-* flags set to properly control all lines out. Further this board supports full power cycling of the card, and since this variant has no hardware clock gating, it needs a ridiculously low frequency setting to keep up with the ever overflowing FIFO. The pin configuration set-up is a bit of a mystery, because of course these pins are a mix of inputs and outputs. However the reference implementation sets all pins to "output" with unspecified initial value, so let's do that here as well. Cc: stable@vger.kernel.org Cc: Ulf Hansson Signed-off-by: Linus Walleij --- ARM SoC folks: this fixes the non-working SD/MMC card on the Nomadik please apply this directly for fixes if Ulf is OK with it. --- arch/arm/boot/dts/ste-nomadik-stn8815.dtsi | 37 ++++++++++++++++-------------- 1 file changed, 20 insertions(+), 17 deletions(-) -- 2.4.3 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi b/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi index 50c256f0fd98..b1707f6217bf 100644 --- a/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi +++ b/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi @@ -128,22 +128,14 @@ }; mmcsd_default_mode: mmcsd_default { mmcsd_default_cfg1 { - /* MCCLK */ - pins = "GPIO8_B10"; - ste,output = <0>; - }; - mmcsd_default_cfg2 { - /* MCCMDDIR, MCDAT0DIR, MCDAT31DIR, MCDATDIR2 */ - pins = "GPIO10_C11", "GPIO15_A12", - "GPIO16_C13", "GPIO23_D15"; - ste,output = <1>; - }; - mmcsd_default_cfg3 { - /* MCCMD, MCDAT3-0, MCMSFBCLK */ - pins = "GPIO9_A10", "GPIO11_B11", - "GPIO12_A11", "GPIO13_C12", - "GPIO14_B12", "GPIO24_C15"; - ste,input = <1>; + /* + * MCCLK, MCCMDDIR, MCDAT0DIR, MCDAT31DIR, MCDATDIR2 + * MCCMD, MCDAT3-0, MCMSFBCLK + */ + pins = "GPIO8_B10", "GPIO9_A10", "GPIO10_C11", "GPIO11_B11", + "GPIO12_A11", "GPIO13_C12", "GPIO14_B12", "GPIO15_A12", + "GPIO16_C13", "GPIO23_D15", "GPIO24_C15"; + ste,output = <2>; }; }; }; @@ -803,10 +795,21 @@ clock-names = "mclk", "apb_pclk"; interrupt-parent = <&vica>; interrupts = <22>; - max-frequency = <48000000>; + max-frequency = <400000>; bus-width = <4>; cap-mmc-highspeed; cap-sd-highspeed; + full-pwr-cycle; + /* + * The STw4811 circuit used with the Nomadik strictly + * requires that all of these signal direction pins be + * routed and used for its 4-bit levelshifter. + */ + st,sig-dir-dat0; + st,sig-dir-dat2; + st,sig-dir-dat31; + st,sig-dir-cmd; + st,sig-pin-fbclk; pinctrl-names = "default"; pinctrl-0 = <&mmcsd_default_mux>, <&mmcsd_default_mode>; vmmc-supply = <&vmmc_regulator>;