[PATCH v2 0/3] RK3308 codec audio sequencing and headphone support

From: Xing Zheng

Date: Sun Nov 01 2026 - 00:42:26 EST


Restore the full RK3308 codec analog power sequencing and headphone
support from the downstream 6.12 implementation, adapted to the current
ASoC interfaces. Keep the complete codec source and register definitions
in one patch, alongside the binding and SoC detection-resource changes.

The codec change includes revision-specific ADC/DAC supply sequencing,
reference-current and headphone gain ramps, A/B CIC fades, active ADC
resynchronization, MICBIAS restoration, microphone boost controls, ADC
stereo-group routing and B/C headphone detection. Machine drivers retain
ownership of the external amplifier GPIOs.

The SDK-only multicodecs shutdown fix and EVB/VAD routing patch are
outside this series because their target drivers and board files are
not present in the upstream tree.

Patches 1-2 are for the ASoC tree; patch 3 is for the Rockchip DT tree.
The detection resources remain optional for existing device trees.

Changes since v1:
- Restore the full analog sequencing omitted from the initial posting.
- Consolidate all codec C/header changes into a single patch.
- Use the original binding descriptions and legacy IRQ lookup rules.
- Preserve upstream automatic DAI format selection and adapt accessors.
- Use sleepable waits while preserving downstream minimum delay requests.
- Keep the SDK-only machine-driver and EVB/VAD work deferred.

Previous posting:
https://lore.kernel.org/r/20261101040125.1864141-1-zhengxing@xxxxxxxxxxxxxx

Validation:
- ARM64 defconfig plus built-in RK3308 codec, Image and all six RK3308
DTBs build on broonie/for-next and the Linus baseline with GCC 14.3.1.
- Codec W=1 builds, binding/example validation and codec-schema checks
on the six DTBs pass; strict checkpatch reports no diagnostics.
- The three patches apply to the Linus baseline without 3-way fallback;
range-diff reports all three patches unchanged.
- Extracted SDK/upstream analog functions match across 11520 modeled
register traces, including operation order and minimum delay requests,
under ASan/UBSan. Parameter/error-path probes also pass.

These host models do not verify actual hardware settling time.
No new playback, capture, hotplug, suspend/resume or electrical timing
measurements have been performed on hardware with this upstream series.

Xing Zheng (3):
ASoC: dt-bindings: rk3308-codec: describe detection and ADC routing
ASoC: codecs: rk3308: restore audio and headphone support
arm64: dts: rockchip: restore RK3308 codec detection resources

.../bindings/sound/rockchip,rk3308-codec.yaml | 55 +
arch/arm64/boot/dts/rockchip/rk3308.dtsi | 4 +
sound/soc/codecs/rk3308_codec.c | 1155 ++++++++++++++---
sound/soc/codecs/rk3308_codec.h | 18 +-
4 files changed, 1064 insertions(+), 168 deletions(-)


base-commit: 11ae63bd9030349a0136fb2edd1622a4a029edc8