Repository navigation
arm64: dts: apple: AOP motion sensors on every laptop, J180d die 0 SIO alias, M2 Pro/Max/Ultra scaler - #2793
RyanTheTide wants to merge 3 commits into
Conversation
…ery laptop The AOP accelerometer and gyroscope children were described only in t6000-j316s.dts and t8112-j413.dts, the two machines whose Apple device trees were at hand. The other 14" and 16" M1 Pro/Max MacBook Pros (J314s, J314c, J316c) and the other M2 laptops (J415, J493) share the same AOP and are left without them. Nothing in the description is board specific. The AOP core creates a service device only when the firmware announces the "accel" or "gyro" service, and gives it the AOP child of the same name. The driver then starts the sensor only with the calibration the bootloader copies into that child from the Apple device tree, and returns -ENODEV with one info line otherwise. On a machine without the sensor the child stays unused. Move the children to t600x-j314-j316.dtsi, next to the AOP enable of every M1 Pro/Max laptop, and to the AOP node in t8112.dtsi, next to the las and als services that are already there. The T8112 Mac mini (J473) keeps its AOP disabled, so the children are inert there. The J316s and J413 DTBs are byte-identical before and after. Fixes: 165f4bd ("arm64: dts: apple: describe reference Mac motion and peripheral endpoints") Signed-off-by: Ryan Murray <[email protected]>
The Mac Pro's die 0 HDMI port has its audio controller (dpaudio1) enabled, and that controller takes its DMA from the die 0 SIO. The loader sets up and enables each SIO it finds through an alias, and t6022-jxxxd.dtsi only aliases the die 1 SIO (sio1), so the die 0 SIO stays disabled and the die 0 HDMI port has no audio. Add the sio alias for the die 0 SIO. The Mac Studio (J475d) is not changed: all its display outputs, and their audio, run from die 1. This is the SIO hunk of linux#1115, split from that PR's Neural Engine changes so it can be reviewed on its own. Signed-off-by: Ryan Murray <[email protected]>
The scaler matched T8103, T6000, T8112 and the M4/A18 Pro engines, but not T6020, T6021 or T6022. Their device trees describe the MSR engines (one on M2 Pro, two on M2 Max, four on M2 Ultra) and keep them disabled because nothing would bind. The driver needs two things from a variant: the number of register ranges and whether the engine has the MSR20 control block (M4 and later). The T602x nodes have the T8112 register map: three ranges of 0x28000, 0x4000 and 0x4000 bytes at +0, +0x210000 and +0x204000, two DART streams, and the "apple,scaler" fallback. The scaler binding already puts apple,t6020/t6021/t6022-scaler in the same constraint group as apple,t8112-scaler. They are M2-generation engines, before MSR20. Use the T8112 data for them. Enable the engines and their DARTs in the T6020, T6021 and T6022 peripheral trees, so every board with the SoC gets them. The DARTs name the MSR domain of their own die since commit 4109497 ("arm64: dts: apple: t602x: give the scaler and external DCP DARTs their power domains"), so the DART's first register read finds its block powered. The engines additionally vote the T602x media fabric domain (ps_afr), which the driver links through its power-domain list. T8103, T6000/T6001/T6002 and T8112 device trees are unchanged. Signed-off-by: Ryan Murray <[email protected]>
|
Review at 6f0d2c1 (non-author, draft). No blocker found in the three commits; none of them has a hardware row yet, and the scaler commit should have a boot row before it merges.
Small points, not blocking:
Assisted-by: LLM (Claude:Opus 5.5) |
RyanTheTide
left a comment
There was a problem hiding this comment.
Independent source review at 6f0d2c1deacd. The T8112 motion nodes now live under the shared AOP. I checked that they still need an advertised service, so a J473 with an AOP enabled later should not register desktop motion sensors by default. Please verify that in the J473 AOP bring-up and confirm both J413 devices still report calibrated data. The scaler and SIO changes have independent hardware dependencies and should retain their own validation.
|
Folded into #2804, which carries this PR's commits unchanged; review continues there. |
Replaces #2248, #2250 and #2252 (same changes, commit trailers fixed).
Three small spec12 changes, one commit each, in this order:
arm64: dts: apple: t600x, t8112: describe the AOP motion sensor on every laptop (was #2248)
Problem
The AOP accelerometer and gyroscope were described only on the J316s and J413 (165f4bd, 0064b75), because those were the two machines whose device trees were at hand. Their sibling laptops have the same AOP service but get no motion sensor.
Change
Move the accel and gyro children from
t6000-j316s.dtsandt8112-j413.dtstot600x-j314-j316.dtsiand the AOP node int8112.dtsi. This reaches the J314s, J314c and J316c (M1 Pro/Max MacBook Pro) and the J415 and J493 (M2 laptops). The J473 (M2 mini) gets them under its disabled AOP node, where they do nothing. T8103, T602x and the desktops are not touched.Testing
aop.rs(register_service) creates the device only when the firmware announces the service.aop_motion.rsstarts it only with the calibration m1n1 copies from the ADT; without that it logs one info line and returns -ENODEV.Still to run
aop-sensors-accelandaop-sensors-gyrostill listed in/sys/bus/iio/devices/*/name.arm64: dts: apple: t6022-j180d: alias the die 0 SIO (was #2250)
Problem
On the Mac Pro (J180d) the die 0 HDMI port's audio controller (
dpaudio1) is enabled, but it takes its DMA from the die 0 SIO (dmas = <&sio 0x66>). The loader sets up and enables each SIO it finds through an alias, andt6022-jxxxd.dtsionly aliases the die 1 SIO (sio1). So the die 0 SIO stays disabled and the die 0 HDMI port has no audio.Change
Add the
sioalias for the die 0 SIO int6022-j180d.dts. This is the SIO hunk of #1115, split from that PR's Neural Engine changes so it can be reviewed on its own. The Mac Studio (J475d) is not changed: every display output it has, and their audio, runs from die 1.Testing
DTB diff against 0abc2f3: J180d gains only the alias; J475d is unchanged.
Still to run
A J180d owner: die 0 SIO
statusreadsokay,aplay -llists the HDMI card, and audio plays to an HDMI sink.media: apple: scaler: add the M2 Pro, Max and Ultra engines (was #2252)
Problem
The scaler (MSR) driver did not list the M2 Pro, Max and Ultra engines (T6020/T6021/T6022), so those Macs had no hardware scaler. d34ed1e left T602x out, and c91d838 described the T602x nodes as disabled until a driver qualified them.
Change
Match
apple,t6020-scaler,apple,t6021-scalerandapple,t6022-scalerwith the T8112 variant data. Enable the engines and their DARTs int6020-peripherals.dtsi,t6021-peripherals.dtsiandt6022-peripherals.dtsi: one engine on M2 Pro, two on M2 Max, four on M2 Ultra. The T602x nodes use the T8112 register map: three ranges at the same offsets and sizes, two DART streams and theapple,scalerfallback.apple,scaler.yamlalready groups these compatibles withapple,t8112-scaler.Testing
make W=1 drivers/media/platform/apple/scaler/(arm64, LLVM): no warnings before or after.statuslines.Still to run
An M2 Pro/Max/Ultra owner: one probe line per engine with no DART faults,
v4l2-compliance -son the scaler node, and a 1080p NV12 to BGRxv4l2convertpipeline that reaches EOS. Please also report the engineidvalue (J413 reads 0x10c000a).Per-SoC detail
ps_afr). The probe reads only the ID, running and IRQ status registers, with the engine powered, and a job that does not complete is caught by the 500 ms watchdog.