From patchwork Sat Mar 9 15:39:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Summers X-Patchwork-Id: 10845983 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 46B954B69 for ; Sat, 9 Mar 2019 15:39:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2FEC32C3E4 for ; Sat, 9 Mar 2019 15:39:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2443D2A568; Sat, 9 Mar 2019 15:39:47 +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=unavailable 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 C6C9A2C3E4 for ; Sat, 9 Mar 2019 15:39:46 +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=3cPOYnh81q/stXp1jROJ1KgvHH8bW3nTx21a51Fq4bQ=; b=bcQmgIABWv79vH wDSBzYSqF6T4AhD6ZPqNfebEZKokTOK5+lufuPyoJo5yLj5XytXNweE/bUy5P1Pu87dFXHdhuppH7 QdWxNXq8ouna4lzCbfieBoru6nWjr1cSWVokJeRsy/TVujfRViZRWBnkuxiqLGaqBNQ9hrpJai2GB FF+BEby0Jn7NAe/P7WnduL26O0krmPYP9SPyBQpSM/EevHFFQjBZeE3rwMMq7BcKq2EVgLnZj2jwo Hocl1CiYx/dkyN66W0nvITx9jHyhnhETeoNSheENEtqr86GGlZBJm7bqKiZ8uxOujb4VPTQM7WSTN 7Kt9BXqyy/hQ6iopG7lA==; 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 1h2e4f-00035Q-09; Sat, 09 Mar 2019 15:39:45 +0000 Received: from avasout02.plus.net ([212.159.14.17]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h2e4Z-00033A-Rg for linux-arm-kernel@lists.infradead.org; Sat, 09 Mar 2019 15:39:41 +0000 Received: from localhost.localdomain ([87.114.146.246]) by smtp with ESMTP id 2e4PhIi6Rx6b62e4Qhg9zm; Sat, 09 Mar 2019 15:39:31 +0000 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=T4GiscCQ c=1 sm=1 tr=0 a=DwUJrZpGRQ5ePevJMiNdYw==:117 a=DwUJrZpGRQ5ePevJMiNdYw==:17 a=JfrnYn6hAAAA:8 a=7CQSdrXTAAAA:8 a=vJIJKeom-RswbmDfAKYA:9 a=TE9vAxTHP7uUtEBL:21 a=kzsRoEJelQF42h6Y: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:39:21 +0000 Message-Id: <20190309153923.22806-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: MS4wfDeJq2pfFVVr6HphYAbymPFb65NoRrAprdgpTG5p9Y1lLne8wQeSw0TCnqiCo82phH0YQdjqyiiZSY5QxHJHJ4UgW19FBUX1zBKYR56HqguaQK5hoTYF aNjSQbvRJsh0Pt3Qe7TSLSA58k1m4hcHWJICZS/SDPgnigmwyUw1elDxSCM98cxXsZr40R4B443y6WxtLigtUEtPARHSq+P5fPQ= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190309_073940_099695_AE24269D X-CRM114-Status: GOOD ( 12.20 ) 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 Tested-by: ... with an actual Name + mail address Reviewed-by: Robin Murphy Tested-by: Jonas Karlman Reviewed-by: Jonas Karlman Tested-by: Jonas Karlman --- 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>;