33
ROM-5420 User Manual
Chapter 3
S
oftware
Functionality
3.8.3
GPIO Setting
Please see GPIO initial code listed below. Below code is to assign the starting value
to GPIO variable.
/* Enable GPIO */
gpio_request(SABRESD_GPIO0, "gpio-0");
gpio_request(SABRESD_GPIO1, "gpio-1");
gpio_request(SABRESD_GPIO2, "gpio-2");
gpio_request(SABRESD_GPIO3, "gpio-3");
gpio_request(SABRESD_GPIO4, "gpio-4");
gpio_request(SABRESD_GPIO5, "gpio-5");
gpio_request(SABRESD_GPIO6, "gpio-6");
gpio_request(SABRESD_GPIO7, "gpio-7");
gpio_request(SABRESD_GPIO8, "gpio-8");
gpio_request(SABRESD_GPIO9, "gpio-9");
gpio_request(SABRESD_GPIO10, "gpio-10");
gpio_request(SABRESD_GPIO11, "gpio-11");
3.8.4
RS232 Initial Code
The RS232 initial code as below. It shows you how to initial COM2 ports.
int open_port(void)
{
int fd;
fd=open("/dev/ttymxc1",O_RDWR|O_NOCTTY|O_NDELAY);
if(fd == -1){
perror("open error");
}
return(fd);
}
3.8.5
Display Output Setting
3.8.5.1
LVDS Settings
Please set environment in u-boot as below:
setenv bootargs_mmc 'setenv bootargs ${bootargs} root=/dev/
mmcblk1p1 rootwait rw video=mxcfb0:dev=ldb,LDB-XGA,if=RGB24'
LDB-XGA is an example for the resolution of your LVDS panel. You can input the
actual resolution of your LVDS panel here, such as 800x480, 1024x768, etc. The sys-
tem will accomplish the corresponding parameters automatically.
If the panel has problem to be activated, you may need to check the panel datasheet
to configure the panel related parameters. The LVDS video mode database is stored
in linux-3.0.35/drivers/video/mxc/ldb.c. You can add a new one for your LVDS panel.
static struct fb_videomode ldb_modedb[] = {
{
"LDB-XGA", 60, 1024, 768, 15385,
Содержание ROM-5420
Страница 1: ...User Manual ROM 5420 RISC based SMARC Module with Freescale i MX6 ARM Cortex A9 Processor...
Страница 17: ...Chapter 3 3 Software Functionality This chapter details the software programs on the ROM 5420 plat form...
Страница 53: ...45 ROM 5420 User Manual Chapter 5 Advantech Services...