Documentation
On this page

Subsystems

Touch

The ILI7807S touch controller: hardware, driver, boot-args, status and known issues.

Hardware

An Ilitek ILI7807S touch and display driver (TDDI) on SPI4 (0x11014000, chip select 0, at most 9.6 MHz), with its interrupt on GPIO 12 (falling edge) and its reset on GPIO 121. The tree names it oplus,tp_noflash: the chip has no flash, so a firmware must be sent to its RAM at every reset. The firmware is the vendor’s (FW_NF_ILI7807S_<panel maker>.bin); it comes off your own phone, never from a repository. The panel is 1080 x 2412, up to 10 fingers.

Driver

mtkloader sends the firmware before XNU starts (mtkili.h; mkilifw.py packs the file as the loader’s ilifw item, from the payload or from the root partition’s tail area) and leaves its table in memory. ILI7807S.cpp then drives the chip by hand over SPI4’s pins, with one report per low pulse on the interrupt line (MappleILIProtocol.h has the protocol), and sends the firmware again when the chip loses it: the version is asked for after a quiet spell with the screen on, and a chip that stays silent gets the firmware again (a host-download firmware only, at most twice a boot). The report’s coordinates (0 to 2047) are scaled to the panel.

Device tree

/arm-io/touch (ilitek,ili7807s): spi-gpios 13, 14, 144, 145; EINT 12 falling; max-x, max-y 2047; panel-size 1080 x 2412. The GPIO node lists the SPI pins as driven by hand.

Boot-arguments

mp_ili_touch, mp_ili_fw, mp_ili_quiet, mp_touchlog and mp_touch in the catalogue. mp_ili_fw is set by mtkloader; the spaced line has mp_touch=0 (no generic HID touch backend beside this driver) and the loader flag -DXNU_TOUCH_ILI=1.

User space

None of its own: touch events reach iOS as HID events from the kernel service.

Status

device.conf: partial: taps, swipes, up to three fingers; the firmware sent again when the chip loses it; slow on one core.

Seen: taps and a swipe (smoke run 3); the firmware sent again after the chip lost it (run 44).

Known issues

  • Held in the hand, phantom touches can break taps (run 10).
  • Twice the touch stopped, or phantom fingers appeared, until a restart (runs 41 and 45).

Source files

iokit/Kernel/arm/hid/ILI7807S.cpp and MappleILIProtocol.h of the kernel at 76b737c; mtk/loader/mtkili.h and mtk/tools/mkilifw.py of mapple_loader at 2aa5786; tools/mkadt.py of mapple_build at f7431bb.

Applies to realme 8i (spaced), release 1 · Updated 15 November 2026