From: David Brownell <david-b@pacbell.net>
To: Tony Lindgren <tony@atomide.com>
Cc: Linux OMAP <linux-omap-open-source@linux.omap.com>
Subject: [patch 2.6.23-rc2-omap1] H4 support for tsc210x
Date: Mon, 13 Aug 2007 22:40:03 -0700 [thread overview]
Message-ID: <200708132240.03264.david-b@pacbell.net> (raw)
In-Reply-To: <20070813070512.GC13948@atomide.com>
H4 board support now lists its tsc210x touchscreen/sensor/codec chip.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
--- h4.orig/arch/arm/mach-omap2/board-h4.c 2007-08-13 12:32:12.000000000 -0700
+++ h4/arch/arm/mach-omap2/board-h4.c 2007-08-13 15:07:22.000000000 -0700
@@ -22,6 +22,8 @@
#include <linux/err.h>
#include <linux/clk.h>
#include <linux/i2c.h>
+#include <linux/spi/spi.h>
+#include <linux/spi/tsc210x.h>
#include <asm/hardware.h>
#include <asm/mach-types.h>
@@ -418,6 +420,33 @@ static struct omap_usb_config h4_usb_con
#endif
};
+/* ----------------------------------------------------------------------- */
+
+static struct tsc210x_config tsc_platform_data = {
+ .use_internal = 1,
+ .monitor = TSC_VBAT | TSC_TEMP,
+ /* REVISIT temp calibration data -- board-specific; from EEPROM? */
+ .mclk = "sys_clkout",
+};
+
+static struct spi_board_info h4_spi_board_info[] __initdata = {
+ {
+ .modalias = "tsc2101",
+ .bus_num = 1,
+ .chip_select = 0,
+ .mode = SPI_MODE_1,
+ .irq = OMAP_GPIO_IRQ(93),
+ .max_speed_hz = 16000000,
+ .platform_data = &tsc_platform_data,
+ },
+
+ /* nCS1 -- to lcd board, but unused
+ * nCS2 -- to WLAN/miniPCI
+ */
+};
+
+/* ----------------------------------------------------------------------- */
+
static struct omap_board_config_kernel h4_config[] __initdata = {
{ OMAP_TAG_UART, &h4_uart_config },
{ OMAP_TAG_MMC, &h4_mmc_config },
@@ -550,6 +579,28 @@ static void __init omap_h4_init(void)
tusb_evm_setup();
#endif
+ /* defaults seem ok for:
+ * omap_cfg_reg(U18_24XX_SPI1_SCK);
+ * omap_cfg_reg(V20_24XX_SPI1_MOSI);
+ * omap_cfg_reg(T18_24XX_SPI1_MISO);
+ * omap_cfg_reg(U19_24XX_SPI1_NCS0);
+ */
+
+ /* TSC2101 */
+ omap_cfg_reg(P20_24XX_GPIO93);
+ gpio_request(93, "tsc_irq");
+ gpio_direction_input(93);
+
+ omap_cfg_reg(W14_24XX_SYS_CLKOUT); /* mclk */
+ /* defaults seem ok for:
+ * omap_cfg_reg(Y15_EAC_AC_SCLK); // bclk
+ * omap_cfg_reg(R14_EAC_AC_FS);
+ * omap_cfg_reg(V15_EAC_AC_DOUT);
+ * omap_cfg_reg(W15_EAC_AC_DIN);
+ */
+
+ spi_register_board_info(h4_spi_board_info,
+ ARRAY_SIZE(h4_spi_board_info));
}
static int gpio_exp_init(void)
next prev parent reply other threads:[~2007-08-14 5:40 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-04 13:44 Common code for TSC 2101 and 2102 andrzej zaborowski
2007-07-13 6:46 ` Trilok Soni
2007-07-13 7:10 ` Trilok Soni
2007-07-13 19:29 ` andrzej zaborowski
2007-07-13 20:04 ` David Brownell
2007-08-10 7:29 ` Tony Lindgren
2007-08-11 3:04 ` David Brownell
2007-08-13 7:05 ` Tony Lindgren
2007-08-14 5:34 ` David Brownell
2007-09-23 22:37 ` andrzej zaborowski
2007-08-14 5:38 ` [patch 2.6.23-rc2-omap1] tsc210x cleanup David Brownell
2007-08-15 10:54 ` Tony Lindgren
2007-08-14 5:40 ` David Brownell [this message]
2007-08-14 6:45 ` [patch 2.6.23-rc2-omap1] H4 support for tsc210x David Brownell
2007-08-15 10:54 ` Tony Lindgren
2007-07-13 18:38 ` Common code for TSC 2101 and 2102 David Brownell
2007-07-15 20:18 ` David Brownell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200708132240.03264.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=linux-omap-open-source@linux.omap.com \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox