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.

AM335x: gpio control in u-boot and kernel

Hi,

 

For some reason, I should use one gpio for output mode and it should be set as high.

 

So I add some codes in u-boot and the gpio is set as high via gpio_direction_out.

I confirm that the gpio is controlled well.

 

                {OFFSET(uart0_rtsn), (MODE(7) | PULLUDDIS)},                                                                                                                                                                /* uart0_rtsn gpio1_9    ETH_PWR_EN1                 */

 

                …………

                if (!gpio_request(gpionum, "")) {

                                                gpio_direction_output(gpionum, gpioval);

}

 

In addition, I add below code.

                {"uart0_rtsn.gpio1_9", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT},

(In H/W, the pin is pull-down)

 

By the way, when kernel is loaded, gpio1_9 is changed into low.

I want it to be High continuously from u-boot.

 

I’m sure that there is no pin-mux  conflict in board-am335xevm.c

 

 Thanks,

Devin

  • Hi Devin,

    Please check how the uart0_rtsn pin is pinmuxed in linux:

    mount -t debugfs none /sys/kernel/debug/
    cd /sys/kernel/debug/omap_mux/
    cat uart0_rtsn

    Best regards,
    Miroslav

  • Hi Devin,

    Sorry to dig out this old topic, but i have exactly the same problem on our AM3352-based board (quoting you hereafter) :

    (In H/W, the pin is pull-down)

    By the way, when kernel is loaded, gpio1_9 is changed into low.

    I want it to be High continuously from u-boot.

    We use exactly the same GPIO in our design (uart0_rtsn.gpio1_9) and exactly as your request, the GPIO must not go back to '0' after U-boot step and keep '1' logical value during entire Kernel step...

    Thanks for your help !

    Jeremie