[Letux-kernel] jz4730 sound
Paul Boddie
paul at boddie.org.uk
Sun Jan 24 19:37:23 CET 2021
On Saturday, 23 January 2021 18:22:46 CET H. Nikolaus Schaller wrote:
> Hi Paul,
> I have found some issues in the device tree and
> the i2s node wasn't complete at all.
Sorry not to reply to this earlier! To look into this a bit more, I reviewed
the clock definitions and found that we were missing a "bitclk" for AIC/I2S,
and the gating wasn't being done for the existing I2S clock. So, there's a
patch to add a new clock and to update the existing one.
> Hence I have checked with jz4740 and the i2s controllers
> are quite similar. On a first scan of the documentation
> there are only minor differences in 24 bit capabilites.
> And some status registers may have additional bits.
It will probably need checking just to make sure.
> So it is likely to get it run.
>
> But it needs DMA...
> And I2C to access the external sound chip...
I hadn't looked into interacting with the sound chip over I2C, not really
knowing where to start, but we will obviously need reliable I2C support to
have a chance of setting it up.
> Maybe it is also easier to test DMA for this subsystem
> than for MMC which is necessary for boot.
Yes, I would imagine so.
> Anyways, attached is a proposal where I think the compatible,
> the ref and the interrupt and dma channel numbers are correct.
>
> What do you think how to correctly set up the jz4730 clocks?
The patch should fix the clocks to make them available. About the node
itself...
> i2s: i2s at 10020000 {
> compatible = "ingenic,jz4730-i2s";
I guess we will only need JZ4730-specific identification if there are some
differences, but you probably know more about this than me at the moment. :-)
> reg = <0x10020000 0x38>;
>
> #sound-dai-cells = <0>;
>
> interrupt-parent = <&intc>;
> interrupts = <20>;
>
> /* FIXME:
> clocks = <&cgu JZ4740_CLK_AIC>,
> <&cgu JZ4740_CLK_I2S>,
> <&cgu JZ4740_CLK_EXT>,
> <&cgu JZ4740_CLK_PLL_HALF>;
> clock-names = "aic", "i2s", "ext", "pll half";
> */
This looks OK. I add the missing AIC clock in the patch, which is the
"bitclk".
> dmas = <&dmac 25 0xffffffff>, <&dmac 24 0xffffffff>;
> dma-names = "rx", "tx";
> };
I hope this is OK, too!
Paul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Added-missing-AIC-clock-and-gating-for-I2S-clock.patch
Type: text/x-patch
Size: 1742 bytes
Desc: not available
URL: <http://lists.goldelico.com/pipermail/letux-kernel/attachments/20210124/6ff10e15/attachment.bin>
More information about the Letux-kernel
mailing list