From patchwork Tue Oct 22 06:31:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming-Jen Chen X-Patchwork-Id: 13845202 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 D3EB8D1CDA1 for ; Tue, 22 Oct 2024 06:35:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To: Cc:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=JhZnFvvf8Id6PGMcwnAZsntULqiyWtz+J0PFKo90yqI=; b=L6PbN3KwM+G2vNFU8tKM/8eQZl Z7j+pVSIay106biXMrig6SoHRFZ8XcRpsDbdY91fFA8WSK7wg3xrU2e9VACg/hiVtl+RB/tlFW2KT rg/MY/vwET1TXS5uo3V52NElFgqOWf+td9ezG7p5RBPn3v1cCVcEvgE5+GJB5KNZB+nKIYXxznpIN bzUuA6zEg8to1TV8Jiq/28IPDQaRNHVgLhvWTIM9IXSb2FWwTkHyDYfVfXwLTQnP7NlLqE9hFPrRJ XnXsgNt3R9+NC4WL06q3NZNN9EpxRk1MW39XqqmPiQV5dUlGOW6hXqGIbPrUR5YFOFO2lHhLS7k1T W3KxXnVA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t38U9-00000009pUn-1Kmz; Tue, 22 Oct 2024 06:35:17 +0000 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t38R8-00000009okh-3WdS for linux-arm-kernel@lists.infradead.org; Tue, 22 Oct 2024 06:32:12 +0000 Received: by mail-pj1-x102b.google.com with SMTP id 98e67ed59e1d1-2e2e6a1042dso4177033a91.2 for ; Mon, 21 Oct 2024 23:32:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729578729; x=1730183529; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=JhZnFvvf8Id6PGMcwnAZsntULqiyWtz+J0PFKo90yqI=; b=cQVPMcLGrpZqcl90+8Cb94t2+pKkRhV4lMHYhUCKQtGaKHYoFNRTQccv/dM/kWAiN3 wQ8QzYCUbbWjq0O4WrQJ2L7WTjpNPP4/f+Pc1DLh5isjniuWzyZ4gwEWGTvj4n8Pv2GR i7AD6KQBJ6vE1Nw5RUopKVwqMyQ5zj1ywzDM9IozP4T6yHZlTA7TPVGb7ZfdtC1ZtFDg NCa3CdA5//4x+EptPqkvoAqy7LRKwZC8HzFlkcGLdLDd6leDXpg9klIGOk0uV5DkESej hEyE+thNya7zE3UND7SKb7ZFZv85FSayLgqycdnAYVtB0FhbkdDZO7ZVY2xPo/jt4MJD YIAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729578729; x=1730183529; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JhZnFvvf8Id6PGMcwnAZsntULqiyWtz+J0PFKo90yqI=; b=XBtoDT5W2urINO+OIYjcVnpsf4K0vcxZjhTkqHyVRHzwVSmIstJKF2IPVA5Sgk/PWu ahWguQ2R99IwzqbUnfXthVar9HLPF6Hxxmqgob1X/qpAGEK7vVevk6+s+KbWrVNxSs+U HHjEgRrCZou7a9aJYwSSkXYEHg1VzZnb846mL+UgqEuYsa+OANEZzgI1h1QL/u8413Y+ KI2Zp6+aIlSTt8f0oHCd/AAPQuaMCoB/b5mYBIe/gHJ5x2sY2S9eM8NLvbek1hJk6lvH 2JBpnLe77Wv3T/T9cu2/GxGxsMCCNSM6NZNZSqbzZsN3LP57WNHW5atx30gGv2Qe32Z1 NgtQ== X-Forwarded-Encrypted: i=1; AJvYcCVKvLz3vwYhoVQALoWClV5RA/9rwWDNxkPzyLZg9hhz11lYISNguXi1u7YEP5jrR7cB/FTWcvncIemT+59+uFhR@lists.infradead.org X-Gm-Message-State: AOJu0YwIeODd80s6tkAohb4m+G35aW8o0ByIqIOQ0Mgf3ON3gG84O+Ks g8K9RBRAbzCNKl1P9b2CJ4QVZq7+uJDA7lIOD5tRuQJ4jwIYUecrCN/5bCLI X-Google-Smtp-Source: AGHT+IGN8i3mOey7VdZPPlZdjGYJJmkHvvSelu321aCwFvVAEV3cURA9WTE75dCfPDQ8v06QzorsLg== X-Received: by 2002:a17:90b:3013:b0:2e2:d181:6809 with SMTP id 98e67ed59e1d1-2e561a178e6mr16626201a91.39.1729578729488; Mon, 21 Oct 2024 23:32:09 -0700 (PDT) Received: from localhost.localdomain (60-250-192-107.hinet-ip.hinet.net. [60.250.192.107]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e5ad355bebsm5227508a91.7.2024.10.21.23.32.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Oct 2024 23:32:09 -0700 (PDT) From: mjchen To: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, mjchen0829@gmail.com, mjchen@nuvoton.com, peng.fan@nxp.com, sudeep.holla@arm.com, arnd@arndb.de, conor+dt@kernel.org, krzk+dt@kernel.org, robh@kernel.org, dmitry.torokhov@gmail.com Subject: [PATCH 1/2] dt-bindings: input: Add Nuvoton MA35D1 keypad Date: Tue, 22 Oct 2024 06:31:57 +0000 Message-Id: <20241022063158.5910-2-mjchen0829@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241022063158.5910-1-mjchen0829@gmail.com> References: <20241022063158.5910-1-mjchen0829@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241021_233210_918206_A47EEF40 X-CRM114-Status: GOOD ( 12.85 ) 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 From: mjchen Add YAML bindings for MA35D1 SoC keypad. Signed-off-by: mjchen --- .../bindings/input/nvt,ma35d1-keypad.yaml | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100755 Documentation/devicetree/bindings/input/nvt,ma35d1-keypad.yaml diff --git a/Documentation/devicetree/bindings/input/nvt,ma35d1-keypad.yaml b/Documentation/devicetree/bindings/input/nvt,ma35d1-keypad.yaml new file mode 100755 index 000000000000..3d9fc26cc132 --- /dev/null +++ b/Documentation/devicetree/bindings/input/nvt,ma35d1-keypad.yaml @@ -0,0 +1,88 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/nvt,ma35d1-keypad.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NVT MA35D1 Keypad + +maintainers: + - Ming-jen Chen + +allOf: + - $ref: /schemas/input/matrix-keymap.yaml# + +properties: + compatible: + const: nuvoton,ma35d1-kpi + + debounce-period: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + key debounce period select + 0 = 0 clock + 1 = 0 clock + 2 = 0 clock + 3 = 8 clocks + 4 = 16 clocks + 5 = 32 clocks + 6 = 64 clocks + 7 = 128 clocks + 8 = 256 clocks + 9 = 512 clocks + 10 = 1024 clocks + 11 = 2048 clocks + 12 = 4096 clocks + 13 = 8192 clocks + + per-scale: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Row Scan Cycle Pre-scale Value (1 to 256). + + per-scalediv: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Per-scale divider (1 to 256). + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + - clocks + - linux,keymap + - debounce-period + - per-scale + - per-scalediv + +unevaluatedProperties: false + +examples: + - | + #include + keypad: keypad@404A0000 { + compatible = "nuvoton,ma35d1-kpi"; + reg = <0x404A0000 0x10000>; + interrupts = <79>; + clocks = <&clk>; + keypad,num-rows = <2>; + keypad,num-columns = <2>; + + linux,keymap = < + MATRIX_KEY(0, 0, KEY_ENTER) + MATRIX_KEY(0, 1, KEY_ENTER) + MATRIX_KEY(1, 0, KEY_SPACE) + MATRIX_KEY(1, 1, KEY_Z) + >; + + debounce-period = <1>; + per-scale = <1>; + per-scalediv = <24>; + };