<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: sai1 bit clock and frame sync slave? in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/sai1-bit-clock-and-frame-sync-slave/m-p/862516#M131579</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, igor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Referring to&amp;nbsp;IMX8MDQLQRM.pdf, 8.2.4.248 SW_PAD_CTL_PAD_SAI1_TXC SW PAD Control Register&lt;BR /&gt;(IOMUXC_SW_PAD_CTL_PAD_SAI1_TXC)&amp;nbsp;can you advise on the correct settings for this register if I want to use the pin as an input?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And out of curiosity, can you explain why 8.2.4.247 SW_PAD_CTL_PAD_SAI1_TXFS SW PAD Control Register&lt;BR /&gt;(IOMUXC_SW_PAD_CTL_PAD_SAI1_TXFS)&amp;nbsp;has an additional set of available bits&amp;nbsp; (VSEL) ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Mar 2019 13:08:29 GMT</pubDate>
    <dc:creator>johnadamson</dc:creator>
    <dc:date>2019-03-29T13:08:29Z</dc:date>
    <item>
      <title>sai1 bit clock and frame sync slave?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/sai1-bit-clock-and-frame-sync-slave/m-p/862513#M131576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;I have hacked the fsl_sai.c driver to support 8-frame tdm on sai1 as a bit clock and frame sync master and successfully drove an AKM4458 eval board with the imx8mq eval board.&amp;nbsp; My&amp;nbsp;next step&amp;nbsp;is to configure the imx8mq eval board as frame sync and bit clock slave, but after making the appropriate changes, I get nothing.&amp;nbsp; Writes to the pcm device in ALSA eventually error out with a non-descript "I/O error", and it appears that the sai1 driver irq is never entered.&amp;nbsp; I can see fsl_sai_trigger being called and the BCD bit in TCR2 and FSD bit in TCR4 appear to be cleared.&amp;nbsp; &amp;nbsp; I've tried both TX async, RX sync (sync to TX clock), and TX async RX async (async, TX should still use TX clock).&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;STRONG&gt;Does the pinctrl configuration need to be explicitly changed, or is the input/output direction automatically changed by changing the TCR registers?&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;If there's something about the pinctrl configuration that has to change, I either didn't find it or didn't understand it enough to change it properly.&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;BCLK and FS signals look fine on the EVK as supplied by the external hardware.&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;STRONG&gt;Is there something else that must be done in software or the kernel configuration to change a working SAI1 clock master to a clock slave ?&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;There's something a bit odd about that trigger function, also.&amp;nbsp; The original code:&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;* sets FIFO request DMA enable&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;* sets Transmitter enable (FSL_SAI_CSR_TERE)&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;STRONG&gt;* sets FSL_SAI_CSR_SE, which maps to bit 30.&amp;nbsp; The documentation I have (Rev.0, 1/2018) shows this as "reserved"!&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;* sets TERE for the opposite side (TX/RX) if in sync mode&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;* sets some additional interrupt enable bits.&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;The ordering seems odd to me.&amp;nbsp; Shouldn't everything be set up including the interrupt enables BEFORE enabling the transmitter?&amp;nbsp; And what's up with the reserved bit?&amp;nbsp; At first I thought that might be a typo for _SR, but if that were the case, there'd have to be a clear to go along with the set, and I'd also think that it would have to come first.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Any hints would be appreciated,&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Mar 2019 13:07:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/sai1-bit-clock-and-frame-sync-slave/m-p/862513#M131576</guid>
      <dc:creator>johnadamson</dc:creator>
      <dc:date>2019-03-28T13:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: sai1 bit clock and frame sync slave?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/sai1-bit-clock-and-frame-sync-slave/m-p/862514#M131577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;and an add-on question that may be even more basic...can the SAI1_TXC (sai_tx_bclk, ball E1) even BE configured as an input/slave for the imx8mq ?&lt;/P&gt;&lt;P&gt;I'm looking at the i.MX Pins Tool (v5) for the fsl-imx8mq-evk.mex, and while SAI1_TXFS is shown as an input/output, SAI1_TXC is shown as output, and the tool tip text helpfully tells me that the pin "Direction is not configurable for teh selected pin and peripheral."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought of using synchronous mode and clock swap, but the pins tool says the same thing about SAI1_RXC.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Mar 2019 18:51:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/sai1-bit-clock-and-frame-sync-slave/m-p/862514#M131577</guid>
      <dc:creator>johnadamson</dc:creator>
      <dc:date>2019-03-28T18:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: sai1 bit clock and frame sync slave?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/sai1-bit-clock-and-frame-sync-slave/m-p/862515#M131578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bit Clock Direction can be set by BCD bit SAI Transmit Configuration 2 Register (TCR2) and&lt;/P&gt;&lt;P&gt;described in sect.SAI Transmit Configuration 2 Register (TCR2) i.MX8MDQ Reference Manual.&lt;/P&gt;&lt;P&gt;According to linux device tree sai documentation there is no slave option:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://source.codeaurora.org/external/imx/linux-imx/tree/Documentation/devicetree/bindings/sound/fsl-sai.txt?h=imx_4.14.78_1.0.0_ga" title="https://source.codeaurora.org/external/imx/linux-imx/tree/Documentation/devicetree/bindings/sound/fsl-sai.txt?h=imx_4.14.78_1.0.0_ga"&gt;fsl-sai.txt\sound\bindings\devicetree\Documentation - linux-imx - i.MX Linux kernel&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;seems it is hardcoded in driver like sai-&amp;gt;slave_mode[tx] :&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://source.codeaurora.org/external/imx/linux-imx/tree/sound/soc/fsl/fsl_sai.c?h=imx_4.14.78_1.0.0_ga" title="https://source.codeaurora.org/external/imx/linux-imx/tree/sound/soc/fsl/fsl_sai.c?h=imx_4.14.78_1.0.0_ga"&gt;fsl_sai.c\fsl\soc\sound - linux-imx - i.MX Linux kernel&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Mar 2019 05:24:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/sai1-bit-clock-and-frame-sync-slave/m-p/862515#M131578</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2019-03-29T05:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: sai1 bit clock and frame sync slave?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/sai1-bit-clock-and-frame-sync-slave/m-p/862516#M131579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, igor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Referring to&amp;nbsp;IMX8MDQLQRM.pdf, 8.2.4.248 SW_PAD_CTL_PAD_SAI1_TXC SW PAD Control Register&lt;BR /&gt;(IOMUXC_SW_PAD_CTL_PAD_SAI1_TXC)&amp;nbsp;can you advise on the correct settings for this register if I want to use the pin as an input?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And out of curiosity, can you explain why 8.2.4.247 SW_PAD_CTL_PAD_SAI1_TXFS SW PAD Control Register&lt;BR /&gt;(IOMUXC_SW_PAD_CTL_PAD_SAI1_TXFS)&amp;nbsp;has an additional set of available bits&amp;nbsp; (VSEL) ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Mar 2019 13:08:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/sai1-bit-clock-and-frame-sync-slave/m-p/862516#M131579</guid>
      <dc:creator>johnadamson</dc:creator>
      <dc:date>2019-03-29T13:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: sai1 bit clock and frame sync slave?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/sai1-bit-clock-and-frame-sync-slave/m-p/862517#M131580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Found it.&lt;/P&gt;&lt;P&gt;In the devicetree binary, sai1grp_pcm (and sai1grp_pcm_b2m), there are two lines:&lt;BR /&gt;MX8MQ_IOMUXC_SAI1_TXFS_SAI1_TX_SYNC 0xd6&lt;BR /&gt;MX8MQ_IOMUXC_SAI1_RXD7_SAI1_TX_SYNC 0xd6&lt;/P&gt;&lt;P&gt;If I understand this correctly, this is defining two pads as both being the SAI frame sync. Not a problem (apparently) when the IMX8 is frame sync master, frame sync still shows up on SAI1_TXFS...but a big problem when the IMX8 is frame sync slave and the frame sync is only being supplied on SAI1_TXFS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a good place to post a patch to the device tree for the eval board? The meta-freescale list?&amp;nbsp; Is there any disagreement that having two pads assigned to the same signal is a bad thing?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For completeness...&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #51626f; border: 0px; font-weight: bold;"&gt;Does the pinctrl configuration need to be explicitly changed, or is the input/output direction automatically changed by changing the TCR registers?&lt;/STRONG&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&amp;nbsp; No, the input/output direction is automatically changed by changing the TCR registers.&amp;nbsp; Assuming there aren't bugs in the pinctrl configuration to begin with.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;Is there something else that must be done in software or the kernel configuration to change a working SAI1 clock master to a clock slave ?&amp;nbsp;&lt;/STRONG&gt;Nope, the TCR register bits for BCD and FSD are sufficient.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;&lt;SPAN&gt;...&amp;nbsp;&lt;/SPAN&gt;sets FSL_SAI_CSR_SE, which maps to bit 30.&amp;nbsp; The documentation I have (Rev.0, 1/2018) shows this as "reserved"!&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;No clue, but commenting out the line appears to have no detrimental effect.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Mar 2019 20:58:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/sai1-bit-clock-and-frame-sync-slave/m-p/862517#M131580</guid>
      <dc:creator>johnadamson</dc:creator>
      <dc:date>2019-03-29T20:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: sai1 bit clock and frame sync slave?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/sai1-bit-clock-and-frame-sync-slave/m-p/1151132#M161530</link>
      <description>&lt;P&gt;Is this TDM configuration possible on an SAI port other than SAI1? I have been trying the same as described here on SAI2 and can't get more than a single channel on the TDM frame.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Sep 2020 22:11:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/sai1-bit-clock-and-frame-sync-slave/m-p/1151132#M161530</guid>
      <dc:creator>gabrielrivas</dc:creator>
      <dc:date>2020-09-09T22:11:02Z</dc:date>
    </item>
    <item>
      <title>Re: sai1 bit clock and frame sync slave?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/sai1-bit-clock-and-frame-sync-slave/m-p/1192650#M165883</link>
      <description>&lt;P&gt;Could you share your DTS and Changes to make the SAI a master for frame and bit clock.&amp;nbsp; I am trying to do the same for a TI chipset that needs to be the slave codec.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 20:58:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/sai1-bit-clock-and-frame-sync-slave/m-p/1192650#M165883</guid>
      <dc:creator>injaneer1</dc:creator>
      <dc:date>2020-12-02T20:58:40Z</dc:date>
    </item>
  </channel>
</rss>

