Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2469119pxb; Mon, 19 Apr 2021 06:31:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzm29KDqYqTxY6hiSoCIofkgkYxEu0y408jzMjslCR/uSEDAwSatf9/w8CUFOD9IA+TYGW8 X-Received: by 2002:a17:906:1e0b:: with SMTP id g11mr22371211ejj.291.1618839084662; Mon, 19 Apr 2021 06:31:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618839084; cv=none; d=google.com; s=arc-20160816; b=Bar3flgfFZIJIyQkv2gM584pfm73z/rOoqukc4MotGRl1EQyCIyY2uXcOUR2fbv+hZ EwBrMtecMw0eik27Qx6KijsqPFy6hk4sFEjmO+ZMktqGOImFzLwkL6O1l8OrkwbZpfDh xr56Jd0QYxMHz/AdQlGmCa9O35bZLhbTVOhiiT4g16zICTBiopmamPJGexlE4dwRdzz2 YzsZEr6FBb+y8MIdqHK59oZ3xMzF84w4ACn/8mk/chVGv3XeApVxT0biUDy7oo2fY2F0 V+Zr+T2u2e4UGaq42NGohxb47xmRgoDJ9CsKFY+RtJEL+UGm/f2ADftXQY3G3/R/SYl5 PI2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=TjKCz9UMJB/K6a3J2SM0Lp9nENW31CIucvNgDG4RKIo=; b=Ic98FrOQQEcc01Gf7oKcKdvuUfq26Bv0srjvW6Mn8IScx+IZS9rmDmSI7Imco/2UfE CJEV5F8yFVMnkF/0HXLmskBfGQsTpd/gjMKMNmeYQo1xNBS2LCa1zjsQ77XWdoRYsRQz MEgPleKPttZuLZe9QNgCMEqEUBKBDhx2tpZ72GI+1kJE2YBQ4ll4jQWl5firoQehvnav bI2xzsBCbfp60Bj/ghZvSY6/5eRbIn9Aqw6YYQEGEB8rMvCtk1eRo/8w7QWbkNT9473E PSMK0CcZ2jO2g5YPtTQwADyVxtz1mSw2VacY8x/chbumAh6oGmd8vbtjuTq80ct+Ftl8 iOWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PtNrepaf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a22si11622668ejt.219.2021.04.19.06.30.55; Mon, 19 Apr 2021 06:31:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PtNrepaf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242576AbhDSN3X (ORCPT + 99 others); Mon, 19 Apr 2021 09:29:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:56252 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241524AbhDSNUv (ORCPT ); Mon, 19 Apr 2021 09:20:51 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EBCB4613F4; Mon, 19 Apr 2021 13:17:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618838229; bh=4Or+Yz6kO6pQb6f3i72UkcxlXMLm4CCQkvwij02cVAA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PtNrepaf8LtAe04MbdcsmadSiB2+DJcI1el+ujG2c0FlRNRfeMwsXigkVlhISBUgW AjmO8/KOnDvwl5Ory3AHPv0TMxAY5POv3uOJeCFWtDi2c8VII3VQ31pRxMjQ83wV+U ExFzmeCk/n5QgGMRjbnNbg9/R01T87ynkBwlsHOQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ashley , Andre Przywara , Maxime Ripard , Sasha Levin Subject: [PATCH 5.10 090/103] arm64: dts: allwinner: Fix SD card CD GPIO for SOPine systems Date: Mon, 19 Apr 2021 15:06:41 +0200 Message-Id: <20210419130530.887006203@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419130527.791982064@linuxfoundation.org> References: <20210419130527.791982064@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andre Przywara [ Upstream commit 3dd4ce4185df6798dcdcc3669bddb35899d7d5e1 ] 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. However while both boards indeed have a working CD GPIO on PF6, the polarity is different: the SOPine modules uses a "push-pull" socket, which has an active-high switch, while the Pine64-LTS use the more traditional push-push socket and the common active-low switch. Fix the polarity in the sopine.dtsi, and overwrite it in the LTS board .dts, to make the SD card work again on systems using SOPine modules. Fixes: 941432d00768 ("arm64: dts: allwinner: Drop non-removable from SoPine/LTS SD card") Reported-by: Ashley Signed-off-by: Andre Przywara Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210316144219.5973-1-andre.przywara@arm.com Signed-off-by: Sasha Levin --- arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts | 4 ++++ arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi | 2 +- 2 files changed, 5 insertions(+), 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 302e24be0a31..a1f621b388fe 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts @@ -8,3 +8,7 @@ compatible = "pine64,pine64-lts", "allwinner,sun50i-r18", "allwinner,sun50i-a64"; }; + +&mmc0 { + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 push-push switch */ +}; diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi index 3402cec87035..df62044ff7a7 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi @@ -34,7 +34,7 @@ vmmc-supply = <®_dcdc1>; disable-wp; bus-width = <4>; - cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ + cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 push-pull switch */ status = "okay"; }; -- 2.30.2