diff --git a/devices/j2a/README.md b/devices/j2a/README.md index 73a42cbd..ae005204 100644 --- a/devices/j2a/README.md +++ b/devices/j2a/README.md @@ -96,3 +96,77 @@ stalls EP0 on the composite `g_cdc` gadget): (`39.91 → 359.76 s`), incremented `state1/s2idle/usage` on both cores, and woke cleanly on both Home (IRQ 57) and Hold/Power (IRQ 58) with the same `boot_id` and USB (`2400 mA`), Wi-Fi (`brcmfmac`), backlight, battery, and NAND returning cleanly. + `__data = 0x16094`, `__const = 0x730`), `apple-sgx` powered on all 4 cores (`SGX543MP4 rev 1.2.2`, + `MASTER_CORE_ID = 0x01194401`), booted the microkernel (`host[0] 0x00000001`), and passed `bench 20` (20/20 2D fills + in 6822 µs, 341 µs/fill, zero `BIF_FAULT`). + +## Since the import (2026-12-03 → 12-04, 32 GB unit, Omarchy A from flash) + +Measured by [@Developerr86](https://github.com/Developerr86) on the same 32 GB unit, booting Omarchy A from its own +flash (root written from iOS), on [Developerr86/linux `j2a-bringup`](https://github.com/Developerr86/linux/commits/j2a-bringup) +and the image script in [his fork](https://github.com/Developerr86/orchard/tree/j2a-bringup/devices/j2a/bringup/kit/omarchy-build). +His full write-up is section 11 of `docs/bring-up/j2a.md` there; the dated notes are `devices/j2a/bringup/NOTES.md`. + +| | At the import | 2026-12-04 | +|---|---|---| +| Boot to the desktop | 1 min 10 s | **45-47 s** | +| L2 cache (1 MiB PL310) | off: iBoot leaves it off | **on**, latency <4 4 2>, prefetch ([linux#162](https://github.com/OrchardLinux/linux/pull/162)) | +| Memory latency / memcpy at 256 KiB | 81-164 ns / ~340 MB/s | **27.6 ns / 1522 MB/s** | +| Resolution | 1536×2048, or half size to stay usable | **native 1536×2048**, scale 2 | +| Full-screen turned copy | 73.6 ms | **28.6 ms** (NEON, [linux#163](https://github.com/OrchardLinux/linux/pull/163)) | +| App drawer open | 9-10 s | **0.35-0.74 s** of shell CPU, first frame 0.6-1.0 s | +| Shell ready after login | 20-29 s | **5.7 s** (QML compiled with the image) | +| Firefox start (CPU in 75 s) | 70-76 s, 11 processes | **53-56 s**, 7 processes; 38-44 s once cached | +| Buttons | none | Home, Power, volume, side switch | +| Wi-Fi | networks listed | **joins WPA2 from Settings, reaches the internet** | +| Rotation | portrait only | **all four orientations** from the accelerometer, side switch as rotation lock | + +How (each tried live first, then built into the image): +- **Kernel:** the L2 cache on at latencies proven on this SoC (the ADT's `<2 2 1>` corrupts reads); a NEON 4×4 + transpose for simpledrm's turned copy; simpledrm also offering the scanout's own shape plus a `flip`, so + rotation is a mode change instead of pixman turning every frame (about 3× the cost per frame on the A5X); the + buttons from the ADT's `/buttons`. +- **Omarchy A (image script):** + - boot: pacman's keyring rebuild masked (4 min of CPU every boot on the read-only root) and the + ConditionNeedsUpdate stamps; + - process storms removed: a battery script every second, menu guards in login shells, picker pings, Python + brightness queries; + - the app drawer laid out from the screen (it re-laid itself out 3-4 times an open from its unmapped window), opaque + and complete in its first frame; + - the shell's QML compiled with the image and served through Qt's unit-cache hook (Quickshell's `qs:@` URLs bypass + Qt's disk cache); + - Firefox defaults for two A9 cores; + - the rotation daemon driving simpledrm's modes, with touch turned by a libinput matrix; + - the lock screen keeping one square wallpaper decode across turns (5.5 s of CPU per turn before); + - Home as on iOS, Power going dark without a PIN, the Wi-Fi password prompt keeping focus, and Settings' Wi-Fi page + no longer rebuilding every row on each scan (Settings 40-80 s → 2 s). + +## Unmerged code + +- **Kernel:** [linux#162](https://github.com/OrchardLinux/linux/pull/162) (L2) and + [linux#163](https://github.com/OrchardLinux/linux/pull/163) (simpledrm NEON copy, landscape and flip). The buttons + ([59cc455a](https://github.com/Developerr86/linux/commit/59cc455a1)) are the same pins as + [linux#152](https://github.com/OrchardLinux/linux/pull/152). Still only in his fork: debugfs counters for the + copy, touch and the SFTL ([ccf9eeb2](https://github.com/Developerr86/linux/commit/ccf9eeb2b), + [75f5d946](https://github.com/Developerr86/linux/commit/75f5d9468), + [96aa8bee](https://github.com/Developerr86/linux/commit/96aa8bee4)), and an `apple-sgx` upright presentation that + gave no felt gain ([899ef643](https://github.com/Developerr86/linux/commit/899ef643d)). +- **Omarchy A:** the image script's shell, Firefox and rotation changes + ([his fork](https://github.com/Developerr86/orchard/tree/j2a-bringup/devices/j2a/bringup/kit/omarchy-build)), + which belong in omarchy-a. Several are written against the J2A image and need a general form first, for example + the rotation daemon choosing simpledrm modes when they are offered. + +## Open work + +The iPad 3 is usable for light work now. Still to do: +- **GPU:** the most important. The kernel side runs (power, Apple's microkernel, 2D fills, a render node), but there + is no userspace driver in Omarchy A yet. Project Cascadia's SGX Mesa ran the GLES2 suite on a J2A with linux#153 + (above); shipping it needs mesa#32 (licence and rework open) and an ARMv7 Mesa package. It would speed up the + shell (Qt Quick) and video, not Firefox (WebRender needs GLES 3). +- **Sound:** the CS42L63 plays and records (above); the desktop has no audio session on this image yet. +- **Camera:** [linux#140](https://github.com/OrchardLinux/linux/pull/140) and a firmware recipe for the H4ISP. +- **Bluetooth:** the BCM4330B1 patchram scans BLE (above); it needs the recipe and the image path. +- **Writing the flash:** the NAND driver and SFTL only read; the root is written from iOS and runs read-only under a + RAM overlay, so nothing persists across boots. A writer for 8 KiB pages is proposed in linux#167 (not merged). +- **Performance and battery:** Firefox is still slow (software WebRender, about 40 s of CPU to start); GPU idle power, + the SoC's die sensor, the USB charge grant, suspend. diff --git a/devices/j2a/device.toml b/devices/j2a/device.toml index ddd01109..b9577e76 100644 --- a/devices/j2a/device.toml +++ b/devices/j2a/device.toml @@ -40,19 +40,19 @@ status = "supported" # GCC 11.4 and the J1 kit's config plus the J2A tree, but orchard's own clang build # has not booted on a J2A yet. [features] -display = "working" # 2026-12-03: iBoot's scanout, portrait (simpledrm with rotation = <90>; earlier simplefb with fbcon rotated). -screen_off = "untested" # Blanking worked through bl_power by hand; the power button needs linux#152, not yet in orchard's kernel. 2026-12-04: apple-pmu-wled bl_power 4 turns WLED strings off and 0 restores brightness cleanly (also blanks automatically across s2idle suspend/resume). +display = "working" # 2026-12-03: iBoot's scanout, portrait (simpledrm with rotation = <90>; earlier simplefb with fbcon rotated). 2026-12-04 (32 GB): native 1536x2048 upright; landscape and upside down through simpledrm's second mode and flip need linux#163. +screen_off = "untested" # Blanking worked through bl_power by hand; the power button needs linux#152, not yet in orchard's kernel. 2026-12-04: apple-pmu-wled bl_power 4 turns WLED strings off and 0 restores brightness cleanly (also blanks automatically across s2idle suspend/resume). 2026-12-04 (32 GB): Power darkens the panel (omarchy-powerd, backlight off) with the buttons from Developerr86/linux 59cc455a1 (the pins of linux#152). backlight = "working" # 2026-12-04: PMU WLED cycled 1658 -> 400 -> 200 -> 1658 / 2047 on 64 GB unit. gpu_desktop = "missing" # Needs linux#153 + ARMv7 SGX Mesa package. 2026-12-04: SGX543MP4 rev 1.2.2 (4 cores) + 12H321 sgx543.fw + gl-event.pds passed Cascadia Mesa 26.1.8 GLES2 suite and 2048x1536 KMS/GBM zero-copy CLCD scanout (glkms 40.3 FPS, tux-gpudemo 31.6 FPS). touch = "working" # 2026-12-03: drove the Omarchy A desktop; touchscreen-inverted-y, lost-frame lift (apple-z2). -buttons = "missing" -accelerometer = "missing" # Needs linux#137 (not in orchard's kernel yet). 2026-12-04: ST LIS331DLH (i2c2 @ 0x19) read live values on a 64 GB unit with that change. +buttons = "missing" # 2026-12-03 (32 GB): Home, Hold, volume up/down and the side switch all reported through gpio-keys on Developerr86/linux 59cc455a1, the same pins as linux#152. +accelerometer = "missing" # Needs linux#137 (not in orchard's kernel yet). 2026-12-04: ST LIS331DLH (i2c2 @ 0x19) read live values on a 64 GB unit with that change. 2026-12-04 (32 GB): the same node drove Omarchy A's auto-rotation in all four orientations through iio-sensor-proxy. gyroscope = "missing" # Needs linux#137 (not in orchard's kernel yet). 2026-12-04: ST L3G4200D (i2c2 @ 0x68) read live values on a 64 GB unit with that change. light_sensor = "missing" # Needs linux#137 (not in orchard's kernel yet). 2026-12-04: TAOS TSL2581 (i2c2 @ 0x39) read live values on a 64 GB unit with that change. touch_id = "none" storage_read = "working" # 2026-12-03: Omarchy A ran from LwVM partition 3 through the read-only NAND driver and SFTL on 8 KiB pages (32 GB PPN 1.6); 64 GB PPN 1.3 geometry also probed read-only. storage_write = "missing" # the NAND driver is read-only: no program or erase path; the root is written from iOS. -wifi = "working" # 2026-12-04: BCM4330 wlan0 (brcmfmac4330.bin built by firmware recipe) associated via WPA2-PSK (CCMP, -48 dBm, 65 MBit/s), obtained DHCP lease, and passed 4/4 gateway + internet ping (0% loss). +wifi = "working" # 2026-12-04: BCM4330 wlan0 (brcmfmac4330.bin built by firmware recipe) associated via WPA2-PSK (CCMP, -48 dBm, 65 MBit/s), obtained DHCP lease, and passed 4/4 gateway + internet ping (0% loss). 2026-12-03 (32 GB): joined a WPA2 network from Omarchy A's Settings and reached the internet. bluetooth_input = "working" # 2026-12-04: BCM4330B1 on UART3 (BCM4330B1.hcd built by firmware recipe) paired & bonded a BLE HID remote (BlueZ 5.86 + /dev/uhid), binding mouse (REL_X/REL_WHEEL) and keyboard (typed live on console) input devices. bluetooth_audio = "missing" cellular = "missing" # baseband (n90) present in the ADT, left unclaimed. diff --git a/docs/devices/j2a.md b/docs/devices/j2a.md index aac863f6..f9367563 100644 --- a/docs/devices/j2a.md +++ b/docs/devices/j2a.md @@ -13,19 +13,19 @@ Generated by `tools/catalog/generate matrix` from `devices/j2a/device.toml`; do Driver: this board's device tree has not been read yet (`tools/catalog/generate kernel`). -- ✅ **Display**: 2026-12-03: iBoot's scanout, portrait (simpledrm with rotation = <90>; earlier simplefb with fbcon rotated). -- 🤔 **Screen on/off**: Blanking worked through bl_power by hand; the power button needs linux#152, not yet in orchard's kernel. 2026-12-04: apple-pmu-wled bl_power 4 turns WLED strings off and 0 restores brightness cleanly (also blanks automatically across s2idle suspend/resume). +- ✅ **Display**: 2026-12-03: iBoot's scanout, portrait (simpledrm with rotation = <90>; earlier simplefb with fbcon rotated). 2026-12-04 (32 GB): native 1536x2048 upright; landscape and upside down through simpledrm's second mode and flip need linux#163. +- 🤔 **Screen on/off**: Blanking worked through bl_power by hand; the power button needs linux#152, not yet in orchard's kernel. 2026-12-04: apple-pmu-wled bl_power 4 turns WLED strings off and 0 restores brightness cleanly (also blanks automatically across s2idle suspend/resume). 2026-12-04 (32 GB): Power darkens the panel (omarchy-powerd, backlight off) with the buttons from Developerr86/linux 59cc455a1 (the pins of linux#152). - ✅ **Backlight**: 2026-12-04: PMU WLED cycled 1658 -> 400 -> 200 -> 1658 / 2047 on 64 GB unit. - ❌ **GPU desktop**: Needs linux#153 + ARMv7 SGX Mesa package. 2026-12-04: SGX543MP4 rev 1.2.2 (4 cores) + 12H321 sgx543.fw + gl-event.pds passed Cascadia Mesa 26.1.8 GLES2 suite and 2048x1536 KMS/GBM zero-copy CLCD scanout (glkms 40.3 FPS, tux-gpudemo 31.6 FPS). - ✅ **Touchscreen**: 2026-12-03: drove the Omarchy A desktop; touchscreen-inverted-y, lost-frame lift (apple-z2). -- ❌ **Buttons** -- ❌ **Accelerometer**: Needs linux#137 (not in orchard's kernel yet). 2026-12-04: ST LIS331DLH (i2c2 @ 0x19) read live values on a 64 GB unit with that change. +- ❌ **Buttons**: 2026-12-03 (32 GB): Home, Hold, volume up/down and the side switch all reported through gpio-keys on Developerr86/linux 59cc455a1, the same pins as linux#152. +- ❌ **Accelerometer**: Needs linux#137 (not in orchard's kernel yet). 2026-12-04: ST LIS331DLH (i2c2 @ 0x19) read live values on a 64 GB unit with that change. 2026-12-04 (32 GB): the same node drove Omarchy A's auto-rotation in all four orientations through iio-sensor-proxy. - ❌ **Gyroscope**: Needs linux#137 (not in orchard's kernel yet). 2026-12-04: ST L3G4200D (i2c2 @ 0x68) read live values on a 64 GB unit with that change. - ❌ **Light sensor**: Needs linux#137 (not in orchard's kernel yet). 2026-12-04: TAOS TSL2581 (i2c2 @ 0x39) read live values on a 64 GB unit with that change. - – **Touch ID** - ✅ **Internal storage read**: 2026-12-03: Omarchy A ran from LwVM partition 3 through the read-only NAND driver and SFTL on 8 KiB pages (32 GB PPN 1.6); 64 GB PPN 1.3 geometry also probed read-only. - ❌ **Internal storage write**: the NAND driver is read-only: no program or erase path; the root is written from iOS. -- ✅ **Wi-Fi**: 2026-12-04: BCM4330 wlan0 (brcmfmac4330.bin built by firmware recipe) associated via WPA2-PSK (CCMP, -48 dBm, 65 MBit/s), obtained DHCP lease, and passed 4/4 gateway + internet ping (0% loss). +- ✅ **Wi-Fi**: 2026-12-04: BCM4330 wlan0 (brcmfmac4330.bin built by firmware recipe) associated via WPA2-PSK (CCMP, -48 dBm, 65 MBit/s), obtained DHCP lease, and passed 4/4 gateway + internet ping (0% loss). 2026-12-03 (32 GB): joined a WPA2 network from Omarchy A's Settings and reached the internet. - ✅ **Bluetooth input devices**: 2026-12-04: BCM4330B1 on UART3 (BCM4330B1.hcd built by firmware recipe) paired & bonded a BLE HID remote (BlueZ 5.86 + /dev/uhid), binding mouse (REL_X/REL_WHEEL) and keyboard (typed live on console) input devices. - ❌ **Bluetooth audio** - ❌ **Cellular**: baseband (n90) present in the ADT, left unclaimed.