From patchwork Tue Jan 3 07:47:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacky Bai X-Patchwork-Id: 13087282 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 8702CC46467 for ; Tue, 3 Jan 2023 07:48:34 +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=gXdIYJp2KrMx/r10uoJh+nZi91mdifvySimZEZ++wfc=; b=3Xy5MZoXNQn9mN VMOeBuv87yONaFrPeJ/5SCzOyV/Vnc0WH0qi/aKPidxYWV9MMIPEEpWRFyPRJudOkDVV5kiPrTE8n fkgqu++QD7Mac6HqlZRnkfpdBODLs62NiqjdjPxDxiyVxGm2dnb5FtN5FAt8R/rr6D3nFkTilMLxp X+Xdc6gzQJHi3wEKatQdMbPiWwN0F//ZRW+708RxVRuniPt3b50ydMGmA51hcVzl73CFIz4lO0L4E pEO2ruSTL1VicGHWevjLLXqL0h8XJlQZnJ4BWaNihuYl5Jr4ynRGsHpVQ1vbrIYeTmKwk0YAUdlut lTroJ11WEXDJ8EEljpZw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pCc0u-00HXMQ-Nj; Tue, 03 Jan 2023 07:47:14 +0000 Received: from mail-db5eur01on2041.outbound.protection.outlook.com ([40.107.15.41] helo=EUR01-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pCc0K-00HX7i-0K for linux-arm-kernel@lists.infradead.org; Tue, 03 Jan 2023 07:46:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KxkLULHA8QKvvx+DbLUtVHO1MHKNhTANQQGPY2JpiggEMUaSJaYlXSlfL3LgPuTn5QEdQ8Cwj6mit5/CoS4XtRtaYCFFvdfVCmcj68fsVWO/w9RuCRclFcqsIRWHHhnpmroMLAzNwfrd/R1kqUiHMiCH5mCJQM1/7bsSdr4HFJSu3X9wE8dn8mtdYDyFa8zdfpAkoaJRmtUlNvpi8U66XoGZ8N+3fb6IftWMSa2Oya06gV/PXWTd1gLmjj3a/ldg+i8ngmOsSCvPEHvp5NnmfUcrDZTxPIZnhOMgGJwdbuJeBrLNNYQIl3Pr0aZdSqjhC2GL/ssY0LcJRsA2Mbygwg== 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=/gq7oD/ecklTQwXERUtX4H3x068GDQp+NEC7VxnECdw=; b=G9Wb5hHjgwP+STV4q8l15gz3oGSpBCNh1nTuse+SliOP2PUR7HJYMKBwRU+MkZSYEfPshot9EDt8Q1xo2mZNEthrAQdBVMAnuwnRO1yoWn0roVIewzA1fwezmgw4A+eElkdCc3H+63KPu2cYeDQj8Tv6phiDjyL2LS6LbvYRPvRGNWOWfD3okqi/exMoBb3lI5kmD08gAuAq9u3+W2KXsqhC8GriWzid43FGF3G/NOOiJgoHYSmp7ZP2JAYWHFhJ7SuQeTZy2l5htLyK0MkE5LX5XG7fO7zUXY2yyYOcdIcHEFviFPck23VTdteMrRQauBKfKYsR859JnWr4VXYG/w== 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=/gq7oD/ecklTQwXERUtX4H3x068GDQp+NEC7VxnECdw=; b=OeCX2cMqWsNua9HtoYbnG7de39M+pWO3cIz0RdV6zfX8fq6RnfD0bHFUuWDFt+5s94OvZw9Ve5IF3Siz3p3j3Jh0hwXYOR81P0M4EVZg7Ynp57Jh6/zkrxKGYksmV+eeCH/VuF7w5Jg02f0am5Dap9X7dYmHkQlk3dfWkRhYW5M= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM9PR04MB8650.eurprd04.prod.outlook.com (2603:10a6:20b:43d::18) by VI1PR04MB6894.eurprd04.prod.outlook.com (2603:10a6:803:13a::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.19; Tue, 3 Jan 2023 07:46:32 +0000 Received: from AM9PR04MB8650.eurprd04.prod.outlook.com ([fe80::286e:e16f:828f:f4ce]) by AM9PR04MB8650.eurprd04.prod.outlook.com ([fe80::286e:e16f:828f:f4ce%8]) with mapi id 15.20.5944.019; Tue, 3 Jan 2023 07:46:32 +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 v3 1/4] dt-bindings: mfd: Add nxp bbnsm Date: Tue, 3 Jan 2023 15:47:39 +0800 Message-Id: <20230103074742.2324924-2-ping.bai@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230103074742.2324924-1-ping.bai@nxp.com> References: <20230103074742.2324924-1-ping.bai@nxp.com> X-ClientProxiedBy: SG2PR02CA0020.apcprd02.prod.outlook.com (2603:1096:3:17::32) To AM9PR04MB8650.eurprd04.prod.outlook.com (2603:10a6:20b:43d::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR04MB8650:EE_|VI1PR04MB6894:EE_ X-MS-Office365-Filtering-Correlation-Id: ce795f44-60d5-4baf-849b-08daed5ea169 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KgXcGtBtSRpSV/2ovlpoRofqCfcpKnNv/iu01slaMlNce0zOYW0Zr3EqKsv/Uu6lqvuXVzeSBkvIKBP50aKWO368b0kORD8qfi1hdOoXRlFVgH4bdDOwgE6iP0zgTvaftycvAM3eWSVPn4R7bqsWvuWn/QtRfnjbXp+/MlaHwJYnULydo3RXp8LpFF//xDDEzhPdAKqkthsAW0Xv/dVBTKgQdZVHc6+ecAI2K5+HcpQADVw1Eu+FaWMbnJ11vLvosycdQWSr2+FujARdqQSUbYuIe7noqb1zWXdih1312veemE2dL0XpFwqv8r/czlytbBVllnYcLiEhzhl3p+CMZVSVsOqq5XTlRraKJLQgouC6wGRC3o6vdYZ//JI2P5H6/gjPKl4bKFZ902yv3Jcz+kldst1lMtylV9/19dGhHdjO/Y9x62TPBM+G1qRU9izQ4lPPRAJ9um2rH1dPeRjDtdBmay3FzOTpClnQCXxHUJ/IvPC/w45L/kP4pmeTyLWEDSDIigF1DCYsYM78DsSxugdtHCHBuqFcRn2zt31Cq0dgqXJRVocwH2LNrHZVwwEjBrD9i8z03d1VAmsv7BU/FiCzF0zfhYFwFgFUv59hb+faJnkg7tIeq56euYpql+Z/RRB1ZNym3T3KOYrjL4vzILosRwHuWkRL9BIld+R78s6e7J7AOHecxrwYYra1ZpXw2hB1Zow7AnUUwfb73g1LezPor6YaRL/LvMg7sdm5/YPot0Y5JYAUP9kmidWpm8yhtkmIYYc9VaC4qY7F3wVzCBa5c8w5he9Ce5WjKUvJ8Lw= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR04MB8650.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(396003)(136003)(376002)(346002)(366004)(39860400002)(451199015)(8936002)(41300700001)(2906002)(8676002)(38100700002)(66946007)(1076003)(38350700002)(7416002)(66476007)(5660300002)(66556008)(4326008)(186003)(478600001)(6512007)(966005)(26005)(2616005)(316002)(6486002)(52116002)(36756003)(6506007)(86362001)(22166006);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: uFNDkPCyVQfZd03jDZp3zXKeMrP7AYt7uvZ/L5YfpG/Zf5nhq8Q/IABc9yr0Y5zCdqR3KbQRxFuaZjsJpUltqBobt3qTJ+BNG6uBEOJVPrBlhVyfPVGdLn+Anck5mxjY/G6KAJG0dusQfOGegTTSTvHv35ItjtxjWcOdVtzYPVa7e4DqxJMSNe2mN35npw3Nx5jsW0UYz5knZy2olM+Xks+LHzOGp93Unf/xFzZcFGevB/Lt9qEkTxMHkePDBK0nfPtyTa3YLbfaAkIPU0LpzIvnLAoTn+lFZ1kwUrlFedEkvOjUYiI0gwuZfeTVscN5yTmPPWqlRtfFZRpO//+rUN2QOiXOpe41JPW4esH42mrQD6uQ8Q20DVuD1rGQoAinQbFQxPFRurojU+AHw59mZQFM3WKru/E/mQ0Xac+czh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B09WbyP5gMrnsiMbTJibBlRFKDYmKVpnfZU9LvajuIZmOCsRbP2IioRqdDd18BAbiJB4FESBNlParmTx3WiVsylISGHe7x X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ce795f44-60d5-4baf-849b-08daed5ea169 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8650.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jan 2023 07:46:32.0708 (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: C1c0ud3M80diEZXqQEiEoQ2hh24xjoaerHwO7GKkGZ1GNnqJ3M69htb5aYUu2DD8ojQUJpShSIuU84ZMZBEvtQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6894 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230102_234636_149144_8D0A0DC1 X-CRM114-Status: GOOD ( 16.52 ) 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 Add binding for NXP BBNSM(Battery-Backed Non-Secure Module). Signed-off-by: Jacky Bai --- - v2 changes: - remove the redundant 'bindings' string - add ref to rtc.yaml - add start-year property - rename 'regmap' to 'nxp,bbnsm-regmap' and add description & type define - add header files including in the example and correct the indentation -v3 changes: - remove the 'nxp,bbnsm-regmap' property, get the regmap directly from the parent node in rtc/pwrkey driver --- .../devicetree/bindings/mfd/nxp,bbnsm.yaml | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/nxp,bbnsm.yaml diff --git a/Documentation/devicetree/bindings/mfd/nxp,bbnsm.yaml b/Documentation/devicetree/bindings/mfd/nxp,bbnsm.yaml new file mode 100644 index 000000000000..bcd8fbc6e297 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/nxp,bbnsm.yaml @@ -0,0 +1,99 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/nxp,bbnsm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP Battery-Backed Non-Secure Module + +maintainers: + - Jacky Bai + +description: | + NXP BBNSM serves as non-volatile logic and storage for the system. + it Intergrates RTC & ON/OFF control. + The RTC can retain its state and continues counting even when the + main chip is power down. A time alarm is generated once the most + significant 32 bits of the real-time counter match the value in the + Time Alarm register. + The ON/OFF logic inside the BBNSM allows for connecting directly to + a PMIC or other voltage regulator device. both smart PMIC mode and + Dumb PMIC mode supported. + +properties: + compatible: + items: + - enum: + - nxp,bbnsm + - const: syscon + - const: simple-mfd + + reg: + maxItems: 1 + + rtc: + type: object + $ref: /schemas/rtc/rtc.yaml# + + properties: + compatible: + const: nxp,bbnsm-rtc + + interrupts: + maxItems: 1 + + start-year: true + + required: + - compatible + - interrupts + + additionalProperties: false + + pwrkey: + type: object + $ref: /schemas/input/input.yaml# + + properties: + compatible: + const: nxp,bbnsm-pwrkey + + interrupts: + maxItems: 1 + + linux,code: true + + required: + - compatible + - interrupts + + additionalProperties: false + +required: + - compatible + - reg + - rtc + - pwrkey + +additionalProperties: false + +examples: + - | + #include + #include + + bbnsm: bbnsm@44440000 { + compatible = "nxp,bbnsm", "syscon", "simple-mfd"; + reg = <0x44440000 0x10000>; + + bbnsm_rtc: rtc { + compatible = "nxp,bbnsm-rtc"; + interrupts = ; + }; + + bbnsm_pwrkey: pwrkey { + compatible = "nxp,bbnsm-pwrkey"; + interrupts = ; + linux,code = ; + }; + };