summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/crypto/fsl,sec-v4.0-mon.yaml
blob: e879bc0be8e221266bf8a5fb46f66fad4512b791 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2008-2011 Freescale Semiconductor Inc.
%YAML 1.2
---
$id: http://devicetree.org/schemas/crypto/fsl,sec-v4.0-mon.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Freescale Secure Non-Volatile Storage (SNVS)

maintainers:
  - '"Horia Geantă" <horia.geanta@nxp.com>'
  - Pankaj Gupta <pankaj.gupta@nxp.com>
  - Gaurav Jain <gaurav.jain@nxp.com>

description:
  Node defines address range and the associated interrupt for the SNVS function.
  This function monitors security state information & reports security
  violations. This also included rtc, system power off and ON/OFF key.

properties:
  compatible:
    oneOf:
      - items:
          - const: fsl,sec-v4.0-mon
          - const: syscon
          - const: simple-mfd
      - items:
          - const: fsl,sec-v5.0-mon
          - const: fsl,sec-v4.0-mon
      - items:
          - enum:
              - fsl,sec-v5.3-mon
              - fsl,sec-v5.4-mon
          - const: fsl,sec-v5.0-mon
          - const: fsl,sec-v4.0-mon

  reg:
    maxItems: 1

  interrupts:
    maxItems: 2

  snvs-rtc-lp:
    type: object
    additionalProperties: false
    description:
      Secure Non-Volatile Storage (SNVS) Low Power (LP) RTC Node

    properties:
      compatible:
        const: fsl,sec-v4.0-mon-rtc-lp

      clocks:
        maxItems: 1

      clock-names:
        const: snvs-rtc

      interrupts:
        # VFxxx has only one. What is the 2nd one?
        minItems: 1
        maxItems: 2

      regmap:
        description: Parent node containing registers
        $ref: /schemas/types.yaml#/definitions/phandle

      offset:
        description: LP register offset
        $ref: /schemas/types.yaml#/definitions/uint32
        default: 0x34

    required:
      - compatible
      - interrupts
      - regmap

  snvs-powerkey:
    type: object
    additionalProperties: false
    description:
      The snvs-pwrkey is designed to enable POWER key function which controlled
      by SNVS ONOFF, the driver can report the status of POWER key and wakeup
      system if pressed after system suspend.

    properties:
      compatible:
        const: fsl,sec-v4.0-pwrkey

      clocks:
        maxItems: 1

      clock-names:
        const: snvs-pwrkey

      interrupts:
        maxItems: 1

      regmap:
        description: Parent node containing registers
        $ref: /schemas/types.yaml#/definitions/phandle

      wakeup-source: true

      linux,keycode:
        $ref: /schemas/types.yaml#/definitions/uint32
        default: 116
        deprecated: true

      linux,keycodes:
        maxItems: 1
        default: 116

    required:
      - compatible
      - interrupts
      - regmap

  snvs-lpgpr:
    $ref: /schemas/nvmem/snvs-lpgpr.yaml#

  snvs-poweroff:
    description:
      The SNVS could drive signal to PMIC to turn off system power by setting
      SNVS_LP LPCR register.
    $ref: /schemas/power/reset/syscon-poweroff.yaml#

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/clock/imx7d-clock.h>

    sec_mon: sec-mon@314000 {
        compatible = "fsl,sec-v4.0-mon", "syscon", "simple-mfd";
        reg = <0x314000 0x1000>;

        snvs-rtc-lp {
            compatible = "fsl,sec-v4.0-mon-rtc-lp";
            regmap = <&sec_mon>;
            offset = <0x34>;
            clocks = <&clks IMX7D_SNVS_CLK>;
            clock-names = "snvs-rtc";
            interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
        };

        snvs-powerkey {
            compatible = "fsl,sec-v4.0-pwrkey";
            regmap = <&sec_mon>;
            clocks = <&clks IMX7D_SNVS_CLK>;
            clock-names = "snvs-pwrkey";
            interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
            linux,keycode = <116>; /* KEY_POWER */
            wakeup-source;
        };
    };