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.

GPIO Enabling

Hi,

I am configuring the gpio pin as o/p and setting a value @uboot level. but when the Linux boots up

it resets the value.  setting again the GPIO pin linux works fine.

My question is when linux is booting does it reset/invalidate the GPIO data registers ? Why do i need to do it twice ?

Thanks & Regards,

Mike

  • Mike,

    mike A said:
    I am configuring the gpio pin as o/p

    Which GPIO pin exactly?

    mike A said:
    My question is when linux is booting does it reset/invalidate the GPIO data registers ?

    The GPIO linux driver is enabled by default. Try with disable the GPIO driver in the defconfig.

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_GPIO_Driver_User_Guide#Driver_Configuration

    BR
    Pavel

  • Hi Pave,


    I Have custom board in which one of the GPIO pin is connected for ethernet reset. GP0[27], this being set in uboot and Ethernet works fine on uboot, no when linux boots up the ethernet doesnt work, again in the linux i have to set the gpio value.
     So my question is when the GPIO driver comes up does it invalidate all the data registers ?

    Thanks & Regards,

    Mike

  • Mike,

    From what I understand, you set GP0[27] signal on pin AD23/L7 in u-boot and set the value in GPIO_DATAOUT register. And when linux boot up, the GP0[27] signal is still mapped on AD23/L7 pin, but the value in GPIO_DATAOUT register is reset. Is that the case?

    BR
    Pavel

  • Hi Pavel,


    Yes the linux resets the data out registers.

    Thanks & Regards,

    Mike

  • Mike,

    mike A said:
    Yes the linux resets the data out registers.

    Please explore the GPIO linux driver at:

    linux-kernel/arch/arm/plat-omap/gpio.c

    See functions  _set_gpio_dataout() and gpio_output_array(). When GPIO driver is enabled in the .config file, the GPIO probe and init functions are invoked, and these reset and init the GPIO registers.

    omap_gpio_probe()

    omap_gpio_chip_init()

    BR
    Pavel