Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9e961951 authored by Amy Maloche's avatar Amy Maloche
Browse files

ARM: dt: Enable Synaptics S3408 touch on MSMSAMARIUM



Add devicetree and gpio resources to enable Synaptics
S3408 touch.

Change-Id: Ie14fa6870250499bb2945916951ab5789e59b135
Signed-off-by: default avatarAmy Maloche <amaloche@codeaurora.org>
parent dc077d46
Loading
Loading
Loading
Loading
+27 −0
Original line number Diff line number Diff line
@@ -24,6 +24,33 @@
		startup-delay-us = <500>;
		enable-active-high;
	};

	gen-vkeys {
		compatible = "qcom,gen-vkeys";
		label = "synaptics_rmi4_i2c";
		qcom,disp-maxx = <1079>;
		qcom,disp-maxy = <1919>;
		qcom,panel-maxx = <1079>;
		qcom,panel-maxy = <2084>;
		qcom,key-codes = <158 139 102 217>;
	};
};

&i2c_2 {
	synaptics@20 {
		compatible = "synaptics,rmi4";
		reg = <0x20>;
		interrupt-parent = <&msmgpio>;
		interrupts = <14 0x2008>;
		vdd-supply = <&pma8084_l18>;
		vcc_i2c-supply = <&pma8084_lvs1>;
		synaptics,reset-gpio = <&msmgpio 13 0x00>;
		synaptics,irq-gpio = <&msmgpio 14 0x2008>;
		synaptics,display-coords = <0 0 1079 1919>;
		synaptics,i2c-pull-up;
		synaptics,power-down;
		synaptics,disable-gpios;
	};
};

&blsp1_uart1{
+1 −1
Original line number Diff line number Diff line
@@ -227,7 +227,7 @@
		reg = <0xf9924000 0x1000>;
		interrupt-names = "qup_err_intr";
		interrupts = <0 96 0>;
		qcom,i2c-bus-freq = <100000>;
		qcom,i2c-bus-freq = <384000>;
		qcom,i2c-src-freq = <19200000>;
		qcom,sda-gpio = <&msmgpio 6 0>;
		qcom,scl-gpio = <&msmgpio 7 0>;
+50 −1
Original line number Diff line number Diff line
@@ -32,6 +32,36 @@ static struct gpiomux_setting gpio_i2c_config = {
	.pull = GPIOMUX_PULL_NONE,
};

static struct gpiomux_setting gpio_i2c_act_config = {
	.func = GPIOMUX_FUNC_3,
	.drv  = GPIOMUX_DRV_2MA,
	.pull = GPIOMUX_PULL_UP,
};

static struct gpiomux_setting gpio_touch_int_act_config = {
	.func = GPIOMUX_FUNC_GPIO,
	.drv  = GPIOMUX_DRV_8MA,
	.pull = GPIOMUX_PULL_UP,
};

static struct gpiomux_setting gpio_touch_int_sus_config = {
	.func = GPIOMUX_FUNC_GPIO,
	.drv  = GPIOMUX_DRV_2MA,
	.pull = GPIOMUX_PULL_DOWN,
};

static struct gpiomux_setting gpio_touch_reset_act_config = {
	.func = GPIOMUX_FUNC_GPIO,
	.drv  = GPIOMUX_DRV_6MA,
	.pull = GPIOMUX_PULL_UP,
};

static struct gpiomux_setting gpio_touch_reset_sus_config = {
	.func = GPIOMUX_FUNC_GPIO,
	.drv  = GPIOMUX_DRV_2MA,
	.pull = GPIOMUX_PULL_DOWN,
};

#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
static struct gpiomux_setting gpio_spi_config = {
	.func = GPIOMUX_FUNC_1,
@@ -89,12 +119,14 @@ static struct msm_gpiomux_config msm_blsp_configs[] __initdata = {
	{
		.gpio      = 6,		/* BLSP1 QUP2 I2C_SDA */
		.settings = {
			[GPIOMUX_ACTIVE] = &gpio_i2c_act_config,
			[GPIOMUX_SUSPENDED] = &gpio_i2c_config,
		},
	},
	{
		.gpio      = 7,		/* BLSP1 QUP2 I2C_SCL */
		.settings = {
			[GPIOMUX_ACTIVE] = &gpio_i2c_act_config,
			[GPIOMUX_SUSPENDED] = &gpio_i2c_config,
		},
	},
@@ -124,7 +156,6 @@ static struct msm_gpiomux_config msm_blsp_configs[] __initdata = {
	},
};


static struct gpiomux_setting lcd_en_act_cfg = {
	.func = GPIOMUX_FUNC_GPIO,
	.drv = GPIOMUX_DRV_8MA,
@@ -155,6 +186,23 @@ static struct msm_gpiomux_config msm_lcd_configs[] __initdata = {
	},
};

static struct msm_gpiomux_config msm_touch_configs[] __initdata = {
	{
		.gpio      = 14,	       /* TOUCH INT GPIO */
		.settings = {
			[GPIOMUX_ACTIVE] = &gpio_touch_int_act_config,
			[GPIOMUX_SUSPENDED] = &gpio_touch_int_sus_config,
		},
	},
	{
		.gpio      = 13,	       /* TOUCH RESET GPIO */
		.settings = {
			[GPIOMUX_ACTIVE] = &gpio_touch_reset_act_config,
			[GPIOMUX_SUSPENDED] = &gpio_touch_reset_sus_config,
		},
	},
};

void __init msmsamarium_init_gpiomux(void)
{
	int rc;
@@ -170,4 +218,5 @@ void __init msmsamarium_init_gpiomux(void)
#endif
	msm_gpiomux_install(msm_blsp_configs, ARRAY_SIZE(msm_blsp_configs));
	msm_gpiomux_install(msm_lcd_configs, ARRAY_SIZE(msm_lcd_configs));
	msm_gpiomux_install(msm_touch_configs, ARRAY_SIZE(msm_touch_configs));
}