<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:'times new roman', 'new york', times, serif;font-size:14pt"><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="3"><span class="Apple-style-span" style="font-size: 13px;"><font class="Apple-style-span" face="'times new roman', 'new york', times, serif" size="6"><span class="Apple-style-span" style="font-size: 19px;">Hi</span></font></span></font></div><div><br></div><div>I am using Xilinx Virtex4 Powerpc. I am trying to interface with ADS7846 SPI touch screen controller. This is connected to the Xilinx SPI. The CS is connected to a GPIO & PEN_IRQ is connected to different GPIO.</div><div><br></div><div>My DTS is</div><div> </div><div> //Chip Select</div><div><div> SPI_CS:
gpio@81400000 {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>compatible = "xlnx,xps-gpio-1.00.a";</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>reg = < 0x81400000 0x10000 >;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>xlnx,all-inputs = <0x0>;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>xlnx,all-inputs-2 = <0x0>;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>xlnx,dout-default = <0x0>;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>xlnx,dout-default-2 = <0x0>;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>xlnx,family = "virtex4";</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>xlnx,gpio-width = <0x4>;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>xlnx,interrupt-present =
<0x0>;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>xlnx,is-bidir = <0x1>;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>xlnx,is-bidir-2 = <0x1>;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>xlnx,is-dual = <0x0>;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>xlnx,tri-default = <0xffffffff>;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>xlnx,tri-default-2 = <0xffffffff>;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>} ;</div><div><br></div><div> //Touch Screen (ADS7846) pen irq</div><div> </div><div> ts_pen_irq: gpio@81c00000 {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>compatible =
"xlnx,xps-gpio-1.00.a";</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>interrupt-parent = <&xps_intc_0>;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>interrupts = < 0 2 >;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>reg = < 0x81c00000 0x10000 >;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>xlnx,all-inputs = <0x1>;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>xlnx,all-inputs-2 = <0x0>;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>xlnx,dout-default = <0x0>;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>xlnx,dout-default-2 = <0x0>;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>xlnx,family = "virtex4";</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>xlnx,gpio-width =
<0x1>;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>xlnx,interrupt-present = <0x1>;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>xlnx,is-bidir = <0x1>;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>xlnx,is-bidir-2 = <0x1>;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>xlnx,is-dual = <0x0>;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>xlnx,tri-default = <0xffffffff>;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>xlnx,tri-default-2 = <0xffffffff>;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>} ;</div><div> </div><div> // This is SPI</div><div> xps_spi_ts: xps-spi@42400000
{</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>compatible = "xlnx,xps-spi-2.00.b", "xlnx,xps-spi-2.00.a";</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>reg = < 0x42400000 0x200 >;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>xlnx,family = "virtex4";</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>xlnx,fifo-exist = <0x0>;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>xlnx,num-ss-bits = <0x1>;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>xlnx,num-transfer-bits = <0x8>;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>xlnx,sck-ratio = <0xd0>;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>} ;</div><div><br></div><div> when I include the ADS7846 info in virtex.c file, the ADS7846
is detected & I could see at /dev/input/event0. But I do not know how to call or access the particluat GPIO in virtex.c file for Chipselect & for Irq.</div><div><br></div><div> Please let me know how to do this</div><div><br></div><div> </div><div> </div><div> </div><div><br></div><div><br></div><div><br></div></div><div style="position:fixed"></div>
<!-- cg13.c4.mail.gq1.yahoo.com compressed/chunked Wed Dec 9 00:51:07 PST 2009 -->
</div><br>
</body></html>