From patchwork Wed Sep 26 23:51:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Masney X-Patchwork-Id: 10617045 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7646F13A4 for ; Wed, 26 Sep 2018 23:51:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 65AED2B6DB for ; Wed, 26 Sep 2018 23:51:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 578042B6DF; Wed, 26 Sep 2018 23:51:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA3BF2B6DB for ; Wed, 26 Sep 2018 23:51:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726298AbeI0GGo (ORCPT ); Thu, 27 Sep 2018 02:06:44 -0400 Received: from onstation.org ([52.200.56.107]:46912 "EHLO onstation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726991AbeI0GGl (ORCPT ); Thu, 27 Sep 2018 02:06:41 -0400 Received: from localhost.localdomain (c-98-239-145-235.hsd1.wv.comcast.net [98.239.145.235]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: masneyb) by onstation.org (Postfix) with ESMTPSA id 2435F1A5D; Wed, 26 Sep 2018 23:51:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=onstation.org; s=default; t=1538005876; bh=AbijTUlqJEINkKBnFEwxoR55EO04oXxqQCEAq2xE4Mc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qaiiTuL8uM+2h+hEWg1yV9rcMO7mlG4BSoWLhOXbyi0SH6/76BrcwqOsOmjkYlpMa DPb1B2GIuQYvIt6SmH3IL+FgsI0kA6+M3ai5oziwjUCJnV3MoOzX63olRgnJi3kcTJ CG8sIQbmTc0V9kmBAdPxR9tC2Yqd5xVnNzOdNmFQ= From: Brian Masney To: thierry.reding@gmail.com, linux-pwm@vger.kernel.org, andy.gross@linaro.org, david.brown@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: masneyb@onstation.org, jonathan@marek.ca, ctatlor97@gmail.com Subject: [PATCH v2 3/3] ARM: dts: qcom: msm8974-hammerhead: add device tree bindings for vibrator Date: Wed, 26 Sep 2018 19:51:12 -0400 Message-Id: <20180926235112.25710-4-masneyb@onstation.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180926235112.25710-1-masneyb@onstation.org> References: <20180926235112.25710-1-masneyb@onstation.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds device device tree bindings for the vibrator found on the LG Nexus 5 (hammerhead) phone. Signed-off-by: Brian Masney --- .../qcom-msm8974-lge-nexus5-hammerhead.dts | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts b/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts index ed8f064d0895..e67d61f25a96 100644 --- a/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts +++ b/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts @@ -5,6 +5,7 @@ #include #include #include +#include / { model = "LGE MSM 8974 HAMMERHEAD"; @@ -268,6 +269,44 @@ input-enable; }; }; + + vibrator_pin: vibrator { + pwm { + pins = "gpio27"; + function = "gp1_clk"; + + drive-strength = <6>; + bias-disable; + }; + + enable { + pins = "gpio60"; + function = "gpio"; + }; + }; + }; + + msm_pwm_vibrator_enable: pwm@fd8c3450 { + compatible = "qcom,msm8974-pwm-vibrator"; + reg = <0xfd8c3450 0x400>; + #pwm-cells = <3>; + + vcc-supply = <&pm8941_l19>; + + clocks = <&mmcc CAMSS_GP1_CLK>; + clock-names = "pwm"; + + enable-gpios = <&msmgpio 60 GPIO_ACTIVE_HIGH>; + + pinctrl-names = "default"; + pinctrl-0 = <&vibrator_pin>; + }; + + vibrator { + compatible = "pwm-vibrator"; + + pwms = <&msm_pwm_vibrator_enable 0 1000000000 0>; + pwm-names = "enable"; }; sdhci@f9824900 {