@@ -94,6 +94,41 @@ vol-up {
};
};
+ tri-state-key {
+ compatible = "gpio-keys";
+ label = "Tri-state key";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&tri_state_key_default>;
+
+ state-top {
+ label = "Tri-state key top";
+ linux,input-type = <EV_SW>;
+ linux,code = <SW_PROG1>;
+ gpios = <&tlmm 40 GPIO_ACTIVE_LOW>;
+ debounce-interval = <50>;
+ linux,can-disable;
+ };
+
+ state-middle {
+ label = "Tri-state key middle";
+ linux,input-type = <EV_SW>;
+ linux,code = <SW_PROG2>;
+ gpios = <&tlmm 42 GPIO_ACTIVE_LOW>;
+ debounce-interval = <50>;
+ linux,can-disable;
+ };
+
+ state-bottom {
+ label = "Tri-state key bottom";
+ linux,input-type = <EV_SW>;
+ linux,code = <SW_PROG3>;
+ gpios = <&tlmm 26 GPIO_ACTIVE_LOW>;
+ debounce-interval = <50>;
+ linux,can-disable;
+ };
+ };
+
gpio-hall-sensor {
compatible = "gpio-keys";
label = "Hall effect sensor";
@@ -441,6 +476,14 @@ vreg_bob: bob {
&tlmm {
gpio-reserved-ranges = <0 4>, <81 4>;
+ /* The GPIOs have a hardware pullup */
+ tri_state_key_default: tri-state-pins {
+ pins = "gpio40", "gpio42", "gpio26";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
hall_sensor_default: hall-sensor-default {
pins = "gpio124";
function = "gpio";