我在board-am335xevm.c中设置了mux,并在mux33xx.c中做了对应的修改,但五个串口都没有反应,在android和linux下都不行.
还要修改添加那一个文件,请高手指点一下?
static void __init am335x_uart_pin_init(void)
{
setup_pin_mux(uart1_pin_mux);
setup_pin_mux(uart2_pin_mux);
setup_pin_mux(uart3_pin_mux);
setup_pin_mux(uart4_pin_mux);
setup_pin_mux(uart5_pin_mux);
return;
}
static struct pinmux_config uart1_pin_mux[] = {
{"uart1_rxd.uart1_rxd", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"uart1_txd.uart1_txd", OMAP_MUX_MODE0 | AM33XX_PULL_ENBL},
{NULL, 0},
};
static struct pinmux_config uart2_pin_mux[] = {
{"spi0_sclk.uart2_rxd", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP},
{"spi0_d0.uart2_txd", OMAP_MUX_MODE1 | AM33XX_PULL_ENBL},
{NULL, 0},
};
/* Module pin mux for uart3 myboard uart3 */
static struct pinmux_config uart3_pin_mux[] = {
{"mmc0_dat1.uart3_rxd", OMAP_MUX_MODE3 | AM33XX_PIN_INPUT_PULLUP},
{"mmc0_dat0.uart3_txd", OMAP_MUX_MODE3 | AM33XX_PULL_ENBL},
{NULL, 0},
};
static struct pinmux_config uart4_pin_mux[] = {
{"uart0_ctsn.uart4_rxd", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP},
{"uart0_rtsn.uart4_txd", OMAP_MUX_MODE1 | AM33XX_PULL_ENBL},
{NULL, 0},
};
static struct pinmux_config uart5_pin_mux[] = {
{"mdio_data.uart5_rxd", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLUP},
{"mdio_clk.uart5_txd", OMAP_MUX_MODE2 | AM33XX_PULL_ENBL},
{NULL, 0},
};
shasha su:
没试过,不过,你主要是做板级的移植,按 TI 说法来讲只需要修改 board_am335x_xevm.c 就可以了。
chocolate han:
{"uart1_rxd.uart1_rxd", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP}
。。。
。。。
这里边的“uart1_rxd” 管脚,都是复用的,你要把uart1_rxd 的其他复用功能 disable 掉,试一下。
我也是新手,说的可能不对,只是抛了块砖,希望有玉的砸过来,供后来人学习!