Message ID | 20190227063737.24445-1-daniel.baluta@nxp.com |
---|---|
Headers | show |
Series | Enable wm8524 on i.MX8MQ-EVK | expand |
On Wed, Feb 27, 2019 at 3:38 AM Daniel Baluta <daniel.baluta@nxp.com> wrote: > > SDMA1 is part of AIPS-3 region and SDMA2 is part > of AIPS-1 region. > > Signed-off-by: Anson Huang <Anson.Huang@nxp.com> > [initial submit in i.MX internal tree] > Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com> > [adaptation for linux-next] Reviewed-by: Fabio Estevam <festevam@gmail.com>
On Wed, Feb 27, 2019 at 3:38 AM Daniel Baluta <daniel.baluta@nxp.com> wrote: > + sai2: sai@308b0000 { > + #sound-dai-cells = <0>; > + compatible = "fsl,imx8mq-sai", > + "fsl,imx6sx-sai"; > + reg = <0x308b0000 0x10000>; > + interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&clk IMX8MQ_CLK_SAI2_IPG>, > + <&clk IMX8MQ_CLK_DUMMY>, > + <&clk IMX8MQ_CLK_SAI2_ROOT>, > + <&clk IMX8MQ_CLK_DUMMY>, <&clk IMX8MQ_CLK_DUMMY>; > + clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3"; mclk0 is not a valid entry as per the binding doc.
On Wed, Feb 27, 2019 at 3:38 AM Daniel Baluta <daniel.baluta@nxp.com> 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 = <&clk 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.
On Thu, Feb 28, 2019 at 8:49 PM Fabio Estevam <festevam@gmail.com> wrote: > > On Wed, Feb 27, 2019 at 3:38 AM Daniel Baluta <daniel.baluta@nxp.com> wrote: > > > + sai2: sai@308b0000 { > > + #sound-dai-cells = <0>; > > + compatible = "fsl,imx8mq-sai", > > + "fsl,imx6sx-sai"; > > + reg = <0x308b0000 0x10000>; > > + interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>; > > + clocks = <&clk IMX8MQ_CLK_SAI2_IPG>, > > + <&clk IMX8MQ_CLK_DUMMY>, > > + <&clk IMX8MQ_CLK_SAI2_ROOT>, > > + <&clk IMX8MQ_CLK_DUMMY>, <&clk IMX8MQ_CLK_DUMMY>; > > + clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3"; > > mclk0 is not a valid entry as per the binding doc. Indeed, will fix in next version. mclk0 is valid in our internal tree because fsl_sai.c supports it. Will remove mclk0 for now and re-add it when I will upstream the SAI patch. Thanks Fabio for review!
On Thu, Feb 28, 2019 at 11:09 PM Fabio Estevam <festevam@gmail.com> wrote: > > On Wed, Feb 27, 2019 at 3:38 AM Daniel Baluta <daniel.baluta@nxp.com> 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 = <&clk 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 = <&xxx>" */ 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.
Hi Daniel, On Fri, Mar 1, 2019 at 12:53 PM Daniel Baluta <daniel.baluta@gmail.com> wrote: > They are used by simple-card.c machine driver. > > asoc_simple_card_parse_clk > -> /* Parse dai->sysclk come from "clocks = <&xxx>" */ > 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?
On Fri, Mar 8, 2019 at 12:32 PM Fabio Estevam <festevam@gmail.com> wrote: > > Hi Daniel, > > On Fri, Mar 1, 2019 at 12:53 PM Daniel Baluta <daniel.baluta@gmail.com> wrote: > > > They are used by simple-card.c machine driver. > > > > asoc_simple_card_parse_clk > > -> /* Parse dai->sysclk come from "clocks = <&xxx>" */ > > 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 = <&wm8524>; clocks = <&clk IMX8MQ_CLK_SAI2_ROOT>; Will remove them from wm8524: audio-codec node because they are useless there. thanks, Daniel.