<?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>i.MX ProcessorsのトピックRe: Linux 4.1.6 [using devicetree] - ESAI configuration problem [i.MX6S based custom board]</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Linux-4-1-6-using-devicetree-ESAI-configuration-problem-i-MX6S/m-p/434878#M66517</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe this commit from 4.3-rc1 can be helpful:&lt;/P&gt;&lt;P&gt;&lt;A href="https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi?id=97dae8590fa314c41dfb629848c7cab494d8950d" title="https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi?id=97dae8590fa314c41dfb629848c7cab494d8950d"&gt;https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi?id=97dae…&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fabio Estevam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Oct 2015 15:26:53 GMT</pubDate>
    <dc:creator>fabio_estevam</dc:creator>
    <dc:date>2015-10-05T15:26:53Z</dc:date>
    <item>
      <title>Linux 4.1.6 [using devicetree] - ESAI configuration problem [i.MX6S based custom board]</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Linux-4-1-6-using-devicetree-ESAI-configuration-problem-i-MX6S/m-p/434877#M66516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have developed a custom board based on i.MX6 Solo processor, integrating an ADAU1461 CODEC.&lt;/P&gt;&lt;P&gt;We decided to use linux kernel 4.1.6 because ADAU1461 CODEC support comes with it (sound/soc/adau1761* and sound/soc/adau17x1.*).&lt;/P&gt;&lt;P&gt;ADAU1461 CODEC is connected with i.MX6S using i2c for configuration / control and ESAI for the audio data.&lt;/P&gt;&lt;P&gt;As ADAU1461 is not fully supported by Freescale (no machine driver), we created one in sound/soc/fsl directory (file imx-adau1761.c in attachment) inspired by sound/soc/blackfin/bfin-eval-adau1x61.c&lt;/P&gt;&lt;P&gt;In linux, board startup configuration is done using device tree (file imx6s_spu_board.dtsi in attachment).&lt;/P&gt;&lt;P&gt;ADAU1461 CODEC I2C driver is correctly registered and communication with i.MX6Solo by I2C is OK.&lt;/P&gt;&lt;P&gt;ALSA device is also correctly registered as you can see in the linux startup log (call_sequence_audio.txt in attachment).&lt;/P&gt;&lt;P&gt;Hardware connections between i.MX6 ESAI and ADAU1461 are OK.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i.MX6 ESAI is used as Master, so the processor has to generate MCLK clock, using PLL3 Main, PLL3 PFD2, PLL3 PFD3 or PLL4.&lt;/P&gt;&lt;P&gt;Currently, MCLK is our main problem : using alsa tool "aplay" with any audio file, MCLK is not generated.&lt;/P&gt;&lt;P&gt;With an audio file in 44100Hz, aplay terminates with an error : aplay: pcm_write:1737: write error: Input/output error&lt;/P&gt;&lt;P&gt;Not surprising because no MCLK is generated...&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see in the device tree code, ESAI fsys clock is configured using PPL3 PFD2 508M clock, and AUDAU1461 CODEC using ESAI PODF (post divisor clock).&lt;/P&gt;&lt;P&gt;First, can you tell us if clock configuration code is already done in linux kernel 4.1.6 in freescale support code, or it needs to be done in a specific alsa component (machine driver, or codec driver...) or in device tree code ? But I don't find any example...&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using devmem in linux, we noted that esai iomux configuration is not done by linux kernel, so we are currently doing it in u-boot startup code.&lt;/P&gt;&lt;P&gt;Are we doing something wrong ? Or is ESAI iomux configuration not supported in linux 4.1.6 version ?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We also want to note that we faced problems configuring I2C, resolved using a weird configuration of SW_PAD_CTL_PAD mux register.&lt;/P&gt;&lt;P&gt;Initially, I2C 3 did not work using this code in device tree : &lt;/P&gt;&lt;DIV class="j-rte-table"&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD style=""&gt;pinctrl_i2c3: i2c3grp {&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD style=""&gt;fsl,pins = &amp;lt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD style=""&gt;MX6QDL_PAD_GPIO_5__I2C3_SCL&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD style=""&gt; 0x1b0b0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD style=""&gt;MX6QDL_PAD_GPIO_6__I2C3_SDA&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD style=""&gt; 0x1b0b0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD style=""&gt;&amp;gt;;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD style=""&gt;};&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So with this code, I2C 3 was not able to generated SCL clock...&lt;/P&gt;&lt;P&gt;After a lot of manipulations and by despair, we tried to add the 0x4000000 bit (inspired by imx6qdl-sabresd.dtsi) in SCL and SDA register value, and it works with it : &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="j-rte-table"&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD style=""&gt;pinctrl_i2c3: i2c3grp {&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD style=""&gt;fsl,pins = &amp;lt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD style=""&gt;MX6QDL_PAD_GPIO_5__I2C3_SCL&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD style=""&gt; 0x4001b8b1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD style=""&gt;MX6QDL_PAD_GPIO_6__I2C3_SDA&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD style=""&gt; 0x4001b8b1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD style=""&gt;&amp;gt;;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD style=""&gt;};&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;As far as I understand, 0x4001b8b1 is written in IOMUXC_SW_PAD_CTL_PAD_GPIO05 for SCL and IOMUXC_SW_PAD_CTL_PAD_GPIO01 for SDA, but the 0x40000000 bit corresponds to a Read-only field... What's the point ? Does the linux code configure something else with this bit ?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After facing this issue, we are wondering if there is the same problem with the ESAI iomux configuration, so it cannot generate the clock ?&lt;/P&gt;&lt;P&gt;As I already mentioned, iomux ESAI configuration is not done by linux kernel with our device tree code, so we cannot modify SW_PAD_CTL_PAD values...&lt;/P&gt;&lt;P&gt;We tried it by u-boot code, but it does not solve the issue...&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are currently stuck with this problem, since a week. &lt;/P&gt;&lt;P&gt;Any idea ? &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337091"&gt;imx-adau1761.c.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337091"&gt;call_sequence_audio.txt.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337091"&gt;imx6s_spu_board.dtsi.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Oct 2015 10:28:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Linux-4-1-6-using-devicetree-ESAI-configuration-problem-i-MX6S/m-p/434877#M66516</guid>
      <dc:creator>jbd64</dc:creator>
      <dc:date>2015-10-05T10:28:37Z</dc:date>
    </item>
    <item>
      <title>Re: Linux 4.1.6 [using devicetree] - ESAI configuration problem [i.MX6S based custom board]</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Linux-4-1-6-using-devicetree-ESAI-configuration-problem-i-MX6S/m-p/434878#M66517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe this commit from 4.3-rc1 can be helpful:&lt;/P&gt;&lt;P&gt;&lt;A href="https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi?id=97dae8590fa314c41dfb629848c7cab494d8950d" title="https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi?id=97dae8590fa314c41dfb629848c7cab494d8950d"&gt;https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi?id=97dae…&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fabio Estevam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Oct 2015 15:26:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Linux-4-1-6-using-devicetree-ESAI-configuration-problem-i-MX6S/m-p/434878#M66517</guid>
      <dc:creator>fabio_estevam</dc:creator>
      <dc:date>2015-10-05T15:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: Linux 4.1.6 [using devicetree] - ESAI configuration problem [i.MX6S based custom board]</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Linux-4-1-6-using-devicetree-ESAI-configuration-problem-i-MX6S/m-p/434879#M66518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fabio,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;We modified our device tree imx6s_spu_board.dtsi (file in attachment) and imx6qdl.dtsi inspired by the patch you mentioned.&lt;/P&gt;&lt;P&gt;Using linux version 4.1.6, mclk is still not being generated.&lt;/P&gt;&lt;P&gt;I looked at PAD_CTL_PAD registers used by ESAI, and values 0x1b030 are still not written in these registers...&lt;/P&gt;&lt;P&gt;I am wondering if ESAI is fully supported (with devicetree) in linux 4.1.6 or do we need to use later version, like the latest 4.3 you mentioned ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2015 10:41:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Linux-4-1-6-using-devicetree-ESAI-configuration-problem-i-MX6S/m-p/434879#M66518</guid>
      <dc:creator>jbd64</dc:creator>
      <dc:date>2015-10-06T10:41:12Z</dc:date>
    </item>
    <item>
      <title>Re: Linux 4.1.6 [using devicetree] - ESAI configuration problem [i.MX6S based custom board]</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Linux-4-1-6-using-devicetree-ESAI-configuration-problem-i-MX6S/m-p/434880#M66519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After lots of investigations, we found the problem : it was an hardware one.&lt;/P&gt;&lt;P&gt;We can now provide the clocks from the ESAI configured in Master mode : MCLK, SCK and WS to the ADAU1461 Codec.&lt;/P&gt;&lt;P&gt;We are now facing a problem on the data transmitted from the ESAI to the Codec : the ESAI pin used to transmit data is ESAI_TX2_RX3.&lt;/P&gt;&lt;P&gt;When I launch an aplay command, TE0 from ESAI_TFCR register is activated, so I assume TE0 means ESAI_TX0 pin ?&lt;/P&gt;&lt;P&gt;If so, how can I configure ESAI to use TE2 (I assume ESAI_TX2_RX3) ? Is it the ESAI TDM mode ? &lt;/P&gt;&lt;P&gt;Can you confirm me if we can use ESAI_TX2_RX3 as the first ESAI transmiter pin ? &lt;/P&gt;&lt;P&gt;Thanks a lot,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Dec 2015 13:52:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Linux-4-1-6-using-devicetree-ESAI-configuration-problem-i-MX6S/m-p/434880#M66519</guid>
      <dc:creator>jbd64</dc:creator>
      <dc:date>2015-12-14T13:52:02Z</dc:date>
    </item>
  </channel>
</rss>

