From patchwork Fri Dec 10 02:27:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 522866 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 4E1CEC4332F for ; Fri, 10 Dec 2021 02:27:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235986AbhLJCan (ORCPT ); Thu, 9 Dec 2021 21:30:43 -0500 Received: from mail-0301.mail-europe.com ([188.165.51.139]:52352 "EHLO mail-0301.mail-europe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235960AbhLJCan (ORCPT ); Thu, 9 Dec 2021 21:30:43 -0500 Date: Fri, 10 Dec 2021 02:27:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=connolly.tech; s=protonmail; t=1639103225; bh=HPRTLypqlL1v/oJddAQlru6l2IJfkdXX26COEmhucPs=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:From:To:Cc; b=FquTi0+w7hGeWMhBOi0z5TdO2ARBGanGJeBTlGYTYZmsXerSlwHDLJ+W9L+erMiD1 ad63z18tpdWlhxo3AdGFd8LbqqXe7U5bNxMhkOeb++0aYNoS2oV/Wytd8GGzqfqWed M5BWmT6B2mmIt8PocbaLZhCp+f5spQKBzb82j+tA= To: caleb@connolly.tech, Andy Gross , Bjorn Andersson , Dmitry Torokhov , Rob Herring , linux-arm-msm@vger.kernel.org, linux-input@vger.kernel.org, devicetree@vger.kernel.org, phone-devel@vger.kernel.org From: Caleb Connolly Cc: Jami Kettunen , Joel Selvaraj Reply-To: Caleb Connolly Subject: [PATCH v4 3/6] arm64: dts: qcom: pmi8998: introduce spmi haptics Message-ID: <20211210022639.2779173-4-caleb@connolly.tech> In-Reply-To: <20211210022639.2779173-1-caleb@connolly.tech> References: <20211210022639.2779173-1-caleb@connolly.tech> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add bindings for Qualcomm SPMI haptics on platforms using pmi8998. Signed-off-by: Caleb Connolly --- arch/arm64/boot/dts/qcom/pmi8998.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) -- 2.34.1 diff --git a/arch/arm64/boot/dts/qcom/pmi8998.dtsi b/arch/arm64/boot/dts/qcom/pmi8998.dtsi index 0fef5f113f05..97d993f31ddd 100644 --- a/arch/arm64/boot/dts/qcom/pmi8998.dtsi +++ b/arch/arm64/boot/dts/qcom/pmi8998.dtsi @@ -1,4 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 +#include #include #include @@ -53,5 +54,19 @@ pmi8998_wled: leds@d800 { status = "disabled"; }; + pmi8998_haptics: haptics@c000 { + compatible = "qcom,pmi8998-haptics"; + reg = <0xc000>; + + interrupts = <0x3 0xc0 0x0 IRQ_TYPE_EDGE_BOTH>, + <0x3 0xc0 0x1 IRQ_TYPE_EDGE_BOTH>; + interrupt-names = "short", "play"; + + qcom,wave-shape = ; + qcom,play-mode = ; + qcom,brake-pattern = <0x3 0x3 0x2 0x1>; + + status = "disabled"; + }; }; }; From patchwork Fri Dec 10 02:27:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 522865 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 E9141C433FE for ; Fri, 10 Dec 2021 02:27:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236002AbhLJCa5 (ORCPT ); Thu, 9 Dec 2021 21:30:57 -0500 Received: from mail-4317.proton.ch ([185.70.43.17]:63245 "EHLO mail-4317.proton.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235984AbhLJCa5 (ORCPT ); Thu, 9 Dec 2021 21:30:57 -0500 Date: Fri, 10 Dec 2021 02:27:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=connolly.tech; s=protonmail; t=1639103241; bh=a0+Jz0H6sQZMpPuU3UqfLhqyuZtoBJw/JSFKhEbbxIA=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:From:To:Cc; b=grdJgxmRmlu4EmTOesk+7cyeKqoAS693Hwh8iToPVZ7tC0YxZ2RAyIJw7QgISx7rH hfQrnUON/hwZ/MWNkZAVgfgYIy1Twgl3TFEirBoFHaZe32zb05bUSztz+CmuBVrfu8 j6dj55r89CIBd7fcwMl2wyZEkcE0utyqN9TTkyWY= To: caleb@connolly.tech, Andy Gross , Bjorn Andersson , Dmitry Torokhov , Rob Herring , linux-arm-msm@vger.kernel.org, linux-input@vger.kernel.org, devicetree@vger.kernel.org, phone-devel@vger.kernel.org From: Caleb Connolly Cc: Jami Kettunen , Joel Selvaraj Reply-To: Caleb Connolly Subject: [PATCH v4 4/6] arm64: dts: qcom: sdm845-oneplus-common: add haptics Message-ID: <20211210022639.2779173-5-caleb@connolly.tech> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Enable the pmi8998 SPMI haptics driver and configure the play rate for the hardware. Signed-off-by: Caleb Connolly --- arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.34.1 diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi index 3e04aeb479d1..1cba765f7a02 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi @@ -450,6 +450,12 @@ pinconf { }; }; +&pmi8998_haptics { + status = "okay"; + + qcom,wave-play-rate-us = <4255>; +}; + &qupv3_id_1 { status = "okay"; }; From patchwork Fri Dec 10 02:27:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 523121 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 4B1F1C43217 for ; Fri, 10 Dec 2021 02:27:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236012AbhLJCbB (ORCPT ); Thu, 9 Dec 2021 21:31:01 -0500 Received: from mail-0301.mail-europe.com ([188.165.51.139]:37369 "EHLO mail-0301.mail-europe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236009AbhLJCbB (ORCPT ); Thu, 9 Dec 2021 21:31:01 -0500 Date: Fri, 10 Dec 2021 02:27:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=connolly.tech; s=protonmail; t=1639103244; bh=vRyw/Mk1pPGhOpHZt/19uH6fr0dEklnMVGC8i+6yKLU=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:From:To:Cc; b=oLGbUBbHSsSrL8Yok1F45y1DFHeQmYRoIZCxVfAjVIqOcmEiAQHbXl4O8auBTqpal iXbp8WNChbW55xepER7vqW8ZAapMShZGeWrnXtt4Km7ycWR8IlgOLhJp7299rOFSe3 wQo4Nbmhh51enb4XSC7bYJ7sLU4pusG3rx66Ozlo= To: caleb@connolly.tech, Andy Gross , Bjorn Andersson , Dmitry Torokhov , Rob Herring , linux-arm-msm@vger.kernel.org, linux-input@vger.kernel.org, devicetree@vger.kernel.org, phone-devel@vger.kernel.org From: Caleb Connolly Cc: Jami Kettunen , Joel Selvaraj Reply-To: Caleb Connolly Subject: [PATCH v4 5/6] arm64: dts: qcom: sdm845-xiaomi-beryllium: add haptics Message-ID: <20211210022639.2779173-6-caleb@connolly.tech> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Joel Selvaraj Enable the pmi8998 SPMI haptics driver and configure the play rate for the hardware. Signed-off-by: Joel Selvaraj Signed-off-by: Caleb Connolly --- arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts | 5 +++++ 1 file changed, 5 insertions(+) -- 2.34.1 diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts index 580d4cc1296f..981711e535d2 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts @@ -312,6 +312,11 @@ resin { }; }; +&pmi8998_haptics { + status = "okay"; + qcom,wave-play-rate-us = <4878>; +}; + /* QUAT I2S Uses 1 I2S SD Line for audio on TAS2559/60 amplifiers */ &q6afedai { qi2s@22 { From patchwork Fri Dec 10 02:27:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 522864 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 6CA69C433EF for ; Fri, 10 Dec 2021 02:27:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236018AbhLJCbF (ORCPT ); Thu, 9 Dec 2021 21:31:05 -0500 Received: from mail-4317.proton.ch ([185.70.43.17]:15411 "EHLO mail-4317.proton.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236009AbhLJCbE (ORCPT ); Thu, 9 Dec 2021 21:31:04 -0500 Date: Fri, 10 Dec 2021 02:27:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=connolly.tech; s=protonmail; t=1639103248; bh=orN9o2yFBpTAIH2g0jhG95WDC4zcISQzngnP5iyclQ4=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:From:To:Cc; b=lle55ijyb3iu7Cf5akyOTE9MPdQ6bSKapH2aYCWuB/hkdllVMLI09repBXSVqHbdm VLrFUFtC6nbipjG8+PMMOYtLonPHtbyqWIZBEK24hpZUxOHU/LcVGpjQOwrcUpoz8b PDM86DwK/+twnUQLCi0EbK9cpLvJCqqt85hiQsGw= To: caleb@connolly.tech, Andy Gross , Bjorn Andersson , Dmitry Torokhov , Rob Herring , linux-arm-msm@vger.kernel.org, linux-input@vger.kernel.org, devicetree@vger.kernel.org, phone-devel@vger.kernel.org From: Caleb Connolly Cc: Jami Kettunen , Joel Selvaraj Reply-To: Caleb Connolly Subject: [PATCH v4 6/6] arm64: dts: qcom: msm8998-oneplus-common: Enable PMI8998 haptics Message-ID: <20211210022639.2779173-7-caleb@connolly.tech> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Jami Kettunen The OnePlus 5 and 5T both have a haptics engine connected to PMI8998. Signed-off-by: Jami Kettunen Signed-off-by: Caleb Connolly --- arch/arm64/boot/dts/qcom/msm8998-oneplus-common.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.34.1 diff --git a/arch/arm64/boot/dts/qcom/msm8998-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/msm8998-oneplus-common.dtsi index 654188027f79..0f9ad775392a 100644 --- a/arch/arm64/boot/dts/qcom/msm8998-oneplus-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8998-oneplus-common.dtsi @@ -257,6 +257,12 @@ pinconf { }; }; +&pmi8998_haptics { + status = "okay"; + + qcom,wave-play-rate-us = <4255>; +}; + &qusb2phy { status = "okay";