From 6894b9bf273a033b405bccaace0c5cd69ba1c6f0 Mon Sep 17 00:00:00 2001 From: Christian Hewitt Date: Thu, 5 Jan 2023 06:08:37 +0000 Subject: [PATCH] FIXUP! add adc/gpio keys and led's to dreambox Signed-off-by: Christian Hewitt --- .../boot/dts/amlogic/meson-g12b-dreambox.dtsi | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-dreambox.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-dreambox.dtsi index 14b2827b592d5c..1566dd48c473a1 100644 --- a/arch/arm64/boot/dts/amlogic/meson-g12b-dreambox.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-dreambox.dtsi @@ -13,6 +13,56 @@ status = "disabled"; }; + adc_keys { + compatible = "adc-keys"; + io-channels = <&saradc 2>; + io-channel-names = "buttons"; + keyup-threshold-microvolt = <1800000>; + + button-up { + label = "Volume Up"; + linux,code = ; + press-threshold-microvolt = <4680352>; + }; + + button-down { + label = "Volume Down"; + linux,code = ; + press-threshold-microvolt = <2516129>; + }; + + button-enter { + label = "Enter"; + linux,code = ; + press-threshold-microvolt = <6844575>; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + poll-interval = <20>; + + button { + label = "power"; + linux,code = ; + gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>; + }; + }; + + leds { + compatible = "gpio-leds"; + + led-system { + label = "system-status"; + color = ; + function = LED_FUNCTION_POWER; + gpios = <&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>; + default-state = "on"; + panic-indicator; + retain-state-suspended; + }; + }; + sdio_pwrseq: sdio-pwrseq { compatible = "mmc-pwrseq-simple"; reset-gpios = <&gpio GPIOA_11 GPIO_ACTIVE_LOW>;