lib: utils/mpxy: Add RPMI MPXY driver for logging service group

Add RPMI MPXY proxy driver for LOGGING service group so that
S-mode can leverage LOGGING service group implemented by the
platform microcontroller.

Reviewed-by: Rahul Pathak <rahul.pathak@oss.qualcomm.com>
Signed-off-by: Subrahmanya Lingappa <subrahmanya.lingappa@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260619103424.990954-1-subrahmanya.lingappa@oss.qualcomm.com
Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Subrahmanya Lingappa
2026-06-19 16:04:24 +05:30
committed by Anup Patel
parent cbf9f6734d
commit 262571217c
5 changed files with 78 additions and 0 deletions
+4
View File
@@ -18,6 +18,10 @@ config FDT_MPXY_RPMI_CLOCK
bool "MPXY driver for RPMI clock service group"
default n
config FDT_MPXY_RPMI_LOGGING
bool "MPXY driver for RPMI logging service group"
default n
config FDT_MPXY_RPMI_SYSMSI
bool "MPXY driver for RPMI system MSI service group"
default n
+51
View File
@@ -0,0 +1,51 @@
/*
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2026 Qualcomm, Inc
*
* Authors:
* Subrahmanya Lingappa <subrahmanya.lingappa@oss.qualcomm.com>
*/
#include <sbi_utils/mpxy/fdt_mpxy_rpmi_mbox.h>
static struct mpxy_rpmi_service_data logging_services[] = {
[0] = {
.id = RPMI_MM_SRV_ENABLE_NOTIFICATION,
.min_tx_len = sizeof(struct rpmi_enable_notification_req),
.max_tx_len = sizeof(struct rpmi_enable_notification_req),
.min_rx_len = sizeof(struct rpmi_enable_notification_resp),
.max_rx_len = sizeof(struct rpmi_enable_notification_resp),
},
[1] = {
.id = RPMI_LOGGING_SRV_LOG_DATA,
.min_tx_len = sizeof(u32) * 2,
.max_tx_len = sizeof(struct rpmi_logging_log_data_req),
.min_rx_len = sizeof(struct rpmi_logging_log_data_resp),
.max_rx_len = sizeof(struct rpmi_logging_log_data_resp),
},
/*
* Keep a local terminator for safe lookup because only service ID 0x02
* is intentionally exposed by this MPXY service group handler.
*/
[2] = {
.id = RPMI_LOGGING_SRV_MAX_COUNT,
},
};
static const struct mpxy_rpmi_mbox_data logging_data = {
.servicegrp_id = RPMI_SRVGRP_LOGGING,
.num_services = RPMI_LOGGING_SRV_MAX_COUNT,
.service_data = logging_services,
};
static const struct fdt_match logging_match[] = {
{ .compatible = "riscv,rpmi-mpxy-logging", .data = &logging_data },
{ },
};
const struct fdt_driver fdt_mpxy_rpmi_logging = {
.match_table = logging_match,
.init = mpxy_rpmi_mbox_init,
.experimental = true,
};
+3
View File
@@ -29,3 +29,6 @@ libsbiutils-objs-$(CONFIG_FDT_MPXY_RPMI_DEVICE_POWER) += mpxy/fdt_mpxy_rpmi_devi
carray-fdt_mpxy_drivers-$(CONFIG_FDT_MPXY_RPMI_MM) += fdt_mpxy_rpmi_mm
libsbiutils-objs-$(CONFIG_FDT_MPXY_RPMI_MM) += mpxy/fdt_mpxy_rpmi_mm.o
carray-fdt_mpxy_drivers-$(CONFIG_FDT_MPXY_RPMI_LOGGING) += fdt_mpxy_rpmi_logging
libsbiutils-objs-$(CONFIG_FDT_MPXY_RPMI_LOGGING) += mpxy/fdt_mpxy_rpmi_logging.o