diff --git a/configs/sama5d3x-ek/include/board.h b/configs/sama5d3x-ek/include/board.h index 62227d9574c..57471a0fb55 100644 --- a/configs/sama5d3x-ek/include/board.h +++ b/configs/sama5d3x-ek/include/board.h @@ -71,6 +71,33 @@ #endif +/* LCD Geometry and Timing */ + +#define BOARD_LCD_WIDTH 800 /* Display width (pixels) */ +#define BOARD_LCD_HEIGHT 480 /* Display height (pixels) */ +#define BOARD_LCD_IFWIDTH 24 /* Display interface width (bits) */ +#define BOARD_LCD_TIMING_VFP 22 /* Vertical front porch (lines) */ +#define BOARD_LCD_TIMING_VBP 21 /* Vertical back porch (lines) */ +#define BOARD_LCD_TIMING_VPW 2 /* Vertical pulse width (lines) */ +#define BOARD_LCD_TIMING_HFP 64 /* Horizontal front porch (LCDDOTCLK cycles) */ +#define BOARD_LCD_TIMING_HBP 64 /* Horizontal back porch (LCDDOTCLK cycles) */ +#define BOARD_LCD_TIMING_HPW 128 /* Horizontal pulse width (LCDDOTCLK cycles) */ +#define BOARD_LCD_FRAMERATE 40 /* Frame rate (Hz) */ + +/* Frame size (words) (height * width * bpp / 32) */ + +#define BOARD_LCD_FRAMESIZE \ + (BOARD_LCD_WIDTH * BOARD_LCD_HEIGHT * BOARD_LCD_IFWIDTH / 32) + +/* Pixel clock rate (Hz )(HS period * VS period * BOARD_LCD_FRAMERATE). */ + +#define BOARD_LCD_HSPERIOD \ + (BOARD_LCD_TIMING_HPW + BOARD_LCD_TIMING_HBP + BOARD_LCD_WIDTH + BOARD_LCD_TIMING_HFP) +#define BOARD_LCD_VSPERIOD \ + (BOARD_LCD_TIMING_VPW + BOARD_LCD_TIMING_VBP + BOARD_LCD_HEIGHT + BOARD_LCD_TIMING_VFP) +#define BOARD_LCD_PIXELCLOCK \ + (BOARD_LCD_HSPERIOD * BOARD_LCD_VSPERIOD * BOARD_LCD_FRAMERATE) + /* LED definitions ******************************************************************/ /* There are two LEDs on the SAMA5D3 series-CM board that can be controlled * by software. A blue LED is controlled via PIO pins. A red LED normally