linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Nick Chan <towinchenmi@gmail.com>
To: Sven Peter <sven@kernel.org>, Janne Grunau <j@jannau.net>,
	 Alyssa Rosenzweig <alyssa@rosenzweig.io>,
	Neal Gompa <neal@gompa.dev>,
	 Jassi Brar <jassisinghbrar@gmail.com>,
	Rob Herring <robh@kernel.org>,
	 Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>,
	Hector Martin <marcan@marcan.st>,  Joerg Roedel <joro@8bytes.org>,
	Will Deacon <will@kernel.org>,
	 Robin Murphy <robin.murphy@arm.com>,
	Keith Busch <kbusch@kernel.org>,  Jens Axboe <axboe@kernel.dk>,
	Christoph Hellwig <hch@lst.de>,  Sagi Grimberg <sagi@grimberg.me>
Cc: asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	 linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	 iommu@lists.linux.dev, linux-nvme@lists.infradead.org,
	 Nick Chan <towinchenmi@gmail.com>
Subject: [PATCH v3 2/9] soc: apple: mailbox: Add Apple A11 and T2 mailbox support
Date: Thu, 21 Aug 2025 23:56:39 +0800	[thread overview]
Message-ID: <20250821-t8015-nvme-v3-2-14a4178adf68@gmail.com> (raw)
In-Reply-To: <20250821-t8015-nvme-v3-0-14a4178adf68@gmail.com>

Add ASC mailbox support for Apple A11 and T2 SoCs, which is used for
coprocessors in the system.

Reviewed-by: Sven Peter <sven@kernel.org>
Signed-off-by: Nick Chan <towinchenmi@gmail.com>
---
 drivers/soc/apple/mailbox.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/drivers/soc/apple/mailbox.c b/drivers/soc/apple/mailbox.c
index 49a0955e82d6cf5eef83e5f63ba8d31194c65324..8f29108dc69ac964236121d439e86c923a441265 100644
--- a/drivers/soc/apple/mailbox.c
+++ b/drivers/soc/apple/mailbox.c
@@ -47,6 +47,9 @@
 #define APPLE_ASC_MBOX_I2A_RECV0 0x830
 #define APPLE_ASC_MBOX_I2A_RECV1 0x838
 
+#define APPLE_T8015_MBOX_A2I_CONTROL	0x108
+#define APPLE_T8015_MBOX_I2A_CONTROL	0x10c
+
 #define APPLE_M3_MBOX_CONTROL_FULL BIT(16)
 #define APPLE_M3_MBOX_CONTROL_EMPTY BIT(17)
 
@@ -382,6 +385,21 @@ static int apple_mbox_probe(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct apple_mbox_hw apple_mbox_t8015_hw = {
+	.control_full = APPLE_ASC_MBOX_CONTROL_FULL,
+	.control_empty = APPLE_ASC_MBOX_CONTROL_EMPTY,
+
+	.a2i_control = APPLE_T8015_MBOX_A2I_CONTROL,
+	.a2i_send0 = APPLE_ASC_MBOX_A2I_SEND0,
+	.a2i_send1 = APPLE_ASC_MBOX_A2I_SEND1,
+
+	.i2a_control = APPLE_T8015_MBOX_I2A_CONTROL,
+	.i2a_recv0 = APPLE_ASC_MBOX_I2A_RECV0,
+	.i2a_recv1 = APPLE_ASC_MBOX_I2A_RECV1,
+
+	.has_irq_controls = false,
+};
+
 static const struct apple_mbox_hw apple_mbox_asc_hw = {
 	.control_full = APPLE_ASC_MBOX_CONTROL_FULL,
 	.control_empty = APPLE_ASC_MBOX_CONTROL_EMPTY,
@@ -418,6 +436,7 @@ static const struct apple_mbox_hw apple_mbox_m3_hw = {
 
 static const struct of_device_id apple_mbox_of_match[] = {
 	{ .compatible = "apple,asc-mailbox-v4", .data = &apple_mbox_asc_hw },
+	{ .compatible = "apple,t8015-asc-mailbox", .data = &apple_mbox_t8015_hw },
 	{ .compatible = "apple,m3-mailbox-v2", .data = &apple_mbox_m3_hw },
 	{}
 };

-- 
2.50.1



  parent reply	other threads:[~2025-08-21 22:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-21 15:56 [PATCH v3 0/9] Add support ANS2 NVMe on Apple A11 Nick Chan
2025-08-21 15:56 ` [PATCH v3 1/9] dt-bindings: mailbox: apple,mailbox: Add ASC mailboxes on Apple A11 and T2 Nick Chan
2025-08-21 15:56 ` Nick Chan [this message]
2025-08-21 15:56 ` [PATCH v3 3/9] dt-bindings: iommu: apple,sart: Add Apple A11 Nick Chan
2025-08-21 15:56 ` [PATCH v3 4/9] soc: apple: sart: Make allow flags SART version dependent Nick Chan
2025-08-21 15:56 ` [PATCH v3 5/9] soc: apple: sart: Add SARTv0 support Nick Chan
2025-08-21 15:56 ` [PATCH v3 6/9] dt-bindings: nvme: apple,nvme-ans: Add Apple A11 Nick Chan
2025-08-22  8:19   ` Krzysztof Kozlowski
2025-08-21 15:56 ` [PATCH v3 7/9] nvme: apple: Add Apple A11 support Nick Chan
2025-08-25  8:07   ` Christoph Hellwig
2025-08-27 15:56     ` Sven Peter
2025-09-02  5:26       ` Christoph Hellwig
2025-09-03  9:53         ` Janne Grunau
2025-08-21 15:56 ` [PATCH v3 8/9] arm64: dts: apple: t8015: Fix PCIE power domains dependencies Nick Chan
2025-08-21 15:56 ` [PATCH v3 9/9] arm64: dts: apple: t8015: Add NVMe nodes Nick Chan
2025-08-23  7:28 ` (subset) [PATCH v3 0/9] Add support ANS2 NVMe on Apple A11 Sven Peter

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=20250821-t8015-nvme-v3-2-14a4178adf68@gmail.com \
    --to=towinchenmi@gmail.com \
    --cc=alyssa@rosenzweig.io \
    --cc=asahi@lists.linux.dev \
    --cc=axboe@kernel.dk \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=hch@lst.de \
    --cc=iommu@lists.linux.dev \
    --cc=j@jannau.net \
    --cc=jassisinghbrar@gmail.com \
    --cc=joro@8bytes.org \
    --cc=kbusch@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=marcan@marcan.st \
    --cc=neal@gompa.dev \
    --cc=robh@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=sagi@grimberg.me \
    --cc=sven@kernel.org \
    --cc=will@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).