From patchwork Wed Oct 26 09:23:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 79371 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp305830qge; Wed, 26 Oct 2016 02:23:30 -0700 (PDT) X-Received: by 10.98.205.207 with SMTP id o198mr2385553pfg.114.1477473810064; Wed, 26 Oct 2016 02:23:30 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id es6si1303630pad.273.2016.10.26.02.23.29; Wed, 26 Oct 2016 02:23:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754001AbcJZJX0 (ORCPT + 10 others); Wed, 26 Oct 2016 05:23:26 -0400 Received: from mail-lf0-f45.google.com ([209.85.215.45]:37300 "EHLO mail-lf0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752101AbcJZJXZ (ORCPT ); Wed, 26 Oct 2016 05:23:25 -0400 Received: by mail-lf0-f45.google.com with SMTP id m193so2882530lfm.4 for ; Wed, 26 Oct 2016 02:23:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=f+pEbfxETUmH4W7c+92jxCwTkIEcyKK2ucFXkhhPcs4=; b=IV/+nYnBGho16b7Qf82pkJFgYAkT7ZV+qu5nCCHcLEViTPO9D+l3LuqLAdZBW9/fJq PWwTUwAU9hcR1b6XoInAlStEoGJ65VGHBNvBlCNIiyB4/fvIdllVGplx0HV4Ieg76h/x mq8GD7nRzSdgBBQEcX4Tk58DN95oYed5uHSys= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=f+pEbfxETUmH4W7c+92jxCwTkIEcyKK2ucFXkhhPcs4=; b=HtfCE7M5OwYjMwcOhBiR6Qkks8mvqejUaIhK+sqZBR4b5euRmgh/sl6MkTV5xElYbL IaoWX1Hj3ksnhMHdu2vi2IiC9xG/QwVZWEVLItpdwFyo5lCGKuF6GdP8mdNeQ5693kO+ oSgOaSu0TIRC1/O24rAkZdOXzEhcOPye7Ke54UKIp6qW1FuVWaZLNbiDXd9gN6XRir6Z 15zosM3uOBPdJDrGER3uuJ0i+fKYwmvZkZVzeeE3HyuD2XIja0XQxF/aPj/gBACQIFUa 2Pgrhel7MsZjDsXtLOGHodTl5Y018LKVVrCmy0NXl3HbfSWh+Hrty/rdhj5rz2h101PA XsuA== X-Gm-Message-State: ABUngvdYP+I6U+g9ux5PyXb703PkC4HwjEAaCr4Ni40Ix5FgQG2Ng2KSVZXjMT2tsakP1Qlg X-Received: by 10.25.159.141 with SMTP id i135mr807050lfe.123.1477473798603; Wed, 26 Oct 2016 02:23:18 -0700 (PDT) Received: from linuslaptop.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id u14sm210035lja.46.2016.10.26.02.23.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Oct 2016 02:23:18 -0700 (PDT) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Andy Gross Cc: Stephen Boyd , Bjorn Andersson , David Brown , Linus Walleij Subject: [PATCH v3] ARM: dts: Add gyro and accel to APQ8060 Dragonboard Date: Wed, 26 Oct 2016 11:23:14 +0200 Message-Id: <1477473794-26030-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This adds the MPU-3050 gyroscope and the KXSD9 accelerometer to the Qualcomm APQ8060 Dragonboard. The KXSD9 is mounted beyond the MPU-3050 and appear as a subdevice beyond it. We set up the required GPIO and interrupt lines to make the devices work. Signed-off-by: Linus Walleij --- ChangeLog v2->v3: - Should be fine to apply now: all bindings and requirements are merged. ChangeLog v1->v2: - Use the new I2C mux gate bindings from Peter Rosin (merged to the I2C subsystem) --- arch/arm/boot/dts/qcom-apq8060-dragonboard.dts | 53 ++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Acked-by: Bjorn Andersson diff --git a/arch/arm/boot/dts/qcom-apq8060-dragonboard.dts b/arch/arm/boot/dts/qcom-apq8060-dragonboard.dts index 6c0038398ef2..1d76b7415f08 100644 --- a/arch/arm/boot/dts/qcom-apq8060-dragonboard.dts +++ b/arch/arm/boot/dts/qcom-apq8060-dragonboard.dts @@ -167,6 +167,14 @@ bias-pull-up; }; }; + + /* Interrupt line for the KXSD9 accelerometer */ + dragon_kxsd9_gpios: kxsd9 { + irq { + pins = "gpio57"; /* IRQ line */ + bias-pull-up; + }; + }; }; qcom,ssbi@500000 { @@ -210,6 +218,15 @@ power-source = ; }; }; + dragon_mpu3050_gpios: mpu3050-gpios { + pinconf { + pins = "gpio17"; + function = "normal"; + input-enable; + bias-disable; + power-source = ; + }; + }; dragon_sdcc3_gpios: sdcc3-gpios { pinconf { pins = "gpio22"; @@ -319,6 +336,42 @@ vddd-supply = <&pm8058_lvs0>; // 1.8V vdda-supply = <&pm8058_l14>; // 2.85V }; + mpu3050@68 { + compatible = "invensense,mpu3050"; + reg = <0x68>; + /* + * GPIO17 has interrupt 208 on the + * PM8058, it is pulled high by a 10k + * resistor to VLOGIC so needs to be + * active low/falling edge. + */ + interrupt-parent = <&pm8058_gpio>; + interrupts = <208 IRQ_TYPE_EDGE_FALLING>; + pinctrl-names = "default"; + pinctrl-0 = <&dragon_mpu3050_gpios>; + vlogic-supply = <&pm8058_lvs0>; // 1.8V + vdd-supply = <&pm8058_l14>; // 2.85V + + /* + * The MPU-3050 acts as a hub for the + * accelerometer. + */ + i2c-gate { + #address-cells = <1>; + #size-cells = <0>; + + kxsd9@18 { + compatible = "kionix,kxsd9"; + reg = <0x18>; + interrupt-parent = <&tlmm>; + interrupts = <57 IRQ_TYPE_EDGE_FALLING>; + pinctrl-names = "default"; + pinctrl-0 = <&dragon_kxsd9_gpios>; + iovdd-supply = <&pm8058_lvs0>; // 1.8V + vdd-supply = <&pm8058_l14>; // 2.85V + }; + }; + }; }; };