<?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: iMX8MM, problems on early I2C access from SPL in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/iMX8MM-problems-on-early-I2C-access-from-SPL/m-p/1239206#M170276</link>
    <description>&lt;P&gt;Hi Ralf,&lt;/P&gt;&lt;P&gt;to set the SION config bit exactly was the 'missing thing' and solves the problem for us as well.&lt;BR /&gt;Thank you very much for sharing your findings here !&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;David&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Mar 2021 08:30:50 GMT</pubDate>
    <dc:creator>dzim</dc:creator>
    <dc:date>2021-03-03T08:30:50Z</dc:date>
    <item>
      <title>iMX8MM, problems on early I2C access from SPL</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX8MM-problems-on-early-I2C-access-from-SPL/m-p/1163255#M162957</link>
      <description>&lt;P&gt;We are developing a custom board based on iMX8MMDL.&lt;BR /&gt;The PMIC for the SoC is connected to I2C4.&lt;BR /&gt;We need to access the PMIC early while running the SPL to tune voltages.&lt;BR /&gt;&lt;BR /&gt;Unfortunately we fail to do so, the probing of the PMIC does not work, giving this error message (repeatedly because of retries):&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;wait_for_sr_state: failed sr=81 cr=a0 state=2020&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;According to the sources the message should originate from mxc_i2c.c , i2c_init_transfer:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;wait_for_sr_state(i2c_bus, ST_BUS_BUSY)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What we have been checking so far:&lt;/P&gt;&lt;P&gt;(&lt;EM&gt;1st&lt;/EM&gt;)&lt;BR /&gt;To check if clocks are alright we read CCM Clock Gating Registers for I2C4 which all show a value of 0x3 which should be okay.&lt;/P&gt;&lt;P&gt;(&lt;EM&gt;2nd&lt;/EM&gt;)&lt;BR /&gt;To check if there are any shortings, we did run probing on all 4 I2C buses while running linux.&lt;BR /&gt;The probing works with no errors for all 4 buses and the addresses of the connected peripherals will be detected.&lt;/P&gt;&lt;P&gt;(&lt;EM&gt;3rd&lt;/EM&gt;)&lt;BR /&gt;We changed SPL to check which of the I2C buses seem to be accessable in general at this early stage.&lt;BR /&gt;We experience that only I2C1 does not throw errors on init.&lt;/P&gt;&lt;P&gt;(&lt;EM&gt;4th&lt;/EM&gt;)&lt;BR /&gt;We temporary changed the connection of our PMIC to be connected to I2C1 instead of I2C4.&lt;BR /&gt;As expected, based on the results of (3rd), we have been able to successfully probe for the PMIC and tune voltages.&lt;BR /&gt;&lt;BR /&gt;From our findings we assume there is something left to be done to enable other I2C busses than only the very first one while running in the SPL.&lt;BR /&gt;Does anybody have a hint what we may have missed so far ?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2020 07:27:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX8MM-problems-on-early-I2C-access-from-SPL/m-p/1163255#M162957</guid>
      <dc:creator>dzim</dc:creator>
      <dc:date>2020-10-06T07:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: iMX8MM, problems on early I2C access from SPL</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX8MM-problems-on-early-I2C-access-from-SPL/m-p/1163357#M162969</link>
      <description>&lt;P&gt;Hi dzim&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;one can try to tweak i2c4 in dts:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://source.codeaurora.org/external/imx/uboot-imx/tree/arch/arm/dts/imx8mm-evk.dts?h=imx_v2020.04_5.4.47_2.2.0" target="_blank"&gt;https://source.codeaurora.org/external/imx/uboot-imx/tree/arch/arm/dts/imx8mm-evk.dts?h=imx_v2020.04_5.4.47_2.2.0&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;or rdc :&lt;/P&gt;
&lt;P&gt;&lt;A href="https://source.codeaurora.org/external/imx/imx-atf/tree/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c?h=imx_5.4.47_2.2.0" target="_blank"&gt;https://source.codeaurora.org/external/imx/imx-atf/tree/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c?h=imx_5.4.47_2.2.0&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2020 10:57:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX8MM-problems-on-early-I2C-access-from-SPL/m-p/1163357#M162969</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2020-10-06T10:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: iMX8MM, problems on early I2C access from SPL</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX8MM-problems-on-early-I2C-access-from-SPL/m-p/1163511#M162993</link>
      <description>&lt;P&gt;Hi Igor,&lt;/P&gt;&lt;P&gt;thanks for your reply.&lt;BR /&gt;Unfortunately I don't think I get what you mean by 'tweaking i2c4'.&lt;BR /&gt;&lt;BR /&gt;What we do right now is calling &lt;EM&gt;setup_i2c&lt;/EM&gt;&amp;nbsp;from &lt;EM&gt;board_init_f&lt;/EM&gt;&amp;nbsp;within &lt;EM&gt;spl.c&lt;/EM&gt; for I2C4 (including the I2C pad infos for our board and the I2C4).&lt;BR /&gt;We do this right before we are trying to tune the PMIC voltages.&lt;BR /&gt;&lt;BR /&gt;Would you please elaborate what additionally has to be done to use I2C4 for the PMIC connection (and thus tune the voltages before the init of the DRAM) ?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;David&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2020 15:28:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX8MM-problems-on-early-I2C-access-from-SPL/m-p/1163511#M162993</guid>
      <dc:creator>dzim</dc:creator>
      <dc:date>2020-10-06T15:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: iMX8MM, problems on early I2C access from SPL</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX8MM-problems-on-early-I2C-access-from-SPL/m-p/1230261#M169427</link>
      <description>&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;We had the same problem getting I2C4 running in SPL.&lt;/P&gt;&lt;P&gt;After a lot of debugging, I found out that the SION bit in the Pad Mux Registers was not set for I2C4. The bit is only active for I2C1:&lt;BR /&gt;&lt;A href="https://source.codeaurora.org/external/imx/uboot-imx/tree/arch/arm/include/asm/arch-imx8m/imx8mm_pins.h?h=imx_v2019.04_4.19.35_1.1.0#n607" target="_blank"&gt;https://source.codeaurora.org/external/imx/uboot-imx/tree/arch/arm/include/asm/arch-imx8m/imx8mm_pins.h?h=imx_v2019.04_4.19.35_1.1.0#n607&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I have fixed this by defining the I2c_pads_info structure as follows:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;struct i2c_pads_info i2c_pad_info4 = {
	.scl = {
		.i2c_mode = IMX8MM_PAD_I2C4_SCL_I2C4_SCL | PC | ((iomux_v3_cfg_t)(IOMUX_CONFIG_SION) &amp;lt;&amp;lt; MUX_MODE_SHIFT),
		.gpio_mode = IMX8MM_PAD_I2C4_SCL_GPIO5_IO20 | PC,
		.gp = IMX_GPIO_NR(5, 20),
	},
	.sda = {
		.i2c_mode = IMX8MM_PAD_I2C4_SDA_I2C4_SDA | PC | ((iomux_v3_cfg_t)(IOMUX_CONFIG_SION) &amp;lt;&amp;lt; MUX_MODE_SHIFT),
		.gpio_mode = IMX8MM_PAD_I2C4_SDA_GPIO5_IO21 | PC,
		.gp = IMX_GPIO_NR(5, 21),
	},
};&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Ralf&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2021 09:38:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX8MM-problems-on-early-I2C-access-from-SPL/m-p/1230261#M169427</guid>
      <dc:creator>ralfgoebel</dc:creator>
      <dc:date>2021-02-12T09:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: iMX8MM, problems on early I2C access from SPL</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX8MM-problems-on-early-I2C-access-from-SPL/m-p/1239206#M170276</link>
      <description>&lt;P&gt;Hi Ralf,&lt;/P&gt;&lt;P&gt;to set the SION config bit exactly was the 'missing thing' and solves the problem for us as well.&lt;BR /&gt;Thank you very much for sharing your findings here !&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;David&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2021 08:30:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX8MM-problems-on-early-I2C-access-from-SPL/m-p/1239206#M170276</guid>
      <dc:creator>dzim</dc:creator>
      <dc:date>2021-03-03T08:30:50Z</dc:date>
    </item>
  </channel>
</rss>

