diff mbox series

[v2,5/5] arm64: dts: exynos: Add button support for c1s

Message ID 20241015210450.964093-6-igor.belwon@mentallysanemainliners.org (mailing list archive)
State New
Headers show
Series Add Exynos990 pinctrl and chipid drivers | expand

Commit Message

Igor Belwon Oct. 15, 2024, 9:04 p.m. UTC
Add button (gpio-keys) support for c1s (SM-N981B).
Added are all hardware buttons (vol-, vol+ and power).

Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
---
 arch/arm64/boot/dts/exynos/exynos990-c1s.dts | 49 ++++++++++++++++++++
 1 file changed, 49 insertions(+)

Comments

Krzysztof Kozlowski Oct. 16, 2024, 7:04 a.m. UTC | #1
On Tue, Oct 15, 2024 at 11:04:50PM +0200, Igor Belwon wrote:
> Add button (gpio-keys) support for c1s (SM-N981B).
> Added are all hardware buttons (vol-, vol+ and power).
> 
> Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
> ---
>  arch/arm64/boot/dts/exynos/exynos990-c1s.dts | 49 ++++++++++++++++++++
>  1 file changed, 49 insertions(+)
> 

I asked you to split your patchsets according to subsystems you target.
SoC and pinctrl. How is this patch for pinctrl? It's not. It is a DTS,
so SoC patch. It cannot be applied.

Subsystems are defined by directories and maintainers file.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/exynos/exynos990-c1s.dts b/arch/arm64/boot/dts/exynos/exynos990-c1s.dts
index e57339357dc6..36a6f1377e92 100644
--- a/arch/arm64/boot/dts/exynos/exynos990-c1s.dts
+++ b/arch/arm64/boot/dts/exynos/exynos990-c1s.dts
@@ -59,8 +59,57 @@  abox_reserved: audio@f7fb0000 {
 			no-map;
 		};
 	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		pinctrl-0 = <&key_power &key_voldown &key_volup>;
+		pinctrl-names = "default";
+
+		power-key {
+			label = "Power";
+			linux,code = <KEY_POWER>;
+			gpios = <&gpa2 4 GPIO_ACTIVE_LOW>;
+			wakeup-source;
+		};
+
+		voldown-key {
+			label = "Volume Down";
+			linux,code = <KEY_VOLUMEDOWN>;
+			gpios = <&gpa0 4 GPIO_ACTIVE_LOW>;
+		};
+
+		volup-key {
+			label = "Volume Up";
+			linux,code = <KEY_VOLUMEUP>;
+			gpios = <&gpa0 3 GPIO_ACTIVE_LOW>;
+		};
+	};
 };
 
 &oscclk {
 	clock-frequency = <26000000>;
 };
+
+&pinctrl_alive {
+	key_power: key-power-pins {
+		samsung,pins = "gpa2-4";
+		samsung,pin-function = <EXYNOS_PIN_FUNC_EINT>;
+		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+		samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
+	};
+
+	key_voldown: key-voldown-pins {
+		samsung,pins = "gpa0-4";
+		samsung,pin-function = <EXYNOS_PIN_FUNC_EINT>;
+		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+		samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
+	};
+
+	key_volup: key-volup-pins {
+		samsung,pins = "gpa0-3";
+		samsung,pin-function = <EXYNOS_PIN_FUNC_EINT>;
+		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+		samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
+	};
+};