From patchwork Wed Jul 20 14:48:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mattijs Korpershoek X-Patchwork-Id: 591932 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 3E2A3CCA483 for ; Wed, 20 Jul 2022 14:48:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235277AbiGTOso (ORCPT ); Wed, 20 Jul 2022 10:48:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235073AbiGTOsm (ORCPT ); Wed, 20 Jul 2022 10:48:42 -0400 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 392E7528B6 for ; Wed, 20 Jul 2022 07:48:41 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id bv24so2588882wrb.3 for ; Wed, 20 Jul 2022 07:48:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:date:subject:mime-version:content-transfer-encoding:message-id :references:in-reply-to:to:cc; bh=bLWM+s+iR5LdVaHPuafu7iCm3mwz2NHAzkIzkY8xmTY=; b=3o97zfA5+8dQXwtwy7pQ9pIIsD5FJ3qzv88L5rTytIICFhHWbxdWnJ9vUD26bICVLZ b4WQu8J+7rgfsC3O53slfyN9BObsbC0xNBezoPWL6JvxhPsCac/td0xgxZAAV2A6TtyA 4fLEJ1TIJRgwWxfwo+JPQdzaQiqGUbTZbTFh57fmlNNc7wH3Am48OgcX1yT5GO2Ph5ep jLuFQRALqw50jBJQb7SNOjZbTZkmbsZP7i7I2SZ8jlE20tl3ya59X7uUoVYLB/OxgXWY YVKnie59wwIK2I5VIWeQ+ESe12NplRAeK0z7sxIO0TGu4ZME7CKjxHvvEgNtfeuQeO2c 1JMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:date:subject:mime-version :content-transfer-encoding:message-id:references:in-reply-to:to:cc; bh=bLWM+s+iR5LdVaHPuafu7iCm3mwz2NHAzkIzkY8xmTY=; b=ocmVfJw9bdR5LI5OLWvcg/yh6NoFHG6IiBYLUTyFmIQaeVmvbuNQp/vIks0ayTODWe LcDt3CSGSM9rfvWIvIwVvh3Xk70Nbwlm0bdHg8WtZa665A51AUj011XYhNdprPzUdCrx kOdxyQTOJj2Ay1yuntizfAj8pk3pRGm0sAvAmqKGZo/TexYu/UEt2AR4wRrYDxrlJyeo Obv1A5B00XZTKXB6gXZXS3btuzPOTe7N7O0H0n5F4fpmqU6C3+sLwt7NHsqUiJZsvjYf BBr8tVQs3t0ItXVfmUSy2zJlieMaAXocdEdUoYMlc8zd2ZyLjEd2M705VcFIhHajbUgI +oDA== X-Gm-Message-State: AJIora/QkdeLRhJkqAYxrfK36Qerep8KrEE0fEuWIrm760lKezz22hhW czw6fjnb8ARLSJyO8wmKXBJNGw== X-Google-Smtp-Source: AGRyM1uqyELZOTi1y1+BWMg0rNkGod1uVK9t35VqzqBXcj/DigJ522rSj8SmtDKiiJo4GtoMoIymsA== X-Received: by 2002:a5d:6110:0:b0:21e:4fe4:f7ba with SMTP id v16-20020a5d6110000000b0021e4fe4f7bamr727919wrt.69.1658328519755; Wed, 20 Jul 2022 07:48:39 -0700 (PDT) Received: from [127.0.1.1] ([2a01:cb19:85e6:1900:c639:22f8:bed9:44dd]) by smtp.gmail.com with ESMTPSA id f8-20020a05600c4e8800b003a31673515bsm3321121wmq.7.2022.07.20.07.48.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jul 2022 07:48:39 -0700 (PDT) From: Mattijs Korpershoek Date: Wed, 20 Jul 2022 16:48:37 +0200 Subject: [PATCH v1 1/6] MAINTAINERS: input: add mattijs for mt6779-keypad MIME-Version: 1.0 Message-Id: <20220720-mt8183-keypad-v1-1-ef9fc29dbff4@baylibre.com> References: <20220720-mt8183-keypad-v1-0-ef9fc29dbff4@baylibre.com> In-Reply-To: <20220720-mt8183-keypad-v1-0-ef9fc29dbff4@baylibre.com> To: Rob Herring , Krzysztof Kozlowski , Mattijs Korpershoek , Dmitry Torokhov , Matthias Brugger Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, Fabien Parent , devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, Fabien Parent , linux-arm-kernel@lists.infradead.org X-Mailer: b4 0.10.0-dev-54fef Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org As stated in [1]: Fengping has no longer interest and time to maintain this driver so he agreed to transfer maintainership over to me. Add a dedicated maintainer entry as well for the driver to make sure that I can help with patch reviews. [1] https://lore.kernel.org/r/20220421140255.2781505-1-mkorpershoek@baylibre.com Signed-off-by: Mattijs Korpershoek diff --git a/MAINTAINERS b/MAINTAINERS index 264e7a72afd6..f7a0bae74dc8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12771,6 +12771,12 @@ S: Supported F: Documentation/devicetree/bindings/media/mediatek-jpeg-*.yaml F: drivers/media/platform/mediatek/jpeg/ +MEDIATEK KEYPAD DRIVER +M: Mattijs Korpershoek +S: Supported +F: Documentation/devicetree/bindings/input/mediatek,mt6779-keypad.yaml +F: drivers/input/keyboard/mt6779-keypad.c + MEDIATEK MDP DRIVER M: Minghsiu Tsai M: Houlong Wei From patchwork Wed Jul 20 14:48:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mattijs Korpershoek X-Patchwork-Id: 591930 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 B30B3CCA480 for ; Wed, 20 Jul 2022 14:48:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236032AbiGTOsw (ORCPT ); Wed, 20 Jul 2022 10:48:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236325AbiGTOsr (ORCPT ); Wed, 20 Jul 2022 10:48:47 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC22652442 for ; Wed, 20 Jul 2022 07:48:42 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id a5so26432355wrx.12 for ; Wed, 20 Jul 2022 07:48:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:date:subject:mime-version:content-transfer-encoding:message-id :references:in-reply-to:to:cc; bh=EOTw2SZsHwugM+Ez0nEALoToqSbMZWPKVYP438H1mxU=; b=oMm7LoJwBASOpcAnoe5ZW0VcoBtpNp4qdQXkxDMqfsYACtq2XOkYP+zDZPKLL4wMBw YgIqj4c9bDXecsVxFerVyCof9sXAssTSpDgeyJzMUqvcp5rJryAbqDSHlATe3jt96iHG WDtXCJY7Y6NcZXZsGo3/Pww8583CYWbnViwflztE1ocPMbOBgWan5EX/aj1cCeoZuy9i 9faahOs5YUZNPf85kg/MwQEMmex/wyjlyUCRmxo4MPNf1qV7Ep+U/pgIAQiOYRiTGjQC ZBxpaNtME1cHVV7UMwlhbx1u60srMx9Fp1zRqRjrcLpKx1kk1sNzoYkkn7iaHCbpVNRl 3ihA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:date:subject:mime-version :content-transfer-encoding:message-id:references:in-reply-to:to:cc; bh=EOTw2SZsHwugM+Ez0nEALoToqSbMZWPKVYP438H1mxU=; b=8FyOliUMpC9uGz2jE+joBfYdcUYp2S2yk8asXnQuhiYb5NaU3lEvenuVB3ZjJPJ4dU KkG/rP7Mntn6P4+bHlAhbh9CGO7X1HGIw8TH3zhIAyg6yf6AsC6v/vQJphzQtWWrGNBx YTWjUjCydGTyO8utAx/EUW4THv+EOl30Y9uA713Ljf/3XrWVZJBwYcgPfciJNGiJS8Iw u9DRHl1jpFHmOrA7FYbU2cV2XWAmPVKfr8xYRO6KheScoIC+1Ua4YrPF+oLhlWxy5KmL XmzJM/OVCXSQO0jd2kZsgyixO8x7MQVfS16y47czfCnvaWbXzxFiqsbuBWbKgSn4f9Dt A/Lw== X-Gm-Message-State: AJIora8ZhWkSxNx+KebMQl05k0mfU4jNuPO+rmwoFqJHBlWO0huDQ3MU iT8L7Kd5U8QIXDYJhnCPePG+yw== X-Google-Smtp-Source: AGRyM1vk48vhBISpLi0CcOr9kKDWKs0EqlrNQDdVJdrT6hsTP+HmSTbFh6RCGQZsl1ZBg+vkqVqr/A== X-Received: by 2002:a05:6000:1789:b0:21d:7279:f455 with SMTP id e9-20020a056000178900b0021d7279f455mr30432550wrg.542.1658328521299; Wed, 20 Jul 2022 07:48:41 -0700 (PDT) Received: from [127.0.1.1] ([2a01:cb19:85e6:1900:c639:22f8:bed9:44dd]) by smtp.gmail.com with ESMTPSA id f8-20020a05600c4e8800b003a31673515bsm3321121wmq.7.2022.07.20.07.48.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jul 2022 07:48:41 -0700 (PDT) From: Mattijs Korpershoek Date: Wed, 20 Jul 2022 16:48:39 +0200 Subject: [PATCH v1 3/6] dt-bindings: mediatek,mt6779-keypad: add mediatek,double-keys MIME-Version: 1.0 Message-Id: <20220720-mt8183-keypad-v1-3-ef9fc29dbff4@baylibre.com> References: <20220720-mt8183-keypad-v1-0-ef9fc29dbff4@baylibre.com> In-Reply-To: <20220720-mt8183-keypad-v1-0-ef9fc29dbff4@baylibre.com> To: Rob Herring , Krzysztof Kozlowski , Mattijs Korpershoek , Dmitry Torokhov , Matthias Brugger Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, Fabien Parent , devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, Fabien Parent , linux-arm-kernel@lists.infradead.org X-Mailer: b4 0.10.0-dev-54fef Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org MediaTek keypad has 2 modes of detecting key events: - single key: each (row, column) can detect one key - double key: each (row, column) is a group of 2 keys Currently, only single key detection is supported (by default) Add an optional property, mediatek,double-keys to support double key detection. Double key support exists to minimize cost, since it reduces the number of pins required for physical keys. Signed-off-by: Mattijs Korpershoek diff --git a/Documentation/devicetree/bindings/input/mediatek,mt6779-keypad.yaml b/Documentation/devicetree/bindings/input/mediatek,mt6779-keypad.yaml index ca8ae40a73f7..03c9555849e5 100644 --- a/Documentation/devicetree/bindings/input/mediatek,mt6779-keypad.yaml +++ b/Documentation/devicetree/bindings/input/mediatek,mt6779-keypad.yaml @@ -49,6 +49,12 @@ properties: maximum: 256 default: 16 + mediatek,double-keys: + description: | + use double key matrix instead of single key + when set, each (row,column) is a group that can detect 2 keys + type: boolean + required: - compatible - reg From patchwork Wed Jul 20 14:48:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mattijs Korpershoek X-Patchwork-Id: 591931 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 653EBC433EF for ; Wed, 20 Jul 2022 14:48:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236519AbiGTOsu (ORCPT ); Wed, 20 Jul 2022 10:48:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236032AbiGTOsr (ORCPT ); Wed, 20 Jul 2022 10:48:47 -0400 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C81751A3A for ; Wed, 20 Jul 2022 07:48:43 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id n12so13615108wrc.8 for ; Wed, 20 Jul 2022 07:48:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:date:subject:mime-version:content-transfer-encoding:message-id :references:in-reply-to:to:cc; bh=VGUb9DmOvoGv8nh5rqV1xHbR9kL6IKYbqd/qwv1q+CA=; b=jRL5JcT9oKaeo7HwZrYobK/YmXLf7T2OTvQbB+5Tt4Ej73xiicgN2WuAV9zlw2rEKj gBD1wR+vAFAyQ36BarOC42aGFh0Z+CUVKmoz8jocS+Sr1oFSoZdpIpLnfx+p6ZO2A1ou AAcutHoNxH3HiLedSavddURbO+/DeoJdbuK1UKbsYvq/AEfupOK/Luj7ZiWHbwkOSZy2 aHRgAVTfYYziWX4EbaYfxDteMDi0fDZibAkzqfnGLqb6TtdUDY9XJZimypikQHHkA/RS HwXgTHe4cGSkZD6UzZkh/rw9pNfYj2qyAa5Grv7CnZLvskr1FGDTqRsjvNQ4XaQ9hQ0Y SVRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:date:subject:mime-version :content-transfer-encoding:message-id:references:in-reply-to:to:cc; bh=VGUb9DmOvoGv8nh5rqV1xHbR9kL6IKYbqd/qwv1q+CA=; b=T30dYfdJ69CpI2E/xIjEu73As3Zs9zxriymp6Fn3vZg0Q5smFmA6M0zfm5qNxqksda ich8qwi1DshLEpgjL4z3z82pe6dyGu5daTrzUkVanEVnKamn0X+J1lN6CW3txkthlgPW 3E8+Dh1vPxrWmy5WdxLl5V74i6Eiy2iTfWcdL0bUnkeGcRCCcTFFVBeEqw+sSR9w8ATP ZYENI30cpBvbtYa4DxPsIhLyUnDgOfO6RGlGlFez6u+lO+6FLnEqc4dx3X2zlQ53DBxK Nw7C/Sm+h/dt9fkcPqS51HUfzaYVXroUuyKNJvJOIHzH74PmRjBn9EekwLu1sx64/uHA VbEw== X-Gm-Message-State: AJIora+n/3nVhwLe5+5u/PzbEY4XEJqSNeRfEkZoXsvABkm8AHI0fFbG X93EkWXAFvJgitiOAZbdmJ5UnA== X-Google-Smtp-Source: AGRyM1vTy640y2iV3Q5noFGBYMKVc349uYWye3eyUbUhWj27qZA/i9aPmd4vKm57vaVf4wNmnxmupw== X-Received: by 2002:a5d:648a:0:b0:21d:b684:9c76 with SMTP id o10-20020a5d648a000000b0021db6849c76mr30956265wri.463.1658328522794; Wed, 20 Jul 2022 07:48:42 -0700 (PDT) Received: from [127.0.1.1] ([2a01:cb19:85e6:1900:c639:22f8:bed9:44dd]) by smtp.gmail.com with ESMTPSA id f8-20020a05600c4e8800b003a31673515bsm3321121wmq.7.2022.07.20.07.48.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jul 2022 07:48:42 -0700 (PDT) From: Mattijs Korpershoek Date: Wed, 20 Jul 2022 16:48:41 +0200 Subject: [PATCH v1 5/6] arm64: dts: mediatek: mt8183: add keyboard node MIME-Version: 1.0 Message-Id: <20220720-mt8183-keypad-v1-5-ef9fc29dbff4@baylibre.com> References: <20220720-mt8183-keypad-v1-0-ef9fc29dbff4@baylibre.com> In-Reply-To: <20220720-mt8183-keypad-v1-0-ef9fc29dbff4@baylibre.com> To: Rob Herring , Krzysztof Kozlowski , Mattijs Korpershoek , Dmitry Torokhov , Matthias Brugger Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, Fabien Parent , devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, Fabien Parent , linux-arm-kernel@lists.infradead.org X-Mailer: b4 0.10.0-dev-54fef Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Fabien Parent MT8183 has an on-SoC keyboard controller commonly used for volume up/down buttons. List it in the SoC dts so that boards can enable/use it. Signed-off-by: Fabien Parent Signed-off-by: Mattijs Korpershoek diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi b/arch/arm64/boot/dts/mediatek/mt8183.dtsi index 9d32871973a2..9d8fdebaabe3 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8183.dtsi @@ -943,6 +943,15 @@ pwrap: pwrap@1000d000 { clock-names = "spi", "wrap"; }; + keyboard: keyboard@10010000 { + compatible = "mediatek,mt6779-keypad"; + reg = <0 0x10010000 0 0x1000>; + interrupts = ; + clocks = <&clk26m>; + clock-names = "kpd"; + status = "disabled"; + }; + scp: scp@10500000 { compatible = "mediatek,mt8183-scp"; reg = <0 0x10500000 0 0x80000>,