A12 SPI: find iOS's rule for full-duplex descriptors, then make it chip-wide

Aperta
#394 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
c, linux

Direzione di ricerca

Start by reading OrchardLinux/linux#56 and the iOS AppleSamsungSPI implementation in the T8020 kernelcache to determine how descriptor setup depends on transfer mode, length, DMA versus PIO, and ADT device data. Then update spi-apple to apply the established rule chip-wide and remove the per-device opt-in. Check XR touch behavior during an XR test round that is already planned.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

OrchardLinux/linux#56 gives the descriptor register setup on long full-duplex SPI transfers (more than the 16-word FIFO) only to devices that ask for it (apple,spi-full-duplex-descriptor), because the evidence points both ways on the A12 (T8020):

  • iPad 8 touch (Z2, SPI mode 3): needs it for its long result reads (dr1408's Project Cascadia port, where iOS's AppleSamsungSPI is described as applying it to every PIO transfer).
  • iPhone XR touch (HIDSPI, firmware phase in mode 0): breaks with it. Tested on an XR with the setting applied to every A12 SPI controller (commit 8aae85d74): "packet CRC mismatch" on the first read after the firmware upload, no boot message, no surface descriptor, 0 touch events in 12 s of dragging, on boot and on module reload. The same kernel without it worked on three boots.

To do: read iOS's AppleSamsungSPI (t8020 kernelcache) for how it chooses the descriptor setup per transfer (mode/CPOL, length, DMA vs PIO, per-device data from the ADT), apply that rule chip-wide in spi-apple, drop the opt-in, and check XR touch on an XR round that is happening anyway. Hypothesis only: Cascadia ties a descriptor-mode word-delay increase to CPOL, so mode 3 vs mode 0 may be the difference.

Lingua principale
Python
Stelle
102
Fork
27
Merge medio
10h 43m
PR unite (30g)
293

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OrchardLinux/orchard

Tutte le issue di OrchardLinux/orchard

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.