devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] ARM: dts: qcom: apq8074-dragonboard: add LEDs and GPIO keys
@ 2023-05-31  1:26 Dmitry Baryshkov
  2023-05-31  1:26 ` [PATCH 1/2] ARM: dts: qcom: apq8074-dragonboard: add onboard leds Dmitry Baryshkov
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Dmitry Baryshkov @ 2023-05-31  1:26 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree

Add device nodes for the LEDs and several Volume-up and general GPIO
keys. The power-on and Volume-down keys are not supported, as they
require extra pon/resin patches.

Dmitry Baryshkov (2):
  ARM: dts: qcom: apq8074-dragonboard: add onboard leds
  ARM: dts: qcom: apq8074-dragonboard: add gpio keys

 .../arm/boot/dts/qcom-apq8074-dragonboard.dts | 58 +++++++++++++++++++
 1 file changed, 58 insertions(+)

-- 
2.39.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] ARM: dts: qcom: apq8074-dragonboard: add onboard leds
  2023-05-31  1:26 [PATCH 0/2] ARM: dts: qcom: apq8074-dragonboard: add LEDs and GPIO keys Dmitry Baryshkov
@ 2023-05-31  1:26 ` Dmitry Baryshkov
  2023-05-31  1:26 ` [PATCH 2/2] ARM: dts: qcom: apq8074-dragonboard: add gpio keys Dmitry Baryshkov
  2023-06-13 23:48 ` [PATCH 0/2] ARM: dts: qcom: apq8074-dragonboard: add LEDs and GPIO keys Bjorn Andersson
  2 siblings, 0 replies; 4+ messages in thread
From: Dmitry Baryshkov @ 2023-05-31  1:26 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree

The dragonboard as three LEDs: red, green and blue. Add corresponding
description.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 .../arm/boot/dts/qcom-apq8074-dragonboard.dts | 24 +++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
index 72f6611bbe49..dc8667ad1b54 100644
--- a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
+++ b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
 #include "qcom-msm8974.dtsi"
 #include "qcom-pm8841.dtsi"
 #include "qcom-pm8941.dtsi"
@@ -90,6 +91,29 @@ &mdss_dsi0_phy {
 	vddio-supply = <&pm8941_l12>;
 };
 
+&pm8941_lpg {
+	qcom,power-source = <1>;
+	status = "okay";
+
+	led@5 {
+		reg = <5>;
+		color = <LED_COLOR_ID_BLUE>;
+		function = LED_FUNCTION_INDICATOR;
+	};
+
+	led@6 {
+		reg = <6>;
+		color = <LED_COLOR_ID_GREEN>;
+		function = LED_FUNCTION_INDICATOR;
+	};
+
+	led@7 {
+		reg = <7>;
+		color = <LED_COLOR_ID_RED>;
+		function = LED_FUNCTION_INDICATOR;
+	};
+};
+
 &pm8941_wled {
 	qcom,cs-out;
 	qcom,switching-freq = <3200>;
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] ARM: dts: qcom: apq8074-dragonboard: add gpio keys
  2023-05-31  1:26 [PATCH 0/2] ARM: dts: qcom: apq8074-dragonboard: add LEDs and GPIO keys Dmitry Baryshkov
  2023-05-31  1:26 ` [PATCH 1/2] ARM: dts: qcom: apq8074-dragonboard: add onboard leds Dmitry Baryshkov
@ 2023-05-31  1:26 ` Dmitry Baryshkov
  2023-06-13 23:48 ` [PATCH 0/2] ARM: dts: qcom: apq8074-dragonboard: add LEDs and GPIO keys Bjorn Andersson
  2 siblings, 0 replies; 4+ messages in thread
From: Dmitry Baryshkov @ 2023-05-31  1:26 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree

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

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 .../arm/boot/dts/qcom-apq8074-dragonboard.dts | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
index dc8667ad1b54..7f759b00524b 100644
--- a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
+++ b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
@@ -1,6 +1,8 @@
 // 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_dsi0_phy {
 	vddio-supply = <&pm8941_l12>;
 };
 
+&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";
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] ARM: dts: qcom: apq8074-dragonboard: add LEDs and GPIO keys
  2023-05-31  1:26 [PATCH 0/2] ARM: dts: qcom: apq8074-dragonboard: add LEDs and GPIO keys Dmitry Baryshkov
  2023-05-31  1:26 ` [PATCH 1/2] ARM: dts: qcom: apq8074-dragonboard: add onboard leds Dmitry Baryshkov
  2023-05-31  1:26 ` [PATCH 2/2] ARM: dts: qcom: apq8074-dragonboard: add gpio keys Dmitry Baryshkov
@ 2023-06-13 23:48 ` Bjorn Andersson
  2 siblings, 0 replies; 4+ messages in thread
From: Bjorn Andersson @ 2023-06-13 23:48 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Andy Gross, Dmitry Baryshkov, Rob Herring,
	Conor Dooley, Konrad Dybcio
  Cc: linux-arm-msm, devicetree

On Wed, 31 May 2023 04:26:25 +0300, Dmitry Baryshkov wrote:
> Add device nodes for the LEDs and several Volume-up and general GPIO
> keys. The power-on and Volume-down keys are not supported, as they
> require extra pon/resin patches.
> 
> Dmitry Baryshkov (2):
>   ARM: dts: qcom: apq8074-dragonboard: add onboard leds
>   ARM: dts: qcom: apq8074-dragonboard: add gpio keys
> 
> [...]

Applied, thanks!

[1/2] ARM: dts: qcom: apq8074-dragonboard: add onboard leds
      commit: b9a0de7d5719aa54199da2932c1b1fdb948ff753
[2/2] ARM: dts: qcom: apq8074-dragonboard: add gpio keys
      commit: 6198772ec4d9dcd2fea63b4020cef117a786d738

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-06-13 23:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-31  1:26 [PATCH 0/2] ARM: dts: qcom: apq8074-dragonboard: add LEDs and GPIO keys Dmitry Baryshkov
2023-05-31  1:26 ` [PATCH 1/2] ARM: dts: qcom: apq8074-dragonboard: add onboard leds Dmitry Baryshkov
2023-05-31  1:26 ` [PATCH 2/2] ARM: dts: qcom: apq8074-dragonboard: add gpio keys Dmitry Baryshkov
2023-06-13 23:48 ` [PATCH 0/2] ARM: dts: qcom: apq8074-dragonboard: add LEDs and GPIO keys Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).