Difference between revisions of "Hammer Uart2 Configuration"

From eLinux.org
Jump to: navigation, search
 
(Change to Category TCT-Hammer)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
It seems that the default setting for the Hammer board is to use RXD2 and TXD2 as RTS and CTS for UART1, which is not available.
+
The default configuration for the GPH6 and GPH7 pins on the s3c2410 are as GPIO inputs. To configure these pins for usage as a second uart add the following commented section to the arch/arm/mach-s3c2410/mach-tct_hammer.c in the linux source tree, future versions of the Hammer kernel source will include this entry:
If you want to have access to UART2 using /dev/ttySAC2 then you need to make a small modification to arch/arm/mach-s3c2410/mach-tct_hammer.c
+
<pre>
 +
static void __init tct_hammer_init(void)
 +
{
  
Add the following lines to the tct_hammer_init function:
+
s3c2410_gpio_cfgpin(S3C2410_GPF0, S3C2410_GPIO_OUTPUT);
 +
s3c2410_gpio_setpin(S3C2410_GPF0, 1);
  
        s3c2410_gpio_cfgpin(S3C2410_GPH6, S3C2410_GPH6_TXD2);
+
s3c2410_gpio_cfgpin(S3C2410_GPC12, S3C2410_GPIO_OUTPUT);
        s3c2410_gpio_pullup(S3C2410_GPH6, 1);
+
s3c2410_gpio_setpin(S3C2410_GPC12, 1);
        s3c2410_gpio_cfgpin(S3C2410_GPH7, S3C2410_GPH7_RXD2);
+
 
        s3c2410_gpio_pullup(S3C2410_GPH7, 1);
+
/* uncomment these to enable the second serial port */
 +
/*
 +
s3c2410_gpio_cfgpin(S3C2410_GPH6, S3C2410_GPH6_TXD2);
 +
s3c2410_gpio_pullup(S3C2410_GPH6, 1);
 +
s3c2410_gpio_cfgpin(S3C2410_GPH7, S3C2410_GPH7_RXD2);
 +
s3c2410_gpio_pullup(S3C2410_GPH7, 1);
 +
*/
 +
#ifdef CONFIG_FB_S3C2410
 +
s3c24xx_fb_set_platdata(&tct_hammer_lcd_info);
 +
#endif
 +
platform_add_devices(tct_hammer_devices, ARRAY_SIZE(tct_hammer_devices));
 +
}
 +
 
 +
</pre>
 +
 
 +
after recompiling the kernel and loading it onto the Hammer, the port will be accessable via /dev/ttySAC2.
 +
 
 +
[[Category:TCT-Hammer]]

Latest revision as of 16:48, 14 May 2011

The default configuration for the GPH6 and GPH7 pins on the s3c2410 are as GPIO inputs. To configure these pins for usage as a second uart add the following commented section to the arch/arm/mach-s3c2410/mach-tct_hammer.c in the linux source tree, future versions of the Hammer kernel source will include this entry:

static void __init tct_hammer_init(void)
{

	s3c2410_gpio_cfgpin(S3C2410_GPF0, S3C2410_GPIO_OUTPUT);
	s3c2410_gpio_setpin(S3C2410_GPF0, 1);

	s3c2410_gpio_cfgpin(S3C2410_GPC12, S3C2410_GPIO_OUTPUT);
	s3c2410_gpio_setpin(S3C2410_GPC12, 1);

/* uncomment these to enable the second serial port */
/*
	s3c2410_gpio_cfgpin(S3C2410_GPH6, S3C2410_GPH6_TXD2);
	s3c2410_gpio_pullup(S3C2410_GPH6, 1);
	s3c2410_gpio_cfgpin(S3C2410_GPH7, S3C2410_GPH7_RXD2);
	s3c2410_gpio_pullup(S3C2410_GPH7, 1);
*/
#ifdef CONFIG_FB_S3C2410
	s3c24xx_fb_set_platdata(&tct_hammer_lcd_info);
#endif
	platform_add_devices(tct_hammer_devices, ARRAY_SIZE(tct_hammer_devices));
}

after recompiling the kernel and loading it onto the Hammer, the port will be accessable via /dev/ttySAC2.