From patchwork Sat Jan 15 02:31:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Antipov X-Patchwork-Id: 12714302 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 B31D6C43217 for ; Sat, 15 Jan 2022 02:31:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232215AbiAOCbs (ORCPT ); Fri, 14 Jan 2022 21:31:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232198AbiAOCbr (ORCPT ); Fri, 14 Jan 2022 21:31:47 -0500 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93E25C061574; Fri, 14 Jan 2022 18:31:47 -0800 (PST) Received: by mail-pl1-x631.google.com with SMTP id e8so1051070plh.8; Fri, 14 Jan 2022 18:31:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ETUn97gqjRapopFWBGYK6do8y384tZH0myTQJGddZQU=; b=LDx12P1s2qPxOVD1DYF8E520auBww4eBKV/oA5TNyIoCWDPrTiMmdvTrf4zmQ4YUaR Ku4yoAu0sNrddcdhRR7XiEq2AFUnuI8JXkHgVfzWMzaDVyxiKRrLw2u6BrItsmr1rtB3 7Dse4AWzZQiVsxbodxDKxkL2bjy92R5uaKtwrcFSg/ItfVG8ZUJjL3MdxzZy2WhBz7yl smvd6PSTrIQOyZ4V2svWeEY9PknRJmisWH22rwK8ZLdNm5nE+BGEI4I6jsp1F+REBgSr i2/ff0UQUIcMcmLpeXCwu+J4kQ/eFIGTakJ0VPqfKiJhhCg5Jg7pu0C7QFYFC+SukEMz aACA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ETUn97gqjRapopFWBGYK6do8y384tZH0myTQJGddZQU=; b=boNa7TFHh6ZEjE6FQinUi5I79WDh/yyLtOqNJ0JnNJkui16nOvWSpUSP+VJEbs2878 2E7VKBJNk0daI6csoBhgFFeiggdDvkfxLeVW8BCmFlA+PO9dWUv3uyJLKibAHqOOHu75 fGV1K6zGjrRRV3PvojzwU7oj9kjzBHhsO4WEJbnsntUWubtF4iQVdbFNnaH/dkklFjVj EMFKNV8Si79M85WfITlmdTwTFJEEn7UHCdrGCdlsrnGrZBFWE9CMdPJoBR2ysQWAJYQQ cXhBsiLu4cIINOWtco5zKNjERuqc2yAc2imn3DwIvqMAmMyqT4BVQMl+ntpCZfNzE/3K X6ng== X-Gm-Message-State: AOAM531CgYoqsBt3zUNlQMghUkgumzf9XuXZdW26NFdbahVNXFw1bM0C GUaSAmFuw9whkX66gGhC/IM= X-Google-Smtp-Source: ABdhPJxfE90pBwHY/PMBozJo2yMwL6hjwOMSIIBa2NHOrDM5IR46pX2/yc/uUb8gDIuHgKj3CokdGw== X-Received: by 2002:a17:90a:b791:: with SMTP id m17mr13632582pjr.239.1642213907185; Fri, 14 Jan 2022 18:31:47 -0800 (PST) Received: from thelio.corp.microsoft.com ([2001:4898:80e8:38:6d64:e944:7a7c:3d]) by smtp.gmail.com with ESMTPSA id oo14sm6874500pjb.34.2022.01.14.18.31.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jan 2022 18:31:46 -0800 (PST) From: Dmitry Antipov X-Google-Original-From: Dmitry Antipov To: Jiri Kosina , Benjamin Tissoires , Dmitry Torokhov , Rob Herring , Mark Brown , Felipe Balbi Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-spi@vger.kernel.org, Dmitry Antipov Subject: [PATCH v3 3/5] Documentation: DT bindings for HID over SPI. Date: Fri, 14 Jan 2022 18:31:33 -0800 Message-Id: <20220115023135.234667-4-dmanti@microsoft.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220115023135.234667-1-dmanti@microsoft.com> References: <20220115023135.234667-1-dmanti@microsoft.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org From: Dmitry Antipov Added documentation describes the required properties for implementing Device Tree for a device supporting HID over SPI and also provides an example. Signed-off-by: Dmitry Antipov --- .../bindings/input/hid-over-spi.txt | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100755 Documentation/devicetree/bindings/input/hid-over-spi.txt diff --git a/Documentation/devicetree/bindings/input/hid-over-spi.txt b/Documentation/devicetree/bindings/input/hid-over-spi.txt new file mode 100755 index 000000000000..5eba95b5724e --- /dev/null +++ b/Documentation/devicetree/bindings/input/hid-over-spi.txt @@ -0,0 +1,43 @@ +* HID over SPI Device-Tree bindings + +HID over SPI provides support for Human Interface Devices over the SPI bus. HID +Over SPI Protocol Specification 1.0 was written by Microsoft and is available at +https://www.microsoft.com/en-us/download/details.aspx?id=103325. + +If this binding is used, the kernel module spi-hid will handle the communication +with the device and the generic hid core layer will handle the protocol. + +Required properties: +- compatible: must be "hid-over-spi" +- interrupts: interrupt line +- vdd-supply: phandle of the regulator that provides the supply voltage +- reset_gpio-gpios: gpio wired to the device reset line +- post-power-on-delay-ms: time required by the device after enabling its +regulators or powering it on, before it is ready for communication +- minimal-reset-delay-ms: minimum amount of time that device needs to be in +reset state for the reset to take effect +- input-report-header-address: this property and the rest are described in HID +Over SPI Protocol Spec 1.0 +- input-report-body-address +- output-report-address +- read-opcode +- write-opcode +- flags + +Example: + spi-hid-dev0 { + compatible = "hid-over-spi"; + reg = <0>; + interrupts-extended = <&tlmm 42 IRQ_TYPE_EDGE_FALLING>; + vdd-supply = <&pm8350c_l3>; + input-report-header-address = <0x1000>; + input-report-body-address = <0x1004>; + output-report-address = <0x2000>; + read-opcode = <0x0b>; + write-opcode = <0x02>; + flags = <0x00>; + reset_gpio-gpios = <&tlmm 25 GPIO_ACTIVE_LOW>; + post-power-on-delay-ms = <5>; + minimal-reset-delay-ms = <5>; + + };