Repository navigation
Add initial support for i.MX8 SOF driver - #1048
Conversation
plbossart
left a comment
There was a problem hiding this comment.
Thanks @dbaluta, this is really cool.
I have a couple of comments below, mostly to make sure the license choice is intentional and on the machine driver load. This will likely need a bit more work to reconcile the DT and ACPI ways of dealing with the machine driver.
But yes, nice work!
Add support for device tree based SOF DSP devices. Signed-off-by: Daniel Baluta <[email protected]>
| static int imx8_run(struct snd_sof_dev *sdev) | ||
| { | ||
| int ret; | ||
| struct imx8_priv *dsp_priv = (struct imx8_priv *)sdev->private; |
There was a problem hiding this comment.
@dbaluta only minor but for the sake of consistency can you please switch the 2 statements so the struct goes first.
| static int imx8_remove(struct snd_sof_dev *sdev) | ||
| { | ||
| int i; | ||
| struct imx8_priv *priv = (struct imx8_priv *)sdev->private; |
|
@dbaluta just wondering if you forgot to include a header file? where are the functions like imx_ring_doorbell() defined? |
Add support for the audio DSP hardware found on NXP i.MX8 platform. Signed-off-by: Daniel Baluta <[email protected]>
Add dummy support for SAI/ESAI digital audio interface IPs found on i.MX8 boards. Signed-off-by: Daniel Baluta <[email protected]>
|
@ranj063 imx_ring_doorbell prototype is defined in #include <linux/firmware/imx/dsp.h>. This header is already included at the top of imx8.c file dsp.h file will reach linux tree via imx8 maintainer. The patch was already send and reviewed here: Now, theoretically this PR doesn't compile on its own. It needs the patch above. Anyhow, the imx8 SOF driver has a Kconfig dependency on IMX DSP so practically we won't be able to select it for compilation until all changes get merged into the same tree. |
|
SOFCI TEST |
|
ok let's merge and start including i.MX support! |
|
@plbossart thanks! IMX DSP protocol interface was accepted through Shawn's tree: https://lkml.org/lkml/2019/8/12/605 We are still waiting for DTS file review and hopefully with your next rebase of sof-dev we will have a working imx initial support! Thanks again for support and review! |
commented
Aug 12, 2019
via email
|
On 8/12/19 10:25 AM, Daniel Baluta wrote:
@plbossart <https://github.com/plbossart> thanks! IMX DSP protocol
interface was accepted through Shawn's tree [1]
Do you want to cherry-pick the required patches and submit them as well
for the SOF tree? Or do we wait for after the 5.4 merge window where all
of this will be available?
|
commented
Aug 12, 2019
|
@dbaluta I just did a rebase on upstream, do you want me to send the patches directly to Mark? |
commented
Aug 12, 2019
|
@plbossart yes, please send them to Mark. Also, for patches merged via other trees would be nice to cherry pick them if it isnt too stressful for you. Will provide with a pointer to linux-next once the patches are there. |
commented
Aug 12, 2019
via email
|
On 8/12/19 11:16 AM, Daniel Baluta wrote:
@plbossart <https://github.com/plbossart> yes, please send them to Mark.
Also, for patches merged via other trees would be nice to cherry pick
them if it isnt too stressful for you. Will provide with a pointer to
linux-next once the patches are there.
if you want to cherry-pick on top of topic/sof-dev, and push a PR then I
can just merge the new PR and we are done.
|
commented
Aug 12, 2019
|
@plbossart thanks! Done. What is the difference between topic/sof-dev and topic/sof-dev/rebase ? Another question: are you also shipping SOF with 4.19 kernel? |
commented
Aug 12, 2019
via email
|
What is the difference between topic/sof-dev and topic/sof-dev/rebase ?
hint: the name tells you the difference :-)
the -rebase version doesn't keep the history and will be rebased on top
of the latest upstream code (Mark Brown's for-next + Takashi's for-next
+ soundWire stuff).
the regular version will in contrast be updated with a set of regular
merges from upstream. Doing merges is nice for developers, and keeps
history. The flip side is that it makes it really hard to figure out the
differences with upstream, and gitk goes all over the place, while in
the -rebase case you can literally see the patches to be queued in
linear order (and we can even squash/reorder for simplicity).
The flow is everything takes place in topic/sof-dev. When we do upstream
merges, we update topic/sof-dev-rebase as well, make sure the two
branches are exactly identical, then I upstream from topic/sof-dev-rebase.
Another question: are you also shipping SOF with 4.19 kernel?
There are SOF-based products using 4.19 and 5.0, but the kernels are no
longer directly maintained by the SOF team. We used to maintain
backports initially for Intel-based solutions but we've started to let
our partners (be they internal or internal) do the work. I don't think a
single team can do both upstream and downstream work at this point. And
unfortunately for ARM platforms the scripts we used are probably
completely useless since we essentially ignored those platforms...
|
Hello @plbossart @ranj063 @lgirdwood
This is version 4 of the patches that add the initial DSP Linux driver for i.MX8 into SOF.
This version only contains SOF related patches and fixes review comments from @plbossart and Lucas Stach from arm mailing list:
https://lore.kernel.org/linux-arm-kernel/[email protected]/
This patches would require IMX DSP interface driver (which I hope to be soon merged by Shawn Guo - imx maintainer).
https://lkml.org/lkml/2019/8/1/260
Now there is the tricky part: how do we bring all these patches together because SOF Linux driver
depends on IMX DSP. I have handled this through KConfig depenencies. So, one cannot select SOF Linux driver compilation without imx dsp.
Hello @lgirdwood @ranj063 @plbossart
This is version 3 of the patch to add the initial DSP Linux driver for i.MX8 into SOF.
For compilation you need to use the following kconfig fragment:
thesofproject/kconfig#13
I have added all patches related to DSP here in order to be able to do a proper compilation.
these patches are under review with arm64/imx community
ASoC: SOF: Add DT DSP device support
dt-bindings: dsp: fsl: Add DSP core binding support
arm64: dts: imx8qxp: Add DSP DT node
these patches need to be reviewed by SOF community
ASoC: SOF: Add DT DSP device support
ASoC: SOF: topology: Add dummy support for i.MX8 DAIs
ASoC: SOF: imx: Add i.MX8 HW support
this patch is under review:
firmware: imx: Add DSP IPC protocol interface
Patches below are already accepted into Shawn's Guo tree for i.mx8 arm.
clk: imx8: Add DSP related clocks
firmware: imx: scu-pd: Add IRQSTR_DSP PD range
firmware: imx: scu-pd: Add mu13 b side PD range
firmware: imx: scu-pd: Rename mu PD range to mu_a
arm64: dts: imx8qxp: sort LSIO subsystem devices
arm64: dts: imx8qxp: Add lsio_mu13 node
Version 2:
Hello veryone @ranj063 @plbossart @lgirdwood. This is version 2 of the PR trying to add basic support for i.MX8.
What changed since v1:
All patches are here, together with some patches for serial console to work.
https://github.com/dbaluta/linux/commits/topic/sof-dev
All this patches were sent to review, as follows:
https://lkml.org/lkml/2019/7/18/252
https://lkml.org/lkml/2019/7/18/123
@plbossart @lgirdwood what do you think would be the appropriate way to have this reviewed with the alsa community? I guess starting the patches to alsa-devel would be the right way to do?
Version 1:
This patch series add basic support for i.MX8 SOF driver.
First 3 patches introduce DSP IPC protocol driver (review with community ongoing - https://lkml.org/lkml/2019/6/14/165)
505a33c dt-bindings: arm: fsl: Add DSP IPC binding support
00a5e98 firmware: imx: Add DSP IPC protocol driver
d2a410a mailbox: imx: Clear GIEn bit at shutdown
Next 3 patches add DT nodes corresponding to DSP. Review will be started with community soon.
15ccaaa arm64: dts: imx8qxp: Add DSP DT node
d4dfab8 arm64: dts: imx8qxp: Add DSP MU node
76760c1 clk: imx8qxp: Add DSP clocks
Next 2 patches are small SOF cleanups that can be merged as they are:
7310ddc ASoC: SOF: loader: Dont ignore SRAM block types
23159b1 ASoC: SOF: loader: Use the BAR provided by FW
Last 3 patches are the actual support for i.MX8 SOF driver.
70dd8da ASoC: SOF: Add DT DSP device support
5b28a5e ASoC: SOF: topology: Add dummy support for i.MX8 DAIs
b79c490 ASoC: SOF: imx: Add i.MX8 HW support
Would like to see some review for last 5 patches.