Changing IOMUX pad settings from userspace

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Changing IOMUX pad settings from userspace

跳至解决方案
1,477 次查看
davemcmordie
Contributor III

On the i.MX6Q we would like to be able to adjust the pad settings of MX6QDL_PAD_GPIO_3__CCM_CLKO2 from userspace after the kernel has booted in order to fine-tune clock edge speed.  Is this possible and if so how can we do it?  We also would especially like to be able to read back the value of this register in order to ensure that our chances have taken effect.  I have seen other posts on this forum saying that IOMUX settings can be adjusted at runtime, but I am not sure how this can be done in Linux 3.14.38.  

0 项奖励
1 解答
1,473 次查看
igorpadykov
NXP Employee
NXP Employee

Hi davemcmordie

 

one can try memtool included in unit tests (folder ..test/memtool)

https://patchwork.openembedded.org/patch/110753/

 

Best regards
igor

在原帖中查看解决方案

5 回复数
1,467 次查看
turker
Contributor IV

You can try devmem tool.

devmem 0x20E05FC # read
devmem 0x20E05FC 32 0xXXXXXXXX # write

 

1,453 次查看
elseiforelse
Contributor I

Hello,

Thanks for your help. When I write, I don't see the updated value from the readback. Any ideas on how to fix this?

root@devunit:/home/linaro/devmem# ./devmem 0x20E05FC w 0x0001B070
/dev/mem opened.
Memory mapped at address 0x76fbe000.
Read at address  0x020E05FC (0x76fbe5fc): 0x0001B0B0
Write at address 0x020E05FC (0x76fbe5fc): 0x0001B070, readback 0x0001B0B0
root@devunit:/home/linaro/devmem#
0 项奖励
1,474 次查看
igorpadykov
NXP Employee
NXP Employee

Hi davemcmordie

 

one can try memtool included in unit tests (folder ..test/memtool)

https://patchwork.openembedded.org/patch/110753/

 

Best regards
igor

1,447 次查看
elseiforelse
Contributor I

This works. Thanks!

0 项奖励
1,448 次查看
davemcmordie
Contributor III

Not sure why, but memtool worked and devmem did not. Thanks for your help!

0 项奖励