From patchwork Fri Oct 7 08:52:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 9365787 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 F21C5600C8 for ; Fri, 7 Oct 2016 08:54:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E286C29408 for ; Fri, 7 Oct 2016 08:54:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D710C29418; Fri, 7 Oct 2016 08:54:50 +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_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham 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 69F4929408 for ; Fri, 7 Oct 2016 08:54:50 +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 1bsQtj-0006qA-Va; Fri, 07 Oct 2016 08:52:55 +0000 Received: from mail-lf0-x233.google.com ([2a00:1450:4010:c07::233]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bsQte-0006Vh-Od for linux-arm-kernel@lists.infradead.org; Fri, 07 Oct 2016 08:52:53 +0000 Received: by mail-lf0-x233.google.com with SMTP id b75so35759618lfg.3 for ; Fri, 07 Oct 2016 01:52:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=fEAKYVHqZG+NPZWfWhS6o+YWZxaWOBF+3APKr2sEs74=; b=RpybDOu0uzh6m9KgAyqwFsVPBTHD9OAWnEVksVn/LTtcvXXIPq7NFvJ3U9+Y+x0cZs NvIuADkTcQTRi2GDBzsXzm602eTw7leMtPS8Rf8qrB8DYg75Gmz0HtCcPbUP4jP/MHlw u1RisJRxKUEp+iFm64vfFs8Vgs6jO7ZhyeXjQ= 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=fEAKYVHqZG+NPZWfWhS6o+YWZxaWOBF+3APKr2sEs74=; b=AisMkq/WAQrD89oGuSGyHiYe1GNjS+M4Ur75Ur7nBw0CKiP8ejUlM0OBWqoa1lKMQF 4qQUjDlk8LJYgHtcvENqI4U01Ir4iDm0K373A7KMbG5J/DE3dN2AFIjkoCH80adxmSkT XSmWrH2cOK5PhmnaGqjPowDdpRpwBanNllxqQkwfsJZDDyIJ57OtAGrf1ycybChdfxqX UQ8hyEgoPpGmGBXd3kKEX8Ts1RKux87pIvcb8Wo7pKIBPxZYjrWgrTAljbqyegxtKEKc wd5kJ6bZvAfymARnEZoox/I0SdCiZ1XSxjTsrMkLv6jWIvE80xlm32faAP3Kez2xlKal deLw== X-Gm-Message-State: AA6/9RmS6sQfbf1Xz8XsbKmcHtia19lh4CKp5Z+ctug/XaZt5R0YxtrR2kIjO0h/95kyatRr X-Received: by 10.46.33.211 with SMTP id h80mr8162764lji.58.1475830348236; Fri, 07 Oct 2016 01:52:28 -0700 (PDT) Received: from linuslaptop.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id g201sm3435132lfg.8.2016.10.07.01.52.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Oct 2016 01:52:27 -0700 (PDT) From: Linus Walleij To: arm@kernel.org Subject: [PATCH] ARM: dts: fix the SD card on the Snowball Date: Fri, 7 Oct 2016 10:52:17 +0200 Message-Id: <1475830337-13016-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161007_015253_148188_60222A84 X-CRM114-Status: GOOD ( 15.67 ) 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: Ulf Hansson , Linus Walleij , daniel.lezcano@linaro.org, stable@vger.kernel.org, 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 This fixes a very annoying regression on the Snowball SD card that has been around for a while. It turns out that the device tree does not configure the direction pins properly, nor sets up the pins for the voltage converter properly at boot. Unless all things are correctly set up, the feedback clock will not work, and makes the driver spew messages in the console (but it works, very slowly): root@Ux500:/ mount /dev/mmcblk0p2 /mnt/ [ 9.953460] mmci-pl18x 80126000.sdi0_per1: error during DMA transfer! [ 9.960296] mmcblk0: error -110 sending status command, retrying [ 9.966461] mmcblk0: error -110 sending status command, retrying [ 9.972534] mmcblk0: error -110 sending status command, aborting Fix this by rectifying the device tree to correspond to that of the Ux500 HREF boards plus the DAT31DIR setting that is unique for the Snowball, and things start working smoothly. Add in the SDR12 and SDR25 modes which this host can do without any problems. I don't know if this has ever been correct, sadly. It works after this patch. Cc: stable@vger.kernel.org Reported-by: Daniel Lezcano Cc: Ulf Hansson Signed-off-by: Linus Walleij --- ARM SoC folks: please apply this directly for fixes. --- arch/arm/boot/dts/ste-snowball.dts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/ste-snowball.dts b/arch/arm/boot/dts/ste-snowball.dts index b3df1c60d465..386eee6de232 100644 --- a/arch/arm/boot/dts/ste-snowball.dts +++ b/arch/arm/boot/dts/ste-snowball.dts @@ -239,14 +239,25 @@ arm,primecell-periphid = <0x10480180>; max-frequency = <100000000>; bus-width = <4>; + cap-sd-highspeed; cap-mmc-highspeed; + sd-uhs-sdr12; + sd-uhs-sdr25; + /* All direction control is used */ + st,sig-dir-cmd; + st,sig-dir-dat0; + st,sig-dir-dat2; + st,sig-dir-dat31; + st,sig-pin-fbclk; + full-pwr-cycle; vmmc-supply = <&ab8500_ldo_aux3_reg>; vqmmc-supply = <&vmmci>; pinctrl-names = "default", "sleep"; pinctrl-0 = <&sdi0_default_mode>; pinctrl-1 = <&sdi0_sleep_mode>; - cd-gpios = <&gpio6 26 GPIO_ACTIVE_LOW>; // 218 + /* GPIO218 MMC_CD */ + cd-gpios = <&gpio6 26 GPIO_ACTIVE_LOW>; status = "okay"; }; @@ -549,7 +560,7 @@ /* VMMCI level-shifter enable */ snowball_cfg3 { pins = "GPIO217_AH12"; - ste,config = <&gpio_out_lo>; + ste,config = <&gpio_out_hi>; }; /* VMMCI level-shifter voltage select */ snowball_cfg4 {