|
@@ -419,3 +419,178 @@ static struct s1d13xxxfb_regval yl9200_s1dfb_initregs[] =
|
|
|
{S1DREG_LCD_PIX_PAN, 0x03}, /* LCD Pixel Panning Register*/
|
|
|
{S1DREG_LCD_DISP_FIFO_HTC, 0x00}, /* LCD Display FIFO High Threshold Control Register*/
|
|
|
{S1DREG_LCD_DISP_FIFO_LTC, 0x00}, /* LCD Display FIFO Low Threshold Control Register*/
|
|
|
+ {S1DREG_CRT_DISP_HWIDTH, 0x4F}, /* CRT/TV Horizontal Display Width Register*/
|
|
|
+ {S1DREG_CRT_NDISP_HPER, 0x13}, /* CRT/TV Horizontal Non-Display Period Register*/
|
|
|
+ {S1DREG_CRT_HRTC_START, 0x01}, /* CRT/TV HRTC Start Position Register*/
|
|
|
+ {S1DREG_CRT_HRTC_PWIDTH, 0x0B}, /* CRT/TV HRTC Pulse Width Register*/
|
|
|
+ {S1DREG_CRT_DISP_VHEIGHT0, 0xDF}, /* CRT/TV Vertical Display Height Register 0*/
|
|
|
+ {S1DREG_CRT_DISP_VHEIGHT1, 0x01}, /* CRT/TV Vertical Display Height Register 1*/
|
|
|
+ {S1DREG_CRT_NDISP_VPER, 0x2B}, /* CRT/TV Vertical Non-Display Period Register*/
|
|
|
+ {S1DREG_CRT_VRTC_START, 0x09}, /* CRT/TV VRTC Start Position Register*/
|
|
|
+ {S1DREG_CRT_VRTC_PWIDTH, 0x01}, /* CRT/TV VRTC Pulse Width Register*/
|
|
|
+ {S1DREG_TV_OUT_CTL, 0x18}, /* TV Output Control Register */
|
|
|
+ {S1DREG_CRT_DISP_MODE, 0x05}, /* CRT/TV Display Mode Register, 16BPP*/
|
|
|
+ {S1DREG_CRT_DISP_START0, 0x00}, /* CRT/TV Display Start Address Register 0*/
|
|
|
+ {S1DREG_CRT_DISP_START1, 0x00}, /* CRT/TV Display Start Address Register 1*/
|
|
|
+ {S1DREG_CRT_DISP_START2, 0x00}, /* CRT/TV Display Start Address Register 2*/
|
|
|
+ {S1DREG_CRT_MEM_OFF0, 0x80}, /* CRT/TV Memory Address Offset Register 0*/
|
|
|
+ {S1DREG_CRT_MEM_OFF1, 0x02}, /* CRT/TV Memory Address Offset Register 1*/
|
|
|
+ {S1DREG_CRT_PIX_PAN, 0x00}, /* CRT/TV Pixel Panning Register*/
|
|
|
+ {S1DREG_CRT_DISP_FIFO_HTC, 0x00}, /* CRT/TV Display FIFO High Threshold Control Register*/
|
|
|
+ {S1DREG_CRT_DISP_FIFO_LTC, 0x00}, /* CRT/TV Display FIFO Low Threshold Control Register*/
|
|
|
+ {S1DREG_LCD_CUR_CTL, 0x00}, /* LCD Ink/Cursor Control Register*/
|
|
|
+ {S1DREG_LCD_CUR_START, 0x01}, /* LCD Ink/Cursor Start Address Register*/
|
|
|
+ {S1DREG_LCD_CUR_XPOS0, 0x00}, /* LCD Cursor X Position Register 0*/
|
|
|
+ {S1DREG_LCD_CUR_XPOS1, 0x00}, /* LCD Cursor X Position Register 1*/
|
|
|
+ {S1DREG_LCD_CUR_YPOS0, 0x00}, /* LCD Cursor Y Position Register 0*/
|
|
|
+ {S1DREG_LCD_CUR_YPOS1, 0x00}, /* LCD Cursor Y Position Register 1*/
|
|
|
+ {S1DREG_LCD_CUR_BCTL0, 0x00}, /* LCD Ink/Cursor Blue Color 0 Register*/
|
|
|
+ {S1DREG_LCD_CUR_GCTL0, 0x00}, /* LCD Ink/Cursor Green Color 0 Register*/
|
|
|
+ {S1DREG_LCD_CUR_RCTL0, 0x00}, /* LCD Ink/Cursor Red Color 0 Register*/
|
|
|
+ {S1DREG_LCD_CUR_BCTL1, 0x1F}, /* LCD Ink/Cursor Blue Color 1 Register*/
|
|
|
+ {S1DREG_LCD_CUR_GCTL1, 0x3F}, /* LCD Ink/Cursor Green Color 1 Register*/
|
|
|
+ {S1DREG_LCD_CUR_RCTL1, 0x1F}, /* LCD Ink/Cursor Red Color 1 Register*/
|
|
|
+ {S1DREG_LCD_CUR_FIFO_HTC, 0x00}, /* LCD Ink/Cursor FIFO Threshold Register*/
|
|
|
+ {S1DREG_CRT_CUR_CTL, 0x00}, /* CRT/TV Ink/Cursor Control Register*/
|
|
|
+ {S1DREG_CRT_CUR_START, 0x01}, /* CRT/TV Ink/Cursor Start Address Register*/
|
|
|
+ {S1DREG_CRT_CUR_XPOS0, 0x00}, /* CRT/TV Cursor X Position Register 0*/
|
|
|
+ {S1DREG_CRT_CUR_XPOS1, 0x00}, /* CRT/TV Cursor X Position Register 1*/
|
|
|
+ {S1DREG_CRT_CUR_YPOS0, 0x00}, /* CRT/TV Cursor Y Position Register 0*/
|
|
|
+ {S1DREG_CRT_CUR_YPOS1, 0x00}, /* CRT/TV Cursor Y Position Register 1*/
|
|
|
+ {S1DREG_CRT_CUR_BCTL0, 0x00}, /* CRT/TV Ink/Cursor Blue Color 0 Register*/
|
|
|
+ {S1DREG_CRT_CUR_GCTL0, 0x00}, /* CRT/TV Ink/Cursor Green Color 0 Register*/
|
|
|
+ {S1DREG_CRT_CUR_RCTL0, 0x00}, /* CRT/TV Ink/Cursor Red Color 0 Register*/
|
|
|
+ {S1DREG_CRT_CUR_BCTL1, 0x1F}, /* CRT/TV Ink/Cursor Blue Color 1 Register*/
|
|
|
+ {S1DREG_CRT_CUR_GCTL1, 0x3F}, /* CRT/TV Ink/Cursor Green Color 1 Register*/
|
|
|
+ {S1DREG_CRT_CUR_RCTL1, 0x1F}, /* CRT/TV Ink/Cursor Red Color 1 Register*/
|
|
|
+ {S1DREG_CRT_CUR_FIFO_HTC, 0x00}, /* CRT/TV Ink/Cursor FIFO Threshold Register*/
|
|
|
+ {S1DREG_BBLT_CTL0, 0x00}, /* BitBlt Control Register 0*/
|
|
|
+ {S1DREG_BBLT_CTL1, 0x01}, /* BitBlt Control Register 1*/
|
|
|
+ {S1DREG_BBLT_CC_EXP, 0x00}, /* BitBlt ROP Code/Color Expansion Register*/
|
|
|
+ {S1DREG_BBLT_OP, 0x00}, /* BitBlt Operation Register*/
|
|
|
+ {S1DREG_BBLT_SRC_START0, 0x00}, /* BitBlt Source Start Address Register 0*/
|
|
|
+ {S1DREG_BBLT_SRC_START1, 0x00}, /* BitBlt Source Start Address Register 1*/
|
|
|
+ {S1DREG_BBLT_SRC_START2, 0x00}, /* BitBlt Source Start Address Register 2*/
|
|
|
+ {S1DREG_BBLT_DST_START0, 0x00}, /* BitBlt Destination Start Address Register 0*/
|
|
|
+ {S1DREG_BBLT_DST_START1, 0x00}, /* BitBlt Destination Start Address Register 1*/
|
|
|
+ {S1DREG_BBLT_DST_START2, 0x00}, /* BitBlt Destination Start Address Register 2*/
|
|
|
+ {S1DREG_BBLT_MEM_OFF0, 0x00}, /* BitBlt Memory Address Offset Register 0*/
|
|
|
+ {S1DREG_BBLT_MEM_OFF1, 0x00}, /* BitBlt Memory Address Offset Register 1*/
|
|
|
+ {S1DREG_BBLT_WIDTH0, 0x00}, /* BitBlt Width Register 0*/
|
|
|
+ {S1DREG_BBLT_WIDTH1, 0x00}, /* BitBlt Width Register 1*/
|
|
|
+ {S1DREG_BBLT_HEIGHT0, 0x00}, /* BitBlt Height Register 0*/
|
|
|
+ {S1DREG_BBLT_HEIGHT1, 0x00}, /* BitBlt Height Register 1*/
|
|
|
+ {S1DREG_BBLT_BGC0, 0x00}, /* BitBlt Background Color Register 0*/
|
|
|
+ {S1DREG_BBLT_BGC1, 0x00}, /* BitBlt Background Color Register 1*/
|
|
|
+ {S1DREG_BBLT_FGC0, 0x00}, /* BitBlt Foreground Color Register 0*/
|
|
|
+ {S1DREG_BBLT_FGC1, 0x00}, /* BitBlt Foreground Color Register 1*/
|
|
|
+ {S1DREG_LKUP_MODE, 0x00}, /* Look-Up Table Mode Register*/
|
|
|
+ {S1DREG_LKUP_ADDR, 0x00}, /* Look-Up Table Address Register*/
|
|
|
+ {S1DREG_PS_CNF, 0x00}, /* Power Save Configuration Register*/
|
|
|
+ {S1DREG_PS_STATUS, 0x00}, /* Power Save Status Register*/
|
|
|
+ {S1DREG_CPU2MEM_WDOGT, 0x00}, /* CPU-to-Memory Access Watchdog Timer Register*/
|
|
|
+ {S1DREG_COM_DISP_MODE, 0x01}, /* Display Mode Register, LCD only*/
|
|
|
+};
|
|
|
+
|
|
|
+static struct s1d13xxxfb_pdata yl9200_s1dfb_pdata = {
|
|
|
+ .initregs = yl9200_s1dfb_initregs,
|
|
|
+ .initregssize = ARRAY_SIZE(yl9200_s1dfb_initregs),
|
|
|
+ .platform_init_video = yl9200_init_video,
|
|
|
+};
|
|
|
+
|
|
|
+#define YL9200_FB_REG_BASE AT91_CHIPSELECT_7
|
|
|
+#define YL9200_FB_VMEM_BASE YL9200_FB_REG_BASE + SZ_2M
|
|
|
+#define YL9200_FB_VMEM_SIZE SZ_2M
|
|
|
+
|
|
|
+static struct resource yl9200_s1dfb_resource[] = {
|
|
|
+ [0] = { /* video mem */
|
|
|
+ .name = "s1d13xxxfb memory",
|
|
|
+ .start = YL9200_FB_VMEM_BASE,
|
|
|
+ .end = YL9200_FB_VMEM_BASE + YL9200_FB_VMEM_SIZE -1,
|
|
|
+ .flags = IORESOURCE_MEM,
|
|
|
+ },
|
|
|
+ [1] = { /* video registers */
|
|
|
+ .name = "s1d13xxxfb registers",
|
|
|
+ .start = YL9200_FB_REG_BASE,
|
|
|
+ .end = YL9200_FB_REG_BASE + SZ_512 -1,
|
|
|
+ .flags = IORESOURCE_MEM,
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+static u64 s1dfb_dmamask = DMA_BIT_MASK(32);
|
|
|
+
|
|
|
+static struct platform_device yl9200_s1dfb_device = {
|
|
|
+ .name = "s1d13806fb",
|
|
|
+ .id = -1,
|
|
|
+ .dev = {
|
|
|
+ .dma_mask = &s1dfb_dmamask,
|
|
|
+ .coherent_dma_mask = DMA_BIT_MASK(32),
|
|
|
+ .platform_data = &yl9200_s1dfb_pdata,
|
|
|
+ },
|
|
|
+ .resource = yl9200_s1dfb_resource,
|
|
|
+ .num_resources = ARRAY_SIZE(yl9200_s1dfb_resource),
|
|
|
+};
|
|
|
+
|
|
|
+void __init yl9200_add_device_video(void)
|
|
|
+{
|
|
|
+ platform_device_register(&yl9200_s1dfb_device);
|
|
|
+}
|
|
|
+#else
|
|
|
+void __init yl9200_add_device_video(void) {}
|
|
|
+#endif
|
|
|
+
|
|
|
+
|
|
|
+static void __init yl9200_board_init(void)
|
|
|
+{
|
|
|
+ /* Serial */
|
|
|
+ /* DBGU on ttyS0. (Rx & Tx only) */
|
|
|
+ at91_register_uart(0, 0, 0);
|
|
|
+
|
|
|
+ /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
|
|
|
+ at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
|
|
|
+ | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
|
|
|
+ | ATMEL_UART_RI);
|
|
|
+
|
|
|
+ /* USART0 on ttyS2. (Rx & Tx only to JP3) */
|
|
|
+ at91_register_uart(AT91RM9200_ID_US0, 2, 0);
|
|
|
+
|
|
|
+ /* USART3 on ttyS3. (Rx, Tx, RTS - RS485 interface) */
|
|
|
+ at91_register_uart(AT91RM9200_ID_US3, 3, ATMEL_UART_RTS);
|
|
|
+ at91_add_device_serial();
|
|
|
+ /* Ethernet */
|
|
|
+ at91_add_device_eth(&yl9200_eth_data);
|
|
|
+ /* USB Host */
|
|
|
+ at91_add_device_usbh(&yl9200_usbh_data);
|
|
|
+ /* USB Device */
|
|
|
+ at91_add_device_udc(&yl9200_udc_data);
|
|
|
+ /* I2C */
|
|
|
+ at91_add_device_i2c(yl9200_i2c_devices, ARRAY_SIZE(yl9200_i2c_devices));
|
|
|
+ /* MMC */
|
|
|
+ at91_add_device_mci(0, &yl9200_mci0_data);
|
|
|
+ /* NAND */
|
|
|
+ at91_add_device_nand(&yl9200_nand_data);
|
|
|
+ /* NOR Flash */
|
|
|
+ platform_device_register(&yl9200_flash);
|
|
|
+#if defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE)
|
|
|
+ /* SPI */
|
|
|
+ at91_add_device_spi(yl9200_spi_devices, ARRAY_SIZE(yl9200_spi_devices));
|
|
|
+ /* Touchscreen */
|
|
|
+ yl9200_add_device_ts();
|
|
|
+#endif
|
|
|
+ /* LEDs. */
|
|
|
+ at91_gpio_leds(yl9200_leds, ARRAY_SIZE(yl9200_leds));
|
|
|
+ /* Push Buttons */
|
|
|
+ yl9200_add_device_buttons();
|
|
|
+ /* VGA */
|
|
|
+ yl9200_add_device_video();
|
|
|
+}
|
|
|
+
|
|
|
+MACHINE_START(YL9200, "uCdragon YL-9200")
|
|
|
+ /* Maintainer: S.Birtles */
|
|
|
+ .timer = &at91rm9200_timer,
|
|
|
+ .map_io = at91_map_io,
|
|
|
+ .handle_irq = at91_aic_handle_irq,
|
|
|
+ .init_early = yl9200_init_early,
|
|
|
+ .init_irq = at91_init_irq_default,
|
|
|
+ .init_machine = yl9200_board_init,
|
|
|
+MACHINE_END
|