Repository navigation
soc: apple: sleep, mfd: macsmc: take the T8142 late SMC notice from the DT - #3736
RyanTheTide wants to merge 3 commits into
Conversation
J813's SMC is told of a deep sleep last, after SEP and the other
coprocessors have stopped, over the bounded saved-state transport
(linux#3172). Both drivers chose that by machine name
(of_machine_is_compatible("apple,j813")), and sleep.c also kept a
read-only j813_smc_late module parameter for it, on by default.
Describe it instead: apple,sleep-late-notice on the SMC node, set in
the J813 device tree. macsmc enables the saved transport for an SMC
with the property, and the sleep controller defers the notice when an
available node carries it. The parameter goes away (its default is
the behaviour). No board names are left in either driver for this.
The J815 shares the T8142 SoC but never had the late notice; its tree
does not get the property, so nothing changes there. J813 behaves as
before with the in-tree DTB.
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
J813 and J815 share the T8142 sleep controller, SMC and ANS, and the reason for the late notice is the SoC's sequence: ANS fails its IDLE handshake when the SMC is told first. The J815 deep sleep runs behind linux#3134 and linux#3135 were taken with the notice after the peers (linux#2384 in the candidate). Move apple,sleep-late-notice from the J813 tree to the SMC node both boards share. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
There was a problem hiding this comment.
Verdict: MERGE at ac2c39c
Checked: binding, DTSI and both drivers.
- macsmc: the saved transport is now enabled by
apple,sleep-late-noticeon its own node, or byapple,t8103-smcas before. - sleep.c: the notice is deferred when any available node carries the property. It is read once at probe, and
apple_sleepis already dereferenced just above the new return inapple_sleep_smc_defer_notice(), so nothing new is dereferenced. - The property sits on the SMC node J813 and J815 share, so J813 is unchanged. J815 gains the late notice and the saved transport, which is the path its #3134/#3135 PASS rows ran with #2384. No other DT carries the property. The
j813_smc_lateparameter (default on) and both board checks are gone.
Follow-ups: - The
apple,t8103-smcfallback compatible also matches the t6020…t8142 SMCs (your side note). That needs a separate issue with rows on those Macs. - Reconcile or close #2384's overlapping sleep/macsmc half once this lands.
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
|
Tested at
Details
|
DjDeveloperr
left a comment
There was a problem hiding this comment.
Correct, and it removes the board name and the TEST ONLY parameter. J813 behaves as before with the in-tree DTB, and the J813 row at ac2c39c passed. J815 newly gets the late notice, so the J815 deep-sleep row at this head (or its merge-up) is the hardware gate left. #3791 adds J704 with of_machine_is_compatible("apple,j704"). Whichever lands second should switch J704 to this property. The branch conflicts with main and needs a merge-up. I'll re-approve at the merged head.
Two conflicts, both where main moved the lines this branch replaces: - macsmc.c: main added apple,t8112-smc to the saved-transport condition. Keep it, and keep this branch's apple,sleep-late-notice in place of the J813 machine check. - sleep.c: main added the refuse_late parameter next to j813_smc_late. Keep refuse_late; j813_smc_late goes, as on this branch. Signed-off-by: DjDeveloperr <hey@djdev.me>
|
Merged main into this branch as
Against main
What's left:
T8142 machines aren't in our fleet, so those rows have to come from their owners. |
|
Independent review of merge Against main, the merge is exactly this PR's four hunks:
Nothing in the tree still refers to |
What: take the T8142 "tell the SMC last" sleep behaviour from the device tree instead of the machine name.
sleep.chadof_machine_is_compatible("apple,j813")plus a TEST ONLYapple_sleep.j813_smc_lateparameter (default on), andmacsmc.chad its ownof_machine_is_compatible("apple,j813")for the bounded saved-state transport the late notice needs (#3172 audit gate). New booleanapple,sleep-late-noticeon the SMC node (binding inmfd/apple,smc.yaml): macsmc enables the saved transport for an SMC with it, and the sleep controller defers the SMC notice when an available node carries it. The parameter goes; no board names left for this in either driver. The property is set on the SMC node J813 and J815 share (t8142-j813-j815.dtsi).Tested: no hardware row (T8142 boards are not in our fleet). Buildbox at
ac2c39ca86b3:sleep.o+macsmc.owith arm64 defconfig + asahi.config, LLVM=1, W=1: 0 warnings (same asmain).make dtbs(all arm64): 0 warnings; DTB diff againstmain: onlyt8142-j813.dtbandt8142-j815.dtbchange, each by the oneapple,sleep-late-notice;line.dt_binding_check DT_SCHEMA_FILES=mfd/apple,smc.yamlclean;CHECK_DTBS=yon t8142-j813, t8142-j815, t8142-j704, t6050-j714s clean. KUnit on arm64 QEMU (macsmc.kunitconfig +APPLE_SOC_SLEEP_KUNIT_TEST, test merge 5af4bc20740c with the other two B1-GATES branches): 55 tests, 54 passed, 1 skipped (needsUCLAMP_TASK).Risk: two-way door; T8142 J813 and J815 deep sleep only (J704 has neither a sleep controller nor the property). J813: same as today with the in-tree DTB. J815: gets the late notice it did not have on
main; that is the path its deep-sleep PASS rows in #3134/#3135 ran (j815/prtest-r8carried #2384, which turns it on for all T8142). Other SoCs: unchanged (T8103 keeps its gen-1 path; no other DT has the property).Not yet: deep-sleep rows at this head from the owners: @m0d16l14n1 (J815) and J813 (@sithglan, @gig3m, @DjDeveloperr per #2384). Overlaps #2384, which moves the same two checks to a
smc_notice_after_peersSoC flag and keeps the parameter; this PR does the sleep/macsmc half by DT instead, and #2384'sdcp.cchange is not covered here.Details
Commits:
soc: apple: sleep, mfd: macsmc: take J813's late SMC notice from the DT: binding, driver changes, property int8142-j813.dts.arm64: dts: apple: t8142: give J815 the late SMC notice too: moves the property to the SMC node int8142-j813-j815.dtsi.sleep.c reads the property at probe with
of_find_node_with_property()(the SMC can probe before or after the sleep controller; the answer is read at suspend). macsmc reads it from its own node at probe.Side note, not changed here: macsmc's other condition for the saved transport,
of_device_is_compatible(np, "apple,t8103-smc"), is meant for T8103, butapple,t8103-smcis also the fallback compatible of t6020/t6030/t6031/t6041/t8122/t8132/t8140/t8142 SMC nodes, so it is true on those too. Flagged for a separate fix with rows on those Macs.