Interfacing with the LG LB043WQ1 LCD screen using the hy-research LCD expansion board

So, I picked up the hy-research expansion board and LG LB043WQ1 LCD
touch screen found here https://specialcomp.com/beagleboard/BeagleLCD2.htm
but I'm having a bit of trouble getting anything at all to show up on
the screen. I've got my BeagleBoard (rev. C4) running angstrom Linux,
and U-Boot 2009.11-rc1. I've tried messing around with omapfb.mode in
the boot args with no luck, although I think I saw it mentioned
somewhere that the LCD resolution (480x272) wasn't supported. Although
I'm not really sure how to go about adding support if this is the
case. Also, do I need to change the default pinmux to use the LCD
signals? Any help would greatly appreciated, thanks.

Any updates on this? I'm also planning to purchase the LCD and use
Ubuntu as my OS.

I've confirmed that I can get video on my computer monitor from the
DVI out (via hdmi) but still no luck on the LCD. I've also noticed
that there are 3 fb ("frame buffer"?) devices under /dev but haven't
done much with this yet.

What you will need to do is -

1. Use the information below and setup your pinmux using your favorite way.

2. Setup your kernel to use this as the driver. The timing is compatible with
the panel in most kernels - SAMSUNG_LTE430WQ_F0C
Add enables to control the LCD panel. Look at a standard embedded LCD
configuration for examples (i.e. the SDP or EVM boards). The panel is design
so that you can have a single kernel that will let you select between an
external DVI connected monitor and the LCD board with software settings.

3. For the touch screen, configure it as a TSC2046. Both the EVM and SDP
boards use the same driver. The board uses McSPI4 as the interface.

General notes - due to Beagle specific changes, the default u-boot may require
configuration of additional variables so the system can behave as a proper
embedded system. i.e. defaultdisplay may have to be changed. It depends on
your paticular U-boot and the combination of nonstandard patches that may
have been applied.

LCD configuration is a function of the kernel and is agnostic to the
particular distribution (i.e. Angstrom, Ubuntu, etc).

Pin usage information:
GPIO144 - Backlight enable. This line is also the PWM output so the backlight
can be dimmed with software. Use the pinmux to select method desired.

GPIO 162 - LCD enable. This will let you disable the display for PM reasons.

GPIO 157 - This is the IRQ for the TSC. Set this up as an input.
McSPI4 is used as the TSC interface.

[Resending with an approved address]

What you will need to do is -

1. Use the information below and setup your pinmux using your favorite way.

2. Setup your kernel to use this as the driver. The timing is compatible with
the panel in most kernels - SAMSUNG_LTE430WQ_F0C
Add enables to control the LCD panel. Look at a standard embedded LCD
configuration for examples (i.e. the SDP or EVM boards). The panel is design
so that you can have a single kernel that will let you select between an
external DVI connected monitor and the LCD board with software settings.

3. For the touch screen, configure it as a TSC2046. Both the EVM and SDP
boards use the same driver. The board uses McSPI4 as the interface.

General notes - due to Beagle specific changes, the default u-boot may require
configuration of additional variables so the system can behave as a proper
embedded system. i.e. defaultdisplay may have to be changed. It depends on
your paticular U-boot and the combination of nonstandard patches that may
have been applied.

LCD configuration is a function of the kernel and is agnostic to the
particular distribution (i.e. Angstrom, Ubuntu, etc).

Pin usage information:
GPIO144 - Backlight enable. This line is also the PWM output so the backlight
can be dimmed with software. Use the pinmux to select method desired.

GPIO 162 - LCD enable. This will let you disable the display for PM reasons.

GPIO 157 - This is the IRQ for the TSC. Set this up as an input.
McSPI4 is used as the TSC interface.

I'll give that a shot, thanks.

Hello,
this may be a dumb question but where to i apply the changes for the
kernel?

1. Type "make menuconfig" cmd in your linux kernel directory

2. Enable the items that described befor.
   For example :
                PANEL_SAMSUNG_LTE430WQ_FOC = y

3. But it's not enough, you also need to do many porting for the LCD
module.

We're using a TSC2046 in our design here. We've made the appropriate changes to the SPI device and interrupt pin settings and the touchscreen input is working great.

The TSC2046 also has the ability to read the battery voltage that is connected to it. Since the chip is communicated to through the touchscreen driver, how do get the battery voltage info from the chip? Is this something we can do through tslib? Or do we have to communicate with the chip directly? If so, how?

-Stevo Brock

Hi Stevo!

can you publish necessary changes to SPI etc because I have the same task and my T/S does not work. When Angstrom starts touchscreen calibration utility is run and when I press on the screen nothing happens. Please help

regards,
Max

2010/7/9 Stevo Brock <stevo@sunsetmagicwerks.com>

Hi

I tried to operate the TSC2046 with the TS SAMSUNG LTE430WQ on beagleboard ver. C4 with no results. I configured the 0xdroid kernel and I compiled a new version of u-boot from git://gitorious.org/beagleboard-validation/u-boot.git modifying the pinmux in omap3-beagle.h. Any information on operating McSPI4 for the TSC2064 is warmly welcomed. I have too the expansion board of hy-research.

Anticipate thanks

Dorian Barladeanu

Hi Dorian,

We operate the Touchscreen currently on SPI3.1 and the interrupt is wired to Expansion Connector Pin 5. Here are the settings that are working:

From U-Boot:

MUX_VAL(CP(MMC2_CLK), (IEN | PTU | EN | M1)) /McSPI3_CLK/
MUX_VAL(CP(MMC2_CMD), (IDIS | PTD | EN | M1)) /McSPI3_SIMO/
MUX_VAL(CP(MMC2_DAT0), (IEN | PTU | EN | M1)) /McSPI3_SOMI/
MUX_VAL(CP(MMC2_DAT2), (IDIS | PTD | EN | M1)) /McSPI3_CS1 Touchscreen/
MUX_VAL(CP(MMC2_DAT3), (IDIS | PTD | EN | M1)) /McSPI3_CS0 LCD/\

From board-omap3beagle.c:

#define OMAP3_BEAGLE_TS_GPIO 138

struct ads7846_platform_data ads7846_config = {
.x_max = 0x0fff,
.y_max = 0x0fff,
// .x_plate_ohms = 180,
// .pressure_max = 255,
.debounce_max = 10,
.debounce_tol = 5,
.debounce_rep = 1,
.get_pendown_state = ads7846_get_pendown_state,
.keep_vref_on = 1,
.settle_delay_usecs = 150,
};

static struct omap2_mcspi_device_config ads7846_mcspi_config = {
.turbo_mode = 0,
.single_channel = 1, /* 0: slave, 1: master */
};

struct spi_board_info omap3beagle_spi_board_info[] = {
[0] = {
.modalias = “ads7846”,
.bus_num = 3,
.chip_select = 1,
.max_speed_hz = 1500000,
.controller_data = &ads7846_mcspi_config,
.irq = OMAP_GPIO_IRQ(OMAP3_BEAGLE_TS_GPIO),
.platform_data = &ads7846_config,
},

Hope this helps!

-Stevo

Thanks for your prompt answer.

I have an expansion board of hy-research that connects SPI4 to TSC2064
and GPIO157 as interrupt OMAP3_BEAGLE_TS_GPIO . I tried to adapt your
settings to my files in u-boot /board/ti/beagle/beagle.h and also in
kernel /arch/arm/mach-omap2/ board-omap3beagle.c but with no results.
It seems that my expansion board is different because , from the TSC2064
data sheet the CS must be active low - its setting to be (IDIS | PTU |
EN | M1)) . The changes I made on u-boot I verified on scope as steady
signals. It seems that the kernel doesn't operate the SPI bus. If you
need more details on my settings I can send to you.

Dorian Barladeanu

Hi Dorian,

I’m just getting my feet wet in this area myself. Yes, your UBoot settings make more sense.

Further on in the process, whoever does the actual SPI communications specifies the polarity of the CS signals and the SPI driver takes over controlling the CS lines. It’s my understanding that at best these are initial settings.

It appears that the way the TS works is that when you press the physical screen, the TSC2046 signals on the GPIO line. The ADS7846 driver then initiates SPI communication to retrieve the values. Also make sure you don’t have any other SPI device defined for that SPI connection.

Then you have to make sure you have the right TS options enabled in your kernel.

Once we got everything configured properly, it “just worked”.

-Stevo

Hi Stevo

I succeeded to operate the touch screen by changing the kernel file
/arch/arm/mach-omap2/ board-omap3beagle.c as in the board-devkit8000.c
with all the adaptations (from SPI2 to SPI4). Still is not 100%. There
are problems with the coordinates and with the physical touch. I hope to
solve this by changing the ads7846_config parameters.

Dorian

Hi Guys,

I am trying to get Angstrom working with Hy-Research LCD as well. My
board is rev C4.
So far I have setup OE and built Angstrom console-image successfully.
Now I am trying to apply necessary changes to kernel and u-boot.
This is what I have done so far:

1. enabled pinmux configuration by kernel in kernel configuration
file
        CONFIG_OMAP_MUX = y
2. add these lines to board-omap3beagle.c:
/*IRQ pin*/
OMAP3_MUX(MCBSP1_FSR, OMAP_MUX_MODE4 | OMAP_PIN_INPUT ),
/*LCD backlight enable*/
OMAP3_MUX(UART2_CTS, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT | OMAP_PULL_ENA

OMAP_PULL_UP ),

/*LCD enable*/
OMAP3_MUX(MCBSP1_CLKX, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT |
OMAP_PULL_ENA | OMAP_PULL_UP),

3. enabled Samgung LCD in make menucongig
4. enabled the touch screen driver for ADS7846/TSC2064 in make
menuconfig
5. I have pasted the following lines in board-omap3beagle.c
#define OMAP3_BEAGLE_TS_GPIO 157

struct ads7846_platform_data ads7846_config = {
    .x_max = 0x0fff,
    .y_max = 0x0fff,
// .x_plate_ohms = 180,
// .pressure_max = 255,
    .debounce_max = 10,
    .debounce_tol = 5,
    .debounce_rep = 1,
    .get_pendown_state = ads7846_get_pendown_state,
    .keep_vref_on = 1,
    .settle_delay_usecs = 150,
};

static struct omap2_mcspi_device_config ads7846_mcspi_config = {
        .turbo_mode = 0,
        .single_channel = 1, /* 0: slave, 1: master */
};

static struct spi_board_info omap3beagle_spi_board_info[] = {
    [0] = {
        .modalias = "ads7846",
        .bus_num = 4,
        .chip_select = 1,
        .max_speed_hz = 1500000,
        .controller_data = &ads7846_mcspi_config,
        .irq = OMAP_GPIO_IRQ(OMAP3_BEAGLE_TS_GPIO),
        .platform_data = &ads7846_config,
    }
};

My questions are:

1. Is there any difference in setting the pinmux in kernel as opposed
to setting it in u-boot?
2. does bitbake build my modified source files? or does it pull the
source from the Internet? if not, how do I make it build my custom
sources?
3. Why does bitbake take sooo long? is there any way to make it work
faster?
4. I am on the right track? or I am missing something important?

I got the LCD to turn on, and now it shows a flickering and distorted
Linux console (almost unrecognizable).
I have tried to play with the timing variables of the Samsung driver
with no luck.
Has anybody experienced the same problem?
I am not sure whether this is timing problem or something else.
Any input is appreciated.

Thanks,
Siavash

Hi

I have been able to turn on the LCD.
It shows a very distorted and flickering image of Linux console.
I tried playing with the timing of the samsung driver with no luck.
Has any body had the same problem?
Has any body been able to get the LCD to work?
Any input is appreciated.

Thanks,
Siavash

Were you able to make progress on this? Did the kernel mux config
work out?

Hi guys,

So did anyone succeed in configuring the BeagleBoard to interface with
hy-research Expansionboard (LCD Touch screen)? Would you please share
your way of configuring it? Many many thanks!

I'm having problems in configuring it as well... :frowning:

Best Regards,
Bryan