imx6: backport v5.8 imx6qdl-gw dt patches
[openwrt/openwrt.git] / target / linux / imx6 / patches-5.4 / 008-v5.8-ARM-dts-imx6qdl-gw5904-add-lsm9ds1-iio-imu-magn-supp.patch
1 From c8756cbad816954be912ba32277ccd55fe7acc01 Mon Sep 17 00:00:00 2001
2 From: Tim Harvey <tharvey@gateworks.com>
3 Date: Tue, 12 May 2020 13:59:56 -0700
4 Subject: [PATCH 06/20] ARM: dts: imx6qdl-gw5904: add lsm9ds1 iio imu/magn
5 support
6
7 Add one node for the accel/gyro i2c device and another for the separate
8 magnetometer device in the lsm9ds1.
9
10 Signed-off-by: Tim Harvey <tharvey@gateworks.com>
11 Signed-off-by: Shawn Guo <shawnguo@kernel.org>
12 ---
13 arch/arm/boot/dts/imx6qdl-gw5904.dtsi | 31 +++++++++++++++++++++++++++++++
14 1 file changed, 31 insertions(+)
15
16 diff --git a/arch/arm/boot/dts/imx6qdl-gw5904.dtsi b/arch/arm/boot/dts/imx6qdl-gw5904.dtsi
17 index 6d21cc6..76d6cf5 100644
18 --- a/arch/arm/boot/dts/imx6qdl-gw5904.dtsi
19 +++ b/arch/arm/boot/dts/imx6qdl-gw5904.dtsi
20 @@ -248,6 +248,15 @@
21 pinctrl-0 = <&pinctrl_i2c2>;
22 status = "okay";
23
24 + magn@1c {
25 + compatible = "st,lsm9ds1-magn";
26 + reg = <0x1c>;
27 + pinctrl-names = "default";
28 + pinctrl-0 = <&pinctrl_mag>;
29 + interrupt-parent = <&gpio5>;
30 + interrupts = <17 IRQ_TYPE_EDGE_RISING>;
31 + };
32 +
33 ltc3676: pmic@3c {
34 compatible = "lltc,ltc3676";
35 reg = <0x3c>;
36 @@ -320,6 +329,16 @@
37 };
38 };
39 };
40 +
41 + imu@6a {
42 + compatible = "st,lsm9ds1-imu";
43 + reg = <0x6a>;
44 + st,drdy-int-pin = <1>;
45 + pinctrl-names = "default";
46 + pinctrl-0 = <&pinctrl_imu>;
47 + interrupt-parent = <&gpio4>;
48 + interrupts = <18 IRQ_TYPE_LEVEL_HIGH>;
49 + };
50 };
51
52 &i2c3 {
53 @@ -501,6 +520,18 @@
54 >;
55 };
56
57 + pinctrl_imu: imugrp {
58 + fsl,pins = <
59 + MX6QDL_PAD_DI0_PIN2__GPIO4_IO18 0x1b0b0
60 + >;
61 + };
62 +
63 + pinctrl_mag: maggrp {
64 + fsl,pins = <
65 + MX6QDL_PAD_DISP0_DAT23__GPIO5_IO17 0x1b0b0
66 + >;
67 + };
68 +
69 pinctrl_pcie: pciegrp {
70 fsl,pins = <
71 MX6QDL_PAD_GPIO_0__GPIO1_IO00 0x1b0b0 /* PCIE RST */
72 --
73 2.7.4
74