From patchwork Thu Jan 5 12:32:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Travkin X-Patchwork-Id: 39514 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp284993wrt; Thu, 5 Jan 2023 04:54:26 -0800 (PST) X-Google-Smtp-Source: AMrXdXu9S6SP2W9uiFruWAn3TmibBhftiQqNpNg+sjzoMgOsGdMMwnn+7C/0WjqQhNiDC9e2+xb9 X-Received: by 2002:a17:903:2341:b0:192:5e53:15f3 with SMTP id c1-20020a170903234100b001925e5315f3mr68886510plh.48.1672923266521; Thu, 05 Jan 2023 04:54:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672923266; cv=none; d=google.com; s=arc-20160816; b=aBdpKAQ0WFG/Ky+jUFJZQhVcR6skSFt9lFnxHyVG9f5luv7s7wtpj/65VYxBopW1LJ EKSWAxNhzbXNEw3WwqeFBsdL0ctTnB4oNc7T1KyyX5akAeImDpA0Ew0OxUrBubHKk0vT HkXu42PcITP/SsqokMmyO7FoavyUH8vOqVm/gjuzMDtGEUDkWjFUGGYntbLKpHiz1zKo M5m+K/9LX3PB8NESvz0j45IfO7w9xAWcgE3+Ge/eyYjZq2b0fA8sUfrnx6mA2Fxm6ds3 7XERvOAAKDs6nSSXkQbnVBzTFWRx5h2J+OtNhNaajYWeitdOzObfpQPUhudu69hUxwGG HpjQ== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q10-20020a170902f78a00b001913c5fc052si37663494pln.505.2023.01.05.04.54.14; Thu, 05 Jan 2023 04:54:26 -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 + 99 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754187187069622199?= X-GMAIL-MSGID: =?utf-8?q?1754187187069622199?= 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"; + }; };