From patchwork Thu Jul 21 13:42:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 12925198 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 77F1AC43334 for ; Thu, 21 Jul 2022 13:50:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/2vxhaUyahILPgMmyRJqxzEyoFn6/y98zl+CRAT6UUo=; b=brSPNgmKIeF3rm XAMcmaDFh+u68ur3C/OBGKfzgzJ1/gjh4A7w7+fCRuHQOMT/TG39ypBmx+G/G3+BxRZXI5A2yLOSm 5M7KpRCzqltFnTGlO/GZoOj+5fijIoO+BmluPuXt/o9ZflZqqyCwjPLB1s6RIzFSkTAAYxQen9EYD rr7sJEOn0s3KnoKXo6lP2Nu8Xtv5HvVoZRz+5hkLDC+GQR9WFvgcXYFg4eYcK+vMTfz9fkvJsYYPT OufnlwjsxiNyNz0h1C4sfSExlAWDkKbt2I9Jicy2WhWDaTYZ75rmXKNJ9rx2mWHQS3AXLjQl4nWdk TFuZIxm6AJtR6IT3gRnA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oEWY3-007G8w-PF; Thu, 21 Jul 2022 13:49:04 +0000 Received: from madras.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e5ab]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oEWRp-007CKZ-11; Thu, 21 Jul 2022 13:42:40 +0000 Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 322456601AAA; Thu, 21 Jul 2022 14:42:33 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1658410953; bh=JK6KfDUPzV5yJTwbi0+SKom1B+2IFfpMg25WH7f86kE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hfyYxRxrxs7BFToL5NTnw+b49Un2W291Oe7UeRrPflcqwKScbBojvWIe4Mt2lLQuj Ine9oWvUCakBhWNsWuHjqWlhrt92BFx2iCdF7Csprx0OcOU5VPTfatwFBhD3qqIM2N sM7FGve2CWkgmHHPBzKJF2LvI8/qSLERByDES0Y8AE5VJphHRNiuvcCAEfeE/WB+HF PNjy4zRDbP2p4VKDuI0QbcV+GX2v9+4rjvpsaInOFvPXj8yY+3suxuMPDcHVWnb/rr ml89pDwjmWcobi0pWvksEzRgIaT8gOClBT7LQSpbUnP7PC9AhGEM2xOdgD6w5kEmTL rJVC07/12jiRQ== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, AngeloGioacchino Del Regno Subject: [PATCH 3/8] arm64: dts: mediatek: cherry: Add keyboard mapping for the top row Date: Thu, 21 Jul 2022 15:42:23 +0200 Message-Id: <20220721134228.310178-4-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220721134228.310178-1-angelogioacchino.delregno@collabora.com> References: <20220721134228.310178-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220721_064237_259543_9E668B07 X-CRM114-Status: UNSURE ( 9.18 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Chromebooks' embedded keyboards differ from standard layouts for the top row, as this one doesn't have the standard function keys but shortcuts instead: map these keys to achieve the functionality that is pictured on the printouts. Signed-off-by: AngeloGioacchino Del Regno --- .../boot/dts/mediatek/mt8195-cherry.dtsi | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi index 87ac2b4f9814..2853f7f76c90 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi @@ -821,3 +821,33 @@ &xhci3 { #include #include + +&keyboard_controller { + function-row-physmap = < + MATRIX_KEY(0x00, 0x02, 0) /* T1 */ + MATRIX_KEY(0x03, 0x02, 0) /* T2 */ + MATRIX_KEY(0x02, 0x02, 0) /* T3 */ + MATRIX_KEY(0x01, 0x02, 0) /* T4 */ + MATRIX_KEY(0x03, 0x04, 0) /* T5 */ + MATRIX_KEY(0x02, 0x04, 0) /* T6 */ + MATRIX_KEY(0x01, 0x04, 0) /* T7 */ + MATRIX_KEY(0x02, 0x09, 0) /* T8 */ + MATRIX_KEY(0x01, 0x09, 0) /* T9 */ + MATRIX_KEY(0x00, 0x04, 0) /* T10 */ + >; + + linux,keymap = < + MATRIX_KEY(0x00, 0x02, KEY_BACK) + MATRIX_KEY(0x03, 0x02, KEY_REFRESH) + MATRIX_KEY(0x02, 0x02, KEY_ZOOM) + MATRIX_KEY(0x01, 0x02, KEY_SCALE) + MATRIX_KEY(0x03, 0x04, KEY_SYSRQ) + MATRIX_KEY(0x02, 0x04, KEY_BRIGHTNESSDOWN) + MATRIX_KEY(0x01, 0x04, KEY_BRIGHTNESSUP) + MATRIX_KEY(0x02, 0x09, KEY_MUTE) + MATRIX_KEY(0x01, 0x09, KEY_VOLUMEDOWN) + MATRIX_KEY(0x00, 0x04, KEY_VOLUMEUP) + + CROS_STD_MAIN_KEYMAP + >; +};