Message ID | 20240117102526.557006-4-s-vadapalli@ti.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-28831-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:42cf:b0:101:a8e8:374 with SMTP id q15csp814316dye; Wed, 17 Jan 2024 02:26:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IGSujcqeMzlsJwgOBU6P1BxKUY9HdqiZSUE9f3ZhastHNtXt4Zt2w82OplPW1Y6G3tWj1bm X-Received: by 2002:a05:620a:430d:b0:783:4887:563b with SMTP id u13-20020a05620a430d00b007834887563bmr10771950qko.30.1705487218675; Wed, 17 Jan 2024 02:26:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705487218; cv=pass; d=google.com; s=arc-20160816; b=EZOvEJmxJ3okI8TZdVlCUTxujuLZ4HbocjxO0ib7uCnp6T7FXe5dGZxIEzGRPCSvet dP1FWcflv/W1V3FW7JLT0mPzz5knCwY6RqnZrFjpGthK9EQW5gnOMHiBx4F1CJsTaHTI 2Nm58zwJPwWPznaSweCn+Mjg07plJzBPLCQRZWAoo1LKGE+9hOiH+Kzii9huOJpGBsBh yFCLODj/GNtSBpaq+/aum9Hc6FwSzCXoWHQ+6N4k95LXUZNUQumprg1Kl6NODx/abe+C 7i5bchYj7luZPQiITbsPihVe62L+ZJIGV4i/UcR4SnMdiAyDcMAwFrNExyXde4yxx53J 1Gqw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=0OJmNLdqlDpealeON2rR+yAWVUQlNSGGnDJNQz+hl1Y=; fh=1tSud9VoLT0v/ChNP3lwxus1msGB94U+kParf/F3Rds=; b=gxDjMl2/4G8SvKy769mNbkbbfCQWnxech1XESfO2rW1v3zJYNC9OybAoT9seA5g20y /ICKSaafdmB9zLlsxyU+y/SO6JJT7BIVKnFj2s/VtwUA4ots1l0Zaa9FGbw3FwWizZF9 bb+ytN509yB94uGe7cHvmyZFzWu66vxPOPwdT9J0fKFfV+eHiGoPJYynRGrxzQVMnH1j N/yhZQ/4VttWzyCcb8zOaLJzDPqeSvlk77Dqk+gxSvsNkgcnAQ2n/EdzfVS/gK0V0A6S cpSnukpX90luDC11zgKNihvTMQvumwa7ukX9Vt8DxIeWknofmx5Rzk+M/C1WtWzGpOrC wRdA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=x50NvCKP; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-28831-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28831-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id f13-20020a37ad0d000000b0078318da9939si11367759qkm.132.2024.01.17.02.26.58 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 02:26:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-28831-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=x50NvCKP; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-28831-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28831-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 761431C20942 for <ouuuleilei@gmail.com>; Wed, 17 Jan 2024 10:26:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 27D8314277; Wed, 17 Jan 2024 10:26:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="x50NvCKP" Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2EF7414A8E; Wed, 17 Jan 2024 10:26:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.142 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705487166; cv=none; b=N8HseUzeFG00YS2CSLZ9cifEfeeojBbKufsW8viSpx4MTGd1A9yxtmaYK01bg/Cd7saGGVF8jvzh391USNaGy11xnw5eZTRS+R7YQi/KTqkV9L2lW8ztfM9VuYU1fB5NDhuTDQ770R9jpD8fpXX+a6ph1yORXGO2ijQ88u53a1s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705487166; c=relaxed/simple; bh=nahy3SS6sJexvp/Fe+FnCJVPr3TOlktOrrshUHTXvMg=; h=Received:DKIM-Signature:Received:Received:Received:Received:From: To:CC:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding:Content-Type: X-EXCLAIMER-MD-CONFIG; b=qF0IY2SEVh7JAVQNCOxsvE1sBH8FS+sLb0lgamg+1SDTKUrIani2WVo0uo70hXKsAIpxxzw/nuU3QVdIdoBHAU9XA7BsNlfdX9WT5KAqbKw3VtHQPlxIzL1vtLJgwib1nwuY37znVPyx+kq0mEJhs4n6c/hLyd0snqC3fq5Our8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=x50NvCKP; arc=none smtp.client-ip=198.47.19.142 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 40HAPiIv090260; Wed, 17 Jan 2024 04:25:44 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1705487144; bh=0OJmNLdqlDpealeON2rR+yAWVUQlNSGGnDJNQz+hl1Y=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=x50NvCKPz5fIcWDVTwbJJEOJNFku7WdsPiuuak7BFLnCaioxIy4U27cah1A9YjkdX 2I9Cd0H2ZmWFtDzX6zrAX8EkeRw3U4s6ZUAWZTOS7fS1hi36pVa7llRGfm9bPlWeR1 BCDN26gNHlYhR1hVh/hsHaWQPpP4zJZCtPmMroTI= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 40HAPi39035540 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 17 Jan 2024 04:25:44 -0600 Received: from DFLE114.ent.ti.com (10.64.6.35) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 17 Jan 2024 04:25:44 -0600 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 17 Jan 2024 04:25:44 -0600 Received: from uda0492258.dhcp.ti.com (uda0492258.dhcp.ti.com [172.24.227.9]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 40HAPQIi042834; Wed, 17 Jan 2024 04:25:40 -0600 From: Siddharth Vadapalli <s-vadapalli@ti.com> To: <bhelgaas@google.com>, <lpieralisi@kernel.org>, <kw@linux.com>, <robh@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>, <conor+dt@kernel.org> CC: <linux-pci@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <vigneshr@ti.com>, <afd@ti.com>, <srk@ti.com>, <s-vadapalli@ti.com> Subject: [PATCH 3/3] dt-bindings: PCI: ti,j721e-pci-host: Add support for J722S SoC Date: Wed, 17 Jan 2024 15:55:26 +0530 Message-ID: <20240117102526.557006-4-s-vadapalli@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240117102526.557006-1-s-vadapalli@ti.com> References: <20240117102526.557006-1-s-vadapalli@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788332965795992330 X-GMAIL-MSGID: 1788332965795992330 |
Series |
Fix and update ti,j721e-pci-* bindings
|
|
Commit Message
Siddharth Vadapalli
Jan. 17, 2024, 10:25 a.m. UTC
TI's J722S SoC has one instance of a Gen3 Single Lane PCIe controller.
The controller on J722S SoC is similar to the one present on TI's AM64
SoC, with the difference being that the controller on AM64 SoC supports
up to Gen2 link speed while the one on J722S SoC supports Gen3 link speed.
Update the bindings with a new compatible for J722S SoC and enforce checks
for "num-lanes" and "max-link-speed".
Technical Reference Manual of J722S SoC: https://www.ti.com/lit/zip/sprujb3
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
---
.../devicetree/bindings/pci/ti,j721e-pci-host.yaml | 13 +++++++++++++
1 file changed, 13 insertions(+)
Comments
On 17/01/2024 11:25, Siddharth Vadapalli wrote: > TI's J722S SoC has one instance of a Gen3 Single Lane PCIe controller. > The controller on J722S SoC is similar to the one present on TI's AM64 > SoC, with the difference being that the controller on AM64 SoC supports > up to Gen2 link speed while the one on J722S SoC supports Gen3 link speed. > > Update the bindings with a new compatible for J722S SoC and enforce checks > for "num-lanes" and "max-link-speed". > > Technical Reference Manual of J722S SoC: https://www.ti.com/lit/zip/sprujb3 > > Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com> > --- > .../devicetree/bindings/pci/ti,j721e-pci-host.yaml | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml b/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml > index 005546dc8bd4..b7648f7e73c9 100644 > --- a/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml > +++ b/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml > @@ -14,6 +14,7 @@ properties: > compatible: > oneOf: > - const: ti,j721e-pcie-host > + - const: ti,j722s-pcie-host > - const: ti,j784s4-pcie-host > - description: PCIe controller in AM64 > items: > @@ -134,6 +135,18 @@ allOf: > minimum: 1 > maximum: 4 > > + - if: > + properties: > + compatible: > + items: enum > + - const: ti,j722s-pcie-host > + then: > + properties: > + max-link-speed: > + const: 3 > + num-lanes: > + const: 1 Similarly to previous patch: What is the point of all this? You have direct mapping compatible-property, so encode these in the drivers. Best regards, Krzysztof
On 17/01/24 16:06, Krzysztof Kozlowski wrote: > On 17/01/2024 11:25, Siddharth Vadapalli wrote: >> TI's J722S SoC has one instance of a Gen3 Single Lane PCIe controller. >> The controller on J722S SoC is similar to the one present on TI's AM64 >> SoC, with the difference being that the controller on AM64 SoC supports >> up to Gen2 link speed while the one on J722S SoC supports Gen3 link speed. >> >> Update the bindings with a new compatible for J722S SoC and enforce checks >> for "num-lanes" and "max-link-speed". >> >> Technical Reference Manual of J722S SoC: https://www.ti.com/lit/zip/sprujb3 >> >> Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com> >> --- >> .../devicetree/bindings/pci/ti,j721e-pci-host.yaml | 13 +++++++++++++ >> 1 file changed, 13 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml b/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml >> index 005546dc8bd4..b7648f7e73c9 100644 >> --- a/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml >> +++ b/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml >> @@ -14,6 +14,7 @@ properties: >> compatible: >> oneOf: >> - const: ti,j721e-pcie-host >> + - const: ti,j722s-pcie-host >> - const: ti,j784s4-pcie-host >> - description: PCIe controller in AM64 >> items: >> @@ -134,6 +135,18 @@ allOf: >> minimum: 1 >> maximum: 4 >> >> + - if: >> + properties: >> + compatible: >> + items: > > enum > >> + - const: ti,j722s-pcie-host >> + then: >> + properties: >> + max-link-speed: >> + const: 3 >> + num-lanes: >> + const: 1 > > Similarly to previous patch: What is the point of all this? You have > direct mapping compatible-property, so encode these in the drivers. Ok. I will drop patches 1 and 2 of this series and only post v2 of this patch for adding a new compatible for J722S SoC without any checks for "max-link-speed" or "num-lanes" for the new compatible.
On 17/01/2024 12:24, Siddharth Vadapalli wrote: > > > On 17/01/24 16:06, Krzysztof Kozlowski wrote: >> On 17/01/2024 11:25, Siddharth Vadapalli wrote: >>> TI's J722S SoC has one instance of a Gen3 Single Lane PCIe controller. >>> The controller on J722S SoC is similar to the one present on TI's AM64 >>> SoC, with the difference being that the controller on AM64 SoC supports >>> up to Gen2 link speed while the one on J722S SoC supports Gen3 link speed. >>> >>> Update the bindings with a new compatible for J722S SoC and enforce checks >>> for "num-lanes" and "max-link-speed". >>> >>> Technical Reference Manual of J722S SoC: https://www.ti.com/lit/zip/sprujb3 >>> >>> Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com> >>> --- >>> .../devicetree/bindings/pci/ti,j721e-pci-host.yaml | 13 +++++++++++++ >>> 1 file changed, 13 insertions(+) >>> >>> diff --git a/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml b/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml >>> index 005546dc8bd4..b7648f7e73c9 100644 >>> --- a/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml >>> +++ b/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml >>> @@ -14,6 +14,7 @@ properties: >>> compatible: >>> oneOf: >>> - const: ti,j721e-pcie-host >>> + - const: ti,j722s-pcie-host >>> - const: ti,j784s4-pcie-host >>> - description: PCIe controller in AM64 >>> items: >>> @@ -134,6 +135,18 @@ allOf: >>> minimum: 1 >>> maximum: 4 >>> >>> + - if: >>> + properties: >>> + compatible: >>> + items: >> >> enum >> >>> + - const: ti,j722s-pcie-host >>> + then: >>> + properties: >>> + max-link-speed: >>> + const: 3 >>> + num-lanes: >>> + const: 1 >> >> Similarly to previous patch: What is the point of all this? You have >> direct mapping compatible-property, so encode these in the drivers. > > Ok. I will drop patches 1 and 2 of this series and only post v2 of this patch > for adding a new compatible for J722S SoC without any checks for > "max-link-speed" or "num-lanes" for the new compatible. Without driver change? So how does it solve my comment. I want to move all these unnecessary properties to the driver. Best regards, Krzysztof
On 17/01/24 17:05, Krzysztof Kozlowski wrote: > On 17/01/2024 12:24, Siddharth Vadapalli wrote: >> >> >> On 17/01/24 16:06, Krzysztof Kozlowski wrote: >>> On 17/01/2024 11:25, Siddharth Vadapalli wrote: >>>> TI's J722S SoC has one instance of a Gen3 Single Lane PCIe controller. >>>> The controller on J722S SoC is similar to the one present on TI's AM64 >>>> SoC, with the difference being that the controller on AM64 SoC supports >>>> up to Gen2 link speed while the one on J722S SoC supports Gen3 link speed. >>>> >>>> Update the bindings with a new compatible for J722S SoC and enforce checks >>>> for "num-lanes" and "max-link-speed". >>>> >>>> Technical Reference Manual of J722S SoC: https://www.ti.com/lit/zip/sprujb3 >>>> >>>> Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com> >>>> --- >>>> .../devicetree/bindings/pci/ti,j721e-pci-host.yaml | 13 +++++++++++++ >>>> 1 file changed, 13 insertions(+) >>>> >>>> diff --git a/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml b/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml >>>> index 005546dc8bd4..b7648f7e73c9 100644 >>>> --- a/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml >>>> +++ b/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml >>>> @@ -14,6 +14,7 @@ properties: >>>> compatible: >>>> oneOf: >>>> - const: ti,j721e-pcie-host >>>> + - const: ti,j722s-pcie-host >>>> - const: ti,j784s4-pcie-host >>>> - description: PCIe controller in AM64 >>>> items: >>>> @@ -134,6 +135,18 @@ allOf: >>>> minimum: 1 >>>> maximum: 4 >>>> >>>> + - if: >>>> + properties: >>>> + compatible: >>>> + items: >>> >>> enum >>> >>>> + - const: ti,j722s-pcie-host >>>> + then: >>>> + properties: >>>> + max-link-speed: >>>> + const: 3 >>>> + num-lanes: >>>> + const: 1 >>> >>> Similarly to previous patch: What is the point of all this? You have >>> direct mapping compatible-property, so encode these in the drivers. >> >> Ok. I will drop patches 1 and 2 of this series and only post v2 of this patch >> for adding a new compatible for J722S SoC without any checks for >> "max-link-speed" or "num-lanes" for the new compatible. > > Without driver change? So how does it solve my comment. I want to move > all these unnecessary properties to the driver. Driver support for verifying "num-lanes" is already present. I meant to say that I will drop the checks in bindings in the v2 patch since "num-lanes" is verified in driver too. However, "max-link-speed" is not verified either in the driver or in the bindings prior to this series.
diff --git a/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml b/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml index 005546dc8bd4..b7648f7e73c9 100644 --- a/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml +++ b/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml @@ -14,6 +14,7 @@ properties: compatible: oneOf: - const: ti,j721e-pcie-host + - const: ti,j722s-pcie-host - const: ti,j784s4-pcie-host - description: PCIe controller in AM64 items: @@ -134,6 +135,18 @@ allOf: minimum: 1 maximum: 4 + - if: + properties: + compatible: + items: + - const: ti,j722s-pcie-host + then: + properties: + max-link-speed: + const: 3 + num-lanes: + const: 1 + - if: properties: compatible: