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 02D91C61DCB for ; Sat, 29 Aug 2026 20:56: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: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :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=1rknx9zTe/A8zDAdejyxuOyd0wwvNZeOv6R2AMj1TuI=; b=mJCjIrlQHj2qdw V6YDaDeSa3dGyal0WVTHRX72jlkobCzOUU1pBmcZz0BY+SxYNnfHmSSFTfyjj7TdMItXev/IXELKM aiEoOwLifUJRzc/8OcjlQx1luhEpEnUJseSb/Ih0SVKvRVzYkXb69FxagRlym0KKgwfI9OeDidV5g A1n/9FbuZS8oCy0hzn20ZlsehitIna9DVFPf55UFHUrVLd90TzG94a2I5o2rle2ou5I2ry8dGpZ3M vBeh5+yvPIjgQDiEpv6Lp3rDLg6XWm14Qk+fV/VdFns5Imwn/jaLP2L3gVZm1U7RnqbLsTsgWQwn7 OrB/V8EQx92dPP62a0oA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1x0Q6Q-00000007Jt1-3wGw; Sat, 29 Aug 2026 20:56:38 +0000 Received: from mail-bjschn02on2093.outbound.protection.partner.outlook.cn ([139.219.17.93] helo=CHN02-BJS-obe.outbound.protection.partner.outlook.cn) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1x0Q6O-00000007JsK-0FKV for linux-riscv@lists.infradead.org; Sat, 29 Aug 2026 20:56:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jaCbOhivUIcLCgvxF9vEMJ9CJAWRoMPuGqjVOERMAQkh7JQ3rKgewXrj6LTTueiN2qAkIK3ukyJUQsiFST4Lm12b8j8pPz68VIIO2smRJGJ6e/RmqYbFxvd3/MF+sLlCf9NzrDphi5D9S3Zh80M/EphgGMLcfulr+mQfdDYg50+IDTqLtHjCUOwH4fIoYjhbx07LtGaXIsQfiQihBFqKhzci7xCbzNCexcZI5ZcxSNPBCFXmSSAYsf4jiwrLLW/9y9PpM9vQCBnpLTeF02XnnvSqxTqqf6C6kDrRLbwmEqlY9JpFd0IyEkoA5Qow9OfRmBO7/ssUBS7KywSnhwld3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=M9g1i6iTFbZ+gpnieiWQgYULXeGpVwZmdfuT/028Ql8=; b=YPp6BEa1qdF+et4nblwGZrzVg5Fk5d/hX6QmNqHpxRjG/jzI1V7fhDfJpriZOY+tErMLkFlvhyibvdXojE36kxrjSZZW3SeBGH81uFcVRJ+pOUd62SqE9ZYZ+4LHRwHjQzxk/bTzbmkw46P+roaHlWSmT+RoYiQbcYHLTlFJsHMVZ9a24qIONcBgqTVv5Go5s+bzWRqdniuGpdaScWEvdF24sg9FAjxApszcqY7IiHNm0RScmDOfRIMSPTBZn5cs1FN5ZeFbkRhvjHiWA7b84RrZg3J1FWYzUrV0qPJCyaOsuZILef9Bpg21V4IAKMk/DJyPWFDGhyQzeiLhS5KfBA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=starfivetech.com; dmarc=pass action=none header.from=starfivetech.com; dkim=pass header.d=starfivetech.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=starfivetech.com; Received: from BJXPR01MB0838.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:1b::23) by BJXPR01MB0709.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:1b::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.315.12; Sat, 29 Aug 2026 20:56:18 +0000 Received: from BJXPR01MB0838.CHNPR01.prod.partner.outlook.cn ([fe80::e644:7bf5:5a3c:e548]) by BJXPR01MB0838.CHNPR01.prod.partner.outlook.cn ([fe80::e644:7bf5:5a3c:e548%3]) with mapi id 15.21.0315.011; Sat, 29 Aug 2026 20:56:17 +0000 From: Joshua Yeong To: rahul@summations.net, anup@brainfault.org, lftan.linux@gmail.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, ulfh@kernel.org, pjw@kernel.org, palmer@dabbelt.com, aou@eecs.berkeley.edu Cc: alex@ghiti.fr, joshua.yeong@starfivetech.com, linux-riscv@lists.infradead.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/2] Add RISC-V RPMI device power service support Date: Sun, 30 Aug 2026 04:55:17 +0800 Message-ID: <20260829205520.1691-1-joshua.yeong@starfivetech.com> X-Mailer: git-send-email 2.43.0 X-ClientProxiedBy: BJXPR01CA0062.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:12::29) To BJXPR01MB0838.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:1b::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BJXPR01MB0838:EE_|BJXPR01MB0709:EE_ X-MS-Office365-Filtering-Correlation-Id: 4a1ff247-8f1b-4012-9d38-08df060ff895 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|23010399003|1800799024|7416014|376014|366016|18002099003|56012099006|10067099003|3023799007|38350700014|6133799003|921020; X-Microsoft-Antispam-Message-Info: y5oABsVmHsj7QuRjEk5Bi5PSIzIKEOhM4RKB2K9UQo8azxMh1Mr9Mm4X1nBDWtmFOladG2Z9PbCIP+0ZjHdL8NkCqkVQCkOvh12AjRb8f9ju1r0DwxVbbmjGTjxPgMIbV0+81zSrZNXJzHWKrqVcO9e5rW2IYnUKeFZXgwjuqz/b6Aik/Yska/MOuEyTisX6FwcGjuKsiJP8XX6ww3IDIlvmkxUL7QnyL2RyDuyK9kaZJkQlbefGy35YWAGaTTClSs5yPLyqH4AV4qz78eetinCv9LzhD0FR7p0ynWrc7NgLyX7i6XFe2bjfTzjbDO1AScaorxCFr/rYgllRbwnFsuaj9mjR3rDXZkuX7SQ21iGj5enJpeJ7ZFSWxR19P3vkPllwTJS3Dp4QNiLYi09qKySBSQriFM0RbdozL5M1O1XuDEFI/QvV+1wIPpc0TY1v1bV89NdQVV5DiOxm41Was2cXwAVe+8Jzd/2q2D3Yf/GRxClXlNtH8b5uTBnLQsgzzc2pH9f22xrar0TX2NYxBJOWtk6lIRtIu3olTrq8VcU53taI/36nv0XSr+F3LRP85zTR1XRbEtUHVNMp4Yh82A== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BJXPR01MB0838.CHNPR01.prod.partner.outlook.cn;PTR:;CAT:NONE;SFS:(13230040)(52116014)(23010399003)(1800799024)(7416014)(376014)(366016)(18002099003)(56012099006)(10067099003)(3023799007)(38350700014)(6133799003)(921020);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?I38AFtD0LaL7nDffBVMCz5S8NS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us-ascii?Q?MC7kikFzkDX6Gp6Htv7aUs0QGX0O3MM9hiNnLAAX0zx/mRYq4xWjUnmy2FCm?= =?us-ascii?Q?zFSDlmVvv7hHINN5Gvde+0zYbnFNhptrFTQAKx5Pov13919sZpY2EIrdf9Pn?= =?us-ascii?Q?jtDGIi8IEIhynJuGANLnP9QhKH1wcqaMeuFjrKw3aUv86xeYISiyLG1q4jV+?= =?us-ascii?Q?+cT/QqjVG8HMEeqFU41v6DJ3GLsAdHRjhFZo2hxs/e44NYv1xbQk2ehTpj5x?= =?us-ascii?Q?WE3EE54s8YyO2fbicmQh+nJ4GYg/i4vubtgqq3mU6/p7WXlxeHYS7vEDWrol?= =?us-ascii?Q?EfBwghSjCMLg3Fqn18MShvX16QgGEgbLyPpvEQrYNfU5uD0MJunUnL9O5zTi?= =?us-ascii?Q?ND4iCM+pzvgAvh+lntyERvkADUin3Xu8ws8F3TrkIPeoegBm7NczmhvZtygz?= =?us-ascii?Q?DJEFVmyom6S7adZuDqNmwuPAjtgqKcGuUfJfp8voqg5owYebLdoOC0raVuTi?= =?us-ascii?Q?IW3xSMg9uMPkcBXG8dtISNvdrgLJR0heQk0UBOkMY3gxl9GvNN6rjzT7CoPK?= =?us-ascii?Q?HH6U6n0oMz18PL/r1d/Llt6RtG9Ii6lLsIgldxUoBKeiduGVydT+rN499uBj?= =?us-ascii?Q?GgPk0G3sS+0+p7W0lKLvRG9uysU+AUdgNeipLvobwI5cirEFoKVH7Cazq8YU?= =?us-ascii?Q?Ae2dij4pEi9EdghWiT8q2t5ZtloAUeoGOB2vgdfRH5H2XckWFijI9bTLPAV7?= =?us-ascii?Q?WGH51MUUndmI92o2V/m3JkpwVpUn8xz/LOmabpMAx8fMVVPFOuhFVHKfqRfV?= =?us-ascii?Q?oZk2Ta42z3MNTZoJf/j1FSMQA8w7RbrQaHDOXPAm/4cYDNk//04w5LsSHcRx?= =?us-ascii?Q?dni28js0326+lJqSDTLr6vg3IYN5bxI=3D?= X-OriginatorOrg: starfivetech.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4a1ff247-8f1b-4012-9d38-08df060ff895 X-MS-Exchange-CrossTenant-AuthSource: BJXPR01MB0838.CHNPR01.prod.partner.outlook.cn X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2026 20:56:17.7641 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 06fe3fa3-1221-43d3-861b-5a4ee687a85c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: HnH/lc9gFpJZEAnKk8JZlLMDylbj6OZ2SCgYwnwjH2l50APuBf8jBs5P84A9+cZrsZdd0khuKIS0Kt5pYiqZ/md/RjNjyKCPiqNnjWiHSuI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BJXPR01MB0709 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260829_135636_101797_7DFA9E7D X-CRM114-Status: UNSURE ( 9.09 ) X-CRM114-Notice: Please train this message. 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: , 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 RISC-V Platform Management Interface (RPMI) specification defines a modular and extensible messaging protocol between the supervisor software and a platform microcontroller (PuC). Among the service groups it defines is the device power service group (service group ID 0x00009), which allows the supervisor to enumerate the power domains of platform devices managed by the PuC, query their attributes, and get/set their power state. This series adds supervisor-side support for that service group: - DT bindings for the power domain controller exposed to the supervisor ("riscv,rpmi-device-power") and for the SBI MPXY channel that the SBI implementation uses to expose the service group to the supervisor ("riscv,rpmi-mpxy-device-power"). - A generic power domain (genpd) provider driver under drivers/pmdomain/riscv/ which talks to the PuC over an SBI MPXY mailbox channel. At probe it queries GET_NUM_DOMAINS, then for each domain queries GET_ATTRS for the name and transition latency and GET_STATE for the initial state, and registers the whole set as a onecell genpd provider. Domain power on/off is driven through SET_STATE with the generic ON/OFF power state parameters, so devices can simply reference a domain through the "power-domains" property. The series is based on the existing RISC-V RPMI/MPXY infrastructure already present in the tree (drivers/mailbox/riscv-sbi-mpxy-mbox.c and include/linux/mailbox/riscv-rpmi-message.h), and only adds the device power service group definitions on top of it. Testing ======= The series was tested under QEMU with the RPMI device power service implemented in firmware. Components: - OpenSBI: latest master branch https://github.com/riscv-software-src/opensbi - QEMU: the RPMI-enabled tree at https://github.com/yeongjoshua/qemu/tree/rpmi-v11.1.0 Kernel config: enable CONFIG_RISCV_RPMI_DEVICE_POWER (default y on RISC-V when MAILBOX is enabled) along with the SBI MPXY mailbox driver. Run with: qemu-system-riscv64 \ -M virt -m 2G -smp 4 \ -bios fw_dynamic.bin \ -kernel Image \ -M rpmi=true \ -nographic \ -initrd rootfs-busybox.cpio \ -append "root=/dev/ram rw console=ttyS0,115200 no_console_suspend mem=2048M earlycon=uart8250,mmio,0x10000000" The RPMI device power domains advertised by the emulated platform microcontroller show up as generic power domains and can be inspected through /sys/kernel/debug/pm_genpd/. -- 2.43.0 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv