talkman: TAS2553 audio, PN547 NFC, and sensor I2C buses - #1
Merged
Conversation
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.
Merged
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
EpicLPer/android_kernel_mmo_msm8994lumia950-audio).nq-ncias/dev/pn547, reset VEN without an eSE, and use a 250 ms I2C timeout so a silent chip cannot hang I2C6 (shared with SMB1358).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 inandroid_device_msft_talkmanlineage-18.1-talkman-hw.Talkman-only:
sensors.dtsiis included frommsm8992-chi.dtsi, not the cityman tree.Test plan
3.10.108-perf #8, not dirty) and flashed on RM-1104msm8994-tomtom-snd-cardstill present/dev/pn547exists; NFC servicemState=on/dev/i2c-4ACKs0x0c/0x5c/0x68; all 9 hardware sensors listed