Re: [PATCH v4 5/5] arm64: dts: imx8mq-evk: Enable wm8524 codec

2019-03-08 Thread Daniel Baluta
On Fri, Mar 8, 2019 at 12:32 PM Fabio Estevam  wrote:
>
> Hi Daniel,
>
> On Fri, Mar 1, 2019 at 12:53 PM Daniel Baluta  wrote:
>
> > They are used by simple-card.c machine driver.
> >
> > asoc_simple_card_parse_clk
> > -> /* Parse dai->sysclk come from "clocks = <>" */
> > clk = devm_get_clk_from_child(dev, node, NULL);
>
> The simple-card looks for the "clocks" properties inside the
> simple-card node, not inside the codec node, right?

I see your point now.

Indeed, "clocks" properties is the one inside simple-card.

   sound-wm8524 {
   compatible = "simple-audio-card";
   link_codec: simple-audio-card,codec {
   sound-dai = <>;
   clocks = < IMX8MQ_CLK_SAI2_ROOT>;

Will remove them from  wm8524: audio-codec node because
they are useless there.

thanks,
Daniel.


Re: [PATCH v4 5/5] arm64: dts: imx8mq-evk: Enable wm8524 codec

2019-03-08 Thread Fabio Estevam
Hi Daniel,

On Fri, Mar 1, 2019 at 12:53 PM Daniel Baluta  wrote:

> They are used by simple-card.c machine driver.
>
> asoc_simple_card_parse_clk
> -> /* Parse dai->sysclk come from "clocks = <>" */
> clk = devm_get_clk_from_child(dev, node, NULL);

The simple-card looks for the "clocks" properties inside the
simple-card node, not inside the codec node, right?


Re: [PATCH v4 5/5] arm64: dts: imx8mq-evk: Enable wm8524 codec

2019-03-01 Thread Daniel Baluta
On Thu, Feb 28, 2019 at 11:09 PM Fabio Estevam  wrote:
>
> On Wed, Feb 27, 2019 at 3:38 AM Daniel Baluta  wrote:
>
> > +
> > +   wm8524: audio-codec-0 {
>
> This -0 is not needed as we have a single codec on this board.

Ok, will fix.

>
> > +   #sound-dai-cells = <0>;
> > +   compatible = "wlf,wm8524";
> > +   clocks = < IMX8MQ_CLK_SAI2_ROOT>;
> > +   clock-names = "mclk";
>
> The clocks and clock-names properties can be removed, right?
>
> I don't see them defined in the binding doc and the codec driver does
> not call clk_get(), so there is a mismatch.

They are used by simple-card.c machine driver.

asoc_simple_card_parse_clk
-> /* Parse dai->sysclk come from "clocks = <>" */
clk = devm_get_clk_from_child(dev, node, NULL);

>
> Also, I still think this one and the previous patch could be made into
> a single patch that adds audio support for the board.

Ok.


Re: [PATCH v4 5/5] arm64: dts: imx8mq-evk: Enable wm8524 codec

2019-02-28 Thread Fabio Estevam
On Wed, Feb 27, 2019 at 3:38 AM Daniel Baluta  wrote:

> +
> +   wm8524: audio-codec-0 {

This -0 is not needed as we have a single codec on this board.

> +   #sound-dai-cells = <0>;
> +   compatible = "wlf,wm8524";
> +   clocks = < IMX8MQ_CLK_SAI2_ROOT>;
> +   clock-names = "mclk";

The clocks and clock-names properties can be removed, right?

I don't see them defined in the binding doc and the codec driver does
not call clk_get(), so there is a mismatch.

Also, I still think this one and the previous patch could be made into
a single patch that adds audio support for the board.


[PATCH v4 5/5] arm64: dts: imx8mq-evk: Enable wm8524 codec

2019-02-26 Thread Daniel Baluta
This uses simple-audio-card machine driver adding 1 CPU DAI
and 1 Codec DAI.

Signed-off-by: Daniel Baluta 
---
 arch/arm64/boot/dts/freescale/imx8mq-evk.dts | 29 
 1 file changed, 29 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq-evk.dts 
b/arch/arm64/boot/dts/freescale/imx8mq-evk.dts
index 58de4a3d6029..77f590c13ee0 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mq-evk.dts
@@ -31,6 +31,35 @@
gpio = < 19 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
+
+   wm8524: audio-codec-0 {
+   #sound-dai-cells = <0>;
+   compatible = "wlf,wm8524";
+   clocks = < IMX8MQ_CLK_SAI2_ROOT>;
+   clock-names = "mclk";
+   wlf,mute-gpios = < 8 GPIO_ACTIVE_LOW>;
+   };
+
+   sound-wm8524 {
+   compatible = "simple-audio-card";
+   simple-audio-card,name = "wm8524-audio";
+   simple-audio-card,format = "i2s";
+   simple-audio-card,frame-master = <>;
+   simple-audio-card,bitclock-master = <>;
+   simple-audio-card,widgets =
+   "Line", "Left Line Out Jack",
+   "Line", "Right Line Out Jack";
+   simple-audio-card,routing =
+   "Left Line Out Jack", "LINEVOUTL",
+   "Right Line Out Jack", "LINEVOUTR";
+   cpudai: simple-audio-card,cpu {
+   sound-dai = <>;
+   };
+   link_codec: simple-audio-card,codec {
+   sound-dai = <>;
+   clocks = < IMX8MQ_CLK_SAI2_ROOT>;
+   };
+   };
 };
 
  {
-- 
2.17.1