diff --git a/arch/arm64/boot/dts/apple/t6050-k114c.dts b/arch/arm64/boot/dts/apple/t6050-k114c.dts index bb92a59450028..6ca77f5853b25 100644 --- a/arch/arm64/boot/dts/apple/t6050-k114c.dts +++ b/arch/arm64/boot/dts/apple/t6050-k114c.dts @@ -62,3 +62,16 @@ */ #include "t6050-k114-k116-usb.dtsi" #include "t6050-k114-usb.dtsi" + +/ { + aliases { + sio = &sio; + }; +}; + +/* Keep J716c's unqualified sleep description disabled. */ +#include "t6050-j716c-sleep.dtsi" + +&hpm5 { + status = "okay"; +}; diff --git a/drivers/soc/apple/sleep-t6050.h b/drivers/soc/apple/sleep-t6050.h index e57a42caa4e14..15f3260a57e9d 100644 --- a/drivers/soc/apple/sleep-t6050.h +++ b/drivers/soc/apple/sleep-t6050.h @@ -3980,7 +3980,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, @@ -4113,7 +4112,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 ad445bdccacc5..fff2949b352d3 100644 --- a/drivers/soc/apple/sleep-test.c +++ b/drivers/soc/apple/sleep-test.c @@ -297,7 +297,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; @@ -308,7 +308,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); @@ -346,13 +345,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 4c25f5fd21cbf..f12ca7b3ee6d4 100644 --- a/drivers/soc/apple/sleep.c +++ b/drivers/soc/apple/sleep.c @@ -710,7 +710,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; @@ -2216,9 +2215,9 @@ 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"); - /* The node's compatible chose the profile: its machine is where it was measured */ - if (soc->machine && (cpu_logical_map(0) != soc->boot_mpidr || - num_possible_cpus() != soc->cpu_count)) + 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");