2008-11-25 10:54:33     [AD7879 driver] Probe Fail.

Document created by Aaronwu Employee on Aug 8, 2013
Version 1Show Document
  • View in full screen mode

2008-11-25 10:54:33     [AD7879 driver] Probe Fail.

V Hemanth Kumar (INDIA)

Message: 65791   

 

Hi,

 

My target board is BF527 EZKit & I have connected the LCD EZ Extender board (which has AD7879 Touch Screen Controller) to the PPI stamp connector.

 

I downloaded the AD7879 driver files (ad7879.c & .h) from the svn trunk, included these files in the latest "uClinux-dist-2008R1.5-RC3" distribution & changed the ../../mach-bf527/ezkit.c to incorporate AD7879 related information.

 

The AD7879 on LCD EZ Extender connects its Chip Select to SPI SEL3 (PF13 of BF527) so I have made .chip_select = 3 and PENIRQ# to PF8 (PF8 of BF527) so .irq=IRQ_PF8 in ezkit.c

 

With these changes, I built the disbtribution and tried booting the uclinux, but the probe fails. The message is "spi0.3: Failed to probe AD7879 Touchscreen". I have tried with AD7879 SPI driver built along the kernel and also as module but the result is same, probe fails.

 

Have any one tested this driver with similar kind of setup?

 

Can any one help me in getting this driver work.

 

Regards,

 

Hemanth

 

 

QuoteReplyEditDelete

 

 

2008-11-25 11:11:58     Re: [AD7879 driver] Probe Fail.

Michael Hennerich (GERMANY)

Message: 65793   

 

Did you populate the STAMP_ENABLE jumper JP3 on the EZKIT?

 

If this doesn't help - please post your entire jumper config on the LCD EZ Externder

 

-Michael

QuoteReplyEditDelete

 

 

2008-11-26 03:50:18     Re: [AD7879 driver] Probe Fail.

V Hemanth Kumar (INDIA)

Message: 65822   

 

Hi, thanks for the reply.

 

Yes I have populated the STAMP_ENABLE jumper JP3 on the EZKIT.

 

The jumper config on the LCD EZ Extender are:-

 

JP1 : No jumper Installed

 

JP2 : 1, 2

 

JP3 : 3, 4

 

JP5:  1, 2

 

JP6:  No jumper Installed

 

JP7: No jumper Installed

 

JP8: No jumper Installed

 

JP9: Jumper Installed

 

JP10: 1, 2

 

JP11: 3, 4

 

jp12: No jumper Installed

 

jp13: 1, 2

 

 

 

Regards,

 

Hemanth.V

 

 

QuoteReplyEditDelete

 

 

2008-11-26 10:23:17     Re: [AD7879 driver] Probe Fail.

V Hemanth Kumar (INDIA)

Message: 65854   

 

Even with the STAMP_ENABLE jumper JP3 installed the result is same i.e probe fails.

QuoteReplyEditDelete

 

 

2008-11-26 10:45:56     Re: [AD7879 driver] Probe Fail.

Michael Hennerich (GERMANY)

Message: 65855   

 

Hang on - I'll give things a try tomorrow

 

I will post some documentation here:

 

http://docs.blackfin.uclinux.org/doku.php?id=hw:cards:landscape_lcd_ez-extender

 

-Michael

 

 

QuoteReplyEditDelete

 

 

2008-11-27 04:59:08     Re: [AD7879 driver] Probe Fail.

Michael Hennerich (GERMANY)

Message: 65901   

 

Works for me without problems.

 

Index: arch/blackfin/mach-bf527/boards/ezkit.c

===================================================================

--- arch/blackfin/mach-bf527/boards/ezkit.c (revision 5758)

+++ arch/blackfin/mach-bf527/boards/ezkit.c (working copy)

@@ -541,6 +541,30 @@

};

#endif

 

+#if defined(CONFIG_TOUCHSCREEN_AD7879) || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE)

+#include <linux/spi/ad7879.h>

+static const struct ad7879_platform_data bfin_ad7879_ts_info = {

+ .model = 7879, /* Model = AD7879 */

+ .x_plate_ohms = 620, /* 620 Ohm from the touch datasheet */

+ .pressure_max = 10000,

+ .pressure_min = 0,

+ .first_conversion_delay = 3, /* wait 512us before do a first conversion */

+ .acquisition_time = 1, /* 4us acquisition time per sample */

+ .median = 2, /* do 8 measurements */

+ .averaging = 1, /* take the average of 4 middle samples */

+ .pen_down_acc_interval = 255, /* 9.4 ms */

+ .gpio_output = 1, /* configure AUX/VBAT/GPIO as GPIO output */

+ .gpio_default = 1, /* During initialization set GPIO = HIGH */

+};

+#endif

+

+#if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE)

+static struct bfin5xx_spi_chip spi_ad7879_chip_info = {

+ .enable_dma = 0,

+ .bits_per_word = 16,

+};

+#endif

+

#if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \

&& defined(CONFIG_SND_SOC_WM8731_SPI)

static struct bfin5xx_spi_chip spi_wm8731_chip_info = {

@@ -651,6 +675,18 @@

.controller_data = &spi_ad7877_chip_info,

},

#endif

+#if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE)

+ {

+ .modalias = "ad7879",

+ .platform_data = &bfin_ad7879_ts_info,

+ .irq = IRQ_PF8,

+ .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */

+ .bus_num = 0,

+ .chip_select = 3,

+ .controller_data = &spi_ad7879_chip_info,

+ .mode = SPI_CPHA | SPI_CPOL,

+ },

+#endif

#if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \

&& defined(CONFIG_SND_SOC_WM8731_SPI)

{

 

 

Linux version 2.6.28-rc2-ADI-2009R1-pre-svn5758 (michael@mhenneri-D02) (gcc version 4.1.2 (ADI svn)) #8931 Thu Nov 27 10:43:12 CET 2008

console [early_BFuart0] enabled

early printk enabled on early_BFuart0

Board Memory: 64MB

Kernel Managed Memory: 64MB

Memory map:

fixedcode = 0x00000400-0x00000490

text = 0x00001000-0x00134ae0

rodata = 0x00134ae0-0x00193550

bss = 0x00193550-0x001a72b4

data = 0x001a72b4-0x001bc000

stack = 0x001ba000-0x001bc000

init = 0x001bc000-0x006f6000

available = 0x006f6000-0x03eff000

DMA Zone = 0x03f00000-0x04000000

Hardware Trace Active and Enabled

Blackfin support (C) 2004-2008 Analog Devices, Inc.

Compiled for ADSP-BF527 Rev 0.0

ERROR: Not running on ADSP-BF527: unknown CPUID 0x27e0 Rev 0.0

Blackfin Linux support by http://blackfin.uclinux.org/

Processor Speed: 525 MHz core clock and 131 MHz System Clock

NOMPU: setting up cplb tables for global access

Instruction Cache Enabled for CPU0

Data Cache Enabled for CPU0 (write-through)

Built 1 zonelists in Zone order, mobility grouping off. Total pages: 16001

Kernel command line: root=/dev/mtdblock0 rw earlyprintk=serial,uart1,57600 console=tty0 console=ttyBF0,57600 ip=10.44.2.45:10.44.2.88:192.168.0.1:255.255.255.0:1:eth0:off

Configuring Blackfin Priority Driven Interrupts

PID hash table entries: 256 (order: 8, 1024 bytes)

Console: colour dummy device 80x25

console [tty0] enabled

console handover: boot [early_BFuart0] -> real [ttyBF0]

Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)

Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)

Memory available: 56796k/65536k RAM, (5352k init code, 1230k kernel code, 542k data, 1024k dma, 588k reserved)

Calibrating delay loop... 1044.48 BogoMIPS (lpj=2088960)

Security Framework initialized

Mount-cache hash table entries: 512

Blackfin Scratchpad data SRAM: 4 KB

Blackfin L1 Data A SRAM: 16 KB (15 KB free)

Blackfin L1 Data B SRAM: 16 KB (16 KB free)

Blackfin L1 Instruction SRAM: 48 KB (42 KB free)

PDA for CPU0 reserved at 00194588

net_namespace: 288 bytes

NET: Registered protocol family 16

Blackfin GPIO Controller

Blackfin DMA Controller

stamp_init(): registering device resources

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

musb_hdrc: version 6.0, pio, host, debug=0

musb_hdrc: USB Host mode controller at ffc03800 using PIO, IRQ 59

musb_hdrc musb_hdrc.0: MUSB HDRC host driver

musb_hdrc musb_hdrc.0: new USB bus registered, assigned bus number 1

usb usb1: configuration #1 chosen from 1 choice

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 1 port detected

NET: Registered protocol family 2

IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

TCP established hash table entries: 2048 (order: 2, 16384 bytes)

TCP bind hash table entries: 2048 (order: 1, 8192 bytes)

TCP: Hash tables configured (established 2048 bind 2048)

TCP reno registered

NET: Registered protocol family 1

msgmni has been set to 110

io scheduler noop registered

io scheduler anticipatory registered (default)

io scheduler cfq registered

bfin-t350mcqb: 320x240 24-bit RGB FrameBuffer initializing...

dma_alloc_init: dma_page @ 0x03b87000 - 256 pages at 0x03f00000

Console: switching to colour frame buffer device 40x30

bfin-otp: initialized

Serial: Blackfin serial driver

bfin-uart.1: ttyBF0 at MMIO 0xffc02000 (irq = 31) is a BFIN-UART

brd: module loaded

bfin_mac_mdio: probed

bfin_mac: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:01, irq=-1, mdc_clk=2500000Hz(mdc_div=25)@sclk=131MHz)

bfin_mac bfin_mac.0: Blackfin on-chip Ethernet MAC driver, Version 1.1

m25p80 spi0.1: m25p16 (2048 Kbytes)

Creating 2 MTD partitions on "m25p80":

0x00000000-0x00040000 : "bootloader(spi)"

0x00040000-0x00200000 : "linux kernel(spi)"

bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@7

input: AD7879 Touchscreen as /class/input/input0

ad7879 spi0.3: Rev.3 touchscreen, irq 79

rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0

bfin-wdt: initialized: timeout=20 sec (nowayout=0)

usbcore: registered new interface driver usbhid

usbhid: v2.6:USB HID core driver

TCP cubic registered

NET: Registered protocol family 17

rtc-bfin rtc-bfin: setting system clock to 1970-01-07 00:29:51 UTC (520191)

IP-Config: Gateway not on directly connected network.

Freeing unused kernel memory: 5352k freed

_____________________________________

a8888b. / Welcome to the uClinux distribution \

d888888b. / _ _ \

8P"YP"Y88 / | | |_| __ __ (TM) |

8|o||o|88 _____/ | | _ ____ _ _ \ \/ / |

8' .88 \ | | | | _ \| | | | \ / |

8`._.' Y8. \ | |__ | | | | | |_| | / \ |

d/ `8b. \ \____||_|_| |_|\____|/_/\_\ |

dP . Y8b. \ For embedded processors including |

d8:' " `::88b \ the Analog Devices Blackfin /

d8" 'Y88b \___________________________________/

:8P ' :888

8a. : _a88P For further information, check out:

._/"Yaa_: .| 88P| - http://blackfin.uclinux.org/

\ YP" `| 8P `. - http://docs.blackfin.uclinux.org/

/ \.___.d| .' - http://www.uclinux.org/

`--..__)8888P`._.' jgs/a:f - http://www.analog.com/blackfin

 

Have a lot of fun...

 

 

BusyBox v1.12.2 (2008-11-27 10:31:13 CET) built-in shell (msh)

Enter 'help' for a list of built-in commands.

 

root:/> PHY: 0:01 - Link is Up - 100/Full

 

root:/> event_test /dev/input/event0

Input driver version is 1.0.0

Input device ID: bus 0x0 vendor 0x0 product 0x0 version 0x0

Input device name: "AD7879 Touchscreen"

Supported events:

Event type 0 (Reset)

Event code 0 (Reset)

Event code 3 (Absolute)

Event type 3 (Absolute)

Event code 0 (X)

Value 0

Min 0

Max 4095

Event code 1 (Y)

Value 0

Min 0

Max 4095

Event code 24 (Pressure)

Value 0

Min 0

Max 10000

Testing ... (interrupt to exit)

Event: time 520203.740000, type 3 (Absolute), code 0 (X), value 2594

Event: time 520203.740000, type 3 (Absolute), code 1 (Y), value 663

Event: time 520203.740000, type 3 (Absolute), code 24 (Pressure), value 507

Event: time 520203.740000, type 0 (Reset), code 0 (Reset), value 0

Event: time 520203.752000, type 3 (Absolute), code 0 (X), value 2598

Event: time 520203.752000, type 3 (Absolute), code 1 (Y), value 667

Event: time 520203.752000, type 3 (Absolute), code 24 (Pressure), value 328

Event: time 520203.752000, type 0 (Reset), code 0 (Reset), value 0

Event: time 520203.768000, type 3 (Absolute), code 0 (X), value 2600

Event: time 520203.768000, type 3 (Absolute), code 1 (Y), value 668

Event: time 520203.768000, type 3 (Absolute), code 24 (Pressure), value 303

Event: time 520203.768000, type 0 (Reset), code 0 (Reset), value 0

Event: time 520203.780000, type 3 (Absolute), code 24 (Pressure), value 292

Event: time 520203.780000, type 0 (Reset), code 0 (Reset), value 0

Event: time 520203.792000, type 3 (Absolute), code 0 (X), value 2599

Event: time 520203.792000, type 3 (Absolute), code 1 (Y), value 669

Event: time 520203.792000, type 3 (Absolute), code 24 (Pressure), value 293

Event: time 520203.792000, type 0 (Reset), code 0 (Reset), value 0

Event: time 520203.804000, type 3 (Absolute), code 0 (X), value 2598

Event: time 520203.804000, type 3 (Absolute), code 1 (Y), value 667

Event: time 520203.804000, type 3 (Absolute), code 24 (Pressure), value 294

Event: time 520203.804000, type 0 (Reset), code 0 (Reset), value 0

Event: time 520203.816000, type 3 (Absolute), code 0 (X), value 2596

Event: time 520203.816000, type 3 (Absolute), code 1 (Y), value 665

Event: time 520203.816000, type 3 (Absolute), code 24 (Pressure), value 292

Event: time 520203.816000, type 0 (Reset), code 0 (Reset), value 0

Event: time 520203.828000, type 3 (Absolute), code 0 (X), value 2594

Event: time 520203.828000, type 3 (Absolute), code 1 (Y), value 661

Event: time 520203.828000, type 3 (Absolute), code 24 (Pressure), value 282

Event: time 520203.828000, type 0 (Reset), code 0 (Reset), value 0

Event: time 520203.840000, type 3 (Absolute), code 0 (X), value 2593

Event: time 520203.840000, type 3 (Absolute), code 1 (Y), value 659

Event: time 520203.840000, type 3 (Absolute), code 24 (Pressure), value 279

Event: time 520203.840000, type 0 (Reset), code 0 (Reset), value 0

Event: time 520203.852000, type 3 (Absolute), code 0 (X), value 2594

Event: time 520203.852000, type 3 (Absolute), code 24 (Pressure), value 272

Event: time 520203.852000, type 0 (Reset), code 0 (Reset), value 0

Event: time 520203.868000, type 3 (Absolute), code 0 (X), value 2593

Event: time 520203.868000, type 3 (Absolute), code 1 (Y), value 660

Event: time 520203.868000, type 3 (Absolute), code 24 (Pressure), value 262

Event: time 520203.868000, type 0 (Reset), code 0 (Reset), value 0

Event: time 520203.880000, type 3 (Absolute), code 0 (X), value 2594

Event: time 520203.880000, type 3 (Absolute), code 24 (Pressure), value 257

Event: time 520203.880000, type 0 (Reset), code 0 (Reset), value 0

Event: time 520203.892000, type 3 (Absolute), code 0 (X), value 2593

Event: time 520203.892000, type 3 (Absolute), code 24 (Pressure), value 251

Event: time 520203.892000, type 0 (Reset), code 0 (Reset), value 0

Event: time 520203.904000, type 3 (Absolute), code 1 (Y), value 659

Event: time 520203.904000, type 3 (Absolute), code 24 (Pressure), value 248

Event: time 520203.904000, type 0 (Reset), code 0 (Reset), value 0

Event: time 520203.916000, type 3 (Absolute), code 1 (Y), value 660

Event: time 520203.916000, type 3 (Absolute), code 24 (Pressure), value 247

Event: time 520203.916000, type 0 (Reset), code 0 (Reset), value 0

Event: time 520203.928000, type 3 (Absolute), code 0 (X), value 2594

Event: time 520203.928000, type 3 (Absolute), code 1 (Y), value 661

Event: time 520203.928000, type 3 (Absolute), code 24 (Pressure), value 242

Event: time 520203.928000, type 0 (Reset), code 0 (Reset), value 0

Event: time 520203.940000, type 3 (Absolute), code 0 (X), value 2593

Event: time 520203.940000, type 3 (Absolute), code 24 (Pressure), value 239

Event: time 520203.940000, type 0 (Reset), code 0 (Reset), value 0

Event: time 520203.956000, type 3 (Absolute), code 0 (X), value 2594

Event: time 520203.956000, type 0 (Reset), code 0 (Reset), value 0

Event: time 520203.968000, type 3 (Absolute), code 0 (X), value 2593

Event: time 520203.968000, type 0 (Reset), code 0 (Reset), value 0

Event: time 520203.980000, type 3 (Absolute), code 0 (X), value 2592

Event: time 520203.980000, type 3 (Absolute), code 24 (Pressure), value 241

Event: time 520203.980000, type 0 (Reset), code 0 (Reset), value 0

Event: time 520203.992000, type 3 (Absolute), code 0 (X), value 2594

Event: time 520203.992000, type 3 (Absolute), code 1 (Y), value 660

Event: time 520203.992000, type 3 (Absolute), code 24 (Pressure), value 240

Event: time 520203.992000, type 0 (Reset), code 0 (Reset), value 0

Event: time 520204.004000, type 3 (Absolute), code 0 (X), value 2593

Event: time 520204.004000, type 3 (Absolute), code 1 (Y), value 659

Event: time 520204.004000, type 3 (Absolute), code 24 (Pressure), value 237

Event: time 520204.004000, type 0 (Reset), code 0 (Reset), value 0

Event: time 520204.304000, type 3 (Absolute), code 1 (Y), value 661

Event: time 520204.304000, type 3 (Absolute), code 24 (Pressure), value 217

Event: time 520204.304000, type 0 (Reset), code 0 (Reset), value 0

Event: time 520204.316000, type 3 (Absolute), code 0 (X), value 2594

Event: time 520204.316000, type 3 (Absolute), code 1 (Y), value 662

Event: time 520204.316000, type 3 (Absolute), code 24 (Pressure), value 222

Event: time 520204.316000, type 0 (Reset), code 0 (Reset), value 0

Event: time 520204.332000, type 3 (Absolute), code 0 (X), value 2595

Event: time 520204.332000, type 3 (Absolute), code 1 (Y), value 661

Event: time 520204.332000, type 3 (Absolute), code 24 (Pressure), value 239

Event: time 520204.332000, type 0 (Reset), code 0 (Reset), value 0

Event: time 520204.344000, type 3 (Absolute), code 0 (X), value 2596

Event: time 520204.344000, type 3 (Absolute), code 1 (Y), value 658

Event: time 520204.344000, type 3 (Absolute), code 24 (Pressure), value 295

Event: time 520204.344000, type 0 (Reset), code 0 (Reset), value 0

Event: time 520204.396000, type 3 (Absolute), code 24 (Pressure), value 0

Event: time 520204.396000, type 0 (Reset), code 0 (Reset), value 0

 

QuoteReplyEditDelete

 

 

2008-11-27 05:01:43     Re: [AD7879 driver] Probe Fail.

Michael Hennerich (GERMANY)

Message: 65902   

 

Make sure BF527-EZKIT Switch SW11-1 is OFF

 

-Michael

QuoteReplyEditDelete

 

 

2008-11-27 08:33:26     Re: [AD7879 driver] Probe Fail.

V Hemanth Kumar (INDIA)

Message: 65908   

 

Hi,

 

Thanks for the valuable information.

 

Earlier with SW11.1 ON the driver was not working.

 

After seeing your reply I made the SW11.1 OFF the driver worked. (Thanks a lot for pointing out this key information.)

 

But the strange thing is, now even with SW11.1 ON the driver is working fine. Some Magic:)

 

Anyways the driver is working fine.

 

What is SW11.1 all about? I checked the 527 EZKIT manual it does not have much information on SW11.1 switch.

 

Regards,

 

Hemanth.V

 

 

QuoteReplyEditDelete

 

 

2008-11-27 08:59:32     Re: [AD7879 driver] Probe Fail.

Michael Hennerich (GERMANY)

Message: 65909   

 

SW11.1 disconnects the Rotary from SPI_SSEL3.

 

Depending on the position of the Rotary things may work or fail - or just sometimes.

 

-Michael

QuoteReplyEditDelete

 

 

2008-11-27 09:30:01     Re: [AD7879 driver] Probe Fail.

V Hemanth Kumar (INDIA)

Message: 65911   

 

Thanks for your valuable time & detailed explaination Michael.

 

Regards,

Hemanth.V

Attachments

    Outcomes