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
unifreq committed Jan 14, 2023
1 parent 295b12a commit 2309650
Showing 1 changed file with 51 additions and 1 deletion.
52 changes: 51 additions & 1 deletion arch/arm64/boot/dts/amlogic/meson-g12b-dreambox.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,59 @@
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_HIGH>;
reset-gpios = <&gpio GPIOA_11 GPIO_ACTIVE_LOW>;
clocks = <&wifi32k>;
clock-names = "ext_clock";
};
Expand Down

0 comments on commit 2309650

Please sign in to comment.