Hi... I need to use, on a certain moment in user space, use my gpio2_27 (MMC0_DAT2 pad) as uart4_rtsn. There are any way to do this?
Using devmem2 the command woluld be
devmem2 0x44e108f4 b 0x12
but this doesn't work... :-(
Thnks!
Max
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi... I need to use, on a certain moment in user space, use my gpio2_27 (MMC0_DAT2 pad) as uart4_rtsn. There are any way to do this?
Using devmem2 the command woluld be
devmem2 0x44e108f4 b 0x12
but this doesn't work... :-(
Thnks!
Max
Hi Max,
I did use on this specific case, but technically it is possible to modify PAD config using devmem2, though many things should be considered when doing so. I first noticed your command 'devmem2 <addr> b ...', and believe the PAD config register is 32bit, not 8bit.
Hi again... Well I'he tryed with the command
devmem2 0x44e108f4 w 0x00000012
and I've obained the same result...
My test... Read value
root@silence:/# devmem2 0x44e108f4
/dev/mem opened.
Memory mapped at address 0xb6f71000.
Value at address 0x44E108F4 (0xb6f718f4): 0x30
Try to write the value
root@silence:/# devmem2 0x44e108f4 w 0x00000012
/dev/mem opened.
Memory mapped at address 0xb6f86000.
Value at address 0x44E108F4 (0xb6f868f4): 0x30
Written 0x12; readback 0x12
Read again the value
root@silence:/# devmem2 0x44e108f4
/dev/mem opened.
Memory mapped at address 0xb6f80000.
Value at address 0x44E108F4 (0xb6f808f4): 0x30
Any idea?
Thks
Max
Hi Max,
On AM3354, the pin pad control registers are in Control Module region, which is writable from user space. Please see the note in TRM section 9.1:
...
Max,
In Linux, the kernel runs in privileged mode, so you can modify Control Module registers in a kernel driver.