From patchwork Thu Nov 24 08:12:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Ranostay X-Patchwork-Id: 25365 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3258931wrr; Thu, 24 Nov 2022 00:15:03 -0800 (PST) X-Google-Smtp-Source: AA0mqf7QCRLvKAungWaAHc2el2LwkW84X4wNBgg4k8olz+VTgEpzqnUj/UDKKiM5CSz7NDDOodH9 X-Received: by 2002:a17:902:b908:b0:189:1ef4:237b with SMTP id bf8-20020a170902b90800b001891ef4237bmr12853177plb.20.1669277702954; Thu, 24 Nov 2022 00:15:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669277702; cv=none; d=google.com; s=arc-20160816; b=k55nQvOq5xPolxDgVI6m5qAmBiJKD2+0ZguXO5wABjnEyPG7xQQrTjmOpDizyRbypW 49QfnO1zKVO2sT7qRX3pJPHJgNN4f998a1mKdUBMaoIsDr+gQF1xqWReiqw1wAFoh+qP MIXT2Rie0p+Qt3rYardOM9j014QQLMyShCW4JMNDMdrwTnl9OXGgrDDxid5I9Ak+KU/B DcyaFCjrjh2tYpdhjyBp6HbtYgDIM9fY7XblKOWnJfYkQ2KJHEqWUcC0xZXZhI4eF7RB 2fk4cAt4PuAszCCwKDklub7i7arJAuh16SzKOWPG7CIr8Av/2F89c2o3/6gNDbZfB6FC tkmQ== 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=THaNyo3HhYLvjcOyg5mmXhOiGWwB/c47R2AQOF2zeU8=; b=eKyMS7cAkxZyOiuM0272dTOq4ld74NSLkQtoCBdn7+WzDBCB/uHeVyF9+mDo0MjErL T45HsJXDSUzLOVGn/kzCHHP6A6IkABHkyH6XtEqQ5/S7MdfqcJEUXRiUPw9AWjw4LrZb tGpz47LFtew0/Il0lPSo0uaj1eKJCc9c3F4zMpYEpHiO4gHbR6SwajLgB30nGfl85b7M e4m5TnGA0DFxlC/j4hqOZ8ESgNlqwyr6sMFko9GFT91C6ZfzInryTBYLasaKdaxQbMWk 5pIVRtvpmNxWv1D/Qs0RJNbO9FhE2LQ30Bqq8XP6MJpsU8HWoEPLfwjqo5U1orcfLXs0 WbVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=rAICvLjq; 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 iz17-20020a170902ef9100b001874910a2c6si390395plb.286.2022.11.24.00.14.50; Thu, 24 Nov 2022 00:15:02 -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=rAICvLjq; 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 S230018AbiKXIOU (ORCPT + 99 others); Thu, 24 Nov 2022 03:14:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229716AbiKXINQ (ORCPT ); Thu, 24 Nov 2022 03:13:16 -0500 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4509B28E3B; Thu, 24 Nov 2022 00:12:54 -0800 (PST) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 2AO8Cadh130275; Thu, 24 Nov 2022 02:12:36 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1669277556; bh=THaNyo3HhYLvjcOyg5mmXhOiGWwB/c47R2AQOF2zeU8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=rAICvLjqKFwDLHHRGoaCPr0oJ97AoqMEeIyD4sFkqaulzh0pslkKfB5TbO/rAUW57 LBCt3Pz0T6hKyTgZeHtDwq7Vc1i3dEISjCCc403Fez9kpKAZjZL2M2is2/kZak7ar+ eXZJVgmZ8stGnrUIHg3P9dpv8nAuWShrYq+34D3U= Received: from DFLE104.ent.ti.com (dfle104.ent.ti.com [10.64.6.25]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 2AO8CaZn064024 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 24 Nov 2022 02:12:36 -0600 Received: from DFLE103.ent.ti.com (10.64.6.24) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Thu, 24 Nov 2022 02:12:36 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE103.ent.ti.com (10.64.6.24) 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; Thu, 24 Nov 2022 02:12:35 -0600 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 2AO8CWih009876; Thu, 24 Nov 2022 02:12:34 -0600 From: Matt Ranostay To: , , , , , , , , , , CC: , , , , Matt Ranostay Subject: [PATCH v7 1/5] dt-bindings: PCI: ti,j721e-pci-*: add checks for num-lanes Date: Thu, 24 Nov 2022 00:12:17 -0800 Message-ID: <20221124081221.1206167-2-mranostay@ti.com> X-Mailer: git-send-email 2.38.GIT In-Reply-To: <20221124081221.1206167-1-mranostay@ti.com> References: <20221124081221.1206167-1-mranostay@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_NONE,SPF_PASS 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?1750364536567015343?= X-GMAIL-MSGID: =?utf-8?q?1750364536567015343?= Add num-lanes schema checks based on compatible string on available lanes for that platform. Signed-off-by: Matt Ranostay --- .../bindings/pci/ti,j721e-pci-ep.yaml | 28 +++++++++++++++++-- .../bindings/pci/ti,j721e-pci-host.yaml | 28 +++++++++++++++++-- 2 files changed, 50 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..1aeea168d3d0 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,31 @@ properties: items: - const: link_state +allOf: + - $ref: "cdns-pcie-ep.yaml#" + - if: + properties: + compatible: + enum: + - ti,am64-pcie-ep + then: + properties: + num-lanes: + minimum: 1 + maximum: 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..8eca0d08303f 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,31 @@ properties: interrupts: maxItems: 1 +allOf: + - $ref: "cdns-pcie-host.yaml#" + - if: + properties: + compatible: + enum: + - ti,am64-pcie-host + then: + properties: + num-lanes: + minimum: 1 + maximum: 1 + + - if: + properties: + compatible: + enum: + - ti,j7200-pcie-host + - ti,j721e-pcie-host + then: + properties: + num-lanes: + minimum: 1 + maximum: 2 + required: - compatible - reg