From patchwork Thu Jun 22 02:05:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lin, Meng-Bo" X-Patchwork-Id: 695867 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2921EB64D7 for ; Thu, 22 Jun 2023 02:06:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229796AbjFVCGb (ORCPT ); Wed, 21 Jun 2023 22:06:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230264AbjFVCG3 (ORCPT ); Wed, 21 Jun 2023 22:06:29 -0400 Received: from mail-40132.protonmail.ch (mail-40132.protonmail.ch [185.70.40.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6A8D1FE7; Wed, 21 Jun 2023 19:06:08 -0700 (PDT) Date: Thu, 22 Jun 2023 02:05:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1687399566; x=1687658766; bh=9Osyd7zMvptKqruHnCZMd8o/FOKHIT+eTshZCfZIz54=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=u5+aWGZ0/uGAFfyormP+GoQyr+P5jEWm+No4L3iLzpoJaIPhxN+aMaky+SeTe15WT 3ClmMjE0N+QWDrAKwQePapQ50ScXmCtYDxkAQTuOgxEyPmjCXRqjJ3aiLMqIyDmnip PBGZuunXpt3yTyfMzC6qh5uHZ/xI2sH6XPb67lEvxrgIT819a+As3RvAcov6+s7kJP tBelNZmitaSm6u3VoFrFJY6a20hJvPjccPM6+irXRzGiSXfLT2P3culoVxCVWE9SaW BA9qafWd4AGxfFTk5/bjHCmezoQ/Fcjk7hihOBuChG9gl1Z/Nh7WXiFdN3C5kk35dy XqH0AGlIEuplA== To: linux-kernel@vger.kernel.org From: "Lin, Meng-Bo" Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stephan Gerhold , Nikita Travkin , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht Subject: [PATCH 7/8] arm64: dts: qcom: msm8939-samsung-a7: Add vibrator Message-ID: <20230622020541.65860-1-linmengbo0689@protonmail.com> In-Reply-To: <20230622020344.65745-1-linmengbo0689@protonmail.com> References: <20230622020344.65745-1-linmengbo0689@protonmail.com> Feedback-ID: 40467236:user:proton MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org A7 uses motor driver controlled with PWM signal with a fixed regulator that powers the driver and is controlled by enable signal. Signed-off-by: Lin, Meng-Bo --- .../boot/dts/qcom/msm8939-samsung-a7.dts | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts b/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts index dcbc8a97ce63..ea74b61782de 100644 --- a/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts +++ b/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts @@ -185,6 +185,16 @@ touchkey@20 { }; }; + pwm_vibrator: pwm-vibrator { + compatible = "clk-pwm"; + #pwm-cells = <2>; + + clocks = <&gcc GCC_GP2_CLK>; + + pinctrl-0 = <&motor_pwm_default>; + pinctrl-names = "default"; + }; + reg_keyled: regulator-keyled { compatible = "regulator-fixed"; regulator-name = "keyled"; @@ -211,6 +221,28 @@ reg_touch_key: regulator-touch-key { pinctrl-0 = <&tkey_en_default>; pinctrl-names = "default"; }; + + reg_vibrator: regulator-vibrator { + compatible = "regulator-fixed"; + regulator-name = "motor_en"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + + gpio = <&tlmm 86 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-0 = <&motor_en_default>; + pinctrl-names = "default"; + }; + + vibrator { + compatible = "pwm-vibrator"; + + pwms = <&pwm_vibrator 0 100000>; + pwm-names = "enable"; + + vcc-supply = <®_vibrator>; + }; }; &blsp_i2c1 { @@ -311,6 +343,18 @@ gpio_keys_default: gpio-keys-default-state { bias-pull-up; }; + motor_en_default: motor-en-default-state { + pins = "gpio86"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + motor_pwm_default: motor-pwm-default-state { + pins = "gpio50"; + function = "gcc_gp2_clk_a"; + }; + muic_int_default: muic-int-default-state { pins = "gpio12"; function = "gpio";