From a832cec96a9001bbb160f5115e0d5538cb001fa3 Mon Sep 17 00:00:00 2001 From: luweizhou Date: Mon, 15 Sep 2014 16:34:31 +0800 Subject: [PATCH] ENGR00331506-2 ARM: dts: i.mx6q/dl/sx: Add mma8451 device tree support. Add mma8451 sensor device tree support on i.MX6Q/DL/SX platform. Signed-off-by: Luwei Zhou --- arch/arm/boot/dts/imx6qdl-sabreauto.dtsi | 10 ++++++++++ arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 24 ++++++++++++++++++++++++ arch/arm/boot/dts/imx6sx-sdb.dts | 18 ++++++++++++++++++ 3 files changed, 52 insertions(+) diff --git a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi index 84a39dee35da..e4f3c379d032 100644 --- a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi +++ b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi @@ -116,6 +116,15 @@ gpio-controller; #gpio-cells = <2>; }; + + mma8451@1c { + compatible = "fsl,mma8451"; + reg = <0x1c>; + position = <7>; + interrupt-parent = <&gpio6>; + interrupts = <31 8>; + interrupt-route = <1>; + }; }; &mlb { @@ -136,6 +145,7 @@ MX6QDL_PAD_GPIO_18__SD3_VSELECT 0x17059 MX6QDL_PAD_EIM_A24__GPIO5_IO04 0x80000000 MX6QDL_PAD_SD2_DAT0__GPIO1_IO15 0x80000000 + MX6QDL_PAD_EIM_BCLK__GPIO6_IO31 0x80000000 >; }; diff --git a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi index ee07ab9b46ad..8a710ccccb9d 100644 --- a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi +++ b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi @@ -79,6 +79,17 @@ gpio = <&gpio4 10 0>; enable-active-high; }; + + reg_sensor: regulator@3 { + compatible = "regulator-fixed"; + reg = <3>; + regulator-name = "sensor-supply"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio2 31 0>; + startup-delay-us = <500>; + enable-active-high; + }; }; gpio-keys { @@ -257,6 +268,17 @@ 0x0000 /* 5:Default */ >; }; + + mma8451@1c { + compatible = "fsl,mma8451"; + reg = <0x1c>; + position = <0>; + vdd-supply = <®_sensor>; + vddio-supply = <®_sensor>; + interrupt-parent = <&gpio1>; + interrupts = <18 8>; + interrupt-route = <1>; + }; }; &i2c2 { @@ -315,6 +337,8 @@ MX6QDL_PAD_ENET_RXD0__GPIO1_IO27 0x80000000 MX6QDL_PAD_EIM_A25__GPIO5_IO02 0x80000000 MX6QDL_PAD_EIM_D23__GPIO3_IO23 0x80000000 + MX6QDL_PAD_EIM_EB3__GPIO2_IO31 0x80000000 + MX6QDL_PAD_SD1_CMD__GPIO1_IO18 0x80000000 >; }; diff --git a/arch/arm/boot/dts/imx6sx-sdb.dts b/arch/arm/boot/dts/imx6sx-sdb.dts index aca3d73d6130..b55a5ea0fe32 100644 --- a/arch/arm/boot/dts/imx6sx-sdb.dts +++ b/arch/arm/boot/dts/imx6sx-sdb.dts @@ -319,6 +319,15 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_i2c3>; status = "okay"; + + mma8451@1c { + compatible = "fsl,mma8451"; + reg = <0x1c>; + position = <1>; + interrupt-parent = <&gpio6>; + interrupts = <2 8>; + interrupt-route = <2>; + }; }; &i2c4 { @@ -329,7 +338,16 @@ }; &iomuxc { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_hog>; + imx6x-sdb { + pinctrl_hog: hoggrp { + fsl,pins = < + MX6SX_PAD_SD1_DATA0__GPIO6_IO_2 0x17059 + >; + }; + pinctrl_canfd1: canfd1grp-1 { fsl,pins = < MX6SX_PAD_QSPI1B_DQS__CANFD_TX1 0x1b0b0 -- 2.39.5