Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp304016rdb; Wed, 17 Jan 2024 02:26:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IEoDyKuUBesgnfl6vM9Hnyeig3AsJVyjjc8caxh76RY38YNU5LVHCPDiR29rLMasjROlue0 X-Received: by 2002:ac8:5b86:0:b0:42a:cc8:3514 with SMTP id a6-20020ac85b86000000b0042a0cc83514mr673049qta.52.1705487196556; Wed, 17 Jan 2024 02:26:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705487196; cv=pass; d=google.com; s=arc-20160816; b=gNMiiURtNE1FKGlLIrnqfckiDElHQSRUt48NZCJAKp1KNqCLN+mtRzZGB3R2v8rzyf Q0dStRKTGRrdPFy3Yhzk9OdLJ2diHAfBFQRq6weDPInGZD0aqbCu9nLbxA3cIh6algKl 82IgAZhihn+PXst3hLRuicEizwmgL0HQoY+GhYsarcKyTuKavDbekdrMk1zsslvl1Qz2 P2DBmgqOrXoUsQh2A2HA2V0rARiNmGGp6VIg13ADO4vkXRmKdYqIopiaoW1gJEXtcpfu siy4SBhmMdqb7kCK29lOEhbG7xehKp0z1SIjoe0yB4GZw3vn5eYK0t+IZNAf+wDNKv73 FLKw== 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=1NNkaI42Hc7TBXVBYnyRbtIbsZVBSgd7WE0qsCIVHFM=; fh=1tSud9VoLT0v/ChNP3lwxus1msGB94U+kParf/F3Rds=; b=ti2rOSGfR8ix/WWcGn83fe8lcoEFIw+Ni4CVqTYs6t3wZNAt/WAWJwd3nn7Ie/V/fQ nVLq2MJ1JelH0aG8/XYkcXP38K2HUHxVgBnN3QQfstu8WTQUAiC5U96EdrJMc99o7p4Q olc01Q0axqnupXRaN6Uj1P/FmEVMRuVjYu7bybMHM2PanesXY3SCBR3NzVWGcuPNMs3B BJGWZ4Qw+MQXl9LEA0P3GUXfwlaRWBt1dakPQZdrfDsqB4CCOmnxutAOZlhSCLhaWBJR TOTpxFYwYi8QLN9Fs9fheFD7NkEKw9uZlctzmoyILZaa4E6sukQfIO13j4VfNRBK9779 sHDQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=IGqHNsjz; 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-28830-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28830-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id v17-20020ac85791000000b0042a06dbf44fsi2539673qta.104.2024.01.17.02.26.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 02:26:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-28830-linux.lists.archive=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=IGqHNsjz; 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-28830-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28830-linux.lists.archive=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 2000E1C20C68 for ; Wed, 17 Jan 2024 10:26:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 185CB1D6BA; Wed, 17 Jan 2024 10:26:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="IGqHNsjz" Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (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 BD3A01C688; Wed, 17 Jan 2024 10:25:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.248 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705487160; cv=none; b=cPrx0iBZGGe0sbXPpGukJWJwgg6cA0kPS742ni1WjW9YPSpjGaXa3IPK7E7JIIsUEmn7zj58om6A0YfOV5pRQVugPo4XtTzy5zTPMVexRcgEPLmBEMl/oMvr55mgdZ8xmWZNcEEjIGUWkCLs/mdqsOw7ogg5/LCNg3FUJrbWX74= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705487160; c=relaxed/simple; bh=y5LACg26gms7ionU9Ein9Zbr8O1IRR5m5lnwW1h0SFU=; 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=YE89nn444hKAHpKsHaOWU5EbuzZSq5Yv3J5tXu0YI0W8+sCX80XCCJgj/x029+nZWKc+LY/zH59fmkS02wvK48Q3wMJApzVOZ8WylwJrxaV49Nq+/sUbk/+rJIgy6Cao8NAEKehabHyVKMD69Zy1xF2j7ASg18nB8IcdaaY9lHE= 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=IGqHNsjz; arc=none smtp.client-ip=198.47.23.248 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 lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 40HAPZAw105560; Wed, 17 Jan 2024 04:25:35 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1705487135; bh=1NNkaI42Hc7TBXVBYnyRbtIbsZVBSgd7WE0qsCIVHFM=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=IGqHNsjzbslsQ9R386dDMLmIBdMoPbwbZwW05P2LsDpj5s3IPMEkGNUujO9s32w9Z rPnZr2yFT+0eqi6vsq53ooeFyZBpEibBPbcmu2Jz3sr74JS9I6BaBsMOqioUk74Ymv Fv9DNrVl2v5FH6o3K7+5xKxsvnWdd3RxI+FCsRGA= Received: from DLEE111.ent.ti.com (dlee111.ent.ti.com [157.170.170.22]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 40HAPZD5035433 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 17 Jan 2024 04:25:35 -0600 Received: from DLEE107.ent.ti.com (157.170.170.37) by DLEE111.ent.ti.com (157.170.170.22) 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:35 -0600 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DLEE107.ent.ti.com (157.170.170.37) 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:35 -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 40HAPQIg042834; Wed, 17 Jan 2024 04:25:31 -0600 From: Siddharth Vadapalli To: , , , , , CC: , , , , , , , Subject: [PATCH 1/3] dt-bindings: PCI: ti,j721e-pci-*: Fix check for num-lanes Date: Wed, 17 Jan 2024 15:55:24 +0530 Message-ID: <20240117102526.557006-2-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: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 The existing implementation for validating the "num-lanes" property based on the compatible(s) doesn't enforce it. Fix it by updating the checks to handle both single-compatible and multi-compatible cases. Fixes: b3ba0f6e82cb ("dt-bindings: PCI: ti,j721e-pci-*: Add checks for num-lanes") Fixes: adc14d44d7cb ("dt-bindings: PCI: ti,j721e-pci-*: Add j784s4-pci-* compatible strings") Signed-off-by: Siddharth Vadapalli --- .../bindings/pci/ti,j721e-pci-ep.yaml | 26 ++++++++++++++----- .../bindings/pci/ti,j721e-pci-host.yaml | 26 ++++++++++++++----- 2 files changed, 38 insertions(+), 14 deletions(-) diff --git a/Documentation/devicetree/bindings/pci/ti,j721e-pci-ep.yaml b/Documentation/devicetree/bindings/pci/ti,j721e-pci-ep.yaml index 97f2579ea908..278e0892f8ac 100644 --- a/Documentation/devicetree/bindings/pci/ti,j721e-pci-ep.yaml +++ b/Documentation/devicetree/bindings/pci/ti,j721e-pci-ep.yaml @@ -68,8 +68,9 @@ allOf: - if: properties: compatible: - enum: - - ti,am64-pcie-ep + items: + - const: ti,am64-pcie-ep + - const: ti,j721e-pcie-ep then: properties: num-lanes: @@ -78,9 +79,9 @@ allOf: - if: properties: compatible: - enum: - - ti,j7200-pcie-ep - - ti,j721e-pcie-ep + items: + - const: ti,j7200-pcie-ep + - const: ti,j721e-pcie-ep then: properties: num-lanes: @@ -90,8 +91,19 @@ allOf: - if: properties: compatible: - enum: - - ti,j784s4-pcie-ep + items: + - const: ti,j721e-pcie-ep + then: + properties: + num-lanes: + minimum: 1 + maximum: 4 + + - if: + properties: + compatible: + items: + - const: ti,j784s4-pcie-ep then: properties: num-lanes: diff --git a/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml b/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml index b7a534cef24d..36bcc8cb7896 100644 --- a/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml +++ b/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml @@ -97,8 +97,9 @@ allOf: - if: properties: compatible: - enum: - - ti,am64-pcie-host + items: + - const: ti,am64-pcie-host + - const: ti,j721e-pcie-host then: properties: num-lanes: @@ -107,9 +108,9 @@ allOf: - if: properties: compatible: - enum: - - ti,j7200-pcie-host - - ti,j721e-pcie-host + items: + - const: ti,j7200-pcie-host + - const: ti,j721e-pcie-host then: properties: num-lanes: @@ -119,8 +120,19 @@ allOf: - if: properties: compatible: - enum: - - ti,j784s4-pcie-host + items: + - const: ti,j721e-pcie-host + then: + properties: + num-lanes: + minimum: 1 + maximum: 4 + + - if: + properties: + compatible: + items: + - const: ti,j784s4-pcie-host then: properties: num-lanes: -- 2.34.1