]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
arm64: dts: amlogic: meson-s4-s905y4-khadas-vim1s: add Function key support
authorNick Xie <nick@khadas.com>
Wed, 25 Mar 2026 07:06:18 +0000 (15:06 +0800)
committerNeil Armstrong <neil.armstrong@linaro.org>
Tue, 2 Jun 2026 07:49:45 +0000 (09:49 +0200)
Enable the SARADC controller and add the adc-keys node to support
the Function key found on the Khadas VIM1S board.

Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Nick Xie <nick@khadas.com>
Link: https://patch.msgid.link/20260325070618.81955-5-nick@khadas.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
arch/arm64/boot/dts/amlogic/meson-s4-s905y4-khadas-vim1s.dts

index 664d64a267f2d2712fa1a43ad0b58bf9afe8a7c3..792ab45c4c94446a7641349a9c11c494f2b1f095 100644 (file)
                };
        };
 
+       adc-keys {
+               compatible = "adc-keys";
+               io-channels = <&saradc 0>;
+               io-channel-names = "buttons";
+               keyup-threshold-microvolt = <1710000>;
+               poll-interval = <100>;
+
+               button-function {
+                       label = "Function";
+                       linux,code = <KEY_FN>;
+                       press-threshold-microvolt = <10000>;
+               };
+       };
+
        emmc_pwrseq: emmc-pwrseq {
                compatible = "mmc-pwrseq-emmc";
                reset-gpios = <&gpio GPIOB_9 GPIO_ACTIVE_LOW>;
        };
 };
 
+&saradc {
+       status = "okay";
+       vref-supply = <&vddio_ao1v8>;
+};
+
 &spicc0 {
        status = "okay";
        pinctrl-names = "default";