Re: [PATCH 1/2] arc: axs10x: Add DT bindings for I2S audio playback

From: Alexey Brodkin
Date: Thu Mar 02 2017 - 14:36:33 EST


Hi Jose,

On Wed, 2017-02-22 at 18:19 +0000, Jose Abreu wrote:
> This patch adds the necessary DT bindings to get HDMI audio
> output in ARC AXS10x SDP. The bindings for I2S controller were
> added as well as the bindings for simple audio card.
>
> Signed-off-by: Jose Abreu <joabreu@xxxxxxxxxxxx>
> Cc: Carlos Palminha <palminha@xxxxxxxxxxxx>
> Cc: Alexey Brodkin <abrodkin@xxxxxxxxxxxx>
> Cc: Rob Herring <robh+dt@xxxxxxxxxx>
> Cc: Vineet Gupta <vgupta@xxxxxxxxxxxx>
> Cc: devicetree@xxxxxxxxxxxxxxx
> Cc: linux-snps-arc@xxxxxxxxxxxxxxxxxxx
> Cc: linux-kernel@xxxxxxxxxxxxxxx
> ---
> Âarch/arc/boot/dts/axs10x_mb.dtsi | 22 ++++++++++++++++++----
> Â1 file changed, 18 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arc/boot/dts/axs10x_mb.dtsi b/arch/arc/boot/dts/axs10x_mb.dtsi
> index d6c1bbc..9d882b1 100644
> --- a/arch/arc/boot/dts/axs10x_mb.dtsi
> +++ b/arch/arc/boot/dts/axs10x_mb.dtsi
> @@ -149,12 +149,13 @@
> Â interrupts = <14>;
> Â };
> Â
> - i2c@0x1e000 {
> - compatible = "snps,designware-i2c";
> + i2s: i2s@1e000 {
> + compatible = "snps,designware-i2s";
> Â reg = <0x1e000 0x100>;
> - clock-frequency = <400000>;
> - clocks = <&i2cclk>;
> + clocks = <&i2sclk 0>;
> + clock-names = "i2sclk";
> Â interrupts = <15>;
> + #sound-dai-cells = <0>;
> Â };
> Â
> Â i2c@0x1f000 {
> @@ -174,6 +175,7 @@
> Â adi,input-colorspace = "rgb";
> Â adi,input-clock = "1x";
> Â adi,clock-delay = <0x03>;
> + #sound-dai-cells = <0>;
> Â
> Â ports {
> Â #address-cells = <1>;
> @@ -295,5 +297,17 @@
> Â };
> Â };
> Â };
> +
> + sound_playback {
> + compatible = "simple-audio-card";
> + simple-audio-card,name = "AXS10x HDMI Audio";
> + simple-audio-card,format = "i2s";
> + simple-audio-card,cpu {
> + sound-dai = <&i2s>;
> + };
> + simple-audio-card,codec {
> + sound-dai = <&adv7511>;
> + };
> + };
> Â };
> Â};

Just for the sake of history that's my mods to defconfig that allowed me
to play .pcm via HDMI from axs103 board:
-------------------------------->8-------------------------------
diff --git a/arch/arc/configs/axs103_smp_defconfig b/arch/arc/configs/axs103_smp_defconfig
index 30a3d4cf53d2..b11362a32e4e 100644
--- a/arch/arc/configs/axs103_smp_defconfig
+++ b/arch/arc/configs/axs103_smp_defconfig
@@ -67,25 +67,29 @@ CONFIG_MOUSE_PS2_TOUCHKIT=y
ÂCONFIG_MOUSE_SERIAL=y
ÂCONFIG_MOUSE_SYNAPTICS_USB=y
Â# CONFIG_LEGACY_PTYS is not set
-# CONFIG_DEVKMEM is not set
ÂCONFIG_SERIAL_8250=y
ÂCONFIG_SERIAL_8250_CONSOLE=y
ÂCONFIG_SERIAL_8250_DW=y
ÂCONFIG_SERIAL_OF_PLATFORM=y
Â# CONFIG_HW_RANDOM is not set
-CONFIG_I2C=y
ÂCONFIG_I2C_CHARDEV=y
ÂCONFIG_I2C_DESIGNWARE_PLATFORM=y
Â# CONFIG_HWMON is not set
-CONFIG_DRM=m
-CONFIG_DRM_I2C_ADV7511=m
-CONFIG_DRM_ARCPGU=m
-CONFIG_FB=y
+CONFIG_DRM=y
+CONFIG_DRM_I2C_ADV7511=y
+CONFIG_DRM_I2C_ADV7511_AUDIO=y
+CONFIG_DRM_ARCPGU=y
ÂCONFIG_FRAMEBUFFER_CONSOLE=y
ÂCONFIG_LOGO=y
Â# CONFIG_LOGO_LINUX_MONO is not set
Â# CONFIG_LOGO_LINUX_VGA16 is not set
Â# CONFIG_LOGO_LINUX_CLUT224 is not set
+CONFIG_SOUND=y
+CONFIG_SND=y
+CONFIG_SND_SOC=y
+CONFIG_SND_DESIGNWARE_I2S=y
+CONFIG_SND_DESIGNWARE_PCM=y
+CONFIG_SND_SIMPLE_CARD=y
ÂCONFIG_USB_EHCI_HCD=y
ÂCONFIG_USB_EHCI_HCD_PLATFORM=y
ÂCONFIG_USB_OHCI_HCD=y
-------------------------------->8-------------------------------

Anyways...

Acked-by: Alexey Brodkin <abrodkin@xxxxxxxxxxxx>