From mboxrd@z Thu Jan 1 00:00:00 1970 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 ABE6BC4332F for ; Mon, 21 Nov 2022 11:14:58 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=oqF75G0GHQg7U6mJYAW7trHK2Y1h8XL6B/fDxVBEAuA=; b=4OFYAVkPy67vYD Nop0ODNwOy59tEhaW23+ktNhONxI3uYNqc9HB/l9drlm0JJWNTGvorH4Wk0yRu2xBYXGTsdKRriYn J1Ik+22KyE9Xylc/ctWjiigX/au6SEa6BtnptOphg680+XQo1LUWbicaUTQaAwuiUWGUPKdakf6fl iNRgkPLx53dvHZzbafFubsQWyruX9p7E4yjRmgvB2stRYA+1rIcYeqLOFa4yPOIVXxMZ6q7fMg9wc RB6eVFAgU3jXPr2tPx0ApA/ieQdgc8sQhtJgxBUe4xXw6bE7RPZv9fBNBj3etdWEzOfwFfj2goY0M QmGOv4yaJwNxV1Dl3VDA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ox4jK-00CqJU-KO; Mon, 21 Nov 2022 11:12:50 +0000 Received: from relay1-d.mail.gandi.net ([2001:4b98:dc4:8::221]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ox4h0-00CowI-5Z for linux-arm-kernel@lists.infradead.org; Mon, 21 Nov 2022 11:10:30 +0000 Received: (Authenticated sender: alexandre.belloni@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 4469B24000A; Mon, 21 Nov 2022 11:10:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1669029016; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=0V3BT3i84GCuHk3TZVqmgN6hIht44N4eJS27s3atJzM=; b=YW9n+3hUytDeKEyjSjitDNFS6llqxWN0l9nOBJEl9MEfI2K9D1m2EdPGediKdfoRh0Omim IsJnL3CAu6Kf/I0LyyVa6XXwZLQ1in/Gr3lTHY4va1hTSW+Sh8yf/vE1qXO2UHCH1oSQ2y o3vfrGXbGUjsaJAHSDV+24KEnJyMd5oMpefXamtqYWt7fXL0LRxVYat5wAFFIQfxepiIKL y1qdJBpq5NSBrCsFbrAuBRkh85j5BYVW1HRFXxh8LwXidTO+9SuzeZfAmlHPniz5ACiVbc +VUOq9v4UmRn/4+MuC0l9h1H3bvMlBJWp+vrRNgQTscbfjO5d1kKJ84einG9zA== Date: Mon, 21 Nov 2022 12:10:03 +0100 From: Alexandre Belloni To: Jacky Bai Cc: Krzysztof Kozlowski , "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" , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-input@vger.kernel.org" , "linux-rtc@vger.kernel.org" , "kernel@pengutronix.de" , dl-linux-imx , "festevam@gmail.com" Subject: Re: [PATCH 1/4] dt-bindings: mfd: nxp,bbnsm: Add binding for nxp bbnsm Message-ID: References: <20221121065144.3667658-1-ping.bai@nxp.com> <20221121065144.3667658-2-ping.bai@nxp.com> <2aeb0590-4fd0-5bb4-5e68-0378953a94c3@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221121_031026_561792_8E0FA5B5 X-CRM114-Status: GOOD ( 29.29 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 21/11/2022 10:33:15+0000, Jacky Bai wrote: > > Subject: Re: [PATCH 1/4] dt-bindings: mfd: nxp,bbnsm: Add binding for nxp > > bbnsm > > > > On 21/11/2022 10:09:40+0100, Krzysztof Kozlowski wrote: > > > On 21/11/2022 07:51, Jacky Bai wrote: > > > > Add binding for NXP BBNSM(Battery-Backed Non-Secure Module). > > > > > > > > Signed-off-by: Jacky Bai > > > > --- > > > > .../devicetree/bindings/mfd/nxp,bbnsm.yaml | 103 > > ++++++++++++++++++ > > > > 1 file changed, 103 insertions(+) > > > > create mode 100644 > > > > Documentation/devicetree/bindings/mfd/nxp,bbnsm.yaml > > ... > > > > > + > > > > +title: NXP Battery-Backed Non-Secure Module bindings > > > > + > > > > +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 > > > > + > > > > + properties: > > > > + compatible: > > > > + const: nxp,bbnsm-rtc > > > > > > > > > Missing ref to rtc.yaml. > > > > > > > This is also missing start-year > > The RTC counter will be reset to 0 after PoR reset, do we still need to add > this property? > Is this really an RTC then? > BR > > > > > > + > > > > + regmap: > > > > > > Use vendor prefix, descriptive name and description. Where is the type > > > of 'regmap' defined? > > > > > > > + maxItems: 1 > > > > > > I don't think this is correct. Rob explained the simple-mfd means > > > children do not depend on anything from the parent, but taking a > > > regmap from its parent contradicts it. > > > > > > > + > > > > + interrupts: > > > > + maxItems: 1 > > > > > > You have same interrupt and same address space used by two devices. > > > > > > Both arguments (depending on parent regmap, sharing interrupt) > > > suggests that this is one device block, so describing it with > > > simple-mfd is quite unflexible. > > > > > > > + > > > > + required: > > > > + - compatible > > > > + - regmap > > > > + - interrupts > > > > + > > > > + additionalProperties: false > > > > + > > > > + pwrkey: > > > > + type: object > > > > + $ref: /schemas/input/input.yaml# > > > > + > > > > + properties: > > > > + compatible: > > > > + const: nxp,bbnsm-pwrkey > > > > + > > > > + regmap: > > > > + maxItems: 1 > > > > + > > > > + interrupts: > > > > + maxItems: 1 > > > > + > > > > + linux,code: true > > > > + > > > > + required: > > > > + - compatible > > > > + - regmap > > > > + - interrupts > > > > + > > > > + additionalProperties: false > > > > + > > > > +required: > > > > + - compatible > > > > + - reg > > > > + - rtc > > > > + - pwrkey > > > > + > > > > +additionalProperties: false > > > > + > > > > +examples: > > > > + - | > > > > + bbnsm: bbnsm@44440000 { > > > > + compatible = "nxp,bbnsm", "syscon", "simple-mfd"; > > > > + reg = <0x44440000 0x10000>; > > > > + > > > > + bbnsm_rtc: rtc { > > > > + compatible = "nxp,bbnsm-rtc"; > > > > > > Use 4 spaces for example indentation. > > > > > > > + regmap = <&bbnsm>; > > > > + interrupts = ; > > > > + }; > > > > + > > > > + bbnsm_pwrkey: pwrkey { > > > > + compatible = "nxp,bbnsm-pwrkey"; > > > > + regmap = <&bbnsm>; > > > > + interrupts = ; > > > > + linux,code = ; > > > > + }; > > > > + }; > > > > > > Best regards, > > > Krzysztof > > > > > > > -- > > Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel > > engineering > > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbootlin > > .com%2F&data=05%7C01%7Cping.bai%40nxp.com%7Cd188bbb7b6ec40 > > 5c481f08dacba2af8b%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0% > > 7C638046196834682924%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA > > wMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7 > > C%7C&sdata=L%2FTZNaG01NTrKvbKwz9%2FNFEFQ6JqdnsOIzUydww1D > > ZU%3D&reserved=0 -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel