2018-05-06 21:58:06 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2014-03-06 13:39:06 +00:00
|
|
|
/*
|
2018-01-09 18:01:32 +00:00
|
|
|
* Copyright (C) 2013-2018 Hannes Schmelzer <oe5hpm@oevsv.at> -
|
|
|
|
* B&R Industrial Automation GmbH - http://www.br-automation.com
|
2014-03-06 13:39:06 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef AM335X_FB_H
|
|
|
|
#define AM335X_FB_H
|
|
|
|
|
2020-02-22 13:05:45 +00:00
|
|
|
#if !CONFIG_IS_ENABLED(DM_VIDEO)
|
|
|
|
|
2020-02-22 13:05:37 +00:00
|
|
|
#define HSVS_CONTROL BIT(25) /*
|
2014-03-06 13:39:06 +00:00
|
|
|
* 0 = lcd_lp and lcd_fp are driven on
|
|
|
|
* opposite edges of pixel clock than
|
|
|
|
* the lcd_pixel_o
|
|
|
|
* 1 = lcd_lp and lcd_fp are driven
|
|
|
|
* according to bit 24 Note that this
|
|
|
|
* bit MUST be set to '0' for Passive
|
|
|
|
* Matrix displays the edge timing is
|
|
|
|
* fixed
|
|
|
|
*/
|
2020-02-22 13:05:37 +00:00
|
|
|
#define HSVS_RISEFALL BIT(24) /*
|
2014-03-06 13:39:06 +00:00
|
|
|
* 0 = lcd_lp and lcd_fp are driven on
|
|
|
|
* the rising edge of pixel clock (bit
|
|
|
|
* 25 must be set to 1)
|
|
|
|
* 1 = lcd_lp and lcd_fp are driven on
|
|
|
|
* the falling edge of pixel clock (bit
|
|
|
|
* 25 must be set to 1)
|
|
|
|
*/
|
2020-02-22 13:05:37 +00:00
|
|
|
#define DE_INVERT BIT(23) /*
|
2014-03-06 13:39:06 +00:00
|
|
|
* 0 = DE is low-active
|
|
|
|
* 1 = DE is high-active
|
|
|
|
*/
|
2020-02-22 13:05:37 +00:00
|
|
|
#define PXCLK_INVERT BIT(22) /*
|
2014-03-06 13:39:06 +00:00
|
|
|
* 0 = pix-clk is high-active
|
|
|
|
* 1 = pic-clk is low-active
|
|
|
|
*/
|
2020-02-22 13:05:37 +00:00
|
|
|
#define HSYNC_INVERT BIT(21) /*
|
2014-03-06 13:39:06 +00:00
|
|
|
* 0 = HSYNC is active high
|
|
|
|
* 1 = HSYNC is avtive low
|
|
|
|
*/
|
2020-02-22 13:05:37 +00:00
|
|
|
#define VSYNC_INVERT BIT(20) /*
|
2014-03-06 13:39:06 +00:00
|
|
|
* 0 = VSYNC is active high
|
|
|
|
* 1 = VSYNC is active low
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct am335x_lcdpanel {
|
|
|
|
unsigned int hactive; /* Horizontal active area */
|
|
|
|
unsigned int vactive; /* Vertical active area */
|
|
|
|
unsigned int bpp; /* bits per pixel */
|
|
|
|
unsigned int hfp; /* Horizontal front porch */
|
|
|
|
unsigned int hbp; /* Horizontal back porch */
|
|
|
|
unsigned int hsw; /* Horizontal Sync Pulse Width */
|
|
|
|
unsigned int vfp; /* Vertical front porch */
|
|
|
|
unsigned int vbp; /* Vertical back porch */
|
|
|
|
unsigned int vsw; /* Vertical Sync Pulse Width */
|
2018-01-09 18:01:34 +00:00
|
|
|
unsigned int pxl_clk; /* Pixel clock */
|
2014-03-06 13:39:06 +00:00
|
|
|
unsigned int pol; /* polarity of sync, clock signals */
|
2015-02-03 12:22:23 +00:00
|
|
|
unsigned int pup_delay; /*
|
|
|
|
* time in ms after power on to
|
|
|
|
* initialization of lcd-controller
|
|
|
|
* (VCC ramp up time)
|
|
|
|
*/
|
2014-03-06 13:39:06 +00:00
|
|
|
unsigned int pon_delay; /*
|
2015-02-03 12:22:23 +00:00
|
|
|
* time in ms after initialization of
|
|
|
|
* lcd-controller (pic stabilization)
|
2014-03-06 13:39:06 +00:00
|
|
|
*/
|
|
|
|
void (*panel_power_ctrl)(int); /* fp for power on/off display */
|
|
|
|
};
|
|
|
|
|
|
|
|
int am335xfb_init(struct am335x_lcdpanel *panel);
|
|
|
|
|
2020-02-22 13:05:45 +00:00
|
|
|
#endif /* CONFIG_DM_VIDEO */
|
|
|
|
|
2014-03-06 13:39:06 +00:00
|
|
|
#endif /* AM335X_FB_H */
|