<?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: Reset SGTL5000</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Reset-SGTL5000/m-p/483129#M77028</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Adding more to this, for whoever reads this monologue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the chip is powered externally and reboot perhaps by a power cycle, writing a 0x7060 to CHIP_ANA_POWER causes the chip to not respond as the current sgtl5000.c code is written.&lt;/P&gt;&lt;P&gt;The kernel outputs something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.715498] sgtl5000 1-000a: sgtl5000 revision 0x11&lt;/P&gt;&lt;P&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.732253] sgtl5000: probe of 1-000a failed with error -5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code fixes that problem for me, so far.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;static int sgtl5000_fill_defaults(struct sgtl5000_priv *sgtl5000)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; int i, ret, val, index;&lt;/P&gt;&lt;P&gt;&amp;nbsp; int reg;&lt;/P&gt;&lt;P&gt;&amp;nbsp; for (i = 0; i &amp;lt; ARRAY_SIZE(sgtl5000_reg_defaults); i++) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; val = sgtl5000_reg_defaults[i].def;&lt;/P&gt;&lt;P&gt;&amp;nbsp; index = sgtl5000_reg_defaults[i].reg;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ret = regmap_read(sgtl5000-&amp;gt;regmap, index, &amp;amp;reg);&lt;/P&gt;&lt;P&gt;&amp;nbsp; if (ret) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printk(KERN_WARNING "SGTL5000 probe read failed at %i\n", i);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return ret;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; if (reg != val) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ret = regmap_write(sgtl5000-&amp;gt;regmap, index, val);&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; if (ret) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printk(KERN_WARNING "SGTL5000 probe write failed %x at %i index %i @ %x\n", val, i, index, reg);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return ret;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; return 0;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Guess this forum software doesn't have provision for code formatting.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Feb 2016 03:20:24 GMT</pubDate>
    <dc:creator>erikfriesen</dc:creator>
    <dc:date>2016-02-05T03:20:24Z</dc:date>
    <item>
      <title>Reset SGTL5000</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Reset-SGTL5000/m-p/483126#M77025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I built a board that uses an embeddedarm ts4900 which uses the mcimx6s7cvm08ab.&amp;nbsp; Audio is handled by the sgtl5000 codec.&amp;nbsp; Linux version is linux-3.10.17-imx6 per an embeddedarm build.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I find that certain happenings to the board are causing the codec to reset I believe, and once reset there is no way known to me to revive this without a reboot.&amp;nbsp; The codec quits producing any clocking per scope.&amp;nbsp; The RiotBoards I have used as well also do similar.&amp;nbsp; On the riotboard, only a power cycle brings it back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Questions I have are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#1.&amp;nbsp; Could the sgtl5000 errata related to this? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#2. Could it be possible that an external 1.8 vddd would be superior to the ldo in this matter?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#3. Is there any way to fully re initialize the codec from any known alsa, or other userspace command?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#4. Why is &amp;lt;= rev 0x11 of any count in the newer kernels?&amp;nbsp; Is there some reason why there is a conflict between the kernel and the errata?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2016 13:08:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Reset-SGTL5000/m-p/483126#M77025</guid>
      <dc:creator>erikfriesen</dc:creator>
      <dc:date>2016-02-02T13:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Reset SGTL5000</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Reset-SGTL5000/m-p/483127#M77026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Erik&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;external vddd usage is described in erratum&lt;/P&gt;&lt;P&gt;&lt;A href="http://cache.freescale.com/files/analog/doc/errata/SGTL5000ER.pdf" title="http://cache.freescale.com/files/analog/doc/errata/SGTL5000ER.pdf"&gt;http://cache.freescale.com/files/analog/doc/errata/SGTL5000ER.pdf&lt;/A&gt; &lt;/P&gt;&lt;P&gt;it may be useful to look at pacthes&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/352718"&gt;SGTL5000: external VDDD with linux codec driver&lt;/A&gt; &lt;/P&gt;&lt;P&gt;in general one can try i2c reset:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.analog.com/media/en/technical-documentation/application-notes/54305147357414AN686_0.pdf" title="http://www.analog.com/media/en/technical-documentation/application-notes/54305147357414AN686_0.pdf"&gt;http://www.analog.com/media/en/technical-documentation/application-notes/54305147357414AN686_0.pdf&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;igor&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2016 01:01:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Reset-SGTL5000/m-p/483127#M77026</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2016-02-03T01:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: Reset SGTL5000</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Reset-SGTL5000/m-p/483128#M77027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Note that the i2c bus is fine, or at least alsamixer works. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2016 01:13:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Reset-SGTL5000/m-p/483128#M77027</guid>
      <dc:creator>erikfriesen</dc:creator>
      <dc:date>2016-02-03T01:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: Reset SGTL5000</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Reset-SGTL5000/m-p/483129#M77028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Adding more to this, for whoever reads this monologue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the chip is powered externally and reboot perhaps by a power cycle, writing a 0x7060 to CHIP_ANA_POWER causes the chip to not respond as the current sgtl5000.c code is written.&lt;/P&gt;&lt;P&gt;The kernel outputs something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.715498] sgtl5000 1-000a: sgtl5000 revision 0x11&lt;/P&gt;&lt;P&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.732253] sgtl5000: probe of 1-000a failed with error -5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code fixes that problem for me, so far.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;static int sgtl5000_fill_defaults(struct sgtl5000_priv *sgtl5000)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; int i, ret, val, index;&lt;/P&gt;&lt;P&gt;&amp;nbsp; int reg;&lt;/P&gt;&lt;P&gt;&amp;nbsp; for (i = 0; i &amp;lt; ARRAY_SIZE(sgtl5000_reg_defaults); i++) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; val = sgtl5000_reg_defaults[i].def;&lt;/P&gt;&lt;P&gt;&amp;nbsp; index = sgtl5000_reg_defaults[i].reg;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ret = regmap_read(sgtl5000-&amp;gt;regmap, index, &amp;amp;reg);&lt;/P&gt;&lt;P&gt;&amp;nbsp; if (ret) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printk(KERN_WARNING "SGTL5000 probe read failed at %i\n", i);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return ret;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; if (reg != val) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ret = regmap_write(sgtl5000-&amp;gt;regmap, index, val);&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; if (ret) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printk(KERN_WARNING "SGTL5000 probe write failed %x at %i index %i @ %x\n", val, i, index, reg);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return ret;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; return 0;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Guess this forum software doesn't have provision for code formatting.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Feb 2016 03:20:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Reset-SGTL5000/m-p/483129#M77028</guid>
      <dc:creator>erikfriesen</dc:creator>
      <dc:date>2016-02-05T03:20:24Z</dc:date>
    </item>
  </channel>
</rss>

