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 pinmux and uboot

Other Parts Discussed in Thread: AM3352

Dears, I am adapt uboot configuration files to a new hardware based on am335x.

pinmux version 2520 generated the files: mux.h and pinmux.h
at the end of wiki: http://processors.wiki.ti.com/index.php/Pin_Mux_Utility_for_ARM_MPU_Processors
tells about  
OMAP35xx, am37xx and am35xx not about am335x or am33xx.

How can i proceed with mux.h and pinmux.h in u-boot-2012.10-psp05.06.00.00

I also are adapting the files in u-boot-2012.10-psp05.06.00.00/include/asm/arch-am33xx for NAND (mem.h) and other devices.

that is correct?

 

  • Hi,

    For using generated files please follow the wiki:

    http://processors.wiki.ti.com/index.php/Pin_Mux_Utility_for_ARM_MPU_Processors#Using_the_Generated_Header_Files_.28AM35x_.2F_AM37x_.2F_OMAP35x.29

    For AM335x paths are:

    mux.h

    ti-sdk-am335x-evm-06.00.00.00/board-support/u-boot-2013.01.01-psp06.00.00.00/arch/arm/include/asm/arch-am33xx/mux.h

    evm.h

    ti-sdk-am335x-evm-06.00.00.00/board-support/u-boot-2013.01.01-psp06.00.00.00/board/ti/evm/evm.h

    here copy the pinmux.h and include it in evm.h as in the wiki. (remove original #define MUX_EVM() macro).

    Hope this helps,

    BR,

    Vidin

  • Hi,

    I faced a similar problem and my board booted so I guess it's ok.

    I described what I did in the following post:

    http://e2e.ti.com/support/arm/sitara_arm/f/791/p/298502/1043867.aspx#1043867

    Hope this helps, but it's basically similar to what Vidin described.

  • Thanks Laurens and Vidin, the answers are very useful. I still have an error when load u-boot. I think, because I fixed  AM335X_CTRL_BASE = 0x0000.

    Where can I find information about the right address base or what is the right address?

    AM335X_CTRL_BASE seems to be a based address into am335x that is correct?

  • Hi,

    I browsed kernel and u-boot of SDK 06.00 but cannot find AM335X_CTRL_BASE definition.

    Please look at address definition of your SDK in file hardware.h

    ti-sdk-am335x-evm-06.00.00.00/board-support/u-boot-2013.01.01-psp06.00.00.00/arch/arm/include/asm/arch-am33xx/hardware.h

    In SDK 06.00 I have #define CTRL_BASE 0x44E10000 which is Control module base address.

    Otherwise the Control module base address could be found in the AM335x TRM v.I (spruh73i.pdf) Chapter 2 Memory map section 2.1 ARM Cortex-A8 Memory Mapin table Table 2-2. L4_WKUP Peripheral Memory Map (page 171).

    All base addresses of all AM335x modules are listed in this section.

    BR,

    Vidin

  • Hi.

    I'am having thoses kind of problems too.

    I'm working with a new board based on an AM3352 processor.

    To use mux.h and pinmux.h from the pinmux utility, I followed what is described in :

    http://processors.wiki.ti.com/index.php/Pin_Mux_Utility_for_ARM_MPU_Processors#Using_the_Generated_Header_Files_.28AM35x_.2F_AM37x_.2F_OMAP35x.29

    Nothing is mentioned about AM335x familiy, but, as recommended in this thread, I did it anyway.

    When I tried to recompile u-boot, I got several errors similar to this one :

    mux.c:31:2: error: invalid use of undefined type 'struct module_pin_mux'

    I understood then, that ~/ti-sdk-am335x-evm-05.07.00.00/board-support/u-boot-2013.01.01-psp05.07.00.00/arch/arm/cpu/armv7/am33xx/mux.c is not compatible with the new mux.h (which doesn't include any module_pin_mux struture unlike the initial mux.h).

    Am I supposed to do what Laurens did (described in http://e2e.ti.com/support/arm/sitara_arm/f/791/p/298502/1043867.aspx#1043867), and especially delete the mux.c in <u-boot>/arch/arm/cpu/armv7/am33xx (and alter the Makefile for the compile error.) and alter the mux.c in <u-boot>/board/ti/am335x ?

     

    BR

     

  • Hi,

    I altered my previous post http://e2e.ti.com/support/arm/sitara_arm/f/791/p/298502/1043867.aspx#1043867 . I think it is not required to delete the mux.c in <u-boot>/arch/arm/cpu/armv7/am33xx .

    I'll try to explain what I did for my board:

    I altered the <U-Boot>/arch/arm/include/asm/arch-am33xx/mux.h to contain the values of my pinmux_two.h, the one with all the #define CONTROL_PADCONF fields.

    After this I altered the <U-Boot>/board/ti/am335x/mux.c to call the MUX_EVM() macro from the pinmux_one.h file. I placed the call to MUX_EVM in the enable_board_pin_mux function. (as stated in my above post)

  • Hello,


    I am facing the same problem with my u-boot not compiling once I follow the Wiki on integrating mux.h and pinmux.h. Laurens, did anyone from TI ever confirm that what you have done is correct?

  • Hi,


    No, I don't know if this is the correct way to do the pinmux. My approach is (clearly) the result of trail-and-error. The wiki wasn't helping me either so I just started fiddling and I posted my end approach in the above posts (see my previous posts).

  • anthony barrera said:
    Hello,


    I am facing the same problem with my u-boot not compiling once I follow the Wiki on integrating mux.h and pinmux.h. Laurens, did anyone from TI ever confirm that what you have done is correct?

    Anthony, the mux.h and pinmux.h headers, generated by the pinmux tool can be used with the AM335x, but aren't intended to. This is why the wiki page seems incomplete.

    The U-Boot pinmuxing for the AM335x happens inside <u-boot>/board/k-patents/am335x_mtr/mux.c and the implementation is a bit different than the one described in the wiki page. However, you can use the generated pinmux .h files like this:

    1. Copy the contents of the mux.h and pinmux.h files inside mux.c.

    2. Change the AM335X_CTRL_BASE inside the MUX_VAL macro to just CTRL_BASE, as there is no definition for AM335X_CTRL_BASE.

    3. Call to the MUX_EVM() macro from inside the enable_board_pin_mux() function.

    Best regards,
    Miroslav

  • Miroslav Kiradzhiyski XID said:

    Hello,


    I am facing the same problem with my u-boot not compiling once I follow the Wiki on integrating mux.h and pinmux.h. Laurens, did anyone from TI ever confirm that what you have done is correct?

    Anthony, the mux.h and pinmux.h headers, generated by the pinmux tool can be used with the AM335x, but aren't intended to. This is why the wiki page seems incomplete.

    The U-Boot pinmuxing for the AM335x happens inside <u-boot>/board/k-patents/am335x_mtr/mux.c and the implementation is a bit different than the one described in the wiki page. However, you can use the generated pinmux .h files like this:

    1. Copy the contents of the mux.h and pinmux.h files inside mux.c.

    2. Change the AM335X_CTRL_BASE inside the MUX_VAL macro to just CTRL_BASE, as there is no definition for AM335X_CTRL_BASE.

    3. Call to the MUX_EVM() macro from inside the enable_board_pin_mux() function.

    Best regards,
    Miroslav

    [/quote]

    Miroslav,


    This does appear to work. Seems so simple once someone tells you what to do, thank you! - Anthony