ASoC: Add Richtek RTQ9124 support
Subsystems (4)
cover ASoC: Add Richtek RTQ9124 support
From: ChiYuan Huang <[email protected]>
This patch series adds Richtek RTQ9124 1x30W audio amplifier support.
ChiYuan Huang (2):
ASoC: dt-bindings: Add Richtek RTQ9124
ASoC: codecs: Add support for Richtek RTQ9124
.../bindings/sound/richtek,rtq9124.yaml | 57 ++ sound/soc/codecs/Kconfig | 9 + sound/soc/codecs/Makefile | 4 +- sound/soc/codecs/rtq9124.c | 543 ++++++++++++++++++ 4 files changed, 612 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/sound/richtek,rtq9124.yaml create mode 100644 sound/soc/codecs/rtq9124.c
base-commit: 61e36be334b06716d81eeafb105bc953bb37f48c
Signature · 1 line
2.34.1
PATCH 1/2 ASoC: dt-bindings: Add Richtek RTQ9124
From: ChiYuan Huang <[email protected]>
Document the ASoC Richtek RTQ9124.
--- .../bindings/sound/richtek,rtq9124.yaml | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/richtek,rtq9124.yaml
Documentation/devicetree/bindings/sound/richtek,rtq9124.yaml new file +57 -0
@@ -0,0 +1,57 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/richtek,rtq9124.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Richtek RTQ9124 Automotive Audio Amplifier + +maintainers: + - ChiYuan Huang <[email protected]> + +description: + RTQ9124 is an ultra-low output noise, digital input, mono-channel Class-D + power amplifier that supports a 2.1MHz switching frequency. It integrates + both DC and AC load diagnostics, as well as real-time load monitoring to + assess speaker condition. The device operates from 4.5V to 18V and delivers + up to 30W output power. + +allOf: + - $ref: dai-common.yaml# + +properties: + compatible: + enum: + - richtek,rtq9124 + + reg: + maxItems: 1 + + '#sound-dai-cells': + const: 0 + + enable-gpios: + maxItems: 1 + +required: + - compatible + - reg + - '#sound-dai-cells' + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + amplifier@13 { + compatible = "richtek,rtq9124"; + reg = <0x13>; + enable-gpios = <&gpio 26 GPIO_ACTIVE_HIGH>; + #sound-dai-cells = <0>; + }; + };
Signature · 1 line
2.34.1
PATCH 2/2 ASoC: codecs: Add support for Richtek RTQ9124
In reply to [email protected]From: ChiYuan Huang <[email protected]>
Add codecs driver for Richtek RTQ9124.
--- sound/soc/codecs/Kconfig | 9 + sound/soc/codecs/Makefile | 4 +- sound/soc/codecs/rtq9124.c | 543 +++++++++++++++++++++++++++++++++++++ 3 files changed, 555 insertions(+), 1 deletion(-) create mode 100644 sound/soc/codecs/rtq9124.c
sound/soc/codecs/Kconfig +9 -0
@@ -238,6 +238,7 @@ config SND_SOC_ALL_CODECS imply SND_SOC_RT1320_SDW imply SND_SOC_RT9120 imply SND_SOC_RT9123 + imply SND_SOC_RTQ9124 imply SND_SOC_RTQ9128 imply SND_SOC_SDW_MOCKUP imply SND_SOC_SGTL5000
@@ -1857,6 +1858,14 @@ config SND_SOC_RT9123P Enable support for the HW control mode of Richtek RT9123P 3.2W mono Class-D audio amplifier. +config SND_SOC_RTQ9124 + tristate "Richtek RTQ9124 Mono Class-D Amplifier" + depends on I2C + select REGMAP + help + Enable support for Richtek RTQ9124 1x30W digital input automotive + audio amplifier with current sense and real-time load diagnostics. + config SND_SOC_RTQ9128 tristate "Richtek RTQ9128 45W Digital Input Amplifier" depends on I2C
sound/soc/codecs/Makefile +3 -1
@@ -275,6 +275,7 @@ snd-soc-rt722-sdca-y := rt722-sdca.o rt722-sdca-sdw.o snd-soc-rt9120-y := rt9120.o snd-soc-rt9123-y := rt9123.o snd-soc-rt9123p-y := rt9123p.o +snd-soc-rtq9124-y := rtq9124.o snd-soc-rtq9128-y := rtq9128.o snd-soc-sdw-mockup-y := sdw-mockup.o snd-soc-sgtl5000-y := sgtl5000.o
@@ -694,6 +695,7 @@ obj-$(CONFIG_SND_SOC_RT722_SDCA_SDW) += snd-soc-rt722-sdca.o obj-$(CONFIG_SND_SOC_RT9120) += snd-soc-rt9120.o obj-$(CONFIG_SND_SOC_RT9123) += snd-soc-rt9123.o obj-$(CONFIG_SND_SOC_RT9123P) += snd-soc-rt9123p.o +obj-$(CONFIG_SND_SOC_RTQ9124) += snd-soc-rtq9124.o obj-$(CONFIG_SND_SOC_RTQ9128) += snd-soc-rtq9128.o obj-$(CONFIG_SND_SOC_SDW_MOCKUP) += snd-soc-sdw-mockup.o obj-$(CONFIG_SND_SOC_SGTL5000) += snd-soc-sgtl5000.o
@@ -851,4 +853,4 @@ obj-$(CONFIG_SND_SOC_LPASS_RX_MACRO) += snd-soc-lpass-rx-macro.o obj-$(CONFIG_SND_SOC_LPASS_TX_MACRO) += snd-soc-lpass-tx-macro.o # Mux -obj-$(CONFIG_SND_SOC_SIMPLE_MUX) += snd-soc-simple-mux.o +obj-$(CONFIG_SND_SOC_SIMPLE_MUX) += snd-soc-simple-mux.o
sound/soc/codecs/rtq9124.c new file +543 -0
543 lines not on this page · raw message
Signature · 1 line
2.34.1
Re: [PATCH 1/2] ASoC: dt-bindings: Add Richtek RTQ9124
In reply to [email protected]Documentation/devicetree/bindings/sound/richtek,rtq9124.yaml line 25
Quoted 8 lines · On 06/06/2025 10:24, [email protected] wrote:
Documentation/devicetree/bindings/sound/richtek,rtq9124.yaml new file +8
-0+ +allOf: + - $ref: dai-common.yaml# + +properties: + compatible: + enum: + - richtek,rtq9124
Exactly the same as richtek,rt9123. Don't create same binding files for similar devices.
Best regards,
Krzysztof
Re: [PATCH 1/2] ASoC: dt-bindings: Add Richtek RTQ9124
Quoted 13 lines · Krzysztof Kozlowski
Documentation/devicetree/bindings/sound/richtek,rtq9124.yaml line 25
Quoted 8 lines · On 06/06/2025 10:24, [email protected] wrote:
Documentation/devicetree/bindings/sound/richtek,rtq9124.yaml new file +8
-0+ +allOf: + - $ref: dai-common.yaml# + +properties: + compatible: + enum: + - richtek,rtq9124Exactly the same as richtek,rt9123. Don't create same binding files for similar devices.
Do you mean to expand rtq9124 description in rt9123 binding file? Any example that I can refer to?
Quoted 2 lines
Best regards,
Krzysztof
Re: [PATCH 1/2] ASoC: dt-bindings: Add Richtek RTQ9124
Quoted 14 lines · ChiYuan Huang
Quoted 13 lines · Krzysztof Kozlowski
Documentation/devicetree/bindings/sound/richtek,rtq9124.yaml line 25
Quoted 8 lines · On 06/06/2025 10:24, [email protected] wrote:
Documentation/devicetree/bindings/sound/richtek,rtq9124.yaml new file +8
-0+ +allOf: + - $ref: dai-common.yaml# + +properties: + compatible: + enum: + - richtek,rtq9124Exactly the same as richtek,rt9123. Don't create same binding files for similar devices.
Quoted 1 line
Do you mean to expand rtq9124 description in rt9123 binding file?
Yes
Quoted 2 lines
Any example that I
can refer to?
Majority of bindings.
Best regards,
Krzysztof
Re: [PATCH 1/2] ASoC: dt-bindings: Add Richtek RTQ9124
Quoted 15 lines · Krzysztof Kozlowski
Quoted 14 lines · ChiYuan Huang
Quoted 13 lines · Krzysztof Kozlowski
Documentation/devicetree/bindings/sound/richtek,rtq9124.yaml line 25
Quoted 8 lines · On 06/06/2025 10:24, [email protected] wrote:
Documentation/devicetree/bindings/sound/richtek,rtq9124.yaml new file +8
-0+ +allOf: + - $ref: dai-common.yaml# + +properties: + compatible: + enum: + - richtek,rtq9124Exactly the same as richtek,rt9123. Don't create same binding files for similar devices.
Quoted 4 lines
Quoted 1 line
Do you mean to expand rtq9124 description in rt9123 binding file?
Yes
Compared to write a similar file, this should be better. Will use that way in next revision.
Thanks.
Quoted 7 lines
Quoted 2 lines
Any example that I
can refer to?Majority of bindings.
Best regards,
Krzysztof