Documentation
On this page

Subsystems

Torch

The flash LED as a torch: the MT6371, the link, the sysctl and the limits.

Hardware

The flash LED is driven by the PMU chip on I2C5 at address 0x34 (FLED1), which also holds the charger and the backlight. The tree names an MT6370 flash driver; the chip’s ID register reads 0xF0 on this phone, an MT6371 with the same driver family in Android. Android’s most for the torch is 50 mA.

Driver

mtk_torch.c (mp_torch_steps): step 0 reads the chip’s ID and status registers; step 1 lights levels 1 to 3 (25, 37.5 and 50 mA) from the USB link (torch on [1-3]|off|status) and from the sysctl kern.mapple_torch (root; it reads the level, plus 0x100 while overheated). While lit it reads the status registers and the battery’s temperature once a second. The torch goes off after 10 minutes, on a flash fault (low voltage, short), and, as overheated, at 45 C, with the chip’s over-temperature flag, or when the temperature cannot be read; overheated ends below 40 C with the flag clear.

Device tree

/arm-io/i2c5 (the controller: SPI 354, gate bit 5, 400 kHz) with --torch, and /product/camera flash, which makes iOS show the Control Center and lock-screen torch buttons.

Boot-arguments

mp_torch_steps in the catalogue: 1 by default, 0 on a safe boot. Sysctl: kern.mapple_torch.

User space

mapple-captured (from mapple/userland), the capture daemon that root-tweaks.py gives mediaserverd’s torch service name to: the torch, com.apple.coremedia.flashlight, in full, with the level going to kern.mapple_torch.

Status

device.conf: works: the flash LED (MT6371 FLED1 on I2C5, mkadt --torch) from the lock screen and Control Center at 25, 37.5 or 50 mA, through mapple-captured and kern.mapple_torch (mp_torch_steps=1); off after 10 minutes or overheated at 45 C.

Seen: the torch from the lock screen and Control Center at every level (run 35), on by default from run 36.

Known issues

None recorded.

Source files

bsd/dev/mtk_torch.c of the kernel at 76b737c; tools/mappled/mapple-captured.c of mapple_userland at 4f8127b; tools/mkadt.py of mapple_build at f7431bb.

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