From patchwork Sat Mar 9 15:36:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Summers X-Patchwork-Id: 10845977 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 75C24922 for ; Sat, 9 Mar 2019 15:37:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5D1B92C035 for ; Sat, 9 Mar 2019 15:37:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4F7272CDB1; Sat, 9 Mar 2019 15:37:36 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 58F572C035 for ; Sat, 9 Mar 2019 15:37:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Pl6kMzEmy1Iwb5Mt3UHKxUB4RdGRcrpmn0cqSZaCBT8=; b=BpyZklVHW1sdzl xNJDykmUa8UU6u6huQdYcKwdMOBEwhonpQuobRKfRhoFQK45FJVucnv5uwfMR0r23Mze1T++f6AUP jiY8ZUnwd6sJIk3nvlmAr9UqGJ3YLid1azzGr2WZTgvpwoDL3Gh0rdZQW97wbHUjgkXqrlFVNiYfo k5UyS32F69egchjGZGZLKHpr2Ht7GdQpue1HNpzROJmnyPhvwVnWAmmgAvazW6UW1JRV0FyTPFXCG 7LMxeDRzB87AqBRuG9nDMmJGzNJqj9Dq+Eikv33jD5dr8CuvkWAEKP1yKU7IlEVKVti2MpP4k6X5k j7YErl5xoLNh5Tuh6dig==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h2e2X-0002kp-Dy; Sat, 09 Mar 2019 15:37:33 +0000 Received: from avasout03.plus.net ([84.93.230.244]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h2e2S-0002j0-JO for linux-arm-kernel@lists.infradead.org; Sat, 09 Mar 2019 15:37:30 +0000 Received: from localhost.localdomain ([87.114.146.246]) by smtp with ESMTP id 2e1ehMR0hRYIy2e1fhoxcn; Sat, 09 Mar 2019 15:36:41 +0000 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=dequI0fe c=1 sm=1 tr=0 a=DwUJrZpGRQ5ePevJMiNdYw==:117 a=DwUJrZpGRQ5ePevJMiNdYw==:17 a=JfrnYn6hAAAA:8 a=7CQSdrXTAAAA:8 a=tsd3n5ABrT2aDlK6WiAA:9 a=oA743VZb380UPhVn:21 a=QcSc2fLI4Ik0IIXb:21 a=Qbp-gCSXuQMA:10 a=1CNFftbPRP8L7MoqJWF3:22 a=a-qgeE7W1pNrGK8U0ZQC:22 From: David Summers To: heiko@sntech.de, robh+dt@kernel.org, frowand.list@gmail.com, ulf.hansson@linaro.org, jh80.chung@samsung.com Subject: [PATCH v3 1/3] arm: dts: rk3288-tinker.dtsi: Fix SD card detection Date: Sat, 9 Mar 2019 15:36:24 +0000 Message-Id: <20190309153626.22734-1-beagleboard@davidjohnsummers.uk> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190217121513.22965-1-beagleboard@davidjohnsummers.uk> References: <20190217121513.22965-1-beagleboard@davidjohnsummers.uk> MIME-Version: 1.0 X-CMAE-Envelope: MS4wfMOl1Bfw/a8jxW5fE7/DtoN32v8ACBN0MpNrIKPEOe7nLEtIwS+UNB8/d+ImBdzNNOXo/2/kNPor5VMEIT7z+JASscydkpvkLeAq4htOFEh2ao4YNWBx YUUSn+2y0T2n6kNr+gJeA+JmBgyeWYvEW7mLSt5KbZtUDAagZ4JxhRjJGtN5S7vqlgKBLIn+1VEvwNZkWSDKDahpxwpomG8JRDY= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190309_073728_777716_F60C6E0C X-CRM114-Status: GOOD ( 12.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-rockchip@lists.infradead.org, linux-mmc@vger.kernel.org, David Summers , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org 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 The Problem: On ASUS Tinker Board S, when booting from the eMMC, and there is card in the sd slot, there are constant errors. Also when warm reboot, uboot can not access the sd slot Cause: Identified by Robin Murphy @ ARM. The Card Detect on rk3288 devices is pulled up by vccio-sd; so when the regulator powers this off, card detect gives spurious errors. A second problem, is during power down, vccio-sd apprears to be powered down. This causes a problem when warm rebooting from the sd card. This was identified by Jonas Karlman. History: A common fault on these rk3288 board, which impliment the reference design. When this arose before: http://lists.infradead.org/pipermail/linux-arm-kernel/2014-August/281153.html And Ulf and Jaehoon clearly said this was a broken card detect design, which should be solved via polling Solution: Hence broken-cd is set as a property. This cures the errors. The powering down of vccio-sd during reboot is cured by adding regulator-boot-on. This solutions has been fairly widely reviewed and tested. Signed-off-by: David Summers Reviewed by: Robin Murphy Reviewed by: Jonas Karlman Test by: TheSaint < @ ArchLinux Arm > --- arch/arm/boot/dts/rk3288-tinker.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi index aa107ee41b8b..ef653c3209bc 100644 --- a/arch/arm/boot/dts/rk3288-tinker.dtsi +++ b/arch/arm/boot/dts/rk3288-tinker.dtsi @@ -254,6 +254,7 @@ }; vccio_sd: LDO_REG5 { + regulator-boot-on; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <3300000>; regulator-name = "vccio_sd"; @@ -430,7 +431,7 @@ bus-width = <4>; cap-mmc-highspeed; cap-sd-highspeed; - card-detect-delay = <200>; + broken-cd; disable-wp; /* wp not hooked up */ pinctrl-names = "default"; pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;