Merge tag 'v5.15.57' into rpi-5.15.y
[platform/kernel/linux-rpi.git] / arch / arm / boot / dts / overlays / gpio-key-overlay.dts
1 // Definitions for gpio-key module
2 /dts-v1/;
3 /plugin/;
4
5 / {
6         compatible = "brcm,bcm2835";
7
8         fragment@0 {
9                 // Configure the gpio pin controller
10                 target = <&gpio>;
11                 __overlay__ {
12                         pin_state: button_pins@0 {
13                                 brcm,pins = <3>; // gpio number
14                                 brcm,function = <0>; // 0 = input, 1 = output
15                                 brcm,pull = <2>; // 0 = none, 1 = pull down, 2 = pull up
16                         };
17                 };
18         };
19         fragment@1 {
20                 target-path = "/";
21                 __overlay__ {
22                         button: button@0 {
23                                 compatible = "gpio-keys";
24                                 pinctrl-names = "default";
25                                 pinctrl-0 = <&pin_state>;
26                                 status = "okay";
27
28                                 key: key {
29                                         linux,code = <116>;
30                                         gpios = <&gpio 3 1>;
31                                         label = "KEY_POWER";
32                                 };
33                         };
34                 };
35         };
36
37         __overrides__ {
38                 gpio =       <&key>,"gpios:4",
39                              <&button>,"reg:0",
40                              <&pin_state>,"brcm,pins:0",
41                              <&pin_state>,"reg:0";
42                 label =      <&key>,"label";
43                 keycode =    <&key>,"linux,code:0";
44                 gpio_pull =  <&pin_state>,"brcm,pull:0";
45                 active_low = <&key>,"gpios:8";
46         };
47
48 };