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.

PROCESSOR-SDK-DRA7X: How to control the voltage (high, low) of GPIO through devmem ?

Part Number: PROCESSOR-SDK-DRA7X

Hi,

There are some network problems now, we need to restart the Ethernet PHY.

Because this PIN(gpio3_16) is already registered in the device tree, it cannot be operated through the Linux GPIO system.

So, how to control the voltage (high, low) of GPIO through devmem ?

  • Hi,

    GPIO3 base address is: 0x48057000

    Enable the bit16 of GPIO_OE register address: 0x48057134

    Enable the bit16 of GPIO_DATAOUT register address: 0x4805713C to set the output High
    Or disable  bit16 of GPIO_DATAOUT register address: 0x4805713C to set the output Low.

    So the sequence would be something like:

    devmem2 0x48057134 w 0x10000

    devmem2 0x4805713C w 0x10000 /* For High */
    devmem2 0x4805713C w 0x00000 /* For Low */

    Note: I am assuming that Linux would have taken care of the pinmux.

    Best Regards,
    Keerthy