From patchwork Wed Oct 26 20:03:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 618926 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7BBAFA3743 for ; Wed, 26 Oct 2022 20:04:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234433AbiJZUEG (ORCPT ); Wed, 26 Oct 2022 16:04:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233815AbiJZUEF (ORCPT ); Wed, 26 Oct 2022 16:04:05 -0400 Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D3FE102DEB for ; Wed, 26 Oct 2022 13:04:04 -0700 (PDT) Received: by mail-qk1-x72f.google.com with SMTP id m6so11528417qkm.4 for ; Wed, 26 Oct 2022 13:04:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FCMOew4GYhYa9VutNSyEqOxm0n7KKviZV3m1tbrXNe8=; b=sTTWAIo5k27JetB031FERfXCHBmgKPyJ72n2o8UpQU7LPPUKLhGV/CDya5o/7qVF1q uOqEOdGauhJkk9EAWfkObzamE1fBwkEZ4wJLVDNagbXvR6JivctG6utnuSdEvbzDW3AB zW/kLgrUcuHCMiczttSb93NiRVPpXwBweiOq8DN+AZmFjpVoBhwVZ+zGiI2LTfE0hqG0 XzQKPjTLJtg2L99KsgK9xZDOOgDGsSVXxBhFqB+sfbOBJFkBZ51g6UidteeNMBK/VMDh dlElAojwU9/5R+8NwyACsGYei27bywaB2tavQdvwraMhkBaOUVMcbM1ryfp3Wfq8SNlk bXPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FCMOew4GYhYa9VutNSyEqOxm0n7KKviZV3m1tbrXNe8=; b=g5z4nEVaBx7haNNkFBxGuhpOoP2g29q4hjNzmgEJX2dErLZOQwCKEhPVR+YVczDCLY v8yWXLy7Ex2QDXGmR00QA8++JuRwUwjtLd7khzfhUDNQuwX2IeHGdQy6ZIpLI26FcQSo 4crYIoJiJGSGWmgtGB60gy0JscsPrlrgkGkHhvTw7JUZTctgvtrxSUyHg0T4AOsCu2oo 5BL97mzhONS0f7BPV+AvGLWjl8UakOPTIosqJ8YLmabpICihuZF4O/5x3bLY7VLNR29y 2Hsew5FmeDlUjQCl8ToS9LoSotMFpbgL7HMFYfVMKsxgMIIWC7LroGGn2ka+VXi7mYis aQqg== X-Gm-Message-State: ACrzQf2oT0u4T0Po87caW+W166DzxsiQOQLcGtuK7Vqc7IroyUEKeG9O nhzxEzGLSFXZFfDLVfRdBRLbHw== X-Google-Smtp-Source: AMsMyM4AS50UrpNeey0s5Z7YjYa+fX4boAh819y3K4g+c2NblZIARcITUJAeqCDo2aFHrVHFEuBK0g== X-Received: by 2002:a05:620a:4487:b0:6ee:bcfd:bd38 with SMTP id x7-20020a05620a448700b006eebcfdbd38mr31661442qkp.468.1666814643576; Wed, 26 Oct 2022 13:04:03 -0700 (PDT) Received: from krzk-bin.. ([64.57.193.93]) by smtp.gmail.com with ESMTPSA id de30-20020a05620a371e00b006e99290e83fsm2942089qkb.107.2022.10.26.13.04.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 13:04:02 -0700 (PDT) From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Dmitry Baryshkov Subject: [PATCH 1/4] arm64: dts: qcom: sm8450: move SDHCI pin configuration to DTSI Date: Wed, 26 Oct 2022 16:03:54 -0400 Message-Id: <20221026200357.391635-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221026200357.391635-1-krzysztof.kozlowski@linaro.org> References: <20221026200357.391635-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The SDHCI pin configuration/mux nodes are actually common to all upstreamed boards, so define them in SoC DTSI to reduce code duplication. Signed-off-by: Krzysztof Kozlowski --- In theory drive strength belongs to the board DTS, not SoC DTSI, but I am following the advice here: https://lore.kernel.org/lkml/CAD=FV=VUL4GmjaibAMhKNdpEso_Hg_R=XeMaqah1LSj_9-Ce4Q@mail.gmail.com/ --- .../qcom/sm8450-sony-xperia-nagara-pdx223.dts | 20 ------------------- arch/arm64/boot/dts/qcom/sm8450.dtsi | 20 +++++++++++++++++++ 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara-pdx223.dts b/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara-pdx223.dts index 82918c2d956f..718c690af8ad 100644 --- a/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara-pdx223.dts +++ b/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara-pdx223.dts @@ -572,26 +572,6 @@ &spi10 { &tlmm { gpio-reserved-ranges = <28 4>; - sdc2_default_state: sdc2-default-state { - clk-pins { - pins = "sdc2_clk"; - drive-strength = <16>; - bias-disable; - }; - - cmd-pins { - pins = "sdc2_cmd"; - drive-strength = <16>; - bias-pull-up; - }; - - data-pins { - pins = "sdc2_data"; - drive-strength = <16>; - bias-pull-up; - }; - }; - ts_int_default: ts-int-default-state { pins = "gpio23"; function = "gpio"; diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi index 1d1775334575..1df5c964c6f7 100644 --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi @@ -2515,6 +2515,26 @@ tlmm: pinctrl@f100000 { gpio-ranges = <&tlmm 0 0 211>; wakeup-parent = <&pdc>; + sdc2_default_state: sdc2-default-state { + clk-pins { + pins = "sdc2_clk"; + drive-strength = <16>; + bias-disable; + }; + + cmd-pins { + pins = "sdc2_cmd"; + drive-strength = <16>; + bias-pull-up; + }; + + data-pins { + pins = "sdc2_data"; + drive-strength = <16>; + bias-pull-up; + }; + }; + sdc2_sleep_state: sdc2-sleep-state { clk-pins { pins = "sdc2_clk"; From patchwork Wed Oct 26 20:03:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 618925 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ED42CECDFA1 for ; Wed, 26 Oct 2022 20:04:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234869AbiJZUEP (ORCPT ); Wed, 26 Oct 2022 16:04:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234775AbiJZUEN (ORCPT ); Wed, 26 Oct 2022 16:04:13 -0400 Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com [IPv6:2607:f8b0:4864:20::729]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F47E10DE79 for ; Wed, 26 Oct 2022 13:04:09 -0700 (PDT) Received: by mail-qk1-x729.google.com with SMTP id t25so11541437qkm.2 for ; Wed, 26 Oct 2022 13:04:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=M6v/CsZRDA1d2R0cAzGnQgTWkDS1APIaz3UwNgmbIWw=; b=gnhQwLYxwtx7Xdco+gT2KU/NHypeROjgqFu7jLuzg3eNmN6gkbJH07jY4v4xM3+8PC Tf4kXZM5pdqNRqw16IqsZopmK+w+ZEtsEN7fJNK1GcHEJcLk4Pq5bop+y8e94cEqX+EC lmzTeisbs1/ftmTxTtRTnSYIq0inrO5MmZuK8quifr20GWeLExyp3Fv3rVjdtonzciDB gwEoQh/jH8q9YXhv0rRUG6OySYN/DVpSk0RlqbKH6ixeQlKISI/8FlHgPvdbygWJEx1a DsyzuMbUp5k6DXBSNSI943IAqxAt0uL6VmCZlncMmHg/NUt6j1E8wGJ5UrvEWBldLg9P 8Pfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=M6v/CsZRDA1d2R0cAzGnQgTWkDS1APIaz3UwNgmbIWw=; b=mDFeHNVhqtjmOp5E/5eMkBpDSJh9cYp6C2+vGEaB5KJjZztJl16euQ6RlfA/A9NLc7 m9XKdc6MTv+iRm5a+XeBVcArVvYMuFONv45KAPI89ocf50D67mqCP+dA112fiOdoNIAI 1QpsxQhjawsi2TP4brVmGqhK8fYgbu2CaHroAE0ElgvUUDdSqfH2yktzRoJRP4iLqe6p ScGJfxlbIEa+8y99foEGwIH9VaKwsXU3/JR5BrR7JCQNNUQpK/VlmC1BrTcb4Iisp3sc i3w9iTIozjcJowArnn2vlpu9noLIhc9tf65FhEaewls8XjaD+QlLYYewJRw085eiNEBG 2BRw== X-Gm-Message-State: ACrzQf2ze30viJDSBbVjVUB1gs+tA1/XU0bbPTQG3g9Lglvz+wccSAT3 fgERupOE9dlO/VM/hXMDOiPmSA== X-Google-Smtp-Source: AMsMyM71/Afca9qU2l+fzQKLHNh42odj4FueRgDJvBxurcK1AlXpFmoCHECPt5aAEeGjVJySKFGCEw== X-Received: by 2002:a05:620a:240f:b0:6ec:ffd0:22a4 with SMTP id d15-20020a05620a240f00b006ecffd022a4mr32322478qkn.523.1666814648390; Wed, 26 Oct 2022 13:04:08 -0700 (PDT) Received: from krzk-bin.. ([64.57.193.93]) by smtp.gmail.com with ESMTPSA id de30-20020a05620a371e00b006e99290e83fsm2942089qkb.107.2022.10.26.13.04.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 13:04:07 -0700 (PDT) From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Dmitry Baryshkov Subject: [PATCH 4/4] arm64: dts: qcom: sm8450-qrd: add SDHCI for microSD Date: Wed, 26 Oct 2022 16:03:57 -0400 Message-Id: <20221026200357.391635-5-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221026200357.391635-1-krzysztof.kozlowski@linaro.org> References: <20221026200357.391635-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Based on downstream DTS, it seems that SM8450 QRD has microSD card slot. Signed-off-by: Krzysztof Kozlowski --- Not tested. --- arch/arm64/boot/dts/qcom/sm8450-qrd.dts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8450-qrd.dts b/arch/arm64/boot/dts/qcom/sm8450-qrd.dts index 017bc48430ba..c9a08608ccf4 100644 --- a/arch/arm64/boot/dts/qcom/sm8450-qrd.dts +++ b/arch/arm64/boot/dts/qcom/sm8450-qrd.dts @@ -427,6 +427,18 @@ &remoteproc_slpi { firmware-name = "qcom/sm8450/slpi.mbn"; }; +&sdhc_2 { + cd-gpios = <&tlmm 92 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&sdc2_default_state &sdc2_card_det_n>; + pinctrl-1 = <&sdc2_sleep_state &sdc2_card_det_n>; + vmmc-supply = <&vreg_l9c_2p96>; + vqmmc-supply = <&vreg_l6c_1p8>; + no-sdio; + no-mmc; + status = "okay"; +}; + &spi4 { status = "okay"; }; @@ -474,6 +486,13 @@ pinconf { bias-pull-down; }; }; + + sdc2_card_det_n: sd-card-det-n-state { + pins = "gpio92"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; }; &uart7 {