Skip to content

talkman: TAS2553 audio, PN547 NFC, and sensor I2C buses - #1

Merged
djokcho merged 7 commits into
lineage-18.1-usbfrom
lineage-18.1-talkman
Aug 16, 2026
Merged

talkman: TAS2553 audio, PN547 NFC, and sensor I2C buses#1
djokcho merged 7 commits into
lineage-18.1-usbfrom
lineage-18.1-talkman

Conversation

@EpicLPer

Copy link
Copy Markdown

Summary

  • TAS2553 loudspeaker path: codec driver, Quaternary MI2S backend, inverted jack detect, and the talkman DT wiring (already proven on EpicLPer/android_kernel_mmo_msm8994 lumia950-audio).
  • Bind the PN547 with nq-nci as /dev/pn547, reset VEN without an eSE, and use a 250 ms I2C timeout so a silent chip cannot hang I2C6 (shared with SMB1358).
  • Enable BLSP1 QUP5 (i2c-4) and BLSP2 QUP1 (i2c-7) for the ICM-20648, AK09912, ZPA2326, and QPDS-T900. GPIO 23/24 must use mux functions 4 and 5. Userspace HAL lives in android_device_msft_talkman lineage-18.1-talkman-hw.

Talkman-only: sensors.dtsi is included from msm8992-chi.dtsi, not the cityman tree.

Test plan

  • Built from this branch (3.10.108-perf #8, not dirty) and flashed on RM-1104
  • Loudspeaker card msm8994-tomtom-snd-card still present
  • /dev/pn547 exists; NFC service mState=on
  • /dev/i2c-4 ACKs 0x0c / 0x5c / 0x68; all 9 hardware sensors listed
  • 950 XL / cityman boot sanity (shared pinctrl only adds unused i2c_4 groups)

EpicLPer and others added 7 commits August 2, 2026 00:24
Lumia 950 (talkman) drives its loudspeaker through a TI TAS2553 smart
amplifier on i2c-2, fed by Quaternary MI2S rather than the WCD9330's
own speaker driver.

The PGA gain is configurable through the ti,pga-gain property and
defaults below the chip's own default: at 15 dB the boost converter's
current peaks sag a ten year old cell far enough for the PMIC to
power-cycle the device mid-playback, with nothing logged.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add the Quaternary MI2S pin groups (SCK/WS on 58/59, SD2 on 62), the
matching q6 MI2S DAI, and the tas2552@40 node on i2c-2 with its PM8994
GPIO 12 enable line.

The MI2S pins are claimed by the amplifier node itself rather than by
the sound card, because pinctrl_get() hands back the same handle for
the card and the codec and the two would fight over the state.

Co-authored-by: Cursor <cursoragent@cursor.com>
Feed the TAS2553 over Quaternary MI2S: map the LPAIF quat mux register,
set the I2S mode and LPASS bit clock on startup, and add the
LPASS_BE_QUAT_MI2S_RX dai link fixed at 48 kHz S16_LE stereo.

Pin state is left to the amplifier's own device node; the sound card
must not also claim it.

Co-authored-by: Cursor <cursoragent@cursor.com>
The Lumia 950's jack switch closes on insertion, the opposite of what
the codec's mechanical insert comparator assumes. The codec therefore
reported a plug whenever the jack was empty; the HAL saw a lineout,
routed playback to it and every stream failed to prepare because that
backend does not exist, so the loudspeaker was never used.

gpio_level_insert already selects the comparator polarity when no
external detect gpio is present, so expose it through DT rather than
changing it for every msm8994 board.

Co-authored-by: Cursor <cursoragent@cursor.com>
GCC 8 finds warnings in this driver that GCC 4.9 did not, and -Werror
turns all of them into build failures.

Co-authored-by: Cursor <cursoragent@cursor.com>
Talkman has no eSE GPIO. Stock nq-nci only dropped VEN when ese_gpio
was valid and low, so NFC_SET_PWR 0 did nothing and a wedged PN547
could not be reset. Always drop VEN when eSE is not holding it, and
pulse VEN on power-on only.

Also bind nxp,pn547, optional clock/clkreq, /dev/pn547, BBCLK2,
do not hold read_mutex across the IRQ wait, and use a 250 ms I2C
timeout. Do not pulse VEN on mid-session I2C errors.
Expose BLSP1 QUP5 (i2c-4) and BLSP2 QUP1 (i2c-7) so userspace can
talk to the ICM-20648, AK09912, ZPA2326 and QPDS-T900. GPIO 23/24
use mux functions 4 and 5; function 3 is UART/SPI and never ACKs.

Hold LVS2 on for the 1.8 V sensor VID rail. Do not bind an in-kernel
MPU6500 driver: 0x68 is ICM-20648-class and boots asleep.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants