Repository navigation
ARM: dts: apple: ipad3: Add I2C1 and I2C2 sensor buses - #137
Merged
Merged
Conversation
Describe i2c1 and i2c2 and their IIO sensors in the shared iPad 3 device
tree (s5l8945x-ipad3.dtsi, shared by J1, J2 and J2A) from the 13G37 ADT:
- i2c1 (0x3300000, IRQ 19, pins gpio101/gpio102, PMGR 0x3f101138):
- AKM AK8975B compass at 0x0e (asahi-kasei,ak8975; WIA 0x48)
- i2c2 (0x3400000, IRQ 20, pins gpio80/gpio81, PMGR 0x3f10113c):
- ST LIS331DLH 3-axis accelerometer at 0x19 (st,lis331dlh-accel; WHO_AM_I 0x32)
- TAOS TSL2581 ambient light sensor at 0x39 (amstaos,tsl2581; ID 0x93)
- ST L3G4200D 3-axis gyroscope at 0x68 (st,l3g4200d-gyro; WHO_AM_I 0xd3;
the ADT's alternate gyro1 at 0x6a is unpopulated on the tested unit)
All four drivers are already enabled in orchard_applearmv7_defconfig
(IIO_ST_ACCEL_3AXIS=y, AK8975=y, IIO_ST_GYRO_3AXIS=m, TSL2583=m).
Tested on a 64 GB iPad 3 GSM (iPad3,3 / J2A) booted via kloader + kDFU
from iOS 8.4.1 (12H321): all four IIO devices probed cleanly with live
readings, and all three DTBs (s5l8945x-j1, -j2, -j2a) build cleanly with
W=1.
Signed-off-by: Ali Reay <alistair.reay@gmail.com>
henrikklee
pushed a commit
to OrchardLinux/orchard
that referenced
this pull request
Dec 4, 2026
…dings Record hardware verification on a 64 GB iPad 3 GSM (iPad3,3 / J2A) booted from untethered iOS 8.4.1 (12H321) via kloader + kDFU: - Backlight, battery telemetry, net positive charging (+242 mA), speakers and internal microphone (39.1x loopback SNR), USB serial and USB host verified working on J2A. - I2C1/I2C2 sensors (LIS331DLH accelerometer, L3G4200D gyroscope, TSL2581 ALS, AK8975 compass) verified working on J2A (and marked untested on J1), depending on OrchardLinux/linux#137. - Bluetooth (BCM4330B1 Mike Module patchram carved from 12H321 BlueTool) marked untested with live BLE scan verified. - Documented 64 GB PPN 1.3 NAND geometry (read-only probe) and SGX543MP4 rev 1.2.2 4-core microkernel boot + 2D fill benchmark in devices/j2a/README.md.
|
Merged as it is — thank you @alistairreay! The tilt sensor, gyroscope, light sensor and compass are now on for all three iPad 3 models through the shared file. Follow-ups, none blocking: the sensors' mount matrix (so auto-rotate turns the right way; #63 shows the pattern), and the second possible gyroscope address 0x6a from the ADT. orchard picks this up when it next moves its 32-bit kernel lock, and the iPad 3 sensor entries in the device data follow then. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
i2c1andi2c2(plus their GPIO pinmuxes) and their four IIO sensors to the shared iPad 3 device tree (arch/arm/boot/dts/apple/s5l8945x-ipad3.dtsi), benefiting all three iPad 3 boards (j1,j2, andj2a):i2c1(0x3300000, IRQ 19,gpio101/gpio102, PMGR0x3f101138 = 0x2ff):compass@e(asahi-kasei,ak8975) — verifiedWIA (0x00) = 0x48i2c2(0x3400000, IRQ 20,gpio80/gpio81, PMGR0x3f10113c = 0x2ff):accelerometer@19(st,lis331dlh-accel) — verifiedWHO_AM_I (0x0f) = 0x32als@39(amstaos,tsl2581) — verifiedID (0x92) = 0x93gyro@68(st,l3g4200d-gyro) — verifiedWHO_AM_I (0x0f) = 0xd3(0x6areturned-ENXIOon the tested unit)No defconfig changes are needed:
orchard_applearmv7_defconfigalready enablesCONFIG_IIO_ST_ACCEL_3AXIS=y,CONFIG_AK8975=y,CONFIG_IIO_ST_GYRO_3AXIS=m, andCONFIG_TSL2583=m.Hardware testing
Tested on a 64 GB iPad 3 (GSM) (
iPad3,3/j2a, A5X / S5L8945X) booted into RAM from untethered iOS 8.4.1 (12H321) viakloader+ kDFU (13G37 patched iBSS/iBEC, GCC 11.4 ARMv7zImage):iio:device0 (lis331dlh): live fluctuating readings (-857, -9, -458atscale = 0.009806 m/s²→~9.52 m/s²)iio:device1 (l3g4200d): live fluctuating angular velocity (-458, 214, -165atscale = 0.000153 rad/s)iio:device2 (tsl2581): probed cleanly (Light sensor found.), proportional raw photodiode counts across gain1 → 16 → 111(0 → 3 → 23both,0 → 1 → 5IR in a dim room)iio:device3 (1-000e / ak8975): live fluctuating magnetic field (51, 38, 37atscale ~0.0034 G→~0.24 G)Build validation
Compiled all three iPad 3 DTBs against
orchard_applearmv7_defconfigwithW=1(zero warnings/errors):