Skip to content

Commit 5bd2927

Browse files
committed
nvme-apple: Add initial Apple SoC NVMe driver
Apple SoCs such as the M1 come with an embedded NVMe controller that is not attached to any PCIe bus. Additionally, it doesn't conform to the NVMe specification and requires a bunch of changes to command submission and IOMMU configuration to work. Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Sven Peter <sven@svenpeter.dev>
1 parent 82b9655 commit 5bd2927

File tree

4 files changed

+1610
-0
lines changed

4 files changed

+1610
-0
lines changed

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1849,6 +1849,7 @@ F: drivers/i2c/busses/i2c-pasemi-core.c
18491849
F: drivers/i2c/busses/i2c-pasemi-platform.c
18501850
F: drivers/irqchip/irq-apple-aic.c
18511851
F: drivers/mailbox/apple-mailbox.c
1852+
F: drivers/nvme/host/apple.c
18521853
F: drivers/pinctrl/pinctrl-apple-gpio.c
18531854
F: drivers/soc/apple/*
18541855
F: drivers/watchdog/apple_wdt.c

drivers/nvme/host/Kconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,16 @@ config NVME_TCP
9191
from https://github.com/linux-nvme/nvme-cli.
9292

9393
If unsure, say N.
94+
95+
config NVME_APPLE
96+
tristate "Apple ANS2 NVM Express host driver"
97+
depends on OF && BLOCK
98+
depends on APPLE_RTKIT && APPLE_SART
99+
depends on ARCH_APPLE || COMPILE_TEST
100+
select NVME_CORE
101+
help
102+
This provides support for the NVMe controller embedded in Apple SoCs
103+
such as the M1.
104+
105+
To compile this driver as a module, choose M here: the
106+
module will be called nvme-apple.

drivers/nvme/host/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ obj-$(CONFIG_NVME_FABRICS) += nvme-fabrics.o
88
obj-$(CONFIG_NVME_RDMA) += nvme-rdma.o
99
obj-$(CONFIG_NVME_FC) += nvme-fc.o
1010
obj-$(CONFIG_NVME_TCP) += nvme-tcp.o
11+
obj-$(CONFIG_NVME_APPLE) += nvme-apple.o
1112

1213
nvme-core-y := core.o ioctl.o constants.o
1314
nvme-core-$(CONFIG_TRACING) += trace.o
@@ -25,3 +26,5 @@ nvme-rdma-y += rdma.o
2526
nvme-fc-y += fc.o
2627

2728
nvme-tcp-y += tcp.o
29+
30+
nvme-apple-y += apple.o

0 commit comments

Comments
 (0)