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 932C9C83030 for ; Fri, 4 Jul 2025 07:07:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=NjO0SXDLtxgbumkFCHg+grExc/Ae2BSmMXSYnLR3ais=; b=dYLNRIRyoElfhQ mx5uvJvKhzLJkZnWTY017x4unVpI6s9n16mPsiPW9u2R4TpO0LjI+p4dBYkLbjVALiB5V4Px6f1n7 IUbWKyIQIvH7ogetsDYkub/d5faMKkUBlvOx4VL9PLJn7va6HkonTdOJKp7O32TC3zkask19eCEKC It+VlmTtQew24pklSkHqO2ruu+XBf5dbW+3uaYuwvrNYZ9RL2hQ+Ji8W8iGmk/yIxopKtB7MjtKB4 /eMoxShLZQ9FqaM7EFmBFuck8JcI8z/M/po/WktEIMLTJ/M4cETav5P5GxSgZ1wbqXR3a9/G9exqb b3lsDwjSFqEwqi9bEErA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uXaVu-0000000DUqR-0WrO; Fri, 04 Jul 2025 07:07:14 +0000 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uXaT4-0000000DUCz-0i2M for linux-riscv@lists.infradead.org; Fri, 04 Jul 2025 07:04:19 +0000 Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-23aeac7d77aso6740405ad.3 for ; Fri, 04 Jul 2025 00:04:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1751612657; x=1752217457; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=rNV4yYQMrOJDAS1UrXmWT/jHR79hA6tazWjsnWTTuMk=; b=COVTBNBi/AiwQ4DNQm9G90mnCmEHMUQ4utbgh/D4/onC19IurLLvlWns9SkbCrhZEl mNLR17rQxw6/76SaAp25a4B2EHj15zL3Sf37S37+LURphresI+10NWX17D8Hrfbh/0Lb YnWJznE5H1or/zudmcRWjxUmM6yY9wG0n7mj275NKYvtIdzQGDa165pNn1XOFzSfu4cE jzexV09FNQLK4g+ji18dpYlZT+LauEZVj89L1iNzz7Np9IqJDb8IjlN2InI6NdMIC4j0 SofH9Lgsuk48ypPtzzAS/3Nm2v+JsQu/tPTzS/6lH/t11J864euGVi0ZagfgKqwhzu8k 63ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751612657; x=1752217457; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=rNV4yYQMrOJDAS1UrXmWT/jHR79hA6tazWjsnWTTuMk=; b=pE17uBQd5yzX8fk5vdgr2fOS2c7asdMVgEUMCQfbRdkZQ2jSeQpxFdKicRQJ569Jv5 HObXqR8FRWkf/20PaaVaXko6QkXPOamNBiMF7FIWFYH8vAepaOEe769WX/xgIEr8CEqS djxJFyRYXRCgAIYbMNQ/OtDUJNu5TVr5hnUPgnD0Ebskz4W61eggL1Nf3auqL5xgp+km QppOuM0qNqM8G2Ac/hq4WmBxZimuTtwFiudBeCtP/EuDOng6Zrdlnksfs3AFM7GJ/bK1 B/g4tgAp3kjbzvEyqvMufA2FcU2FlQYVHA/EhgVFImcdCCFpIDW6ZspPs8MsogZvNwlz u/hA== X-Forwarded-Encrypted: i=1; AJvYcCXTeoSMyVHt8r+Y0l59jtiFdzkJSjtmKnHMQ9ZJfMofsGrNSCqzmnPBVhD4qRPSyIGUx5LHCuvxM9/DZQ==@lists.infradead.org X-Gm-Message-State: AOJu0Yzet4OE5isNkrT/zGB0fpoWuxYQXe4T7zcY5qaKmuLS0P3dshry PUtiFXtfvw7yRiU6g3HAXH3rOvoOd+OU3ZlbhNFg3GqN/LDbyhHwOsX3ttgUzO/fGaM= X-Gm-Gg: ASbGncteSpyvO9u4I7nImLvLVuE6M6zkTkWU1CsmcLPswmMHlXLwcDczBZdr8qw2HHQ ewMJUIFiEId7Sl881JtukS1eDfXOHseIzF4ijV+TuKarupJ3nqls8VD4jhCmqy+C2H1yickY8ib FPq+GGxppqkAHPhp+GZ7Ei7mohy/UXYqevP07JzEM6Q3GknDQ/nCt9ixKbN6gCVaOieEGhItTTk pm6sk83EDGFUXoZodhM5jd3ZNv9wK44izkzRLYc6ne8VWjeiU5VppQItPYxSU+LT3trJcOXzOEC ke26FdBPM0NUr4g4ZhwCt2wz5U13hZCJ6gLZaDGmM3rwMqZQhAhXx34P5TSSegHe6eJLNkyol+W GXtgf7LsF5YCT/CPlkpZNstRfWA== X-Google-Smtp-Source: AGHT+IE6Selq5x5dbP8GjsTtUsdcC1T2xdo7xnrlnnZL2hnwCQn7lKmnlLU2hnm1nIy+2TTjIKdA+Q== X-Received: by 2002:a17:903:32c1:b0:235:e8da:8d6 with SMTP id d9443c01a7336-23c8609bfe2mr29264605ad.2.1751612657098; Fri, 04 Jul 2025 00:04:17 -0700 (PDT) Received: from anup-ubuntu-vm.localdomain ([103.97.166.196]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-31aaae59a93sm1358697a91.12.2025.07.04.00.04.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Jul 2025 00:04:16 -0700 (PDT) From: Anup Patel To: Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jassi Brar , Thomas Gleixner , "Rafael J . Wysocki" , Mika Westerberg , Andy Shevchenko , Linus Walleij , Bartosz Golaszewski , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Subject: [PATCH v8 00/24] Linux SBI MPXY and RPMI drivers Date: Fri, 4 Jul 2025 12:33:32 +0530 Message-ID: <20250704070356.1683992-1-apatel@ventanamicro.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250704_000418_210629_C93EBBFC X-CRM114-Status: GOOD ( 18.99 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Anup Patel , devicetree@vger.kernel.org, Andrew Jones , Alexandre Ghiti , Atish Patra , Leyfoon Tan , Anup Patel , linux-kernel@vger.kernel.org, Samuel Holland , linux-acpi@vger.kernel.org, Palmer Dabbelt , Paul Walmsley , linux-riscv@lists.infradead.org, Len Brown , linux-clk@vger.kernel.org, Rahul Pathak Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org The SBI v3.0 (MPXY extension) [1] and RPMI v1.0 [2] specifications are frozen and finished public review at the RISC-V International. Currently, most of the RPMI and MPXY drivers are in OpenSBI whereas Linux only has SBI MPXY mailbox controller driver, RPMI clock driver and RPMI system MSI driver This series also includes ACPI support for SBI MPXY mailbox controller and RPMI system MSI drivers. These patches can be found in the riscv_sbi_mpxy_mailbox_v8 branch at: https://github.com/avpatel/linux.git To test these patches, boot Linux on "virt,rpmi=on,aia=aplic-imsic" machine with OpenSBI and QEMU from the dev-upstream branch at: https://github.com/ventanamicro/opensbi.git https://github.com/ventanamicro/qemu.git [1] https://github.com/riscv-non-isa/riscv-sbi-doc/releases [2] https://github.com/riscv-non-isa/riscv-rpmi/releases Changes since v7: - Addressed comments on PATCH3, PATCH7, PATCH10, PATCH14, and PATCH21 Changes since v6: - Rebased the series on Linux-6.16-rc4 - Added Stephen's Reviewed-by in appropriate patches - Addressed Andy's comments on PATCH5, PATCH6, PATCH9, and PATCH14 - New PATCH6 in this series which is factored-out from PATCH7 Changes since v5: - Rebased the series on Linux-6.16-rc2 - Added Conor's Reviewed-by in all DT binding patches - Addressed Andy's comments on PATCH5 - Addressed Tglx's comments on PATCH12 and PATCH21 Changes since v4: - Rebased the series on Linux-6.16-rc1 - Dropped PATCH1 since a similar change is already merged https://lore.kernel.org/linux-riscv/20250523101932.1594077-4-cleger@rivosinc.com/ - Addressed Andy's comments on PATCH4, PATCH5, PATCH6, PATCH7, PATCH13, and PATCH17 - Addressed Atish's comments on PATCH11 and PATCH12 - Addressed Conor's comments on PATCH9 Changes since v3: - Rebased the series on Linux-6.15-rc7 - Updated PATCH2 DT bindings as-per Rob's suggestion - Improved request_threaded_irq() usage in PATCH7 - Updated PATCH10 clk-rpmi driver as-per commments from Andy - Updated PATCH13 irq-riscv-rpmi-sysmsi driver as-per comments from Andy and Tglx - Addressed ACPI related comments in PATCH14, PATCH15, PATCH18, PATCH20 and PATCH21 Changes since v2: - Dropped the "RFC" tag from series since the SBI v3.0 and RPMI v1.0 specifications are now frozen - Rebased the series on Linux-6.15-rc5 - Split PATCH8 of v2 into two patches adding separate DT bindings for "riscv,rpmi-mpxy-clock" and "riscv,rpmi-clock" - Split PATCH10 of v2 into two patches adding separate DT bindings for "riscv,rpmi-mpxy-system-msi" and "riscv,rpmi-system-msi" - Addressed comments from TGLX on PATCH11 of v2 adding irqchip driver for RPMI system MSI - Addressed ACPI related comments in PATCH15 and PATCH16 of v2 - New PATCH17 and PATCH18 in this series Changes since v1: - Addressed DT bindings related comments in PATCH2, PATCH3, and PATCH7 of v1 series - Addressed comments in PATCH6 and PATCH8 of v1 series - New PATCH6 in v2 series to allow fwnode based mailbox channel request - New PATCH10 and PATCH11 to add RPMI system MSI based interrupt controller driver - New PATCH12 to PATCH16 which adds ACPI support in SBI MPXY mailbox driver and RPMI system MSI driver - New PATCH17 to enable required kconfig option to allow graceful shutdown on QEMU virt machine Anup Patel (14): dt-bindings: mailbox: Add bindings for RPMI shared memory transport dt-bindings: mailbox: Add bindings for RISC-V SBI MPXY extension RISC-V: Add defines for the SBI message proxy extension mailbox: Add common header for RPMI messages sent via mailbox mailbox: Allow controller specific mapping using fwnode byteorder: Add memcpy_to_le32() and memcpy_from_le32() mailbox: Add RISC-V SBI message proxy (MPXY) based mailbox driver dt-bindings: clock: Add RPMI clock service message proxy bindings dt-bindings: clock: Add RPMI clock service controller bindings dt-bindings: Add RPMI system MSI message proxy bindings dt-bindings: Add RPMI system MSI interrupt controller bindings irqchip: Add driver for the RPMI system MSI service group RISC-V: Enable GPIO keyboard and event device in RV64 defconfig MAINTAINERS: Add entry for RISC-V RPMI and MPXY drivers Rahul Pathak (1): clk: Add clock driver for the RISC-V RPMI clock service group Sunil V L (9): ACPI: property: Refactor acpi_fwnode_get_reference_args() to support nargs_prop ACPI: Add support for nargs_prop in acpi_fwnode_get_reference_args() ACPI: scan: Update honor list for RPMI System MSI ACPI: RISC-V: Create interrupt controller list in sorted order ACPI: RISC-V: Add support to update gsi range ACPI: RISC-V: Add RPMI System MSI to GSI mapping irqchip/irq-riscv-imsic-early: Export imsic_acpi_get_fwnode() mailbox/riscv-sbi-mpxy: Add ACPI support irqchip/riscv-rpmi-sysmsi: Add ACPI support .../bindings/clock/riscv,rpmi-clock.yaml | 64 ++ .../bindings/clock/riscv,rpmi-mpxy-clock.yaml | 64 ++ .../riscv,rpmi-mpxy-system-msi.yaml | 67 ++ .../riscv,rpmi-system-msi.yaml | 74 ++ .../mailbox/riscv,rpmi-shmem-mbox.yaml | 124 ++ .../bindings/mailbox/riscv,sbi-mpxy-mbox.yaml | 51 + MAINTAINERS | 15 + arch/riscv/configs/defconfig | 2 + arch/riscv/include/asm/irq.h | 6 + arch/riscv/include/asm/sbi.h | 63 + drivers/acpi/property.c | 128 ++- drivers/acpi/riscv/irq.c | 75 +- drivers/acpi/scan.c | 2 + drivers/base/property.c | 2 +- drivers/clk/Kconfig | 8 + drivers/clk/Makefile | 1 + drivers/clk/clk-rpmi.c | 616 ++++++++++ drivers/irqchip/Kconfig | 7 + drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-riscv-imsic-early.c | 2 + drivers/irqchip/irq-riscv-rpmi-sysmsi.c | 328 ++++++ drivers/mailbox/Kconfig | 11 + drivers/mailbox/Makefile | 2 + drivers/mailbox/mailbox.c | 65 +- drivers/mailbox/riscv-sbi-mpxy-mbox.c | 1017 +++++++++++++++++ include/linux/byteorder/generic.h | 16 + include/linux/mailbox/riscv-rpmi-message.h | 243 ++++ include/linux/mailbox_controller.h | 3 + include/linux/wordpart.h | 16 + 29 files changed, 2990 insertions(+), 83 deletions(-) create mode 100644 Documentation/devicetree/bindings/clock/riscv,rpmi-clock.yaml create mode 100644 Documentation/devicetree/bindings/clock/riscv,rpmi-mpxy-clock.yaml create mode 100644 Documentation/devicetree/bindings/interrupt-controller/riscv,rpmi-mpxy-system-msi.yaml create mode 100644 Documentation/devicetree/bindings/interrupt-controller/riscv,rpmi-system-msi.yaml create mode 100644 Documentation/devicetree/bindings/mailbox/riscv,rpmi-shmem-mbox.yaml create mode 100644 Documentation/devicetree/bindings/mailbox/riscv,sbi-mpxy-mbox.yaml create mode 100644 drivers/clk/clk-rpmi.c create mode 100644 drivers/irqchip/irq-riscv-rpmi-sysmsi.c create mode 100644 drivers/mailbox/riscv-sbi-mpxy-mbox.c create mode 100644 include/linux/mailbox/riscv-rpmi-message.h -- 2.43.0 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv