From patchwork Wed Oct 28 19:09:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 11864931 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6A65A61C for ; Thu, 29 Oct 2020 02:04:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 42596208FE for ; Thu, 29 Oct 2020 02:04:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="woeDlqOx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725843AbgJ1VnA (ORCPT ); Wed, 28 Oct 2020 17:43:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726328AbgJ1Vm4 (ORCPT ); Wed, 28 Oct 2020 17:42:56 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76579C0613CF for ; Wed, 28 Oct 2020 14:42:56 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id g12so607083wrp.10 for ; Wed, 28 Oct 2020 14:42:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=pO6LThXOtBiDEi5s3AU4bK7ClmEzefDtSdQh29OfxfE=; b=woeDlqOxzaMhYO/W3xE4Xt/FTXjXZS9IYCVk3C7SKpiAoiMc9+QCYQ+gFLGeJ+eNRK PNuHm0SaaqEjnGSJxhk/8T47O9l3FZ7YQHqAXVZTkTkjyXxD2oLbNLBLn6w/MSpYO1Wd DT0w6zHurgmWD/izmWmZoVnG3+tZhS8W6fx77YFpOKH7vZ9mgo+3wJM1x9MDKSqd77xj dJmmAe2mDKXQ3FURd/WCfAAgUbomckzaLd6uKMsmQlLwDPlui065sY4sexKCAtPrB0tI zeHC24jIB1Q1AVR1+D5WF4E7KClct/2717U+jut0ytiCntB+tWs6Z61RrMfq1r5dXYfC dFyA== 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:mime-version :content-transfer-encoding; bh=pO6LThXOtBiDEi5s3AU4bK7ClmEzefDtSdQh29OfxfE=; b=XPN1R0oGC307BSAL8/wZ20tugN6p69Hy7HzicV+rdBPOPz0oIOdlD+8PyQCaJoKtGa uJUA10cGQiAIZq4yCSQxs8oNLyZX6KVEnns2hfjFlQ7XUopZKRtshUehXDKXoqpODly3 MOcEnLuBxxv6CbAIKbEGjG+5slZ6MIRyZ431w+XJrEZ3q+rOXgMjxAnbcLoGAL4LZmZi JbnlcASQc8Is4br8afildihMPX3EilXdVDPnMwM0lDgaeMAydy65k6/M72NqutRqsfXG IFblIdq42ktgGJvReCPti52uTMKWLFwTZSNfjCSLLDy2d6L3VFpU1dU3LdNHmjI8h1mM /kPg== X-Gm-Message-State: AOAM531N9Bp5HBMX2sgRIHYy0SjOeUrvJ7t1cnYRQU41ZTTpBUDGBmLk 9gSKcKWcjy1GMUQUjbpaOa1E/TSrGNhmhtpH X-Google-Smtp-Source: ABdhPJwjC6oLcIeuFDqOhbI7uZMtQ7+6D0eUG7rTCO3UhVflfNApwtNhr9R9z6GC6kYAwnSTX31/rg== X-Received: by 2002:a05:6512:3102:: with SMTP id n2mr199836lfb.153.1603912198219; Wed, 28 Oct 2020 12:09:58 -0700 (PDT) Received: from eriador.lan ([188.162.64.219]) by smtp.gmail.com with ESMTPSA id c7sm52595ljk.59.2020.10.28.12.09.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 12:09:57 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson Cc: Rob Herring , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Manivannan Sadhasivam Subject: [PATCH 1/2] arm64: dts: qcom: sm8250: Add support for SDC2 Date: Wed, 28 Oct 2020 22:09:54 +0300 Message-Id: <20201028190955.1264526-1-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Manivannan Sadhasivam Add support for SDC2 which can be used to interface uSD card. Signed-off-by: Manivannan Sadhasivam [DB: minor fixes: clocks, iommus, opps] Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/sm8250.dtsi | 45 ++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi index 457c3e65c0b6..2de4a9f808d5 100644 --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi @@ -1462,6 +1462,51 @@ IPCC_MPROC_SIGNAL_GLINK_QMP }; }; + sdhc_2: sdhci@8804000 { + compatible = "qcom,sm8250-sdhci", "qcom,sdhci-msm-v5"; + reg = <0 0x08804000 0 0x1000>; + + interrupts = , + ; + interrupt-names = "hc_irq", "pwr_irq"; + + clocks = <&gcc GCC_SDCC2_AHB_CLK>, + <&gcc GCC_SDCC2_APPS_CLK>, + <&xo_board>; + clock-names = "iface", "core", "xo"; + iommus = <&apps_smmu 0x4a0 0x0>; + qcom,dll-config = <0x0007642c>; + qcom,ddr-config = <0x80040868>; + power-domains = <&rpmhpd SM8250_CX>; + operating-points-v2 = <&sdhc2_opp_table>; + + status = "disabled"; + + sdhc2_opp_table: sdhc2-opp-table { + compatible = "operating-points-v2"; + + opp-19200000 { + opp-hz = /bits/ 64 <19200000>; + required-opps = <&rpmhpd_opp_min_svs>; + }; + + opp-50000000 { + opp-hz = /bits/ 64 <50000000>; + required-opps = <&rpmhpd_opp_low_svs>; + }; + + opp-100000000 { + opp-hz = /bits/ 64 <100000000>; + required-opps = <&rpmhpd_opp_svs>; + }; + + opp-202000000 { + opp-hz = /bits/ 64 <202000000>; + required-opps = <&rpmhpd_opp_svs_l1>; + }; + }; + }; + dc_noc: interconnect@90c0000 { compatible = "qcom,sm8250-dc-noc"; reg = <0 0x090c0000 0 0x4200>; From patchwork Wed Oct 28 19:09:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 11863589 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 56D2114B4 for ; Wed, 28 Oct 2020 22:19:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2D3BD206ED for ; Wed, 28 Oct 2020 22:19:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="vuCk5p61" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731974AbgJ1WTb (ORCPT ); Wed, 28 Oct 2020 18:19:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731787AbgJ1WTM (ORCPT ); Wed, 28 Oct 2020 18:19:12 -0400 Received: from mail-ej1-x641.google.com (mail-ej1-x641.google.com [IPv6:2a00:1450:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E233DC0613CF for ; Wed, 28 Oct 2020 15:19:11 -0700 (PDT) Received: by mail-ej1-x641.google.com with SMTP id p9so1138777eji.4 for ; Wed, 28 Oct 2020 15:19:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=X+9CMR89RIjvhaJgbEWulHsiFiBj9DskJPmBidEwcdM=; b=vuCk5p61JvFkHGOOsrLLSTDQjp28EFuXH0Yuw8HCH43YEi24rlqU8xOTf7OLZmMugj 3LNYAwbQFQBPJ55akO5XMIlgfFmUQ9MHS71A9uPk9ZSz21vX2P4HOEkb/prZ1hDc1OKV 1n2RAMAccaVCh+Ksp6VQpAWzqtSeYMGkX75SOCb9erH6hu3n3rzZSxvvbU9rb/CrawkQ vUR4J/DrAMIammIy4sz/Cp5+Q5WY/o4aZBBVSpBZyFwlaKO4sk+hUcI+19wuf2mdCKJW 0iqeOQ9Titv6LNeDjHVazmAHhBYO9rDs4cBify151VurI5K0Jq9V2sDGH6jJo3v5xTqZ 5Pcg== 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:mime-version:content-transfer-encoding; bh=X+9CMR89RIjvhaJgbEWulHsiFiBj9DskJPmBidEwcdM=; b=q71lxsjQK8XRK8vxeccqWgm6YIcorBMYYH9by/QLC9MXW03s8WJwQPwAJsNOX+XMWQ sdpC76PtWOOvVlGGHCepzFwV/ad3kY589nyX9eZpxrp9qCIRvVlm1xaF3cblKTTRrSD3 RHQ5sIzwJn7Ch6ZqgTJ7iZYcNgWWxmFtGZ0MwnfLUkIFnGLV8eORGTkzqb54Z5Zwp3IN AR1jm8pKhPV7VshbAiXu3h/nTAumZRojHWU0AzCy2CxWwkZ4wxctomsQdcBy52gnjXVE YkVfULRD1VAoXp7cNIxE/ldr3Pw/yYD09TXI82z0RgxDwrh7S0UeAIJS5KlZuMyIm1p/ QHfQ== X-Gm-Message-State: AOAM5322CkH0DFte5EmGH7YuhJSjpxOvNh9SO9LRZpJNMgxU+MUkmThZ 3ss2PlilQZIBeAniiyax1bARxMxUaHsn9EJl X-Google-Smtp-Source: ABdhPJx0P/i7X2q9h33qW+hh3xPqphMcYmpKicQgm75nTUdHpbY+h+XSQ+MRSmUCBIkAfiTvPWNsEA== X-Received: by 2002:a19:2294:: with SMTP id i142mr195623lfi.579.1603912199902; Wed, 28 Oct 2020 12:09:59 -0700 (PDT) Received: from eriador.lan ([188.162.64.219]) by smtp.gmail.com with ESMTPSA id c7sm52595ljk.59.2020.10.28.12.09.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 12:09:59 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson Cc: Rob Herring , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Manivannan Sadhasivam Subject: [PATCH 2/2] arm64: dts: qcom: rb5: Add support for uSD card Date: Wed, 28 Oct 2020 22:09:55 +0300 Message-Id: <20201028190955.1264526-2-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201028190955.1264526-1-dmitry.baryshkov@linaro.org> References: <20201028190955.1264526-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Manivannan Sadhasivam Add support for uSD card on RB5 using the SDHC2 interface. Signed-off-by: Manivannan Sadhasivam [DB: disabled 1.8V support to get SDHC to work] Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 41 ++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts index 1528a865f1f8..aed00f707f1d 100644 --- a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts +++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts @@ -18,6 +18,7 @@ / { aliases { serial0 = &uart12; + sdhc2 = &sdhc_2; }; chosen { @@ -471,6 +472,20 @@ &qupv3_id_2 { status = "okay"; }; +&sdhc_2 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&sdc2_default_state &sdc2_card_det_n>; + vmmc-supply = <&vreg_l9c_2p96>; + vqmmc-supply = <&vreg_l6c_2p96>; + cd-gpios = <&tlmm 77 GPIO_ACTIVE_LOW>; + bus-width = <4>; + /* there seem to be issues with HS400-1.8V mode, so disable it */ + no-1-8-v; + no-sdio; + no-emmc; +}; + /* CAN */ &spi0 { status = "okay"; @@ -659,6 +674,32 @@ &tlmm { "HST_BLE_SNS_UART_RX", "HST_WLAN_UART_TX", "HST_WLAN_UART_RX"; + + sdc2_default_state: sdc2-default { + clk { + pins = "sdc2_clk"; + bias-disable; + drive-strength = <16>; + }; + + cmd { + pins = "sdc2_cmd"; + bias-pull-up; + drive-strength = <16>; + }; + + data { + pins = "sdc2_data"; + bias-pull-up; + drive-strength = <16>; + }; + }; + + sdc2_card_det_n: sd-card-det-n { + pins = "gpio77"; + function = "gpio"; + bias-pull-up; + }; }; &uart12 {