<?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: Unable to access I.MX6ULL memory map registers using devmem2 - fsl-yocto-L4.9.11_1.0.0.tar</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Unable-to-access-I-MX6ULL-memory-map-registers-using-devmem2-fsl/m-p/771345#M119770</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/srishan"&gt;srishan&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your appreciation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can read SAI module registers in a similar way as you have read I2C MemoryMap Register.&lt;/P&gt;&lt;P&gt;For example : &lt;STRONG&gt;devmem2 &amp;lt;SAI_MODULE_REGISTER_ADDRESS&amp;gt; h&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; e.g. devmem2 0x2028004 h&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The SAI module registers addresses will be found in i.MX6UL Reference Manual.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ankit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Jun 2018 12:56:58 GMT</pubDate>
    <dc:creator>ankitr_patel</dc:creator>
    <dc:date>2018-06-05T12:56:58Z</dc:date>
    <item>
      <title>Unable to access I.MX6ULL memory map registers using devmem2 - fsl-yocto-L4.9.11_1.0.0.tar</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Unable-to-access-I-MX6ULL-memory-map-registers-using-devmem2-fsl/m-p/771341#M119766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; font-size: small;"&gt;Dear I.MX Community&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; font-size: small;"&gt;Am trying to verify I2C2 Controller module registers in linux using devmem2, I have hereby attached my devmem2.c file&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; font-size: small;"&gt;root@imx6ull14x14evk:/# devmem2 0x21A0000&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR style="color: #000000; background-color: #ffffff; font-size: small;" /&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; font-size: small;"&gt;/dev/mem opened.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR style="color: #000000; background-color: #ffffff; font-size: small;" /&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; font-size: small;"&gt;Error at line 86, file devmem2.c (1) [Operation not permitted]&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR style="color: #000000; background-color: #ffffff; font-size: small;" /&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; font-size: small;"&gt;root@imx6ull14x14evk:/#&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; font-size: small;"&gt;whereas, I was able to access other register using devmem for example as shown below&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; font-size: small;"&gt;root@imx6ull14x14evk:/# devmem2 0x21EC08C w 0x00008200&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR style="color: #000000; background-color: #ffffff; font-size: small;" /&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; font-size: small;"&gt;/dev/mem opened.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR style="color: #000000; background-color: #ffffff; font-size: small;" /&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; font-size: small;"&gt;Memory mapped at address 0x76f80000.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR style="color: #000000; background-color: #ffffff; font-size: small;" /&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; font-size: small;"&gt;Value at address 0x21EC08C (0x76f8008c): 0x8000&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR style="color: #000000; background-color: #ffffff; font-size: small;" /&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; font-size: small;"&gt;Written 0x8200; readback 0x8000&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR style="color: #000000; background-color: #ffffff; font-size: small;" /&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; font-size: small;"&gt;Could you please let me know how this i2c memory map registers can be accessed using devmem2?&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; font-size: small;"&gt;Requesting you to let me know if there any issues in the attached devmem2.c file or share me the working devmem2 file in your test setup&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; font-size: small;"&gt;Kindly do the needful as early as possible, as I stuck in this issue from past 2 weeks&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR style="color: #000000; background-color: #ffffff; font-size: small;" /&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; font-size: small;"&gt;Eagerly awaiting for your replies&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR style="color: #000000; background-color: #ffffff; font-size: small;" /&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; font-size: small;"&gt;Many Thanks in adavnce&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 May 2018 10:06:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Unable-to-access-I-MX6ULL-memory-map-registers-using-devmem2-fsl/m-p/771341#M119766</guid>
      <dc:creator>srishan</dc:creator>
      <dc:date>2018-05-19T10:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to access I.MX6ULL memory map registers using devmem2 - fsl-yocto-L4.9.11_1.0.0.tar</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Unable-to-access-I-MX6ULL-memory-map-registers-using-devmem2-fsl/m-p/771342#M119767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sri&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one can try with nxp tool : memtool&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://source.codeaurora.org/external/imx/imx-test/tree/test/memtool?h=nxp/imx_4.9.11_1.0.0_ga" title="https://source.codeaurora.org/external/imx/imx-test/tree/test/memtool?h=nxp/imx_4.9.11_1.0.0_ga"&gt;memtool\test - imx-test - i.MX Driver Test Application Software&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In general some modules may require a privilege access in order to&lt;/P&gt;&lt;P&gt;modify their settings. These addresses are locked for user space access.&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can modify its registers within the kernel driver.&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>Sun, 27 May 2018 23:20:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Unable-to-access-I-MX6ULL-memory-map-registers-using-devmem2-fsl/m-p/771342#M119767</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2018-05-27T23:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to access I.MX6ULL memory map registers using devmem2 - fsl-yocto-L4.9.11_1.0.0.tar</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Unable-to-access-I-MX6ULL-memory-map-registers-using-devmem2-fsl/m-p/771343#M119768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: bold; font-size: 12.6px;"&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/srishan"&gt;srishan&lt;/A&gt;‌&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: bold; font-size: 12.6px;"&gt;&lt;SPAN style="color: #808080;"&gt;Hi&lt;/SPAN&gt;&amp;nbsp;&lt;A _jive_internal="true" data-avatarid="-1" data-userid="313500" data-username="srishan" href="https://community.nxp.com/people/srishan" style="color: #3d9ce7; border: 0px; font-weight: inherit; text-decoration: none; font-size: 1.1em; padding: 0px 3px 0px 0px;"&gt;Sri Shan&lt;/A&gt;,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The clock for the I2C module is disabled from the Driver. To access I2C MemoryMap register, first of all, you need to enable Clock for the I2C Module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is not a legitimate way to access physical memory from userspace. To&amp;nbsp;Read/Write the I2C MemoryMap Register you have to use Linux Driver. if you want to read those register from userspace then you have to create SYSFS entry in the Linux kernel, which will Communicate the Linux Driver from the userspace.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The below-attached file is the driver file in which I2C Clock is Enabled, and the SYSFS entry to read the&amp;nbsp;I2C MemoryMap Register from the userspace.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you have to Replace below driver with your driver in the driver/i2c/busses/i2c-imx.c. this will Enable the I2C Clock. and By following bellow command you can read&amp;nbsp;I2C MemoryMap Register.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6;" width="100%"&gt;&lt;THEAD&gt;&lt;TR style="background-color: #efefef;"&gt;&lt;TH&gt;&lt;SPAN style="color: #808080;"&gt;To find a i2c_show entry from sysfs&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;root@imx6ull14x14evk:/#&amp;nbsp;&amp;nbsp;find /sys/ -name "i2c_show"&lt;/P&gt;&lt;P&gt;/sys/devices/platform/soc/2100000.aips-bus/21a0000.i2c/i2c_show&lt;BR /&gt;/sys/devices/platform/soc/2100000.aips-bus/21a4000.i2c/i2c_show&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG style="background-color: #ffffff; border: 0px; color: #51626f; font-weight: 400; font-size: 12.6px;"&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6;" width="100%"&gt;&lt;THEAD&gt;&lt;TR style="background-color: #efefef;"&gt;&lt;TH&gt;&lt;SPAN style="color: #808080;"&gt;To read register value from I2C driver&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;root@imx6ull14x14evk:/#&amp;nbsp;&amp;nbsp;cat /sys/devices/platform/soc/2100000.aips-bus/21a0000.i2c/i2c_show&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: bold; font-size: 12.6px;"&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Above command will call the i2c_show function&amp;nbsp;which&amp;nbsp;will&amp;nbsp;enable&amp;nbsp;I2C clock and then print&amp;nbsp;I2C Memorymap Register.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you run Above Command after that you are able to read those Register with&amp;nbsp;devmem2.c&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6;" width="100%"&gt;&lt;THEAD&gt;&lt;TR style="background-color: #efefef;"&gt;&lt;TH&gt;&lt;SPAN style="color: #808080;"&gt;To read I2C register using devmem2.c&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;root@imx6ull14x14evk:/# devmem2 0x21A0008 h&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG style="background-color: #ffffff; : ; border: 0px; color: #51626f; font-weight: 400; font-size: 12.6px;"&gt;NOTE:- all the I2C register are 16-bits if you try to read those register as 32-bit then it will crash your kernel or restart your kernel.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG style="background-color: #ffffff; : ; border: 0px; color: #51626f; font-weight: 400; font-size: 12.6px;"&gt;----------------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;----------------------------------------------------------------------------------------------------------------------------&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2018 12:50:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Unable-to-access-I-MX6ULL-memory-map-registers-using-devmem2-fsl/m-p/771343#M119768</guid>
      <dc:creator>ankitr_patel</dc:creator>
      <dc:date>2018-05-30T12:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to access I.MX6ULL memory map registers using devmem2 - fsl-yocto-L4.9.11_1.0.0.tar</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Unable-to-access-I-MX6ULL-memory-map-registers-using-devmem2-fsl/m-p/771344#M119769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would very much appreciate for providing this very much detailed info Ankit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you also please help me how can we read back SAI module registers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2018 17:26:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Unable-to-access-I-MX6ULL-memory-map-registers-using-devmem2-fsl/m-p/771344#M119769</guid>
      <dc:creator>srishan</dc:creator>
      <dc:date>2018-05-30T17:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to access I.MX6ULL memory map registers using devmem2 - fsl-yocto-L4.9.11_1.0.0.tar</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Unable-to-access-I-MX6ULL-memory-map-registers-using-devmem2-fsl/m-p/771345#M119770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/srishan"&gt;srishan&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your appreciation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can read SAI module registers in a similar way as you have read I2C MemoryMap Register.&lt;/P&gt;&lt;P&gt;For example : &lt;STRONG&gt;devmem2 &amp;lt;SAI_MODULE_REGISTER_ADDRESS&amp;gt; h&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; e.g. devmem2 0x2028004 h&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The SAI module registers addresses will be found in i.MX6UL Reference Manual.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ankit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2018 12:56:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Unable-to-access-I-MX6ULL-memory-map-registers-using-devmem2-fsl/m-p/771345#M119770</guid>
      <dc:creator>ankitr_patel</dc:creator>
      <dc:date>2018-06-05T12:56:58Z</dc:date>
    </item>
  </channel>
</rss>

