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.

pinmux u-boot custom board am335x

Hi,

I'm trying to get u-boot to work on my custom board based on am335x.

I recently deleted the calls to the EEPROM because my board doesn't have this and altered the V_OSCK to 26 Mhz because the board used this frequency ( I can't change this ).

But I'm having some trouble with the pinmux.

I will try to explain what I tried.

I received the header files needed for the pinmux from my colleagues, these were originally designed for Windows CE running on the custom board. You can find them here :

4606.pinmux_one.h

5187.pinmux_two.h

Then I tried to alter the pinmux:

I deleted the mux.c in <u-boot>/arch/arm/cpu/armv7/am33xx (and altered the Makefile for the compile error.) I did this because I thought everything would be handled by the MUX_EVM macro function in pinmux_one.h .

UPDATE: The above step, the deletion of mux.c is not required. I was wrong at the time of the deletion. I think it's ok to leave the file as it is and not worry about it.

I altered the mux.c in <u-boot>/board/ti/am335x to include the pinmux_one.h and changed the enable_board_pin_mux function to :

void enable_board_pin_mux(struct am335x_baseboard_id *header)
{	
		MUX_EVM();
	
}

I then replaced mux.h in <u-boot>/include/asm/arch-am33xx with pinmux_two.h  ( but I kept the name mux.h for proper dependencies).

Then I commented out ( in board/ti/am33x/board.c ):

#ifdef CONFIG_SERIAL1
	enable_uart0_pin_mux();
#endif /* CONFIG_SERIAL1 */
#ifdef CONFIG_SERIAL2
	enable_uart1_pin_mux();
#endif /* CONFIG_SERIAL2 */
#ifdef CONFIG_SERIAL3
	enable_uart2_pin_mux();
#endif /* CONFIG_SERIAL3 */
#ifdef CONFIG_SERIAL4
	enable_uart3_pin_mux();
#endif /* CONFIG_SERIAL4 */
#ifdef CONFIG_SERIAL5
	enable_uart4_pin_mux();
#endif /* CONFIG_SERIAL5 */
#ifdef CONFIG_SERIAL6
	enable_uart5_pin_mux();
#endif /* CONFIG_SERIAL6 */

and

enable_i2c0_pin_mux();

because I think that this would be taken care of in the MUX_EVM() macro.

When I boot the board I get weird output until u-boot invokes the following function in /board/ti/am33xx/board.c :

config_ddr(303, MT41J128MJT125_IOCTRL_VALUE, &ddr3_data,
&ddr3_cmd_ctrl_data, &ddr3_emif_reg_data);

I only use this config_ddr because my board uses ddr3 like the Starter kit, the others are commented out.

Then regular output begins but it stops booting. They thought the booting stopped because I hadn't properly configured DDR3 yet.

They gave me this for the DDR3:

2703.ddr3.h

I guess I have to use this in <u-boot>/arch/arm/cpu/armv7/am33xx/ddr.c and <u-boot>/arch/arm/include/asm/arch-am33xx/ddr_defs.h but I want to make sure first if I am doing the pinmux right.

Or am I screwing things up?

Thanks in advance.