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