All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Jacky Bai <ping.bai@nxp.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	"lee@kernel.org" <lee@kernel.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"krzysztof.kozlowski+dt@linaro.org" 
	<krzysztof.kozlowski+dt@linaro.org>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	"dmitry.torokhov@gmail.com" <dmitry.torokhov@gmail.com>,
	"a.zummo@towertech.it" <a.zummo@towertech.it>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	"linux-rtc@vger.kernel.org" <linux-rtc@vger.kernel.org>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	dl-linux-imx <linux-imx@nxp.com>,
	"festevam@gmail.com" <festevam@gmail.com>
Subject: Re: [PATCH 1/4] dt-bindings: mfd: nxp,bbnsm: Add binding for nxp bbnsm
Date: Mon, 21 Nov 2022 12:10:03 +0100	[thread overview]
Message-ID: <Y3tcix7xpgQ+kt9a@mail.local> (raw)
In-Reply-To: <AS8PR04MB8642503BF1172B707CB9F394870A9@AS8PR04MB8642.eurprd04.prod.outlook.com>

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 <ping.bai@nxp.com>
> > > > ---
> > > >  .../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 <ping.bai@nxp.com>
> > > > +
> > > > +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 = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
> > > > +      };
> > > > +
> > > > +      bbnsm_pwrkey: pwrkey {
> > > > +         compatible = "nxp,bbnsm-pwrkey";
> > > > +         regmap = <&bbnsm>;
> > > > +         interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
> > > > +         linux,code = <KEY_POWER>;
> > > > +       };
> > > > +    };
> > >
> > > 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&amp;data=05%7C01%7Cping.bai%40nxp.com%7Cd188bbb7b6ec40
> > 5c481f08dacba2af8b%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%
> > 7C638046196834682924%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA
> > wMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7
> > C%7C&amp;sdata=L%2FTZNaG01NTrKvbKwz9%2FNFEFQ6JqdnsOIzUydww1D
> > ZU%3D&amp;reserved=0



-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

WARNING: multiple messages have this Message-ID (diff)
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Jacky Bai <ping.bai@nxp.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	"lee@kernel.org" <lee@kernel.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"krzysztof.kozlowski+dt@linaro.org"
	<krzysztof.kozlowski+dt@linaro.org>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	"dmitry.torokhov@gmail.com" <dmitry.torokhov@gmail.com>,
	"a.zummo@towertech.it" <a.zummo@towertech.it>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	"linux-rtc@vger.kernel.org" <linux-rtc@vger.kernel.org>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	dl-linux-imx <linux-imx@nxp.com>,
	"festevam@gmail.com" <festevam@gmail.com>
Subject: Re: [PATCH 1/4] dt-bindings: mfd: nxp,bbnsm: Add binding for nxp bbnsm
Date: Mon, 21 Nov 2022 12:10:03 +0100	[thread overview]
Message-ID: <Y3tcix7xpgQ+kt9a@mail.local> (raw)
In-Reply-To: <AS8PR04MB8642503BF1172B707CB9F394870A9@AS8PR04MB8642.eurprd04.prod.outlook.com>

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 <ping.bai@nxp.com>
> > > > ---
> > > >  .../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 <ping.bai@nxp.com>
> > > > +
> > > > +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 = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
> > > > +      };
> > > > +
> > > > +      bbnsm_pwrkey: pwrkey {
> > > > +         compatible = "nxp,bbnsm-pwrkey";
> > > > +         regmap = <&bbnsm>;
> > > > +         interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
> > > > +         linux,code = <KEY_POWER>;
> > > > +       };
> > > > +    };
> > >
> > > 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&amp;data=05%7C01%7Cping.bai%40nxp.com%7Cd188bbb7b6ec40
> > 5c481f08dacba2af8b%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%
> > 7C638046196834682924%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA
> > wMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7
> > C%7C&amp;sdata=L%2FTZNaG01NTrKvbKwz9%2FNFEFQ6JqdnsOIzUydww1D
> > ZU%3D&amp;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

  reply	other threads:[~2022-11-21 11:15 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-21  6:51 [PATCH 0/4] Add nxp bbnsm module support Jacky Bai
2022-11-21  6:51 ` Jacky Bai
2022-11-21  6:51 ` [PATCH 1/4] dt-bindings: mfd: nxp,bbnsm: Add binding for nxp bbnsm Jacky Bai
2022-11-21  6:51   ` Jacky Bai
2022-11-21  9:09   ` Krzysztof Kozlowski
2022-11-21  9:09     ` Krzysztof Kozlowski
2022-11-21  9:27     ` Alexandre Belloni
2022-11-21  9:27       ` Alexandre Belloni
2022-11-21 10:33       ` Jacky Bai
2022-11-21 10:33         ` Jacky Bai
2022-11-21 11:10         ` Alexandre Belloni [this message]
2022-11-21 11:10           ` Alexandre Belloni
2022-11-21 13:45           ` Jacky Bai
2022-11-21 13:45             ` Jacky Bai
2022-11-22 13:16             ` Alexandre Belloni
2022-11-22 13:16               ` Alexandre Belloni
2022-11-23  7:50               ` Jacky Bai
2022-11-23  7:50                 ` Jacky Bai
2022-11-21 10:26     ` Jacky Bai
2022-11-21 10:26       ` Jacky Bai
2022-11-21 12:28       ` Lee Jones
2022-11-21 12:28         ` Lee Jones
2022-11-22  7:59       ` Krzysztof Kozlowski
2022-11-22  7:59         ` Krzysztof Kozlowski
2022-11-23  7:43         ` Jacky Bai
2022-11-23  7:43           ` Jacky Bai
2022-11-23  7:58           ` Krzysztof Kozlowski
2022-11-23  7:58             ` Krzysztof Kozlowski
2022-11-21  9:18   ` Krzysztof Kozlowski
2022-11-21  9:18     ` Krzysztof Kozlowski
2022-11-21 10:30     ` Jacky Bai
2022-11-21 10:30       ` Jacky Bai
2022-11-22  7:59       ` Krzysztof Kozlowski
2022-11-22  7:59         ` Krzysztof Kozlowski
2022-11-22 20:28   ` Rob Herring
2022-11-22 20:28     ` Rob Herring
2022-11-23  7:54     ` Jacky Bai
2022-11-23  7:54       ` Jacky Bai
2022-11-23  9:31       ` Krzysztof Kozlowski
2022-11-23  9:31         ` Krzysztof Kozlowski
2022-11-23  9:35         ` Jacky Bai
2022-11-23  9:35           ` Jacky Bai
2022-11-21  6:51 ` [PATCH 2/4] input: bbnsm_pwrkey: Add bbnsm power key support Jacky Bai
2022-11-21  6:51   ` Jacky Bai
2022-11-22 23:32   ` Dmitry Torokhov
2022-11-22 23:32     ` Dmitry Torokhov
2022-11-23  9:39     ` Jacky Bai
2022-11-23  9:39       ` Jacky Bai
2022-11-21  6:51 ` [PATCH 3/4] rtc: bbnsm: Add the bbnsm rtc support Jacky Bai
2022-11-21  6:51   ` Jacky Bai
2022-11-22 18:18   ` Alexandre Belloni
2022-11-22 18:18     ` Alexandre Belloni
2022-11-23  9:25     ` Jacky Bai
2022-11-23  9:25       ` Jacky Bai
2022-11-21  6:51 ` [PATCH 4/4] arm64: dts: imx93: Add the bbnsm dts node Jacky Bai
2022-11-21  6:51   ` Jacky Bai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y3tcix7xpgQ+kt9a@mail.local \
    --to=alexandre.belloni@bootlin.com \
    --cc=a.zummo@towertech.it \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=lee@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=ping.bai@nxp.com \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.