Ti OMAP 3530 PSP compile note (4) --- run on the devkit8000 Board (3)

Source: Internet
Author: User

Next, I modified some configurations, mainly by referring to the configuration in the old kernel and adding it to the new kernel.

For example, if you have added led configuration and support, and synchronized the board to the Resource Initialization file, you can see the following when you start the kernel:

 

Registered LED Device: lcd1

Registered LED Device: lcd2

Registered LED Device: lcdb

Registered LED Device: LCD3

 

We can see that there are several red lights on the board, but they are not all mounted to rootfs.

 

Then I added the LCD driver. The method is to directly modify the LCD Driver corresponding to Beagle, but not the other drivers. Of course, we need to add related options in the kernel, touchscreen and other related options are added. Then, modify: LCD _omap3beagle.c in linux-03.00.01.06_baegle/Drivers/Video/OMAP.

 

Copy the old driver to some macro definitions, gpio, and so on:

 

# Define DVI // WPL add

# Define LCD _panel_enable_gpio 170
# Define twl4030_i2c_write_u8 twl_i2c_write_u8

# Ifdef DVI
# Define LCD _xres 1280
# Define LCD _yres 720
# Define LCD _pixclock 74250/* In kHz */
# Else
# Define LCD _xres 480
# Define LCD _yres 272
# Define LCD _pixclock 10000/* In kHz */
# Endif

 

Then, initialize the driver and go to omap3beagle_panel_probe, which is called by omapfb_register_panel (& omap3beagle_panel );
To, omap3beagle_panel:

 

. Name = "omap3beagle ",
# Ifndef DVI
. Config = omap_lcdc_panel_tft | omap_lcdc_inv_vsync | omap_lcdc_inv_hsync,
# Else
. Config = omap_lcdc_panel_tft,/* | omap_lcdc_hsv s_opposite */
// | Omap_lcdc_hsv s_rising_edge | omap_lcdc_hsv s_opposite,
# Endif
# Ifndef DVI
. Bpp = 16,
. Data_lines = 24,
. X_res = LCD _xres,
. Y_res = LCD _yres,
. HSW = 41,/* hsync_len (4)-1 */
. HFP = 2,/* right_margin (4)-1 */
. HBP = 2,/* left_margin (40)-1 */
. Vsw = 10,/* vsync_len (2)-1 */
. VFP = 2,/* lower_margin */
. VBP = 2,/* upper_margin (8)-1 */
# Else
/*********** Devkit9000 config *******************/
. Bpp = 16,
. Data_lines = 24,
. X_res = LCD _xres,
. Y_res = LCD _yres,
. HSW = 40,/* hsync_len (4)-1 */
. HFP = 110,/* right_margin (4)-1 */
. HBP = 220,/* left_margin (40)-1 */
. Vsw = 5,/* vsync_len (2)-1 */
. VFP = 20,/* lower_margin */
. VBP = 5,/* upper_margin (8)-1 */
# Endif
. Pixel_clock = LCD _pixclock,
. Init = omap3devkit9100_panel_init,
. Cleanup = omap3devkit9100_panel_cleanup,
. Enable = omap3devkit9100_panel_enable,
. Disable = omap3devkit9100_panel_disable,
. Get_caps = omap3devkit9100_panel_get_caps,

These are some LCD attributes, such as width and height pixels to initialization, initialization, screen cleaning, and other operation function pointers to initialization.

 

Next, copy the init and cleanup values to all functions.

 

During compilation, the error twl4030_i2c_write_u8 is undefined. Check the kernel code and find that it has changed. twl_i2c_write_u8 is added to the file header:

 

# Define twl4030_i2c_write_u8 twl_i2c_write_u8

 

Compile and start it later. I found that the little penguin has become very long, the screen is messy, and I suspect that the refresh frequency is incorrect.

 

Let's look at the driver code:

 

# Ifdef DVI
# Define LCD _xres 1280
# Define LCD _yres 720
# Define LCD _pixclock 74250/* In kHz */
# Else
# Define LCD _xres 480
# Define LCD _yres 272
# Define LCD _pixclock 10000/* In kHz */
# Endif

 

And it turned out to be: # define DVI

 

Block, compile, start, and OK.

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.