From mboxrd@z Thu Jan 1 00:00:00 1970 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 0973ACEDDA9 for ; Thu, 10 Oct 2024 02:54:22 +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:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=NrBFdjgfj6bFgOWd9X3s56EPAy1DxgC7ERmSosETH3o=; b=awe3VqI1PzIjJXBuSM8AeZ7BZ2 nLPAVnoibxD/jLhwXuEs1wqvIVrfgyQ9d5Zo2NGbV4Qh/GMbo4FaFSzJnNj4FjSvF4I5Q1TlGv0mM OSY2aGQ+nbX+6+Ot/YTei4jJDTCNAlZ7adpCmdq35qy040l/2n8NpnmSa7zkPHZRO8sKdK+kCPhdw fmVPYvUoRmS4nX7R1uCWXFLQx9JtRoS8Mgi0m80antqrDddGPvAMrNSnriJJjab7NMzK0q85DunS3 qOnjQApokfHP5DCc7H6xVHG3XoOgN2yE40eCMM/miJb6FgWqiGc5Tdn9rXhrRhq+G/pcEHIJAk2R8 tbyq6tuA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1syjJa-0000000BKo9-1WSz; Thu, 10 Oct 2024 02:54:10 +0000 Received: from nyc.source.kernel.org ([2604:1380:45d1:ec00::3]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1syjIF-0000000BKcD-25Ip; Thu, 10 Oct 2024 02:52:49 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 5FF80A40172; Thu, 10 Oct 2024 02:52:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8D7A2C4CEC3; Thu, 10 Oct 2024 02:52:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1728528765; bh=jNUa/nUADGuQ/kbBLvMP9Cp3on/BTO7uQawWJ3unJ1A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZCZBVcl+KuCpQYVQP1WWm3+CwZaVniAk7FaV/Oydqo5MZ93uX/9kGBRJkCRGinZ3f PKKYPW9VZbCcb/INEzAOZbbHIM4NRkDZUK0p19O+oo/+ZpJ19SU2EhCPxMq2nCrMKa 6J4jODeBZsnnewWKx5Ci8FqiE4LfG/CtjEmWVn4jol6HzznaRD5JvJTSMchajOr6+V lYNCCnp4foTph3fBLxI1HILKPWWmD7i23TtR5wHuYioyUo0Ok5okrlCvgl2bcKhxEs Tp02GoEt7OmSxciunSfLlOP9SbMd77Jt0102+A8VLdl7NkhMhxqWAYJhqp3PCGUhjj dbehRiwJHkbXA== Date: Wed, 9 Oct 2024 21:52:44 -0500 From: Rob Herring To: Andrea della Porta Cc: Michael Turquette , Stephen Boyd , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Broadcom internal kernel review list , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , 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: Re: [PATCH v2 04/14] dt-bindings: misc: Add device specific bindings for RaspberryPi RP1 Message-ID: <20241010025244.GB978628-robh@kernel.org> References: <3141e3e7898c1538ea658487923d3446b3d7fd0c.1728300189.git.andrea.porta@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3141e3e7898c1538ea658487923d3446b3d7fd0c.1728300189.git.andrea.porta@suse.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241009_195247_691999_EF2F00BE X-CRM114-Status: GOOD ( 22.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 On Mon, Oct 07, 2024 at 02:39:47PM +0200, Andrea della Porta wrote: > The RP1 is a MFD that exposes its peripherals through PCI BARs. This > schema is intended as minimal support for the clock generator and > gpio controller peripherals which are accessible through BAR1. > > Signed-off-by: Andrea della Porta > --- > .../devicetree/bindings/misc/pci1de4,1.yaml | 110 ++++++++++++++++++ > MAINTAINERS | 1 + > 2 files changed, 111 insertions(+) > create mode 100644 Documentation/devicetree/bindings/misc/pci1de4,1.yaml > > diff --git a/Documentation/devicetree/bindings/misc/pci1de4,1.yaml b/Documentation/devicetree/bindings/misc/pci1de4,1.yaml > new file mode 100644 > index 000000000000..3f099b16e672 > --- /dev/null > +++ b/Documentation/devicetree/bindings/misc/pci1de4,1.yaml > @@ -0,0 +1,110 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/misc/pci1de4,1.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: RaspberryPi RP1 MFD PCI device > + > +maintainers: > + - Andrea della Porta > + > +description: > + The RaspberryPi RP1 is a PCI multi function device containing > + peripherals ranging from Ethernet to USB controller, I2C, SPI > + and others. > + The peripherals are accessed by addressing the PCI BAR1 region. > + > +allOf: > + - $ref: /schemas/pci/pci-ep-bus.yaml > + > +properties: > + compatible: > + additionalItems: true > + maxItems: 3 > + items: > + - const: pci1de4,1 > + > +patternProperties: > + "^pci-ep-bus@[0-2]$": > + $ref: '#/$defs/bar-bus' > + description: > + The bus on which the peripherals are attached, which is addressable > + through the BAR. No need for this because pci-ep-bus.yaml already has a schema for the child nodes. > + > +unevaluatedProperties: false > + > +$defs: > + bar-bus: > + $ref: /schemas/pci/pci-ep-bus.yaml#/$defs/pci-ep-bus > + unevaluatedProperties: false > + > + properties: > + "#interrupt-cells": > + const: 2 > + description: > + Specifies respectively the interrupt number and flags as defined > + in include/dt-bindings/interrupt-controller/irq.h. > + > + interrupt-controller: true > + > + interrupt-parent: > + description: > + Must be the phandle of this 'pci-ep-bus' node. It will trigger > + PCI interrupts on behalf of peripheral generated interrupts. Do you have an interrupt controller per bus? These should be in the parent node I think. > + > + patternProperties: > + "^clocks(@[0-9a-f]+)?$": > + type: object > + $ref: /schemas/clock/raspberrypi,rp1-clocks.yaml > + > + "^ethernet(@[0-9a-f]+)?$": > + type: object > + $ref: /schemas/net/cdns,macb.yaml > + > + "^pinctrl(@[0-9a-f]+)?$": > + type: object > + $ref: /schemas/pinctrl/raspberrypi,rp1-gpio.yaml IMO, these child nodes can be omitted. We generally don't define all the child nodes in an SoC. If you do want to define them, then just do: additionalProperties: true properties: compatible: contains: the-child-compatible > + > + required: > + - interrupt-parent > + - interrupt-controller > + > +examples: > + - | > + pci { > + #address-cells = <3>; > + #size-cells = <2>; > + > + rp1@0,0 { > + compatible = "pci1de4,1"; > + ranges = <0x01 0x00 0x00000000 > + 0x82010000 0x00 0x00 > + 0x00 0x400000>; > + #address-cells = <3>; > + #size-cells = <2>; > + > + pci_ep_bus: pci-ep-bus@1 { > + compatible = "simple-bus"; > + ranges = <0xc0 0x40000000 > + 0x01 0x00 0x00000000 > + 0x00 0x00400000>; > + dma-ranges = <0x10 0x00000000 > + 0x43000000 0x10 0x00000000 > + 0x10 0x00000000>; > + #address-cells = <2>; > + #size-cells = <2>; > + interrupt-controller; > + interrupt-parent = <&pci_ep_bus>; > + #interrupt-cells = <2>; > + > + rp1_clocks: clocks@c040018000 { > + compatible = "raspberrypi,rp1-clocks"; > + reg = <0xc0 0x40018000 0x0 0x10038>; > + #clock-cells = <1>; > + clocks = <&clk_rp1_xosc>; > + clock-names = "rp1-xosc"; > + }; > + }; > + }; > + }; > diff --git a/MAINTAINERS b/MAINTAINERS > index ccf123b805c8..2aea5a6166bd 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/misc/pci1de4,1.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 > -- > 2.35.3 >