From patchwork Thu Jan 5 15:13:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 90038 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp9014336qgi; Thu, 5 Jan 2017 07:13:53 -0800 (PST) X-Received: by 10.99.55.13 with SMTP id e13mr76269281pga.71.1483629233838; Thu, 05 Jan 2017 07:13:53 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o33si76294504plb.300.2017.01.05.07.13.53; Thu, 05 Jan 2017 07:13:53 -0800 (PST) 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 S1030412AbdAEPNw (ORCPT + 9 others); Thu, 5 Jan 2017 10:13:52 -0500 Received: from mail-lf0-f46.google.com ([209.85.215.46]:35679 "EHLO mail-lf0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759173AbdAEPNw (ORCPT ); Thu, 5 Jan 2017 10:13:52 -0500 Received: by mail-lf0-f46.google.com with SMTP id m78so15293726lfg.2 for ; Thu, 05 Jan 2017 07:13:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=AmIdOBd0YGlaxBYK2+loCOB+JIQ7aHnQeqKwsGMNWPc=; b=J6yJWBcYxlJh5mshCyD7VxPE4sKp3ysPvDMWMqmp4eE8NPqucukLkzwnocjFGPoZvG sYjDJa7ria7a9cB8aNJZMkvSAUYMg6uDNNPp6G8f9CQ6A+T+jCje9DVSk9sYq+o8hHBV 4H7T+bplo08TucLt/diTUujb0zUykJKHIUQHs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=AmIdOBd0YGlaxBYK2+loCOB+JIQ7aHnQeqKwsGMNWPc=; b=jATeA1a8TD9xpEcAi1KHHcLbDBo9tbw94YFuhdREW3+AQEds/sY2UBOJVimIpcCLsG cQLSs1/voyQ4YxhBqL15cHhw4LvnwNIcPnATooisNtN9wPXtNb2TvrW7xeQ47+OMe/EO uyu/ctEZffPBSBW7hwOCZiC/YFdOTc1ilvOzP1UzrU3n2qmtz5JdpljwmrpI4y/KB/lZ U8XWzOn/X7ohSiwc4Jx1d3UcLgDOHXWq8iwGk/hKK2rz+T8IGEpeiqkv2jZJbtmYWjDo 8f1mHrssxSuYEX1aY2iLYn8IndfXNCeF4Vjs9h7JHyysl8HJ2I94i4GqKzLr170F9euA TwNg== X-Gm-Message-State: AIkVDXIdReXN+0Ovl2rc0LcLB9C8ed4R8C3OuBu2GxUK5WrwsAogOwuZb1pBADA9MQjAGkjy X-Received: by 10.46.8.25 with SMTP id 25mr26777370lji.21.1483629230328; Thu, 05 Jan 2017 07:13:50 -0800 (PST) Received: from localhost.localdomain (c-357171d5.014-348-6c756e10.cust.bredbandsbolaget.se. [213.113.113.53]) by smtp.gmail.com with ESMTPSA id v9sm18325988lja.0.2017.01.05.07.13.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Jan 2017 07:13:49 -0800 (PST) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Andy Gross , Bjorn Andersson Cc: Stephen Boyd , David Brown , Linus Walleij Subject: [PATCH 3/3 v5] ARM: dts: Add gyro and accel to APQ8060 Dragonboard Date: Thu, 5 Jan 2017 16:13:36 +0100 Message-Id: <20170105151336.18667-3-linus.walleij@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170105151336.18667-1-linus.walleij@linaro.org> References: <20170105151336.18667-1-linus.walleij@linaro.org> 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. Acked-by: Bjorn Andersson Signed-off-by: Linus Walleij --- ChangeLog v4->v5: - No changes, just rebased on v4.10-rc1 ChangeLog v3->v4: - Use interrupts-extended - Add Bjorn's ACK. ChangeLog v2->v3: - Move the interrupt to the pm8058 alias to reflect the two patches properly specifying the PMIC as interrupt parent. 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 | 52 ++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) -- 2.9.3 -- 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 diff --git a/arch/arm/boot/dts/qcom-apq8060-dragonboard.dts b/arch/arm/boot/dts/qcom-apq8060-dragonboard.dts index ea660ffa03ea..39d9e6ddefed 100644 --- a/arch/arm/boot/dts/qcom-apq8060-dragonboard.dts +++ b/arch/arm/boot/dts/qcom-apq8060-dragonboard.dts @@ -220,6 +220,14 @@ function = "ebi2"; }; }; + + /* Interrupt line for the KXSD9 accelerometer */ + dragon_kxsd9_gpios: kxsd9 { + irq { + pins = "gpio57"; /* IRQ line */ + bias-pull-up; + }; + }; }; qcom,ssbi@500000 { @@ -272,6 +280,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"; @@ -389,6 +406,41 @@ 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. + */ + interrupts-extended = <&pm8058 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 + }; + }; + }; }; };