From mboxrd@z Thu Jan 1 00:00:00 1970 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 6CBF6C2D0CC for ; Thu, 15 Dec 2022 13:20:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229846AbiLONUh (ORCPT ); Thu, 15 Dec 2022 08:20:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229543AbiLONUg (ORCPT ); Thu, 15 Dec 2022 08:20:36 -0500 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9F462DA98 for ; Thu, 15 Dec 2022 05:20:34 -0800 (PST) Received: by mail-lf1-x136.google.com with SMTP id b13so15625980lfo.3 for ; Thu, 15 Dec 2022 05:20:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ilerhl9aB5wldZrGi6JAgqg6pC5+HsK4xqZHdd6qSDQ=; b=cwIRbjabiTAM/XKcFoAozZBIgY2TmT4pmJeGjO/WYqhQctpp4UjGeDHE1/u4Hl5q0I 6IFMCv6ct0755kRKSvAwmJ7i5Sih27uziVxexSL4OetAC5oDPRA8OfCv7AzA7U9S/Bca d8NHqzvSXNr0jxlCYMxCZPwONJCEQ4gMEHnGKjqOPUxDfo+w12ofxUblc9+Qdg75ijgm jyjf7twPWXwfwak2kC2TIAQJbWqeb1DVw1Wqgv6ys7haZw9DVcv17r4k3qUh4HMJ8/PJ LehfHsTnXINxibMAtsRE9oY3sHcAPC0Fg/yh0Frhj27gQTwM5tXnrf0Qfi6/c0WI1bdt Ms6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ilerhl9aB5wldZrGi6JAgqg6pC5+HsK4xqZHdd6qSDQ=; b=k+BUASQn6UWTeEPxNXplGbXkwXuBptYFMs3Zh9JRuJszHS3hamcb7G0LEnket3t+7u NTN+pAnrh+sPJ11z4lSTt/jpNK6U7/6aPQRGsmMbNUEHzba5GFJ2rzA2PFUZYJjtefL+ I54FoSD0UbpWciDYoZ7h8hCNScbqcuBnsqdl/1EzYngSpavGkfh9u25zFDvL1tctC8nQ FSXoogU6eCVTky7DmgViL71yeAiReKOI5zOhUVyImE0xqxuQQSwS7GnLnyV1gxqwZpf4 6hTQXGa3TRGzJvuySz97GIe4cAa5tuwy+LcOeU/6byrbcOsju5u7qz2sNicPIYdtt1WP 8dtQ== X-Gm-Message-State: ANoB5pknRcjv+nfk5+F4fYw6Zk/9gljC83TFHrhp6Sb3/tjEYzgsVLeO MGY2g2d+pcDxbUpv3v5vJeebgA== X-Google-Smtp-Source: AA0mqf7RT8oY59cf+Be3rLYgLtjU2DX4Etj8BCthJJuaJRchwXq8CyN2TyAqyBsJDjQnRL9mUF2CCw== X-Received: by 2002:a05:6512:b91:b0:4b6:ed8b:4f16 with SMTP id b17-20020a0565120b9100b004b6ed8b4f16mr6433868lfv.52.1671110433312; Thu, 15 Dec 2022 05:20:33 -0800 (PST) Received: from [192.168.1.101] (abxh44.neoplus.adsl.tpnet.pl. [83.9.1.44]) by smtp.gmail.com with ESMTPSA id p15-20020a056512328f00b004a46f92a15bsm1153210lfe.41.2022.12.15.05.20.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 15 Dec 2022 05:20:32 -0800 (PST) Message-ID: <33fe1249-34b4-443b-4258-586ed8c5f0e6@linaro.org> Date: Thu, 15 Dec 2022 14:20:30 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH 5/6] arm64: dts: qcom: msm8976: Declare and use SDC2 pins Content-Language: en-US To: Marijn Suijten , phone-devel@vger.kernel.org, Bjorn Andersson Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Andy Gross , Rob Herring , Krzysztof Kozlowski , AngeloGioacchino Del Regno , Luca Weiss , Adam Skladowski , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20221214232049.703484-1-marijn.suijten@somainline.org> <20221214232049.703484-6-marijn.suijten@somainline.org> From: Konrad Dybcio In-Reply-To: <20221214232049.703484-6-marijn.suijten@somainline.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On 15.12.2022 00:20, Marijn Suijten wrote: > Add the pinctrl states for SDC2 and use them on sdhc_2 to support SD > Cards on the currently mainlined Sony Loire platform. > > Signed-off-by: Marijn Suijten > --- > .../qcom/msm8956-sony-xperia-loire-kugo.dts | 6 +++ > .../dts/qcom/msm8956-sony-xperia-loire.dtsi | 6 +++ > arch/arm64/boot/dts/qcom/msm8976.dtsi | 45 +++++++++++++++++++ > 3 files changed, 57 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire-kugo.dts b/arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire-kugo.dts > index 3fb8e23e4330..9178943e2ee1 100644 > --- a/arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire-kugo.dts > +++ b/arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire-kugo.dts > @@ -33,3 +33,9 @@ &pm8950_l1 { > regulator-min-microvolt = <1100000>; > regulator-max-microvolt = <1300000>; > }; > + > +&sdc2_on_state { > + data-pins { > + drive-strength = <8>; > + }; > +}; You can add a label to the data-pins subnode. > diff --git a/arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi b/arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi > index 700583a56a0e..2253fb05f1c9 100644 > --- a/arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi > +++ b/arch/arm64/boot/dts/qcom/msm8956-sony-xperia-loire.dtsi > @@ -264,6 +264,12 @@ &sdhc_1 { > status = "okay"; > }; > > +&sdc2_on_state { > + clk-pins { > + drive-strength = <10>; > + }; > +}; > + > &sdhc_2 { > bus-width = <4>; > cd-gpios = <&tlmm 100 GPIO_ACTIVE_HIGH>; > diff --git a/arch/arm64/boot/dts/qcom/msm8976.dtsi b/arch/arm64/boot/dts/qcom/msm8976.dtsi > index 7d4c7548882c..f3371eaa2940 100644 > --- a/arch/arm64/boot/dts/qcom/msm8976.dtsi > +++ b/arch/arm64/boot/dts/qcom/msm8976.dtsi > @@ -558,6 +558,46 @@ rclk-pins { > }; > }; > > + sdc2_off_state: sdc2-off-state { > + clk-pins { > + pins = "sdc2_clk"; > + drive-strength = <2>; > + bias-disable; > + }; > + > + cmd-pins { > + pins = "sdc2_cmd"; > + drive-strength = <2>; > + bias-pull-up; > + }; > + > + data-pins { > + pins = "sdc2_data"; > + drive-strength = <2>; > + bias-pull-up; > + }; > + }; > + > + sdc2_on_state: sdc2-on-state { > + clk-pins { > + pins = "sdc2_clk"; > + drive-strength = <16>; > + bias-disable; > + }; > + > + cmd-pins { > + pins = "sdc2_cmd"; > + drive-strength = <10>; > + bias-pull-up; > + }; > + > + data-pins { > + pins = "sdc2_data"; > + drive-strength = <10>; > + bias-pull-up; > + }; > + }; > + > spi1_default: spi0-default-state { > spi-pins { > pins = "gpio0", "gpio1", "gpio3"; > @@ -751,6 +791,11 @@ sdhc_2: mmc@7864000 { > <&gcc GCC_SDCC2_APPS_CLK>, > <&rpmcc RPM_SMD_XO_CLK_SRC>; > clock-names = "iface", "core", "xo"; > + > + pinctrl-0 = <&sdc2_on_state>; > + pinctrl-1 = <&sdc2_off_state>; > + pinctrl-names = "default", "sleep"; Ditto (prev patch) Konrad > + > status = "disabled"; > }; >