From patchwork Fri Mar 17 07:51:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Achal Verma X-Patchwork-Id: 71121 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp206674wrt; Fri, 17 Mar 2023 01:03:47 -0700 (PDT) X-Google-Smtp-Source: AK7set/5ti6rCZlLo0vVCauvpG0LYcZGnqhw1WFF5JIpR39Bw8/lquDQTXld22XyOuQgG5JyH+Tm X-Received: by 2002:a17:90a:fe8b:b0:23d:2b53:1ae2 with SMTP id co11-20020a17090afe8b00b0023d2b531ae2mr5601838pjb.3.1679040226755; Fri, 17 Mar 2023 01:03:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679040226; cv=none; d=google.com; s=arc-20160816; b=c1gEvwkrf7mEDxnLyBDJ8amsemEC4q4opiUDJR2JqA5Y5SfFlbxVtpDDd0kL1hIqEG h2DpBjL5zDP9OekAyZEe60B9/rdbZALvgE78aAhOxD2Wtsm9Db0L29pL4nSD3/x+34Bp RBNtDQcb8MqH/uIfdpkfr/c5OfL5ADhIHa3sN4wK25SJFZ5G4mFSnmV+GIgpvxZiw2S3 YcmFDr75wiCf+pmofH8tMGUg7ktTGsyYbKzyI/oE/MgcvVmu/8bEIZG+XU/4Bvtp8KMm BnNQ+s493tKHxvArwyEvO2BtWH3Ch2RYorxbpIvs4xJTPX/yU969D0uvJnYXcwzqrPQM KEEA== 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=PpUfaVjVt4iNuG1/XgKubLP9ifTcdNa1nIS4MSP55A0=; b=c6O6VGs+OJYkAUGMAP71F9ewWXA/n92DhhEG0FvyO6BM1q04TmOOU3y0dGMGGU8PMQ wytNfOqg4zIAqvcuRwhr9sYx2t2vK2JmMEE3mu0r9z1D2WoHm8hLv6oZzwMxxsOM2p7k Pojf68y4rroHYJRG9GUfFowz2HpGGj5mc0MzDe0ltIqd74aCx1Ls03zs3Wg3nSyD2T/x iYvMIBADbAAFbDYg7QaWSPuDr+bGew/e7jWm1wTtN1v7vhTlaUd8Xut+aYirrjTakV4v IWYRIM9jQrGwQOeVQxhVYEdeCi5NxgMH3GG8Uwipsf7bizTORW6wL5edwVVS7My7g7kB kp7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=BMrRa34V; 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 w10-20020a17090a780a00b0023adb22068csi1529518pjk.81.2023.03.17.01.03.34; Fri, 17 Mar 2023 01:03:46 -0700 (PDT) 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=BMrRa34V; 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 S230365AbjCQHvo (ORCPT + 99 others); Fri, 17 Mar 2023 03:51:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230322AbjCQHvh (ORCPT ); Fri, 17 Mar 2023 03:51:37 -0400 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2BF38C0D6; Fri, 17 Mar 2023 00:51:36 -0700 (PDT) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 32H7pNim070594; Fri, 17 Mar 2023 02:51:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1679039483; bh=PpUfaVjVt4iNuG1/XgKubLP9ifTcdNa1nIS4MSP55A0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=BMrRa34VeU5LgoLLBjEjOe2TNiCMyp0dMW5X0wAveSGLsGMh5S37iN2MlUamc9dbO VNE0JnmIzwIJgDOkhzVLpi94yCmOYM/AeKTh3EtzfkVVdwk8rdmtdP/mQkApXnUbx1 VicfWrgstUmSPxLGSN07C7M1rtOV5fjQdbfghifs= Received: from DFLE111.ent.ti.com (dfle111.ent.ti.com [10.64.6.32]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 32H7pNcP004715 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 17 Mar 2023 02:51:23 -0500 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Fri, 17 Mar 2023 02:51:23 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE105.ent.ti.com (10.64.6.26) 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; Fri, 17 Mar 2023 02:51:23 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 32H7pMLH005808; Fri, 17 Mar 2023 02:51:23 -0500 From: Achal Verma To: Lorenzo Pieralisi , Krzysztof Wilczy_ski , Rob Herring , Bjorn Helgaas , Krzysztof Kozlowski , Vignesh Raghavendra , Dhananjay Vilasrao Kangude , Anindita Das , Yuan Zhao , Milind Parab CC: , , , , , Achal Verma Subject: [PATCH v11 1/5] dt-bindings: PCI: ti,j721e-pci-*: add checks for num-lanes Date: Fri, 17 Mar 2023 13:21:16 +0530 Message-ID: <20230317075120.506267-2-a-verma1@ti.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230317075120.506267-1-a-verma1@ti.com> References: <20230317075120.506267-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?1760601284643973711?= X-GMAIL-MSGID: =?utf-8?q?1760601284643973711?= 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 3d7aee97353a..2547088304e5 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: @@ -94,6 +91,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