112-dt-sun5i-add-lradc.patch 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. From 3bf1194692f3a275e0776d3c0b6f17826cc01baa Mon Sep 17 00:00:00 2001
  2. From: Hans de Goede <hdegoede@redhat.com>
  3. Date: Wed, 1 Jan 2014 19:50:33 +0100
  4. Subject: [PATCH] ARM: dts: sun5i: Add lradc node
  5. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
  6. ---
  7. arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts | 45 ++++++++++++++++++++++--
  8. arch/arm/boot/dts/sun5i-a10s.dtsi | 7 ++++
  9. arch/arm/boot/dts/sun5i-a13-olinuxino.dts | 45 ++++++++++++++++++++++--
  10. arch/arm/boot/dts/sun5i-a13.dtsi | 7 ++++
  11. 4 files changed, 100 insertions(+), 4 deletions(-)
  12. diff --git a/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts b/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
  13. index ea9519d..0b82d20 100644
  14. --- a/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
  15. +++ b/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
  16. @@ -12,8 +12,9 @@
  17. */
  18. /dts-v1/;
  19. -/include/ "sun5i-a10s.dtsi"
  20. -/include/ "sunxi-common-regulators.dtsi"
  21. +#include "sun5i-a10s.dtsi"
  22. +#include "sunxi-common-regulators.dtsi"
  23. +#include <dt-bindings/input/input.h>
  24. / {
  25. model = "Olimex A10s-Olinuxino Micro";
  26. @@ -98,6 +99,46 @@
  27. };
  28. };
  29. + lradc: lradc@01c22800 {
  30. + vref-supply = <&reg_vcc3v0>;
  31. + status = "okay";
  32. +
  33. + button@191 {
  34. + label = "Volume Up";
  35. + linux,code = <KEY_VOLUMEUP>;
  36. + channel = <0>;
  37. + voltage = <191274>;
  38. + };
  39. +
  40. + button@392 {
  41. + label = "Volume Down";
  42. + linux,code = <KEY_VOLUMEDOWN>;
  43. + channel = <0>;
  44. + voltage = <392644>;
  45. + };
  46. +
  47. + button@601 {
  48. + label = "Menu";
  49. + linux,code = <KEY_MENU>;
  50. + channel = <0>;
  51. + voltage = <601151>;
  52. + };
  53. +
  54. + button@795 {
  55. + label = "Enter";
  56. + linux,code = <KEY_ENTER>;
  57. + channel = <0>;
  58. + voltage = <795090>;
  59. + };
  60. +
  61. + button@987 {
  62. + label = "Home";
  63. + linux,code = <KEY_HOMEPAGE>;
  64. + channel = <0>;
  65. + voltage = <987387>;
  66. + };
  67. + };
  68. +
  69. uart0: serial@01c28000 {
  70. pinctrl-names = "default";
  71. pinctrl-0 = <&uart0_pins_a>;
  72. diff --git a/arch/arm/boot/dts/sun5i-a10s.dtsi b/arch/arm/boot/dts/sun5i-a10s.dtsi
  73. index 531272c..7c6c883 100644
  74. --- a/arch/arm/boot/dts/sun5i-a10s.dtsi
  75. +++ b/arch/arm/boot/dts/sun5i-a10s.dtsi
  76. @@ -520,6 +520,13 @@
  77. reg = <0x01c20c90 0x10>;
  78. };
  79. + lradc: lradc@01c22800 {
  80. + compatible = "allwinner,sun4i-a10-lradc-keys";
  81. + reg = <0x01c22800 0x100>;
  82. + interrupts = <31>;
  83. + status = "disabled";
  84. + };
  85. +
  86. sid: eeprom@01c23800 {
  87. compatible = "allwinner,sun4i-a10-sid";
  88. reg = <0x01c23800 0x10>;
  89. diff --git a/arch/arm/boot/dts/sun5i-a13-olinuxino.dts b/arch/arm/boot/dts/sun5i-a13-olinuxino.dts
  90. index 429994e..b4ec8eb 100644
  91. --- a/arch/arm/boot/dts/sun5i-a13-olinuxino.dts
  92. +++ b/arch/arm/boot/dts/sun5i-a13-olinuxino.dts
  93. @@ -12,8 +12,9 @@
  94. */
  95. /dts-v1/;
  96. -/include/ "sun5i-a13.dtsi"
  97. -/include/ "sunxi-common-regulators.dtsi"
  98. +#include "sun5i-a13.dtsi"
  99. +#include "sunxi-common-regulators.dtsi"
  100. +#include <dt-bindings/input/input.h>
  101. / {
  102. model = "Olimex A13-Olinuxino";
  103. @@ -66,6 +67,46 @@
  104. };
  105. };
  106. + lradc: lradc@01c22800 {
  107. + vref-supply = <&reg_vcc3v0>;
  108. + status = "okay";
  109. +
  110. + button@191 {
  111. + label = "Volume Up";
  112. + linux,code = <KEY_VOLUMEUP>;
  113. + channel = <0>;
  114. + voltage = <191274>;
  115. + };
  116. +
  117. + button@392 {
  118. + label = "Volume Down";
  119. + linux,code = <KEY_VOLUMEDOWN>;
  120. + channel = <0>;
  121. + voltage = <392644>;
  122. + };
  123. +
  124. + button@601 {
  125. + label = "Menu";
  126. + linux,code = <KEY_MENU>;
  127. + channel = <0>;
  128. + voltage = <601151>;
  129. + };
  130. +
  131. + button@795 {
  132. + label = "Enter";
  133. + linux,code = <KEY_ENTER>;
  134. + channel = <0>;
  135. + voltage = <795090>;
  136. + };
  137. +
  138. + button@987 {
  139. + label = "Home";
  140. + linux,code = <KEY_HOMEPAGE>;
  141. + channel = <0>;
  142. + voltage = <987387>;
  143. + };
  144. + };
  145. +
  146. uart1: serial@01c28400 {
  147. pinctrl-names = "default";
  148. pinctrl-0 = <&uart1_pins_b>;
  149. diff --git a/arch/arm/boot/dts/sun5i-a13.dtsi b/arch/arm/boot/dts/sun5i-a13.dtsi
  150. index b131068..aa0482c 100644
  151. --- a/arch/arm/boot/dts/sun5i-a13.dtsi
  152. +++ b/arch/arm/boot/dts/sun5i-a13.dtsi
  153. @@ -468,6 +468,13 @@
  154. reg = <0x01c20c90 0x10>;
  155. };
  156. + lradc: lradc@01c22800 {
  157. + compatible = "allwinner,sun4i-a10-lradc-keys";
  158. + reg = <0x01c22800 0x100>;
  159. + interrupts = <31>;
  160. + status = "disabled";
  161. + };
  162. +
  163. sid: eeprom@01c23800 {
  164. compatible = "allwinner,sun4i-a10-sid";
  165. reg = <0x01c23800 0x10>;