ASoC: tegra: Add support for WM8962 and CPCAP codecs
Subsystems (4)
v2 cover ASoC: tegra: Add support for WM8962 and CPCAP codecs
Add support for WM8962 and CPCAP codecs found in various Tegra devices.
---
Changes in v2:
- fixed Kconfig dependencies
- added schema adjustments for max9808x
---
Jonas Schwöbel (1):
ASoC: tegra: Support WM8962 by machine driver
Svyatoslav Ryhel (4):
ASoC: dt-bindings: nvidia,tegra-audio: document CPCAP CODEC
ASoC: tegra: Support CPCAP by machine driver
ASoC: dt-bindings: nvidia,tegra-audio: document WM8962 CODEC
ASoC: dt-bindings: nvidia,tegra-audio-max9808x: document additional
board pins
.../sound/nvidia,tegra-audio-cpcap.yaml | 90 ++++++++++ .../sound/nvidia,tegra-audio-max9808x.yaml | 5 + .../sound/nvidia,tegra-audio-wm8962.yaml | 88 ++++++++++ sound/soc/tegra/Kconfig | 19 ++ sound/soc/tegra/Makefile | 2 + sound/soc/tegra/tegra_asoc_machine.c | 52 ++++++ sound/soc/tegra/tegra_wm8962.c | 165 ++++++++++++++++++ 7 files changed, 421 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-cpcap.yaml create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8962.yaml create mode 100644 sound/soc/tegra/tegra_wm8962.c
Signature · 1 line
2.51.0
PATCH v2 1/5 ASoC: dt-bindings: nvidia,tegra-audio: document CPCAP CODEC
Add dt-binding for CPCAP CODEC.
--- .../sound/nvidia,tegra-audio-cpcap.yaml | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-cpcap.yaml
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-cpcap.yaml new file +90 -0
@@ -0,0 +1,90 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/nvidia,tegra-audio-cpcap.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NVIDIA Tegra audio complex with CPCAP CODEC + +maintainers: + - Svyatoslav Ryhel <[email protected]> + +allOf: + - $ref: nvidia,tegra-audio-common.yaml# + +properties: + compatible: + items: + - pattern: '^[a-z0-9]+,tegra-audio-cpcap(-[a-z0-9]+)+$' + - const: nvidia,tegra-audio-cpcap + + nvidia,audio-routing: + $ref: /schemas/types.yaml#/definitions/non-unique-string-array + description: + A list of the connections between audio components. Each entry is a + pair of strings, the first being the connection's sink, the second + being the connection's source. Valid names for sources and sinks are + the pins (documented in the binding document), and the jacks on the + board. + minItems: 2 + items: + enum: + # Board Connectors + - Speakers + - Int Spk + - Earpiece + - Int Mic + - Headset Mic + - Internal Mic 1 + - Internal Mic 2 + - Headphone + - Headphones + - Headphone Jack + - Mic Jack + + # CODEC Pins + - MICR + - HSMIC + - EMUMIC + - MICL + - EXTR + - EXTL + - EP + - SPKR + - SPKL + - LINER + - LINEL + - HSR + - HSL + - EMUR + - EMUL + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/clock/tegra20-car.h> + #include <dt-bindings/soc/tegra-pmc.h> + sound { + compatible = "motorola,tegra-audio-cpcap-mot", + "nvidia,tegra-audio-cpcap"; + nvidia,model = "Motorola Atrix 4G (MB860) CPCAP"; + + nvidia,audio-routing = + "Headphones", "HSR", + "Headphones", "HSL", + "Int Spk", "SPKR", + "Int Spk", "SPKL", + "Earpiece", "EP", + "HSMIC", "Mic Jack", + "MICR", "Internal Mic 1", + "MICL", "Internal Mic 2"; + + nvidia,i2s-controller = <&tegra_i2s1>; + nvidia,audio-codec = <&cpcap_audio>; + + clocks = <&tegra_car TEGRA20_CLK_PLL_A>, + <&tegra_car TEGRA20_CLK_PLL_A_OUT0>, + <&tegra_car TEGRA20_CLK_CDEV1>; + clock-names = "pll_a", "pll_a_out0", "mclk"; + };
Signature · 1 line
2.51.0
Rob Herring
maintainerRe: [PATCH v2 1/5] ASoC: dt-bindings: nvidia,tegra-audio: document CPCAP CODEC
Quoted 22 lines · Svyatoslav Ryhel
Add dt-binding for CPCAP CODEC.
Signed-off-by Svyatoslav Ryhel <[email protected]>--- .../sound/nvidia,tegra-audio-cpcap.yaml | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-cpcap.yamlDocumentation/devicetree/bindings/sound/nvidia,tegra-audio-cpcap.yaml new file +8
-0@@ -0,0 +1,90 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/nvidia,tegra-audio-cpcap.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NVIDIA Tegra audio complex with CPCAP CODEC +
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-cpcap.yaml line 18
Quoted 10 lines
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-cpcap.yaml new file +10
-0+maintainers: + - Svyatoslav Ryhel <[email protected]> + +allOf: + - $ref: nvidia,tegra-audio-common.yaml# + +properties: + compatible: + items: + - pattern: '^[a-z0-9]+,tegra-audio-cpcap(-[a-z0-9]+)+$'
Expecting a lot of devices and differences? I would assume all known h/w is well known and any differences are known by now. Perhaps even just the fallback is sufficient?
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-cpcap.yaml line 69
Quoted 8 lines
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-cpcap.yaml new file +7
-0+ - const: nvidia,tegra-audio-cpcap + + - | + #include <dt-bindings/clock/tegra20-car.h> + #include <dt-bindings/soc/tegra-pmc.h> + sound { + compatible = "motorola,tegra-audio-cpcap-mot",
Why do we need motorola twice?
Quoted 24 lines
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-cpcap.yaml new file +21
-0+ "nvidia,tegra-audio-cpcap"; + nvidia,model = "Motorola Atrix 4G (MB860) CPCAP"; + + nvidia,audio-routing = + "Headphones", "HSR", + "Headphones", "HSL", + "Int Spk", "SPKR", + "Int Spk", "SPKL", + "Earpiece", "EP", + "HSMIC", "Mic Jack", + "MICR", "Internal Mic 1", + "MICL", "Internal Mic 2"; + + nvidia,i2s-controller = <&tegra_i2s1>; + nvidia,audio-codec = <&cpcap_audio>; + + clocks = <&tegra_car TEGRA20_CLK_PLL_A>, + <&tegra_car TEGRA20_CLK_PLL_A_OUT0>, + <&tegra_car TEGRA20_CLK_CDEV1>; + clock-names = "pll_a", "pll_a_out0", "mclk"; + };Signature · 1 line
2.51.0
Re: [PATCH v2 1/5] ASoC: dt-bindings: nvidia,tegra-audio: document CPCAP CODEC
10 лютого 2026 р. 04:46:19 GMT+02:00, Rob Herring <[email protected]> пише:
Quoted 29 lines · Svyatoslav Ryhel
Quoted 28 lines
Add dt-binding for CPCAP CODEC.
Signed-off-by Svyatoslav Ryhel <[email protected]>--- .../sound/nvidia,tegra-audio-cpcap.yaml | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-cpcap.yamlDocumentation/devicetree/bindings/sound/nvidia,tegra-audio-cpcap.yaml new file +14
-0@@ -0,0 +1,90 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/nvidia,tegra-audio-cpcap.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NVIDIA Tegra audio complex with CPCAP CODEC + +maintainers: + - Svyatoslav Ryhel <[email protected]> + +allOf: + - $ref: nvidia,tegra-audio-common.yaml# +
Quoted 9 lines
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-cpcap.yaml line 18
Quoted 4 lines
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-cpcap.yaml new file +4
-0+properties: + compatible: + items: + - pattern: '^[a-z0-9]+,tegra-audio-cpcap(-[a-z0-9]+)+$'Expecting a lot of devices and differences? I would assume all known h/w is well known and any differences are known by now. Perhaps even just the fallback is sufficient?
From 3 to 5, maybe more. Hard to trach different variations. Having no full schematic does not help either.
Quoted 11 lines
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-cpcap.yaml line 69
Quoted 8 lines
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-cpcap.yaml new file +7
-0+ - const: nvidia,tegra-audio-cpcap + + - | + #include <dt-bindings/clock/tegra20-car.h> + #include <dt-bindings/soc/tegra-pmc.h> + sound { + compatible = "motorola,tegra-audio-cpcap-mot",Why do we need motorola twice?
"Motorola" is the vendor, "mot" is the board name. Same name you have recently seen in the CPCAP schema patches I have sent.
Quoted 24 lines
Quoted 24 lines
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-cpcap.yaml new file +21
-0+ "nvidia,tegra-audio-cpcap"; + nvidia,model = "Motorola Atrix 4G (MB860) CPCAP"; + + nvidia,audio-routing = + "Headphones", "HSR", + "Headphones", "HSL", + "Int Spk", "SPKR", + "Int Spk", "SPKL", + "Earpiece", "EP", + "HSMIC", "Mic Jack", + "MICR", "Internal Mic 1", + "MICL", "Internal Mic 2"; + + nvidia,i2s-controller = <&tegra_i2s1>; + nvidia,audio-codec = <&cpcap_audio>; + + clocks = <&tegra_car TEGRA20_CLK_PLL_A>, + <&tegra_car TEGRA20_CLK_PLL_A_OUT0>, + <&tegra_car TEGRA20_CLK_CDEV1>; + clock-names = "pll_a", "pll_a_out0", "mclk"; + };Signature · 1 line
2.51.0
PATCH v2 2/5 ASoC: tegra: Support CPCAP by machine driver
In reply to Svyatoslav RyhelAdd CPCAP codec support to the Tegra ASoC machine driver. This codec is found in Motorola T20 devices like Atrix 4G and Droid X2.
--- sound/soc/tegra/Kconfig | 9 +++++ sound/soc/tegra/tegra_asoc_machine.c | 52 ++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+)
sound/soc/tegra/Kconfig +9 -0
@@ -294,6 +294,15 @@ config SND_SOC_TEGRA_SGTL5000 boards using the SGTL5000 codec, such as Apalis T30, Apalis TK1 or Colibri T30. +config SND_SOC_TEGRA_CPCAP + tristate "SoC Audio support for Tegra boards using a CPCAP codec" + depends on I2C && GPIOLIB && MFD_CPCAP + select SND_SOC_TEGRA_MACHINE_DRV + select SND_SOC_CPCAP + help + Say Y or M here if you want to add support for SoC audio on Tegra + boards using the CPCAP codec, such as Motorola Atrix 4G or Droid X2. + endif endmenu
sound/soc/tegra/tegra_asoc_machine.c +52 -0
70 lines not on this page · raw message
Signature · 1 line
2.51.0
PATCH v2 3/5 ASoC: dt-bindings: nvidia,tegra-audio: document WM8962 CODEC
In reply to Svyatoslav RyhelAdd dt-binding for WM8962 CODEC.
--- .../sound/nvidia,tegra-audio-wm8962.yaml | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8962.yaml
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-wm8962.yaml new file +88 -0
@@ -0,0 +1,88 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/nvidia,tegra-audio-wm8962.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NVIDIA Tegra audio complex with WM8962 CODEC + +maintainers: + - Svyatoslav Ryhel <[email protected]> + +allOf: + - $ref: nvidia,tegra-audio-common.yaml# + +properties: + compatible: + items: + - pattern: '^[a-z0-9]+,tegra-audio-wm8962(-[a-z0-9]+)+$' + - const: nvidia,tegra-audio-wm8962 + + nvidia,audio-routing: + $ref: /schemas/types.yaml#/definitions/non-unique-string-array + description: + A list of the connections between audio components. Each entry is a + pair of strings, the first being the connection's sink, the second + being the connection's source. Valid names for sources and sinks are + the pins (documented in the binding document), and the jacks on the + board. + minItems: 2 + items: + enum: + # Board Connectors + - Speakers + - Int Spk + - Earpiece + - Int Mic + - Headset Mic + - Internal Mic 1 + - Internal Mic 2 + - Headphone + - Headphones + - Headphone Jack + - Mic Jack + + # CODEC Pins + - IN1L + - IN1R + - IN2L + - IN2R + - IN3L + - IN3R + - IN4L + - IN4R + - DMICDAT + - HPOUTL + - HPOUTR + - SPKOUT + - SPKOUTL + - SPKOUTR + +required: + - nvidia,i2s-controller + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/clock/tegra30-car.h> + #include <dt-bindings/soc/tegra-pmc.h> + sound { + compatible = "microsoft,tegra-audio-wm8962-surface-rt", + "nvidia,tegra-audio-wm8962"; + nvidia,model = "Microsoft Surface RT WM8962"; + + nvidia,audio-routing = + "Headphone Jack", "HPOUTR", + "Headphone Jack", "HPOUTL", + "Int Spk", "SPKOUTR", + "Int Spk", "SPKOUTL"; + + nvidia,i2s-controller = <&tegra_i2s1>; + nvidia,audio-codec = <&wm8962>; + + clocks = <&tegra_car TEGRA30_CLK_PLL_A>, + <&tegra_car TEGRA30_CLK_PLL_A_OUT0>, + <&tegra_pmc TEGRA_PMC_CLK_OUT_1>; + clock-names = "pll_a", "pll_a_out0", "mclk"; + };
Signature · 1 line
2.51.0
PATCH v2 4/5 ASoC: tegra: Support WM8962 by machine driver
In reply to Svyatoslav RyhelFrom: Jonas Schwöbel <[email protected]>
Add Wolfson Microelectronics WM8962 codec support to the Tegra ASoC machine driver. The WM8962 codec is found on devices like Microsoft Surface RT and Microsoft Surface 2 Windows RT based tablets.
--- sound/soc/tegra/Kconfig | 10 ++ sound/soc/tegra/Makefile | 2 + sound/soc/tegra/tegra_wm8962.c | 165 +++++++++++++++++++++++++++++++++ 3 files changed, 177 insertions(+) create mode 100644 sound/soc/tegra/tegra_wm8962.c
sound/soc/tegra/Kconfig +10 -0
@@ -229,6 +229,16 @@ config SND_SOC_TEGRA_WM8903 boards using the WM8093 codec. Currently, the supported boards are Harmony, Ventana, Seaboard, Kaen, and Aebl. +config SND_SOC_TEGRA_WM8962 + tristate "SoC Audio support for Tegra boards using a WM8962 codec" + depends on I2C && INPUT && GPIOLIB + select SND_SOC_TEGRA_MACHINE_DRV + select SND_SOC_WM8962 + help + Say Y or M here if you want to add support for SoC audio on Tegra + boards using the WM8962 codec. Currently, the supported boards are + Microsoft Surface RT. + config SND_SOC_TEGRA_WM9712 tristate "SoC Audio support for Tegra boards using a WM9712 codec" depends on GPIOLIB
sound/soc/tegra/Makefile +2 -0
@@ -43,9 +43,11 @@ obj-$(CONFIG_SND_SOC_TEGRA210_OPE) += snd-soc-tegra210-ope.o # Tegra machine Support snd-soc-tegra-wm8903-y := tegra_wm8903.o +snd-soc-tegra-wm8962-y := tegra_wm8962.o snd-soc-tegra-machine-y := tegra_asoc_machine.o snd-soc-tegra-audio-graph-card-y := tegra_audio_graph_card.o obj-$(CONFIG_SND_SOC_TEGRA_WM8903) += snd-soc-tegra-wm8903.o +obj-$(CONFIG_SND_SOC_TEGRA_WM8962) += snd-soc-tegra-wm8962.o obj-$(CONFIG_SND_SOC_TEGRA_MACHINE_DRV) += snd-soc-tegra-machine.o obj-$(CONFIG_SND_SOC_TEGRA_AUDIO_GRAPH_CARD) += snd-soc-tegra-audio-graph-card.o
sound/soc/tegra/tegra_wm8962.c new file +165 -0
165 lines not on this page · raw message
Signature · 1 line
2.51.0
PATCH v2 5/5 ASoC: dt-bindings: nvidia,tegra-audio-max9808x: document additional board pins
In reply to Svyatoslav RyhelDocument additional board pins that may be used in routing.
--- .../bindings/sound/nvidia,tegra-audio-max9808x.yaml | 5 +++++ 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-max9808x.yaml +5 -0
@@ -35,10 +35,15 @@ properties: items: enum: # Board Connectors + - Speakers - Int Spk + - Headphone + - Headphones - Headphone Jack - Earpiece - Headset Mic + - Mic Jack + - Int Mic - Internal Mic 1 - Internal Mic 2
Signature · 1 line
2.51.0
Rob Herring
maintainerRe: [PATCH v2 5/5] ASoC: dt-bindings: nvidia,tegra-audio-max9808x: document additional board pins
Quoted 12 lines · Svyatoslav Ryhel
Document additional board pins that may be used in routing.
Signed-off-by Svyatoslav Ryhel <[email protected]>--- .../bindings/sound/nvidia,tegra-audio-max9808x.yaml | 5 +++++ 1 file changed, 5 insertions(+)Documentation/devicetree/bindings/sound/nvidia,tegra-audio-max9808x.yaml +0
-0
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-max9808x.yaml properties: · line 42
Quoted 8 lines
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-max9808x.yaml +3
-0@@ -35,10 +35,15 @@ properties: items: enum: # Board Connectors + - Speakers - Int Spk + - Headphone + - Headphones - Headphone Jack
Aren't all 3 of these the same thing?
Quoted 10 lines
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-max9808x.yaml +2
-0- Earpiece - Headset Mic + - Mic Jack + - Int Mic - Internal Mic 1 - Internal Mic 2Signature · 1 line
2.51.0
Re: [PATCH v2 5/5] ASoC: dt-bindings: nvidia,tegra-audio-max9808x: document additional board pins
10 лютого 2026 р. 04:48:46 GMT+02:00, Rob Herring <[email protected]> пише:
Quoted 8 lines · Svyatoslav Ryhel
Quoted 7 lines
Document additional board pins that may be used in routing.
Signed-off-by Svyatoslav Ryhel <[email protected]>--- .../bindings/sound/nvidia,tegra-audio-max9808x.yaml | 5 +++++ 1 file changed, 5 insertions(+)
Quoted 16 lines
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-max9808x.yaml properties: · line 42
Quoted 13 lines
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-max9808x.yaml +3
-0@@ -35,10 +35,15 @@ properties: items: enum: # Board Connectors + - Speakers - Int Spk + - Headphone + - Headphones - Headphone JackAren't all 3 of these the same thing?
From Tegra ASoC machine perspective no, it exposes each of these pins and each of them can be used.
Quoted 10 lines
Quoted 10 lines
Documentation/devicetree/bindings/sound/nvidia,tegra-audio-max9808x.yaml +2
-0- Earpiece - Headset Mic + - Mic Jack + - Int Mic - Internal Mic 1 - Internal Mic 2Signature · 1 line
2.51.0
Re: [PATCH v2 5/5] ASoC: dt-bindings: nvidia,tegra-audio-max9808x: document additional board pins
In reply to Svyatoslav RyhelQuoted 7 lines · Svyatoslav Ryhel
Document additional board pins that may be used in routing.
Signed-off-by Svyatoslav Ryhel <[email protected]>--- .../bindings/sound/nvidia,tegra-audio-max9808x.yaml | 5 +++++ 1 file changed, 5 insertions(+)