0005-ARM-socfpga-Add-support-for-HPS-KEYs-SWs-on-SoCKit.patch 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. From 7e990b69f2331daf7847ddb82bb5da9623f24f4f Mon Sep 17 00:00:00 2001
  2. From: Marek Vasut <marex@denx.de>
  3. Date: Tue, 23 Jun 2015 00:41:08 +0200
  4. Subject: [PATCH 05/33] ARM: socfpga: Add support for HPS KEYs/SWs on SoCKit
  5. Add support for the keys and flip-switches on the SoCFPGA SoCkit board.
  6. Signed-off-by: Marek Vasut <marex@denx.de>
  7. Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
  8. ---
  9. arch/arm/boot/dts/socfpga_cyclone5_sockit.dts | 62 ++++++++++++++++++++++++++-
  10. 1 file changed, 61 insertions(+), 1 deletion(-)
  11. diff --git a/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts b/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts
  12. index 1461690..02e22f5 100644
  13. --- a/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts
  14. +++ b/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts
  15. @@ -67,6 +67,62 @@
  16. };
  17. };
  18. + gpio-keys {
  19. + compatible = "gpio-keys";
  20. +
  21. + hps_sw0 {
  22. + label = "hps_sw0";
  23. + gpios = <&portc 20 0>; /* HPS_GPI7 */
  24. + linux,input-type = <5>; /* EV_SW */
  25. + linux,code = <0x0>; /* SW_LID */
  26. + };
  27. +
  28. + hps_sw1 {
  29. + label = "hps_sw1";
  30. + gpios = <&portc 19 0>; /* HPS_GPI6 */
  31. + linux,input-type = <5>; /* EV_SW */
  32. + linux,code = <0x5>; /* SW_DOCK */
  33. + };
  34. +
  35. + hps_sw2 {
  36. + label = "hps_sw2";
  37. + gpios = <&portc 18 0>; /* HPS_GPI5 */
  38. + linux,input-type = <5>; /* EV_SW */
  39. + linux,code = <0xa>; /* SW_KEYPAD_SLIDE */
  40. + };
  41. +
  42. + hps_sw3 {
  43. + label = "hps_sw3";
  44. + gpios = <&portc 17 0>; /* HPS_GPI4 */
  45. + linux,input-type = <5>; /* EV_SW */
  46. + linux,code = <0xc>; /* SW_ROTATE_LOCK */
  47. + };
  48. +
  49. + hps_hkey0 {
  50. + label = "hps_hkey0";
  51. + gpios = <&portc 21 1>; /* HPS_GPI8 */
  52. + linux,code = <187>; /* KEY_F17 */
  53. + };
  54. +
  55. + hps_hkey1 {
  56. + label = "hps_hkey1";
  57. + gpios = <&portc 22 1>; /* HPS_GPI9 */
  58. + linux,code = <188>; /* KEY_F18 */
  59. + };
  60. +
  61. + hps_hkey2 {
  62. + label = "hps_hkey2";
  63. + gpios = <&portc 23 1>; /* HPS_GPI10 */
  64. + linux,code = <189>; /* KEY_F19 */
  65. + };
  66. +
  67. + hps_hkey3 {
  68. + label = "hps_hkey3";
  69. + gpios = <&portc 24 1>; /* HPS_GPI11 */
  70. + linux,code = <190>; /* KEY_F20 */
  71. + };
  72. + };
  73. +
  74. regulator_3_3v: vcc3p3-regulator {
  75. compatible = "regulator-fixed";
  76. regulator-name = "VCC3P3";
  77. @@ -89,11 +145,15 @@
  78. rxc-skew-ps = <2000>;
  79. };
  80. +&gpio0 { /* GPIO 0..29 */
  81. + status = "okay";
  82. +};
  83. +
  84. &gpio1 { /* GPIO 30..57 */
  85. status = "okay";
  86. };
  87. -&gpio2 {
  88. +&gpio2 { /* GPIO 58..66 (HLGPI 0..13 at offset 13) */
  89. status = "okay";
  90. };
  91. --
  92. 2.8.1