* [PATCH AUTOSEL 6.17-6.12] soc: apple: mailbox: Add Apple A11 and T2 mailbox support
[not found] <20251009155752.773732-1-sashal@kernel.org>
@ 2025-10-09 15:54 ` Sasha Levin
2025-10-10 2:22 ` Nick Chan
2025-10-09 15:55 ` [PATCH AUTOSEL 6.17] mfd: macsmc: Add "apple,t8103-smc" compatible Sasha Levin
2025-10-09 15:55 ` [PATCH AUTOSEL 6.17-6.6] pmdomain: apple: Add "apple,t8103-pmgr-pwrstate" Sasha Levin
2 siblings, 1 reply; 5+ messages in thread
From: Sasha Levin @ 2025-10-09 15:54 UTC (permalink / raw)
To: patches, stable
Cc: Nick Chan, Sven Peter, Sasha Levin, j, asahi, linux-arm-kernel
From: Nick Chan <towinchenmi@gmail.com>
[ Upstream commit fee2e558b4884df08fad8dd0e5e12466dce89996 ]
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>
Link: https://lore.kernel.org/r/20250821-t8015-nvme-v3-2-14a4178adf68@gmail.com
Signed-off-by: Sven Peter <sven@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
## Backport Analysis: Apple A11 and T2 Mailbox Support
**ANSWER: YES**
This commit should be backported to stable kernel trees (and has already
been backported as commit 37b630a26d235).
---
### Comprehensive Analysis
#### 1. Nature of the Change
This commit adds hardware support for Apple A11 and T2 SoC mailboxes,
which are critical for coprocessor communication including the Secure
Enclave Processor (SEP), NVMe coprocessor, and system management
controller.
**Code Changes (drivers/soc/apple/mailbox.c:50-51, 388-400, 439):**
1. **New register definitions** (lines 50-51):
- `APPLE_T8015_MBOX_A2I_CONTROL` at offset 0x108 (vs 0x110 for
standard ASC)
- `APPLE_T8015_MBOX_I2A_CONTROL` at offset 0x10c (vs 0x114 for
standard ASC)
2. **New hardware variant structure** (lines 388-400):
```c
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, // Different offset
.a2i_send0 = APPLE_ASC_MBOX_A2I_SEND0,
.a2i_send1 = APPLE_ASC_MBOX_A2I_SEND1,
.i2a_control = APPLE_T8015_MBOX_I2A_CONTROL, // Different offset
.i2a_recv0 = APPLE_ASC_MBOX_I2A_RECV0,
.i2a_recv1 = APPLE_ASC_MBOX_I2A_RECV1,
.has_irq_controls = false,
};
```
3. **Device tree compatible string** (line 439):
- Adds "apple,t8015-asc-mailbox" → `apple_mbox_t8015_hw`
**Technical Details:** The T8015 variant differs from the standard ASC
mailbox only in control register offsets (8-byte difference: 0x108/0x10c
vs 0x110/0x114). All data registers remain at identical offsets, and the
interrupt control behavior is the same (`has_irq_controls = false`).
#### 2. Stable Kernel Policy Compliance
**Qualifies under stable-kernel-rules.rst line 15:**
> "It must either fix a real bug that bothers people or **just add a
device ID**."
While this is more than a simple device ID addition, it falls into the
same category as hardware quirks and device-specific variants that are
explicitly allowed. The change:
- ✅ Is already in mainline (commit fee2e558b4884)
- ✅ Is obviously correct and tested (reviewed by Sven Peter)
- ✅ Is well under 100 lines (only 19 lines with context)
- ✅ Adds support for real hardware (A11/T2 systems)
- ✅ Follows proper submission rules
#### 3. Context: Part of Larger Hardware Enablement Series
This is **patch 2/9** from the t8015-nvme-v3 series by Nick Chan, which
enables NVMe functionality on Apple A11 and T2 SoCs. Related commits
from the same series have been backported:
- ✅ **Patch 4/9** (8409ebe2c3ebd → c942afcc3ed18): "sart: Make allow
flags SART version dependent"
- ✅ **Patch 5/9** (a67677d4e2b80 → d34092e4e6f19): "sart: Add SARTv0
support"
The mailbox driver is a prerequisite for the NVMe coprocessor
communication, making this backport consistent with the already-
backported SART changes.
#### 4. Risk Assessment
**VERY LOW RISK:**
1. **Isolated change:** Only adds a new hardware variant configuration;
doesn't modify any existing code paths
2. **No impact on existing hardware:** The new `apple_mbox_t8015_hw`
structure is only used when the device tree specifies
"apple,t8015-asc-mailbox"
3. **Proven pattern:** Uses the exact same driver infrastructure as
existing ASC and M3 variants
4. **Minimal delta:** Only control register offsets differ by 8 bytes;
all functionality is identical
5. **No known issues:** No fixes, reverts, or bug reports found since
merge (August 23, 2025 to present)
#### 5. Backporting History
**THIS COMMIT HAS ALREADY BEEN BACKPORTED:**
- **Upstream commit:** fee2e558b4884 (August 23, 2025)
- **Backport commit:** 37b630a26d235 (October 3, 2025)
- **Signed-off-by:** Sasha Levin <sashal@kernel.org>
- **Currently in:** build/linus-next branch
The backport uses the standard upstream tag format:
```
[ Upstream commit fee2e558b4884df08fad8dd0e5e12466dce89996 ]
```
#### 6. Prerequisites for Backporting
**Driver availability:** The Apple mailbox driver was introduced in
commit 6e1457fcad3ff (merged in v6.8-rc1, released in v6.8). Therefore,
this backport is only applicable to:
- ✅ linux-6.8.y and later stable trees
- ✅ linux-6.10.y (confirmed in v6.10 tag)
- ✅ linux-6.11.y and newer
**Dependencies:**
- Base mailbox driver (present since v6.8)
- DT bindings update from patch 1/9 (commit 32299eb03414c)
#### 7. User Impact
**Positive impact for A11/T2 users:**
- Enables mailbox communication with coprocessors on Apple A11 (iPhone
8/8 Plus/X) and T2 (2018-2020 Intel Macs) hardware
- Required for NVMe functionality on these systems
- Addresses known issue (Bugzilla #202567: "2018 Macbook T2 chip
prevents nvme SSD access")
- No negative impact on other Apple hardware or non-Apple systems
---
### Conclusion
**YES - This commit should be backported** because:
1. ✅ **Already selected:** Backported as 37b630a26d235 by Sasha Levin
2. ✅ **Policy compliant:** Qualifies as device ID/quirk addition per
stable-kernel-rules.rst
3. ✅ **Low risk:** Small, isolated, well-contained change (19 lines)
4. ✅ **Enables critical functionality:** Required for NVMe and
coprocessor communication on A11/T2 hardware
5. ✅ **Consistent precedent:** Similar commits from the same series have
been backported
6. ✅ **No regressions:** No known issues or fixes required since merge
7. ✅ **Real user benefit:** Enables hardware support for existing Apple
A11/T2 systems
The commit is suitable for all stable trees v6.8.y and later where the
base mailbox driver is present.
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 49a0955e82d6c..8f29108dc69ac 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.51.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH AUTOSEL 6.17-6.12] soc: apple: mailbox: Add Apple A11 and T2 mailbox support
2025-10-09 15:54 ` [PATCH AUTOSEL 6.17-6.12] soc: apple: mailbox: Add Apple A11 and T2 mailbox support Sasha Levin
@ 2025-10-10 2:22 ` Nick Chan
2025-11-04 0:22 ` Sasha Levin
0 siblings, 1 reply; 5+ messages in thread
From: Nick Chan @ 2025-10-10 2:22 UTC (permalink / raw)
To: Sasha Levin, patches, stable; +Cc: Sven Peter, j, asahi, linux-arm-kernel
Sasha Levin 於 2025/10/9 晚上11:54 寫道:
> From: Nick Chan <towinchenmi@gmail.com>
>
> [ Upstream commit fee2e558b4884df08fad8dd0e5e12466dce89996 ]
>
> 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>
> Link: https://lore.kernel.org/r/20250821-t8015-nvme-v3-2-14a4178adf68@gmail.com
> Signed-off-by: Sven Peter <sven@kernel.org>
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---
>
> LLM Generated explanations, may be completely bogus:
>
> ## Backport Analysis: Apple A11 and T2 Mailbox Support
>
> **ANSWER: YES**
>
> This commit should be backported to stable kernel trees (and has already
> been backported as commit 37b630a26d235).
>
> ---
This patch adds support for new hardware which is not just a device ID
addition. None of the hardware that depends on this mailbox is supported
in stable either. Please drop.
Best,
Nick Chan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH AUTOSEL 6.17-6.12] soc: apple: mailbox: Add Apple A11 and T2 mailbox support
2025-10-10 2:22 ` Nick Chan
@ 2025-11-04 0:22 ` Sasha Levin
0 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2025-11-04 0:22 UTC (permalink / raw)
To: Nick Chan; +Cc: patches, stable, Sven Peter, j, asahi, linux-arm-kernel
On Fri, Oct 10, 2025 at 10:22:18AM +0800, Nick Chan wrote:
>
>Sasha Levin 於 2025/10/9 晚上11:54 寫道:
>> From: Nick Chan <towinchenmi@gmail.com>
>>
>> [ Upstream commit fee2e558b4884df08fad8dd0e5e12466dce89996 ]
>>
>> 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>
>> Link: https://lore.kernel.org/r/20250821-t8015-nvme-v3-2-14a4178adf68@gmail.com
>> Signed-off-by: Sven Peter <sven@kernel.org>
>> Signed-off-by: Sasha Levin <sashal@kernel.org>
>> ---
>>
>> LLM Generated explanations, may be completely bogus:
>>
>> ## Backport Analysis: Apple A11 and T2 Mailbox Support
>>
>> **ANSWER: YES**
>>
>> This commit should be backported to stable kernel trees (and has already
>> been backported as commit 37b630a26d235).
>>
>> ---
>This patch adds support for new hardware which is not just a device ID
>addition. None of the hardware that depends on this mailbox is supported
>in stable either. Please drop.
Dropped, thanks!
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH AUTOSEL 6.17] mfd: macsmc: Add "apple,t8103-smc" compatible
[not found] <20251009155752.773732-1-sashal@kernel.org>
2025-10-09 15:54 ` [PATCH AUTOSEL 6.17-6.12] soc: apple: mailbox: Add Apple A11 and T2 mailbox support Sasha Levin
@ 2025-10-09 15:55 ` Sasha Levin
2025-10-09 15:55 ` [PATCH AUTOSEL 6.17-6.6] pmdomain: apple: Add "apple,t8103-pmgr-pwrstate" Sasha Levin
2 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2025-10-09 15:55 UTC (permalink / raw)
To: patches, stable
Cc: Janne Grunau, Lee Jones, Sasha Levin, sven, asahi,
linux-arm-kernel
From: Janne Grunau <j@jannau.net>
[ Upstream commit 9b959e525fa7e8518e57554b6e17849942938dfc ]
After discussion with the devicetree maintainers we agreed to not extend
lists with the generic compatible "apple,smc" anymore [1]. Use
"apple,t8103-smc" as base compatible as it is the SoC the driver and
bindings were written for.
[1]: https://lore.kernel.org/asahi/12ab93b7-1fc2-4ce0-926e-c8141cfe81bf@kernel.org/
Signed-off-by: Janne Grunau <j@jannau.net>
Link: https://lore.kernel.org/r/20250828-dt-apple-t6020-v1-18-507ba4c4b98e@jannau.net
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
YES
- What changed
- Adds a new OF match entry `{ .compatible = "apple,t8103-smc" }` to
the driver’s match table in drivers/mfd/macsmc.c:481, leaving the
existing generic match `{ .compatible = "apple,smc" }` intact.
- Why it matters
- Devicetree policy is moving away from expanding generic compatibles
like `"apple,smc"` and towards SoC‑specific base compatibles. The
binding documents this pattern and uses SoC‑specific compatibles
with explicit fallback chains
(Documentation/devicetree/bindings/mfd/apple,smc.yaml:20).
- Current DTs for Apple SoCs use these patterns:
- t8103 (M1) nodes include `"apple,t8103-smc"`
(arch/arm64/boot/dts/apple/t8103.dtsi:900).
- t6020 (M2 Pro) nodes use `"apple,t6020-smc", "apple,t8103-smc"`
(arch/arm64/boot/dts/apple/t602x-die0.dtsi:105), intentionally
avoiding the generic `"apple,smc"`.
- Before this change, the driver only matched `"apple,smc"`
(v6.17:drivers/mfd/macsmc.c showed only the generic match), so
kernels without the `"apple,t8103-smc"` entry would fail to bind on
DTs that omit the generic fallback, causing the SMC MFD (and all
dependent subdevices like GPIO and reboot) not to probe.
- Risk and scope
- Minimal and contained: a one‑line addition to an OF match table
(drivers/mfd/macsmc.c:481). No functional code paths change, no
behavioral differences for already working systems, and no
architectural changes.
- Security-neutral: no new I/O or parsing paths are introduced; only
device binding is enabled for an SoC‑specific compatible.
- No negative side effects expected: the new match string is specific
and does not overlap with other drivers.
- Stable suitability
- This is a classic “device/compatible ID addition” that fixes a user-
visible binding failure when DTs conform to updated bindings that
avoid the generic `"apple,smc"`. Such ID additions are routinely
accepted into stable to enable hardware that otherwise won’t probe.
- Although the commit lacks an explicit Cc: stable, it meets stable
rules: important fix (driver doesn’t bind on modern DTs), minimal
risk, no features, and confined to the MFD subsystem.
Conclusion: Backporting ensures the macsmc driver binds on DTs using the
SoC-based compatible scheme (notably those that rely on
`"apple,t8103-smc"` fallback), with negligible regression risk.
drivers/mfd/macsmc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/mfd/macsmc.c b/drivers/mfd/macsmc.c
index 870c8b2028a8f..a5e0b99484830 100644
--- a/drivers/mfd/macsmc.c
+++ b/drivers/mfd/macsmc.c
@@ -478,6 +478,7 @@ static int apple_smc_probe(struct platform_device *pdev)
}
static const struct of_device_id apple_smc_of_match[] = {
+ { .compatible = "apple,t8103-smc" },
{ .compatible = "apple,smc" },
{},
};
--
2.51.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH AUTOSEL 6.17-6.6] pmdomain: apple: Add "apple,t8103-pmgr-pwrstate"
[not found] <20251009155752.773732-1-sashal@kernel.org>
2025-10-09 15:54 ` [PATCH AUTOSEL 6.17-6.12] soc: apple: mailbox: Add Apple A11 and T2 mailbox support Sasha Levin
2025-10-09 15:55 ` [PATCH AUTOSEL 6.17] mfd: macsmc: Add "apple,t8103-smc" compatible Sasha Levin
@ 2025-10-09 15:55 ` Sasha Levin
2 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2025-10-09 15:55 UTC (permalink / raw)
To: patches, stable
Cc: Janne Grunau, Ulf Hansson, Neal Gompa, Rob Herring (Arm),
Sven Peter, Sasha Levin, asahi, linux-arm-kernel
From: Janne Grunau <j@jannau.net>
[ Upstream commit 442816f97a4f84cb321d3359177a3b9b0ce48a60 ]
After discussion with the devicetree maintainers we agreed to not extend
lists with the generic compatible "apple,pmgr-pwrstate" anymore [1]. Use
"apple,t8103-pmgr-pwrstate" as base compatible as it is the SoC the
driver and bindings were written for.
[1]: https://lore.kernel.org/asahi/12ab93b7-1fc2-4ce0-926e-c8141cfe81bf@kernel.org/
Signed-off-by: Janne Grunau <j@jannau.net>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Sven Peter <sven@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
YES
- What changed: The patch adds a single OF compatible to the driver
match table to explicitly support the Apple M1 (t8103) PMGR power-
state nodes. Concretely, it inserts `{ .compatible =
"apple,t8103-pmgr-pwrstate" }` in `drivers/pmdomain/apple/pmgr-
pwrstate.c:309`, keeping the existing generic fallback `{ .compatible
= "apple,pmgr-pwrstate" }` just below it (drivers/pmdomain/apple/pmgr-
pwrstate.c:310).
- Rationale from commit message: DT maintainers agreed to stop extending
nodes with the generic `"apple,pmgr-pwrstate"` and instead use the
SoC-specific string as the base compatible. Without this addition, a
DT using only `"apple,t8103-pmgr-pwrstate"` would fail to bind the
driver.
- Scope and risk: The change is a single-line device-ID addition to the
OF match table. It does not touch runtime logic, data structures,
Kconfig, or probe/remove paths. There are no architectural changes.
This kind of “add a new compatible ID” patch is routinely accepted for
stable because it’s low-risk and purely affects device binding.
- User impact fixed: On systems providing a DTB that omits the generic
fallback (aligned with the new binding guidance), the driver would not
probe, leaving PM domains and reset control unmanaged. Adding the
t8103 compatible restores functionality. This is a real, user-visible
failure mode when booting older kernels with newer DTBs or bootloader-
provided DTBs following updated conventions.
- Alignment with bindings: The bindings already enumerate SoC-specific
compatibles, including `"apple,t8103-pmgr-pwrstate"`
(Documentation/devicetree/bindings/power/apple,pmgr-pwrstate.yaml:41).
The driver now matches that SoC-specific string directly, which aligns
the implementation with binding expectations going forward.
- No regressions expected: Existing DTs that list both
`"apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"` continue to bind
identically, only preferring the SoC-specific match. DTs that still
only have the generic string continue to work via the unchanged `{
.compatible = "apple,pmgr-pwrstate" }` entry
(drivers/pmdomain/apple/pmgr-pwrstate.c:310).
- Stable policy fit: This is a minimal, contained, non-feature change
that enables correct binding for an existing driver on an existing SoC
and prevents regressions with evolving DTs. There’s no security
implication and no interaction with critical core subsystems beyond OF
matching.
- Backport note: On older stable series, the file may reside under a
different path (pre-“pmdomain” rename). The change remains a trivial
OF-ID addition to the same match table in that file.
Given the above, this is a textbook low-risk backport that prevents real
breakage with newer DTBs and should be backported to stable trees that
already contain the Apple PMGR power-state driver.
drivers/pmdomain/apple/pmgr-pwrstate.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pmdomain/apple/pmgr-pwrstate.c b/drivers/pmdomain/apple/pmgr-pwrstate.c
index 9467235110f46..82c33cf727a82 100644
--- a/drivers/pmdomain/apple/pmgr-pwrstate.c
+++ b/drivers/pmdomain/apple/pmgr-pwrstate.c
@@ -306,6 +306,7 @@ static int apple_pmgr_ps_probe(struct platform_device *pdev)
}
static const struct of_device_id apple_pmgr_ps_of_match[] = {
+ { .compatible = "apple,t8103-pmgr-pwrstate" },
{ .compatible = "apple,pmgr-pwrstate" },
{}
};
--
2.51.0
^ permalink raw reply related [flat|nested] 5+ messages in thread