From patchwork Mon Oct 7 12:39:46 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: 13824668 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 06C14CFB43F for ; Mon, 7 Oct 2024 13:17:34 +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=fuhcTT207BoYyeeg1rSml1YhvWxOKliW74hU35I85Z4=; b=n5E2Gr8VQE69CZEfVYRE66ZGM5 5kxflWWKwyJbrb3Dt4OOPRx9zEBvuI/0SorQbvNiPxh00AFJFd7mxWVOGvoJvkkhIZs4XAD798NOQ ay805pvtpvKBb2hK13fuZEjdAn6G3yNH+Gviz+8vtnuKPN2YaHRWXOIMbViioCcaZmrBNH9Tlp9w7 3SawQtibcp5gcgmxVneDSDx7brN7FWAcpCcQYQQUiEuSXaYDvjU37+jVNzgme3YJCRFAFZyraJ9xl oSeo+AIdPFxWJYUt3ZnxQexKY2DYlgF1FzEWvki/9FN5CBnVj4czucq/dcJrd5x/Hb2USBYWeOiz3 /BxTGzYg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sxnc2-00000002TX7-2E8X; Mon, 07 Oct 2024 13:17:22 +0000 Received: from mail-ed1-x542.google.com ([2a00:1450:4864:20::542]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sxn1j-00000002MXy-0bVI for linux-arm-kernel@lists.infradead.org; Mon, 07 Oct 2024 12:39:53 +0000 Received: by mail-ed1-x542.google.com with SMTP id 4fb4d7f45d1cf-5c87ab540b3so9588621a12.1 for ; Mon, 07 Oct 2024 05:39:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1728304789; x=1728909589; 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=fuhcTT207BoYyeeg1rSml1YhvWxOKliW74hU35I85Z4=; b=bn/6Q/FMzcBJchJl82CC4xJVmERHYSCAkCwf9nqxHK//85hrAMNGsrDVCQedCy5O/a H/XFI5P4rpiHREnQEgGsa2LoD1qAwW9f9vAeoEwPANVuoDE+emBv0K+elrGJx8thQlv0 EVaYhbevPFZsLrbNcWIdoHyLGOvw1nTsYLuqzamsdpTm5IvLEhGHGhjlPA75pg2v5rLJ I3tcNlTkOC0Y99DhUK55tdKP3mPfBAZtVaTl1WTE8EY1mQxJMVPPFgHAqHBibqL2OZ8S 0dIHb68jfKTnotlBe3jr/JHfscC+QHIPCs4PrvP2mzjA/qnEVH53GkLh9WBailkXYIGQ jHGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728304789; x=1728909589; 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=fuhcTT207BoYyeeg1rSml1YhvWxOKliW74hU35I85Z4=; b=JKg/JEBF8WjQInKccCLgRIbhDIWBsFMaITzG5+ZMc3mmlsFrYr28w0P2fb2wWokNXZ YM15OZbS5nMzhhNwu9vq7Zi43TJxdeS9UMBIw22Gk7SnzWjN/xgqM0+uBhyW47WiZif/ mAPgT13TronlSGa+IXiB3M5YadJiGkv9YSVO8/A313y+qHCgTBERg4ooK+g6VdBLLEh6 WBgCls2u2r1fsFexUaogadnFH9vBmsa+lTU4omcpTYha9hWFrNYKz3G5KZz7pah8+v3n CEDJsnkDvb6VK10rYPhTZTq7Eo0JLGso11f7ip7ArONVTnlhXDtRq8BXY8onWGBOd4zB M/dA== X-Forwarded-Encrypted: i=1; AJvYcCWrCpWsc8YGpmdeIe4m3z9DcKL+BQv/NsB6upj2ctZhR6nZ2RyGidBSkhv1HJ0LkZKndfb0ZYAEz10E9+T0gQ94@lists.infradead.org X-Gm-Message-State: AOJu0YxWx9mwX5QNaPL4pv9nRWI5H4CFfUDMB9TCYdWOK0fo+wEf8nKs Sf9uBTwMtFJjXhBUC6Fg+Cv6w0maPFQCdxys/eEBnYurbd53Q61tWm/UTCbZHbA= X-Google-Smtp-Source: AGHT+IH4uJtWnmjaVwPOlrjtEv7DLcKyM5zoEla9wX4MrKe8D3yYuCSnyyFIX1r9/Ssik+roi9jduA== X-Received: by 2002:a05:6402:43c4:b0:5c4:1c89:6e36 with SMTP id 4fb4d7f45d1cf-5c8c0a8ae6amr16557075a12.19.1728304788892; Mon, 07 Oct 2024 05:39:48 -0700 (PDT) Received: from localhost (host-87-21-212-62.retail.telecomitalia.it. [87.21.212.62]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c8e05bd4e7sm3146971a12.47.2024.10.07.05.39.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Oct 2024 05:39:48 -0700 (PDT) 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 , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , 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 v2 03/14] dt-bindings: pci: Add common schema for devices accessible through PCI BARs Date: Mon, 7 Oct 2024 14:39:46 +0200 Message-ID: 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-20241007_053951_303686_4C3DEEAF X-CRM114-Status: GOOD ( 20.46 ) 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 --- .../devicetree/bindings/pci/pci-ep-bus.yaml | 69 +++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 70 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..9d7a784b866a --- /dev/null +++ b/Documentation/devicetree/bindings/pci/pci-ep-bus.yaml @@ -0,0 +1,69 @@ +# 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 endpoints 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]$": + $ref: '#/$defs/pci-ep-bus' + 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. + +required: + - ranges + - '#address-cells' + - '#size-cells' + +$defs: + pci-ep-bus: + type: object + additionalProperties: true + properties: + compatible: + const: simple-bus + dma-ranges: true + ranges: true + "#address-cells": true + "#size-cells": true + required: + - compatible + - ranges + - '#address-cells' + - '#size-cells' +... diff --git a/MAINTAINERS b/MAINTAINERS index c55d12550246..ccf123b805c8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -19384,6 +19384,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