Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions drivers/soc/apple/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,12 @@ config APPLE_SOC_SLEEP
/chosen/aurora,s2r-mailbox.

Only SoCs whose sleep has been measured and tested are supported,
each by its match data: today T8140, T8132, T6030, T6050 and T8103. On every other
each by its match data: today T8140, T8132, T6030, T6050, T6020 and T8103. On every other
SoC the driver doesn't bind, and s2idle stays the only system sleep.

T8112 (M2) and T6020 (M2 Pro) have untested profiles: deep sleep is
offered there only with apple_sleep.deep=1, and a sleep is a dry run
that refuses before the commit unless apple_sleep.untested_commit=1.
T8112 (M2) has an untested profile: deep sleep is offered there only
with apple_sleep.deep=1, and a sleep is a dry run that refuses before
the commit unless apple_sleep.untested_commit=1.

T6041 (M4 Max) has a driver of its own, t6041-sleep, which binds
to an "apple,t6041-sleep" node and uses this driver's coprocessor
Expand Down
5 changes: 0 additions & 5 deletions drivers/soc/apple/sleep-t6020.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
* the same Avalanche/Blizzard generation, so the cache maintenance helpers, the PAC resume
* stub and the core power controls are T8112's and T8103's.
*
* Untested here, as T8112: deep sleep is offered only with apple_sleep.deep=1 and is never the
* default, and a sleep is a dry run that refuses after every check and before the first stop
* unless apple_sleep.untested_commit=1.
*
* The commit and the wake are the J414s sequence that two J414s units slept and woke with
* (aurora-silicon/linux#3336): macOS's sleep entry as traced under a hypervisor, replayed in
* its order. Where T6020 differs from T8112:
Expand Down Expand Up @@ -1400,7 +1396,6 @@ static const struct apple_sleep_ops t6020_sleep_ops = {

static const struct apple_sleep_soc t6020_sleep_soc = {
.ops = &t6020_sleep_ops,
.untested = true,
.early_context = true,
.commit_stops_cpus = true,
.no_pmu_notes = true,
Expand Down
8 changes: 6 additions & 2 deletions drivers/soc/apple/sleep-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,16 @@ static void apple_sleep_test_known_profiles(struct kunit *test)
/* T8142 has run full deep sleeps and wakes; T8122 has not yet. */
KUNIT_EXPECT_EQ(test, (int)soc->untested,
!strcmp(id->compatible, "apple,t8122-sleep"));
} else if (!strcmp(id->compatible, "apple,t8112-sleep") ||
!strcmp(id->compatible, "apple,t6020-sleep")) {
} else if (!strcmp(id->compatible, "apple,t8112-sleep")) {
const struct apple_sleep_soc *soc = id->data;

KUNIT_ASSERT_NOT_NULL(test, soc);
KUNIT_EXPECT_TRUE(test, soc->untested);
} else if (!strcmp(id->compatible, "apple,t6020-sleep")) {
const struct apple_sleep_soc *soc = id->data;

KUNIT_ASSERT_NOT_NULL(test, soc);
KUNIT_EXPECT_FALSE(test, soc->untested);
}
}
KUNIT_EXPECT_EQ(test, n, ARRAY_SIZE(apple_sleep_test_profiles));
Expand Down
Loading