You've already forked sunxi-DT-overlays
mirror of
https://github.com/armbian/sunxi-DT-overlays.git
synced 2026-01-06 10:14:43 -08:00
43 lines
1009 B
Plaintext
43 lines
1009 B
Plaintext
/dts-v1/;
|
|
/plugin/;
|
|
|
|
/ {
|
|
compatible = "allwinner,sun4i-a10", "allwinner,sun7i-a20", "allwinner,sun8i-h3", "allwinner,sun50i-a64", "allwinner,sun50i-h5";
|
|
|
|
/*
|
|
* This fragment is needed only for the internal pull-up activation,
|
|
* external pull-up resistor is highly recommended if using long wires
|
|
*/
|
|
fragment@0 {
|
|
target = <&pio>;
|
|
__overlay__ {
|
|
gpio_button_0: gpio_button_0 {
|
|
pins = "PA10";
|
|
function = "gpio_in";
|
|
bias-pull-up;
|
|
};
|
|
};
|
|
};
|
|
|
|
fragment@1 {
|
|
target-path = "/";
|
|
__overlay__ {
|
|
gpio-keys-user {
|
|
/*
|
|
* Use "gpio-keys" for EINT capable pins, "gpio-keys-polled" for other pins
|
|
* add "poll-interval" property if using "gpio-keys-polled"
|
|
*/
|
|
compatible = "gpio-keys";
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&gpio_button_0>;
|
|
|
|
power_button {
|
|
label = "GPIO Key Power";
|
|
linux,code = <116>; /* KEY_POWER, see include/uapi/linux/input-event-codes.h */
|
|
gpios = <&pio 0 10 1>; /* PA10 GPIO_ACTIVE_LOW */
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|