From patchwork Sun Jan 22 12:21:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Achal Verma X-Patchwork-Id: 46939 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1128075wrn; Sun, 22 Jan 2023 04:22:18 -0800 (PST) X-Google-Smtp-Source: AMrXdXt1hCoYQdP4tChbki5H3cML+nW2MVI+zjzod6SbX9990XTYjkiTKUe5c6kJe9XXPUrfq8XK X-Received: by 2002:a17:90a:528e:b0:229:eae4:bef9 with SMTP id w14-20020a17090a528e00b00229eae4bef9mr12726638pjh.43.1674390138361; Sun, 22 Jan 2023 04:22:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674390138; cv=none; d=google.com; s=arc-20160816; b=W1mxwaUNaxWOkpIEngAzX1sGsz034lp2QA/EcXbDch5c9xZqTk4HJVT0cVV/eR3Mnx yJwqt/XYUrF8a6Sd3y3C/fLFtgr1FI+alg3hLzi0PrfTt7LyS2OyRcUCGsUjcLU71Jo2 3fJji2qSYYEFO29p1lbRPjQC8mvfIcQ2n/8PLvg1kE5n8/WK+Iv1MN4eY9w7E8P01pRn phjFL4dZrTuUftWKEAGiffXmmAeV0iio4IKF3dYdd4DcYytVir/GMlDQ64uUTlo0cyre bFDBDsISyeg674/OmZ2V1x63RsWoXBD6edhNXD+ZjpIURmFn8CIQcFGctKkajYMuh5oO ctjg== 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=TvLXqGFP62Kxbj9vLoF4VkS0d1KSy83RMoiHtO0IdzA=; b=AVJaSl9IEXaSZ7+8srRt6jB+NVF3eCxMIy+AhO+/DI7M1XYY7bwSk3utfuw3fGBHyM VvNoFC/SM8B9jDTRKu2VOLl5amfA4AiAXjKYUEevYa2FU3I7eHF62IvMb8vWUM6IwSaK h/FqTmoCiPWMMsSxS9S11sHKRylNU+ORaWT1kW9QIFXgttGICcuw6cdSvx55pGGtokDT E90GaA5Y1OyJ0MimTRBFX1W5bNEpuudlv2//A5Dwhvti1U8LEbC1bEIb7uuvRbBz5ZvF a9MzDsH9cF1T6kTkC9j/4qmWp4tWO/usYe/1zboIzyAgHtaa7LwcfXwFOLWeSzdtaqrH gJEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=C7DsTRmR; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i5-20020a63e445000000b004792b08adaasi48520313pgk.418.2023.01.22.04.22.05; Sun, 22 Jan 2023 04:22:18 -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=@ti.com header.s=ti-com-17Q1 header.b=C7DsTRmR; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230099AbjAVMVl (ORCPT + 99 others); Sun, 22 Jan 2023 07:21:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229890AbjAVMVi (ORCPT ); Sun, 22 Jan 2023 07:21:38 -0500 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 640035BB7; Sun, 22 Jan 2023 04:21:37 -0800 (PST) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 30MCLOu5106723; Sun, 22 Jan 2023 06:21:24 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1674390084; bh=TvLXqGFP62Kxbj9vLoF4VkS0d1KSy83RMoiHtO0IdzA=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=C7DsTRmRz2zG8zyIKBkpcJQ9v6OTfepRGfzgrLPkCMR+TyKf1Fsi2Vm4Z47IWq0zE FaMCkwwQKaEmf47aLhDEasL2fRmqWiAJB0zCHMRLD6NaTekTaRaCiFBssTKsSM2LOi Mdi5PpQ1q/xkdnTCQqxKBBCCa5Lroc8mkiH/zH3o= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 30MCLOsS075614 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Sun, 22 Jan 2023 06:21:24 -0600 Received: from DFLE100.ent.ti.com (10.64.6.21) 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.16; Sun, 22 Jan 2023 06:21:24 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Sun, 22 Jan 2023 06:21:24 -0600 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 30MCLNTH029933; Sun, 22 Jan 2023 06:21:24 -0600 From: Achal Verma To: , , , , , , , , , , , CC: , , , Subject: [PATCH v9 1/5] dt-bindings: PCI: ti,j721e-pci-*: add checks for num-lanes Date: Sun, 22 Jan 2023 17:51:17 +0530 Message-ID: <20230122122121.3552375-2-a-verma1@ti.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230122122121.3552375-1-a-verma1@ti.com> References: <20230122122121.3552375-1-a-verma1@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755725313450597666?= X-GMAIL-MSGID: =?utf-8?q?1755725313450597666?= From: Matt Ranostay Add num-lanes schema checks based on compatible string on available lanes for that platform. Signed-off-by: Matt Ranostay Signed-off-by: Achal Verma Reviewed-by: Krzysztof Kozlowski --- .../bindings/pci/ti,j721e-pci-ep.yaml | 27 ++++++++++++++++--- .../bindings/pci/ti,j721e-pci-host.yaml | 27 ++++++++++++++++--- 2 files changed, 48 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/pci/ti,j721e-pci-ep.yaml b/Documentation/devicetree/bindings/pci/ti,j721e-pci-ep.yaml index 10e6eabdff53..32e0c70ed801 100644 --- a/Documentation/devicetree/bindings/pci/ti,j721e-pci-ep.yaml +++ b/Documentation/devicetree/bindings/pci/ti,j721e-pci-ep.yaml @@ -10,9 +10,6 @@ title: TI J721E PCI EP (PCIe Wrapper) maintainers: - Kishon Vijay Abraham I -allOf: - - $ref: "cdns-pcie-ep.yaml#" - properties: compatible: oneOf: @@ -65,6 +62,30 @@ properties: items: - const: link_state +allOf: + - $ref: cdns-pcie-ep.yaml# + - if: + properties: + compatible: + enum: + - ti,am64-pcie-ep + then: + properties: + num-lanes: + const: 1 + + - if: + properties: + compatible: + enum: + - ti,j7200-pcie-ep + - ti,j721e-pcie-ep + then: + properties: + num-lanes: + minimum: 1 + maximum: 2 + required: - compatible - reg diff --git a/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml b/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml index b0513b197d08..9d4611387387 100644 --- a/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml +++ b/Documentation/devicetree/bindings/pci/ti,j721e-pci-host.yaml @@ -10,9 +10,6 @@ title: TI J721E PCI Host (PCIe Wrapper) maintainers: - Kishon Vijay Abraham I -allOf: - - $ref: "cdns-pcie-host.yaml#" - properties: compatible: oneOf: @@ -98,6 +95,30 @@ properties: interrupts: maxItems: 1 +allOf: + - $ref: cdns-pcie-host.yaml# + - if: + properties: + compatible: + enum: + - ti,am64-pcie-host + then: + properties: + num-lanes: + const: 1 + + - if: + properties: + compatible: + enum: + - ti,j7200-pcie-host + - ti,j721e-pcie-host + then: + properties: + num-lanes: + minimum: 1 + maximum: 2 + required: - compatible - reg