From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 37373320CD3 for ; Tue, 14 Jul 2026 05:23:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784006583; cv=none; b=PrSRtZJIufm8MO8CGnQDzo6wc6xCItX/Cz+6xQAAPJ9G9nkEPbvMxl5+DubZbfeHA00LMODXgu+ebHOHNrezf7BB8wcSqh3lccQ6ZY2IMTecNKj6dvJ6vrObvQaNwMP571OjGFhF/wX75x9epAHP79LBVxmcXVZS4TlnblRi7wk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784006583; c=relaxed/simple; bh=rS3MvqNewoAeiT3D77tq2VCGJ+QrQtS/FkD4B+sxN9I=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=N2L4hbip2e47wTDru4ZTwovKqNSF8twG0HQjf5G4/3dIZFLwX/OJNq5bfUNHK7YcDTLzOy3uw5Yr3B7Fbx0xQlpoKVdbqceG3l8eb3a4Rd4Ps8e3m59JKpM7T2wiAbzpbxBWb4u3EBV12C0hBBfWRJrznbPecSqsE7lHscz7a6g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=AdAmDrxO; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=WuY+BWV2; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="AdAmDrxO"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="WuY+BWV2" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66E38As93441002 for ; Tue, 14 Jul 2026 05:23:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= YoYKvpOYfu25fIHCUybwPxL2RxGRDTZpOhbX1PIoW7o=; b=AdAmDrxOYPYwBkAl DYOsmuIkXaKEzlSPltl4vOZgzq6zee6nETHpdQ/UcqgcwJX3MEGZdQ7wuAM9Kdui ZVB77wRzKZ92+1u0Pvxmtarb40xU5PCWGEQXjE8socchIX2HzpKvW9WMnJOYUasf x+bJ15pXY+kkOms56ACwhgL75p4SRNNRmr39UHTDbZGKBfiUT3bmxO2KnK4ObnDs SJloBq4mP/90TN/A0jI/9uWv19icThpA4Ri5c6VCQD4f6VFDhHX/aDYgXgD7DTIN kr6FjzGZ4oiTEU5VwQCj/dQf7TsXNMJVJcskPa1QWKP6M7c5lpwdo/9rJVCb5PAD +H2l5A== Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fdbr48mjr-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 14 Jul 2026 05:23:01 +0000 (GMT) Received: by mail-pg1-f200.google.com with SMTP id 41be03b00d2f7-cab3e9cd922so598592a12.0 for ; Mon, 13 Jul 2026 22:23:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1784006580; x=1784611380; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=YoYKvpOYfu25fIHCUybwPxL2RxGRDTZpOhbX1PIoW7o=; b=WuY+BWV2E/dZrMSphV/toIHDttxEVh5Mcbb+C2twnHiu6UMVRfkkg2Gdtyf66pjyUm oQBYn+oxp0FVEjdfnLPww4q049Tpdf0Z8W4RzDn824FlX8p8nEYEBecv1GRdQSIJ5X11 s8hi/6vxRa7DcwcSaupwtix9yai6XSrIh6rjkgwL+8UkhEn/k+JpgkW6odMOpUh3m2eE wgJ7iM212UfQcU6yZPw3nKzxqkiLCNg6rUp+rdmWkxn7nw05vXU8Yb251y1lBc8kgxmo ncdOZKog1Wr3qljpwdEFIg0ZfhE3LJvBGllfo19EVpp9kaKaSejt+hmoL+XIK4iSv2h8 QwKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784006580; x=1784611380; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=YoYKvpOYfu25fIHCUybwPxL2RxGRDTZpOhbX1PIoW7o=; b=hx6xcyv+jUB9PANi36/DaOcjIYlHmqWSj6Mps/Jx1CKUv+Fa4H0O3VxgZZ0dFWXFky mVWvVF0JedgQfeL21GPNywzIzMZIe2bydJRx5JudknvYO6VlZVQQhQpd2cZpjW6btNpN FzsueX/eTVskXP68VVOXlpD7CgqeYYiH3y6VXl9+mdWPXukSQw5UkKBA761SD6kIdiCF MzWMg/jJG9zzBl0qKsDSjlj8zUaCXi+aR+Y5vR87swvKVZo7DR1nF8mbCtzpWamuKgUE 6vEgfwQEld8zab3laXgmlzCgFzEnNeF7zYyRI4RQ0NZ+TCis9cdrFBSs58ExlEkM+Nt0 XGQw== X-Forwarded-Encrypted: i=1; AHgh+Ro3uLMrkxzkjU1+poy42FaNiJGfouk2Zifv95ZLeWmTJy/XnQP4F7BiTIf/Dk1cX6imqw251wk7hdbYIeo=@vger.kernel.org X-Gm-Message-State: AOJu0YwgBrhBT3PcUF/WQEpUv2r2GQ77Q+QA+D93vo3s5Hz51Tm6IoJE RrdfKcX39ejCWYQKdsSUfxxysEvgt3MKDBCtGC2PkWr9AiOtSQPJdAC8hL303xAJDEgSQ+n29jR 54x/ZeKU+qssRDQMOlq8P/Z9EUXUcQONfcOl6qZgg7wmZcBy6Iz4BPNhA8iD00o0PHDE= X-Gm-Gg: AfdE7cl4f6A5GU0bztr5rdkde9kkRIWwPt1iytLrfduqN4PCGCwLHD7Vy+Lr726gOQD 01miE0FqL/8P7BYFqx5fCaCtFNDIfbWBxgU0lVXgBFjAsbbLrQjbn1jwGPd6dPzXNGGSoAfUm3m pwNPIQPWj0Dhxpm2oUzh/mMrcofSVZVPY0z6qUqef9CpN5OcRT2yNvTIc9wnZlHDcwkmpC3WkpK DiIguYYVndeYqYtuEwmO3IVv+9i6YdV3nYqgvpEnFq2TrXhkgaHYCCoD2VpgZE5J7JgMoQEyiQJ jk7MW+9PDRZj+x/yE7UTJgImfEys5/UHzO39ArN/I70kTF6uL2rybDna+wa2dkuqYmZH221+S5f 61rU3X1WDCmK8wzxYH1sE21vffN9U1qdOUNvYNcP9OGckf9bWJrEwzGXPabL27fw= X-Received: by 2002:a05:6a21:7701:b0:3c0:9c1a:8951 with SMTP id adf61e73a8af0-3c110b34ff1mr12051436637.73.1784006579996; Mon, 13 Jul 2026 22:22:59 -0700 (PDT) X-Received: by 2002:a05:6a21:7701:b0:3c0:9c1a:8951 with SMTP id adf61e73a8af0-3c110b34ff1mr12051375637.73.1784006579407; Mon, 13 Jul 2026 22:22:59 -0700 (PDT) Received: from hu-fenglinw-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-31174accb0esm78609864eec.30.2026.07.13.22.22.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 22:22:58 -0700 (PDT) From: Fenglin Wu Date: Mon, 13 Jul 2026 22:22:54 -0700 Subject: [PATCH v3 1/3] dt-bindings: input: Add Qualcomm SPMI PMIC haptics Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260713-qcom-spmi-haptics-v3-1-c931bb7cb94f@oss.qualcomm.com> References: <20260713-qcom-spmi-haptics-v3-0-c931bb7cb94f@oss.qualcomm.com> In-Reply-To: <20260713-qcom-spmi-haptics-v3-0-c931bb7cb94f@oss.qualcomm.com> To: linux-arm-msm@vger.kernel.org, Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Stephen Boyd , Bjorn Andersson , Konrad Dybcio Cc: David Collins , Subbaraman Narayanamurthy , Kamal Wadhwa , kernel@oss.qualcomm.com, linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Fenglin Wu X-Mailer: b4 0.16-dev-17187 X-Developer-Signature: v=1; a=ed25519-sha256; t=1784006577; l=6254; i=fenglin.wu@oss.qualcomm.com; s=20260324; h=from:subject:message-id; bh=rS3MvqNewoAeiT3D77tq2VCGJ+QrQtS/FkD4B+sxN9I=; b=u73MK8Ri6wtOpWB4iDqyHgoiRhLmRGa1q80W7ytYqJo4GJBPiEFg+SRvpE7ZIO1SWvDeOPKsR zHWvMWG2NLrC7BhlR8DmSFM0/x2FoWJz0jX6+gqVNIDIUxvEFO+WsSw X-Developer-Key: i=fenglin.wu@oss.qualcomm.com; a=ed25519; pk=hJdt3E7o54lql+miD2GaxwF74cDyhgNwMbmFOZ46bRU= X-Proofpoint-GUID: ZBqzBuBW9DwmeH8oVf8nZFTenw_ffptV X-Proofpoint-ORIG-GUID: ZBqzBuBW9DwmeH8oVf8nZFTenw_ffptV X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzE0MDA1MyBTYWx0ZWRfX2t5U8KlbVtuo oaKoSJGmpJ4HV+G5FMarihiNu5YdlsVHsQ35cJnY+N4sWrSjoVTIEjie4uh94FVscyh8iYfTVDW EuQBMQI7e+wB1LDTA1bi3QagW4gI0qEhtGW53LqPaPue+ZMS5v+p93NYem+66zvIdLP/EviHXzH VchJPqfLK5ByeejqQhDArzaDkfS0GDNiXZZ+wErjtyzlVrC7wfAlPGCklsghQH/99U+Cz/qT0Pt lXjFvCJ0qnATUykYFeOcj7re3IGphyzcAK2Xn0/bLhrNCQw0gedFgA2z/ZsyixJEmhK6cSLNOwm KRuGmJKfraNqiupBogYoOxe8ntYvi5CjAsfNG9hbKEKUsrovkD9rDk0fxslbCquGyXK5yR2Utcx LV4qitqv1JtSxgY0sQikKY/I5hKRQ1eg1TM+9v+FdK1ofE0M2Ip1O0TxQcN/RjpXrc2TcF8k6Rt QnuxyvIkpveKG2oWI5w== X-Authority-Analysis: v=2.4 cv=F5hnsKhN c=1 sm=1 tr=0 ts=6a55c7b5 cx=c_pps a=oF/VQ+ItUULfLr/lQ2/icg==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=gEfo2CItAAAA:8 a=EUspDBNiAAAA:8 a=bI6yuv9Qsz7HNVLwNVgA:9 a=QEXdDO2ut3YA:10 a=3WC7DwWrALyhR5TkjVHa:22 a=sptkURWiP4Gy88Gu7hUp:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwNzE0MDA1MyBTYWx0ZWRfX+YoS7OirfruZ pRsaOn3dMTveFKgtF32S3DC2yo+Ouqr7zSPC/1U3yXSx9gNwCOeK1d1CXQC/BDE1R5QEM6rHjFI NntSvB/SOYI5pZlmD7C0Lkmr+7OH4Qk= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-07-14_01,2026-07-10_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 bulkscore=0 malwarescore=0 priorityscore=1501 suspectscore=0 clxscore=1015 adultscore=0 impostorscore=0 lowpriorityscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607140053 Add binding document for the haptics module inside Qualcomm PMIC PMIH0108. Assisted-by: Claude:claude-4-8-opus Signed-off-by: Fenglin Wu --- .../bindings/input/qcom,spmi-haptics.yaml | 136 +++++++++++++++++++++ 1 file changed, 136 insertions(+) diff --git a/Documentation/devicetree/bindings/input/qcom,spmi-haptics.yaml b/Documentation/devicetree/bindings/input/qcom,spmi-haptics.yaml new file mode 100644 index 000000000000..b1a69e9886ee --- /dev/null +++ b/Documentation/devicetree/bindings/input/qcom,spmi-haptics.yaml @@ -0,0 +1,136 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/qcom,spmi-haptics.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Haptics device inside Qualcomm Technologies, Inc. PMIC + +maintainers: + - Fenglin Wu + +description: | + Certain Qualcomm PMICs integrate a haptics module, such as the HAP530_HV haptics + module in the PMIH0108 PMIC, which drives an LRA (Linear Resonant Actuator) with + an output voltage up to 10 V. Several play modes are supported in HAP530_HV: + + DIRECT_PLAY: The hardware outputs sinusoidal waveforms whose period is + defined by qcom,lra-period-us and whose peak voltage is defined by + qcom,vmax-microvolt. The driving amplitude can be scaled in the range + [0, 255] via a single register byte. Hardware-based LRA auto-resonance + tracking is enabled by default in this mode, allowing the haptics engine + to follow the actual resonant frequency of the LRA and update the driving + period accordingly to achieve stronger vibration magnitude. + + FIFO: The hardware can play an arbitrary waveform composed of a sequence + of 8-bit samples at a configurable play rate. Samples are pre-filled + into the internal FIFO memory of the haptics module and continuously + replenished via the FIFO-empty IRQ until all samples have been played. + An 8K-byte FIFO memory bank is available in the HAP530_HV haptics module, + shared between the FIFO and PAT_MEM play modes. The memory partition + between the two modes is configurable via registers, and FIFO mode always + uses the 1st partition starting from offset 0. + + PAT_MEM: This mode is very similar to FIFO streaming mode but without the + data refilling capability. It is designed mainly for short, latency-critical + vibrations. The memory space for PAT_MEM mode must be reserved for dedicated + usage, and the waveform data should be preloaded and remain unchanged + thereafter. The haptics module can play the waveform data from the memory + region specified by the PAT_MEM play start address and length registers. + + In either FIFO mode or PAT_MEM mode, the following play rates are supported: + -- 0(T_LRA): each FIFO byte drives one full sinusoidal cycle with the + period defined in qcom,lra-period-us. + -- 1/2/3(T_LRA_DIV_2/4/8): each FIFO byte drives a half/quarter/eighth + sinusoidal cycle with the period defined in qcom,lra-period-us. + -- 4/5/6(T_LRA_X_2/4/8): each FIFO byte drives 2/4/8 sinusoidal cycles + with the period defined in qcom,lra-period-us. + -- 8/9/10/11/12/13(8KHz/16KHz/24KHz/32KHz/44.1KHz/48KHz): the FIFO + data is treated as PCM samples and drives the output with an + arbitrarily shaped waveform. This mode is typically used to define + custom driving waveforms for specific vibration effects such as fast + attack, crisp brake, etc. + + The drive voltage in FIFO or PAT_MEM mode can exceed the value defined in + qcom,vmax-microvolt to achieve a special vibration effect, but the waveform + must be short enough to prevent the LRA from being damaged by operating at + an overvoltage. + + Also, hardware-based LRA auto-resonance tracking is normally disabled in + FIFO or PAT_MEM mode, as these modes are intended to drive arbitrary + waveforms that may not follow the resonant frequency; autonomous hardware + resonance correction would interfere with the intended output. + +properties: + compatible: + items: + - const: qcom,pmih0108-haptics + - const: qcom,spmi-haptics + + reg: + items: + - description: HAP_CFG module base address + - description: HAP_PTN module base address + + reg-names: + items: + - const: cfg + - const: ptn + + interrupts: + maxItems: 1 + + interrupt-names: + items: + - const: fifo-empty + + qcom,vmax-microvolt: + description: + Maximum allowed output driving voltage in microvolts, must be a multiple + of 50,000 uV. This is the peak driving voltage in DIRECT_PLAY mode, + which outputs sinusoidal waveforms. The value should be equal to the + square root of 2 times the Vrms voltage of the LRA. + minimum: 50000 + maximum: 10000000 + multipleOf: 50000 + + qcom,lra-period-us: + description: + LRA actuator initial resonance period in microseconds + (1,000,000 / resonant_freq_hz). Used to configure T_LRA-based play + rates and the auto-resonance zero-crossing window. It could be also used + as the initial period if the LRA wants to be driven off resonance. + minimum: 5 + maximum: 20475 + multipleOf: 5 + +required: + - compatible + - reg + - reg-names + - interrupts + - interrupt-names + - qcom,vmax-microvolt + - qcom,lra-period-us + +additionalProperties: false + +examples: + - | + #include + + pmic { + #address-cells = <1>; + #size-cells = <0>; + + haptics@f000 { + compatible = "qcom,pmih0108-haptics", "qcom,spmi-haptics"; + reg = <0xf000>, <0xf100>; + reg-names = "cfg", "ptn"; + interrupts = <0x7 0xf0 0x1 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "fifo-empty"; + + qcom,vmax-microvolt = <1300000>; + qcom,lra-period-us = <5880>; + }; + }; -- 2.43.0