summaryrefslogtreecommitdiffstats
path: root/dts/Bindings/memory-controllers/nvidia,tegra186-mc.yaml
blob: 13c4c82fd0d3b3e777d48fe52240a23452cf3c8b (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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/memory-controllers/nvidia,tegra186-mc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: NVIDIA Tegra186 (and later) SoC Memory Controller

maintainers:
  - Jon Hunter <jonathanh@nvidia.com>
  - Thierry Reding <thierry.reding@gmail.com>

description: |
  The NVIDIA Tegra186 SoC features a 128 bit memory controller that is split
  into four 32 bit channels to support LPDDR4 with x16 subpartitions. The MC
  handles memory requests for 40-bit virtual addresses from internal clients
  and arbitrates among them to allocate memory bandwidth.

  Up to 15 GiB of physical memory can be supported. Security features such as
  encryption of traffic to and from DRAM via general security apertures are
  available for video and other secure applications, as well as DRAM ECC for
  automotive safety applications (single bit error correction and double bit
  error detection).

properties:
  $nodename:
    pattern: "^memory-controller@[0-9a-f]+$"

  compatible:
    items:
      - enum:
          - nvidia,tegra186-mc
          - nvidia,tegra194-mc
          - nvidia,tegra234-mc

  reg:
    minItems: 1
    maxItems: 3

  interrupts:
    items:
      - description: MC general interrupt

  "#address-cells":
    const: 2

  "#size-cells":
    const: 2

  ranges: true

  dma-ranges: true

  "#interconnect-cells":
    const: 1

patternProperties:
  "^external-memory-controller@[0-9a-f]+$":
    description:
      The bulk of the work involved in controlling the external memory
      controller on NVIDIA Tegra186 and later is performed on the BPMP. This
      coprocessor exposes the EMC clock that is used to set the frequency at
      which the external memory is clocked and a remote procedure call that
      can be used to obtain the set of available frequencies.
    type: object
    properties:
      compatible:
        items:
          - enum:
              - nvidia,tegra186-emc
              - nvidia,tegra194-emc
              - nvidia,tegra234-emc

      reg:
        minItems: 1
        maxItems: 2

      interrupts:
        items:
          - description: EMC general interrupt

      clocks:
        items:
          - description: external memory clock

      clock-names:
        items:
          - const: emc

      "#interconnect-cells":
        const: 0

      nvidia,bpmp:
        $ref: /schemas/types.yaml#/definitions/phandle
        description:
          phandle of the node representing the BPMP

    allOf:
      - if:
          properties:
            compatible:
              const: nvidia,tegra186-emc
        then:
          properties:
            reg:
              maxItems: 1

      - if:
          properties:
            compatible:
              const: nvidia,tegra194-emc
        then:
          properties:
            reg:
              minItems: 2

      - if:
          properties:
            compatible:
              const: nvidia,tegra234-emc
        then:
          properties:
            reg:
              minItems: 2

    additionalProperties: false

    required:
      - compatible
      - reg
      - interrupts
      - clocks
      - clock-names
      - "#interconnect-cells"
      - nvidia,bpmp

allOf:
  - if:
      properties:
        compatible:
          const: nvidia,tegra186-mc
    then:
      properties:
        reg:
          maxItems: 1

  - if:
      properties:
        compatible:
          const: nvidia,tegra194-mc
    then:
      properties:
        reg:
          minItems: 3

  - if:
      properties:
        compatible:
          const: nvidia,tegra234-mc
    then:
      properties:
        reg:
          minItems: 3

additionalProperties: false

required:
  - compatible
  - reg
  - interrupts
  - "#address-cells"
  - "#size-cells"

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

    bus {
        #address-cells = <2>;
        #size-cells = <2>;

        memory-controller@2c00000 {
            compatible = "nvidia,tegra186-mc";
            reg = <0x0 0x02c00000 0x0 0xb0000>;
            interrupts = <GIC_SPI 223 IRQ_TYPE_LEVEL_HIGH>;

            #address-cells = <2>;
            #size-cells = <2>;

            ranges = <0x0 0x02c00000 0x0 0x02c00000 0x0 0xb0000>;

            /*
             * Memory clients have access to all 40 bits that the memory
             * controller can address.
             */
            dma-ranges = <0x0 0x0 0x0 0x0 0x100 0x0>;

            external-memory-controller@2c60000 {
                compatible = "nvidia,tegra186-emc";
                reg = <0x0 0x02c60000 0x0 0x50000>;
                interrupts = <GIC_SPI 224 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&bpmp TEGRA186_CLK_EMC>;
                clock-names = "emc";

                #interconnect-cells = <0>;

                nvidia,bpmp = <&bpmp>;
            };
        };
    };