Skip to content

arm64: dts: qcom: msm8953-xiaomi-vince: add TAS2557 speaker amplifier #252

Open
M0Rf30 wants to merge 4 commits into
msm8953-mainline:7.0.9/mainfrom
M0Rf30:m0rf30/7.0.9/develop
Open

arm64: dts: qcom: msm8953-xiaomi-vince: add TAS2557 speaker amplifier #252
M0Rf30 wants to merge 4 commits into
msm8953-mainline:7.0.9/mainfrom
M0Rf30:m0rf30/7.0.9/develop

Conversation

@M0Rf30

@M0Rf30 M0Rf30 commented Jun 17, 2026

Copy link
Copy Markdown

Adds TAS2557 loudspeaker support for the Xiaomi Redmi 5 Plus (vince).

  • dt-bindings for ti,tas2557
  • TAS2557 codec driver (regmap I2C, book/page regmap, DSP firmware loader)
  • enable it in the msm8953 config
  • vince DT: codec on i2c_2 @0x4c (reset GPIO86, IRQ GPIO87, always-on rail so no regulator) + a Quinary MI2S
    dai-link

The amp is on Quinary MI2S, not Primary — Primary is the internal codec. Matches the stock mixer_paths and
the existing ocean/FP3 setups, so no machine-driver change.

Needs tas2557_uCDSP.bin (device-specific, pull from stock vendor into /lib/firmware) to actually pass audio.
Tested on device, speaker works.

@z3ntu

z3ntu commented Jun 17, 2026

Copy link
Copy Markdown

Nice, need to try if the amp on FP3+ works with this :)

@M0Rf30 M0Rf30 force-pushed the m0rf30/7.0.9/develop branch 5 times, most recently from 3c29ff0 to 0bf8633 Compare June 18, 2026 20:32
Document the TAS2557 mono Class-D smart amplifier with an integrated DSP
for speaker protection. The device is controlled over I2C and receives
audio over I2S/TDM (ASI). It can drive a single mono speaker or, as two
instances, a stereo pair; an optional firmware-name selects the DSP blob.

Signed-off-by: Gianluca Boiano <morf3089@gmail.com>
@M0Rf30 M0Rf30 force-pushed the m0rf30/7.0.9/develop branch from 0bf8633 to c28ebec Compare June 20, 2026 13:05
M0Rf30 added 3 commits June 21, 2026 19:00
The TAS2557 is a mono Class-D smart amplifier with an on-chip DSP for
speaker protection. Audio is received over I2S/TDM (ASI) and processed
by DSP firmware before reaching the Class-D output stage.

The driver uses an 8-bit book/page-indirected register map (regmap,
REGCACHE_NONE), parses the TI "uCDSP" firmware (programs, configurations
and PLL/program/config blocks) and applies program 0 / config 0 on
power-up; audio cannot pass without the firmware blob. The ASI inputs,
Class-D output and I/V sense paths are exposed via DAPM, together with
Speaker, DSP program and configuration controls.

Stereo is supported as two cooperating instances: device==3 firmware
carries per-amplifier (DEV_A/DEV_B) tuning, selected per instance via the
ti,channel property. An optional firmware-name DT property overrides the
PG-version-derived blob name.

Verbose probe/firmware/PLL-lock logging is provided for bring-up and
diagnostics.

Signed-off-by: Gianluca Boiano <morf3089@gmail.com>
Build the TAS2557 mono smart amplifier driver as a module, used by the
Xiaomi Redmi 5 Plus (vince) for its loudspeaker.

Signed-off-by: Gianluca Boiano <morf3089@gmail.com>
Wire up the TAS2557 mono speaker amplifier on the Redmi 5 Plus (vince):

 - it sits on i2c_2 at 0x4c with reset on GPIO86 and IRQ on GPIO87; its
   AVDD/DVDD/IOVDD pins are fed by the always-on 1.8 V rail pm8953_l6, and
   VBAT by the always-on battery rail;

 - it is the external PA on Quinary MI2S.  The Android mixer paths route
   the speaker through QUIN_MI2S_RX, and the register-compatible Motorola
   ocean (tfa9874) and Fairphone 3 (aw8898) use Quinary as well.  Add a
   dedicated Quinary MI2S dai-link for the amplifier and register the
   QUINARY_MI2S_RX AFE DAI (SD0, per the downstream).  The internal codec
   stays on Primary MI2S, so earpiece and headphones are unaffected;

 - the MI2S pins (gpio88/91/93 plus the gpio92 word-clock, which uses the
   dedicated pri_mi2s_ws pinmux function) are configured.  The LPASS
   routes Quinary onto these pins through the quin iomux that the
   apq8016_sbc machine driver already programs in its MI2S_QUINARY path,
   so no machine-driver change is required.

Signed-off-by: Gianluca Boiano <morf3089@gmail.com>
@M0Rf30 M0Rf30 force-pushed the m0rf30/7.0.9/develop branch from c28ebec to e205166 Compare June 21, 2026 17:01
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