Message ID | 20221212182314.1902632-2-bmasney@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2397561wrr; Mon, 12 Dec 2022 10:28:35 -0800 (PST) X-Google-Smtp-Source: AA0mqf7zK0LfaOaTuqO8t0LccM2nNy6SC+xBqgcdSeGQMG1pi6koN23fnDonsl6PT/7gIBE9si91 X-Received: by 2002:a05:6a20:6f04:b0:ab:e764:dc2c with SMTP id gt4-20020a056a206f0400b000abe764dc2cmr22962918pzb.7.1670869714702; Mon, 12 Dec 2022 10:28:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670869714; cv=none; d=google.com; s=arc-20160816; b=lyOo3O+QDhR7neo4wESCxiYw9nDAx7FYPdidcXwTbxstsz47vUVci5/LJawFsiGkNj 3A9ZudnRpwa3m9n9TFfOd4bGuTulFFrr+uxJVCH7g3/EIWOc3BGVi6/OybCa/X5jTs+e Ku+werLek69vQ35MbkbeLp4Ec2V8RqII0vW9rmFTRQnB1Sv1YVF+i5DWFV9maInpniSE iSXQtRxg7bZfa8ZbbQ8FCcUG8UGgFEdU1R6LJPH86yRkEvEluhwNvDbbZmaKAecslA3d KB7C/ZHJ3W/kqVpcHB9tGyT4IeQWLSaUaI0MeULUeEMd0U/avcSm44Tojrp1pA1DVRGi sfYw== 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=59XhlXC9Hqnb96mVLMejnqpQvDSEyia1t81oDMf3rF4=; b=uNZ6qbpmqBXf/MJutmtU5QbePsqflgtgzKgMukpEcqwyV/1oLfzeoD+hgktS33fKnX cM23jOUxkMETdTL7deN8x2gI9Fq7pkZOKibBZUEYSGNgTt68arTIBku8aPWE930vorvb E+L9qtbQjNga8skxGOAfYM2ElslnglCOJo72tBSB/yvYGmdJ7/CFrv/zRbvvwrE4maF2 k+wPuDqxZOXp6Phvqg8ckW7j3AtU0xdAM1zV12uoQQ6Fbc0hv8q23ytV8HH1Zy11+6kD WRUGlxW/H5/af+sa3RciJo9yfkzXYnkgZY/sx9QicfQBNI+w/mkMqrURJW0MYm392jOk xrlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JTqEjX9u; 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=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bc27-20020a656d9b000000b0043a0121bb28si10299853pgb.811.2022.12.12.10.28.22; Mon, 12 Dec 2022 10:28:34 -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=@redhat.com header.s=mimecast20190719 header.b=JTqEjX9u; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232756AbiLLSY2 (ORCPT <rfc822;jeantsuru.cumc.mandola@gmail.com> + 99 others); Mon, 12 Dec 2022 13:24:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229629AbiLLSY1 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 12 Dec 2022 13:24:27 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04824FCE3 for <linux-kernel@vger.kernel.org>; Mon, 12 Dec 2022 10:23:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670869406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=59XhlXC9Hqnb96mVLMejnqpQvDSEyia1t81oDMf3rF4=; b=JTqEjX9u/lH16XVhEiV+/9XndK9++qBr2U7akzfLigLMjIFyqq2QoJYqEf+YKcRbqUqaMJ g6o9PJ6h5gAgFga90c8IkZYlLW9rnVr9M7ueI28uv2NYzk/f11XJLXB8yFswLvfmbthg0a sQWOv+lazotG30ZWtsT1DlowO3vjXTI= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-573-ZIqPxkjaMsSVx_1AIivwsg-1; Mon, 12 Dec 2022 13:23:24 -0500 X-MC-Unique: ZIqPxkjaMsSVx_1AIivwsg-1 Received: by mail-qt1-f199.google.com with SMTP id fw8-20020a05622a4a8800b003a64f82fe73so12224816qtb.3 for <linux-kernel@vger.kernel.org>; Mon, 12 Dec 2022 10:23:24 -0800 (PST) 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=59XhlXC9Hqnb96mVLMejnqpQvDSEyia1t81oDMf3rF4=; b=op5i+VSjNPYzy2unElCJQhvhcdyda4TEUwE1YrGXlwI1LHUA1pWooati96YX14yEeL TxWtTafzR18nXLOyNMs8iSeI7VtFipqCoEzm7ZtpgWmLt0OwCOFQkHlgIABHrkz14WHd tvH45bjGV/pT/banKi5Ke9eyrgVL0F/z4GN2EZRFuARR27SSLFN3okJmzqlJj56Qg5KQ lTdyftWYxwtxnO07529oDKwBjS6kcaIyL60/mR3XksPjXawxbUUIdHJg0I4VB9+JP3jT sSwYPrZecPf5UnO47+yTQLV8ccgRqi48Mf7De9u26ZM8c98dmWbFo8MoFD5YLT4kKnow ySfQ== X-Gm-Message-State: ANoB5pnp5OJ5+prJrG4VAWLJ1wcV8UnZY3A5EHtYPXmeO/sjR+jF/Sy1 uSF2tRpUWvYITwMrozSPIf5YDJFX6p2T3YppXI+/9FmA2nX+7echgyzq8rZoNDxxgl+i2HGYbfZ pvgOznpGAbrBZKFVkT53ILpIL X-Received: by 2002:ac8:708b:0:b0:3a8:1ba:b8ab with SMTP id y11-20020ac8708b000000b003a801bab8abmr21142501qto.6.1670869404410; Mon, 12 Dec 2022 10:23:24 -0800 (PST) X-Received: by 2002:ac8:708b:0:b0:3a8:1ba:b8ab with SMTP id y11-20020ac8708b000000b003a801bab8abmr21142482qto.6.1670869404215; Mon, 12 Dec 2022 10:23:24 -0800 (PST) Received: from x1.redhat.com (c-73-214-169-22.hsd1.pa.comcast.net. [73.214.169.22]) by smtp.gmail.com with ESMTPSA id 3-20020ac85643000000b003a816011d51sm1998185qtt.38.2022.12.12.10.23.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Dec 2022 10:23:23 -0800 (PST) From: Brian Masney <bmasney@redhat.com> To: andersson@kernel.org, krzysztof.kozlowski+dt@linaro.org Cc: konrad.dybcio@linaro.org, robh+dt@kernel.org, johan+linaro@kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ahalaney@redhat.com, echanude@redhat.com, quic_shazhuss@quicinc.com Subject: [PATCH 1/4] arm64: dts: qcom: sc8280xp: rename i2c5 to i2c21 Date: Mon, 12 Dec 2022 13:23:11 -0500 Message-Id: <20221212182314.1902632-2-bmasney@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221212182314.1902632-1-bmasney@redhat.com> References: <20221212182314.1902632-1-bmasney@redhat.com> MIME-Version: 1.0 Content-type: text/plain Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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?1752033881864086469?= X-GMAIL-MSGID: =?utf-8?q?1752033881864086469?= |
Series | arm64: dts: qcom: sc8280xp: add i2c and spi nodes | |
Commit Message
Brian Masney
Dec. 12, 2022, 6:23 p.m. UTC
According to the downstream 5.4 kernel sources for the sa8540p,
i2c@894000 is labeled i2c bus 21, not 5. The interrupts and clocks
also match. Let's go ahead and correct the name that's used in the
three files where this is listed.
Signed-off-by: Brian Masney <bmasney@redhat.com>
Fixes: 152d1faf1e2f3 ("arm64: dts: qcom: add SC8280XP platform")
Fixes: ccd3517faf183 ("arm64: dts: qcom: sc8280xp: Add reference device")
Fixes: 32c231385ed43 ("arm64: dts: qcom: sc8280xp: add Lenovo Thinkpad X13s devicetree")
---
arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 6 +++---
arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 6 +++---
arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
Comments
On 12.12.2022 19:23, Brian Masney wrote: > According to the downstream 5.4 kernel sources for the sa8540p, > i2c@894000 is labeled i2c bus 21, not 5. The interrupts and clocks > also match. Let's go ahead and correct the name that's used in the > three files where this is listed. > > Signed-off-by: Brian Masney <bmasney@redhat.com> > Fixes: 152d1faf1e2f3 ("arm64: dts: qcom: add SC8280XP platform") > Fixes: ccd3517faf183 ("arm64: dts: qcom: sc8280xp: Add reference device") > Fixes: 32c231385ed43 ("arm64: dts: qcom: sc8280xp: add Lenovo Thinkpad X13s devicetree") > --- Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Konrad > arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 6 +++--- > arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 6 +++--- > arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 2 +- > 3 files changed, 7 insertions(+), 7 deletions(-) > > diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts > index 551768f97729..1ab76724144d 100644 > --- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts > +++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts > @@ -326,11 +326,11 @@ &qup2 { > status = "okay"; > }; > > -&qup2_i2c5 { > +&qup2_i2c21 { > clock-frequency = <400000>; > > pinctrl-names = "default"; > - pinctrl-0 = <&qup2_i2c5_default>; > + pinctrl-0 = <&qup2_i2c21_default>; > > status = "okay"; > > @@ -598,7 +598,7 @@ qup0_i2c4_default: qup0-i2c4-default-state { > drive-strength = <16>; > }; > > - qup2_i2c5_default: qup2-i2c5-default-state { > + qup2_i2c21_default: qup2-i2c21-default-state { > pins = "gpio81", "gpio82"; > function = "qup21"; > > diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts > index 568c6be1ceaa..284adf60386a 100644 > --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts > +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts > @@ -531,11 +531,11 @@ &qup2 { > status = "okay"; > }; > > -&qup2_i2c5 { > +&qup2_i2c21 { > clock-frequency = <400000>; > > pinctrl-names = "default"; > - pinctrl-0 = <&qup2_i2c5_default>; > + pinctrl-0 = <&qup2_i2c21_default>; > > status = "okay"; > > @@ -801,7 +801,7 @@ qup0_i2c4_default: qup0-i2c4-default-state { > drive-strength = <16>; > }; > > - qup2_i2c5_default: qup2-i2c5-default-state { > + qup2_i2c21_default: qup2-i2c21-default-state { > pins = "gpio81", "gpio82"; > function = "qup21"; > bias-disable; > diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi > index 109c9d2b684d..875cc91324ce 100644 > --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi > +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi > @@ -827,7 +827,7 @@ qup2_uart17: serial@884000 { > status = "disabled"; > }; > > - qup2_i2c5: i2c@894000 { > + qup2_i2c21: i2c@894000 { > compatible = "qcom,geni-i2c"; > reg = <0 0x00894000 0 0x4000>; > clock-names = "se";
On Mon, Dec 12, 2022 at 01:23:11PM -0500, Brian Masney wrote: > According to the downstream 5.4 kernel sources for the sa8540p, > i2c@894000 is labeled i2c bus 21, not 5. The interrupts and clocks > also match. Let's go ahead and correct the name that's used in the > three files where this is listed. > > Signed-off-by: Brian Masney <bmasney@redhat.com> > Fixes: 152d1faf1e2f3 ("arm64: dts: qcom: add SC8280XP platform") > Fixes: ccd3517faf183 ("arm64: dts: qcom: sc8280xp: Add reference device") > Fixes: 32c231385ed43 ("arm64: dts: qcom: sc8280xp: add Lenovo Thinkpad X13s devicetree") > diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi > index 109c9d2b684d..875cc91324ce 100644 > --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi > +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi > @@ -827,7 +827,7 @@ qup2_uart17: serial@884000 { > status = "disabled"; > }; > > - qup2_i2c5: i2c@894000 { > + qup2_i2c21: i2c@894000 { Note that the node is labelled qup2_i2c5 and not qup_i2c5. That is, the QUP nodes are labelled using two indices, and specifically qup2_i2c5 would be another name for qup_i2c21 if we'd been using such a flat naming scheme (there are 8 engines per QUP). So there's nothing wrong with how these nodes are currently named, but mixing the two scheme as you are suggesting would not be correct. Johan
On 12/13/2022 8:24 PM, Johan Hovold wrote: > On Mon, Dec 12, 2022 at 01:23:11PM -0500, Brian Masney wrote: >> According to the downstream 5.4 kernel sources for the sa8540p, >> i2c@894000 is labeled i2c bus 21, not 5. The interrupts and clocks >> also match. Let's go ahead and correct the name that's used in the >> three files where this is listed. >> >> Signed-off-by: Brian Masney <bmasney@redhat.com> >> Fixes: 152d1faf1e2f3 ("arm64: dts: qcom: add SC8280XP platform") >> Fixes: ccd3517faf183 ("arm64: dts: qcom: sc8280xp: Add reference device") >> Fixes: 32c231385ed43 ("arm64: dts: qcom: sc8280xp: add Lenovo Thinkpad X13s devicetree") > >> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi >> index 109c9d2b684d..875cc91324ce 100644 >> --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi >> +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi >> @@ -827,7 +827,7 @@ qup2_uart17: serial@884000 { >> status = "disabled"; >> }; >> >> - qup2_i2c5: i2c@894000 { >> + qup2_i2c21: i2c@894000 { > > Note that the node is labelled qup2_i2c5 and not qup_i2c5. > > That is, the QUP nodes are labelled using two indices, and specifically > > qup2_i2c5 > > would be another name for > > qup_i2c21 > > if we'd been using such a flat naming scheme (there are 8 engines per > QUP). > > So there's nothing wrong with how these nodes are currently named, but > mixing the two scheme as you are suggesting would not be correct. Wondering we might need to change qup2_uart17 to qup2_uart1 then ? Shazad > > Johan
On Tue, Dec 13, 2022 at 03:54:05PM +0100, Johan Hovold wrote: > Note that the node is labelled qup2_i2c5 and not qup_i2c5. > > That is, the QUP nodes are labelled using two indices, and specifically > > qup2_i2c5 > > would be another name for > > qup_i2c21 > > if we'd been using such a flat naming scheme (there are 8 engines per > QUP). > > So there's nothing wrong with how these nodes are currently named, but > mixing the two scheme as you are suggesting would not be correct. OK, I see; that makes sense. I'll drop this patch in v2 and fix up the new nodes accordingly. Thank you for the explanation! Brian
On Tue, Dec 13, 2022 at 03:54:05PM +0100, Johan Hovold wrote: > Note that the node is labelled qup2_i2c5 and not qup_i2c5. > > That is, the QUP nodes are labelled using two indices, and specifically > > qup2_i2c5 > > would be another name for > > qup_i2c21 > > if we'd been using such a flat naming scheme (there are 8 engines per > QUP). > > So there's nothing wrong with how these nodes are currently named, but > mixing the two scheme as you are suggesting would not be correct. Hi Johan, What would I use for the name in the aliases section? Right now I have: aliases { i2c18 = &qup2_i2c18; } So qup2_i2c18 becomes qup2_i2c2. Would I use the flat naming scheme for the alias like so? aliases { i2c18 = &qup2_i2c2; } Brian
On Tue, Dec 13, 2022 at 03:54:05PM +0100, Johan Hovold wrote: > On Mon, Dec 12, 2022 at 01:23:11PM -0500, Brian Masney wrote: > > According to the downstream 5.4 kernel sources for the sa8540p, > > i2c@894000 is labeled i2c bus 21, not 5. The interrupts and clocks > > also match. Let's go ahead and correct the name that's used in the > > three files where this is listed. > > > > Signed-off-by: Brian Masney <bmasney@redhat.com> > > Fixes: 152d1faf1e2f3 ("arm64: dts: qcom: add SC8280XP platform") > > Fixes: ccd3517faf183 ("arm64: dts: qcom: sc8280xp: Add reference device") > > Fixes: 32c231385ed43 ("arm64: dts: qcom: sc8280xp: add Lenovo Thinkpad X13s devicetree") > > > diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi > > index 109c9d2b684d..875cc91324ce 100644 > > --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi > > +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi > > @@ -827,7 +827,7 @@ qup2_uart17: serial@884000 { > > status = "disabled"; > > }; > > > > - qup2_i2c5: i2c@894000 { > > + qup2_i2c21: i2c@894000 { > > Note that the node is labelled qup2_i2c5 and not qup_i2c5. > > That is, the QUP nodes are labelled using two indices, and specifically > > qup2_i2c5 > > would be another name for > > qup_i2c21 > > if we'd been using such a flat naming scheme (there are 8 engines per > QUP). > > So there's nothing wrong with how these nodes are currently named, but > mixing the two scheme as you are suggesting would not be correct. It appears sc8280xp is the only qcom platform using a qup prefix (even if some older platform use a blsp equivalent), and we're not even using it consistently as we, for example, have both qup2_uart17, and qup2_i2c5 (where the former should have been qup2_uart1). So either we fix up the current labels or just drop the qup prefixes and use a flat naming scheme (e.g. uart17 and i2c21). Either way, there's no need for any Fixes tags as this isn't a bug. Johan
On Tue, Dec 13, 2022 at 08:34:56PM +0530, Shazad Hussain wrote: > > > On 12/13/2022 8:24 PM, Johan Hovold wrote: > > On Mon, Dec 12, 2022 at 01:23:11PM -0500, Brian Masney wrote: > >> According to the downstream 5.4 kernel sources for the sa8540p, > >> i2c@894000 is labeled i2c bus 21, not 5. The interrupts and clocks > >> also match. Let's go ahead and correct the name that's used in the > >> three files where this is listed. > >> > >> Signed-off-by: Brian Masney <bmasney@redhat.com> > >> Fixes: 152d1faf1e2f3 ("arm64: dts: qcom: add SC8280XP platform") > >> Fixes: ccd3517faf183 ("arm64: dts: qcom: sc8280xp: Add reference device") > >> Fixes: 32c231385ed43 ("arm64: dts: qcom: sc8280xp: add Lenovo Thinkpad X13s devicetree") > > > >> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi > >> index 109c9d2b684d..875cc91324ce 100644 > >> --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi > >> +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi > >> @@ -827,7 +827,7 @@ qup2_uart17: serial@884000 { > >> status = "disabled"; > >> }; > >> > >> - qup2_i2c5: i2c@894000 { > >> + qup2_i2c21: i2c@894000 { > > > > Note that the node is labelled qup2_i2c5 and not qup_i2c5. > > > > That is, the QUP nodes are labelled using two indices, and specifically > > > > qup2_i2c5 > > > > would be another name for > > > > qup_i2c21 > > > > if we'd been using such a flat naming scheme (there are 8 engines per > > QUP). > > > > So there's nothing wrong with how these nodes are currently named, but > > mixing the two scheme as you are suggesting would not be correct. > > Wondering we might need to change qup2_uart17 to qup2_uart1 then ? Right, I just noticed that too. Johan
On Tue, Dec 13, 2022 at 10:12:57AM -0500, Brian Masney wrote: > On Tue, Dec 13, 2022 at 03:54:05PM +0100, Johan Hovold wrote: > > Note that the node is labelled qup2_i2c5 and not qup_i2c5. > > > > That is, the QUP nodes are labelled using two indices, and specifically > > > > qup2_i2c5 > > > > would be another name for > > > > qup_i2c21 > > > > if we'd been using such a flat naming scheme (there are 8 engines per > > QUP). > > > > So there's nothing wrong with how these nodes are currently named, but > > mixing the two scheme as you are suggesting would not be correct. > > Hi Johan, > > What would I use for the name in the aliases section? Right now I have: > > aliases { > i2c18 = &qup2_i2c18; > } > > So qup2_i2c18 becomes qup2_i2c2. Would I use the flat naming scheme for > the alias like so? > > aliases { > i2c18 = &qup2_i2c2; > } Or perhaps the i2c controllers should use a zero-based index instead of being named after the serial engines (e.g. as we do for the console uart). How are they named in the schematics? Johan
On 13.12.2022 16:17, Johan Hovold wrote: > On Tue, Dec 13, 2022 at 03:54:05PM +0100, Johan Hovold wrote: >> On Mon, Dec 12, 2022 at 01:23:11PM -0500, Brian Masney wrote: >>> According to the downstream 5.4 kernel sources for the sa8540p, >>> i2c@894000 is labeled i2c bus 21, not 5. The interrupts and clocks >>> also match. Let's go ahead and correct the name that's used in the >>> three files where this is listed. >>> >>> Signed-off-by: Brian Masney <bmasney@redhat.com> >>> Fixes: 152d1faf1e2f3 ("arm64: dts: qcom: add SC8280XP platform") >>> Fixes: ccd3517faf183 ("arm64: dts: qcom: sc8280xp: Add reference device") >>> Fixes: 32c231385ed43 ("arm64: dts: qcom: sc8280xp: add Lenovo Thinkpad X13s devicetree") >> >>> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi >>> index 109c9d2b684d..875cc91324ce 100644 >>> --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi >>> +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi >>> @@ -827,7 +827,7 @@ qup2_uart17: serial@884000 { >>> status = "disabled"; >>> }; >>> >>> - qup2_i2c5: i2c@894000 { >>> + qup2_i2c21: i2c@894000 { >> >> Note that the node is labelled qup2_i2c5 and not qup_i2c5. >> >> That is, the QUP nodes are labelled using two indices, and specifically >> >> qup2_i2c5 >> >> would be another name for >> >> qup_i2c21 >> >> if we'd been using such a flat naming scheme (there are 8 engines per >> QUP). >> >> So there's nothing wrong with how these nodes are currently named, but >> mixing the two scheme as you are suggesting would not be correct. > > It appears sc8280xp is the only qcom platform using a qup prefix (even > if some older platform use a blsp equivalent), and we're not even using > it consistently as we, for example, have both > > qup2_uart17, and > qup2_i2c5 > > (where the former should have been qup2_uart1). > > So either we fix up the current labels or just drop the qup prefixes and > use a flat naming scheme (e.g. uart17 and i2c21). Oh, I didn't notice that! I suppose sticking with i2cN as we've been doing ever since i2c-geni was introduced sounds like the best option.. Konrad > > Either way, there's no need for any Fixes tags as this isn't a bug. > > Johan
On Tue, Dec 13, 2022 at 04:29:04PM +0100, Konrad Dybcio wrote: > > > On 13.12.2022 16:17, Johan Hovold wrote: > > On Tue, Dec 13, 2022 at 03:54:05PM +0100, Johan Hovold wrote: > >> On Mon, Dec 12, 2022 at 01:23:11PM -0500, Brian Masney wrote: > >>> According to the downstream 5.4 kernel sources for the sa8540p, > >>> i2c@894000 is labeled i2c bus 21, not 5. The interrupts and clocks > >>> also match. Let's go ahead and correct the name that's used in the > >>> three files where this is listed. > >>> > >>> Signed-off-by: Brian Masney <bmasney@redhat.com> > >>> Fixes: 152d1faf1e2f3 ("arm64: dts: qcom: add SC8280XP platform") > >>> Fixes: ccd3517faf183 ("arm64: dts: qcom: sc8280xp: Add reference device") > >>> Fixes: 32c231385ed43 ("arm64: dts: qcom: sc8280xp: add Lenovo Thinkpad X13s devicetree") > >> > >>> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi > >>> index 109c9d2b684d..875cc91324ce 100644 > >>> --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi > >>> +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi > >>> @@ -827,7 +827,7 @@ qup2_uart17: serial@884000 { > >>> status = "disabled"; > >>> }; > >>> > >>> - qup2_i2c5: i2c@894000 { > >>> + qup2_i2c21: i2c@894000 { > >> > >> Note that the node is labelled qup2_i2c5 and not qup_i2c5. > >> > >> That is, the QUP nodes are labelled using two indices, and specifically > >> > >> qup2_i2c5 > >> > >> would be another name for > >> > >> qup_i2c21 > >> > >> if we'd been using such a flat naming scheme (there are 8 engines per > >> QUP). > >> > >> So there's nothing wrong with how these nodes are currently named, but > >> mixing the two scheme as you are suggesting would not be correct. > > > > It appears sc8280xp is the only qcom platform using a qup prefix (even > > if some older platform use a blsp equivalent), and we're not even using > > it consistently as we, for example, have both > > > > qup2_uart17, and > > qup2_i2c5 > > > > (where the former should have been qup2_uart1). > > > > So either we fix up the current labels or just drop the qup prefixes and > > use a flat naming scheme (e.g. uart17 and i2c21). > Oh, I didn't notice that! I suppose sticking with i2cN as we've been > doing ever since i2c-geni was introduced sounds like the best option.. Yeah, sounds good to me. Johan
On 12/13/2022 8:58 PM, Johan Hovold wrote: > On Tue, Dec 13, 2022 at 10:12:57AM -0500, Brian Masney wrote: >> On Tue, Dec 13, 2022 at 03:54:05PM +0100, Johan Hovold wrote: >>> Note that the node is labelled qup2_i2c5 and not qup_i2c5. >>> >>> That is, the QUP nodes are labelled using two indices, and specifically >>> >>> qup2_i2c5 >>> >>> would be another name for >>> >>> qup_i2c21 >>> >>> if we'd been using such a flat naming scheme (there are 8 engines per >>> QUP). >>> >>> So there's nothing wrong with how these nodes are currently named, but >>> mixing the two scheme as you are suggesting would not be correct. >> >> Hi Johan, >> >> What would I use for the name in the aliases section? Right now I have: >> >> aliases { >> i2c18 = &qup2_i2c18; >> } >> >> So qup2_i2c18 becomes qup2_i2c2. Would I use the flat naming scheme for >> the alias like so? >> >> aliases { >> i2c18 = &qup2_i2c2; >> } > > Or perhaps the i2c controllers should use a zero-based index instead of > being named after the serial engines (e.g. as we do for the console > uart). > > How are they named in the schematics? > We should use from 0 to N. Shazad > Johan
On Tue, Dec 13, 2022 at 09:04:39PM +0530, Shazad Hussain wrote: > > > On 12/13/2022 8:58 PM, Johan Hovold wrote: > > On Tue, Dec 13, 2022 at 10:12:57AM -0500, Brian Masney wrote: > >> On Tue, Dec 13, 2022 at 03:54:05PM +0100, Johan Hovold wrote: > >>> Note that the node is labelled qup2_i2c5 and not qup_i2c5. > >>> > >>> That is, the QUP nodes are labelled using two indices, and specifically > >>> > >>> qup2_i2c5 > >>> > >>> would be another name for > >>> > >>> qup_i2c21 > >>> > >>> if we'd been using such a flat naming scheme (there are 8 engines per > >>> QUP). > >>> > >>> So there's nothing wrong with how these nodes are currently named, but > >>> mixing the two scheme as you are suggesting would not be correct. > >> > >> Hi Johan, > >> > >> What would I use for the name in the aliases section? Right now I have: > >> > >> aliases { > >> i2c18 = &qup2_i2c18; > >> } > >> > >> So qup2_i2c18 becomes qup2_i2c2. Would I use the flat naming scheme for > >> the alias like so? > >> > >> aliases { > >> i2c18 = &qup2_i2c2; > >> } > > > > Or perhaps the i2c controllers should use a zero-based index instead of > > being named after the serial engines (e.g. as we do for the console > > uart). > > > > How are they named in the schematics? > > We should use from 0 to N. With N being 23 after the number of serial engines, or the number of available i2c buses on a particular board minus one? Johan
On Tue, Dec 13, 2022 at 04:39:54PM +0100, Johan Hovold wrote: > On Tue, Dec 13, 2022 at 09:04:39PM +0530, Shazad Hussain wrote: > > On 12/13/2022 8:58 PM, Johan Hovold wrote: > > >> So qup2_i2c18 becomes qup2_i2c2. Would I use the flat naming scheme for > > >> the alias like so? > > >> > > >> aliases { > > >> i2c18 = &qup2_i2c2; > > >> } > > > > > > Or perhaps the i2c controllers should use a zero-based index instead of > > > being named after the serial engines (e.g. as we do for the console > > > uart). > > > > > > How are they named in the schematics? > > > > We should use from 0 to N. > > With N being 23 after the number of serial engines, or the number of > available i2c buses on a particular board minus one? Looks like the more recent Qualcomm platforms use aliases that reflect the engine number (i.e. 0 to 23) for i2c and spi. Johan
On 13.12.2022 16:42, Johan Hovold wrote: > On Tue, Dec 13, 2022 at 04:39:54PM +0100, Johan Hovold wrote: >> On Tue, Dec 13, 2022 at 09:04:39PM +0530, Shazad Hussain wrote: >>> On 12/13/2022 8:58 PM, Johan Hovold wrote: > >>>>> So qup2_i2c18 becomes qup2_i2c2. Would I use the flat naming scheme for >>>>> the alias like so? >>>>> >>>>> aliases { >>>>> i2c18 = &qup2_i2c2; >>>>> } >>>> >>>> Or perhaps the i2c controllers should use a zero-based index instead of >>>> being named after the serial engines (e.g. as we do for the console >>>> uart). >>>> >>>> How are they named in the schematics? >>> >>> We should use from 0 to N. >> >> With N being 23 after the number of serial engines, or the number of >> available i2c buses on a particular board minus one? > > Looks like the more recent Qualcomm platforms use aliases that reflect > the engine number (i.e. 0 to 23) for i2c and spi. IMO it makes the most sense, as it tells the userspace "hello, this device is connected to the physical I2Cn on the SoC" as opposed to "hello, this device is connected to the nth enabled bus on this particular board". Konrad > > Johan
On 12/13/2022 9:09 PM, Johan Hovold wrote: > On Tue, Dec 13, 2022 at 09:04:39PM +0530, Shazad Hussain wrote: >> >> >> On 12/13/2022 8:58 PM, Johan Hovold wrote: >>> On Tue, Dec 13, 2022 at 10:12:57AM -0500, Brian Masney wrote: >>>> On Tue, Dec 13, 2022 at 03:54:05PM +0100, Johan Hovold wrote: >>>>> Note that the node is labelled qup2_i2c5 and not qup_i2c5. >>>>> >>>>> That is, the QUP nodes are labelled using two indices, and specifically >>>>> >>>>> qup2_i2c5 >>>>> >>>>> would be another name for >>>>> >>>>> qup_i2c21 >>>>> >>>>> if we'd been using such a flat naming scheme (there are 8 engines per >>>>> QUP). >>>>> >>>>> So there's nothing wrong with how these nodes are currently named, but >>>>> mixing the two scheme as you are suggesting would not be correct. >>>> >>>> Hi Johan, >>>> >>>> What would I use for the name in the aliases section? Right now I have: >>>> >>>> aliases { >>>> i2c18 = &qup2_i2c18; >>>> } >>>> >>>> So qup2_i2c18 becomes qup2_i2c2. Would I use the flat naming scheme for >>>> the alias like so? >>>> >>>> aliases { >>>> i2c18 = &qup2_i2c2; >>>> } >>> >>> Or perhaps the i2c controllers should use a zero-based index instead of >>> being named after the serial engines (e.g. as we do for the console >>> uart). >>> >>> How are they named in the schematics? >> >> We should use from 0 to N. > > With N being 23 after the number of serial engines, or the number of > available i2c buses on a particular board minus one? > wrt to serial engine number starting from 0. Shazad > Johan
On Tue, Dec 13, 2022 at 04:32:43PM +0100, Johan Hovold wrote: > On Tue, Dec 13, 2022 at 04:29:04PM +0100, Konrad Dybcio wrote: > > On 13.12.2022 16:17, Johan Hovold wrote: > > > It appears sc8280xp is the only qcom platform using a qup prefix (even > > > if some older platform use a blsp equivalent), and we're not even using > > > it consistently as we, for example, have both > > > > > > qup2_uart17, and > > > qup2_i2c5 > > > > > > (where the former should have been qup2_uart1). > > > > > > So either we fix up the current labels or just drop the qup prefixes and > > > use a flat naming scheme (e.g. uart17 and i2c21). > > > Oh, I didn't notice that! I suppose sticking with i2cN as we've been > > doing ever since i2c-geni was introduced sounds like the best option.. > > Yeah, sounds good to me. This makes sense and I'll fix up the existing geni nodes and my new nodes in v2. I noticed another inconsistency with sc8280xp.dtsi compared to other platforms. I left off all of the pin mappings in sc8280xp.dtsi and added them to the sa8540-ride.dts file since the existing sc8280xp.dtsi file contains no pin mappings. Other platforms such as sm8450.dtsi, sm8350.dtsi, and sm8250.dtsi contain the geni pin mappings. My understanding is that these geni pins are fixed within the SoC and don't change with the different boards. Should I also add the geni pin mappings to sc8280xp.dtsi? Brian
On Tue, Dec 13, 2022 at 04:44:15PM +0100, Konrad Dybcio wrote: > > > On 13.12.2022 16:42, Johan Hovold wrote: > > On Tue, Dec 13, 2022 at 04:39:54PM +0100, Johan Hovold wrote: > >> On Tue, Dec 13, 2022 at 09:04:39PM +0530, Shazad Hussain wrote: > >>> On 12/13/2022 8:58 PM, Johan Hovold wrote: > > > >>>>> So qup2_i2c18 becomes qup2_i2c2. Would I use the flat naming scheme for > >>>>> the alias like so? > >>>>> > >>>>> aliases { > >>>>> i2c18 = &qup2_i2c2; > >>>>> } > >>>> > >>>> Or perhaps the i2c controllers should use a zero-based index instead of > >>>> being named after the serial engines (e.g. as we do for the console > >>>> uart). > >>>> > >>>> How are they named in the schematics? > >>> > >>> We should use from 0 to N. > >> > >> With N being 23 after the number of serial engines, or the number of > >> available i2c buses on a particular board minus one? > > > > Looks like the more recent Qualcomm platforms use aliases that reflect > > the engine number (i.e. 0 to 23) for i2c and spi. > IMO it makes the most sense, as it tells the userspace "hello, this > device is connected to the physical I2Cn on the SoC" as opposed to > "hello, this device is connected to the nth enabled bus on this > particular board". But I guess it still depends on the board. I wouldn't expect a product with four serial ports to use the engine numbers on labels for the connectors for example. Johan
On Tue, Dec 13, 2022 at 10:59:47AM -0500, Brian Masney wrote: > I noticed another inconsistency with sc8280xp.dtsi compared to other > platforms. I left off all of the pin mappings in sc8280xp.dtsi and > added them to the sa8540-ride.dts file since the existing sc8280xp.dtsi > file contains no pin mappings. Other platforms such as sm8450.dtsi, > sm8350.dtsi, and sm8250.dtsi contain the geni pin mappings. My > understanding is that these geni pins are fixed within the SoC and > don't change with the different boards. Should I also add the geni > pin mappings to sc8280xp.dtsi? The pins are fixed but the pin configuration is still board specific. This came up earlier and we decided that keeping all pin configuration in the board dts was the way to go (e.g. for consistency and as it allows the integrator to easily review the actual configuration). Johan
diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts index 551768f97729..1ab76724144d 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts @@ -326,11 +326,11 @@ &qup2 { status = "okay"; }; -&qup2_i2c5 { +&qup2_i2c21 { clock-frequency = <400000>; pinctrl-names = "default"; - pinctrl-0 = <&qup2_i2c5_default>; + pinctrl-0 = <&qup2_i2c21_default>; status = "okay"; @@ -598,7 +598,7 @@ qup0_i2c4_default: qup0-i2c4-default-state { drive-strength = <16>; }; - qup2_i2c5_default: qup2-i2c5-default-state { + qup2_i2c21_default: qup2-i2c21-default-state { pins = "gpio81", "gpio82"; function = "qup21"; diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts index 568c6be1ceaa..284adf60386a 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts @@ -531,11 +531,11 @@ &qup2 { status = "okay"; }; -&qup2_i2c5 { +&qup2_i2c21 { clock-frequency = <400000>; pinctrl-names = "default"; - pinctrl-0 = <&qup2_i2c5_default>; + pinctrl-0 = <&qup2_i2c21_default>; status = "okay"; @@ -801,7 +801,7 @@ qup0_i2c4_default: qup0-i2c4-default-state { drive-strength = <16>; }; - qup2_i2c5_default: qup2-i2c5-default-state { + qup2_i2c21_default: qup2-i2c21-default-state { pins = "gpio81", "gpio82"; function = "qup21"; bias-disable; diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi index 109c9d2b684d..875cc91324ce 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi @@ -827,7 +827,7 @@ qup2_uart17: serial@884000 { status = "disabled"; }; - qup2_i2c5: i2c@894000 { + qup2_i2c21: i2c@894000 { compatible = "qcom,geni-i2c"; reg = <0 0x00894000 0 0x4000>; clock-names = "se";