Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp7029772rwr; Tue, 2 May 2023 08:34:11 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5055kJmlq6clvl29SWxPsXHWxx7ZjeqnfAZkbqdclktz+ruWcNMZQGdByeq7Q12fsl5Adj X-Received: by 2002:a17:90a:f113:b0:24e:2e8a:176d with SMTP id cc19-20020a17090af11300b0024e2e8a176dmr2122161pjb.24.1683041651308; Tue, 02 May 2023 08:34:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683041651; cv=none; d=google.com; s=arc-20160816; b=gMlOg+I127p2APtOLoGoC17ph1DrGSDYs5Wya64qBGxumaMi1c6XrUY+mTX26Movje nJwUYPKuVCdVmULPyGUnyDPTppaHKELJfuYIlM8q6IEUgzwf+47GMiQxB6GR/Ux693g5 kJ9mJOQQafeHP8scqmhN2n47QBazdsuWpCMSt2qVGEIudHr4/fAqHBEZJJFeuR28wiRr oweDd1uYrZiSK5DRt4xTs55O8WlsTrrNqCuYva+6JC9kgYWFxI/NgqxMUH7hi5omrdST QTOCzLWxFzUQiSkSNjf/Kpg+izEgE2ghM/J6vQVEjf6iS4EQz0z5Bs9D9tq4BboPXqOI +uDQ== 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=uYH34sdenNg5iIL70ReRotS+2XnctSl4AUg4b2cCJls=; b=ENq5Nh2MJQVAR/Y2oz59tRxwhF+LubVmezjf6YZf0pWX5smOc47vFEcbhXyoKdX1Dk fYe7zxuiu/lPeD4jJQA0YcXU1+mjxLJ0DB9YAmge9c9cIJu+YQHE97z/jxz4l59Tbn/m xLRCqzdHZowxP8OUHq4lRRaU1Z5wNZvmIr0wLhtm07GHof9ndEErtJSS5VOQf6sUkmvu FLveqP/hAeOyoMX7CN1iJyvqnU1GwqOgUqq1y6Kk+fh/2c222ncjfjmNbdaS7zjBbnkd ICGTKN0P1ojqrhi+5FGbIOfskAUGkVRqCk+cgD4xnMpI3p0cKf2KDTck2OMgdfBDpGdh VEHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@z3ntu.xyz header.s=z3ntu header.b=gtzSt7i1; 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=NONE dis=NONE) header.from=z3ntu.xyz Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id om13-20020a17090b3a8d00b002474560207csi11704998pjb.189.2023.05.02.08.33.55; Tue, 02 May 2023 08:34:11 -0700 (PDT) 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=@z3ntu.xyz header.s=z3ntu header.b=gtzSt7i1; 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=NONE dis=NONE) header.from=z3ntu.xyz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234260AbjEBP3n (ORCPT + 99 others); Tue, 2 May 2023 11:29:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234072AbjEBP3m (ORCPT ); Tue, 2 May 2023 11:29:42 -0400 Received: from mail.z3ntu.xyz (mail.z3ntu.xyz [128.199.32.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61AEA1BC7; Tue, 2 May 2023 08:29:26 -0700 (PDT) Received: from g550jk.localnet (unknown [62.108.10.64]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id C1350CEC2E; Tue, 2 May 2023 15:28:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=z3ntu.xyz; s=z3ntu; t=1683041334; bh=4Nf/Tso4ftEbFHYRGvD0XTZDY95O9PUTrhjQ+iuYvVQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=gtzSt7i1Jw+jiE3ltae0qC2vQUnz+LLmY0eZMjLaBky2ER45XW/VIwR1aGcP7PL66 5HYKhn9c6cic8QM6KNdbEeSuwyHg3oP9im6Fl83uYVjaWPJrFGZxe7g+cLJDQsOAwz t3fYv8t1Z2Wzrg/NJJysw/AYidJi3HjfbTkjUPjk= From: Luca Weiss To: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Sebastian Reichel , Andy Gross , Bjorn Andersson , Brian Masney , Konrad Dybcio Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH 4/4] ARM: dts: qcom: msm8974-hammerhead: Add vibrator Date: Tue, 02 May 2023 17:28:53 +0200 Message-ID: <112204300.nniJfEyVGO@z3ntu.xyz> In-Reply-To: References: <20230427-hammerhead-vibra-v1-0-e87eeb94da51@z3ntu.xyz> <20230427-hammerhead-vibra-v1-4-e87eeb94da51@z3ntu.xyz> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 On Dienstag, 2. Mai 2023 12:40:40 CEST Konrad Dybcio wrote: > On 27.04.2023 22:34, Luca Weiss wrote: > > The Nexus 5 has a vibrator connected to the clock output of GP1_CLK > > which we can use with the clk-pwm driver, then we can use that pwm with > > pwm-vibrator to get haptics functionality. > > > > This patch is based on Brian Masney's previous patch with clk-vibrator. > > > > Signed-off-by: Luca Weiss > > --- > > > > .../dts/qcom-msm8974-lge-nexus5-hammerhead.dts | 35 > > ++++++++++++++++++++++ 1 file changed, 35 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 > > ab35f2d644c0..fea8a6be9021 100644 > > --- a/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts > > +++ b/arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts > > @@ -41,6 +41,25 @@ key-volume-down { > > > > }; > > > > }; > > > > + clk_pwm: pwm { > > + compatible = "clk-pwm"; > > + clocks = <&mmcc CAMSS_GP1_CLK>; > > Are you sure it's <&mmcc CAMSS_GP1_CLK> and not <&gcc GCC_GP1_CLK>? Quite sure. The driver uses: cam_gp1_clk = clk_get(&pdev->dev, "cam_gp1_clk"); and this comes from the clock-8974.c driver CLK_LOOKUP("cam_gp1_clk", camss_gp1_clk.c, "vibrator"), Regards Luca > > Konrad > > > + > > + pinctrl-0 = <&vibrator_pin>; > > + pinctrl-names = "default"; > > + > > + #pwm-cells = <2>; > > + }; > > + > > + vibrator { > > + compatible = "pwm-vibrator"; > > + pwms = <&clk_pwm 0 100000>; > > + pwm-names = "enable"; > > + > > + vcc-supply = <&pm8941_l19>; > > + enable-gpios = <&tlmm 60 GPIO_ACTIVE_HIGH>; > > + }; > > + > > > > vreg_wlan: wlan-regulator { > > > > compatible = "regulator-fixed"; > > > > @@ -637,6 +656,22 @@ shutdown-pins { > > > > function = "gpio"; > > > > }; > > > > }; > > > > + > > + vibrator_pin: vibrator-state { > > + core-pins { > > + pins = "gpio27"; > > + function = "gp1_clk"; > > + drive-strength = <6>; > > + bias-disable; > > + }; > > + > > + enable-pins { > > + pins = "gpio60"; > > + function = "gpio"; > > + drive-strength = <2>; > > + bias-disable; > > + }; > > + }; > > > > }; > > > > &usb {