Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2234920rwl; Sat, 1 Apr 2023 04:28:30 -0700 (PDT) X-Google-Smtp-Source: AKy350bAsixVNAa0XsFkFII7TJxjAMuWsJ64tjzAhh3bzjSZl5y5GH6APQbM+kbERrnJY2SLBtVp X-Received: by 2002:a17:902:e545:b0:1a1:bede:5e4a with SMTP id n5-20020a170902e54500b001a1bede5e4amr38810861plf.49.1680348510278; Sat, 01 Apr 2023 04:28:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680348510; cv=none; d=google.com; s=arc-20160816; b=oUu2ujybJv7GFrlzICfMqzRjYTh9UtdrKuG3OmhantX6wlGl3caKVctvO5Hvy4NRUJ 9+7JUf4/Sbp7p/P3qs4bcNvqNM3on1qU/W376n4uCEjDUXQYn5rgDOuZUGSt5TZqzKzL G3fmc4WlVQZYuVWUptBRLs9YZWogHn/aRbOMDVKkH+PAZ+plbKwxZoYdX6aJOXqKtC6O MJ2E0MmYXbdorwngn4PNoLkOvJbS+QYnpKB4GYrNg2uAYeNP3S1mI44QwfCayyyb33Al PKP8P3xm8vWGPaaO/gYNtx5cNN/Wt6Ug0v9TuxdES0tpGBIK1g+u6wH+Qi581k+oX/f6 Xt7w== 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=tOQfmqgfRFRhBF7xYI9oQZSMylc2ZSJsxaEEygwL6ukzpqao+oqE0yEFZCG66+a8wg ZQzSKzZxI/ElceQGqsacU/vagFzMvA5AK9L1G1iZBE+uWlpeQ/3Hdp4gWIAjCi3YGO+Y iu9Bu2LdVEh2mSNvKKwjX88MhyakTHcMzsvwVJ/sT2JOe61l/5Ce90Sj/Be1gJc66rIm 1IHFVO5A7zcACesJOPj4JP2uH3+lwlqWc9XfeaDqX8fymcZYRbLA+hXE1nLK9oHiG0C+ siCXG7rdRHvZgJp+SyZy/AsSD9VC+WAgNtK5oat1Iv/hCM2nK5VwURlErfT1vd9xbM5C MUbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="P3p/wReS"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k19-20020a170902761300b001a229e52c19si4385739pll.91.2023.04.01.04.28.19; Sat, 01 Apr 2023 04:28:30 -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="P3p/wReS"; 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 S230001AbjDAL1k (ORCPT + 99 others); Sat, 1 Apr 2023 07:27:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229780AbjDAL10 (ORCPT ); Sat, 1 Apr 2023 07:27:26 -0400 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E9C02443A; Sat, 1 Apr 2023 04:27:01 -0700 (PDT) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 331BQaK1094890; Sat, 1 Apr 2023 06:26:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1680348396; bh=PpUfaVjVt4iNuG1/XgKubLP9ifTcdNa1nIS4MSP55A0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=P3p/wReSeUhGseqdhcZ9qNSzvfRjmGTGz0paDKEVX/AvLFBkfT0pTfrxPIz3QFtx6 u415WPg+M8bJjqYWoXkxMw1k7VnNv94oACY5AczKgFbWakbVnLAd0f8DfyC9d8Hetr GQQp8VILQI4j9kt30Y0bZI5oUpwN3lRwu1/nnk24= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 331BQa6i025374 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Sat, 1 Apr 2023 06:26:36 -0500 Received: from DFLE108.ent.ti.com (10.64.6.29) 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; Sat, 1 Apr 2023 06:26:35 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE108.ent.ti.com (10.64.6.29) 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; Sat, 1 Apr 2023 06:26:35 -0500 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 331BQZB6002863; Sat, 1 Apr 2023 06:26:35 -0500 From: Achal Verma To: Bjorn Helgaas , Lorenzo Pieralisi , Krzysztof Wilczy_ski , Rob Herring , Krzysztof Kozlowski , Vignesh Raghavendra , Dhananjay Vilasrao Kangude , Anindita Das , Yuan Zhao , Milind Parab CC: , , , , , Achal Verma Subject: [PATCH v12 1/5] dt-bindings: PCI: ti,j721e-pci-*: add checks for num-lanes Date: Sat, 1 Apr 2023 16:56:29 +0530 Message-ID: <20230401112633.2406604-2-a-verma1@ti.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230401112633.2406604-1-a-verma1@ti.com> References: <20230401112633.2406604-1-a-verma1@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_PASS 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: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- .../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 -- 2.25.1