[10/23] arm64: zynqmp: Add linux,code for gpio button

Message ID 4e20661f43b1fb8432fa5fcda5c1cb50d0a27475.1683034376.git.michal.simek@amd.com
State New
Headers
Series arm64: zynqmp: Misc zynqmp changes |

Commit Message

Michal Simek May 2, 2023, 1:35 p.m. UTC
  From: Srinivas Neeli <srinivas.neeli@xilinx.com>

BTN_MISC looks like the most reasonable option for this button.
Button is used by firmware to indicate (after reset, power up) that user
wants to do firmware upgrade via firmware update utility.
For bootloader or OS is this just user button which is worth to have it
mapped.
Also button can be used as a wakeup source and pressing it for more time
can generate more chars that's why also adding wakeup-source and autorepeat
properties.

Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
---

 arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts | 3 +++
 1 file changed, 3 insertions(+)
  

Comments

Michal Simek May 16, 2023, 11:07 a.m. UTC | #1
On 5/2/23 15:35, Michal Simek wrote:
> From: Srinivas Neeli <srinivas.neeli@xilinx.com>
> 
> BTN_MISC looks like the most reasonable option for this button.
> Button is used by firmware to indicate (after reset, power up) that user
> wants to do firmware upgrade via firmware update utility.
> For bootloader or OS is this just user button which is worth to have it
> mapped.
> Also button can be used as a wakeup source and pressing it for more time
> can generate more chars that's why also adding wakeup-source and autorepeat
> properties.
> 
> Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@amd.com>
> ---
> 
>   arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts b/arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts
> index 3862168fa026..340a5c43a8b6 100644
> --- a/arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts
> +++ b/arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts
> @@ -55,6 +55,9 @@ gpio-keys {
>   		key-fwuen {
>   			label = "fwuen";
>   			gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
> +			linux,code = <BTN_MISC>;
> +			wakeup-source;
> +			autorepeat;
>   		};
>   	};
>   

Applied.
M
  

Patch

diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts b/arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts
index 3862168fa026..340a5c43a8b6 100644
--- a/arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts
+++ b/arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts
@@ -55,6 +55,9 @@  gpio-keys {
 		key-fwuen {
 			label = "fwuen";
 			gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
+			linux,code = <BTN_MISC>;
+			wakeup-source;
+			autorepeat;
 		};
 	};