2008-12-16 08:36:10 [AD7879 driver] probe fails on BF526 ez board
V Hemanth Kumar (INDIA)
Message: 66757
Hi,
I am using BF526 ez board with LCD EZ extender on it.
VDSP Diagnostics: -
I have written a VDSP diagnostics to test the AD7879 on the LCD EZ extender.
This diagnostic code works fine if the SW12 - 1, 2 & 4 are OFF (Ethernet disabled).
If SW12 - 1, 2 & 4 are ON (Ethernet enabled) then the AD7879 does not respond, I receive 0xff for any command sent over SPI.
The jumper settings on LCD EZ extender are : -
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
What could be the problem or is this a known issue on BF526 ez board?
AD7879 Linux driver: -
I built the SVN distribution for BF526 along with the AD7879 driver. The SPI configuration is .chip_select=4 and .irq=IRQ_PG0 in ezbrd.c. Also I disabled the "Device Drivers->Network device support" in the distribution.
Since SW12 - 1,2&4 are OFF (ethernet disabled) I used the hyperterminal to download the uImage.
After downloading and booting, the probe fails. The message is: -
"ad7879 spi0.4: Failed to probe AD7879 Touchscreen".
I have tried with SW12 - 1, 2&4 ON (ethernet enabled) & including the "Device Drivers->Network device support" in the distribution, but same result, probe fails.
Any idea on this issue, am I missing any thing here?
~Hemanth
QuoteReplyEditDelete
2008-12-16 16:28:49 Re: [AD7879 driver] probe fails on BF526 ez board
Robin Getz (UNITED STATES)
Message: 66770
VDSP questions are not answered here. Try http://forms.analog.com/Form_Pages/support/dsp/dspSupport.asp
As for the 7879 Linux question - I think Michael has the board working. (I don't have one).
-Robin
QuoteReplyEditDelete
2008-12-16 16:37:39 Re: [AD7879 driver] probe fails on BF526 ez board
Michael Hennerich (GERMANY)
Message: 66771
Will add the default config to the bf526 platform device setup shortly.
Without looking at it in detail - But your jumper board setup is likely not going to match the SW setup.
-Michael
QuoteReplyEditDelete
2008-12-17 00:18:46 Re: [AD7879 driver] probe fails on BF526 ez board
V Hemanth Kumar (INDIA)
Message: 66778
Thanks for the reply Robin and Michael.
Michael:
When you tested the AD7879 linux driver on BF526 ez board, could you use the ethernet (either tftp or ftp)?
This will clarify my doubt that, SW12 - 1, 2 & 4 settings does not affect the working of AD7879.
~ Hemanth
QuoteReplyEditDelete
2008-12-17 03:45:45 Re: [AD7879 driver] probe fails on BF526 ez board
V Hemanth Kumar (INDIA)
Message: 66788
Hi Michael,
The ad7879 linux driver is working fine! but only if SW12 - 1, 2 & 4 is OFF (SW12 - 3 ON).
The driver does not work if the SW12 - 1, 2 & 4 is ON (SW12 - 3 OFF).
I have attached two logs for your reference along with this email.
Please find the same & confirm if I am doing some thing wrong.
~Hemanth
ad7879_log_probe_success.txt
ad7879_log_probe_fail.txt
QuoteReplyEditDelete
2008-12-17 04:52:32 Re: [AD7879 driver] probe fails on BF526 ez board
Michael Hennerich (GERMANY)
Message: 66800
Hemanth,
SPISEL4 is a bad choice - since this pin is MMI/RMMI ERXD1.
Please select a different SPISEL for the AD7879 - then you will be able to use Ethernet and the Display + AD7879 simultaneously.
-Michael
QuoteReplyEditDelete
2008-12-17 05:19:38 Re: [AD7879 driver] probe fails on BF526 ez board
Michael Hennerich (GERMANY)
Message: 66801
Try this ..
I also added some notes here:
http://docs.blackfin.uclinux.org/doku.php?id=hw:cards:landscape_lcd_ez-extender
-Michael
Index: ezbrd.c
===================================================================
--- ezbrd.c (revision 5864)
+++ ezbrd.c (working copy)
@@ -288,6 +288,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 = {
@@ -386,6 +410,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_PG0,
+ .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */
+ .bus_num = 0,
+ .chip_select = 5,
+ .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)
{
QuoteReplyEditDelete
2008-12-17 07:05:01 Re: [AD7879 driver] probe fails on BF526 ez board
V Hemanth Kumar (INDIA)
Message: 66806
Thanks for the reply.
I feel you are correct SPISEL4 is multiplexed with Ethernet functionality.
I will test with different chip select and get back to you.
But any ways this is a short come, we would not be able to use SPISEL4 if Ethernet functionality is enabled for ever, right?
~Hemanth
QuoteReplyEditDelete
2008-12-17 09:00:06 Re: [AD7879 driver] probe fails on BF526 ez board
V Hemanth Kumar (INDIA)
Message: 66810
By changing the chip select from SPISEL4 to SPISEL5 the driver works fine.
Thanks for the help.
~Hemanth