From patchwork Sat Jan 29 23:00:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 537980 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 5EBFAC433EF for ; Sat, 29 Jan 2022 23:00:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353396AbiA2XAu (ORCPT ); Sat, 29 Jan 2022 18:00:50 -0500 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:59169 "EHLO wout2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353393AbiA2XAt (ORCPT ); Sat, 29 Jan 2022 18:00:49 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 9CEE632008FA; Sat, 29 Jan 2022 18:00:48 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sat, 29 Jan 2022 18:00:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; bh=9yxtGa/gxLqBTSBTDmI/ioVNCFPQcS 50q3woH6HVfqY=; b=A7lnOu/cte98W0Yd2LUMJxPM94Rlhx0+a4zBN6c7tT8UKE AM1aQw0YsXIiZxioTqSo9CdBTTk44+0d6U5cjxxVag/VDtxrXM7n/tmjJ9Dq0MrD fwZwLraW3eoyvZ2QmhSZzyiuOBRrNGEfHVmpmvSjEkQge70GNY7L45pkE++UKIh/ CGTp1bMN+V9c5LH/wnWcvJVgIdqLrrS+aUw1vAaDESXcOwIPDrjFXNB8ESfYE6dq mPkiJsYPmOZO0Y+8JiI0NAiXxhP6bJxb9Jd0jdrNqWB37AuabTCSjV1IsPGqXqi1 l9do80xjgp3fMKATDgpeLtqHCYFC8YHI5218kgYg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=9yxtGa /gxLqBTSBTDmI/ioVNCFPQcS50q3woH6HVfqY=; b=FGkMTVPN/kfjGsbtecw77p 4vsDkrS5/JGWG9tZ0NfYQy6PxrADf9XYlplf35KdwShvhs0N3iTirRuTHUX7T4US oUmRq20eJyKA+of36/pH/0MO/pE3nj7MDnnDEGzC3wGQYPOODF8jMy+sz36VL+8K suJtg3DWIRu/tM4NmsPZRAUgkFXPizltwwuglEuQHD8nuZnN2nAh89zsDJ5N/vM8 NZ3dHJNY9OoX+LYuqYzGfQedZvHi7KOFZrOXkDC3ZzWfi6/hsDRtcBFqhizxFxIX YbMg2hxZEITYy4e2TJveSFpA2G+INpChrH81BO42Q3dJGdBzFdBgx7xzfBlVNZbA == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrfeejgddujedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtf frrghtthgvrhhnpeelueelgeettdfggfeuffevkefhuddtteeigfevhfdtffdtjefgteeg leeggedvudenucffohhmrghinhepuggvvhhitggvthhrvggvrdhorhhgnecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepshgrmhhuvghlsehshhho lhhlrghnugdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 29 Jan 2022 18:00:47 -0500 (EST) From: Samuel Holland To: Dmitry Torokhov , linux-input@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org, linux-i2c@vger.kernel.org, Wolfram Sang , Ondrej Jirman , Samuel Holland Subject: [PATCH 1/5] dt-bindings: input: Add the PinePhone keyboard binding Date: Sat, 29 Jan 2022 17:00:38 -0600 Message-Id: <20220129230043.12422-2-samuel@sholland.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20220129230043.12422-1-samuel@sholland.org> References: <20220129230043.12422-1-samuel@sholland.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add devicetree support for the PinePhone keyboard case, which provides a matrix keyboard interface and a proxied I2C bus. Signed-off-by: Samuel Holland --- .../input/pine64,pinephone-keyboard.yaml | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/pine64,pinephone-keyboard.yaml diff --git a/Documentation/devicetree/bindings/input/pine64,pinephone-keyboard.yaml b/Documentation/devicetree/bindings/input/pine64,pinephone-keyboard.yaml new file mode 100644 index 000000000000..00f084b263f0 --- /dev/null +++ b/Documentation/devicetree/bindings/input/pine64,pinephone-keyboard.yaml @@ -0,0 +1,90 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/pine64,pinephone-keyboard.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Pine64 PinePhone keyboard device tree bindings + +maintainers: + - Samuel Holland + +description: + A keyboard accessory is available for the Pine64 PinePhone and PinePhone Pro. + It connects via I2C, providing a raw scan matrix, a flashing interface, and a + subordinate I2C bus for communication with a battery charger IC. + +allOf: + - $ref: /schemas/input/matrix-keymap.yaml# + +properties: + compatible: + const: pine64,pinephone-keyboard + + reg: + const: 0x15 + + interrupts: + maxItems: 1 + + linux,fn-keymap: + $ref: /schemas/input/matrix-keymap.yaml#/properties/linux,keymap + description: keymap used when the Fn key is pressed + + wakeup-source: true + + i2c-bus: + $ref: /schemas/i2c/i2c-controller.yaml# + +dependencies: + linux,fn-keymap: [ 'keypad,num-columns', 'keypad,num-rows' ] + linux,keymap: [ 'keypad,num-columns', 'keypad,num-rows' ] + +required: + - compatible + - reg + - interrupts + +unevaluatedProperties: false + +examples: + - | + #include + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + keyboard@15 { + compatible = "pine64,pinephone-keyboard"; + reg = <0x15>; + interrupt-parent = <&r_pio>; + interrupts = <0 12 IRQ_TYPE_EDGE_FALLING>; /* PL12 */ + keypad,num-rows = <6>; + keypad,num-columns = <12>; + linux,fn-keymap = ; + linux,keymap = ; + + i2c-bus { + #address-cells = <1>; + #size-cells = <0>; + + charger@75 { + reg = <0x75>; + }; + }; + }; + };