blob: 66436b9b2772045e8bfc078d0e47d74c74855309 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Nikita Kiryanovbaaa7dd2015-02-03 13:32:20 +02002/*
3 * atmel_lcd.h - Atmel LCD Controller structures
4 *
5 * (C) Copyright 2001
6 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
Nikita Kiryanovbaaa7dd2015-02-03 13:32:20 +02007 */
8
9#ifndef _ATMEL_LCD_H_
10#define _ATMEL_LCD_H_
11
Simon Glass9dc89a02016-05-05 07:28:20 -060012/**
Simon Glass8a8d24b2020-12-03 16:55:23 -070013 * struct atmel_lcd_plat - platform data for Atmel LCDs with driver model
Simon Glass9dc89a02016-05-05 07:28:20 -060014 *
15 * @timing_index: Index of LCD timing to use in device tree node
16 */
Simon Glass8a8d24b2020-12-03 16:55:23 -070017struct atmel_lcd_plat {
Simon Glass9dc89a02016-05-05 07:28:20 -060018 int timing_index;
19};
20
Nikita Kiryanovbaaa7dd2015-02-03 13:32:20 +020021typedef struct vidinfo {
22 ushort vl_col; /* Number of columns (i.e. 640) */
23 ushort vl_row; /* Number of rows (i.e. 480) */
Hannes Petermaier604c7d42015-03-27 08:01:38 +010024 ushort vl_rot; /* Rotation of Display (0, 1, 2, 3) */
25 u_long vl_clk; /* pixel clock in ps */
Nikita Kiryanovbaaa7dd2015-02-03 13:32:20 +020026
27 /* LCD configuration register */
28 u_long vl_sync; /* Horizontal / vertical sync */
29 u_long vl_bpix; /* Bits per pixel, 0 = 1, 1 = 2, 2 = 4, 3 = 8, 4 = 16 */
30 u_long vl_tft; /* 0 = passive, 1 = TFT */
31 u_long vl_cont_pol_low; /* contrast polarity is low */
32 u_long vl_clk_pol; /* clock polarity */
33
34 /* Horizontal control register. */
35 u_long vl_hsync_len; /* Length of horizontal sync */
36 u_long vl_left_margin; /* Time from sync to picture */
37 u_long vl_right_margin; /* Time from picture to sync */
38
39 /* Vertical control register. */
40 u_long vl_vsync_len; /* Length of vertical sync */
41 u_long vl_upper_margin; /* Time from sync to picture */
42 u_long vl_lower_margin; /* Time from picture to sync */
43
44 u_long mmio; /* Memory mapped registers */
Wenyou Yangd330e042017-09-13 14:58:46 +080045
46 u_int logo_width;
47 u_int logo_height;
48 int logo_x_offset;
49 int logo_y_offset;
50 u_long logo_addr;
Nikita Kiryanovbaaa7dd2015-02-03 13:32:20 +020051} vidinfo_t;
52
Wenyou Yangd330e042017-09-13 14:58:46 +080053void atmel_logo_info(vidinfo_t *info);
54void microchip_logo_info(vidinfo_t *info);
55
Nikita Kiryanovbaaa7dd2015-02-03 13:32:20 +020056#endif