From patchwork Thu Oct 15 16:25:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Wojtas X-Patchwork-Id: 7408051 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4AFBF9F302 for ; Thu, 15 Oct 2015 16:20:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6D517206F2 for ; Thu, 15 Oct 2015 16:20:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8AD2120664 for ; Thu, 15 Oct 2015 16:20:32 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZmlEm-0006rq-Na; Thu, 15 Oct 2015 16:18:40 +0000 Received: from mail-lb0-f169.google.com ([209.85.217.169]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZmlEN-00065r-TI for linux-arm-kernel@lists.infradead.org; Thu, 15 Oct 2015 16:18:18 +0000 Received: by lbcao8 with SMTP id ao8so74876988lbc.3 for ; Thu, 15 Oct 2015 09:17:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Cwa/0v9SMmGSEavooSnCGNw9TpnpBy6cUsaX7R1qfv0=; b=cksmO1mCxq5eoPEgZHwNfjh88EPANTqN2gcBL1rYVLUlqJRnjTGqGAEAdqBZosLT4t 2iuL4H3owh8Nbkohfyb+Y6Ar11euIASZmYTzWcroAPIibXuAY3CHTtpfKuXT+aks5TZn iQfTEm9ikBB2dmYvOS9NaFu690fnSW5eq7tg14rRHmVl2z4Yb5rFQEwaWB94YwKbZqSd ot2TB80XqEDFo/eDJssSXypUUM0fD3Y1Ldy5eeYvXaB9qeptWsLDlG5RL61Q2DRxvwx3 GYIMXoX45U2DahptheesEbhuwyFYLDxD1ibR8pepN5wSgd95BqTg3rZWoU5yoS8CqJYl 9OSA== X-Gm-Message-State: ALoCoQnfqceAigDL97zrY7/pPLasCv6s/x//HiLvFzfe1VAORDJM1LmL4T42ChM02/F8qtKGvbA+ X-Received: by 10.112.184.196 with SMTP id ew4mr5085025lbc.17.1444925873294; Thu, 15 Oct 2015 09:17:53 -0700 (PDT) Received: from enkidu.semihalf.local ([80.82.22.190]) by smtp.gmail.com with ESMTPSA id r137sm2185323lfe.34.2015.10.15.09.17.52 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Oct 2015 09:17:52 -0700 (PDT) From: Marcin Wojtas To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org Subject: [PATCH v3 3/5] ARM: mvebu: set SW polling as SDHCI card detection on A388-GP Date: Thu, 15 Oct 2015 18:25:44 +0200 Message-Id: <1444926346-29763-4-git-send-email-mw@semihalf.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1444926346-29763-1-git-send-email-mw@semihalf.com> References: <1444926346-29763-1-git-send-email-mw@semihalf.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151015_091816_409965_3FD51878 X-CRM114-Status: GOOD ( 12.35 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thomas.petazzoni@free-electrons.com, andrew@lunn.ch, ulf.hansson@linaro.org, jason@lakedaemon.net, tawfik@marvell.com, jaz@semihalf.com, nadavh@marvell.com, alior@marvell.com, jszhang@marvell.com, gregory.clement@free-electrons.com, mw@semihalf.com, sebastian.hesselbarth@gmail.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The newest revisions of A388-GP (v1.5 and higher) support only DAT3-based card detection. Revisions < v1.5 based on GPIO detection via I2C expander, but this solution is supposed to be deprecated on new boards. In order to satisfy all type of hardware this commit changes card detection to use software polling mechanism. Also a comment is added on possible card detection options in A388-GP DT board file. Signed-off-by: Marcin Wojtas Acked-by: Andrew Lunn --- arch/arm/boot/dts/armada-388-gp.dts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/armada-388-gp.dts b/arch/arm/boot/dts/armada-388-gp.dts index 391dea9..3deba13 100644 --- a/arch/arm/boot/dts/armada-388-gp.dts +++ b/arch/arm/boot/dts/armada-388-gp.dts @@ -213,8 +213,21 @@ sdhci@d8000 { pinctrl-names = "default"; pinctrl-0 = <&sdhci_pins>; - cd-gpios = <&expander0 5 GPIO_ACTIVE_LOW>; no-1-8-v; + /* + * A388-GP board v1.5 and higher replace + * hitherto card detection method based on GPIO + * with the one using DAT3 pin. As they are + * incompatible, software-based polling is + * enabled with 'broken-cd' property. For boards + * older than v1.5 it can be replaced with: + * 'cd-gpios = <&expander0 5 GPIO_ACTIVE_LOW>;', + * whereas for the newer ones following can be + * used instead: + * 'dat3-cd;' + * 'cd-inverted;' + */ + broken-cd; wp-inverted; bus-width = <8>; status = "okay";