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 E5E80D0E6FC for ; Tue, 22 Oct 2024 11:30:52 +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:Date:From: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=tse3WFb+Cqy4NQjY2x57/IK1kjaHJljLdncZwV39uDw=; b=f4TS4xWjbaIxqtOM7+eHC8xsDL AfNM3cjxPxnRxn0FGSS74AvfCtP3tGgcElpfsagUx4yfFp8lEcofAOvxgArS0bWJe/npQ07dQq3yg wIoxVzVFh39q32joBP6VsQb+sL5uwbwb0Ju1xfb/SDlqN+nc8hh/jIfr9uxKVTC0HWt72ONw+QesZ r9Ld1ZgWxyozDvVTQ7b+IbPwj7FdVZX2R6+Z1oDYzsvPLoC7KBbnyhwzY0WEmEuQK2mhvW4m+TthU 6daQ25iWUs/lngJBqd2vLDL747GhrTzynq2F6887GBfIDOlsX1aDY7rlsPlfDmGhIplXJuBdLCJ0J AB3epgeA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t3D5z-0000000AhMR-1Tzg; Tue, 22 Oct 2024 11:30:39 +0000 Received: from mail-ed1-x541.google.com ([2a00:1450:4864:20::541]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t3Bg9-0000000ASLM-0ESq for linux-arm-kernel@lists.infradead.org; Tue, 22 Oct 2024 09:59:54 +0000 Received: by mail-ed1-x541.google.com with SMTP id 4fb4d7f45d1cf-5c9428152c0so7224890a12.1 for ; Tue, 22 Oct 2024 02:59:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1729591191; x=1730195991; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:from:to:cc:subject:date:message-id:reply-to; bh=tse3WFb+Cqy4NQjY2x57/IK1kjaHJljLdncZwV39uDw=; b=gGN/KZ/0X42ecmHvHDs7XvF422Qwfr3hHPR+p1+JK4i07FFwgL/gQbMgxxA+yafIkv Pd5iMcXIiqUxqwv8VIYJg4+uNqOgP/+3EV97O4KhUo1y4iq4vXpfA2SU7oyeuBkfU/Ev TUIwMOcSg6GWHpXfQ55mit7Enui8+60THUFcY7VBwYzGQt4gikBGb7G3Rpa7ggBZBFCZ W+Wc9UPFVoNCJr5szTMVvIaaWkfwiUZi7V/ABA7ZNUdAn3snqYPqB+1XFntwAexKEJij /MYOy9nmOTjxolpwxAjpb9jjXYDHC+hBfoGmgIoNtbJDjzZMtwaM0XJebuleUH0f4QdP bOTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729591191; x=1730195991; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=tse3WFb+Cqy4NQjY2x57/IK1kjaHJljLdncZwV39uDw=; b=RvXNCdN/rsauz2+tFrVhllGmNw+TFGQ+TZ6WD8fs7ZfT6jCTMWswQPnGaJvQP3FoZr d2hgXu1gHbDamMsvUtGSnAOgnftCTPTlHgOrCnysteN4hgUh0Nlla11nEXl/qI7FSMas utkeTv3D9NY46WwfPmHlSGUmodlAwi8d71DZVi8cleCQOieNviEG/MgxrYWOtPYtodFE yOJV+a7md6QUi3Bz8MbK9P5H80ocChe54wW24g0tQ7HxBzELFK8gate+XCx23tRbw1YH gb7DMQr8JU41W+Tf5cdkT4aRFXeK6qqF46SXsjSvHLbMSeU713Vy+lLW+8ntc9Vrhsqw Agaw== X-Forwarded-Encrypted: i=1; AJvYcCUrgfg9M2SKdNYSUpYLCmVBVRy5zxp1/nzcng7TlZysiS5g7FD9Lk+aym6oGkCG7tLWGMd75MiXMFoUzyw6l2+C@lists.infradead.org X-Gm-Message-State: AOJu0YzCteaWE/8vaZmQ6c5A2kF3CE1+1w9UgwzXTMgxR7YJwI2yxs9q cNXL9x46tpMKTaeMzBEtHPBguU6WdSXUq386LhTL1bBE23+zEpv+dpUM6a4qPmw= X-Google-Smtp-Source: AGHT+IGsNax4L/Gs6SdwZlVryK8Odsx0A/4SKDkH5jIR6gUFIIm5jqy15/Lspkq6C28pNgM1cfZgyA== X-Received: by 2002:a17:907:7b92:b0:a9a:420:8472 with SMTP id a640c23a62f3a-a9a69ca04e3mr1598636166b.42.1729591190900; Tue, 22 Oct 2024 02:59:50 -0700 (PDT) Received: from localhost (host-95-239-0-46.retail.telecomitalia.it. [95.239.0.46]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9a912d8381sm313843166b.45.2024.10.22.02.59.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2024 02:59:50 -0700 (PDT) From: Andrea della Porta X-Google-Original-From: Andrea della Porta Date: Tue, 22 Oct 2024 12:00:12 +0200 To: Krzysztof Kozlowski Cc: Andrea della Porta , Michael Turquette , Stephen Boyd , Rob Herring , 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: 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: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241022_025953_107245_0FA4ACBC X-CRM114-Status: GOOD ( 27.95 ) 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 Hi Krzysztof, On 08:26 Tue 08 Oct , Krzysztof Kozlowski wrote: > 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 > > Why is this true? This is final schema, not a "common" part. The 'compatible' property I've specified in rp1.dtso is not strictly necessary since it will be added automatically during the dynamic device node creation by the OF subsystem, and will be something like this: "pci1de4,1", "pciclass,0200000", "pciclass,0200" I've redefined simply as "pci1de4,1" in the dtso so it can be validated against the relative binding schema, and I opted for a shorter name since the RP1 is not really a simple ethernet controller as advertised by the config space (pciclass=2). The schema definition allows for the "relaxed" extended version, shoudl someone want to use it for resemblance with the dynamically create compatibel string. > > > + 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. > > + > > +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. > > + > > + patternProperties: > > + "^clocks(@[0-9a-f]+)?$": > > Why @ is optional? Your device is fixed, not flexible. Right. Many thanks, Andrea > > Best regards, > Krzysztof >