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: 7407991 Return-Path: X-Original-To: patchwork-linux-mmc@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 88B339F302 for ; Thu, 15 Oct 2015 16:19:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0DE15206F2 for ; Thu, 15 Oct 2015 16:19:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 25A9A20664 for ; Thu, 15 Oct 2015 16:19:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753761AbbJOQR5 (ORCPT ); Thu, 15 Oct 2015 12:17:57 -0400 Received: from mail-lb0-f173.google.com ([209.85.217.173]:36256 "EHLO mail-lb0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753723AbbJOQRz (ORCPT ); Thu, 15 Oct 2015 12:17:55 -0400 Received: by lbcao8 with SMTP id ao8so74876991lbc.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=XN4g1ensB9tiMmUNy8El7f6ecSU4K8W4G22AY4HLNf7Q7qDwOruiDoAGEWHmVbvGgq S4q9B1+dDqCvPap946tgoiQvYmhbB3JOrg9qPxE2qCmsra/U6rpfIE6YNRD9I7BbQEjY jT47GV8kPxoYxgcg3148zeAn3zXuEOv2VCJsOonLZH7h9WQ5nVQtAb3KCn7FxpFreJZ9 KZ68Odpwhu/Mfxnpt+W9f7/XLASqGsdAddAPUYR0vDk6pvkB9jNiJi9LPAWvtJVb7wQV gLMQ8Mdbnk1LmZcPHX6CNYAINEcLetp2zxc1P4Ix/b9QhPJLq4f6yWGo7ch7HHJ/9QhX kTlw== X-Gm-Message-State: ALoCoQnymtexem+ZN5QsVDbl6OVExAquVxXTXWfeEHcvCb8LzbyEVHOT3mpURae8SwAjGMA19+DT 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 Cc: ulf.hansson@linaro.org, sebastian.hesselbarth@gmail.com, andrew@lunn.ch, jason@lakedaemon.net, thomas.petazzoni@free-electrons.com, gregory.clement@free-electrons.com, nadavh@marvell.com, alior@marvell.com, tawfik@marvell.com, mw@semihalf.com, jaz@semihalf.com, jszhang@marvell.com 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> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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";