All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: imx6ul-pico-hobbit: add sgtl5000 sound card support
@ 2016-09-05  8:21 Winter Wang
       [not found] ` <1473063707-31282-1-git-send-email-wente.wang-3arQi8VN3Tc@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Winter Wang @ 2016-09-05  8:21 UTC (permalink / raw)
  To: shawnguo-DgEjT+Ai2ygdnm+yROfE0A, fabio.estevam-3arQi8VN3Tc,
	kernel-bIcnvbaLZ9MEGnE8C9+IrQ
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA

use simple-audio-card to support sgtl5000 with SAI interface.

Signed-off-by: Winter Wang <wente.wang-3arQi8VN3Tc@public.gmane.org>
---
 arch/arm/boot/dts/imx6ul-pico-hobbit.dts | 29 +++++++++++++++++++++--------
 arch/arm/boot/dts/imx6ul-pinfunc.h       |  2 +-
 2 files changed, 22 insertions(+), 9 deletions(-)

diff --git a/arch/arm/boot/dts/imx6ul-pico-hobbit.dts b/arch/arm/boot/dts/imx6ul-pico-hobbit.dts
index c11ab57..94969bd 100644
--- a/arch/arm/boot/dts/imx6ul-pico-hobbit.dts
+++ b/arch/arm/boot/dts/imx6ul-pico-hobbit.dts
@@ -101,15 +101,26 @@
 	};
 
 	sound {
-		compatible = "fsl,imx-audio-sgtl5000";
-		model = "imx6ul-sgtl5000";
-		audio-cpu = <&sai1>;
-		audio-codec = <&codec>;
-		audio-routing =
-			"LINE_IN", "Line In Jack",
-			"MIC_IN", "Mic Jack",
-			"Mic Jack", "Mic Bias",
+		compatible = "simple-audio-card";
+		simple-audio-card,name = "imx6ul-sgtl5000";
+		simple-audio-card,format = "i2s";
+		simple-audio-card,bitclock-master = <&dailink_master>;
+		simple-audio-card,frame-master = <&dailink_master>;
+		simple-audio-card,widgets =
+			"Microphone", "Microphone Jack",
+			"Headphone", "Headphone Jack";
+		simple-audio-card,routing =
+			"MIC_IN", "Microphone Jack",
+			"Microphone Jack", "Mic Bias",
 			"Headphone Jack", "HP_OUT";
+
+		simple-audio-card,cpu {
+			sound-dai = <&sai1>;
+		};
+
+		dailink_master: simple-audio-card,codec {
+			sound-dai = <&codec>;
+		};
 	};
 
 	sys_mclk: clock-sys-mclk {
@@ -218,6 +229,7 @@
 	status = "okay";
 
 	codec: sgtl5000@0a {
+		#sound-dai-cells = <0>;
 		reg = <0x0a>;
 		compatible = "fsl,sgtl5000";
 		clocks = <&sys_mclk>;
@@ -284,6 +296,7 @@
 };
 
 &sai1 {
+	#sound-dai-cells = <0>;
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_sai1>;
 	status = "okay";
diff --git a/arch/arm/boot/dts/imx6ul-pinfunc.h b/arch/arm/boot/dts/imx6ul-pinfunc.h
index 0034eeb..3397b49 100644
--- a/arch/arm/boot/dts/imx6ul-pinfunc.h
+++ b/arch/arm/boot/dts/imx6ul-pinfunc.h
@@ -924,7 +924,7 @@
 #define MX6UL_PAD_CSI_DATA06__ECSPI1_MOSI		0x01fc 0x0488 0x053c 3 1
 #define MX6UL_PAD_CSI_DATA06__EIM_AD06			0x01fc 0x0488 0x0000 4 0
 #define MX6UL_PAD_CSI_DATA06__GPIO4_IO27		0x01fc 0x0488 0x0000 5 0
-#define MX6UL_PAD_CSI_DATA06__SAI1_RX_DATA		0x01fc 0x0488 0x0000 6 0
+#define MX6UL_PAD_CSI_DATA06__SAI1_RX_DATA		0x01fc 0x0488 0x05E4 6 1
 #define MX6UL_PAD_CSI_DATA06__USDHC1_RESET_B		0x01fc 0x0488 0x0000 8 0
 #define MX6UL_PAD_CSI_DATA07__CSI_DATA09		0x0200 0x048c 0x04e8 0 1
 #define MX6UL_PAD_CSI_DATA07__USDHC2_DATA7		0x0200 0x048c 0x0698 1 2
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: dts: imx6ul-pico-hobbit: add sgtl5000 sound card support
  2016-09-05  8:21 [PATCH] ARM: dts: imx6ul-pico-hobbit: add sgtl5000 sound card support Winter Wang
@ 2016-09-05 11:27     ` Fabio Estevam
  0 siblings, 0 replies; 5+ messages in thread
From: Fabio Estevam @ 2016-09-05 11:27 UTC (permalink / raw)
  To: Winter Wang
  Cc: Shawn Guo, Fabio Estevam, Sascha Hauer,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA

Hi Winter,

On Mon, Sep 5, 2016 at 5:21 AM, Winter Wang <wente.wang-3arQi8VN3Tc@public.gmane.org> wrote:
> use simple-audio-card to support sgtl5000 with SAI interface.

Is this really needed? Currently we get audio working via
sound/soc/fsl/fsl-asoc-card.c driver.

> diff --git a/arch/arm/boot/dts/imx6ul-pinfunc.h b/arch/arm/boot/dts/imx6ul-pinfunc.h
> index 0034eeb..3397b49 100644
> --- a/arch/arm/boot/dts/imx6ul-pinfunc.h
> +++ b/arch/arm/boot/dts/imx6ul-pinfunc.h
> @@ -924,7 +924,7 @@
>  #define MX6UL_PAD_CSI_DATA06__ECSPI1_MOSI              0x01fc 0x0488 0x053c 3 1
>  #define MX6UL_PAD_CSI_DATA06__EIM_AD06                 0x01fc 0x0488 0x0000 4 0
>  #define MX6UL_PAD_CSI_DATA06__GPIO4_IO27               0x01fc 0x0488 0x0000 5 0
> -#define MX6UL_PAD_CSI_DATA06__SAI1_RX_DATA             0x01fc 0x0488 0x0000 6 0
> +#define MX6UL_PAD_CSI_DATA06__SAI1_RX_DATA             0x01fc 0x0488 0x05E4 6 1

This should be a separate change and you need to explain it.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] ARM: dts: imx6ul-pico-hobbit: add sgtl5000 sound card support
@ 2016-09-05 11:27     ` Fabio Estevam
  0 siblings, 0 replies; 5+ messages in thread
From: Fabio Estevam @ 2016-09-05 11:27 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Winter,

On Mon, Sep 5, 2016 at 5:21 AM, Winter Wang <wente.wang@nxp.com> wrote:
> use simple-audio-card to support sgtl5000 with SAI interface.

Is this really needed? Currently we get audio working via
sound/soc/fsl/fsl-asoc-card.c driver.

> diff --git a/arch/arm/boot/dts/imx6ul-pinfunc.h b/arch/arm/boot/dts/imx6ul-pinfunc.h
> index 0034eeb..3397b49 100644
> --- a/arch/arm/boot/dts/imx6ul-pinfunc.h
> +++ b/arch/arm/boot/dts/imx6ul-pinfunc.h
> @@ -924,7 +924,7 @@
>  #define MX6UL_PAD_CSI_DATA06__ECSPI1_MOSI              0x01fc 0x0488 0x053c 3 1
>  #define MX6UL_PAD_CSI_DATA06__EIM_AD06                 0x01fc 0x0488 0x0000 4 0
>  #define MX6UL_PAD_CSI_DATA06__GPIO4_IO27               0x01fc 0x0488 0x0000 5 0
> -#define MX6UL_PAD_CSI_DATA06__SAI1_RX_DATA             0x01fc 0x0488 0x0000 6 0
> +#define MX6UL_PAD_CSI_DATA06__SAI1_RX_DATA             0x01fc 0x0488 0x05E4 6 1

This should be a separate change and you need to explain it.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] ARM: dts: imx6ul-pico-hobbit: add sgtl5000 sound card support
  2016-09-05 11:27     ` Fabio Estevam
@ 2016-09-07 12:53       ` Winter Wang
  -1 siblings, 0 replies; 5+ messages in thread
From: Winter Wang @ 2016-09-07 12:53 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Fabio Estevam Estevam, devicetree, Shawn Guo, linux-arm-kernel,
	Sascha Hauer

> -----Original Message-----
> From: Fabio Estevam [mailto:festevam@gmail.com]
> To: Wente Wang <wente.wang@nxp.com>
> Cc: Shawn Guo <shawnguo@kernel.org>; Fabio Estevam <fabio.estevam@nxp.com>;
> Sascha Hauer <kernel@pengutronix.de>; linux-arm-kernel@lists.infradead.org;
> devicetree@vger.kernel.org
> Subject: Re: [PATCH] ARM: dts: imx6ul-pico-hobbit: add sgtl5000 sound card
> support
> 
> Hi Winter,
> 
> On Mon, Sep 5, 2016 at 5:21 AM, Winter Wang <wente.wang@nxp.com> wrote:
> > use simple-audio-card to support sgtl5000 with SAI interface.
> 
> Is this really needed? Currently we get audio working via sound/soc/fsl/fsl-
> asoc-card.c driver.
> > diff --git a/arch/arm/boot/dts/imx6ul-pinfunc.h
> > b/arch/arm/boot/dts/imx6ul-pinfunc.h
> > index 0034eeb..3397b49 100644
> > --- a/arch/arm/boot/dts/imx6ul-pinfunc.h
> > +++ b/arch/arm/boot/dts/imx6ul-pinfunc.h
> > @@ -924,7 +924,7 @@
> >  #define MX6UL_PAD_CSI_DATA06__ECSPI1_MOSI              0x01fc 0x0488
> 0x053c 3 1
> >  #define MX6UL_PAD_CSI_DATA06__EIM_AD06                 0x01fc 0x0488
> 0x0000 4 0
> >  #define MX6UL_PAD_CSI_DATA06__GPIO4_IO27               0x01fc 0x0488
> 0x0000 5 0
> > -#define MX6UL_PAD_CSI_DATA06__SAI1_RX_DATA             0x01fc 0x0488
> 0x0000 6 0
> > +#define MX6UL_PAD_CSI_DATA06__SAI1_RX_DATA             0x01fc 0x0488
> 0x05E4 6 1
> 
> This should be a separate change and you need to explain it.
I'm trying to enable pico's sgtl5000 on 4.4 kernel, but recording is not working sometimes.
I think it may related with pinfunc.h, will check that.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] ARM: dts: imx6ul-pico-hobbit: add sgtl5000 sound card support
@ 2016-09-07 12:53       ` Winter Wang
  0 siblings, 0 replies; 5+ messages in thread
From: Winter Wang @ 2016-09-07 12:53 UTC (permalink / raw)
  To: linux-arm-kernel

> -----Original Message-----
> From: Fabio Estevam [mailto:festevam at gmail.com]
> To: Wente Wang <wente.wang@nxp.com>
> Cc: Shawn Guo <shawnguo@kernel.org>; Fabio Estevam <fabio.estevam@nxp.com>;
> Sascha Hauer <kernel@pengutronix.de>; linux-arm-kernel at lists.infradead.org;
> devicetree at vger.kernel.org
> Subject: Re: [PATCH] ARM: dts: imx6ul-pico-hobbit: add sgtl5000 sound card
> support
> 
> Hi Winter,
> 
> On Mon, Sep 5, 2016 at 5:21 AM, Winter Wang <wente.wang@nxp.com> wrote:
> > use simple-audio-card to support sgtl5000 with SAI interface.
> 
> Is this really needed? Currently we get audio working via sound/soc/fsl/fsl-
> asoc-card.c driver.
> > diff --git a/arch/arm/boot/dts/imx6ul-pinfunc.h
> > b/arch/arm/boot/dts/imx6ul-pinfunc.h
> > index 0034eeb..3397b49 100644
> > --- a/arch/arm/boot/dts/imx6ul-pinfunc.h
> > +++ b/arch/arm/boot/dts/imx6ul-pinfunc.h
> > @@ -924,7 +924,7 @@
> >  #define MX6UL_PAD_CSI_DATA06__ECSPI1_MOSI              0x01fc 0x0488
> 0x053c 3 1
> >  #define MX6UL_PAD_CSI_DATA06__EIM_AD06                 0x01fc 0x0488
> 0x0000 4 0
> >  #define MX6UL_PAD_CSI_DATA06__GPIO4_IO27               0x01fc 0x0488
> 0x0000 5 0
> > -#define MX6UL_PAD_CSI_DATA06__SAI1_RX_DATA             0x01fc 0x0488
> 0x0000 6 0
> > +#define MX6UL_PAD_CSI_DATA06__SAI1_RX_DATA             0x01fc 0x0488
> 0x05E4 6 1
> 
> This should be a separate change and you need to explain it.
I'm trying to enable pico's sgtl5000 on 4.4 kernel, but recording is not working sometimes.
I think it may related with pinfunc.h, will check that.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-09-07 12:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-05  8:21 [PATCH] ARM: dts: imx6ul-pico-hobbit: add sgtl5000 sound card support Winter Wang
     [not found] ` <1473063707-31282-1-git-send-email-wente.wang-3arQi8VN3Tc@public.gmane.org>
2016-09-05 11:27   ` Fabio Estevam
2016-09-05 11:27     ` Fabio Estevam
2016-09-07 12:53     ` Winter Wang
2016-09-07 12:53       ` Winter Wang

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.