Skip to content

Commit

Permalink
FIXUP! add adc/gpio keys and led's to dreambox
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
  • Loading branch information
chewitt committed Jan 5, 2023
1 parent e8aa8b2 commit 6894b9b
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions arch/arm64/boot/dts/amlogic/meson-g12b-dreambox.dtsi
Expand Up @@ -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 = <KEY_VOLUMEUP>;
press-threshold-microvolt = <4680352>;
};

button-down {
label = "Volume Down";
linux,code = <KEY_VOLUMEDOWN>;
press-threshold-microvolt = <2516129>;
};

button-enter {
label = "Enter";
linux,code = <KEY_ENTER>;
press-threshold-microvolt = <6844575>;
};
};

gpio-keys-polled {
compatible = "gpio-keys-polled";
poll-interval = <20>;

button {
label = "power";
linux,code = <KEY_POWER>;
gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;
};
};

leds {
compatible = "gpio-leds";

led-system {
label = "system-status";
color = <LED_COLOR_ID_RED>;
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>;
Expand Down

0 comments on commit 6894b9b

Please sign in to comment.