From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bjorn Andersson Subject: Re: [PATCH 3/3 v4] ARM: dts: Add gyro and accel to APQ8060 Dragonboard Date: Tue, 8 Nov 2016 21:33:09 -0800 Message-ID: <20161109053309.GQ25787@tuxbot> References: <1478508284-10847-1-git-send-email-linus.walleij@linaro.org> <1478508284-10847-3-git-send-email-linus.walleij@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail-pf0-f182.google.com ([209.85.192.182]:36667 "EHLO mail-pf0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751100AbcKIFd1 (ORCPT ); Wed, 9 Nov 2016 00:33:27 -0500 Received: by mail-pf0-f182.google.com with SMTP id 189so120881736pfz.3 for ; Tue, 08 Nov 2016 21:33:14 -0800 (PST) Content-Disposition: inline In-Reply-To: <1478508284-10847-3-git-send-email-linus.walleij@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Linus Walleij Cc: linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Andy Gross , Stephen Boyd , David Brown On Mon 07 Nov 00:44 PST 2016, Linus Walleij wrote: > 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 v3->v4: > - Use interrupts-extended > - Add Bjorn's ACK. Looks like it didn't make it to the message after all, but Andy is using patchworks, so here we go again :) Acked-by: Bjorn Andersson Regards, Bjorn > 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(+) > > 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 > + }; > + }; > + }; > }; > }; > > -- > 2.7.4 > From mboxrd@z Thu Jan 1 00:00:00 1970 From: bjorn.andersson@linaro.org (Bjorn Andersson) Date: Tue, 8 Nov 2016 21:33:09 -0800 Subject: [PATCH 3/3 v4] ARM: dts: Add gyro and accel to APQ8060 Dragonboard In-Reply-To: <1478508284-10847-3-git-send-email-linus.walleij@linaro.org> References: <1478508284-10847-1-git-send-email-linus.walleij@linaro.org> <1478508284-10847-3-git-send-email-linus.walleij@linaro.org> Message-ID: <20161109053309.GQ25787@tuxbot> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Mon 07 Nov 00:44 PST 2016, Linus Walleij wrote: > 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 v3->v4: > - Use interrupts-extended > - Add Bjorn's ACK. Looks like it didn't make it to the message after all, but Andy is using patchworks, so here we go again :) Acked-by: Bjorn Andersson Regards, Bjorn > 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(+) > > 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 at 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 at 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 at 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 > + }; > + }; > + }; > }; > }; > > -- > 2.7.4 >