From patchwork Tue Dec 1 13:48:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 57490 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp2183761lbb; Tue, 1 Dec 2015 05:50:58 -0800 (PST) X-Received: by 10.66.62.131 with SMTP id y3mr99317429par.104.1448977856694; Tue, 01 Dec 2015 05:50:56 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id 85si9242609pfn.11.2015.12.01.05.50.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Dec 2015 05:50:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dkim=neutral (body hash did not verify) header.i=@linaro-org.20150623.gappssmtp.com Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1a3lJ4-0006hh-FE; Tue, 01 Dec 2015 13:49:22 +0000 Received: from mail-lf0-x22d.google.com ([2a00:1450:4010:c07::22d]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1a3lJ0-0006YG-TJ for linux-arm-kernel@lists.infradead.org; Tue, 01 Dec 2015 13:49:20 +0000 Received: by lfdl133 with SMTP id l133so8665623lfd.2 for ; Tue, 01 Dec 2015 05:48:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=9vKMbyt22fkMBZP3evKH4PYo1orrPCKxNHYiUZQMfDI=; b=GhSfp7gu/mNRVt8x+CdwRjPynAgp3VDtvZ38BJfQl9BVpUHZ11L9ygwGFg0Cu7gs8g i/Ia3kRavE0I7RyHlZ2adwfMY+weS/UeAaqBq+zVjFoNw/263xLesH07ZLZgiQrxK/iV iioYkFkujOg/PjZ/E/ByXUcN3VxBHzczbVFcElfCD2nXClGcByzjR6wPgCuxhlWdBNm/ aM9+A2le8tLkesWy+mBQND98EO/rkXl/vNtNrmuvfGVg6Xuz8vIRV/H3tcuqDNnIkmkH 8b+RFRr72CW8G9Xv3vbrlsSKiXCwain3GhNxu57wIn06+7Oj9ApmI4h+CXQ6Hwvfit4/ kXqQ== 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=9vKMbyt22fkMBZP3evKH4PYo1orrPCKxNHYiUZQMfDI=; b=Ugs8SmiS5WX3hppjLELFHeLOMTrW2pa21EhQweXeX2c0VhLhJhBlqBM+nhcySeWVAG /LJEKVnEz5z4Oac4XQj3PXt3nIUv8TTnNJwUQj8lTc8opCIrz5yreML8QrtQuSOz8aG/ nPrH65qGEDhBoptAqrUulvbaIhUmydCnmyhIb0T2G1qOTW759pzJ/6TPjeRuYG0booIG aO9E2M5CBHVxgp6hm3i0XViz3Zi5LmdMB+CLs3NpFocuynhCXLJvLCPdcZrdoXJt8stf sFFpgAjChpuu9N4ZFLuabOhog/T1yBdiq3t7iSpPYqtgEhA5eSsr/9hHx5g9eSUWq7SU Qdtg== X-Gm-Message-State: ALoCoQlsC6vRJ5QQeXaknjBVQGy7QXvIAPY4hcU5AuegUvzgGKLtu2Ls6UFu+mkUZ3dOoOCPzqg8 X-Received: by 10.25.158.134 with SMTP id h128mr12227432lfe.53.1448977736783; Tue, 01 Dec 2015 05:48:56 -0800 (PST) Received: from localhost.localdomain ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id l81sm8022530lfb.40.2015.12.01.05.48.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Dec 2015 05:48:55 -0800 (PST) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] ARM: ux500: configure the sensors on the TVK board correctly Date: Tue, 1 Dec 2015 14:48:51 +0100 Message-Id: <1448977731-7719-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.4.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151201_054919_211422_326FE66F X-CRM114-Status: GOOD ( 14.44 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:4010:c07:0:0:0:22d listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linus Walleij MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org The U8500 HREF TVK board actually has a large set of sensors, with their interrupt lines connected using open drain electronics. Configure the two accelerometers and two magnetometers so we get all sensors to actually probe on boot. Signed-off-by: Linus Walleij --- arch/arm/boot/dts/ste-href-tvk1281618.dtsi | 50 +++++++++++++++++++++++++----- 1 file changed, 43 insertions(+), 7 deletions(-) -- 2.4.3 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm/boot/dts/ste-href-tvk1281618.dtsi b/arch/arm/boot/dts/ste-href-tvk1281618.dtsi index 3228119f91d1..b7b4211c5353 100644 --- a/arch/arm/boot/dts/ste-href-tvk1281618.dtsi +++ b/arch/arm/boot/dts/ste-href-tvk1281618.dtsi @@ -104,13 +104,40 @@ <19 IRQ_TYPE_EDGE_RISING>; }; lsm303dlh@1e { - /* Magnetometer */ + /* + * This magnetometer is packaged with + * the accelerometer, and has a DRDY line, + * however it is not connected on this + * board so it can not generate interrupts. + */ compatible = "st,lsm303dlh-magn"; reg = <0x1e>; vdd-supply = <&ab8500_ldo_aux1_reg>; vddio-supply = <&db8500_vsmps2_reg>; + }; + lis331dl@1c { + /* Accelerometer */ + compatible = "st,lis331dl-accel"; + st,drdy-int-pin = <1>; + reg = <0x1c>; + vdd-supply = <&ab8500_ldo_aux1_reg>; + vddio-supply = <&db8500_vsmps2_reg>; + pinctrl-names = "default"; + pinctrl-0 = <&accel_tvk_mode>; + interrupt-parent = <&gpio2>; + interrupts = <18 IRQ_TYPE_EDGE_RISING>, + <19 IRQ_TYPE_EDGE_RISING>; + }; + ak8974@0f { + /* Magnetometer */ + compatible = "asahi-kasei,ak8974"; + reg = <0x0f>; + vdd-supply = <&ab8500_ldo_aux1_reg>; + vddio-supply = <&db8500_vsmps2_reg>; pinctrl-names = "default"; - pinctrl-0 = <&magneto_tvk_mode>; + pinctrl-0 = <&gyro_magn_tvk_mode>; + interrupt-parent = <&gpio1>; + interrupts = <0 IRQ_TYPE_EDGE_RISING>; }; l3g4200d@68 { /* Gyroscope */ @@ -119,6 +146,10 @@ reg = <0x68>; vdd-supply = <&ab8500_ldo_aux1_reg>; vddio-supply = <&db8500_vsmps2_reg>; + pinctrl-names = "default"; + pinctrl-0 = <&gyro_magn_tvk_mode>; + interrupt-parent = <&gpio1>; + interrupts = <0 IRQ_TYPE_EDGE_RISING>; }; lsp001wm@5c { /* Barometer/pressure sensor */ @@ -159,17 +190,22 @@ /* Accelerometer interrupt lines 1 & 2 */ tvk_cfg { pins = "GPIO82_C1", "GPIO83_D3"; - ste,config = <&gpio_in_pu>; + ste,config = <&gpio_in_pd>; }; }; }; - magnetometer { - magneto_tvk_mode: magneto_tvk { - /* Magnetometer uses GPIO 31 and 32, pull these up/down respectively */ + gyroscope { + /* + * These lines are shared between Gyroscope l3g400dh + * and AK8974 magnetometer. + */ + gyro_magn_tvk_mode: gyro_magn_tvk { + /* GPIO 31 used for INT pull down the line */ tvk_cfg1 { pins = "GPIO31_V3"; - ste,config = <&gpio_in_pu>; + ste,config = <&gpio_in_pd>; }; + /* GPIO 32 used for DRDY, pull this down */ tvk_cfg2 { pins = "GPIO32_V2"; ste,config = <&gpio_in_pd>;