From bfe4a4f2289758e786fa20813f839b68427cfc57 Mon Sep 17 00:00:00 2001 From: Joshua Warren <816217+joshuaswarren@users.noreply.github.com> Date: Thu, 19 Nov 2026 19:45:34 -0600 Subject: [PATCH 1/2] arm64: dts: apple: use the disabled J716c sleep description for K114c - Reuse J716c's disabled Max description instead of a copied J714s file. - Keep the controller disabled until K114c sleep is qualified. - Preserve K114c's SIO alias and MagSafe controller status. - Do not enable the unqualified full profile. Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com> --- arch/arm64/boot/dts/apple/t6050-k114c.dts | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/arch/arm64/boot/dts/apple/t6050-k114c.dts b/arch/arm64/boot/dts/apple/t6050-k114c.dts index 13ea865ba58e1..876582d3febc1 100644 --- a/arch/arm64/boot/dts/apple/t6050-k114c.dts +++ b/arch/arm64/boot/dts/apple/t6050-k114c.dts @@ -29,6 +29,7 @@ /* kboot fills the N1's factory addresses from /chosen through these */ wifi0 = &n1_alpha; bluetooth0 = &n1_beta; + sio = &sio; }; }; @@ -388,16 +389,6 @@ }; }; - /* - * The MagSafe 3 port's PD controller (ADT hpm5, port-type 0x11). It has no USB data - * path, so it gets no connector node; tipd registers a Type-C port and a power supply - * for it. Its ADT features-supported is <3>, "Power In" only: no liquid detection. - */ - hpm5: usb-pd@8 { - compatible = "apple,sn201202x"; - reg = <0x8 SPMI_USID>; - apple,no-liquid-detection; - }; }; &atc1_phy_mbox { @@ -581,3 +572,10 @@ <&ps_atc2_cio_usb>, <&ps_atc2_cio_auss>, <&ps_atc2_pcie>; apple,pcie-tunnel = <&acio2_pcie_tunnel>; }; + +/* Keep J716c's unqualified sleep description disabled. */ +#include "t6050-j716c-sleep.dtsi" + +&hpm5 { + status = "okay"; +}; From 50ae77a3c1308d6303997c419ff275ab3cfbfd57 Mon Sep 17 00:00:00 2001 From: Joshua Warren <816217+joshuaswarren@users.noreply.github.com> Date: Thu, 19 Nov 2026 19:50:11 -0600 Subject: [PATCH 2/2] soc: apple: sleep: validate CPU inventory without machine names - Validate CPU inventory when a profile provides MPIDR or CPU count. - Remove machine metadata from both T6050 entries and KUnit assertions. Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com> --- drivers/soc/apple/sleep-t6050.h | 2 -- drivers/soc/apple/sleep-test.c | 6 ++---- drivers/soc/apple/sleep.c | 9 ++++----- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/drivers/soc/apple/sleep-t6050.h b/drivers/soc/apple/sleep-t6050.h index b9744f3a5e36c..2fd52098c8705 100644 --- a/drivers/soc/apple/sleep-t6050.h +++ b/drivers/soc/apple/sleep-t6050.h @@ -3737,7 +3737,6 @@ static const struct apple_sleep_soc t6050_sleep_soc = { .smc_policy = &t6050_smc_policy, .early_context = true, .own_wake = true, - .machine = "apple,j714s", /* The interrupt mask every SPMI bus has through the sleep, as on T8140 and T8132 */ .spmi_notify_sleep = 0x2000001, .boot_mpidr = 0x040000, @@ -3869,7 +3868,6 @@ static const struct apple_sleep_soc t6050_j716c_sleep_soc = { .pmp_unstarted = true, .clusters_down_first = true, .lower_venc0 = true, - .machine = "apple,j716c", .spmi_notify_sleep = 0x2000001, .boot_mpidr = 0x040000, .cpu_count = 18, diff --git a/drivers/soc/apple/sleep-test.c b/drivers/soc/apple/sleep-test.c index fff01f6447e5a..386cc62dfbd24 100644 --- a/drivers/soc/apple/sleep-test.c +++ b/drivers/soc/apple/sleep-test.c @@ -285,7 +285,7 @@ static void apple_sleep_test_unavailable(struct kunit *test) KUNIT_EXPECT_EQ(test, apple_sleep_profile_validate(&incomplete), -EINVAL); } -/* The J716c runs the J714s's steps: only its map, inventory, board and PMP differ. */ +/* The J716c shares the J714s steps; its map, inventory and PMP differ. */ static void apple_sleep_test_j716c_full(struct kunit *test) { const struct apple_sleep_soc *max = &t6050_j716c_sleep_soc, *pro = &t6050_sleep_soc; @@ -296,7 +296,6 @@ static void apple_sleep_test_j716c_full(struct kunit *test) KUNIT_ASSERT_NOT_NULL(test, state); KUNIT_EXPECT_EQ(test, apple_sleep_profile_validate(max), 0); KUNIT_EXPECT_PTR_EQ(test, max->unavailable_reason, NULL); - KUNIT_EXPECT_STREQ(test, max->machine, "apple,j716c"); KUNIT_EXPECT_PTR_EQ(test, max->regions, &t6050_j716c_region_profile); KUNIT_EXPECT_EQ(test, sleep_region_validate(max->regions), 0); KUNIT_EXPECT_EQ(test, max->regions->ntables, pro->regions->ntables); @@ -334,13 +333,12 @@ static void apple_sleep_test_j716c_full(struct kunit *test) KUNIT_EXPECT_TRUE(test, apple_sleep_t6050_full(state)); } -/* The J714s's profile is as it was: its own map, its inventory, a PMP that runs. */ +/* The J714s uses its own map and inventory, with a running PMP. */ static void apple_sleep_test_j714s_unchanged(struct kunit *test) { const struct apple_sleep_soc *pro = &t6050_sleep_soc; KUNIT_EXPECT_PTR_EQ(test, pro->unavailable_reason, NULL); - KUNIT_EXPECT_STREQ(test, pro->machine, "apple,j714s"); KUNIT_EXPECT_PTR_EQ(test, pro->ops, &t6050_sleep_ops); KUNIT_EXPECT_TRUE(test, pro->ops->map_regs == t6050_sleep_map_regs); KUNIT_EXPECT_PTR_EQ(test, pro->regions, &t6050_region_profile); diff --git a/drivers/soc/apple/sleep.c b/drivers/soc/apple/sleep.c index ce1bcee755574..04fe4ce4c544e 100644 --- a/drivers/soc/apple/sleep.c +++ b/drivers/soc/apple/sleep.c @@ -682,7 +682,6 @@ struct apple_sleep_soc { unsigned int cpu_clusters; unsigned int cpu_cores_per_cluster; bool (*cpu_valid)(u64 mpidr); - const char *machine; u64 boot_mpidr; unsigned int cpu_count; struct apple_sleep_domains ps; @@ -1893,10 +1892,10 @@ static int apple_sleep_validate_cpu_topology(struct apple_sleep *s) soc->cpu_cores_per_cluster > 32) return dev_err_probe(s->dev, -EINVAL, "invalid CPU-start geometry\n"); - if (soc->machine && (!of_machine_is_compatible(soc->machine) || - cpu_logical_map(0) != soc->boot_mpidr || - num_possible_cpus() != soc->cpu_count)) - return dev_err_probe(s->dev, -EINVAL, "unsupported board/CPU inventory\n"); + if ((soc->boot_mpidr || soc->cpu_count) && + (cpu_logical_map(0) != soc->boot_mpidr || + num_possible_cpus() != soc->cpu_count)) + return dev_err_probe(s->dev, -EINVAL, "unsupported CPU inventory\n"); index = of_property_match_string(np, "reg-names", "cpu-start"); if (index < 0)