From patchwork Mon Nov 21 06:51:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacky Bai X-Patchwork-Id: 13050361 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 EAA6EC4332F for ; Mon, 21 Nov 2022 06:51:56 +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: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:In-Reply-To:References: List-Owner; bh=QHBdwSoSKL8Fnpcu7cKJJHE/wS4DyVhAvIWmCxYvc48=; b=4/Yw6q/fMOSbiT WGoWTvYTQFweavGKNLWWj1h/Xym68gPVeb7T6hVBj+ad7HL9TEJGWoXsqe8sb8wRrtiS0RKhMcVeo WxF3wd7jo9DifwR1L7gn+xjXGQ6zM6p3ry8PtS6Mtv+uDaTZnnmP1CBkxr8V1e35q8txjlZJawI5s IPOhT9S0JfapdoQ1b+YFEloC/k8T3XRsaNnGcHuUP1vZTW3d38MOoSTUxhfhRnRJAKPzDMRb3pSaH w9DeKcSSYmZ7H2JroPel4WoJ8P+NBCKAV1WLMbroaJpKzgRf60jbtrsRwanicAEZUO/1vf1KABnFs z+6CidO24jLA82Cp9d5g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ox0da-00A07R-3U; Mon, 21 Nov 2022 06:50:38 +0000 Received: from mail-db8eur05on20626.outbound.protection.outlook.com ([2a01:111:f400:7e1a::626] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ox0dV-009zyN-1o for linux-arm-kernel@lists.infradead.org; Mon, 21 Nov 2022 06:50:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jTHbfLJXEOTEXKrq+lod1aa00Srx2Pc9bH+yf5oYv/rEq9w6cVmlyYa/IFzyj9oRiMDBHoM1zlqBpfF5XT5VTN0uVDVOz6bKcECNqcq03UziCuMOhoPepbFsDnmsJYv2JHn/Bm8i7b3Fay1kvEKEk6uXzbb9NtslxHyaIu2egDJECjGiR7busN0c7RHj99XBVr4TQ5YtoTzopT+Dh2c59pLI07Hf8owdaqEWefNK8yuHKqY5RJeT34vMU+xftoZEJ2E0zwHXuMYjiuEIm0/x1qOPTRH3WUyQSDPtSqyGS7/wXLkxhSW9KfxSc+7B4EFWoUqfGtqhlMoybdRqIAcvxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3z1ySkrBqQZVr6vY4is14M2zP9QqijDioFf8dn0K0/0=; b=Ez1rgef8QdSN69nLPPmnG4Xen1vnBCdNX5r7bdwnDw+GG2ZaT2dBhyPNPsq2fwfRBe8dV5VSeZ5vMROcn7Xy8390M0eKYZUqxnaQU9ZIYvKQh3vANta03/e87vL8NZnx+hGcXmb8TGCsK55rjnLoMLijw/6fvZvwxhGnPeCRY6chgu1BZDeDl+8GxT7XuOobMR9cLJDXPjIm4g0kJidRZG/ywkLDu4/HP8l3nmWB8cN5j97tZi+dlSncBXuBhGAHYatVmjusWeNPVexGuugXjvjhUH1md4rA5TvuaFFurTt6/bvEozrC9c0f3xwun35EFbNk51MGMAlH6ZdFkrRM8g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3z1ySkrBqQZVr6vY4is14M2zP9QqijDioFf8dn0K0/0=; b=Q6eSllmgwMDjjIDhOiBwEszU4q2hMwd3z3xQV69SWllzjPd10hjuqCsQoTOJE6IucGfqKxd8NXShwLbWwzIMP+1lzbePtfAJrCYz+Be3BRj13Z6m5NIQ4Xe1PS/j6n06wvcPUi3E8/SgDTXLS2rB8qL/6cGrLIoYJqhVJrj/22U= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8PR04MB8642.eurprd04.prod.outlook.com (2603:10a6:20b:429::24) by AM7PR04MB7142.eurprd04.prod.outlook.com (2603:10a6:20b:113::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.9; Mon, 21 Nov 2022 06:50:27 +0000 Received: from AS8PR04MB8642.eurprd04.prod.outlook.com ([fe80::9ded:65b7:9d51:d37a]) by AS8PR04MB8642.eurprd04.prod.outlook.com ([fe80::9ded:65b7:9d51:d37a%8]) with mapi id 15.20.5834.011; Mon, 21 Nov 2022 06:50:27 +0000 From: Jacky Bai To: lee@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de, dmitry.torokhov@gmail.com, a.zummo@towertech.it, alexandre.belloni@bootlin.com Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-input@vger.kernel.org, linux-rtc@vger.kernel.org, kernel@pengutronix.de, linux-imx@nxp.com, festevam@gmail.com Subject: [PATCH 0/4] Add nxp bbnsm module support Date: Mon, 21 Nov 2022 14:51:40 +0800 Message-Id: <20221121065144.3667658-1-ping.bai@nxp.com> X-Mailer: git-send-email 2.37.1 X-ClientProxiedBy: SG2PR02CA0123.apcprd02.prod.outlook.com (2603:1096:4:188::22) To AS8PR04MB8642.eurprd04.prod.outlook.com (2603:10a6:20b:429::24) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8642:EE_|AM7PR04MB7142:EE_ X-MS-Office365-Filtering-Correlation-Id: e94fd821-fd27-427a-16a9-08dacb8cabea X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: d2WtqyZkUo7Mvpdf1JTAj6oyGdIQEHmuUIP7u14zRZGzSjt9hoa2kaS9f8XjlLN7jYTHeNF0AwyaLE1r+jKi0bg+ycMm2n2gkWOJSIKbbmHijkX7G7a61t0fEEujEBvGfs06ye1UzIi3sDMx49bVbRDs4oaW+PXDpU4bhJsyISp7wpVSBTrRbDgmy5YzWX3ptDf4mVOz2rONyABQFw8LyyZXmK8JNvM3/WfOD5jxPaCIB6p9nQnjBXGUl2PzO16CYmjOSl1qQZyVqfzxjqOW8KYN+3MjCbCZgRxWDJ32oVfQrGOpzRXXspjFl4QrAaHNh5m+LZsFrNbGKnPOoN1MtgEcADc4FAQ/hgNO+lFFht8U8+VUsVo/2OGJzN2Jcd2ePQ+okuMlXOA26RikIstN8kXiI/jgElJj+rh0ddeVCCNte4R2phiTCTWOAqZbV8FzQiSSOmakKNk2hkOXT0QS4fCR0iZtBHEaYWlJv63OVEGpnKDZIYcLob/niJlqOxZyZLm40nFFcc/nSpM1Pfyb6XGbJqcl2Ta9gCCiugtfhae6BuekTz/33XZxFYWr+m4KmOYtI5JoOGO9m+EzmPA5nxdxBwal24AR5k6oA2BGVYVBJL57Dmp3QPEr5d2FlBJEP80U5q4PKJ3Qyf/op0KprspMeJ1Rbd6sjBEQZXdaxrOT2N5Mo+xPwm3Xg8Cee5LSZKu+p/b3wzfbvh0AoKzijg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR04MB8642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(366004)(136003)(376002)(39860400002)(346002)(396003)(451199015)(36756003)(38100700002)(38350700002)(41300700001)(2906002)(86362001)(66476007)(8676002)(4326008)(66556008)(316002)(6486002)(66946007)(6512007)(26005)(186003)(1076003)(8936002)(5660300002)(7416002)(478600001)(6506007)(2616005)(52116002)(6666004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: HcmLAyKtNluxC7hsvdLMhJtDaX2pUgVSvAT8qupCzO+0g0cILjQCYKPBKsLrNb/lxEC7XwuMzvI7VbmRP3hGQuFF0tA1kSZXzJj0i43ShwEQxberGey1UXhvLH/9clMILGLH1ZqUA/fcWgGNdb4nEciH5BGzwKs8BPm+n3WawzD5/QjdQ0wpQJQYTUI25xSicbBF5OcEAYKB4f82pW1gtZD1802/LNzTk3WyCZFlEm0zA8qVPVBor9Mc63Ifz31AWWhkgywkLtzbDqopYeaw0WW+D4IvptL+0arMWZDWwoz0PrUizrNW75xte85BK/YTCeQMPDaWBWcNRfzP+NA4mkVrPmbKV4e2j5JF/5IAS2Jodfh0BOMG2Pzqi4Cr1V7koUEgTxuhPSkb5CJ9lf7515863nCA3925Z9jdSs6+VHNvmM+FyV63LpifejjwScqMlx6Q2fGguRde1r7+eNvAoAHSDb0SjgpuBpeHSjBYM6hUsrzKngVU57olycz12csmL3Gaoqh9g9l/x7mlQr/k8hzU4Oql1o2no7dkwLbeNYKMJFbCerRPe95VlfhyrBF0kwxYo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-08dacb8cabea X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Nov 2022 06:50:26.9888 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: n0dHGVUOj2oFO05yS7ceaK3bjqYJkkB10Nh/q+v8pIgpd9vQelNmGYurjyoI3Ydi1i9hevO1z87svvpmlSlFfg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR04MB7142 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221120_225033_149927_7A57946B X-CRM114-Status: GOOD ( 10.73 ) 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 NXP BBNSM (Battery-Backed Non-Secure Module) serves as non-volatile logic and storage for the system. it provides some similar functions like RTC and ON/OFF support as previous SNVS module found on legacy i.MX SoCs. The BBNSM is replacement of previous SNVS module, and more likely it will be used on all the future i.MX SoC or other SoCs from NXP. This patchset add the basic support for BBNSM that found on i.MX93. Jacky Bai (4): dt-bindings: mfd: nxp,bbnsm: Add binding for nxp bbnsm input: bbnsm_pwrkey: Add bbnsm power key support rtc: bbnsm: Add the bbnsm rtc support arm64: dts: imx93: Add the bbnsm dts node .../devicetree/bindings/mfd/nxp,bbnsm.yaml | 103 ++++++++ arch/arm64/boot/dts/freescale/imx93.dtsi | 18 ++ drivers/input/keyboard/Kconfig | 11 + drivers/input/keyboard/Makefile | 1 + drivers/input/keyboard/bbnsm_pwrkey.c | 196 +++++++++++++++ drivers/rtc/Kconfig | 12 + drivers/rtc/Makefile | 1 + drivers/rtc/rtc-bbnsm.c | 223 ++++++++++++++++++ 8 files changed, 565 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/nxp,bbnsm.yaml create mode 100644 drivers/input/keyboard/bbnsm_pwrkey.c create mode 100644 drivers/rtc/rtc-bbnsm.c