xref: /freebsd/sys/contrib/device-tree/Bindings/mfd/nxp,bbnsm.yaml (revision cb7aa33ac6cd46a5434798e50363136e64f3ae98)
1*cb7aa33aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*cb7aa33aSEmmanuel Vadot%YAML 1.2
3*cb7aa33aSEmmanuel Vadot---
4*cb7aa33aSEmmanuel Vadot$id: http://devicetree.org/schemas/mfd/nxp,bbnsm.yaml#
5*cb7aa33aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*cb7aa33aSEmmanuel Vadot
7*cb7aa33aSEmmanuel Vadottitle: NXP Battery-Backed Non-Secure Module
8*cb7aa33aSEmmanuel Vadot
9*cb7aa33aSEmmanuel Vadotmaintainers:
10*cb7aa33aSEmmanuel Vadot  - Jacky Bai <ping.bai@nxp.com>
11*cb7aa33aSEmmanuel Vadot
12*cb7aa33aSEmmanuel Vadotdescription: |
13*cb7aa33aSEmmanuel Vadot  NXP BBNSM serves as non-volatile logic and storage for the system.
14*cb7aa33aSEmmanuel Vadot  it Intergrates RTC & ON/OFF control.
15*cb7aa33aSEmmanuel Vadot  The RTC can retain its state and continues counting even when the
16*cb7aa33aSEmmanuel Vadot  main chip is power down. A time alarm is generated once the most
17*cb7aa33aSEmmanuel Vadot  significant 32 bits of the real-time counter match the value in the
18*cb7aa33aSEmmanuel Vadot  Time Alarm register.
19*cb7aa33aSEmmanuel Vadot  The ON/OFF logic inside the BBNSM allows for connecting directly to
20*cb7aa33aSEmmanuel Vadot  a PMIC or other voltage regulator device. both smart PMIC mode and
21*cb7aa33aSEmmanuel Vadot  Dumb PMIC mode supported.
22*cb7aa33aSEmmanuel Vadot
23*cb7aa33aSEmmanuel Vadotproperties:
24*cb7aa33aSEmmanuel Vadot  compatible:
25*cb7aa33aSEmmanuel Vadot    items:
26*cb7aa33aSEmmanuel Vadot      - enum:
27*cb7aa33aSEmmanuel Vadot          - nxp,imx93-bbnsm
28*cb7aa33aSEmmanuel Vadot      - const: syscon
29*cb7aa33aSEmmanuel Vadot      - const: simple-mfd
30*cb7aa33aSEmmanuel Vadot
31*cb7aa33aSEmmanuel Vadot  reg:
32*cb7aa33aSEmmanuel Vadot    maxItems: 1
33*cb7aa33aSEmmanuel Vadot
34*cb7aa33aSEmmanuel Vadot  rtc:
35*cb7aa33aSEmmanuel Vadot    type: object
36*cb7aa33aSEmmanuel Vadot    $ref: /schemas/rtc/rtc.yaml#
37*cb7aa33aSEmmanuel Vadot
38*cb7aa33aSEmmanuel Vadot    properties:
39*cb7aa33aSEmmanuel Vadot      compatible:
40*cb7aa33aSEmmanuel Vadot        enum:
41*cb7aa33aSEmmanuel Vadot          - nxp,imx93-bbnsm-rtc
42*cb7aa33aSEmmanuel Vadot
43*cb7aa33aSEmmanuel Vadot      interrupts:
44*cb7aa33aSEmmanuel Vadot        maxItems: 1
45*cb7aa33aSEmmanuel Vadot
46*cb7aa33aSEmmanuel Vadot      start-year: true
47*cb7aa33aSEmmanuel Vadot
48*cb7aa33aSEmmanuel Vadot    required:
49*cb7aa33aSEmmanuel Vadot      - compatible
50*cb7aa33aSEmmanuel Vadot      - interrupts
51*cb7aa33aSEmmanuel Vadot
52*cb7aa33aSEmmanuel Vadot    additionalProperties: false
53*cb7aa33aSEmmanuel Vadot
54*cb7aa33aSEmmanuel Vadot  pwrkey:
55*cb7aa33aSEmmanuel Vadot    type: object
56*cb7aa33aSEmmanuel Vadot    $ref: /schemas/input/input.yaml#
57*cb7aa33aSEmmanuel Vadot
58*cb7aa33aSEmmanuel Vadot    properties:
59*cb7aa33aSEmmanuel Vadot      compatible:
60*cb7aa33aSEmmanuel Vadot        enum:
61*cb7aa33aSEmmanuel Vadot          - nxp,imx93-bbnsm-pwrkey
62*cb7aa33aSEmmanuel Vadot
63*cb7aa33aSEmmanuel Vadot      interrupts:
64*cb7aa33aSEmmanuel Vadot        maxItems: 1
65*cb7aa33aSEmmanuel Vadot
66*cb7aa33aSEmmanuel Vadot      linux,code: true
67*cb7aa33aSEmmanuel Vadot
68*cb7aa33aSEmmanuel Vadot    required:
69*cb7aa33aSEmmanuel Vadot      - compatible
70*cb7aa33aSEmmanuel Vadot      - interrupts
71*cb7aa33aSEmmanuel Vadot
72*cb7aa33aSEmmanuel Vadot    additionalProperties: false
73*cb7aa33aSEmmanuel Vadot
74*cb7aa33aSEmmanuel Vadotrequired:
75*cb7aa33aSEmmanuel Vadot  - compatible
76*cb7aa33aSEmmanuel Vadot  - reg
77*cb7aa33aSEmmanuel Vadot  - rtc
78*cb7aa33aSEmmanuel Vadot  - pwrkey
79*cb7aa33aSEmmanuel Vadot
80*cb7aa33aSEmmanuel VadotadditionalProperties: false
81*cb7aa33aSEmmanuel Vadot
82*cb7aa33aSEmmanuel Vadotexamples:
83*cb7aa33aSEmmanuel Vadot  - |
84*cb7aa33aSEmmanuel Vadot    #include <dt-bindings/input/linux-event-codes.h>
85*cb7aa33aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
86*cb7aa33aSEmmanuel Vadot
87*cb7aa33aSEmmanuel Vadot    bbnsm: bbnsm@44440000 {
88*cb7aa33aSEmmanuel Vadot        compatible = "nxp,imx93-bbnsm", "syscon", "simple-mfd";
89*cb7aa33aSEmmanuel Vadot        reg = <0x44440000 0x10000>;
90*cb7aa33aSEmmanuel Vadot
91*cb7aa33aSEmmanuel Vadot        bbnsm_rtc: rtc {
92*cb7aa33aSEmmanuel Vadot            compatible = "nxp,imx93-bbnsm-rtc";
93*cb7aa33aSEmmanuel Vadot            interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
94*cb7aa33aSEmmanuel Vadot        };
95*cb7aa33aSEmmanuel Vadot
96*cb7aa33aSEmmanuel Vadot        bbnsm_pwrkey: pwrkey {
97*cb7aa33aSEmmanuel Vadot            compatible = "nxp,imx93-bbnsm-pwrkey";
98*cb7aa33aSEmmanuel Vadot            interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
99*cb7aa33aSEmmanuel Vadot            linux,code = <KEY_POWER>;
100*cb7aa33aSEmmanuel Vadot        };
101*cb7aa33aSEmmanuel Vadot    };
102