Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp177737lqz; Fri, 29 Mar 2024 12:28:33 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWfLtpnFsD9b8Ur97POHP6jPTtL5DXOoJ0KCrMPToZ02U6fuJ5sIyUHwf0cZ1sOuJh8cRcEl5cVrH2SD42caSEvtB8X/2GFkZZiAyookA== X-Google-Smtp-Source: AGHT+IGxW5ORLuG45Gx7v8+6al6FNZ+l/ilhLH/Q7fkJVFLbdpT6WQFaSS8HgGkF+HEbGxLcvMjm X-Received: by 2002:a9d:7990:0:b0:6e4:e561:6ba7 with SMTP id h16-20020a9d7990000000b006e4e5616ba7mr3521546otm.25.1711740512953; Fri, 29 Mar 2024 12:28:32 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id h5-20020a37c445000000b0078a5d4d77cesi4295238qkm.561.2024.03.29.12.28.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 12:28:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-125333-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=kxcmKyo8; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-125333-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125333-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 9D61A1C22208 for ; Fri, 29 Mar 2024 19:28:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1FF5A13A240; Fri, 29 Mar 2024 19:27:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="kxcmKyo8" Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4E56C1386B4 for ; Fri, 29 Mar 2024 19:27:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711740472; cv=none; b=J82fgT7BkszU67GnyXkw/+Egf96lwxD36IquUxUyTo4utQWmJ55UZP6QpT6kp0mamZEPAkfSdfl1F+KmkCdHVjGp0m0+WpFZrfhBUAfvu+6fLxHtmeFa8EsmFSl/6hsoE1elMaY7/LwmOhbYABP6hpnrDwq1bwgJQIJdzbOwNYM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711740472; c=relaxed/simple; bh=HQu5RRVz47jUdl+Bxn7MiN5S9bgEl42EXv8NwJt6Wow=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=E5rfSninHtitEjGAOBfJw8J/yoNwylOlNzTOryKmVZYOqs+hiw/oua3u36yyznjqB7JBwJEd6yWVYzvIKHYRz9nWlOH0116Ulqu+ZAujW51JHqAUDlQyA5AA5sNBR/JOhKy/Zrz8GIipUq8Nc9fVDP9WiwMyqc8r+ohBWp0VQLQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=kxcmKyo8; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-4149746f80aso15561005e9.1 for ; Fri, 29 Mar 2024 12:27:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711740468; x=1712345268; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=ypH1YCAf8GB4uY1YvbslKIBvLhcq3mEbEzkW3A0+meY=; b=kxcmKyo83US51szYlhKSYPQmbwbLWaLBbEuB6Fy+sbILF1zuIgHx36v+F4kQGfeVwg IV4HzCfdCQAIurHS9ZGrIV5SqOg/ze7GAB0gTq6SWj2VEqhK4zm9lMubdEu1mpkAheqd v24gpHhFAHlTjPlyW5xPviZg/EZAxGmDjka6wFzvswB9FvX7XR/c/h9M8boWqBdRWW+X QUpxKHxfmahnXqcdkQA7dNUdPWdlLJ6ZrZV4OA1UyglZbZYpzexJSvBzFs1KBRbjGTkK BI1oYF4/oNf+pl/KMBi0rIGgF91rlah29fOdV5n0nRY8h2V0IKe+/fQS9M34SQXUJVej a1PQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711740468; x=1712345268; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ypH1YCAf8GB4uY1YvbslKIBvLhcq3mEbEzkW3A0+meY=; b=o5pLWX3q+GoRvsNg7KevqhsBzgenFek9dequw+FCWpT+i5NKZul4gJ5w81PCBjojRv sKeVLtJBCTIVc9kzy1Mv2EY2Q3SJ6cjs9MnWySmvQ61D9kqFmyIXBsej9v6BgmkpklXv txO6y38HsEFIAXKVjv0tJEu8F7o6X3cutNz5qptV9bI30AZnlwHIPXpPbR8wSjTVlGht /GeNiTZllitpDTIA0qSNez8E0Cr3s9/oI4FJzhJ6FBTp7jggrbDI1/3jyFb3Q5czIeaU ToAR/dd+H0s5PaCSVSb/hKSwz2EaUBnB8meBI9OGGiarPGNeiNr1AfGs1ZWKxhiCZoH0 RVmQ== X-Forwarded-Encrypted: i=1; AJvYcCWNxqpYvbhwJ9PgbmUOyOCNeFEZcPU11HlbQIv4TqOW3YZdLT46SCN+S4WpY3H9cCv5ibc9gOQM75NGNd5HRh9cdyZ/XyqRELA/eKdG X-Gm-Message-State: AOJu0YzjJudrsLYoKkoHKWO2Ly6dHA+CCUFtBaCXqWu0CKBLklZYGBB6 5SotKb66wjJLVZPaVjQwxpRNQJUfRB7agendWcQ4JCaaxE0IALFEe66QegNp+uo= X-Received: by 2002:a05:600c:470e:b0:414:9141:14ba with SMTP id v14-20020a05600c470e00b00414914114bamr2490718wmo.22.1711740467493; Fri, 29 Mar 2024 12:27:47 -0700 (PDT) Received: from [192.168.1.20] ([178.197.223.16]) by smtp.gmail.com with ESMTPSA id l6-20020a05600c4f0600b0041469869d11sm9342245wmq.47.2024.03.29.12.27.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 29 Mar 2024 12:27:46 -0700 (PDT) Message-ID: Date: Fri, 29 Mar 2024 20:27:44 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] dt-bindings: pci: altera: covert to yaml To: matthew.gerlach@linux.intel.com, joyce.ooi@intel.com, 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 References: <20240329170031.3379524-1-matthew.gerlach@linux.intel.com> Content-Language: en-US From: Krzysztof Kozlowski Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzTRLcnp5c3p0b2Yg S296bG93c2tpIDxrcnp5c3p0b2Yua296bG93c2tpQGxpbmFyby5vcmc+wsGUBBMBCgA+FiEE m9B+DgxR+NWWd7dUG5NDfTtBYpsFAmI+BxMCGwMFCRRfreEFCwkIBwIGFQoJCAsCBBYCAwEC HgECF4AACgkQG5NDfTtBYptgbhAAjAGunRoOTduBeC7V6GGOQMYIT5n3OuDSzG1o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379524-1-matthew.gerlach@linux.intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 29/03/2024 18:00, matthew.gerlach@linux.intel.com wrote: > From: Matthew Gerlach > > Covert the device tree bindings for the Altera Root > Port controller from text to yaml. > > Signed-off-by: Matthew Gerlach > --- .. > 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..8f1ad1362ad1 > --- /dev/null > +++ b/Documentation/devicetree/bindings/pci/altr,pcie-root-port.yaml > @@ -0,0 +1,106 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +# Copyright (C) 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 > + > +allOf: > + - $ref: /schemas/pci/pci-bus.yaml# > + > +properties: > + compatible: > + items: > + - enum: > + - altr,pcie-root-port-1.0 > + - altr,pcie-root-port-2.0 > + > + reg: > + minItems: 2 > + maxItems: 3 > + > + reg-names: > + description: > + TX slave port region (Txs) > + Control register access region (Cra) > + Hard IP region if altr,pcie-root-port-2.0 (Hip) All these go to reg as description of items. Both - reg and reg-names - need constraints per variant in allOf:if:then:. Move allOf: to bottom of file, just like example-schema is showing. > + > + items: > + - const: Txs > + - const: Cra > + - const: Hip > + minItems: 2 > + > + device_type: > + const: pci I don't think you need it. > + > + "#address-cells": > + const: 3 Drop > + > + "#size-cells": > + const: 2 Drop > + > + interrupts: > + minItems: 1 This should be maxItems. > + > + interrupt-map-mask: > + items: > + - const: 0 > + - const: 0 > + - const: 0 > + - const: 7 I guess as well. > + > + interrupt-map: > + maxItems: 4 > + > + "#interrupt-cells": > + const: 1 Drop > + > + msi-parent: > + description: Link to the hardware entity that serves as the MSI controller. Just true. Please open existing, recent PCI bindings and look how it is done. > + > + bus-range: > + description: PCI bus numbers covered. Drop > + > +required: > + - compatible > + - reg > + - reg-names > + - device_type > + - "#address-cells" > + - "#size-cells" > + - interrupts > + - interrupt-map > + - interrupt-map-mask > + - "#interrupt-cells" This also needs cleaning. > + > +unevaluatedProperties: false > + > +examples: > + - | > + pcie_0: pcie@c00000000 { > + compatible = "altr,pcie-root-port-1.0"; > + reg = <0xc0000000 0x20000000>, > + <0xff220000 0x00004000>; Misaligned. > + reg-names = "Txs", "Cra"; > + interrupt-parent = <&hps_0_arm_gic_0>; > + interrupts = <0 40 4>; Use defines for common constnats. > + #interrupt-cells = <1>; > + bus-range = <0x0 0xFF>; Lowercase hex > + 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>; Misaligned. Best regards, Krzysztof