Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp33681lqp; Tue, 11 Jun 2024 13:37:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVjFe/SmNWWMxEkrAAdo62cyVkH8uYxK0K4qspxENDNxfbX0Evjiea79KV7Vijy4hjLLX1f8sdEse+LZwhqucoPM92dpzqeG7wzWuM9Hw== X-Google-Smtp-Source: AGHT+IHirsZ9dFYDlZBNoTCQ9P7uijYftJjhqJ+UyE1lUG/kOUakfteOyx/ezdAp1hVX1hkCaK43 X-Received: by 2002:aa7:8888:0:b0:704:211a:44b with SMTP id d2e1a72fcca58-705bce2043emr19166b3a.3.1718138270250; Tue, 11 Jun 2024 13:37:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718138270; cv=pass; d=google.com; s=arc-20160816; b=iSJFFIlTnGvOJtT5bN/ZUJQzg2xYst4/gBovg3tsq060aVFAoSkSSXryIEkeQT9ihb EpGgXBEdZPbLjW9p5XEA9K9Nm2HMkTyAFzvTj671S47rZOoy2CrvG+at9e7Dam5/LaSw NF46EHLxTY0bSFYOvZpwlbMbTznQFxRST442Xb2vhK2MEtWw99zjnCeaybwHctKF3wHb VNRbXuCbmHjEFzoZuvModfKDDmab7m3Bmib3VC58N3RgZa68muy+mOCbxCIoZACSgUqI NJoLbqZbpRvwWapWM59dqi/0H+xRM9vpVz83zmdeE8ELz/7bG9W8k/uhPZdRK3+KgBlG 0fOQ== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=2njzuQ2qNPTZwrj66zO8oq7fCl4tlvTWDsxA43ZZdsQ=; fh=9/VJWs3+UW/yntUw+Nwfzym+BatRMeG2hWad7JjrS1Y=; b=nMiLDNJ6w93BuaCckZJoDpE6nXS55eAed7FU81gNkTex0qiCmb8yWCYnmNhP+rgJ1m d+xOSBnN2PrplC8c8zQyxubpjoVkEh7i7UksEVoebX7PMoAGE1HJ/x6PcZDLd4av/uzS sZIaAkrst3+I+WdZgM5p5k9BQvyV08XDacKGLo0hlwEtSIfLZ5b6cLTM9wxiS++4JqGK MtwaB7UGP2VNHzLHwC06D3A8Wi9/Eh58fw0IOpudAoI89RceAafPXyfyIIU51YG2j+yW W/XL62V+sV/N6j78D0KNnpmxPwQgiM+9vQmXMpb9SXZCNBvZ7Lw6Ik7RW3NFaKqlquw5 TLig==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=bk8L+bnY; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-210259-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210259-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6de2073c388si7001456a12.101.2024.06.11.13.37.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 13:37:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-210259-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=bk8L+bnY; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-210259-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210259-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 34477B20D75 for ; Tue, 11 Jun 2024 16:36:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 463B34176E; Tue, 11 Jun 2024 16:36:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="bk8L+bnY" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) (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 71E961CFA9; Tue, 11 Jun 2024 16:36:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.17 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718123784; cv=none; b=CE9tT0ozVEpDIaTm9HXA/r//d/nYM2fq1CXI/KcSdYa3hvlphauXNgAHIx6meAcO6q1qXmv994kpehdUh1L6fkVhEs96lY542Ewn9C2YstjHhL6Jc7a9AmdMP96g2CF5qrq0pD3N+3jzGaZ4sJd7TVohdy93/KpMbFZfNRWNxJ0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718123784; c=relaxed/simple; bh=lc5OBt3a0lOopI/ilgimjrd8D/Lwin6NVPSkHe2KmGg=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=Y8lm3/M3FERraSVEKCCVF0gQeCALkQd6xNI/smT5OeNb8phmnhtb1gPRW9k3bvnmXXtCyaI8Q+aQPOqy2DoVKa69wS49LwIhDlu0UFj4hWiHa3KoM7Yd9jh5x1pspohrwkhQYv6XndBOT263SwCutaifSIYJL3PCvQMWjw04V38= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=bk8L+bnY; arc=none smtp.client-ip=198.175.65.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718123783; x=1749659783; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=lc5OBt3a0lOopI/ilgimjrd8D/Lwin6NVPSkHe2KmGg=; b=bk8L+bnYeC4RlvRxbKIuTxjWAPlzzHF27D0A9CXAzMbGX6dGoZUuv6QY QCW4nMuAra++Ny6XGgHZgOrahw1BgedGqnC7UstSIUWxIcUHs1fKdNK7G lzzO/JlgqBk+7Y/t9W5saDrr9WXOjl8QzvSH6zRqmMWHgKL2FvScI82tR cilrd0r4uRfIJ5jGKyQyA22ipOwave8fPoQZEtQgxuVetFyzvLPpVPDlN drxlY5AqLiYaU38avaoontaDLUDG+a2plQmFIykSYosvqmWVsPm3Y1L8w 0nVK2ojz1/qiib1PbQr/fahZCCHSXCdDohJVwGM1kRHj++Taz33FPdQ46 A==; X-CSE-ConnectionGUID: YbTgofCpS6uJtvwaaimG/Q== X-CSE-MsgGUID: KtrwT5ehQwyH46hK6KiapA== X-IronPort-AV: E=McAfee;i="6600,9927,11100"; a="14972714" X-IronPort-AV: E=Sophos;i="6.08,230,1712646000"; d="scan'208";a="14972714" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jun 2024 09:36:23 -0700 X-CSE-ConnectionGUID: ggwif3ZWSKuoN2ZMghFfdA== X-CSE-MsgGUID: k0D2yHfLRGmP+DhmEufjpw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,230,1712646000"; d="scan'208";a="39959464" Received: from test2-linux-lab.an.intel.com ([10.122.105.166]) by orviesa006.jf.intel.com with ESMTP; 11 Jun 2024 09:36:21 -0700 From: matthew.gerlach@linux.intel.com To: lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, joyce.ooi@intel.com, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Matthew Gerlach Subject: [PATCH v6 1/2] dt-bindings: PCI: altera: Convert to YAML Date: Tue, 11 Jun 2024 11:35:24 -0500 Message-Id: <20240611163525.4156688-1-matthew.gerlach@linux.intel.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Matthew Gerlach Convert the device tree bindings for the Altera Root Port PCIe controller from text to YAML. Signed-off-by: Matthew Gerlach --- v6: - Fix dt_binding_check warnings by creating interrupt-controller subnode and fixing interrupt-map. - Updated filename in MAINTAINERS. v5: - add interrupt-controller #interrupt-cells to required field - don't touch original example dts v4: - reorder reg-names to match original binding - move reg and reg-names to top level with limits. v3: - Added years to copyright - Correct order in file of allOf and unevaluatedProperties - remove items: in compatible field - fix reg and reg-names constraints - replace deprecated pci-bus.yaml with pci-host-bridge.yaml - fix entries in ranges property - remove device_type from required v2: - Move allOf: to bottom of file, just like example-schema is showing - add constraint for reg and reg-names - remove unneeded device_type - drop #address-cells and #size-cells - change minItems to maxItems for interrupts: - change msi-parent to just "msi-parent: true" - cleaned up required: - make subject consistent with other commits coverting to YAML - s/overt/onvert/g --- .../devicetree/bindings/pci/altera-pcie.txt | 50 -------- .../bindings/pci/altr,pcie-root-port.yaml | 114 ++++++++++++++++++ MAINTAINERS | 2 +- 3 files changed, 115 insertions(+), 51 deletions(-) delete mode 100644 Documentation/devicetree/bindings/pci/altera-pcie.txt create mode 100644 Documentation/devicetree/bindings/pci/altr,pcie-root-port.yaml diff --git a/Documentation/devicetree/bindings/pci/altera-pcie.txt b/Documentation/devicetree/bindings/pci/altera-pcie.txt deleted file mode 100644 index 816b244a221e..000000000000 --- a/Documentation/devicetree/bindings/pci/altera-pcie.txt +++ /dev/null @@ -1,50 +0,0 @@ -* Altera PCIe controller - -Required properties: -- compatible : should contain "altr,pcie-root-port-1.0" or "altr,pcie-root-port-2.0" -- reg: a list of physical base address and length for TXS and CRA. - For "altr,pcie-root-port-2.0", additional HIP base address and length. -- reg-names: must include the following entries: - "Txs": TX slave port region - "Cra": Control register access region - "Hip": Hard IP region (if "altr,pcie-root-port-2.0") -- interrupts: specifies the interrupt source of the parent interrupt - controller. The format of the interrupt specifier depends - on the parent interrupt controller. -- device_type: must be "pci" -- #address-cells: set to <3> -- #size-cells: set to <2> -- #interrupt-cells: set to <1> -- ranges: describes the translation of addresses for root ports and - standard PCI regions. -- interrupt-map-mask and interrupt-map: standard PCI properties to define the - mapping of the PCIe interface to interrupt numbers. - -Optional properties: -- msi-parent: Link to the hardware entity that serves as the MSI controller - for this PCIe controller. -- bus-range: PCI bus numbers covered - -Example - pcie_0: pcie@c00000000 { - compatible = "altr,pcie-root-port-1.0"; - reg = <0xc0000000 0x20000000>, - <0xff220000 0x00004000>; - reg-names = "Txs", "Cra"; - interrupt-parent = <&hps_0_arm_gic_0>; - interrupts = <0 40 4>; - interrupt-controller; - #interrupt-cells = <1>; - bus-range = <0x0 0xFF>; - device_type = "pci"; - msi-parent = <&msi_to_gic_gen_0>; - #address-cells = <3>; - #size-cells = <2>; - interrupt-map-mask = <0 0 0 7>; - interrupt-map = <0 0 0 1 &pcie_0 1>, - <0 0 0 2 &pcie_0 2>, - <0 0 0 3 &pcie_0 3>, - <0 0 0 4 &pcie_0 4>; - ranges = <0x82000000 0x00000000 0x00000000 0xc0000000 0x00000000 0x10000000 - 0x82000000 0x00000000 0x10000000 0xd0000000 0x00000000 0x10000000>; - }; diff --git a/Documentation/devicetree/bindings/pci/altr,pcie-root-port.yaml b/Documentation/devicetree/bindings/pci/altr,pcie-root-port.yaml new file mode 100644 index 000000000000..08ee04f6e004 --- /dev/null +++ b/Documentation/devicetree/bindings/pci/altr,pcie-root-port.yaml @@ -0,0 +1,114 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +# Copyright (C) 2015, 2019, 2024, Intel Corporation +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/altr,pcie-root-port.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Altera PCIe Root Port + +maintainers: + - Matthew Gerlach + +properties: + compatible: + enum: + - altr,pcie-root-port-1.0 + - altr,pcie-root-port-2.0 + + reg: + items: + - description: TX slave port region + - description: Control register access region + - description: Hard IP region + minItems: 2 + + reg-names: + items: + - const: Txs + - const: Cra + - const: Hip + minItems: 2 + + interrupts: + maxItems: 1 + + interrupt-map-mask: + items: + - const: 0 + - const: 0 + - const: 0 + - const: 7 + + interrupt-map: + maxItems: 4 + + "#interrupt-cells": + const: 1 + + interrupt-controller: + description: identifies the node as an interrupt controller + type: object + properties: + interrupt-controller: true + + "#address-cells": + const: 0 + + "#interrupt-cells": + const: 1 + + required: + - interrupt-controller + - "#address-cells" + - "#interrupt-cells" + + additionalProperties: false + + msi-parent: true + +required: + - compatible + - reg + - reg-names + - interrupts + - "#interrupt-cells" + - interrupt-controller + - interrupt-map + - interrupt-map-mask + +allOf: + - $ref: /schemas/pci/pci-host-bridge.yaml# + +unevaluatedProperties: false + +examples: + - | + #include + #include + pcie_0: pcie@c00000000 { + compatible = "altr,pcie-root-port-1.0"; + reg = <0xc0000000 0x20000000>, + <0xff220000 0x00004000>; + reg-names = "Txs", "Cra"; + interrupt-parent = <&hps_0_arm_gic_0>; + interrupts = ; + #interrupt-cells = <1>; + bus-range = <0x0 0xff>; + device_type = "pci"; + msi-parent = <&msi_to_gic_gen_0>; + #address-cells = <3>; + #size-cells = <2>; + interrupt-map-mask = <0 0 0 7>; + interrupt-map = <0 0 0 1 &pcie_intc 1>, + <0 0 0 2 &pcie_intc 2>, + <0 0 0 3 &pcie_intc 3>, + <0 0 0 4 &pcie_intc 4>; + ranges = <0x82000000 0x00000000 0x00000000 0xc0000000 0x00000000 0x10000000>, + <0x82000000 0x00000000 0x10000000 0xd0000000 0x00000000 0x10000000>; + pcie_intc: interrupt-controller { + interrupt-controller; + #address-cells = <0>; + #interrupt-cells = <1>; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index 670b8201973b..c8120cb9d340 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -17142,7 +17142,7 @@ PCI DRIVER FOR ALTERA PCIE IP M: Joyce Ooi L: linux-pci@vger.kernel.org S: Supported -F: Documentation/devicetree/bindings/pci/altera-pcie.txt +F: Documentation/devicetree/bindings/pci/altr,pcie-root-port.yaml F: drivers/pci/controller/pcie-altera.c PCI DRIVER FOR APPLIEDMICRO XGENE -- 2.34.1