From patchwork Fri Sep 21 21:03:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 10610987 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AFA81157B for ; Fri, 21 Sep 2018 21:03:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9FEC12E7D3 for ; Fri, 21 Sep 2018 21:03:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 925BA2E7FA; Fri, 21 Sep 2018 21:03:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 37A772E7D3 for ; Fri, 21 Sep 2018 21:03:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=m0TCwnQaLrZxFXu+U+rguyIusksJ1G0bWoI54xSc5Gw=; b=JSO e2f4vGAcf7nJF/GwxHNF8ulqjcyuv8HntDCJUS5oxzWjZph9J07s9QPEGuYO+iA2QL4nSK37R010K y/LpFigTJgynjNwv95xM1ya3Rcb8KtUFXuY45/y6TF8Vl6aMpgNjqjFwnO2o6gfebSNQPNb6t1qU2 sPFqnUNRvnXpEne/rQVmkRsq5UnY0pfSB/zeVe+UGg+5NLfe4HLLcd7ylF/fmjloENWdhibFPYJQH mDSErW+5BbVXq54TGXmM1QhdX5kpNfu2kGkuwyzOFwejiZ9taowERtpHfOHjiLQpbMIreQVhmSmfP SFJ/GP0EmvYVbKGjvvJCHbFPir4rTMA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g3SaW-0004ZG-Jv; Fri, 21 Sep 2018 21:03:44 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g3SaS-0004Xl-Ty for linux-arm-kernel@lists.infradead.org; Fri, 21 Sep 2018 21:03:42 +0000 Received: from localhost.localdomain (unknown [178.38.103.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9B2C321532; Fri, 21 Sep 2018 21:03:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1537563809; bh=h4/iplhYCAV79ucu4oz9dTxNL7eJrY13ixOD0eE3JN4=; h=From:To:Cc:Subject:Date:From; b=HX6GLAfL1eT5WklSKw2SN8qdImCnstaVvQtn9pTUx2/Q/T129qH+g2M8ZKssyydcS 2CPz+bbpu3bBbZZY9qxPaGibqjVh9HHLw8pSE21KX4foV9G6zk7ZaQWUct7blF3Wz/ LyojjIjvPU8G4oi4Y4gHZac4SN3X1D/2xn+15dnk= From: Krzysztof Kozlowski To: Kukjin Kim , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ARM: dts: exynos: Add CD and WP pins to Odroid XU SD card Date: Fri, 21 Sep 2018 23:03:21 +0200 Message-Id: <20180921210321.12404-1-krzk@kernel.org> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180921_140340_987594_61346420 X-CRM114-Status: GOOD ( 14.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Anand Moon , Marek Szyprowski MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Defining card-detect and write-protect GPIO pins in Odroid XU SD Card does not change anything from functional point of view - dw-mmc driver was reading the state from registers. Adding cd-gpios and wp-gpios properties changes only internal driver behavior to access the pins directly. Add them to DTS only to comprehensively describe the hardware. Minor benefit is that write-protect pin configuration makes sure that it will be properly pulled up to indicate write access. This also removes debug messages: dwmmc_exynos 12220000.mmc: No GPIO consumer cd found dwmmc_exynos 12220000.mmc: No GPIO consumer wp found Signed-off-by: Krzysztof Kozlowski --- arch/arm/boot/dts/exynos5410-odroidxu.dts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/exynos5410-odroidxu.dts b/arch/arm/boot/dts/exynos5410-odroidxu.dts index a2046f5f998c..dae360f29a47 100644 --- a/arch/arm/boot/dts/exynos5410-odroidxu.dts +++ b/arch/arm/boot/dts/exynos5410-odroidxu.dts @@ -525,12 +525,14 @@ &mmc_2 { status = "okay"; + wp-gpios = <&gpm5 0 GPIO_ACTIVE_LOW>; + cd-gpios = <&gpc2 2 GPIO_ACTIVE_LOW>; card-detect-delay = <200>; samsung,dw-mshc-ciu-div = <3>; samsung,dw-mshc-sdr-timing = <0 4>; samsung,dw-mshc-ddr-timing = <0 2>; pinctrl-names = "default"; - pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus1 &sd2_bus4>; + pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus1 &sd2_bus4 &sd2_wp>; bus-width = <4>; cap-sd-highspeed; vmmc-supply = <&ldo21_reg>; @@ -573,6 +575,14 @@ samsung,pin-pud = ; samsung,pin-drv = ; }; + + sd2_wp: sd2-wp { + samsung,pins = "gpm5-0"; + samsung,pin-function = ; + /* Pin is floating so pull it up to disable write-protect */ + samsung,pin-pud = ; + samsung,pin-drv = ; + }; }; &pwm {