From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69276C43603 for ; Mon, 12 Apr 2021 16:48:26 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 11C656023C for ; Mon, 12 Apr 2021 16:48:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 11C656023C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=SjZ1vXQrTBcNb+WOsUtJgHeFR5ptjeRO0qrJx5qjsuQ=; b=YXs332aENxi5bUlHGbjghByfJ NJsS9tCRaUGJ54C5gbfvgzFcZotMQOJdDo3iFwSUeDbKOrPKFHB42QiMpkq08yrjU0DT/nN18xPbx Vtvsah5TkhShSdhtCx7PG/h5gERLENxgv2AFlVkC3L6D+8zMMk12MUMNPlZLTYo2aqTMgqKBJVmpV VANUwyXndnAiQqENca9TJiF48FvcteMnDMNjv5/hG/6fYzTYeXElw1fbbexXU6gykQF4kl/WYEihp dlzYyzQMgWsQtfq6VZYrrohilL0ftwTkIVwkRJlgXNdpM3Ti2uXMo0m7oONGEgSLyz2GqAT32LQcc WDzxHfwLw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lVzhy-007Ibr-18; Mon, 12 Apr 2021 16:46:42 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lVzhv-007IbF-VM for linux-arm-kernel@desiato.infradead.org; Mon, 12 Apr 2021 16:46:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To: From:Date:Sender:Reply-To:Content-ID:Content-Description; bh=ECX23x2QGNrSKGLnLEZbGtVdrHCCmqzgsKVceKL2pkQ=; b=CsjCRSdnNARUs8Nj9aRZMUNmdj dnTZdvU39O0wJoxdjGfgSYZ1bWy9ovrG/WFrGQ7N2UZtujqbG351Gmtfe2fH9SfQRv9zXzc5qaKlR +WLHwp3k2zLciSCu1mkcio8Qt/ChayX17frQJ8F/Mf8AB+UFG3tCaNwnzS19Z1MAIdLdY4Xa5zXpb b6SWyEBJ/Yf7jX4D+z0RvOaCk/ZwHplIpdIGGAEVC776SA2NJtLSgrja3Y3JsPV65g3lNhqyjV8rB eSssjU8wHi3v1O2htp+BopwpIPu4LcUcXYFWxNFunrH1yu/otIPNdc3XHV86doFG8Jkcaw+G9OOTX uvhMH7GQ==; Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lVzhs-006QWn-SK for linux-arm-kernel@lists.infradead.org; Mon, 12 Apr 2021 16:46:38 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 366AD113E; Mon, 12 Apr 2021 09:46:31 -0700 (PDT) Received: from slackpad.fritz.box (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BC7623F73B; Mon, 12 Apr 2021 09:46:29 -0700 (PDT) Date: Mon, 12 Apr 2021 17:45:58 +0100 From: Andre Przywara To: Chen-Yu Tsai Cc: Rob Herring , Maxime Ripard , Jernej Skrabec , devicetree , linux-arm-kernel , linux-sunxi , Michael Weiser , Daniel Kulesz Subject: Re: [linux-sunxi] [PATCH] arm64: dts: allwinner: Revert SD card CD GPIO for Pine64-LTS Message-ID: <20210412174558.4ba90cf8@slackpad.fritz.box> In-Reply-To: References: <20210412000813.13071-1-andre.przywara@arm.com> Organization: Arm Ltd. X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.31; x86_64-slackware-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210412_094637_046393_36C5EDA9 X-CRM114-Status: GOOD ( 31.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 12 Apr 2021 14:20:41 +0800 Chen-Yu Tsai wrote: > Hi, > > On Mon, Apr 12, 2021 at 8:08 AM Andre Przywara wrote: > > > > Commit 941432d00768 ("arm64: dts: allwinner: Drop non-removable from > > SoPine/LTS SD card") enabled the card detect GPIO for the SOPine module, > > along the way with the Pine64-LTS, which share the same base .dtsi. > > > > This was based on the observation that the Pine64-LTS has as "push-push" > > SD card socket, and that the schematic mentions the card detect GPIO. > > > > After having received two reports about failing SD card access with that > > patch, some more research and polls on that subject revealed that there > > are at least two different versions of the Pine64-LTS out there: > > - On some boards (including mine) the card detect pin is "stuck" at > > high, regardless of an microSD card being inserted or not. > > - On other boards the card-detect is working, but is active-high, by > > virtue of an explicit inverter circuit, as shown in the schematic. > > > > To cover all versions of the board out there, and don't take any chances, > > let's revert the introduction of the CD GPIO, and go back to the > > non-removable property for the Pine64-LTS. That should avoid regressions > > and should work for everyone. > > The SOPine card detect has proven to be working, so let's keep that > > GPIO in place. > > > > Fixes: 941432d00768 ("arm64: dts: allwinner: Drop non-removable from SoPine/LTS SD card") > > Reported-by: Michael Weiser > > Reported-by: Daniel Kulesz > > Signed-off-by: Andre Przywara > > --- > > arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts > > index e79ce49e7e6a..843338e19694 100644 > > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts > > @@ -21,5 +21,5 @@ > > }; > > > > &mmc0 { > > - cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 push-push switch */ > > + non-removable; /* card detect is broken on some boards */ > > So a revert is good, but has anyone tried using the "broken-cd" instead? Ha, that's a good idea, I totally forgot about this property! > That way, at least on Linux, the mmc core resorts to polling for a card. > At least this way the card is still removable. Yes indeed, I tested it on my "stuck at 1" Pine64-LTS, and it works like a charm! Daniel, Michael, can you test this on your boards? So removing the cd-gpios property, and adding "broken-cd;" instead? Cheers, Andre _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel