@@ -74,6 +74,17 @@
gpios = <&gpio ASPEED_GPIO(N, 7) GPIO_ACTIVE_HIGH>;
};
};
+
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ gpioe0 {
+ gpios = <&gpio ASPEED_GPIO(E, 0) GPIO_ACTIVE_LOW>;
+ label = "bmc_pwbtn_in_n";
+ linux,code = <0>;
+ debounce-interval = <20>;
+ };
+ };
};
&pinctrl {
@@ -73,14 +73,6 @@ static void __init do_barreleye_setup(void)
writel(reg, AST_IO(AST_BASE_GPIO | 0x20));
writel(0xC738F20A, AST_IO(AST_BASE_GPIO | 0x24));
writel(0x0031FFAF, AST_IO(AST_BASE_GPIO | 0x80));
-
- /* Select TIMER3 as debounce timer */
- writel(0x00000001, AST_IO(AST_BASE_GPIO | 0x48));
- writel(0x00000001, AST_IO(AST_BASE_GPIO | 0x4C));
-
- /* Set debounce timer to 480000 cycles, with a pclk of 48MHz,
- * corresponds to 20 ms. This time was found by experimentation */
- writel(0x000EA600, AST_IO(AST_BASE_GPIO | 0x58));
}
static void __init do_palmetto_setup(void)
This is a breaking change for userspace, as the GPIO is now represented as a key-code from a GPIO keyboard input. Signed-off-by: Andrew Jeffery <andrew@aj.id.au> --- arch/arm/boot/dts/aspeed-bmc-opp-barreleye.dts | 11 +++++++++++ arch/arm/mach-aspeed/aspeed.c | 8 -------- 2 files changed, 11 insertions(+), 8 deletions(-)