Hi Igor, thanks for suggestion.
First I've checked base addr of GPIO3 direction register:
root@android:/ # memtool GPIO3.GDIR
SOC is mx6q
GPIO3 Addr:0x20a4000
GPIO3.GDIR Addr:0x020A4004 Value:0x10002000 - GPIO_GDIR functions as direction control when the IOMUXC is in GPIO mode.
GPIO3.GDIR.GDIR(0..31) :0x10002000
GPIO direction bits.
I've changed GPIO3.23 direction to input:
root@android:/ # memtool -32 0x020A4004=0x189E50
Writing 32-bit value 0x189E50 to address 0x020A4004
Then I've checked if it has written:
root@android:/ # memtool GPIO3.GDIR
SOC is mx6q
GPIO3 Addr:0x20a4000
GPIO3.GDIR Addr:0x020A4004 Value:0x00189E50 - GPIO_GDIR functions as direction control when the IOMUXC is in GPIO mode.
GPIO3.GDIR.GDIR(0..31) :0x189e50
GPIO direction bits.
Get value from GPIO3:
root@android:/ # memtool GPIO3.DR
SOC is mx6q
GPIO3 Addr:0x20a4000
GPIO3.DR Addr:0x020A4000 Value:0x4C1F0080 - The 32-bit GPIO_DR register stores data that is ready to be driven to the output lines.
GPIO3.DR.DR(0..31) :0x4c1f0080
Data bits.
Push button, check the same - still the same value (0x4c1f0080).
Maybe I'm refereing to wrong IO port? I've connected button to GPIO3[23]/UART3_CTS. Button is shorting IO line to GND. Should I setup a pullup somehow?