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: 10845979 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 D1E3F922 for ; Sat, 9 Mar 2019 15:37:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB9162C035 for ; Sat, 9 Mar 2019 15:37:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AF2372CDB1; Sat, 9 Mar 2019 15:37:41 +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 63E0C2C035 for ; Sat, 9 Mar 2019 15:37:41 +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=gVu0oadDUXQnQ1F1ofDEMcUvEftKEc8UsIRFTbopUhg=; b=UJY2CDxZFN1wVg n+sfuz5739u8m6y4jH1cauOnuohZC8EM/YUyDTbASRFfp/U9YXe/LhgXut6o/6wTyxQoPO0zxcdBd BDGmlQ2hKhE+4unKuFb2oBdxkxakqri/C50GCn2waZ6iFQUWOtTsNdyfQQiH748oydQmW9TA2xS50 pAKVnjwtZis8NDcViMcBbkuAOGtnPeLktyrY28kaegNIpwtGZ6YVb6cusRlmDXt6BFmBcxXcgWxSm 8zFKLVB8djjQCaeGRbFyhQovZ9HnkPQDbm+HD3Lrz7m/mu+SoUBOsqD+Vdt9U9zU56n9PzEoCgqs9 fMufYF/EuSvuOBMM2OUQ==; 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 1h2e2b-0002pQ-8e; Sat, 09 Mar 2019 15:37:37 +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-0002j1-JR for linux-rockchip@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+JmBgyeWYvEW7n7s5TobZ1vvq2YhlF6qmt40TF5PLYha8VJRltFKxBa4Q== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190309_073728_850755_7A80327B X-CRM114-Status: GOOD ( 11.20 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms 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-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=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>;