All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
To: cip-dev@lists.cip-project.org,
	Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>,
	Pavel Machek <pavel@denx.de>
Cc: Biju Das <biju.das.jz@bp.renesas.com>
Subject: [PATCH 5.10.y-cip 21/24] arm64: dts: renesas: rzg2l-smarc: Enable audio
Date: Wed, 20 Apr 2022 22:34:21 +0100	[thread overview]
Message-ID: <20220420213424.27837-22-prabhakar.mahadev-lad.rj@bp.renesas.com> (raw)
In-Reply-To: <20220420213424.27837-1-prabhakar.mahadev-lad.rj@bp.renesas.com>

From: Biju Das <biju.das.jz@bp.renesas.com>

commit e396d6103343ff95874444bd8a67f031eafe0e38 upstream.

Enable audio on RZ/G2L SMARC EVK by linking SSI0 with WM8978
audio CODEC.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://lore.kernel.org/r/20210921084605.16250-4-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
[PL: Manually applied the changes]
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
 arch/arm64/boot/dts/renesas/rzg2l-smarc.dtsi | 66 ++++++++++++++++++++
 1 file changed, 66 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/rzg2l-smarc.dtsi b/arch/arm64/boot/dts/renesas/rzg2l-smarc.dtsi
index 549cee1733c7..4bffd6b4c837 100644
--- a/arch/arm64/boot/dts/renesas/rzg2l-smarc.dtsi
+++ b/arch/arm64/boot/dts/renesas/rzg2l-smarc.dtsi
@@ -8,6 +8,19 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/pinctrl/rzg2l-pinctrl.h>
 
+/*
+ * SSI-WM8978
+ *
+ * This command is required when Playback/Capture
+ *
+ *	amixer cset name='Left Input Mixer L2 Switch' on
+ *	amixer cset name='Right Input Mixer R2 Switch' on
+ *	amixer cset name='Headphone Playback Volume' 100
+ *	amixer cset name='PCM Volume' 100%
+ *	amixer cset name='Input PGA Volume' 25
+ *
+ */
+
 /* comment the #define statement to disable SCIF2 (SER0) on PMOD1 (CN7) */
 #define PMOD1_SER0	1
 
@@ -24,6 +37,29 @@
 		stdout-path = "serial0:115200n8";
 	};
 
+	audio_mclock: audio_mclock {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <11289600>;
+	};
+
+	snd_rzg2l: sound {
+		compatible = "simple-audio-card";
+		simple-audio-card,format = "i2s";
+		simple-audio-card,bitclock-master = <&cpu_dai>;
+		simple-audio-card,frame-master = <&cpu_dai>;
+		simple-audio-card,mclk-fs = <256>;
+
+		cpu_dai: simple-audio-card,cpu {
+			sound-dai = <&ssi0>;
+		};
+
+		codec_dai: simple-audio-card,codec {
+			clocks = <&audio_mclock>;
+			sound-dai = <&wm8978>;
+		};
+	};
+
 	usb0_vbus_otg: regulator-usb0-vbus-otg {
 		compatible = "regulator-fixed";
 
@@ -43,6 +79,14 @@
 	};
 };
 
+&audio_clk1{
+	clock-frequency = <11289600>;
+};
+
+&audio_clk2{
+	clock-frequency = <12288000>;
+};
+
 &canfd {
 	pinctrl-0 = <&can0_pins &can1_pins>;
 	pinctrl-names = "default";
@@ -113,6 +157,9 @@
 };
 
 &pinctrl {
+	pinctrl-0 = <&sound_clk_pins>;
+	pinctrl-names = "default";
+
 	can0_pins: can0 {
 		pinmux = <RZG2L_PORT_PINMUX(10, 1, 2)>, /* TX */
 			 <RZG2L_PORT_PINMUX(11, 0, 2)>; /* RX */
@@ -205,6 +252,11 @@
 		};
 	};
 
+	sound_clk_pins: sound_clk {
+		pins = "AUDIO_CLK1", "AUDIO_CLK2";
+		input-enable;
+	};
+
 	spi1_pins: spi1 {
 		pinmux = <RZG2L_PORT_PINMUX(44, 0, 1)>, /* CK */
 			 <RZG2L_PORT_PINMUX(44, 1, 1)>, /* MOSI */
@@ -212,6 +264,13 @@
 			 <RZG2L_PORT_PINMUX(44, 3, 1)>; /* SSL */
 	};
 
+	ssi0_pins: ssi0 {
+		pinmux = <RZG2L_PORT_PINMUX(45, 0, 1)>, /* BCK */
+			 <RZG2L_PORT_PINMUX(45, 1, 1)>, /* RCK */
+			 <RZG2L_PORT_PINMUX(45, 2, 1)>, /* TXD */
+			 <RZG2L_PORT_PINMUX(45, 3, 1)>; /* RXD */
+	};
+
 	usb0_pins: usb0 {
 		pinmux = <RZG2L_PORT_PINMUX(4, 0, 1)>, /* VBUS */
 			 <RZG2L_PORT_PINMUX(5, 0, 1)>, /* OVC */
@@ -267,6 +326,13 @@
 	status = "okay";
 };
 
+&ssi0 {
+	pinctrl-0 = <&ssi0_pins>;
+	pinctrl-names = "default";
+
+	status = "okay";
+};
+
 &usb2_phy0 {
 	pinctrl-0 = <&usb0_pins>;
 	pinctrl-names = "default";
-- 
2.17.1



  parent reply	other threads:[~2022-04-21 16:46 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-20 21:34 [PATCH 5.10.y-cip 00/24] Add sound support to Renesas RZ/G2L SoC Lad Prabhakar
2022-04-20 21:34 ` [PATCH 5.10.y-cip 01/24] ASoC: dt-bindings: Document RZ/G2L bindings Lad Prabhakar
2022-04-20 21:34 ` [PATCH 5.10.y-cip 02/24] ASoC: dt-bindings: sound: renesas,rz-ssi: Document DMA support Lad Prabhakar
2022-04-20 21:34 ` [PATCH 5.10.y-cip 03/24] ASoC: dt-bindings: renesas,rz-ssi: Update slave dma channel configuration parameter Lad Prabhakar
2022-04-21  8:32   ` Pavel Machek
2022-04-21 10:55     ` Prabhakar Mahadev Lad
2022-04-20 21:34 ` [PATCH 5.10.y-cip 04/24] ASoC: sh: Add RZ/G2L SSIF-2 driver Lad Prabhakar
2022-04-21  1:12   ` nobuhiro1.iwamatsu
2022-04-21 10:50     ` Prabhakar Mahadev Lad
2022-04-21 11:02       ` Pavel Machek
2022-04-21 11:18         ` Prabhakar Mahadev Lad
2022-04-20 21:34 ` [PATCH 5.10.y-cip 05/24] ASoC: sh: rz-ssi: Add SSI DMAC support Lad Prabhakar
2022-04-21  8:33   ` Pavel Machek
2022-04-21 11:02     ` Prabhakar Mahadev Lad
2022-04-20 21:34 ` [PATCH 5.10.y-cip 06/24] ASoC: sh: rz-ssi: Fix dereference of noderef expression warning Lad Prabhakar
2022-04-20 21:34 ` [PATCH 5.10.y-cip 07/24] ASoC: sh: rz-ssi: Fix wrong operator used issue Lad Prabhakar
2022-04-20 21:34 ` [PATCH 5.10.y-cip 08/24] ASoC: sh: rz-ssi: Improve error handling in rz_ssi_dma_request function Lad Prabhakar
2022-04-20 21:34 ` [PATCH 5.10.y-cip 09/24] ASoC: sh: rz-ssi: Check return value of pm_runtime_resume_and_get() Lad Prabhakar
2022-04-20 21:34 ` [PATCH 5.10.y-cip 10/24] ASoC: sh: rz-ssi: Drop calling rz_ssi_pio_recv() recursively Lad Prabhakar
2022-04-20 21:34 ` [PATCH 5.10.y-cip 11/24] ASoC: sh: rz-ssi: Make the data structures available before registering the handlers Lad Prabhakar
2022-04-20 21:34 ` [PATCH 5.10.y-cip 12/24] ASoC: sh: rz-ssi: Drop ssi parameter from rz_ssi_stream_init() Lad Prabhakar
2022-04-20 21:34 ` [PATCH 5.10.y-cip 13/24] ASoC: sh: rz-ssi: Make return type of rz_ssi_stream_is_valid() to bool Lad Prabhakar
2022-04-20 21:34 ` [PATCH 5.10.y-cip 14/24] ASoC: sh: rz-ssi: Use a do-while loop in rz_ssi_pio_recv() Lad Prabhakar
2022-04-20 21:34 ` [PATCH 5.10.y-cip 15/24] ASoC: sh: rz-ssi: Add rz_ssi_set_substream() helper function Lad Prabhakar
2022-04-20 21:34 ` [PATCH 5.10.y-cip 16/24] ASoC: sh: rz-ssi: Remove duplicate macros Lad Prabhakar
2022-04-20 21:34 ` [PATCH 5.10.y-cip 17/24] arm64: dts: renesas: r9a07g044: Add external audio clock nodes Lad Prabhakar
2022-04-20 21:34 ` [PATCH 5.10.y-cip 18/24] arm64: dts: renesas: r9a07g044: Add SSI support Lad Prabhakar
2022-04-20 21:34 ` [PATCH 5.10.y-cip 19/24] arm64: dts: renesas: r9a07g044: Add DMA support to SSI Lad Prabhakar
2022-04-20 21:34 ` [PATCH 5.10.y-cip 20/24] arm64: dts: renesas: rzg2l-smarc: Add WM8978 sound codec Lad Prabhakar
2022-04-20 21:34 ` Lad Prabhakar [this message]
2022-04-21 11:15   ` [PATCH 5.10.y-cip 21/24] arm64: dts: renesas: rzg2l-smarc: Enable audio Pavel Machek
2022-04-21 11:18     ` Biju Das
2022-04-20 21:34 ` [PATCH 5.10.y-cip 22/24] arm64: dts: renesas: rzg2l-smarc: Add Mic routing Lad Prabhakar
2022-04-20 21:34 ` [PATCH 5.10.y-cip 23/24] arm64: defconfig: Enable SOUND_SOC_RZ Lad Prabhakar
2022-04-20 21:34 ` [PATCH 5.10.y-cip 24/24] arm64: defconfig: Enable SND_SOC_WM8978 Lad Prabhakar
2022-04-21  3:25 ` [PATCH 5.10.y-cip 00/24] Add sound support to Renesas RZ/G2L SoC nobuhiro1.iwamatsu
2022-04-21 11:17   ` Pavel Machek
2022-04-25  5:52   ` Prabhakar Mahadev Lad
2022-04-25  7:25     ` nobuhiro1.iwamatsu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220420213424.27837-22-prabhakar.mahadev-lad.rj@bp.renesas.com \
    --to=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=cip-dev@lists.cip-project.org \
    --cc=nobuhiro1.iwamatsu@toshiba.co.jp \
    --cc=pavel@denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.