Forums » Software Development »
Pin Mux on AM3359
Added by Brian Compter over 11 years ago
I am working with a AM3359 dev kit and need to get UART 1 and 2 working. As I understand they are configured for CAN currently.
So I expect I will have to adjust the pin mux then correct? I've seen the following pin mux utility here and gave it a go without success. In fact I managed to break UART 3 and 4 which were working previously.
http://processors.wiki.ti.com/index.php/Pin_Mux_Utility_for_ARM_MPU_Processors
I wanted to know if I was barking up the correct tree with this. Will the kernel also need to be adjusted to support the other two UARTs? From the TI website it only mentions changing u-boot.
Thanks,
Brian
Replies (2)
RE: Pin Mux on AM3359 - Added by Tim Iskander over 11 years ago
Brian
On the AM335X based SOM's the linux kernel (assuming you are using linux) will need to configure all of the pin mux settings you need fro your specific application.
We don't use the pinmux tool output for anything (although it can be a helpful tool for determining pin mux combinations).
The customizations made to support the MityARM-335X module and your baseboard are made in 2 files.
arch/arm/mach-omap2/board-mityarm335x.c (for the SOM itself), and
arch/arm/mach-omap2/baseboard-xxxx.c (i.e. baseboard-mityarm335x-devkit.c for the CL dev kit baseboard).
There is a writeup on the ARM9 wiki page about creating your own baseboard file (http://support.criticallink.com/redmine/projects/arm9-platforms/wiki/Linux_Kernel).
The process for the AM335X is very much the same.
You should be able to use the baseboard-mityarm335x-devkit.c file as a starting point for your baseboard. You should not have to touch the board-mityarm335x.c file
hope this helps...
cheers
/Tim
RE: Pin Mux on AM3359 - Added by Brian Compter over 11 years ago
Thanks Tim I think I am on the right track now.
I made the following changes in baseboard-mityarm335x-edvkit.c:
static struct pinmux_config can_pin_mux[] = { //{"uart1_rxd.d_can1_tx", AM33XX_PULL_ENBL}, //{"uart1_txd.d_can1_rx", AM33XX_PIN_INPUT_PULLUP}, //{"mii1_txd3.d_can0_tx", AM33XX_PULL_ENBL}, //{"mii1_txd2.d_can0_rx", AM33XX_PIN_INPUT_PULLUP}, {"uart1_rxd.uart1_rxd", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}, {"uart1_txd.uart1_txd", OMAP_MUX_MODE0 | AM33XX_PULL_ENBL}, {"mii1_txd3.d_can0_tx", AM33XX_PULL_ENBL}, {"mii1_txd2.d_can0_rx", AM33XX_PIN_INPUT_PULLUP}, {NULL, 0} };
and here:
static __init void baseboard_setup_can(void) { setup_pin_mux(can_pin_mux); //am33xx_d_can_init(0); //am33xx_d_can_init(1); }
I actually only needed UART1 working. The hardware teams didn't even break out UART2.
sudo make clean
recompile...
I made a quick loopback test with the following commands:
cat /dev/ttyO1 > out & echo hello > /dev/ttyO1
Everything is working as expected now. Thanks much!