Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp830257rwl; Thu, 5 Jan 2023 05:17:17 -0800 (PST) X-Google-Smtp-Source: AMrXdXvVZNqxGoKN7HO+iuPaaY0c9WhTOB9eKKTSfKOfVP9tI1yw3TjMgePzGLT3b3TG70bA7Nb2 X-Received: by 2002:a62:f211:0:b0:581:68ea:50 with SMTP id m17-20020a62f211000000b0058168ea0050mr32923470pfh.26.1672924637366; Thu, 05 Jan 2023 05:17:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672924637; cv=none; d=google.com; s=arc-20160816; b=I6mYOS5p78fXBr8GjdB9C8hyvQwfrnjCM4abyngtd4LIPQ7Uj2vHAWFk+8ucCGXekC khEq6AIuCekkpjqM/1i0cN6dx1lLPjF0UWAkr1xjQDfJvzm/9XeLvm6NlMtmkgaALR7r lmXl6MlYM+osnVpxCdn085Yp6WK4mcZ8ZkD3/pCoBKBMl7ioBOzBR6TeQX3hmmPSosaL hym6OIlDnDrtnedloCRrgbj2NHIrI7ic44DC+XfkEPG3TY4O9sp0qHmtlJZD1SZuyxM+ 2164DXvPUvOqGRRuGI632LX7NCpbdlVz1QnilrNslrGv/o0al7fcYE4bLu+exmNxqrG3 7B5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=MqETbJSIiTzlradT3q/BrlmGOw1Pg87KslHM3cPg3/g=; b=Q1ZfaXnqaEeFE+wutM8/gN26gjjI5+8O2xeGr5cZWfGsibXVsdMPWOTWqnZl5It+fQ S7ReRFe8Hft0GSKkIRjRYPdaXwI4M1dHewMeSMTmZzQai3M+1MhRRlSyFdiHcP2RM3lc 5oGAv4s4zJMFI6xejefSx5QHyaHTpu+FfokQV5KMRwFMUEpDvsLLYULgqrGTTRHh7yC2 y4QRwK7G57agwfPfCyU4F1GTDiMJLUQGM4d+UHQlKgW3+yc8E5SPX7D3wig2IPQwcPNY A9cYD0izv+39BMPF38SbeHiZrF7zivO6oFItK537jQbG+Gfzg1aETeozF4dWT8Twv12I coeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@trvn.ru header.s=mail header.b=O6qIpXLl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=trvn.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m65-20020a625844000000b0053b36138dc5si34943513pfb.222.2023.01.05.05.17.08; Thu, 05 Jan 2023 05:17:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@trvn.ru header.s=mail header.b=O6qIpXLl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=trvn.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232154AbjAEMvu (ORCPT + 56 others); Thu, 5 Jan 2023 07:51:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233342AbjAEMv2 (ORCPT ); Thu, 5 Jan 2023 07:51:28 -0500 Received: from box.trvn.ru (box.trvn.ru [194.87.146.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56F0E4BD68; Thu, 5 Jan 2023 04:51:26 -0800 (PST) Received: from authenticated-user (box.trvn.ru [194.87.146.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by box.trvn.ru (Postfix) with ESMTPSA id 6873E420D1; Thu, 5 Jan 2023 17:33:57 +0500 (+05) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=trvn.ru; s=mail; t=1672922038; bh=Q9PyOYwHzV6hYDK9dXXB+GuVnQwRSCoeQeyi78nz73I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O6qIpXLl4UvqKGU1e3SF8yjsLQYthoP8q8EapvOKZSM7nkD1VV+GG6iMn2PPXeMkP bTRwHohiJ/XM27qqxd3Axfak4HF9oWRzg27uCoqd1QrIEUDYi1Q/RBv77QlroS/40w 2Gt6NjuKBLYk7oKXV5lmkdATKd81sIWWO4vMYnthjg7LvXiNMaWTq/L+1E1D9/8J3c yfZWxBTuE0hEZtPzlFQG/7IV7pyH75115Ndydc+yo9BTw/sAqC76UHpEca2WyZO9NR 7fmAbYFMR2ZtVwT/5grR2YqS2YfX0MsUZ+44Ah129iO5j8LMxF/IPa5kg0Wj3rXiDF kYWBHR5uQojVw== From: Nikita Travkin To: Andy Gross , Bjorn Andersson Cc: Rob Herring , Krzysztof Kozlowski , Konrad Dybcio , Siddharth Manthan , Jasper Korten , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Nikita Travkin Subject: [PATCH 4/8] arm64: dts: qcom: msm8916-samsung-gt510: Add Vibrator Date: Thu, 5 Jan 2023 17:32:36 +0500 Message-Id: <20230105123240.1089375-5-nikita@trvn.ru> In-Reply-To: <20230105123240.1089375-1-nikita@trvn.ru> References: <20230105123240.1089375-1-nikita@trvn.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org gt510 uses a PWM controllable vibrator, that uses a general purpose clock output for it's control. Set up the pwm, supply and the vibrator. Signed-off-by: Nikita Travkin --- .../boot/dts/qcom/msm8916-samsung-gt510.dts | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts index e9916199e5a3..44d527b3f1f6 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts @@ -8,4 +8,51 @@ / { model = "Samsung Galaxy Tab A 9.7 (2015)"; compatible = "samsung,gt510", "qcom,msm8916"; chassis-type = "tablet"; + + clk_pwm: pwm { + compatible = "clk-pwm"; + #pwm-cells = <2>; + + clocks = <&gcc GCC_GP2_CLK>; + + pinctrl-0 = <&motor_pwm_default>; + pinctrl-names = "default"; + }; + + reg_motor_vdd: regulator-motor-vdd { + compatible = "regulator-fixed"; + regulator-name = "motor_vdd"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + + gpio = <&msmgpio 76 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-0 = <&motor_en_default>; + pinctrl-names = "default"; + }; + + vibrator { + compatible = "pwm-vibrator"; + + pwms = <&clk_pwm 0 100000>; + pwm-names = "enable"; + + vcc-supply = <®_motor_vdd>; + }; +}; + +&msmgpio { + motor_en_default: motor-en-default-state { + pins = "gpio76"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; + + motor_pwm_default: motor-pwm-default-state { + pins = "gpio50"; + function = "gcc_gp2_clk_a"; + }; }; -- 2.38.1