summaryrefslogtreecommitdiffstats
path: root/arch/arm/boot/dts/omap4-droid4-xt894.dts
blob: e833c21f1c01491956bc1949d385ad673edf0011 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
// SPDX-License-Identifier: GPL-2.0-only
/dts-v1/;

#include "motorola-mapphone-common.dtsi"

/ {
	gpio_keys {
		compatible = "gpio-keys";

		volume_down {
			label = "Volume Down";
			gpios = <&gpio5 26 GPIO_ACTIVE_LOW>; /* gpio154 */
			linux,code = <KEY_VOLUMEDOWN>;
			linux,can-disable;
			/* Value above 7.95ms for no GPIO hardware debounce */
			debounce-interval = <10>;
		};

		/*
		 * We use pad 0x4a100116 abe_dmic_din3.gpio_122 as the irq instead
		 * of the gpio interrupt to avoid lost events in deeper idle states.
		*/
		slider {
			label = "Keypad Slide";
			interrupts-extended = <&omap4_pmx_core 0xd6>;
			gpios = <&gpio4 26 GPIO_ACTIVE_HIGH>; /* gpio122 */
			linux,input-type = <EV_SW>;
			linux,code = <SW_KEYPAD_SLIDE>;
			linux,can-disable;
			/* Value above 7.95ms for no GPIO hardware debounce */
			debounce-interval = <10>;
		};
	};
};

/ {
	model = "Motorola Droid 4 XT894";
	compatible = "motorola,droid4", "ti,omap4430", "ti,omap4";
};

&keypad {
	keypad,num-rows = <8>;
	keypad,num-columns = <8>;
	linux,keymap = <

	/* Row 1 */
	MATRIX_KEY(0, 2, KEY_1)
	MATRIX_KEY(0, 6, KEY_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)
	MATRIX_KEY(6, 3, KEY_UP)
	MATRIX_KEY(7, 3, KEY_OK)

	/* Row 5 */
	MATRIX_KEY(2, 5, KEY_LEFTCTRL)		/* KEY_LEFTSHIFT */
	MATRIX_KEY(4, 5, KEY_LEFTALT)		/* SYM */
	MATRIX_KEY(6, 0, KEY_MINUS)
	MATRIX_KEY(4, 7, KEY_EQUAL)
	MATRIX_KEY(1, 5, KEY_SPACE)
	MATRIX_KEY(3, 2, KEY_SLASH)
	MATRIX_KEY(4, 3, KEY_LEFT)
	MATRIX_KEY(5, 3, KEY_DOWN)
	MATRIX_KEY(3, 3, KEY_RIGHT)

	/* Side buttons, KEY_VOLUMEDOWN and KEY_PWER are on CPCAP? */
	MATRIX_KEY(5, 0, KEY_VOLUMEUP)
	>;
};

&i2c1 {
	led-controller@38 {
		compatible = "ti,lm3532";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0x38>;

		enable-gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>;

		ramp-up-us = <1024>;
		ramp-down-us = <8193>;

		backlight_led: led@0 {
			reg = <0>;
			led-sources = <2>;
			ti,led-mode = <0>;
			label = ":backlight";
		};

		led@1 {
			reg = <1>;
			led-sources = <1>;
			ti,led-mode = <0>;
			label = ":kbd_backlight";
		};
	};
};

&i2c4 {
	lis3dh: accelerometer@18 {
		compatible = "st,lis3dh-accel";
		reg = <0x18>;

		vdd-supply = <&vhvio>;

		interrupt-parent = <&gpio2>;
		interrupts = <2 IRQ_TYPE_EDGE_BOTH>; /* gpio34 */

		rotation-matrix = "0", "-1", "0",
				  "1", "0", "0",
				  "0", "0", "1";
	};
};