From patchwork Thu Dec 6 18:45:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evan Green X-Patchwork-Id: 10716641 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 97F4113BB for ; Thu, 6 Dec 2018 18:46:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 893BC2ECBF for ; Thu, 6 Dec 2018 18:46:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7D17B2EE64; Thu, 6 Dec 2018 18:46:13 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B1312ECBF for ; Thu, 6 Dec 2018 18:46:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725944AbeLFSqM (ORCPT ); Thu, 6 Dec 2018 13:46:12 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:33044 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726045AbeLFSqG (ORCPT ); Thu, 6 Dec 2018 13:46:06 -0500 Received: by mail-pf1-f194.google.com with SMTP id c123so614895pfb.0 for ; Thu, 06 Dec 2018 10:46:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=CDAZThfGpZuCvBtSjM99jB2sfnJYtaXxMYYfeP3n/mU=; b=Ci3teYyTngYMlJntSFhuhSTIrgEGfsKKgXUI4RKtan9vH4CZLOW45u2y38apsxnfAU 81Wkgfx9imebzudQlrwW4PZsVsdQF9xlbF1jesE8NWr6LWBuv39muSEdSyn2WY8q815s W9IivUQAQf4pazXie/RsSxpnwX+nkX8TcHZ8g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=CDAZThfGpZuCvBtSjM99jB2sfnJYtaXxMYYfeP3n/mU=; b=adpdgbpGLbI9BETWXZnd/LtecBsXPy5BApkr2pHk/jU7g6vfX/6JEsynFYKPfv4ITF iOI/O82rBsJ+OYcLnMU4czhFKYD4DMWY+VyUDK/OZQUZKqh9uGsMjxE6PVxNKPQb/PlD mQ8K7lnhXoLgmH+y5Vx0p/H61H+JPe0grunPvIP1iq/A99Ia74pFOOtX2less2rofLyG 74Y32Fy0zQgvchmTm9z3g13Qtk45tnp2aBfidaWWNOP7vcv/Y5JG1g/VjrBly0iwDvnP PsGLD2t9IH02poOlBNLi78Ky95UJ0ppIXCDteE8W8oLtlorKSi7VCvYsao0o3TqRPDOR imPA== X-Gm-Message-State: AA+aEWaO8n9T+Ju3OKO5gQu+Piij57qgaCSr6NeOT+XmBmIz5T4Q3HJf iHf5BY6+QsbOYsk4bvnlCWmPkw== X-Google-Smtp-Source: AFSGD/Wiy/sPvVvGRIxBzaE1N9aYs6obd8R4g+LizYsET7doiqfA6shi/glWYP9sqCeHYR1KRGprkQ== X-Received: by 2002:a63:2ac9:: with SMTP id q192mr24947768pgq.58.1544121965512; Thu, 06 Dec 2018 10:46:05 -0800 (PST) Received: from evgreen2.mtv.corp.google.com ([2620:15c:202:201:ffda:7716:9afc:1301]) by smtp.gmail.com with ESMTPSA id v89sm1458476pfk.12.2018.12.06.10.46.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 06 Dec 2018 10:46:04 -0800 (PST) From: Evan Green To: Andy Gross , Rob Herring , Bjorn Andersson Cc: Douglas Anderson , Evan Green , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, David Brown , Mark Rutland Subject: [PATCH v2 3/3] arm64: dts: qcom: sdm845: Add SD nodes for sdm845-mtp Date: Thu, 6 Dec 2018 10:45:22 -0800 Message-Id: <20181206184522.118062-4-evgreen@chromium.org> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20181206184522.118062-1-evgreen@chromium.org> References: <20181206184522.118062-1-evgreen@chromium.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Enable support for one of the micro SD slots on the MTP. Signed-off-by: Evan Green Reviewed-by: Douglas Anderson Reviewed-by: Bjorn Andersson --- Changes in v2: - Fixed alphabetization of node placement in sdm845-mtp.dtsi (Doug) - Fixed card detect name to match schematics (Doug). - Moved comment about drive strength next to the drive-strength entry (Doug) - Removed drive-strength from card detect input pin (Doug). - Consolidated tlmm nodes in MTP. arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 58 ++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts index b3def03581775..cde76da42cbb7 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts @@ -7,6 +7,7 @@ /dts-v1/; +#include #include #include "sdm845.dtsi" @@ -358,8 +359,16 @@ status = "okay"; }; -&tlmm { - gpio-reserved-ranges = <0 4>, <81 4>; +&sdhc_2 { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&sdc2_clk &sdc2_cmd &sdc2_data &sd_card_det_n>; + + vmmc-supply = <&vreg_l21a_2p95>; + vqmmc-supply = <&vddpx_2>; + + cd-gpios = <&tlmm 126 GPIO_ACTIVE_LOW>; }; &uart9 { @@ -450,3 +459,48 @@ bias-pull-up; }; }; + +&tlmm { + gpio-reserved-ranges = <0 4>, <81 4>; + + sdc2_clk: sdc2-clk { + pinconf { + pins = "sdc2_clk"; + bias-disable; + + /* + * It seems that mmc_test reports errors if drive + * strength is not 16 on clk, cmd, and data pins. + */ + drive-strength = <16>; + }; + }; + + sdc2_cmd: sdc2-cmd { + pinconf { + pins = "sdc2_cmd"; + bias-pull-up; + drive-strength = <16>; + }; + }; + + sdc2_data: sdc2-data { + pinconf { + pins = "sdc2_data"; + bias-pull-up; + drive-strength = <16>; + }; + }; + + sd_card_det_n: sd-card-det-n { + pinmux { + pins = "gpio126"; + function = "gpio"; + }; + + pinconf { + pins = "gpio126"; + bias-pull-up; + }; + }; +};