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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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. --- a/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
  13. +++ b/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
  14. @@ -12,8 +12,9 @@
  15. */
  16. /dts-v1/;
  17. -/include/ "sun5i-a10s.dtsi"
  18. -/include/ "sunxi-common-regulators.dtsi"
  19. +#include "sun5i-a10s.dtsi"
  20. +#include "sunxi-common-regulators.dtsi"
  21. +#include <dt-bindings/input/input.h>
  22. / {
  23. model = "Olimex A10s-Olinuxino Micro";
  24. @@ -98,6 +99,46 @@
  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 = "Enter";
  54. + linux,code = <KEY_ENTER>;
  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. +
  67. uart0: serial@01c28000 {
  68. pinctrl-names = "default";
  69. pinctrl-0 = <&uart0_pins_a>;
  70. --- a/arch/arm/boot/dts/sun5i-a10s.dtsi
  71. +++ b/arch/arm/boot/dts/sun5i-a10s.dtsi
  72. @@ -520,6 +520,13 @@
  73. reg = <0x01c20c90 0x10>;
  74. };
  75. + lradc: lradc@01c22800 {
  76. + compatible = "allwinner,sun4i-a10-lradc-keys";
  77. + reg = <0x01c22800 0x100>;
  78. + interrupts = <31>;
  79. + status = "disabled";
  80. + };
  81. +
  82. sid: eeprom@01c23800 {
  83. compatible = "allwinner,sun4i-a10-sid";
  84. reg = <0x01c23800 0x10>;
  85. --- a/arch/arm/boot/dts/sun5i-a13-olinuxino.dts
  86. +++ b/arch/arm/boot/dts/sun5i-a13-olinuxino.dts
  87. @@ -12,8 +12,9 @@
  88. */
  89. /dts-v1/;
  90. -/include/ "sun5i-a13.dtsi"
  91. -/include/ "sunxi-common-regulators.dtsi"
  92. +#include "sun5i-a13.dtsi"
  93. +#include "sunxi-common-regulators.dtsi"
  94. +#include <dt-bindings/input/input.h>
  95. / {
  96. model = "Olimex A13-Olinuxino";
  97. @@ -66,6 +67,46 @@
  98. };
  99. };
  100. + lradc: lradc@01c22800 {
  101. + vref-supply = <&reg_vcc3v0>;
  102. + status = "okay";
  103. +
  104. + button@191 {
  105. + label = "Volume Up";
  106. + linux,code = <KEY_VOLUMEUP>;
  107. + channel = <0>;
  108. + voltage = <191274>;
  109. + };
  110. +
  111. + button@392 {
  112. + label = "Volume Down";
  113. + linux,code = <KEY_VOLUMEDOWN>;
  114. + channel = <0>;
  115. + voltage = <392644>;
  116. + };
  117. +
  118. + button@601 {
  119. + label = "Menu";
  120. + linux,code = <KEY_MENU>;
  121. + channel = <0>;
  122. + voltage = <601151>;
  123. + };
  124. +
  125. + button@795 {
  126. + label = "Enter";
  127. + linux,code = <KEY_ENTER>;
  128. + channel = <0>;
  129. + voltage = <795090>;
  130. + };
  131. +
  132. + button@987 {
  133. + label = "Home";
  134. + linux,code = <KEY_HOMEPAGE>;
  135. + channel = <0>;
  136. + voltage = <987387>;
  137. + };
  138. + };
  139. +
  140. uart1: serial@01c28400 {
  141. pinctrl-names = "default";
  142. pinctrl-0 = <&uart1_pins_b>;
  143. --- a/arch/arm/boot/dts/sun5i-a13.dtsi
  144. +++ b/arch/arm/boot/dts/sun5i-a13.dtsi
  145. @@ -468,6 +468,13 @@
  146. reg = <0x01c20c90 0x10>;
  147. };
  148. + lradc: lradc@01c22800 {
  149. + compatible = "allwinner,sun4i-a10-lradc-keys";
  150. + reg = <0x01c22800 0x100>;
  151. + interrupts = <31>;
  152. + status = "disabled";
  153. + };
  154. +
  155. sid: eeprom@01c23800 {
  156. compatible = "allwinner,sun4i-a10-sid";
  157. reg = <0x01c23800 0x10>;