diff mbox

[v2,1/5] ARM: dts: iwg20d-q7-common: Sound PIO support

Message ID 1513621361-10944-2-git-send-email-biju.das@bp.renesas.com (mailing list archive)
State Accepted
Commit cfa2e2f7cf22d0523a88c6284606baa9b2698866
Delegated to: Simon Horman
Headers show

Commit Message

Biju Das Dec. 18, 2017, 6:22 p.m. UTC
Enable sound PIO support on carrier board.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
v1-->v2
 * Reworked sorting

 arch/arm/boot/dts/iwg20d-q7-common.dtsi | 46 +++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

Comments

Simon Horman Dec. 20, 2017, 9:41 a.m. UTC | #1
On Mon, Dec 18, 2017 at 06:22:37PM +0000, Biju Das wrote:
> Enable sound PIO support on carrier board.
> 
> Signed-off-by: Biju Das <biju.das@bp.renesas.com>
> Reviewed-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> v1-->v2
>  * Reworked sorting
> 
>  arch/arm/boot/dts/iwg20d-q7-common.dtsi | 46 +++++++++++++++++++++++++++++++++
>  1 file changed, 46 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/iwg20d-q7-common.dtsi b/arch/arm/boot/dts/iwg20d-q7-common.dtsi
> index 2070b14..ed67201 100644
> --- a/arch/arm/boot/dts/iwg20d-q7-common.dtsi
> +++ b/arch/arm/boot/dts/iwg20d-q7-common.dtsi
> @@ -34,6 +34,22 @@
>  		regulator-always-on;
>  	};
>  
> +	rsnd_sgtl5000: sound {
> +		compatible = "simple-audio-card";
> +
> +		simple-audio-card,format = "i2s";
> +		simple-audio-card,bitclock-master = <&sndcodec>;
> +		simple-audio-card,frame-master = <&sndcodec>;
> +
> +		sndcpu: simple-audio-card,cpu {
> +			sound-dai = <&rcar_sound>;
> +		};
> +
> +		sndcodec: simple-audio-card,codec {
> +			sound-dai = <&sgtl5000>;

I'm sorry for not noticing this earlier but with this patch applied
(and none of the others in this series) I see the following error:

arch/arm/boot/dts/r8a7743-iwg20d-q7.dtb: ERROR (phandle_references):
Reference to non-existent node or label "sgtl5000"

At the very least this will break bisection.
Please find a way to avoid this.
Simon Horman Dec. 20, 2017, 9:49 a.m. UTC | #2
On Wed, Dec 20, 2017 at 10:41:28AM +0100, Simon Horman wrote:
> On Mon, Dec 18, 2017 at 06:22:37PM +0000, Biju Das wrote:
> > Enable sound PIO support on carrier board.
> > 
> > Signed-off-by: Biju Das <biju.das@bp.renesas.com>
> > Reviewed-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
> > Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > ---
> > v1-->v2
> >  * Reworked sorting
> > 
> >  arch/arm/boot/dts/iwg20d-q7-common.dtsi | 46 +++++++++++++++++++++++++++++++++
> >  1 file changed, 46 insertions(+)
> > 
> > diff --git a/arch/arm/boot/dts/iwg20d-q7-common.dtsi b/arch/arm/boot/dts/iwg20d-q7-common.dtsi
> > index 2070b14..ed67201 100644
> > --- a/arch/arm/boot/dts/iwg20d-q7-common.dtsi
> > +++ b/arch/arm/boot/dts/iwg20d-q7-common.dtsi
> > @@ -34,6 +34,22 @@
> >  		regulator-always-on;
> >  	};
> >  
> > +	rsnd_sgtl5000: sound {
> > +		compatible = "simple-audio-card";
> > +
> > +		simple-audio-card,format = "i2s";
> > +		simple-audio-card,bitclock-master = <&sndcodec>;
> > +		simple-audio-card,frame-master = <&sndcodec>;
> > +
> > +		sndcpu: simple-audio-card,cpu {
> > +			sound-dai = <&rcar_sound>;
> > +		};
> > +
> > +		sndcodec: simple-audio-card,codec {
> > +			sound-dai = <&sgtl5000>;
> 
> I'm sorry for not noticing this earlier but with this patch applied
> (and none of the others in this series) I see the following error:
> 
> arch/arm/boot/dts/r8a7743-iwg20d-q7.dtb: ERROR (phandle_references):
> Reference to non-existent node or label "sgtl5000"
> 
> At the very least this will break bisection.
> Please find a way to avoid this.

Sorry for the false alarm!!!

It looks like "ARM: dts: iwg20d-q7-common: Enable SGTL5000 audio codec"
was missing from my tree and all is well with that patch present.
diff mbox

Patch

diff --git a/arch/arm/boot/dts/iwg20d-q7-common.dtsi b/arch/arm/boot/dts/iwg20d-q7-common.dtsi
index 2070b14..ed67201 100644
--- a/arch/arm/boot/dts/iwg20d-q7-common.dtsi
+++ b/arch/arm/boot/dts/iwg20d-q7-common.dtsi
@@ -34,6 +34,22 @@ 
 		regulator-always-on;
 	};
 
+	rsnd_sgtl5000: sound {
+		compatible = "simple-audio-card";
+
+		simple-audio-card,format = "i2s";
+		simple-audio-card,bitclock-master = <&sndcodec>;
+		simple-audio-card,frame-master = <&sndcodec>;
+
+		sndcpu: simple-audio-card,cpu {
+			sound-dai = <&rcar_sound>;
+		};
+
+		sndcodec: simple-audio-card,codec {
+			sound-dai = <&sgtl5000>;
+		};
+	};
+
 	vcc_sdhi1: regulator-vcc-sdhi1 {
 		compatible = "regulator-fixed";
 
@@ -166,6 +182,11 @@ 
 		power-source = <1800>;
 	};
 
+	sound_pins: sound {
+		groups = "ssi0129_ctrl", "ssi0_data", "ssi1_data";
+		function = "ssi";
+	};
+
 	usb0_pins: usb0 {
 		groups = "usb0";
 		function = "usb0";
@@ -177,6 +198,22 @@ 
 	};
 };
 
+&rcar_sound {
+	pinctrl-0 = <&sound_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+
+	/* Single DAI */
+	#sound-dai-cells = <0>;
+
+	rcar_sound,dai {
+		dai0 {
+			playback = <&ssi1>;
+			capture = <&ssi0>;
+		};
+	};
+};
+
 &scif0 {
 	pinctrl-0 = <&scif0_pins>;
 	pinctrl-names = "default";
@@ -205,6 +242,15 @@ 
 	status = "okay";
 };
 
+&ssi0 {
+	pio-transfer;
+};
+
+&ssi1 {
+	pio-transfer;
+	shared-pin;
+};
+
 &usbphy {
 	status = "okay";
 };