From patchwork Thu Dec 6 18:45:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evan Green X-Patchwork-Id: 10716639 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 547A8109C for ; Thu, 6 Dec 2018 18:46:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 469652ECBF for ; Thu, 6 Dec 2018 18:46:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 398392EE64; Thu, 6 Dec 2018 18:46:04 +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 C1E162ECBF for ; Thu, 6 Dec 2018 18:46:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726117AbeLFSqA (ORCPT ); Thu, 6 Dec 2018 13:46:00 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:33038 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725942AbeLFSp7 (ORCPT ); Thu, 6 Dec 2018 13:45:59 -0500 Received: by mail-pf1-f196.google.com with SMTP id c123so614738pfb.0 for ; Thu, 06 Dec 2018 10:45:59 -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=h5UhrT1YkH+1fuPSdX416xfr8tjTg9v3qKT0L+zzi3Y=; b=GtAM0LDsdPTIsrG1utyHA2ut2UsmQlYukn9jWXYhaKKHc0lfIu6/I0O0tGoeO/niEg DRscOXQFU7Gq5sZUnV4ITLR5kHjdHBAAlNZvhQZsdDzpdJ92lWRO6rHdZZmguXeDHuio EBtUXyn7TQZ+S8z4A7z3UMtfV92J8jBGiRf+0= 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=h5UhrT1YkH+1fuPSdX416xfr8tjTg9v3qKT0L+zzi3Y=; b=uIWk4kHd7hYP8W4sLuPehUSA6rUpyYxwvazOlXPjoz5k5IyqAgPMLgGhtLGf8a7U6O 0juXpRIWmD2DmVS/qAexx4rcCsg+cKAVsZ+rFu7l/e0XXfj/BU2bDK1LkiVg2UD4IpJ8 x+Br/Q1uN2gC6vrLU8yaZcjFwIJEiHFrWy5s0g63CldxQMUBjiZR6LCLGB04AWTFAKtB DenHq0j7Dxu656R+byyaTEwFhhx7wcdZPhp93vs8kcLxtpWAxS3bz4oVWVx8zgVWlvTc ibRlDrMyxx8dh1rxIuZxs7yJ1Pbh4mTB6dabqiIAyEw+BIkBNjgCXFZArFBMlQa5ByN8 DLmA== X-Gm-Message-State: AA+aEWb9MsaYWf4vaaCeOlH41VF2ShiRXv6ItRzQO6Ec2tMaDATQKs8i fnphVrr4tQGrxFwUagG9aLFc9A== X-Google-Smtp-Source: AFSGD/WBpuQEvdtJTvoC3/RCZ4vnHe/J72zpdu2BGq0MCab+H0XnTdVrK7iACA6XJe5z+lykbrel7A== X-Received: by 2002:a63:91c1:: with SMTP id l184mr25194557pge.29.1544121959034; Thu, 06 Dec 2018 10:45:59 -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.45.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 06 Dec 2018 10:45:58 -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 2/3] arm64: dts: qcom: sdm845: Add SD node Date: Thu, 6 Dec 2018 10:45:21 -0800 Message-Id: <20181206184522.118062-3-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 Add one of the two SD controllers to SDM845. Signed-off-by: Evan Green Reviewed-by: Douglas Anderson Reviewed-by: Bjorn Andersson --- Changes in v2: - Reworded commit message to note that there are multiple SD controllers. arch/arm64/boot/dts/qcom/sdm845.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index 1419b0098cb38..bb8eacdf40910 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -1078,6 +1078,21 @@ }; }; + sdhc_2: sdhci@8804000 { + compatible = "qcom,sdm845-sdhci", "qcom,sdhci-msm-v5"; + reg = <0x8804000 0x1000>; + + interrupts = , + ; + interrupt-names = "hc_irq", "pwr_irq"; + + clocks = <&gcc GCC_SDCC2_AHB_CLK>, + <&gcc GCC_SDCC2_APPS_CLK>; + clock-names = "iface", "core"; + + status = "disabled"; + }; + usb_1_hsphy: phy@88e2000 { compatible = "qcom,sdm845-qusb2-phy"; reg = <0x88e2000 0x400>; 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; + }; + }; +};