Permalink
Browse files

LVDS clock update, touchscreen TSC2007 support

1 parent 5f3f394 commit 96220aa58ae0bc943db341c81a7671698d88197d @martinmurin martinmurin committed Jul 31, 2014
@@ -1102,7 +1102,7 @@ CONFIG_TOUCHSCREEN_ELAN=y
# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
# CONFIG_TOUCHSCREEN_TSC2005 is not set
-# CONFIG_TOUCHSCREEN_TSC2007 is not set
+CONFIG_TOUCHSCREEN_TSC2007=y
# CONFIG_TOUCHSCREEN_W90X900 is not set
# CONFIG_TOUCHSCREEN_ST1232 is not set
# CONFIG_TOUCHSCREEN_P1003 is not set
@@ -31,6 +31,7 @@
#include <linux/spi/spi.h>
#include <linux/spi/flash.h>
#include <linux/i2c.h>
+#include <linux/i2c/tsc2007.h>
#include <linux/i2c/pca953x.h>
#include <linux/ata.h>
#include <linux/mtd/mtd.h>
@@ -119,7 +120,9 @@
#define SABRESD_USB_OTG_PWR IMX_GPIO_NR(3, 22)
#define SABRESD_USB_H1_PWR IMX_GPIO_NR(3, 31)
#define SABRESD_CHARGE_CHG_1_B IMX_GPIO_NR(3, 23)
-#define SABRESD_TS_INT IMX_GPIO_NR(3, 26)
+//!mm #define SABRESD_TS_INT IMX_GPIO_NR(3, 26)
+//!mm iMX6Rex touschreen interrupt TSC2007
+#define SABRESD_TS_INT IMX_GPIO_NR(6, 9)
#define SABRESD_DISP0_RD IMX_GPIO_NR(3, 28)
#define SABRESD_POWER_OFF IMX_GPIO_NR(3, 29)
@@ -140,8 +143,10 @@
#define SABRESD_DISP_PWR_EN IMX_GPIO_NR(6, 14)
#define SABRESD_CABC_EN0 IMX_GPIO_NR(6, 15)
#define SABRESD_CABC_EN1 IMX_GPIO_NR(6, 16)
-#define SABRESD_AUX_3V15_EN IMX_GPIO_NR(6, 9)
-#define SABRESD_DISP0_WR_REVB IMX_GPIO_NR(6, 9)
+//!mm #define SABRESD_AUX_3V15_EN IMX_GPIO_NR(6, 9)
+#define SABRESD_AUX_3V15_EN IMX_GPIO_NR(3, 26) //!mm
+//!mm #define SABRESD_DISP0_WR_REVB IMX_GPIO_NR(6, 9)
+#define SABRESD_DISP0_WR_REVB IMX_GPIO_NR(3, 26) //!mm
#define SABRESD_AUX_5V_EN IMX_GPIO_NR(6, 10)
#define SABRESD_DI1_D0_CS IMX_GPIO_NR(6, 31)
@@ -963,6 +968,11 @@ static struct fsl_mxc_lightsensor_platform_data ls_data = {
.rext = 499, /* calibration: 499K->700K */
};
+static struct tsc2007_platform_data tsc2007_info = {
+ .model = 2007,
+ .x_plate_ohms = 500,
+};
+
static struct i2c_board_info mxc_i2c0_board_info[] __initdata = {
{
//!mm I2C_BOARD_INFO("wm89**", 0x1a),
@@ -992,10 +1002,16 @@ static struct i2c_board_info mxc_i2c1_board_info[] __initdata = {
I2C_BOARD_INFO("egalax_ts", 0x4),
.irq = gpio_to_irq(SABRESD_CAP_TCH_INT0),
},
- {
+ /*!mm {
I2C_BOARD_INFO("max11801", 0x48),
.platform_data = (void *)&max11801_mode,
.irq = gpio_to_irq(SABRESD_TS_INT),
+ },*/
+ {
+ I2C_BOARD_INFO("tsc2007", 0x48),
+ .type = "tsc2007",
+ .platform_data = &tsc2007_info,
+ .irq = gpio_to_irq(SABRESD_TS_INT),
},
};
@@ -2123,6 +2139,11 @@ static void __init mx6_sabresd_board_init(void)
//!mm gpio_request(SABRESD_ALS_INT, "als-int");
//!mm gpio_direction_input(SABRESD_ALS_INT);
+ //!mm setup touchscreen interrupt initialization
+ gpio_request(SABRESD_TS_INT, "tsc2007_irq");
+ gpio_direction_input(SABRESD_TS_INT);
+ gpio_free(SABRESD_TS_INT);
+
imx6q_add_hdmi_soc();
imx6q_add_hdmi_soc_dai();
@@ -5608,7 +5608,8 @@ int __init mx6_clocks_init(unsigned long ckil, unsigned long osc,
if (cpu_is_mx6q() && (mx6q_revision() > IMX_CHIP_REVISION_1_1))
clk_set_parent(&gpu2d_core_clk[0], &pll3_usb_otg_main_clk);
- clk_set_parent(&ldb_di0_clk, &pll2_pfd_352M);
+ //!mm orig: clk_set_parent(&ldb_di0_clk, &pll2_pfd_352M);
+ clk_set_parent(&ldb_di0_clk, &pll5_video_main_clk);
clk_set_parent(&ldb_di1_clk, &pll2_pfd_352M);
/* PCLK camera - J5 */
@@ -300,7 +300,8 @@ static int __devinit tsc2007_probe(struct i2c_client *client,
ts->get_pendown_state = pdata->get_pendown_state;
ts->clear_penirq = pdata->clear_penirq;
- pdata->init_platform_hw();
+ if (pdata->init_platform_hw)
+ pdata->init_platform_hw();
if (tsc2007_xfer(ts, PWRDOWN) < 0) {
err = -ENODEV;

0 comments on commit 96220aa

Please sign in to comment.