Skip to content

arm64: dts: apple: t8132: clock spi3/spi4 from clkref, describe the laptops' DP855 - #3344

Closed
RyanTheTide wants to merge 2 commits into
mainfrom
fix/dt-parity-t8132-spi4-tcon
Closed

RyanTheTide wants to merge 2 commits into
mainfrom
fix/dt-parity-t8132-spi4-tcon

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

What: M4: clock spi3/spi4 from clkref (they name peripheral_clocks, which no driver provides, so spi-apple can never probe them) and describe the DP855 panel timing controller on the M4 laptops (J604/J713/J715), with the J713/J715 spi4 power state on. Draft: the hardware row needs a kernel built from this tree (see Not yet). Found by the fleet DT-parity sweep.
Tested: J713 (fleet85, production Stage 2) with the production DTB plus these nodes: spi4 does NOT bind yet (apple-spi ... -110), because the running kernel re-applies its own built-in J713 power-domain policy (ps_spi4 off) at boot; no other effect (s2idle 1/1, 0 failed units, 0 faults)
Risk: two-way door · M4 laptops J604, J713, J715 (spi clock: every T8132 board, but spi3/spi4 stay disabled elsewhere)
Not yet: J713 row with a kernel built from this branch (t8132-platform-handoff embeds t8132-j713-pmgr.dtsi, so the ps_spi4 change only takes effect with a matching kernel); J604/J715 rows

Details
  • spi-apple takes its clock with devm_clk_get_enabled(). apple,t8132-pmgr-clocks (peripheral_clocks) has no driver, so spi3/spi4 with <&peripheral_clocks N> defer forever. The T8132's working SPI controllers and every other Apple SPI run from the 24 MHz clkref.
  • DP855: the J604 and J713 ADTs both list /arm-io/spi4/dp855 with chip select GPIO 76 (function-spi_cs0); the J773 has none. Described in t8132-laptop.dtsi (its includers are J604, J713, J715) with the J413's SPI timing; i2c-dp855 is a read-only adapter that arbitrates with the display firmware through the controller's lock.
  • The J713/J715 pmgr file enables only qualified domains; ps_spi4 (parent spi_p, already on) is turned on there.
  • Not included: the internal PCIe PIODMA engine. apple-piodma limits its packets to 36 address bits, while the J713's PCIe DART window starts at bit 40 (apple,dma-range) and the ADT gives the engine 42 address bits (piodma-num-address-bits): the probe fails with -ENOMEM. That needs driver work first.
  • dtschema base vs head on every T8132 DTB: 0 new warnings; ADT coverage / DART power domains: 0 new; sibling drift: 1 note (cs-gpios, board wiring). checkpatch --strict clean.
Evidence

J713 guarded DT-only one-shots (production Stage 2, only the board DTB changed), kernel 7.3.0-aurora-fleet85 (main 2ad96595):

  • apple-spi 3ad110000.spi: deferred probe timeout, ignoring dependency then probe ... failed with error -110; the runtime tree has power-controller@390 (spi4) okay, but no device is created for it: t8132-platform-handoff.c rewrites J713 domain status from the kernel's built-in copy of t8132-j713-pmgr.dtsi on the J713 loader's tree.
  • Everything else on those boots: s2idle 1/1, Wi-Fi ping 0 % loss, 0 failed units, 0 SELinux denials, 0 DART faults; back on production afterwards.

spi3 and spi4 named peripheral_clocks, which no driver provides, so
spi-apple's devm_clk_get_enabled() would defer them forever once
enabled. Every other Apple SPI controller, including the T8132's
enabled ones, runs from the 24 MHz clkref; use it here too.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…ptops

The J604 and J713 ADTs both list the DP855 panel timing controller on
spi4 (/arm-io/spi4/dp855), chip select GPIO 76 (function-spi_cs0).
i2c-dp855 drives it as a read-only I2C adapter and shares the
controller's I2C engine with the display firmware through its lock; it
already binds on the M2 Air with the same SPI timing.

Describe it in t8132-laptop.dtsi (J604, J713, J715) and turn on the spi4
power state on the J713 and J715, whose pmgr file lists only qualified
domains (its parent, spi_p, is already on).

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: FINISH, then merge at e03e6690a4dc

Blockers: None in the change.

Checked: Reviewed all three DT changes and the parade,dp855 SPI subdevice binding. Targeted schema validation of the owner J604, J713 and J715 DTBs produced no diagnostics. Reviewed the reported built-in power-domain policy dependency.

Evidence

The tested kernel predates the PMGR mirror change and logs -110 during SPI4 probe. The common include enables GPIO 76 on all three laptops, and the cited ADT observations cover J604 and J713.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Superseded by #3365 (same two commits rebased onto main after #2395, which this conflicted with; no force push). #3365 carries the J713 row with a kernel built from it: spi4 + DP855 bind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant