From patchwork Mon Oct 7 12:39:47 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: 13824669 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 2772ACFB441 for ; Mon, 7 Oct 2024 13:18:51 +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=eU3ji42pHlrfWJq1prcISuPTGN0LAJnGrZqn8om944U=; b=qbkC7nbrPS13X6n1rnDz5Ldm0p DtT8JTKg1qIC501x8idW1gQZEuEKQm44KunBORC9yBCowUaDhi0pDBEE08wQMmSCQ5oNgy4OdhWeh u5BBqSvjkTOxzkuo64LXziCH9E2BflK+sI2lLwkrazZru6OLLwvNmPfXX/vw6vROonmxg1h+oL26k hLAWpTM/20TOSETExXTnYVxXr5LXhJdLZmUtAPHrDtNZIUBu0LuOpzYGd07x5CgF9htOl5jppladd HiAsssm5yBTFcDeO8n52ysFc+nZEiJys6rM5Ne7ZU0aSnaqOmZiDIEPqHHFfawePvwSXFlj9nVrqY lumJeyJA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sxndI-00000002TrU-0QU3; Mon, 07 Oct 2024 13:18:40 +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-00000002MYn-1nZW for linux-arm-kernel@lists.infradead.org; Mon, 07 Oct 2024 12:39:54 +0000 Received: by mail-ed1-x542.google.com with SMTP id 4fb4d7f45d1cf-5c42f406e29so5867997a12.2 for ; Mon, 07 Oct 2024 05:39:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1728304790; x=1728909590; 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=eU3ji42pHlrfWJq1prcISuPTGN0LAJnGrZqn8om944U=; b=eO4cal9pnaTtk/shftvsapfFEj/fyLcLzoFxv4KBdDErU65deTerz3XmJNIMD6qj5F gS/e+QU5OA4MTKRoWFVsW2r+n6wqT78HoG62M8PZ3dExCnD1j4q4JH6rROOj+MGUXoTD 91I4VV7K0VzzIQzqcAUeQ82+5+2YRwcO2I0aBVmMSyrePSwCrJVXwdSPt8F9hAoZLjAK OAqBfo0rYzuz1/U5o4H5jYMQY74lYCVY5S7qf9Pg9JYHuM53qqpfbN0rKzQhp6P2l3iu 2uNbSPKX+7E0nwZEgn8znfkFDhTKejQY3Ejr4m0mDWvRyiP6pbhDjmmVrVcv12LCkkHI dnjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728304790; x=1728909590; 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=eU3ji42pHlrfWJq1prcISuPTGN0LAJnGrZqn8om944U=; b=jb6a7y1nBbSa0/9opoNxI+pXrn3TNtV2b2IlDI61iywfWQ0X+f3YuZYtIGCeKefzck FcdNla/KZn1vzEXf/DFB6ehBXk9HH8vrosFUPMzO3YBoK7IpNZuM1oUV6sh2shDm/vEe gyotNbmnyETMPAp7cOsP/VbCe5Ucd6eFUqgpTMFWGLE7DEtpY+GRNMsxH/g/mbnPEZZN noZ+TSJOyrhjd+I4sh3ZrovepxsRasYqcV8DutHO+clpRl9gGKJEdDnNlDRVt5Jbehr/ 7a06NkEemvfCKMvlIt55fTPTcR80wyPZbFNnJ9Jw40Kr/6TP+CpSYnhf8NijlaHpZnTF Xs9Q== X-Forwarded-Encrypted: i=1; AJvYcCUAVrqYAFwSEuYElqYe9bzBk8RSbSQUwpY/YhhY/RTgaTOpj7wHYfKMbyDi7JtQJb0ykfovzo13iLpu+9V13jBr@lists.infradead.org X-Gm-Message-State: AOJu0Ywb0xTV+YZTrzF3qZoBVWso4VFXCLozAd+QmVxbJeKikVOGuVx9 4FD+N6p+scYJ97wllietWSMcPt87Gn4R+jhOSJHf3/rhYnhNQYBMBP0KWFEXy5Y= X-Google-Smtp-Source: AGHT+IGYdZc/ujfTjPKKP+5yoVqaatgPK8/RvNoAMYBcHf4RI2gthY/T+ULNWJG+Qr9qq+CZHwh19w== X-Received: by 2002:a05:6402:4404:b0:5c8:9548:f283 with SMTP id 4fb4d7f45d1cf-5c8d2e4571fmr10385444a12.20.1728304789894; Mon, 07 Oct 2024 05:39:49 -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-5c8e0598947sm3101345a12.11.2024.10.07.05.39.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Oct 2024 05:39:49 -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 04/14] dt-bindings: misc: Add device specific bindings for RaspberryPi RP1 Date: Mon, 7 Oct 2024 14:39:47 +0200 Message-ID: <3141e3e7898c1538ea658487923d3446b3d7fd0c.1728300189.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-20241007_053951_653072_56FA1D2E X-CRM114-Status: GOOD ( 17.56 ) 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 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. + +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]+)?$": + 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 + + 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