Skip to content

arm64: dts: apple: t8142: lid angle sensor on J815 and J813 (on #1532) - #1805

Merged
DjDeveloperr merged 7 commits into
aurora-silicon:integration/aurorafrom
m0d16l14n1:j815/t8142-lid-angle
Nov 17, 2026
Merged

DjDeveloperr merged 7 commits into
aurora-silicon:integration/aurorafrom
m0d16l14n1:j815/t8142-lid-angle

Conversation

@m0d16l14n1

@m0d16l14n1 m0d16l14n1 commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Draft, stacked on #1532 (the J815 device tree; J815 only gets its &aop node there). The net change is the last three commits: m0d16l14n1/linux@c93ee62...m0d16l14n1:linux:j815/t8142-lid-angle

  1. dt-bindings: apple,t8142-aop-las.
  2. t8142-j815.dts: las under &aop. The J815 AOP firmware announces a "las" service. macOS 27.2 on this machine binds it as an AppleSPUHIDDevice with usage page 0x20 and usage 0x8a, the report aop_las decodes (as on T6050, arm64: dts: apple: t6050: Add the AOP lid angle sensor #1548). The ADT's i2c1 mogul-las is the sensor's authentication chip, not the angle. No driver change is needed: aop_las matches apple,aop-las.
  3. t8142-j813.dts: the same las node, @gig3m's diff from the J813 run below. The J813 AOP registers las.2.auto next to als.

Tested on J815: aop-sensors-las probes, in_angl_raw reads 109 with in_angl_scale pi/180, and it still reads after s2idle.

Tested on J813 (@gig3m, Mac17,3, 27.0 stub, driver bound by hand without the node): in_angl_scale 0.017453293, and in_angl_raw reads 107 and follows the lid (107, 53, 129, 23, 116). No extra AOP mailbox interrupts arrive while the lid is still. Not yet booted with the node itself, and not read after s2idle.

CHECK_DTBS with apple,aop-las.yaml is clean for J813 and J815. Both DTBs carry the node.

Part of the J815 (MacBook Air 15-inch, M5, T8142) bring-up: board results are summarised in discussion #135. Tested on a J815 with a macOS 27.0 stub (firmware 27.0) through aura Stage 2.

Assisted-by: Claude Opus 5.5

The T8142 AOP firmware announces the "las" lid angle service, as T6050's
does.

Assisted-by: Claude Opus 5.5
Signed-off-by: Nick <nekreshen@yandex.ru>
The J815 AOP firmware announces "las": macOS 27.2 binds it on this
machine as an AppleSPUHIDDevice with usage page 0x20 and usage 0x8a,
the report aop_las decodes. Describe the service. The ADT's i2c1
"mogul-las" is the sensor's authentication chip, not the angle.

On J815 the IIO device reads in_angl_raw 109 (scale pi/180), and it
still reads after s2idle.

Assisted-by: Claude Opus 5.5
Signed-off-by: Nick <nekreshen@yandex.ru>
@gig3m

gig3m commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

J813 has the same service, and aop_las reads it.

J813 (Mac17,3, 27.0 stub), integration/aurora 5d112b1 merged with #1532 at 0434a61:

  • the AOP registers a las service device next to als (las.2.auto)
  • aop-sensors-las probes, in_angl_scale 0.017453293
  • in_angl_raw reads 107 with the lid at its usual angle, and follows the lid: 107, 53, 129, 23, 116 as I moved it
  • no extra AOP mailbox interrupts while the lid is still

How I tested: on the running system, without the node. I bound the driver to the service device by hand (driver_override set to iio_aop_las, then drivers_probe). The node below compiles, but I have not booted with it yet.

--- a/arch/arm64/boot/dts/apple/t8142-j813.dts
+++ b/arch/arm64/boot/dts/apple/t8142-j813.dts
@@ -135,6 +135,14 @@ &aop {
 	aop_als: als {
 		compatible = "apple,t8142-aop-als", "apple,aop-als";
 	};
+
+	/*
+	 * Lid angle: the J813 AOP firmware announces a "las" service, as the
+	 * J815's does, and aop_las reads the hinge angle from it.
+	 */
+	aop_las: las {
+		compatible = "apple,t8142-aop-las", "apple,aop-las";
+	};
 };

Not tested: a read after s2idle with it bound.

Assisted-by: Claude Fable 5.2

The J813 AOP firmware registers the same "las" service as the J815's,
next to "als". Describe it, as on J815.

gig3m tested this on a J813 (Mac17,3, 27.0 stub) by binding aop_las to
the service device by hand. in_angl_scale reads 0.017453293, and
in_angl_raw reads 107 and follows the lid (107, 53, 129, 23, 116). No
extra AOP mailbox interrupts arrive while the lid is still. The node is
gig3m's diff. It compiles but has not been booted yet.

Link: aurora-silicon#1805 (comment)
Assisted-by: Claude Opus 5.5
Signed-off-by: Nick <nekreshen@yandex.ru>
@m0d16l14n1 m0d16l14n1 changed the title arm64: dts: apple: t8142-j815: lid angle sensor (on #1532) arm64: dts: apple: t8142: lid angle sensor on J815 and J813 (on #1532) Nov 14, 2026
@m0d16l14n1

Copy link
Copy Markdown
Contributor Author

@gig3m Thank you. Your J813 node is in as 508b1cd, with your test results in the commit message and the PR body. The branch also merges #1532's current head, c93ee62.

@m0d16l14n1
m0d16l14n1 marked this pull request as ready for review November 15, 2026 04:55
@m0d16l14n1

Copy link
Copy Markdown
Contributor Author

@DjDeveloperr out of draft, parent-first on #1532 (alias fix merged in). The lid angle follows the lid on the J815 (27.2 stub, checked by probing at several angles) and on @gig3m's J813 (his node is in 508b1cd). Please review.

Assisted-by: Claude Opus 5.5

Keep only the three Air lid-angle patches on the merged parent tree.

Signed-off-by: Diljit Singh <hey@djdev.me>
J514s and J516s already use the T6030, T6020 and generic compatible tuple. Document that exact list without changing the DTS or driver.

Signed-off-by: Diljit Singh <hey@djdev.me>
@DjDeveloperr
DjDeveloperr merged commit d4791aa into aurora-silicon:integration/aurora Nov 17, 2026
2 checks passed
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.

3 participants