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

Commit 11dd8672 authored by Shantanu Jain's avatar Shantanu Jain
Browse files

ARM: dts: msm: add gpio keys support for MSMGOLD MTP/CDP



Add gpio keys support for MSMGOLD MTP and CDP devices.
MTP has vol+, camera focus and camera snapshot. While CDP
has vol+, camera focus, camera snapshot and home keys.

Change-Id: Ia2756fb6f8521e9d2d6f8e818e604b61d5ef5ac6
Signed-off-by: default avatarShantanu Jain <shjain@codeaurora.org>
parent a660e4d0
Loading
Loading
Loading
Loading
+66 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2015, The Linux Foundation. All rights reserved.
 * Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -15,6 +15,45 @@
#include "msmgold-camera-sensor-cdp.dtsi"

&soc {
	gpio_keys {
		compatible = "gpio-keys";
		input-name = "gpio-keys";
		pinctrl-names = "tlmm_gpio_key_active","tlmm_gpio_key_suspend";
		pinctrl-0 = <&gpio_key_active>;
		pinctrl-1 = <&gpio_key_suspend>;

		camera_focus {
			label = "camera_focus";
			gpios = <&tlmm 128 0x1>;
			linux,input-type = <1>;
			linux,code = <0x210>;
			debounce-interval = <15>;
		};

		camera_snapshot {
			label = "camera_snapshot";
			gpios = <&tlmm 127 0x1>;
			linux,input-type = <1>;
			linux,code = <0x2fe>;
			debounce-interval = <15>;
		};

		vol_up {
			label = "volume_up";
			gpios = <&tlmm 91 0x1>;
			linux,input-type = <1>;
			linux,code = <115>;
			debounce-interval = <15>;
		};

		home {
			label = "home";
			gpios = <&tlmm 86 0x1>;
			linux,input-type = <1>;
			linux,code = <102>;
			debounce-interval = <15>;
		};
	};
};

&spi_3 { /* BLSP1 QUP3 */
@@ -72,3 +111,29 @@
&dsi_truly_720_vid {
	qcom,panel-supply-entries = <&dsi_panel_pwr_supply>;
};

&tlmm {
	tlmm_gpio_key {
		gpio_key_active: gpio_key_active {
			mux {
				pins = "gpio86", "gpio91", "gpio127", "gpio128";
				function = "gpio";
			};

			config {
				pins = "gpio86", "gpio91", "gpio127", "gpio128";
			};
		};

		gpio_key_suspend: gpio_key_suspend {
			mux {
				pins = "gpio86", "gpio91", "gpio127", "gpio128";
				function = "gpio";
			};

			config {
				pins = "gpio86", "gpio91", "gpio127", "gpio128";
			};
		};
	};
};
+32 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2015, The Linux Foundation. All rights reserved.
 * Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -39,6 +39,37 @@
};

&soc {
	gpio_keys {
		compatible = "gpio-keys";
		input-name = "gpio-keys";
		pinctrl-names = "tlmm_gpio_key_active","tlmm_gpio_key_suspend";
		pinctrl-0 = <&gpio_key_active>;
		pinctrl-1 = <&gpio_key_suspend>;

		camera_focus {
			label = "camera_focus";
			gpios = <&tlmm 128 0x1>;
			linux,input-type = <1>;
			linux,code = <0x210>;
			debounce-interval = <15>;
		};

		camera_snapshot {
			label = "camera_snapshot";
			gpios = <&tlmm 127 0x1>;
			linux,input-type = <1>;
			linux,code = <0x2fe>;
			debounce-interval = <15>;
		};

		vol_up {
			label = "volume_up";
			gpios = <&tlmm 91 0x1>;
			linux,input-type = <1>;
			linux,code = <115>;
			debounce-interval = <15>;
		};
	};
};

&blsp1_uart2 {
+18 −0
Original line number Diff line number Diff line
@@ -822,5 +822,23 @@
				};
			};
		};

		tlmm_gpio_key {
			gpio_key_active: gpio_key_active {
				mux {
					pins = "gpio91", "gpio127", "gpio128";
					drive-strength = <2>;
					bias-pull-up;
				};
			};

			gpio_key_suspend: gpio_key_suspend {
				mux {
					pins = "gpio91", "gpio127", "gpio128";
					drive-strength = <2>;
					bias-pull-up;
				};
			};
		};
	};
};