From patchwork Mon Oct 7 12:39:53 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: 13824649 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 9C169CFB43F for ; Mon, 7 Oct 2024 13:05:54 +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=BDBbUzAbVmbfauTgZMPEls+orUZqC1xI/z6QelfsXFI=; b=STDT4xlKyyRz8XiSdnVYVV4OMm GJV/shbf5n1NLI9LXlh/yVSNkTDQqAiXbJYjVmePHfAghLQKcfjTvfNPnGseEm8Mm9A9i4psgyEKa du0g3Pau8P4pA+hu6Za2AtDS2GN0x11r3qJgsGG5oUZ2ou2vdkdpue2drJkitkVxGuM979ikWQIMt U99s1pfa+wQXGxQ/F7aRQtTRtmYWYsahqmv3qTOv9GWFPQ9UAj4JZGZ6IT6A3cavlWxhxnvE3msjA P1+hH56F56PVrh9j5zX6Pmqx12nVqnnEKCergkQjhqX1YTvU1tI+rwhzU6+/iUuBEGQFKosWSR3gn O6JZ2h+g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sxnQi-00000002RPu-2rWs; Mon, 07 Oct 2024 13:05:40 +0000 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sxn1r-00000002McS-3Ia9 for linux-arm-kernel@lists.infradead.org; Mon, 07 Oct 2024 12:40:04 +0000 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-5398996acbeso4698043e87.1 for ; Mon, 07 Oct 2024 05:39:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1728304797; x=1728909597; 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=BDBbUzAbVmbfauTgZMPEls+orUZqC1xI/z6QelfsXFI=; b=N/BwntRkFuPgqYT6dTv0uawDjNnoM3V1akHccdK8aXm0tSnbeO/G5F+52n72mxbv8Z P6IKsPo2nBeFMVaSX5eW0m+sJtE2bZRJegy94xvBM2uLg+RfIG6SEkJBQmjHBRQOGAUP W4irrHQmP/GBR1CjoohjGv4oogPuHrgMl5sVJueYmCg72jqcbqvvv5ncu8ZRSzoi+STI W45out2W3+nymqC2nGp1El+qdVgT9mh5dsHGLODrF4bvixI3LeSewj5RCc6PadGAvUCc J20nq/uWzJOdOghGpfKgnh+Lz7UbqcOB0h65rqdFEjM7SSPme6tYyE6NQkGvXG2yyrJ3 sotA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728304797; x=1728909597; 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=BDBbUzAbVmbfauTgZMPEls+orUZqC1xI/z6QelfsXFI=; b=IeBJ7SDbwWV608Ld76trSfQnE6zwkBz6/r6flHYg2v2Ylb+0EcKXVmg4Vz00kb9LvJ 0emkKURqfmDhBfpbB78z08P/pJELQyfx2liQ5weFuWGXLQfGIJGD3PRJUXeaN8lJzQlK +//C7Un4rMIZfIYE5PRxfzmnFilYBSVpxFaWbnLaG71Ns9sgSPxBVYCXfFKo7YjfXrqm qRuEJAv/ob5BqAm31aI0+XM5ptBMLyHcY+pP56SXEpRxPJM4PpRZo1E5LRJitrFI/H3w fwH+kVqKPl7rcXPF3b4sBenJ3REUNbszPIkPLoHb8/Dbtx2ZF8YGjx5sd2pjsGuqJP9D pTzw== X-Forwarded-Encrypted: i=1; AJvYcCXKgQnpduZOA6pXeX6aQ9UePM8q01jpmPUvSe40LzJg/thWMBdCyeGCitueNzDLfrfE1i7WZ7XIMkDRUiU6zGLp@lists.infradead.org X-Gm-Message-State: AOJu0YxrwdAmhEM8W84r8Y0kio30I3FpHkaVVd363uzEhEmEukOzYEEi ZHSRxIkDsY4Two5g+YfFxgwLwNxHweCxiK0ubbwaL9xAdBpTOOlZjYwOMI7zWKo= X-Google-Smtp-Source: AGHT+IHsa3cuseb+TMLjf68nJZfaXpa4Y/U/qsSRZ8J4Yx8YStwpVyo0ZpW4Nb8/l9tXLVtsADvnlA== X-Received: by 2002:a05:6512:159d:b0:536:53a9:96d5 with SMTP id 2adb3069b0e04-539ab866484mr5107703e87.17.1728304797453; Mon, 07 Oct 2024 05:39:57 -0700 (PDT) Received: from localhost (host-87-21-212-62.retail.telecomitalia.it. [87.21.212.62]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a995350d522sm145624166b.32.2024.10.07.05.39.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Oct 2024 05:39:57 -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 10/14] arm64: dts: rp1: Add support for RaspberryPi's RP1 device Date: Mon, 7 Oct 2024 14:39:53 +0200 Message-ID: <3f6f38c06b065f5f6034ad4ed3a24902ee59f378.1728300190.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_053959_959212_6D4603BC X-CRM114-Status: GOOD ( 18.49 ) 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 RaspberryPi RP1 is a multi function PCI endpoint device that exposes several subperipherals via PCI BAR. Add a dtb overlay that will be compiled into a binary blob and linked in the RP1 driver. This overlay offers just minimal support to represent the RP1 device itself, the sub-peripherals will be added by future patches. Signed-off-by: Andrea della Porta --- NOTE: this patch should be taken by the same maintainer that will take "[PATCH v2 11/14] misc: rp1: RaspberryPi RP1 misc driver", since they are closely related in terms of compiling. MAINTAINERS | 1 + arch/arm64/boot/dts/broadcom/rp1.dtso | 62 +++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 arch/arm64/boot/dts/broadcom/rp1.dtso diff --git a/MAINTAINERS b/MAINTAINERS index 06277969a522..510a071ede78 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -19383,6 +19383,7 @@ F: include/uapi/linux/media/raspberrypi/ RASPBERRY PI RP1 PCI DRIVER M: Andrea della Porta S: Maintained +F: arch/arm64/boot/dts/broadcom/rp1.dtso 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 diff --git a/arch/arm64/boot/dts/broadcom/rp1.dtso b/arch/arm64/boot/dts/broadcom/rp1.dtso new file mode 100644 index 000000000000..846a0c99a098 --- /dev/null +++ b/arch/arm64/boot/dts/broadcom/rp1.dtso @@ -0,0 +1,62 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) + +#include +#include +#include + +/dts-v1/; +/plugin/; + +/ { + fragment@0 { + target-path=""; + __overlay__ { + compatible = "pci1de4,1"; + #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"; + assigned-clocks = <&rp1_clocks RP1_PLL_SYS_CORE>, + <&rp1_clocks RP1_PLL_SYS>, + <&rp1_clocks RP1_CLK_SYS>; + assigned-clock-rates = <1000000000>, // RP1_PLL_SYS_CORE + <200000000>, // RP1_PLL_SYS + <200000000>; // RP1_CLK_SYS + }; + + rp1_gpio: pinctrl@c0400d0000 { + compatible = "raspberrypi,rp1-gpio"; + reg = <0xc0 0x400d0000 0x0 0xc000>, + <0xc0 0x400e0000 0x0 0xc000>, + <0xc0 0x400f0000 0x0 0xc000>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupts = <0 IRQ_TYPE_LEVEL_HIGH>, + <1 IRQ_TYPE_LEVEL_HIGH>, + <2 IRQ_TYPE_LEVEL_HIGH>; + }; + }; + }; + }; +};