Commit 6198772e authored by Dmitry Baryshkov's avatar Dmitry Baryshkov Committed by Bjorn Andersson
Browse files

ARM: dts: qcom: apq8074-dragonboard: add gpio keys



Add device nodes for gpio-keys (volume-up, general key) device nodes.

Reviewed-by: default avatarKonrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: default avatarBjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230531012627.3813060-3-dmitry.baryshkov@linaro.org
parent b9a0de7d
Loading
Loading
Loading
Loading
+34 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
#include "qcom-msm8974.dtsi"
#include "qcom-pm8841.dtsi"
#include "qcom-pm8941.dtsi"
@@ -21,6 +23,26 @@ chosen {
		stdout-path = "serial0:115200n8";
	};

	gpio-keys {
		compatible = "gpio-keys";
		autorepeat;

		pinctrl-0 = <&msm_keys_default>;
		pinctrl-names = "default";

		button-volup {
			label = "Volume Up";
			linux,code = <KEY_VOLUMEUP>;
			gpios = <&pm8941_gpios 5 GPIO_ACTIVE_LOW>;
		};

		button-general {
			label = "General";
			linux,code = <KEY_PROG1>;
			gpios = <&pm8941_gpios 23 GPIO_ACTIVE_LOW>;
		};
	};

	reserved-memory {
		mpss_region: mpss@ac00000 {
			reg = <0x0ac00000 0x2500000>;
@@ -91,6 +113,18 @@ &mdss {
	status = "okay";
};

&pm8941_gpios {
        msm_keys_default: pm8941-gpio-keys-state {
		pins = "gpio5", "gpio23";
		function = "normal";
		input-enable;
		drive-push-pull;
		bias-pull-up;
		qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
		power-source = <PM8941_GPIO_S3>; /* 1.8V */
        };
};

&pm8941_lpg {
	qcom,power-source = <1>;
	status = "okay";