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.

CCS/AM3358: IO pads in dts file

Part Number: AM3358

Tool/software: Code Composer Studio

hello everyone,

right now i'm working in am335x based application

when i start modification in dts file i saw pin map for user led

AM33XX_IOPAD(0x810, PIN_OUTPUT_PULLDOWN | MUX_MODE7)    /* gpmc_ad4.gpio1_4 */
AM33XX_IOPAD(0x814, PIN_OUTPUT_PULLDOWN | MUX_MODE7)    /* gpmc_ad5.gpio1_5 */
AM33XX_IOPAD(0x818, PIN_OUTPUT_PULLDOWN | MUX_MODE7)    /* gpmc_ad6.gpio1_6 */
AM33XX_IOPAD(0x81c, PIN_OUTPUT_PULLDOWN | MUX_MODE7)    /* gpmc_ad7.gpio1_7 */

but i'm unable to find what exact meaning of ->0x810, 0x814,0x818,0x81c,

what does it mean that....?

  • Hi Raju,

    0x810 is the offset of the conf_gpmc_ad4 register, which is used to configure this pin.

    In AM335x TRM, conf_gpmc_ad4 is at address 0x44E10810, which is composed of Control Module base address (0x44E10000) and conf_gpmc_ad4 register offset (0x810). For more info please refer to below TRM sections:

    2.1 ARM Cortex-A8 Memory Map - Table 2-2. L4_WKUP Peripheral Memory Map

    9.3.1 CONTROL_MODULE Registers



    Regards,
    Pavel

  • Thank You so much Mr. Pavel

    got it your answer.

    i have one more question if i want to add new pin as an an only GPIO which is not defined or used by other module like uart, i2c or ethernet.

    then what should i have to do....?

    like modify in dts file, etc. or  which other file i have to modify and how to add this new gpio pin confing step in dts file.

    thanks and regard Raju

  • Raju,

    You can make this GPIO stand alone pinmux in u-boot at below file:

    u-boot/board/ti/am335x/mux.c

    See for example how gpio0_7 and gpio0_18 pins are configured and reuse this approach:

    static struct module_pin_mux gpio0_7_pin_mux[] = {
        {OFFSET(ecap0_in_pwm0_out), (MODE(7) | PULLUDEN)},    /* GPIO0_7 */
        {-1},
    };

    static struct module_pin_mux gpio0_18_pin_mux[] = {
        {OFFSET(usb0_drvvbus), (MODE(7) | PULLUDEN)},    /* GPIO0_18 */
        {-1},
    };

    void enable_board_pin_mux(void)
    {

    else if (board_is_evm_sk()) {
            /* Starter Kit EVM */
            configure_module_pin_mux(gpio0_7_pin_mux);

    }

    else if (board_is_icev2()) {
            configure_module_pin_mux(gpio0_18_pin_mux);

    }

    Then you need to build new SPL/MLO and u-boot images, check below user guide:

    Regards,
    Pavel