linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/9] Add support ANS2 NVMe on Apple A11
@ 2025-08-21 15:56 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
                   ` (9 more replies)
  0 siblings, 10 replies; 16+ messages in thread
From: Nick Chan @ 2025-08-21 15:56 UTC (permalink / raw)
  To: Sven Peter, Janne Grunau, Alyssa Rosenzweig, Neal Gompa,
	Jassi Brar, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Hector Martin, Joerg Roedel, Will Deacon, Robin Murphy,
	Keith Busch, Jens Axboe, Christoph Hellwig, Sagi Grimberg
  Cc: asahi, linux-arm-kernel, linux-kernel, devicetree, iommu,
	linux-nvme, Nick Chan

Apple A11 SoC comes with an NVMe controller that is similar to the
NVMe controller in M1, but less customized. Notably, it does not
have NVMMU or Linear SQ.

The controller is wired to an older variant of the SART address filter,
and uses an older variant of ASC mailbox, so add support for them too.

This variant of mailbox is also present on Apple T2 SoC.

This series has everything required to support NVMe on Apple A11 SoC.
However, due to RTKit protocol version support limitation, it will
only work when booted with at least iOS 14 iBoot.

Tested on A11 as well as M1 Pro (to make sure nothing broke).

Patch 1-2 adds support for the older mailbox
Patch 3-5 adds support for the older SART
Patch 6-7 adds support for the NVMe controller found in Apple A11 SoC
Patch 8-9 adds the required device tree nodes.

Signed-off-by: Nick Chan <towinchenmi@gmail.com>
---
Changes in v3:
- Update comment about enabling NVMMU and Linear submission queues. It is
  required since T6000 and much of the comment has been removed as it was
  stating the T8015 (A11) code path as a possible alternative.
- Make sure all the code changes are within 80 columns
- Simplify apple_nvme_submit_cmd_t8015()
- Remove unnecessary cast of of_device_get_match_data()
- Use direct function calls for command submission
- Use existing enum in apple,sart binding when adding the "apple,t8015-sart"
  compatible.
- Link to v2: https://lore.kernel.org/r/20250818-t8015-nvme-v2-0-65648cd189e0@gmail.com

Changes in v2:
- Remove bogus command_id decrement followed by increment in apple_nvme_handle_cqe()
- Split apple_nvme_submit_cmd() into two functions for t8015 and t8103 since these
  two code paths were not sharing much code.
- Link to v1: https://lore.kernel.org/r/20250811-t8015-nvme-v1-0-ef9c200e74a7@gmail.com

---
Nick Chan (9):
      dt-bindings: mailbox: apple,mailbox: Add ASC mailboxes on Apple A11 and T2
      soc: apple: mailbox: Add Apple A11 and T2 mailbox support
      dt-bindings: iommu: apple,sart: Add Apple A11
      soc: apple: sart: Make allow flags SART version dependent
      soc: apple: sart: Add SARTv0 support
      dt-bindings: nvme: apple,nvme-ans: Add Apple A11
      nvme: apple: Add Apple A11 support
      arm64: dts: apple: t8015: Fix PCIE power domains dependencies
      arm64: dts: apple: t8015: Add NVMe nodes

 .../devicetree/bindings/iommu/apple,sart.yaml      |   1 +
 .../devicetree/bindings/mailbox/apple,mailbox.yaml |   7 +
 .../devicetree/bindings/nvme/apple,nvme-ans.yaml   |  15 +-
 arch/arm64/boot/dts/apple/t8015-pmgr.dtsi          |   1 +
 arch/arm64/boot/dts/apple/t8015.dtsi               |  34 ++++
 drivers/nvme/host/apple.c                          | 196 ++++++++++++++-------
 drivers/soc/apple/mailbox.c                        |  19 ++
 drivers/soc/apple/sart.c                           |  60 ++++++-
 8 files changed, 264 insertions(+), 69 deletions(-)
---
base-commit: 8f5ae30d69d7543eee0d70083daf4de8fe15d585
change-id: 20250808-t8015-nvme-73a4fcda25dd

Best regards,
-- 
Nick Chan <towinchenmi@gmail.com>



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2025-09-03 10:52 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH v3 2/9] soc: apple: mailbox: Add Apple A11 and T2 mailbox support Nick Chan
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

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).