Hi All,
I have a pinmux.h file generated by one of the hardware guys. In pinmux.h there's a big #define in the form of:
#define MUX_EVM() \
MUX_VAL(CONTROL_PADCONF_GPMC_AD0, (IEN | PD | MODE1 )) /* MMC1_DAT0_MUX2 */\
MUX_VAL(CONTROL_PADCONF_GPMC_AD1, (IEN | PD | MODE1 )) /* MMC1_DAT1_MUX2 */\
MUX_VAL(CONTROL_PADCONF_GPMC_AD2, (IEN | PD | MODE1 )) /* MMC1_DAT2_MUX2 */\
...
My new board uses the AM3352 Sitara CPU. In U-Boot the above MUX_EVM macro seems to be called in setup_mux_conf_regs() in board/ti/evm/evm.c, called by arch/arm/cpu/armv7/omap3/board.c. However this file does not seem to be relevant for the AM335X build (it uses arch/arm/cpu/armv7/am33xx/board.c, which makes no call to MUX_EVM).
Therefore, do we need to paste in the values from pinmux.h to board/ti/evm/evm.h? It would seem they would have no effect as they're not compiled for the AM335X build.
Instead of using the pinmux.h macros, the AM335X U-Boot eval. code seems to configure pins using C code. UART0 is configured with:
static struct module_pin_mux uart0_pin_mux[] = {
{OFFSET(uart0_rxd), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* UART0_RXD */
{OFFSET(uart0_txd), (MODE(0) | PULLUDEN)}, /* UART0_TXD */
{-1},
};
in board/ti/am335x/mux.c. So I am wondering do we need to apply the settings from pinmux.h to the above C structures? The above C structure looks correct to me for configuring UART0. However the UART0 definition from pinmux.h is:
MUX_VAL(CONTROL_PADCONF_UART0_RXD, (IEN | OFF | MODE0 )) /* UART0_RXD */\
MUX_VAL(CONTROL_PADCONF_UART0_TXD, (IEN | OFF | MODE0 )) /* UART0_TXD */\
This does not look correct, as why would you configure the transmit pin to be input enabled?
Thanks to anyone who can help clarify the above.