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.

DRA821U: U-Boot GPIO not setting DRA821

Part Number: DRA821U

Tool/software:

Hello,

On our custom board we are trying to set GPIO values in u-boot, but we get the error shown in the picture below and the hardware shows that they are not set. I have attached some register information in the photo as well and it appears that the padconfig and the other registers are being set correctly to my eyes. Let me know if you need more information, but we need to be able to set GPIOs in u-boot for our board. We can set GPIO on the J7200 dev kit. 

Our custom board is using the hs-fs part if that makes a difference. 

Thank you

James Windorff-Perez

  • Hi James,

    That is because the PinMux also needs to be set appropriately.

    Check for the corresponding GPIO number in the data sheet and figure out the pin mux register address.

    mw 'pinmux_reg_address' 0x40007 0x1

    That should solve the above issue.

    Best Regards,
    Keerthy

  • Keerthy,

    I was able to set the register to 0x40007 and it worked. I would like some clarification on why it worked though. I had the pin being set as an output (0x10007). My records show that 0x40007 is an input with pulldown and mux selection 7 (see chart below). Why does making it input with a pulldown make the GPIOs work, or did the below definition change?

    * PIN_OUTPUT = 0x10000
    * PIN_OUTPUT_PULLUP = 0x20000
    * PIN_OUTPUT_PULLDOWN = 0x0
    * PIN_INPUT = 0x50000
    * PIN_INPUT_PULLUP = 0x60000
    * PIN_INPUT_PULLDOWN = 0x40000

    Thank you,

    James Windorff-Perez

  • Hi James,

    I understood your question. So now there are 2 layers:

    1. Pin Mux: At this layer you always keep the RX_ACTIVE bit high which is needed for the hardware to function as GPIO.
    2. GPIO layer: Here you configure that as the output.

    I believe the above clarification is what you were looking for. Closing this.

    - Keerthy