Message ID | 20230201155105.282708-6-krzysztof.kozlowski@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp354858wrn; Wed, 1 Feb 2023 07:53:17 -0800 (PST) X-Google-Smtp-Source: AK7set8AaAEHvZvixqVdiBmzlAjBpA0mekE7z/6tx1sTiFcyKwoh4QAN63GqM4guAnQdLF+UHwf1 X-Received: by 2002:a17:906:6997:b0:878:4e6c:344e with SMTP id i23-20020a170906699700b008784e6c344emr2980641ejr.43.1675266797126; Wed, 01 Feb 2023 07:53:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675266797; cv=none; d=google.com; s=arc-20160816; b=LdEsG+LHNrheC9saozXtilfB1qpCe3bShdKtgmHEc1VN1Mygf8uAPUX0QXTvIlaV3o dcAVKL93qi0JQhHmn3nvZ+gYkFHvWuc68GuXLGUiJkQu7qBLW9Iug+r8w1uCJCsUVs/X W/sebJuiKcXFEOK4nF1V0CSgpFS4vYJd5tFLJL3fUtPRZhxkLem24etjjIORAAYjcI+0 8mvhUzpD4SjVksb775AjnEsHoaMqWgse4XYcZRetGgTIkIAGSNRVo5SO/hC4kg3k3swR phWh2Sn+Bgl+djm3okaQ4lINSQo6cZERFdf1WNqVQSAK616JmBblGocNq0kspTzR5rom W6DQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/8fMKAAdBe60LyrW1GiaGrm1GztSVGVImruAPaAqIHU=; b=PhUdRF858+c8adDPoP62jFtTPuNKorgLMQawbGL2mOqYYAVP4pWVHejbVga2q5eycp UNPDa4R3eqNSTc0MENKmVoiIejkZymmWczbqQuwJeqygYsrjWNIA7B+RYI/mA4WrIXSA lc2y9QQxd7v5dEJIWoR62161fU403/lc4BQVxRyMgfl9+CUF5zgJuxi2gj5I/PZHChlA T1cnx35IeH9GZxWNt33rHQnxp4JukhVHMeu0TFxOpNS11WQuJFegKoypxPbBQ0EkN3Au uKkaLiQfarRzO0QwkLX+sWmvfbxIQb9AmmFlzWhUhTgrqZe3CC47tP3MiRnsyTVKYksB ADuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=i3oTJDZB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z94-20020a509e67000000b0049e0ab14fc4si4268553ede.545.2023.02.01.07.52.53; Wed, 01 Feb 2023 07:53:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=i3oTJDZB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232594AbjBAPvi (ORCPT <rfc822;duw91626@gmail.com> + 99 others); Wed, 1 Feb 2023 10:51:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232445AbjBAPvT (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 1 Feb 2023 10:51:19 -0500 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B18274A48 for <linux-kernel@vger.kernel.org>; Wed, 1 Feb 2023 07:51:18 -0800 (PST) Received: by mail-wr1-x430.google.com with SMTP id d14so17734568wrr.9 for <linux-kernel@vger.kernel.org>; Wed, 01 Feb 2023 07:51:18 -0800 (PST) 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=/8fMKAAdBe60LyrW1GiaGrm1GztSVGVImruAPaAqIHU=; b=i3oTJDZB7uXkZcw5uj83S6gdpSUW7UoZqiLH0RFiaLv5tUHosVfDEGGbGPMxoKgqAq lxkF+PCOEXdYHHgRJlzGy0onLWzEuyk1vxddcw/ozpu2pOR2oWIVLpzmAnP4em98Pmwz gEnVfm6yYRr+HJNEGZiCxqz+LwtW53BNl5/ZEi8dUGdEJqu8fbdvYivae0NXXzHCBGgg d0r63PK0dpB0SOgQLBAtlbaArrVY/c3ZbijdHXtI+oEb6SVYnigSIf8f620RlpAeUo4S Mo2414U+mgcG9SY9VoZkvILbdYjw2C8v+QS0FwS6WJedy6CI+Rg8vxl6xoKa6NlWQwTQ OqTw== 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=/8fMKAAdBe60LyrW1GiaGrm1GztSVGVImruAPaAqIHU=; b=eLhAvrMURtK0zG54uRwG5Edv7GZaw0JbZBNycspTxAxIOOyviuzW+OxLTydHjzu6Ys vFeNKIj3R4PSldQI1SuVaYwP35Kk+hZVeZW8YPams1MxYEGu1dbFCJGYIwgHqGEz2dwg OJLWfVxte6I/jSqcw+FHABJvYj4QWmZRLR7s2KS0Dz7+qlAc3iyoUZfbkT3ohZFLbk6o c+p2bF+p2DEgDwKXqYxpf+FIqev5D+xUui6YufwOPGz3qntU1FrXTiICCcB5sNph2Ia+ J5xGLpj2CwHqqqMiVd5n5YDQ98Ny85e0CHVDbQdU0F4an9nzQuckxjCaLy0MhoisQ1Hu 7QIA== X-Gm-Message-State: AO0yUKUMdGMZ1VwOutytllIV/9j6pOnIHPmxWOLxH5Tsgop6U+FChCL+ UhZdPrK6Z0aqtVPhTg2MXOrdVg== X-Received: by 2002:a05:6000:186a:b0:2c3:9851:e644 with SMTP id d10-20020a056000186a00b002c39851e644mr3703390wri.63.1675266677075; Wed, 01 Feb 2023 07:51:17 -0800 (PST) Received: from krzk-bin.. ([178.197.216.144]) by smtp.gmail.com with ESMTPSA id t1-20020adfe441000000b002bfd524255esm14816189wrm.43.2023.02.01.07.51.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 07:51:16 -0800 (PST) From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> To: Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Subject: [RFT PATCH 05/14] arm64: dts: qcom: sc8280xp: correct TLMM gpio-ranges Date: Wed, 1 Feb 2023 16:50:56 +0100 Message-Id: <20230201155105.282708-6-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230201155105.282708-1-krzysztof.kozlowski@linaro.org> References: <20230201155105.282708-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756644557061300828?= X-GMAIL-MSGID: =?utf-8?q?1756644557061300828?= |
Series |
ARM/arm64: dts: qcom: correct TLMM gpio-ranges
|
|
Commit Message
Krzysztof Kozlowski
Feb. 1, 2023, 3:50 p.m. UTC
Correct the number of GPIOs in TLMM pin controller.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Wed, Feb 01, 2023 at 04:50:56PM +0100, Krzysztof Kozlowski wrote: > Correct the number of GPIOs in TLMM pin controller. > > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > --- > arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi > index fa2d0d7d1367..17e8c26a9ae6 100644 > --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi > +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi > @@ -3533,7 +3533,7 @@ tlmm: pinctrl@f100000 { > #gpio-cells = <2>; > interrupt-controller; > #interrupt-cells = <2>; > - gpio-ranges = <&tlmm 0 0 230>; > + gpio-ranges = <&tlmm 0 0 228>; > }; I verified that this count matches what's in downstream. Reviewed-by: Brian Masney <bmasney@redhat.com> However, I noticed in upstream that we're using this reg property: reg = <0 0x0f100000 0 0x300000>; Downstream has a different base address and a wider size. Note: I added spaces for easy comparison. reg = < 0x0F000000 0x1000000>; I don't have access to the appropriate documents to see which is correct. I assume the base address in upstream is at least correct since pinctrl is working on this platform. Brian
On 2.02.2023 23:58, Brian Masney wrote: > On Wed, Feb 01, 2023 at 04:50:56PM +0100, Krzysztof Kozlowski wrote: >> Correct the number of GPIOs in TLMM pin controller. >> >> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> >> --- >> arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi >> index fa2d0d7d1367..17e8c26a9ae6 100644 >> --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi >> +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi >> @@ -3533,7 +3533,7 @@ tlmm: pinctrl@f100000 { >> #gpio-cells = <2>; >> interrupt-controller; >> #interrupt-cells = <2>; >> - gpio-ranges = <&tlmm 0 0 230>; >> + gpio-ranges = <&tlmm 0 0 228>; Won't that kill the UFS pins? >> }; > > I verified that this count matches what's in downstream. > > Reviewed-by: Brian Masney <bmasney@redhat.com> > > > However, I noticed in upstream that we're using this reg property: > > reg = <0 0x0f100000 0 0x300000>; > > Downstream has a different base address and a wider size. Note: I added > spaces for easy comparison. > > reg = < 0x0F000000 0x1000000>; > > I don't have access to the appropriate documents to see which is > correct. I assume the base address in upstream is at least correct since > pinctrl is working on this platform. Downstream offsets things in the driver https://git.codelinaro.org/clo/la/kernel/msm-5.4/-/blob/LV.AU.1.2.3.r1-03600-gen3meta.0/drivers/pinctrl/qcom/pinctrl-direwolf.c#L20 Notice how UFS/QDSD pins addresses differ by 0x1000... up- and downstream too. I'd imagine Bjorn/Johan/whoever did that used magic PDFs instead of not-very- tested downstream sources. Another note, the downstream driver may be incomplete/wrong, as Linux was not exactly the main usecase of 8280xp so the testing there was most likely only basic. Konrad > > Brian >
On Fri, Feb 03, 2023 at 12:45:49AM +0100, Konrad Dybcio wrote: > On 2.02.2023 23:58, Brian Masney wrote: > > On Wed, Feb 01, 2023 at 04:50:56PM +0100, Krzysztof Kozlowski wrote: > >> Correct the number of GPIOs in TLMM pin controller. > >> > >> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > >> --- > >> arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi > >> index fa2d0d7d1367..17e8c26a9ae6 100644 > >> --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi > >> +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi > >> @@ -3533,7 +3533,7 @@ tlmm: pinctrl@f100000 { > >> #gpio-cells = <2>; > >> interrupt-controller; > >> #interrupt-cells = <2>; > >> - gpio-ranges = <&tlmm 0 0 230>; > >> + gpio-ranges = <&tlmm 0 0 228>; > Won't that kill the UFS pins? For others quick reference, Konrad is talking about this line from sa8540p-ride.dts: reset-gpios = <&tlmm 228 GPIO_ACTIVE_LOW>; I noticed that earlier but assumed this was one based. However, looking at pinctrl-sc8280xp.c I see gpio0..gpio227 defined. Brian
On 3.02.2023 00:59, Brian Masney wrote: > On Fri, Feb 03, 2023 at 12:45:49AM +0100, Konrad Dybcio wrote: >> On 2.02.2023 23:58, Brian Masney wrote: >>> On Wed, Feb 01, 2023 at 04:50:56PM +0100, Krzysztof Kozlowski wrote: >>>> Correct the number of GPIOs in TLMM pin controller. >>>> >>>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> >>>> --- >>>> arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 2 +- >>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>> >>>> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi >>>> index fa2d0d7d1367..17e8c26a9ae6 100644 >>>> --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi >>>> +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi >>>> @@ -3533,7 +3533,7 @@ tlmm: pinctrl@f100000 { >>>> #gpio-cells = <2>; >>>> interrupt-controller; >>>> #interrupt-cells = <2>; >>>> - gpio-ranges = <&tlmm 0 0 230>; >>>> + gpio-ranges = <&tlmm 0 0 228>; >> Won't that kill the UFS pins? > > For others quick reference, Konrad is talking about this line from > sa8540p-ride.dts: > > reset-gpios = <&tlmm 228 GPIO_ACTIVE_LOW>; > > I noticed that earlier but assumed this was one based. However, looking > at pinctrl-sc8280xp.c I see gpio0..gpio227 defined. + gpio229 is the reset pin for the UFS card slot Konrad > > Brian >
On Fri, Feb 03, 2023 at 01:05:35AM +0100, Konrad Dybcio wrote: > On 3.02.2023 00:59, Brian Masney wrote: > > For others quick reference, Konrad is talking about this line from > > sa8540p-ride.dts: > > > > reset-gpios = <&tlmm 228 GPIO_ACTIVE_LOW>; > > > > I noticed that earlier but assumed this was one based. However, looking > > at pinctrl-sc8280xp.c I see gpio0..gpio227 defined. > > + gpio229 is the reset pin for the UFS card slot We don't have the UFS card slot on the sa8540p exposed. However, it is available on the sa8295p. The original DTS in upstream listed 230 pins, however pinctrl-sc8280xp.c lists 233 pins and the two UFS pins match what we have in DTS. static const struct pinctrl_pin_desc sc8280xp_pins[] = { PINCTRL_PIN(0, "GPIO_0"), ... PINCTRL_PIN(227, "GPIO_227"), PINCTRL_PIN(228, "UFS_RESET"), PINCTRL_PIN(229, "UFS1_RESET"), PINCTRL_PIN(230, "SDC2_CLK"), PINCTRL_PIN(231, "SDC2_CMD"), PINCTRL_PIN(232, "SDC2_DATA"), Rescind-Reviewed-by: Brian Masney <bmasney@redhat.com>
On 03/02/2023 00:45, Konrad Dybcio wrote: > > > On 2.02.2023 23:58, Brian Masney wrote: >> On Wed, Feb 01, 2023 at 04:50:56PM +0100, Krzysztof Kozlowski wrote: >>> Correct the number of GPIOs in TLMM pin controller. >>> >>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> >>> --- >>> arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi >>> index fa2d0d7d1367..17e8c26a9ae6 100644 >>> --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi >>> +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi >>> @@ -3533,7 +3533,7 @@ tlmm: pinctrl@f100000 { >>> #gpio-cells = <2>; >>> interrupt-controller; >>> #interrupt-cells = <2>; >>> - gpio-ranges = <&tlmm 0 0 230>; >>> + gpio-ranges = <&tlmm 0 0 228>; > Won't that kill the UFS pins? This patchset is obsolete and replaced with v2. I alerady replied here that this was not good approach... Best regards, Krzysztof
diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi index fa2d0d7d1367..17e8c26a9ae6 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi @@ -3533,7 +3533,7 @@ tlmm: pinctrl@f100000 { #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>; - gpio-ranges = <&tlmm 0 0 230>; + gpio-ranges = <&tlmm 0 0 228>; }; apps_smmu: iommu@15000000 {