This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM623: Device tree modifications needed for PCM186x device + external clocking circuit

Part Number: AM623
Other Parts Discussed in Thread: PCM1864, SK-AM62, , TLV320AIC3106

 Team,

My customer is looking to connect a PCM1864 device to our SK-AM62(B) EVM. I see the Linux driver available at /sound/soc/codecs/pcm186x.c/h but don't find any examples in the kernel for a devicetree node for the PCM186x. Any pointers in this direction?

Another wrinkle in the system is that there is a userspace controlled clock generator on the board that will provide the bit clock and the frame sync to BOTH the AM623x and the PCM1864 codecs. Meaning that they will both need to be a clock slave in the system and Linux doesn't need to be involved to generate the correct audio clocks.

The examples that I see in Sitara devicetrees seem to all be using the simple-audio-card which wants either the 'cpu' or the 'codec' to be labeled as the 'bitclock-master' and 'frame-master'. How do I configure both AM623 and PCM1864 in the system to be clock slaves through the device tree node? Is it possible to add another dummy node to simple-audio-card and point to it as the clock master?

Jason

  • Hi Jason,

    I would suggest them to use the clock tree tool to design their system and share us the design for understanding the clocking mechanism from external source.

    Please share them, this document: https://www.ti.com/lit/pdf/sprack0

    If they can interface the codec to our McASP and see the below dts file for reference.

    More information can be found on the Devicetree bindings documentation for reference(simple card/clocks). 
    Documentation/devicetree/bindings/clock/clock-bindings.txt
    I will check internally with the SW team for more inputs. Will share them as I get a response.
    Hope this helps.
    Best Regards,
    Suren
  • Suren,

    No need for the clock tree tool in this scenario. The audio clocks (bit clock, frame sync) are being generated externally and source to both the cpu (MCASP) and the coded (PCM1864). Here's a simplified diagram of the system:

    The document you shared doesn't seem to have a setup where both MCASP and codec are the clock slave and also doesn't seem to be in the context of Linux unless I missed something.

    I've looked at the provided devicetrees and we seem to always put the TLV320AIC3106 and use simple-audio-card with the codec being clock master.

    What I need help with is an example for the PCM1864 codec and MCASP receiving external clocks. And to be specific I need help with the devicetree node to enable that and not pointers to how the MCASP should work.

    Jason

  • Jason,

    I have requested inputs from our SW experts on this. Will respond as soon as I get to hear back. Please expect a response next week.

    Best Regards,

    Suren

  • Hi Jason,

    The current simple-audio-card framework doesn't support such scenario. It's a generic kernel query, so we can post it on different forums or alsa-devel IRC for suggestions.

    Ideally dropping the bitclock and frame master flags from the simple-card node may just work. The customer can try that experiment, but please note that it even if it works it is implementation-defined behaviour that could change in any upstream release.

    An alternative is to write a custom sound card driver to pass CBP_CFP (codec provider) to mcasp and CBC_CFC (codec consumer) to codec, and also limit the sample rate to the hardcoded external frameclock/bitclock.

    Can you check with the customer on why there are chosing this clocking design?

    The codec can divide the master clock down to various sample rates and not just a single fixed bitclock.

    I can go ahead and create MR's for each of these queries to be supported in later releases as they are new development, if it helps.

    Best Regards,

    Suren