From patchwork Mon Dec 2 11:19:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrea della Porta X-Patchwork-Id: 13890304 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3EF64D7830D for ; Mon, 2 Dec 2024 11:23:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:To:From:Reply-To: Cc:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Ls8B2JToXYGAXb9LS74sJQCwE0xP16NyZq/5IJDDE8w=; b=e5JMMUhMxEE5R13cIl32CcGrx3 KKVEENvHZ1+5wCaXN76Hdr0u0FbNr8peTADN1Jz/hLhe+fvEcbIk0J9+9fv/xk+AphZfueCTPLDxn h7jL9eAE4JFTWfzyRdBySEi7L3y9VjPYpmQKG9CdCejQhP181JuRdv5c2SKh6fD2MmmGYjeLxK5e3 llAayO+wfcc+Il62hU4qiXVWkVythKZ9E0eD9JalPBjgOkoBa/hMhG1wCBgGish8fyZaUMd8/xXAq c0OHzTt+YikKU/rxb9pgacrRMJPrdW6wVHboqUE89KoQ6TJ037cIFlW9L7qIEhsypBoA+La/godr3 cLgYHV2w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tI4WF-00000005sNl-3yCB; Mon, 02 Dec 2024 11:23:11 +0000 Received: from mail-ej1-x641.google.com ([2a00:1450:4864:20::641]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tI4SK-00000005rI3-1uVX for linux-arm-kernel@lists.infradead.org; Mon, 02 Dec 2024 11:19:10 +0000 Received: by mail-ej1-x641.google.com with SMTP id a640c23a62f3a-aa52a5641f8so593246666b.3 for ; Mon, 02 Dec 2024 03:19:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1733138347; x=1733743147; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Ls8B2JToXYGAXb9LS74sJQCwE0xP16NyZq/5IJDDE8w=; b=AdkHcsdtIS+wbGFiNnGCD1FguQuyDGbrHJxvLy3aZr8LX27O3mLC+MyM3Wu+wTBYJp 4Ol58R3htY5FHwCmaDTcloLUJyERQTofjNHErIz7Of2mpKReK8IBvlBWH8QSht1wtNg8 cXuaUpv2w17DqH5hzzlAh6kcj3Z15jzkac/5r+F12XA5aY0U3OOM6QG7X/EvyHPYu462 W6imlDT77axXyEUleqH9Jis5iIoU/o+CmbYfl3pwoMW163bldiugQ6bmzKvAgg+hm84n ru9/fHoLQx3R/xo95agRe+6sgmP6MSePH8oPwkNCTcFUoh00JuU9BoPuDM6Q1kObCu1e 5n8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733138347; x=1733743147; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ls8B2JToXYGAXb9LS74sJQCwE0xP16NyZq/5IJDDE8w=; b=hsV8YcFRyoAvhdK2gvjVBi1Eesiz4GQKf8F1aU8R/VVyzCBETnS7bFUXtSlXUNArSO yr4LNRbnvRCN8UoWsxWCRk6VNa+92wex0238Qhq31FDKBExJ8II52fGl5d0y6DJJZc2S Yegnu1U7vClmPY8M1wOb9FUjM1NznpfR2aDvOLNo14fPwemg28gmBujR3fohU6sjKsVo m9FCHupFw4LL+5Ucdpp4P9wnxZIZr6gAJ6Wn9UL6y+/ZrK7mclnjDwJRNUdjNyXRI+VN G2EuVhHnOuSm6pDTlWPk4dACypYV01Kql2Z4JinR51NE39gqp5XLcskiuVwV2pyRa0e4 +mhw== X-Forwarded-Encrypted: i=1; AJvYcCXak1DCyEQ8JDDqRhycOibhMXkGGMBxM3eDVkTRzB7xPoNbz1Uir8TQs0Q/rzf0UUpeqqB2DQmGUCqdNKSekVig@lists.infradead.org X-Gm-Message-State: AOJu0Yw8cVqpWAJdHH8BPRnGTFHNQiBRQ2ggcAUXU7N07AMzqYcrrw82 qsyByItocXQf7vYOF7oHHj6HNZ1P2benLqC/tGaiusJVAYfCGDnIt9jy1i1guMo= X-Gm-Gg: ASbGncvabnneLeoT3dwdq+368Tj+nE263ET72lIHKbqMW9TppdJTfHfI1G9xcKvDTob f4kECUMXJDNpE6cC5zAjJZiFmEwWn06Ir0q3IdyOJjWYishta1gjjIf3zr4s3ToC+Uwqo9h1Y2F 2fZyPugvqBifA8uAJJ9uaBCJbFdeWYugL/J/G2U+jGNfIZ/jeDvyU0GJ5zhuDwwfTc24eJaDmyz LkQhIPcyOGeG/55iQ6POkw2AsXxOqe7U/w6u/qM1u33ujVURl3MEmsOONZaAD3l1l+L6HaLFsmE 3OZq4Cm/U7arfODsrHod X-Google-Smtp-Source: AGHT+IE+vlGfUKHoK+eOYKOTrYHlnwW0nDaadMqJJdAIeLKTsd6hO7F+g3x5C2yLKyLrt7SMSma6wA== X-Received: by 2002:a17:906:32cc:b0:aa5:4982:abc8 with SMTP id a640c23a62f3a-aa580f1defbmr1772837366b.22.1733138346719; Mon, 02 Dec 2024 03:19:06 -0800 (PST) Received: from localhost (host-87-20-211-251.retail.telecomitalia.it. [87.20.211.251]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aa5997ffc67sm498126966b.89.2024.12.02.03.19.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Dec 2024 03:19:06 -0800 (PST) From: Andrea della Porta To: Andrea della Porta , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Broadcom internal kernel review list , Lorenzo Pieralisi , Krzysztof Wilczynski , Manivannan Sadhasivam , Bjorn Helgaas , Linus Walleij , Catalin Marinas , Will Deacon , Bartosz Golaszewski , Derek Kiernan , Dragan Cvetic , Arnd Bergmann , Greg Kroah-Hartman , Saravana Kannan , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-gpio@vger.kernel.org, Masahiro Yamada , Stefan Wahren , Herve Codina , Luca Ceresoli , Thomas Petazzoni , Andrew Lunn Subject: [PATCH v5 03/10] dt-bindings: pci: Add common schema for devices accessible through PCI BARs Date: Mon, 2 Dec 2024 12:19:27 +0100 Message-ID: <92fe1c6eb3ae1e7e7c151423568be2d13f19b55a.1733136811.git.andrea.porta@suse.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241202_031908_486062_478A3BD2 X-CRM114-Status: GOOD ( 19.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Common YAML schema for devices that exports internal peripherals through PCI BARs. The BARs are exposed as simple-buses through which the peripherals can be accessed. This is not intended to be used as a standalone binding, but should be included by device specific bindings. Signed-off-by: Andrea della Porta Reviewed-by: Rob Herring (Arm) --- .../devicetree/bindings/pci/pci-ep-bus.yaml | 58 +++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 59 insertions(+) create mode 100644 Documentation/devicetree/bindings/pci/pci-ep-bus.yaml diff --git a/Documentation/devicetree/bindings/pci/pci-ep-bus.yaml b/Documentation/devicetree/bindings/pci/pci-ep-bus.yaml new file mode 100644 index 000000000000..33479a5b40c6 --- /dev/null +++ b/Documentation/devicetree/bindings/pci/pci-ep-bus.yaml @@ -0,0 +1,58 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pci/pci-ep-bus.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Common Properties for PCI MFD EP with Peripherals Addressable from BARs + +maintainers: + - Andrea della Porta + +description: + Define a generic node representing a PCI endpoint which contains several sub- + peripherals. The peripherals can be accessed through one or more BARs. + This common schema is intended to be referenced from device tree bindings, and + does not represent a device tree binding by itself. + +properties: + '#address-cells': + const: 3 + + '#size-cells': + const: 2 + + ranges: + minItems: 1 + maxItems: 6 + items: + maxItems: 8 + additionalItems: true + items: + - maximum: 5 # The BAR number + - const: 0 + - const: 0 + +patternProperties: + '^pci-ep-bus@[0-5]$': + type: object + description: + One node for each BAR used by peripherals contained in the PCI endpoint. + Each node represent a bus on which peripherals are connected. + This allows for some segmentation, e.g. one peripheral is accessible + through BAR0 and another through BAR1, and you don't want the two + peripherals to be able to act on the other BAR. Alternatively, when + different peripherals need to share BARs, you can define only one node + and use 'ranges' property to map all the used BARs. + + additionalProperties: true + + properties: + compatible: + const: simple-bus + + required: + - compatible + +additionalProperties: true +... diff --git a/MAINTAINERS b/MAINTAINERS index a547e863807c..ceed86755da4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -19578,6 +19578,7 @@ RASPBERRY PI RP1 PCI DRIVER M: Andrea della Porta S: Maintained F: Documentation/devicetree/bindings/clock/raspberrypi,rp1-clocks.yaml +F: Documentation/devicetree/bindings/pci/pci-ep-bus.yaml F: Documentation/devicetree/bindings/pinctrl/raspberrypi,rp1-gpio.yaml F: include/dt-bindings/clock/rp1.h F: include/dt-bindings/misc/rp1.h