dt-bindings: Add Rockchip rk817 audio CODEC support
Subsystems (4)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v5 2/4 ASoC: Add Rockchip rk817 audio CODEC support
Add support for the Rockchip rk817 audio codec integrated into the rk817 PMIC. This is based on the sources provided by Rockchip from their BSP kernel.
Changes from v4:
Switched to using parent regmap instead of private regmap. Removed of_compatible strings.
Removed register definitions and moved them to the MFD driver.
--- sound/soc/codecs/Kconfig | 6 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/rk817_codec.c | 560 +++++++++++++++++++++++++++++++++ 3 files changed, 566 insertions(+) create mode 100644 sound/soc/codecs/rk817_codec.c
sound/soc/codecs/Kconfig +6 -0
@@ -155,6 +155,7 @@ config SND_SOC_ALL_CODECS imply SND_SOC_PCM512x_I2C imply SND_SOC_PCM512x_SPI imply SND_SOC_RK3328 + imply SND_SOC_RK817 imply SND_SOC_RT274 imply SND_SOC_RT286 imply SND_SOC_RT298
@@ -1059,6 +1060,11 @@ config SND_SOC_RK3328 tristate "Rockchip RK3328 audio CODEC" select REGMAP_MMIO +config SND_SOC_RK817 + tristate "Rockchip RK817 audio CODEC" + depends on MFD_RK808 + select REGMAP_I2C + config SND_SOC_RL6231 tristate default y if SND_SOC_RT5514=y
sound/soc/codecs/Makefile +2 -0
@@ -165,6 +165,7 @@ snd-soc-pcm512x-objs := pcm512x.o snd-soc-pcm512x-i2c-objs := pcm512x-i2c.o snd-soc-pcm512x-spi-objs := pcm512x-spi.o snd-soc-rk3328-objs := rk3328_codec.o +snd-soc-rk817-objs := rk817_codec.o snd-soc-rl6231-objs := rl6231.o snd-soc-rl6347a-objs := rl6347a.o snd-soc-rt1011-objs := rt1011.o
@@ -479,6 +480,7 @@ obj-$(CONFIG_SND_SOC_PCM512x) += snd-soc-pcm512x.o obj-$(CONFIG_SND_SOC_PCM512x_I2C) += snd-soc-pcm512x-i2c.o obj-$(CONFIG_SND_SOC_PCM512x_SPI) += snd-soc-pcm512x-spi.o obj-$(CONFIG_SND_SOC_RK3328) += snd-soc-rk3328.o +obj-$(CONFIG_SND_SOC_RK817) += snd-soc-rk817.o obj-$(CONFIG_SND_SOC_RL6231) += snd-soc-rl6231.o obj-$(CONFIG_SND_SOC_RL6347A) += snd-soc-rl6347a.o obj-$(CONFIG_SND_SOC_RT1011) += snd-soc-rt1011.o
sound/soc/codecs/rk817_codec.c new file +560 -0
560 lines not on this page · raw message
Signature · 1 line
2.25.1
Re: [PATCH v5 2/4] ASoC: Add Rockchip rk817 audio CODEC support
Quoted 3 lines · Chris Morgan
Add support for the Rockchip rk817 audio codec integrated into the rk817 PMIC. This is based on the sources provided by Rockchip from their BSP kernel.
Quoted 2 lines
Changes from v4:
Switched to using parent regmap instead of private regmap.
This should go after the --- as per submitting-patches.rst.
Re: [PATCH v5 2/4] ASoC: Add Rockchip rk817 audio CODEC support
Quoted 11 lines · Mark Brown
Quoted 3 lines · Chris Morgan
Add support for the Rockchip rk817 audio codec integrated into the rk817 PMIC. This is based on the sources provided by Rockchip from their BSP kernel.
Reviewed-by Mark Brown <[email protected]>Quoted 2 lines
Changes from v4:
Switched to using parent regmap instead of private regmap.This should go after the --- as per
submitting-patches.rst.
Thank you... should I resubmit for this?
Mark Brown
maintainerRe: [PATCH v5 2/4] ASoC: Add Rockchip rk817 audio CODEC support
Quoted 5 lines · Chris Morgan
Quoted 1 line · Mark Brown
This should go after the --- as per
submitting-patches.rst.Thank you... should I resubmit for this?
It's fine from my point of view, don't know if Lee would want a resend or not.
PATCH v5 3/4 dt-bindings: Add Rockchip rk817 audio CODEC support
In reply to a message not in the archiveCreate dt-binding documentation to document rk817 codec.
--- .../bindings/sound/rockchip,rk817-codec.yaml | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/rockchip,rk817-codec.yaml
Documentation/devicetree/bindings/sound/rockchip,rk817-codec.yaml new file +60 -0
@@ -0,0 +1,60 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/rockchip-rk817.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Rockchip rk817 audio codec + +description: + The rk817 codec is an I2C codec integrated with every Rockchip + rk817 PMIC MFD. + +properties: + compatible: + enum: + - rockchip,rk817-codec + + "#sound-dai-cells": + const: 1 + + clocks: + maxItems: 1 + + clock-names: + const: "mclk" + + mic-in-differential: + description: the microphone is in differential mode. + $ref: /schemas/types.yaml#/definitions/flag + +required: + - compatible + - clocks + - clock-names + +additionalProperties: false + +examples: + - | +rk817: pmic@20 { + compatible = "rockchip,rk817"; + reg = <0x20>; + interrupt-parent = <&gpio0>; + interrupts = <7 IRQ_TYPE_LEVEL_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&pmic_int>, <&i2s_8ch_mclk>; + #sound-dai-cells = <0>; + clocks = <&cru SCLK_I2S_8CH_OUT>; + clock-names = "mclk"; + + ........ + + rk817_codec: codec { + mic-in-differential; + status = "okay"; + }; + + ........ + +};
Signature · 1 line
2.25.1
PATCH v5 4/4 arm64: dts: rockchip: add rk817 codec to Odroid Go Advance
In reply to a message not in the archiveAdd the new rk817 codec driver to the Odroid Go Advance.
--- .../boot/dts/rockchip/rk3326-odroid-go2.dts | 35 ++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts +34 -1
@@ -161,6 +161,29 @@ blue_led: led-0 { }; }; + rk817-sound { + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,name = "rockchip,rk817-codec"; + simple-audio-card,mclk-fs = <256>; + simple-audio-card,widgets = + "Microphone", "Mic Jack", + "Headphone", "Headphones", + "Speaker", "Speaker"; + simple-audio-card,routing = + "MICL", "Mic Jack", + "Headphones", "HPOL", + "Headphones", "HPOR", + "Speaker", "SPKO"; + simple-audio-card,hp-det-gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_HIGH>; + simple-audio-card,cpu { + sound-dai = <&i2s1_2ch>; + }; + simple-audio-card,codec { + sound-dai = <&rk817>; + }; + }; + vccsys: vccsys { compatible = "regulator-fixed"; regulator-name = "vcc3v8_sys";
@@ -266,10 +289,13 @@ rk817: pmic@20 { interrupt-parent = <&gpio0>; interrupts = <RK_PB2 IRQ_TYPE_LEVEL_LOW>; pinctrl-names = "default"; - pinctrl-0 = <&pmic_int>; + pinctrl-0 = <&pmic_int>, <&i2s1_2ch_mclk>; wakeup-source; #clock-cells = <1>; clock-output-names = "rk808-clkout1", "xin32k"; + clocks = <&cru SCLK_I2S1_OUT>; + clock-names = "mclk"; + #sound-dai-cells = <0>; vcc1-supply = <&vccsys>; vcc2-supply = <&vccsys>;
@@ -428,6 +454,11 @@ regulator-state-mem { }; }; }; + + rk817_codec: codec { + mic-in-differential; + status = "okay"; + }; }; };
@@ -439,6 +470,8 @@ &i2c1 { /* I2S 1 Channel Used */ &i2s1_2ch { + resets = <&cru SRST_I2S1>, <&cru SRST_I2S1_H>; + reset-names = "reset-m", "reset-h"; status = "okay"; };
Signature · 1 line
2.25.1