mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Beleswar Padhi <b-padhi@ti.com>
To: <jassisinghbrar@gmail.com>, <nm@ti.com>, <afd@ti.com>, <u-kumar1@ti.com>
Cc: <linux-kernel@vger.kernel.org>, <b-padhi@ti.com>, <vigneshr@ti.com>
Subject: [PATCH 2/2] mailbox: ti-msgmgr: Add ti,tda54-main-secure-proxy support
Date: Wed, 30 Sep 2026 22:59:48 +0530	[thread overview]
Message-ID: <20260930172948.2901336-3-b-padhi@ti.com> (raw)
In-Reply-To: <20260930172948.2901336-1-b-padhi@ti.com>

Add support for the TDA54 secure proxy mailbox controller integrated in
the MAIN voltage domain. This instance supports up to 444 threads with
60-byte messages per thread. Add the corresponding device data for the
ti,tda54-main-secure-proxy compatible.

While at it, update some internal variable types from u8 to u16 to hold
values up to 444.

Signed-off-by: Beleswar Padhi <b-padhi@ti.com>
---
 drivers/mailbox/ti-msgmgr.c | 33 ++++++++++++++++++++++++++-------
 1 file changed, 26 insertions(+), 7 deletions(-)

diff --git a/drivers/mailbox/ti-msgmgr.c b/drivers/mailbox/ti-msgmgr.c
index 8eb8df8d95a4c..7ab0d07fe7a28 100644
--- a/drivers/mailbox/ti-msgmgr.c
+++ b/drivers/mailbox/ti-msgmgr.c
@@ -44,8 +44,8 @@
  * @is_tx:	Is this a receive path?
  */
 struct ti_msgmgr_valid_queue_desc {
-	u8 queue_id;
-	u8 proxy_id;
+	u16 queue_id;
+	u16 proxy_id;
 	bool is_tx;
 };
 
@@ -71,7 +71,7 @@ struct ti_msgmgr_valid_queue_desc {
  * for a specific compatible SoC is done.
  */
 struct ti_msgmgr_desc {
-	u8 queue_count;
+	u16 queue_count;
 	u8 max_message_size;
 	u8 max_messages;
 	u8 data_first_reg;
@@ -105,8 +105,8 @@ struct ti_msgmgr_desc {
  */
 struct ti_queue_inst {
 	char name[30];
-	u8 queue_id;
-	u8 proxy_id;
+	u16 queue_id;
+	u16 proxy_id;
 	int irq;
 	bool is_tx;
 	void __iomem *queue_buff_start;
@@ -138,7 +138,7 @@ struct ti_msgmgr_inst {
 	void __iomem *queue_proxy_region;
 	void __iomem *queue_state_debug_region;
 	void __iomem *queue_ctrl_region;
-	u8 num_valid_queues;
+	u16 num_valid_queues;
 	struct ti_queue_inst *qinsts;
 	struct mbox_controller mbox;
 	struct mbox_chan *chans;
@@ -466,7 +466,11 @@ static int ti_msgmgr_queue_rx_irq_req(struct device *dev,
 				      struct mbox_chan *chan)
 {
 	int ret = 0;
-	char of_rx_irq_name[7];
+	/*
+	 * To keep compiler happy about u16 proxy_id:
+	 * "rx_" + up to 5 digits of u16 id + NULL
+	 */
+	char of_rx_irq_name[9];
 	struct device_node *np;
 
 	snprintf(of_rx_irq_name, sizeof(of_rx_irq_name),
@@ -799,9 +803,24 @@ static const struct ti_msgmgr_desc am654_desc = {
 	.is_sproxy = true,
 };
 
+static const struct ti_msgmgr_desc tda54_main_desc = {
+	.queue_count = 444,
+	.num_valid_queues = 444,
+	.max_message_size = 60,
+	.data_region_name = "target_data",
+	.status_region_name = "rt",
+	.ctrl_region_name = "scfg",
+	.data_first_reg = 0,
+	.data_last_reg = 14,
+	.status_cnt_mask = SPROXY_THREAD_STATUS_COUNT_MASK,
+	.tx_polled = false,
+	.is_sproxy = true,
+};
+
 static const struct of_device_id ti_msgmgr_of_match[] = {
 	{.compatible = "ti,k2g-message-manager", .data = &k2g_desc},
 	{.compatible = "ti,am654-secure-proxy", .data = &am654_desc},
+	{.compatible = "ti,tda54-main-secure-proxy", .data = &tda54_main_desc},
 	{ /* Sentinel */ }
 };
 
-- 
2.34.1


      parent reply	other threads:[~2026-09-30 17:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-30 17:29 [PATCH 0/2] Add support for TDA54 variant secproxy controllers Beleswar Padhi
2026-09-30 17:29 ` [PATCH 1/2] dt-bindings: mailbox: ti,secure-proxy: Add TDA54 variant compatible Beleswar Padhi
2026-09-30 21:17   ` Conor Dooley
2026-09-30 17:29 ` Beleswar Padhi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260930172948.2901336-3-b-padhi@ti.com \
    --to=b-padhi@ti.com \
    --cc=afd@ti.com \
    --cc=jassisinghbrar@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=u-kumar1@ti.com \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®