diff --git a/arch/arm/boot/dts/apple/s5l8945x-ipad3.dtsi b/arch/arm/boot/dts/apple/s5l8945x-ipad3.dtsi index 5ffeb40a449486..991b48274d5d29 100644 --- a/arch/arm/boot/dts/apple/s5l8945x-ipad3.dtsi +++ b/arch/arm/boot/dts/apple/s5l8945x-ipad3.dtsi @@ -170,6 +170,59 @@ clock-frequency = <24000000>; }; + /* + * ADT /buttons: menu (Home) 0x0404 = 36, hold (Power) 0x0405 = 37, + * volup 0x0700 = 56, voldown 0x0602 = 50, ringerab (Side Switch) + * 0x0003 = 3, all active low. Same key codes as k93 and p105. + * The Smart Cover's hall-effect switch is PMU GPIO 14 (not wired + * as a Linux GPIO IRQ yet). + */ + gpio-keys { + compatible = "gpio-keys"; + autorepeat; + + home { + label = "Home"; + gpios = <&gpio 36 1>; + linux,code = <172>; /* KEY_HOMEPAGE */ + debounce-interval = <20>; + wakeup-source; + }; + + hold { + label = "Hold"; + gpios = <&gpio 37 1>; + linux,code = <116>; /* KEY_POWER */ + debounce-interval = <20>; + wakeup-source; + }; + + volume-up { + label = "Volume Up"; + gpios = <&gpio 56 1>; + linux,code = <115>; /* KEY_VOLUMEUP */ + debounce-interval = <20>; + }; + + volume-down { + label = "Volume Down"; + gpios = <&gpio 50 1>; + linux,code = <114>; /* KEY_VOLUMEDOWN */ + debounce-interval = <20>; + }; + }; + + gpio-keys-switch { + compatible = "gpio-keys"; + + side-switch { + label = "Side Switch"; + gpios = <&gpio 3 1>; + linux,code = <113>; /* KEY_MUTE, held while on silent */ + debounce-interval = <50>; + }; + }; + soc: soc@30000000 { compatible = "simple-bus"; #address-cells = <1>;