Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6654751rwr; Tue, 2 May 2023 03:44:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5pOZmstTuy43o82FxFPCPP32x8+rUtFfPtVGCmZyGv+vGZ5u3yf32zBbwKyFplVH3dP0z9 X-Received: by 2002:a05:6a00:2d16:b0:63d:2d99:2e92 with SMTP id fa22-20020a056a002d1600b0063d2d992e92mr24296355pfb.17.1683024258875; Tue, 02 May 2023 03:44:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683024258; cv=none; d=google.com; s=arc-20160816; b=hy7jHfLauRaGCDuiWzXD9JqufMrPVExJZFbKbnmYIWYW+ZZ0XHtDG4x+tUhdhcb1N4 e+VOgeP99qvgyt8irFXdpTE8KfBdILtjFRPg8QMHYduQfc4yndf/lKcJVp/PdUT3YPWv LMMTL2hCcD3j2XlwRcfsgm7UqHOHEc0ulZJMEauthbKu4fSdxyJ4M93qUOWW6NRo2Aqv E79upDBT/k4OaE9dZyk7sP7c7bxNOx7mfSbdqtUHVzB3UoM041bCnxLNWK9SW9qH6Zi6 QD7UGwLT2OmXSShFZvL5UjIRI/mlvw48TVi2ydaRNnRGIRNI69LCiKJY/igyb1OUr1Hg ICEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=yxitG6sUcYo57hAIgIo6PDkuzwNrSAcbt8Y9v1/szAI=; b=Hmw84aWYgREBl58tq7Zp6OAPPNmCSz3yt8NmSLCsdR9Z7U0ANhTnzavFzs6H4FIXmo WTYRbp7Eio9ZESLeD9vqNYoXBiEj0z0Hg2sZR/gZaqTeA+znDxqmvmE8r/rM4KLS40me cylKEEoFXo6mZlR/xOqeN5bBLSEsA8FGh3m922JefIw94vHTlcBqwUEdscKsc/r/utHF D4j8OjimfE4bEA6DrRkcR+NeaD65/ZWRupBdZIi3PUuV8ROCG4TpQkvn0QMmZv/phoKv 4C8JOZ7uaQ3nxfgMHfdEY6BaPBDbOnaG9D5qylQD+SR5oFa7Y3cg0CNH+VHCa5HBFBfO /gWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OvoP0+4X; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p185-20020a6229c2000000b00640d9c06df3si20024126pfp.329.2023.05.02.03.44.06; Tue, 02 May 2023 03:44:18 -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=@linaro.org header.s=google header.b=OvoP0+4X; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233560AbjEBKlQ (ORCPT + 99 others); Tue, 2 May 2023 06:41:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232094AbjEBKlN (ORCPT ); Tue, 2 May 2023 06:41:13 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D9BC5270 for ; Tue, 2 May 2023 03:40:44 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-4f127b10140so903311e87.3 for ; Tue, 02 May 2023 03:40:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683024042; x=1685616042; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=yxitG6sUcYo57hAIgIo6PDkuzwNrSAcbt8Y9v1/szAI=; b=OvoP0+4XqEDlUiCjcOXKLIDCxRaPbECJTI1vnE6rQ1gUr+KbewTdfuds4cct9UNWme g3CdR9gxAg0vaNgPO4A4kspbU/G+iw9hJuYqEU1xoxOSWtKdUJQYFNmLOGpZ5ufzStck I1HVd8m1mQZ3zsaxhYII29/zmDiLh819GQalML+Mn9kVMWhr3sQUcc/U04jHkOIQ0xrB GJyQikSm5Hu3+YNTSeX9QJ6pXsAQZudN++Pi57cOqehvzToksKiVRsigM5ReU91zSfmP xJuCsiTEsDHbwEjlruxj1NmHIo5PLP3Ie953tUmSetlO2DefzEC9lX0AHcg9HKOqWSzl yGqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683024042; x=1685616042; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=yxitG6sUcYo57hAIgIo6PDkuzwNrSAcbt8Y9v1/szAI=; b=B1kgE3/nhLror4VYm5SeszkpQ/oMqBDjMfDHL3cCwYR8/8Cq1Wy8Sd2c7y/6XUUNnn jEOnhHmgTz5JSrYrgaD/Vl0fgKiVOxJBDiPbF5Rrhe5cm0wEPradT06Z9pvxomRpz/8j 5mQGHS0tg1JwHOPwhzfz42yFoyp+mwZgvPsKk8Y26OH+SxYQVTSCBO4du3AahFmN3MwZ Wx7rkmVRWqmIk75VgqE/Yn6ZXdXLANqVGNSw4+ohQvQ3ciEiBBPdtnTTbrjYiMExCBt1 v8B6vCy3poZVxNO2M5gqdhNJBRyAp2z5D0zyjww3wZasjyb36ejbkFPScct3n2aDcFP9 ygSA== X-Gm-Message-State: AC+VfDxrgaBRuXCIlyoQDqusNUvLmQ87EXsCVGN8fKdqhRv5tdFH6XmT 1EYuWo9mCKLbtCiLNB3169EJ/w== X-Received: by 2002:ac2:515e:0:b0:4ef:f6c9:b977 with SMTP id q30-20020ac2515e000000b004eff6c9b977mr4218718lfd.49.1683024042122; Tue, 02 May 2023 03:40:42 -0700 (PDT) Received: from [192.168.1.101] (abyl248.neoplus.adsl.tpnet.pl. [83.9.31.248]) by smtp.gmail.com with ESMTPSA id q28-20020ac2529c000000b004eff70e321bsm3640070lfm.237.2023.05.02.03.40.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 May 2023 03:40:41 -0700 (PDT) Message-ID: Date: Tue, 2 May 2023 12:40:40 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [PATCH 4/4] ARM: dts: qcom: msm8974-hammerhead: Add vibrator Content-Language: en-US To: Luca Weiss , ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Sebastian Reichel , Andy Gross , Bjorn Andersson , Brian Masney Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org References: <20230427-hammerhead-vibra-v1-0-e87eeb94da51@z3ntu.xyz> <20230427-hammerhead-vibra-v1-4-e87eeb94da51@z3ntu.xyz> From: Konrad Dybcio In-Reply-To: <20230427-hammerhead-vibra-v1-4-e87eeb94da51@z3ntu.xyz> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 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>? 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 { >