Gpio Setting; Rs232 Initial Code; Display Output Setting - Advantech ROM-5420 User Manual

Risc-based smarc module with freescale i.mx6 arm cortex a9 processor
Table of Contents

Advertisement

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
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,
'setenv
bootargs
33
${bootargs}
root=/dev/
ROM-5420 User Manual

Advertisement

Table of Contents
loading

This manual is also suitable for:

Rom-5420cd-mda1e

Table of Contents