113-dt-sun7i-add-lradc.patch 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. From a735a9b354ebc1a17b648ef8c3482c71fdbf40da Mon Sep 17 00:00:00 2001
  2. From: Hans de Goede <hdegoede@redhat.com>
  3. Date: Wed, 1 Jan 2014 20:26:21 +0100
  4. Subject: [PATCH] ARM: dts: sun7i: Add lradc node
  5. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
  6. ---
  7. arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 59 ++++++++++++++++++++++++-
  8. arch/arm/boot/dts/sun7i-a20.dtsi | 7 +++
  9. 2 files changed, 64 insertions(+), 2 deletions(-)
  10. diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts
  11. index 9d669cdf..c00badd 100644
  12. --- a/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts
  13. +++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts
  14. @@ -12,8 +12,9 @@
  15. */
  16. /dts-v1/;
  17. -/include/ "sun7i-a20.dtsi"
  18. -/include/ "sunxi-common-regulators.dtsi"
  19. +#include "sun7i-a20.dtsi"
  20. +#include "sunxi-common-regulators.dtsi"
  21. +#include <dt-bindings/input/input.h>
  22. / {
  23. model = "Olimex A20-Olinuxino Micro";
  24. @@ -100,6 +101,60 @@
  25. };
  26. };
  27. + lradc: lradc@01c22800 {
  28. + vref-supply = <&reg_vcc3v0>;
  29. + status = "okay";
  30. +
  31. + button@191 {
  32. + label = "Volume Up";
  33. + linux,code = <KEY_VOLUMEUP>;
  34. + channel = <0>;
  35. + voltage = <191274>;
  36. + };
  37. +
  38. + button@392 {
  39. + label = "Volume Down";
  40. + linux,code = <KEY_VOLUMEDOWN>;
  41. + channel = <0>;
  42. + voltage = <392644>;
  43. + };
  44. +
  45. + button@601 {
  46. + label = "Menu";
  47. + linux,code = <KEY_MENU>;
  48. + channel = <0>;
  49. + voltage = <601151>;
  50. + };
  51. +
  52. + button@795 {
  53. + label = "Search";
  54. + linux,code = <KEY_SEARCH>;
  55. + channel = <0>;
  56. + voltage = <795090>;
  57. + };
  58. +
  59. + button@987 {
  60. + label = "Home";
  61. + linux,code = <KEY_HOMEPAGE>;
  62. + channel = <0>;
  63. + voltage = <987387>;
  64. + };
  65. +
  66. + button@1184 {
  67. + label = "Esc";
  68. + linux,code = <KEY_ESC>;
  69. + channel = <0>;
  70. + voltage = <1184678>;
  71. + };
  72. +
  73. + button@1398 {
  74. + label = "Enter";
  75. + linux,code = <KEY_ENTER>;
  76. + channel = <0>;
  77. + voltage = <1398804>;
  78. + };
  79. + };
  80. +
  81. uart0: serial@01c28000 {
  82. pinctrl-names = "default";
  83. pinctrl-0 = <&uart0_pins_a>;
  84. diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
  85. index f0a75c6..9174423 100644
  86. --- a/arch/arm/boot/dts/sun7i-a20.dtsi
  87. +++ b/arch/arm/boot/dts/sun7i-a20.dtsi
  88. @@ -911,6 +911,13 @@
  89. status = "disabled";
  90. };
  91. + lradc: lradc@01c22800 {
  92. + compatible = "allwinner,sun4i-a10-lradc-keys";
  93. + reg = <0x01c22800 0x100>;
  94. + interrupts = <0 31 4>;
  95. + status = "disabled";
  96. + };
  97. +
  98. sid: eeprom@01c23800 {
  99. compatible = "allwinner,sun7i-a20-sid";
  100. reg = <0x01c23800 0x200>;