Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp693223lqp; Sat, 13 Apr 2024 15:36:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVyRZJwb2mGWSwKYwCsAKO/FFXvJlhdbzGRP56er5/mLowPMC02vWgu6E0NVcbE4kvKfA38N+F+DvDP09m/FBHujKLxn1TYzPM5ovG4mA== X-Google-Smtp-Source: AGHT+IGRfpEI+IMOgizWj+KSMyTH48rD7v8AX2JQtEgQewfj9fNAm8F+/hTGNmKUINTOpx6av1LI X-Received: by 2002:a17:902:d2c2:b0:1e2:3d05:5f4c with SMTP id n2-20020a170902d2c200b001e23d055f4cmr6454240plc.39.1713047774140; Sat, 13 Apr 2024 15:36:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713047774; cv=pass; d=google.com; s=arc-20160816; b=jnsDyOARzaMLagEiAEjTp9UTR27Ws84iEmjL8q8rDyiB+a62n75WRCCTRSaTVHQpux XjDIBtrb1Rjj9i/2Ly2V/9v5im45ekhORu9iF6i/6SEQj3RL2FxlFJR9bK6LjnpASqRd 0Me+nKmReDeiEINrCzLWh0XxgoBycsr2KUF0+2Q5cAgLiLydUFbk8bfFqrJoXQIIzr4F 0tdvVc8+Un6SrTX+FWr7dxIfAuD12pM3+hfII7pgqCBwtnxMOJ9woYFwLOzvO6uq2GUW G1ayK5yi0cNmuHpJhruQ2pzTa+ytM8hz+HBfP94ZsgtGMpbB2+E/CTjlu5/d0aYU7zTH VUjg== 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=1vqy20tXcWPRRTfAkqMEchZKLBD45YyOAS6H5GIeZ6g=; fh=L0lZiUZ+OCr3MdZbU0bUbO7h0UP+e6IFD+wbu98JbwM=; b=sNQie/x4S4M/S0d8X65/KU4MXN1kEK4mLXfeMjlPqUeQIjGZIvVw9YSM5SEqEtxITn bTglZ/Now/larH7XW7zVRXEaqVmAA1DAb/5P/ksYYqiviV8478DNxy6nfkIsQwBCEPXG d0iVfO2lQhl4gLZ8909PZ6A7zsnUkOyfGVXt6RbSSPKxncnr+y/AiFxRtsRG0gEB7c3A mPmH1aItOykxTcdusH/dDyvhnVygrcx0CXPeOzbPe14hSrkB00PMbaWGHhnnboeG2+W4 ws7Cs+2FzEBMPdKvEIxS4/DVmCr0ZQsOyOSkEGeG3ByKis5I4lHnHma2C3GbYIHIpp8f E/IA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QgXTkt+u; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-143831-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143831-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 a6-20020a170902ecc600b001e54a5f3f39si5457323plh.60.2024.04.13.15.36.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Apr 2024 15:36:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-143831-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=QgXTkt+u; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-143831-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143831-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 6CCDEB211A6 for ; Sat, 13 Apr 2024 17:27:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E26A9524BA; Sat, 13 Apr 2024 17:27:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="QgXTkt+u" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (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 0B85A347A2; Sat, 13 Apr 2024 17:26:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713029220; cv=none; b=oZL2Y6yf1kXR2Dj5GMKUf4AZX2iR4OXoGFkdmaBxjTw5FviRUmNjSKPUnV23wK711PsOubyjNECJx6l+/hMnwwOn6QO7VWYsMJ8o3KzcyYYPGxL8MBz+LL5ZVFsyXyfnQCZf8fU5WGJ1AdmlRk3ydoI6w5i4DkBpfSthgyIBNQE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713029220; c=relaxed/simple; bh=5UeKOyi53VeVQcVkrVDSoWnTbPIVlOepA4P5i5nnoUc=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=M8W9LZCV4gt5CqFWzgpfemfe20QNCIGpUV8RWOkngbtol/TaxYiOBD3ZCT3E+2MReRtT5uDopymr9c1IlgM2zDWYJ2W7m44FquwyFOv56m7wcTm1vqJug5ky0wgMHSr6f4eZj3d6+BsJY5Y6ddon8EMvPwkV+GwwUiL/VyAgIWw= 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=QgXTkt+u; arc=none smtp.client-ip=198.175.65.18 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=1713029218; x=1744565218; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=5UeKOyi53VeVQcVkrVDSoWnTbPIVlOepA4P5i5nnoUc=; b=QgXTkt+u/YUi92jtpdvtfeJNWi6AQEqHg6RE9YX1VwgSCCW8K9oPtwwo 85Gxu4qJBP9LlcA+tmh+Y8lWgSLoocVt8NmGqCeaJC4pSxccA3/nNWfQS VLcij949Kp8hXFwjsomTuLhDT3n/qObq08nQHcpeZp4ddeorR+Z8lV+En PHSQXndAQxkuXDv271ldjkqVNkHfVkLyKAMCmW9itiGUTRQHSTM/UeIBP ohTbAaQ8XbB5BRdK92Jwk08i1anA7Fzz9sBynUWQdr9+vMmz+pcGyYR9y HkCCh7MWjf8UoPezwzDW4Qv4jRfTTOn2Llvd2spCDd49tnY7bJe3NRB9E Q==; X-CSE-ConnectionGUID: vhKUOqhGRTWQtMhv3mhd7Q== X-CSE-MsgGUID: 1yuT8kTmQHSHOEo1AhAurQ== X-IronPort-AV: E=McAfee;i="6600,9927,11043"; a="8637614" X-IronPort-AV: E=Sophos;i="6.07,199,1708416000"; d="scan'208";a="8637614" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2024 10:26:57 -0700 X-CSE-ConnectionGUID: ijmeSYHbRPGRhMqmmVVECw== X-CSE-MsgGUID: THg4LPW5SrSJE+P+Sjkgxg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,199,1708416000"; d="scan'208";a="26202088" Received: from test2-linux-lab.an.intel.com ([10.122.105.166]) by orviesa003.jf.intel.com with ESMTP; 13 Apr 2024 10:26:58 -0700 From: matthew.gerlach@linux.intel.com To: bhelgaas@google.com, lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Matthew Gerlach Subject: [PATCH v3] dt-bindings: PCI: altera: Convert to YAML Date: Sat, 13 Apr 2024 12:26:41 -0500 Message-Id: <20240413172641.436341-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 --- 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 | 112 ++++++++++++++++++ 2 files changed, 112 insertions(+), 50 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..13b97f4fd5ee --- /dev/null +++ b/Documentation/devicetree/bindings/pci/altr,pcie-root-port.yaml @@ -0,0 +1,112 @@ +# 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: + minItems: 2 + maxItems: 3 + + reg-names: + minItems: 2 + maxItems: 3 + + interrupts: + maxItems: 1 + + interrupt-map-mask: + items: + - const: 0 + - const: 0 + - const: 0 + - const: 7 + + interrupt-map: + maxItems: 4 + + "#interrupt-cells": + const: 1 + + msi-parent: true + +required: + - compatible + - reg + - reg-names + - interrupts + - interrupt-map + - interrupt-map-mask + +allOf: + - $ref: /schemas/pci/pci-host-bridge.yaml# + - if: + properties: + compatible: + enum: + - altr,pcie-root-port-1.0 + then: + properties: + reg: + items: + - description: TX slave port region + - description: Control register access region + + reg-names: + items: + - const: Txs + - const: Cra + + else: + properties: + reg: + items: + - description: Hard IP region + - description: TX slave port region + - description: Control register access region + + reg-names: + items: + - const: Hip + - const: Txs + - const: Cra + +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>; + }; -- 2.34.1