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.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 4D3F5C433ED for ; Wed, 21 Apr 2021 11:34:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0AC9960FE8 for ; Wed, 21 Apr 2021 11:34:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234454AbhDULez (ORCPT ); Wed, 21 Apr 2021 07:34:55 -0400 Received: from foss.arm.com ([217.140.110.172]:60012 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233959AbhDULey (ORCPT ); Wed, 21 Apr 2021 07:34:54 -0400 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 D0A8411D4; Wed, 21 Apr 2021 04:34:20 -0700 (PDT) Received: from slackpad.fritz.box (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6A6F13F694; Wed, 21 Apr 2021 04:34:19 -0700 (PDT) Date: Wed, 21 Apr 2021 12:33:54 +0100 From: Andre Przywara To: Maxime Ripard , Chen-Yu Tsai Cc: Michael Weiser , Rob Herring , Jernej Skrabec , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@googlegroups.com, Daniel Kulesz Subject: Re: [PATCH v2] arm64: dts: allwinner: Revert SD card CD GPIO for Pine64-LTS Message-ID: <20210421123354.0a7209a1@slackpad.fritz.box> In-Reply-To: References: <20210414104740.31497-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 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Wed, 14 Apr 2021 20:35:03 +0200 Michael Weiser wrote: Maxime, Chen-Yu: can you please try to push this patch into 5.12, still? The Pine64-LTS' SD card is broken otherwise, on both versions of the board. The incriminating patch was introduced in 5.12-rc1 (my bad!), so it qualifies as a regression fix. Many thanks! Andre > On Wed, Apr 14, 2021 at 11:47:40AM +0100, 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 active-low CD GPIO, but let's use > > the broken-cd property for the Pine64-LTS this time. That should avoid > > regressions and should work for everyone, even allowing SD card changes > > now. > > The SOPine card detect has proven to be working, so let's keep that > > GPIO in place. > > I can confirm that this change works on my Pine64 LTS boards (with > working high-active card detect) when applied to today's linux-next (which > already includes your previous change to change the card detect GPIO > from low- to high-active in sun50i-a64-sopine.dtsi). > > > Fixes: 941432d00768 ("arm64: dts: allwinner: Drop non-removable from SoPine/LTS SD card") > > Reported-by: Michael Weiser > > Reported-by: Daniel Kulesz > > Suggested-by: Chen-Yu Tsai > > Signed-off-by: Andre Przywara > > Tested-by: Michael Weiser > > Thanks! > Michael > > > --- > > 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..596a25907432 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 */ > > + broken-cd; /* card detect is broken on *some* boards */ > > }; > 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,URIBL_BLOCKED, USER_AGENT_SANE_2 autolearn=unavailable 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 49C9CC433B4 for ; Wed, 21 Apr 2021 11:36:34 +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 9178E61139 for ; Wed, 21 Apr 2021 11:36:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9178E61139 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=mu6jcnqY2mT9Ib30EV+n+uoQ46ZSy2DOgbAhPDSXTSs=; b=WVQEAj7k+lGn4OTp6GVHRSmh/ U5oqSNGcx5Jhgg2fbQrpNfojD5xR6CwRusoBkkQe4Pd6ixW6ege+b+rTuxFRskFrl9o8pnOhvsvy9 7zhWoGxQPzkakm4eFij5g6f5JaaEFrvMhiTq4vslL8xeDm9s2B37XMWgW6/7ehvGKGw1UcGSncWC4 qWG97VbpRDcvJ8BcYGYLcfwtEi2c/a/ENQ5HvD94EBYcFqIX20MOAsRAetUN0lUoSbSr+QT1ZKxYq d2Nh9mhvql8DkYRP+lLPXTw6Hcs4DSPP/09MUIuYEnK6xYNmMVrt8Zu6qZvrqURxGMnNcJNt3cVy6 zY50E6sbA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lZB7r-00EJPD-Pt; Wed, 21 Apr 2021 11:34:35 +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 1lZB7p-00EJOx-9F for linux-arm-kernel@desiato.infradead.org; Wed, 21 Apr 2021 11:34:33 +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=mT7Zs+89pOn5sM5lhDjXpulwzIK4a4M2E+azpuRC7/0=; b=N/GG3bUWvR/3gjS99Y28+Dypeb YzGU/odmBTgwr/5pvbN5gp0whzlS8u+i6ND5QzXQRjoJPw2LgmyPGoPE2Vc0Jcg324roDbMc9tRal 481ZnaAEL6N36BaL4qR9FHiFfUzZGJHartmJMkIRD3IDaI+I8mkwlLOZsD13ACRxaa6AJMJxtE2Za tnndwhIUC8yLDioN40IyL7g43zxkb4LO0zD2hiRZRLWwVkCDc3AFAC+u4uc7ibheBXNzLduEsWrcv DORUH64owBj0FaxV6wJKH9i1BPEV+zvRSY0uwGlEAJE75pjsHJbAlqXQKLE8Kc72GCjAXpfJgVwbg iYGPLTpw==; Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lZB7j-00Cq5N-AX for linux-arm-kernel@lists.infradead.org; Wed, 21 Apr 2021 11:34:32 +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 D0A8411D4; Wed, 21 Apr 2021 04:34:20 -0700 (PDT) Received: from slackpad.fritz.box (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6A6F13F694; Wed, 21 Apr 2021 04:34:19 -0700 (PDT) Date: Wed, 21 Apr 2021 12:33:54 +0100 From: Andre Przywara To: Maxime Ripard , Chen-Yu Tsai Cc: Michael Weiser , Rob Herring , Jernej Skrabec , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@googlegroups.com, Daniel Kulesz Subject: Re: [PATCH v2] arm64: dts: allwinner: Revert SD card CD GPIO for Pine64-LTS Message-ID: <20210421123354.0a7209a1@slackpad.fritz.box> In-Reply-To: References: <20210414104740.31497-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-20210421_043427_510270_1099F1A4 X-CRM114-Status: GOOD ( 32.44 ) 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 Wed, 14 Apr 2021 20:35:03 +0200 Michael Weiser wrote: Maxime, Chen-Yu: can you please try to push this patch into 5.12, still? The Pine64-LTS' SD card is broken otherwise, on both versions of the board. The incriminating patch was introduced in 5.12-rc1 (my bad!), so it qualifies as a regression fix. Many thanks! Andre > On Wed, Apr 14, 2021 at 11:47:40AM +0100, 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 active-low CD GPIO, but let's use > > the broken-cd property for the Pine64-LTS this time. That should avoid > > regressions and should work for everyone, even allowing SD card changes > > now. > > The SOPine card detect has proven to be working, so let's keep that > > GPIO in place. > > I can confirm that this change works on my Pine64 LTS boards (with > working high-active card detect) when applied to today's linux-next (which > already includes your previous change to change the card detect GPIO > from low- to high-active in sun50i-a64-sopine.dtsi). > > > Fixes: 941432d00768 ("arm64: dts: allwinner: Drop non-removable from SoPine/LTS SD card") > > Reported-by: Michael Weiser > > Reported-by: Daniel Kulesz > > Suggested-by: Chen-Yu Tsai > > Signed-off-by: Andre Przywara > > Tested-by: Michael Weiser > > Thanks! > Michael > > > --- > > 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..596a25907432 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 */ > > + broken-cd; /* card detect is broken on *some* boards */ > > }; > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel