forked from Minki/linux
ARM: dts: N9/N950: Add support for accelerometer
Signed-off-by: Filip Matijević <filip.matijevic.pz@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Tony Lindgren <tony@atomide.com>
This commit is contained in:
parent
0f4f1542ea
commit
83faf92065
@ -57,3 +57,17 @@
|
||||
&modem {
|
||||
compatible = "nokia,n9-modem";
|
||||
};
|
||||
|
||||
&lis302 {
|
||||
st,axis-x = <1>; /* LIS3_DEV_X */
|
||||
st,axis-y = <(-2)>; /* LIS3_INV_DEV_Y */
|
||||
st,axis-z = <(-3)>; /* LIS3_INV_DEV_Z */
|
||||
|
||||
st,min-limit-x = <(-46)>;
|
||||
st,min-limit-y = <3>;
|
||||
st,min-limit-z = <3>;
|
||||
|
||||
st,max-limit-x = <(-3)>;
|
||||
st,max-limit-y = <46>;
|
||||
st,max-limit-z = <46>;
|
||||
};
|
||||
|
@ -61,6 +61,13 @@
|
||||
};
|
||||
|
||||
&omap3_pmx_core {
|
||||
accelerator_pins: pinmux_accelerator_pins {
|
||||
pinctrl-single,pins = <
|
||||
OMAP3_CORE1_IOPAD(0x21da, PIN_INPUT | MUX_MODE4) /* mcspi2_somi.gpio_180 -> LIS302 INT1 */
|
||||
OMAP3_CORE1_IOPAD(0x21dc, PIN_INPUT | MUX_MODE4) /* mcspi2_cs0.gpio_181 -> LIS302 INT2 */
|
||||
>;
|
||||
};
|
||||
|
||||
debug_leds: pinmux_debug_led_pins {
|
||||
pinctrl-single,pins = <
|
||||
OMAP3_CORE1_IOPAD(0x2108, PIN_OUTPUT | MUX_MODE4) /* dss_data22.gpio_92 */
|
||||
@ -246,6 +253,53 @@
|
||||
|
||||
&i2c3 {
|
||||
clock-frequency = <400000>;
|
||||
|
||||
lis302: lis302@1d {
|
||||
compatible = "st,lis3lv02d";
|
||||
reg = <0x1d>;
|
||||
|
||||
Vdd-supply = <&vaux1>;
|
||||
Vdd_IO-supply = <&vio>;
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&accelerator_pins>;
|
||||
|
||||
interrupts-extended = <&gpio6 20 IRQ_TYPE_EDGE_FALLING>, <&gpio6 21 IRQ_TYPE_EDGE_FALLING>; /* 180, 181 */
|
||||
|
||||
/* click flags */
|
||||
st,click-single-x;
|
||||
st,click-single-y;
|
||||
st,click-single-z;
|
||||
|
||||
/* Limits are 0.5g * value */
|
||||
st,click-threshold-x = <8>;
|
||||
st,click-threshold-y = <8>;
|
||||
st,click-threshold-z = <10>;
|
||||
|
||||
/* Click must be longer than time limit */
|
||||
st,click-time-limit = <9>;
|
||||
|
||||
/* Kind of debounce filter */
|
||||
st,click-latency = <50>;
|
||||
|
||||
st,wakeup-x-hi;
|
||||
st,wakeup-y-hi;
|
||||
st,wakeup-threshold = <(800/18)>; /* millig-value / 18 to get HW values */
|
||||
|
||||
st,wakeup2-z-hi;
|
||||
st,wakeup2-threshold = <(1000/18)>; /* millig-value / 18 to get HW values */
|
||||
|
||||
st,highpass-cutoff-hz = <2>;
|
||||
|
||||
/* Interrupt line 1 for thresholds */
|
||||
st,irq1-ff-wu-1;
|
||||
st,irq1-ff-wu-2;
|
||||
/* Interrupt line 2 for click detection */
|
||||
st,irq2-click;
|
||||
|
||||
st,wu-duration-1 = <8>;
|
||||
st,wu-duration-2 = <8>;
|
||||
};
|
||||
};
|
||||
|
||||
&mmc1 {
|
||||
|
@ -171,3 +171,17 @@
|
||||
MATRIX_KEY(0x07, 0x07, KEY_R)
|
||||
>;
|
||||
};
|
||||
|
||||
&lis302 {
|
||||
st,axis-x = <(-2)>; /* LIS3_INV_DEV_Y */
|
||||
st,axis-y = <(-1)>; /* LIS3_INV_DEV_X */
|
||||
st,axis-z = <(-3)>; /* LIS3_INV_DEV_Z */
|
||||
|
||||
st,min-limit-x = <(-32)>;
|
||||
st,min-limit-y = <3>;
|
||||
st,min-limit-z = <3>;
|
||||
|
||||
st,max-limit-x = <(-3)>;
|
||||
st,max-limit-y = <32>;
|
||||
st,max-limit-z = <32>;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user