ipq806x: Add buttons to OnHub

These are the factory reset button (external) and "developer mode"
button (hidden inside the case (ASUS) or under a screw in the base
(TP-Link)) found on the TP-Link and ASUS OnHub devices.

Signed-off-by: Alan Luck <luckyhome2008@gmail.com>
[Brian: add description; factor out for both ASUS and TP-Link; use
existing pinmux definitions; add keycode for dev button]
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
This commit is contained in:
Alan Luck 2023-02-25 22:17:37 -08:00 committed by Hauke Mehrtens
parent 8298270b60
commit 4c1d7787d4

View File

@ -5,6 +5,7 @@
#include "qcom-ipq8064-smb208.dtsi" #include "qcom-ipq8064-smb208.dtsi"
#include <dt-bindings/gpio/gpio.h> #include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/soc/qcom,tcsr.h> #include <dt-bindings/soc/qcom,tcsr.h>
/ { / {
@ -30,6 +31,28 @@
}; };
}; };
keys {
compatible = "gpio-keys";
pinctrl-0 = <&button_pins>;
pinctrl-names = "default";
reset {
label = "reset";
gpios = <&qcom_pinmux 16 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
debounce-interval = <60>;
wakeup-source;
};
dev {
label = "dev";
gpios = <&qcom_pinmux 15 GPIO_ACTIVE_LOW>;
linux,code = <KEY_CONFIG>;
debounce-interval = <60>;
wakeup-source;
};
};
mdio: mdio { mdio: mdio {
compatible = "virtual,mdio-gpio"; compatible = "virtual,mdio-gpio";
#address-cells = <1>; #address-cells = <1>;
@ -227,12 +250,17 @@
pins = "gpio17"; pins = "gpio17";
output-low; output-low;
}; };
};
button_pins: button_pins {
recovery { recovery {
pins = "gpio16"; pins = "gpio16";
function = "gpio";
bias-none; bias-none;
}; };
developer { developer {
pins = "gpio15"; pins = "gpio15";
function = "gpio";
bias-none; bias-none;
}; };
}; };