xref: /freebsd/sys/contrib/device-tree/Bindings/memory-controllers/nvidia,tegra186-mc.yaml (revision e67e85659c0de33e617e5fbf1028c6e8b49eee53)
1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2c66ec88fSEmmanuel Vadot%YAML 1.2
3c66ec88fSEmmanuel Vadot---
4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/memory-controllers/nvidia,tegra186-mc.yaml#
5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c66ec88fSEmmanuel Vadot
7c66ec88fSEmmanuel Vadottitle: NVIDIA Tegra186 (and later) SoC Memory Controller
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel Vadotmaintainers:
10c66ec88fSEmmanuel Vadot  - Jon Hunter <jonathanh@nvidia.com>
11c66ec88fSEmmanuel Vadot  - Thierry Reding <thierry.reding@gmail.com>
12c66ec88fSEmmanuel Vadot
13c66ec88fSEmmanuel Vadotdescription: |
14c66ec88fSEmmanuel Vadot  The NVIDIA Tegra186 SoC features a 128 bit memory controller that is split
15c66ec88fSEmmanuel Vadot  into four 32 bit channels to support LPDDR4 with x16 subpartitions. The MC
16c66ec88fSEmmanuel Vadot  handles memory requests for 40-bit virtual addresses from internal clients
17c66ec88fSEmmanuel Vadot  and arbitrates among them to allocate memory bandwidth.
18c66ec88fSEmmanuel Vadot
19c66ec88fSEmmanuel Vadot  Up to 15 GiB of physical memory can be supported. Security features such as
20c66ec88fSEmmanuel Vadot  encryption of traffic to and from DRAM via general security apertures are
21c66ec88fSEmmanuel Vadot  available for video and other secure applications, as well as DRAM ECC for
22c66ec88fSEmmanuel Vadot  automotive safety applications (single bit error correction and double bit
23c66ec88fSEmmanuel Vadot  error detection).
24c66ec88fSEmmanuel Vadot
25c66ec88fSEmmanuel Vadotproperties:
26c66ec88fSEmmanuel Vadot  $nodename:
27c66ec88fSEmmanuel Vadot    pattern: "^memory-controller@[0-9a-f]+$"
28c66ec88fSEmmanuel Vadot
29c66ec88fSEmmanuel Vadot  compatible:
30c66ec88fSEmmanuel Vadot    items:
31c66ec88fSEmmanuel Vadot      - enum:
32c66ec88fSEmmanuel Vadot          - nvidia,tegra186-mc
33c66ec88fSEmmanuel Vadot          - nvidia,tegra194-mc
34*e67e8565SEmmanuel Vadot          - nvidia,tegra234-mc
35c66ec88fSEmmanuel Vadot
36c66ec88fSEmmanuel Vadot  reg:
37*e67e8565SEmmanuel Vadot    minItems: 1
38*e67e8565SEmmanuel Vadot    maxItems: 3
39c66ec88fSEmmanuel Vadot
40c66ec88fSEmmanuel Vadot  interrupts:
41*e67e8565SEmmanuel Vadot    items:
42*e67e8565SEmmanuel Vadot      - description: MC general interrupt
43c66ec88fSEmmanuel Vadot
44c66ec88fSEmmanuel Vadot  "#address-cells":
45c66ec88fSEmmanuel Vadot    const: 2
46c66ec88fSEmmanuel Vadot
47c66ec88fSEmmanuel Vadot  "#size-cells":
48c66ec88fSEmmanuel Vadot    const: 2
49c66ec88fSEmmanuel Vadot
50c66ec88fSEmmanuel Vadot  ranges: true
51c66ec88fSEmmanuel Vadot
52c66ec88fSEmmanuel Vadot  dma-ranges: true
53c66ec88fSEmmanuel Vadot
54*e67e8565SEmmanuel Vadot  "#interconnect-cells":
55*e67e8565SEmmanuel Vadot    const: 1
56*e67e8565SEmmanuel Vadot
57c66ec88fSEmmanuel VadotpatternProperties:
58c66ec88fSEmmanuel Vadot  "^external-memory-controller@[0-9a-f]+$":
59c66ec88fSEmmanuel Vadot    description:
60c66ec88fSEmmanuel Vadot      The bulk of the work involved in controlling the external memory
61c66ec88fSEmmanuel Vadot      controller on NVIDIA Tegra186 and later is performed on the BPMP. This
62c66ec88fSEmmanuel Vadot      coprocessor exposes the EMC clock that is used to set the frequency at
63c66ec88fSEmmanuel Vadot      which the external memory is clocked and a remote procedure call that
64c66ec88fSEmmanuel Vadot      can be used to obtain the set of available frequencies.
65c66ec88fSEmmanuel Vadot    type: object
66c66ec88fSEmmanuel Vadot    properties:
67c66ec88fSEmmanuel Vadot      compatible:
68c66ec88fSEmmanuel Vadot        items:
69c66ec88fSEmmanuel Vadot          - enum:
70c66ec88fSEmmanuel Vadot              - nvidia,tegra186-emc
71c66ec88fSEmmanuel Vadot              - nvidia,tegra194-emc
72*e67e8565SEmmanuel Vadot              - nvidia,tegra234-emc
73c66ec88fSEmmanuel Vadot
74c66ec88fSEmmanuel Vadot      reg:
75*e67e8565SEmmanuel Vadot        minItems: 1
76*e67e8565SEmmanuel Vadot        maxItems: 2
77c66ec88fSEmmanuel Vadot
78c66ec88fSEmmanuel Vadot      interrupts:
79*e67e8565SEmmanuel Vadot        items:
80*e67e8565SEmmanuel Vadot          - description: EMC general interrupt
81c66ec88fSEmmanuel Vadot
82c66ec88fSEmmanuel Vadot      clocks:
83c66ec88fSEmmanuel Vadot        items:
84c66ec88fSEmmanuel Vadot          - description: external memory clock
85c66ec88fSEmmanuel Vadot
86c66ec88fSEmmanuel Vadot      clock-names:
87c66ec88fSEmmanuel Vadot        items:
88c66ec88fSEmmanuel Vadot          - const: emc
89c66ec88fSEmmanuel Vadot
90*e67e8565SEmmanuel Vadot      "#interconnect-cells":
91*e67e8565SEmmanuel Vadot        const: 0
92*e67e8565SEmmanuel Vadot
93c66ec88fSEmmanuel Vadot      nvidia,bpmp:
94c66ec88fSEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/phandle
95c66ec88fSEmmanuel Vadot        description:
96c66ec88fSEmmanuel Vadot          phandle of the node representing the BPMP
97c66ec88fSEmmanuel Vadot
98*e67e8565SEmmanuel Vadot    allOf:
99*e67e8565SEmmanuel Vadot      - if:
100*e67e8565SEmmanuel Vadot          properties:
101*e67e8565SEmmanuel Vadot            compatible:
102*e67e8565SEmmanuel Vadot              const: nvidia,tegra186-emc
103*e67e8565SEmmanuel Vadot        then:
104*e67e8565SEmmanuel Vadot          properties:
105*e67e8565SEmmanuel Vadot            reg:
106*e67e8565SEmmanuel Vadot              maxItems: 1
107*e67e8565SEmmanuel Vadot
108*e67e8565SEmmanuel Vadot      - if:
109*e67e8565SEmmanuel Vadot          properties:
110*e67e8565SEmmanuel Vadot            compatible:
111*e67e8565SEmmanuel Vadot              const: nvidia,tegra194-emc
112*e67e8565SEmmanuel Vadot        then:
113*e67e8565SEmmanuel Vadot          properties:
114*e67e8565SEmmanuel Vadot            reg:
115*e67e8565SEmmanuel Vadot              minItems: 2
116*e67e8565SEmmanuel Vadot
117*e67e8565SEmmanuel Vadot      - if:
118*e67e8565SEmmanuel Vadot          properties:
119*e67e8565SEmmanuel Vadot            compatible:
120*e67e8565SEmmanuel Vadot              const: nvidia,tegra234-emc
121*e67e8565SEmmanuel Vadot        then:
122*e67e8565SEmmanuel Vadot          properties:
123*e67e8565SEmmanuel Vadot            reg:
124*e67e8565SEmmanuel Vadot              minItems: 2
125*e67e8565SEmmanuel Vadot
126*e67e8565SEmmanuel Vadot    additionalProperties: false
127*e67e8565SEmmanuel Vadot
128*e67e8565SEmmanuel Vadot    required:
129*e67e8565SEmmanuel Vadot      - compatible
130*e67e8565SEmmanuel Vadot      - reg
131*e67e8565SEmmanuel Vadot      - interrupts
132*e67e8565SEmmanuel Vadot      - clocks
133*e67e8565SEmmanuel Vadot      - clock-names
134*e67e8565SEmmanuel Vadot      - "#interconnect-cells"
135*e67e8565SEmmanuel Vadot      - nvidia,bpmp
136*e67e8565SEmmanuel Vadot
137*e67e8565SEmmanuel VadotallOf:
138*e67e8565SEmmanuel Vadot  - if:
139*e67e8565SEmmanuel Vadot      properties:
140*e67e8565SEmmanuel Vadot        compatible:
141*e67e8565SEmmanuel Vadot          const: nvidia,tegra186-mc
142*e67e8565SEmmanuel Vadot    then:
143*e67e8565SEmmanuel Vadot      properties:
144*e67e8565SEmmanuel Vadot        reg:
145*e67e8565SEmmanuel Vadot          maxItems: 1
146*e67e8565SEmmanuel Vadot
147*e67e8565SEmmanuel Vadot  - if:
148*e67e8565SEmmanuel Vadot      properties:
149*e67e8565SEmmanuel Vadot        compatible:
150*e67e8565SEmmanuel Vadot          const: nvidia,tegra194-mc
151*e67e8565SEmmanuel Vadot    then:
152*e67e8565SEmmanuel Vadot      properties:
153*e67e8565SEmmanuel Vadot        reg:
154*e67e8565SEmmanuel Vadot          minItems: 3
155*e67e8565SEmmanuel Vadot
156*e67e8565SEmmanuel Vadot  - if:
157*e67e8565SEmmanuel Vadot      properties:
158*e67e8565SEmmanuel Vadot        compatible:
159*e67e8565SEmmanuel Vadot          const: nvidia,tegra234-mc
160*e67e8565SEmmanuel Vadot    then:
161*e67e8565SEmmanuel Vadot      properties:
162*e67e8565SEmmanuel Vadot        reg:
163*e67e8565SEmmanuel Vadot          minItems: 3
164*e67e8565SEmmanuel Vadot
165*e67e8565SEmmanuel VadotadditionalProperties: false
166*e67e8565SEmmanuel Vadot
167c66ec88fSEmmanuel Vadotrequired:
168c66ec88fSEmmanuel Vadot  - compatible
169c66ec88fSEmmanuel Vadot  - reg
170c66ec88fSEmmanuel Vadot  - interrupts
171c66ec88fSEmmanuel Vadot  - "#address-cells"
172c66ec88fSEmmanuel Vadot  - "#size-cells"
173c66ec88fSEmmanuel Vadot
174c66ec88fSEmmanuel Vadotexamples:
175c66ec88fSEmmanuel Vadot  - |
176c66ec88fSEmmanuel Vadot    #include <dt-bindings/clock/tegra186-clock.h>
177c66ec88fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
178c66ec88fSEmmanuel Vadot
179c66ec88fSEmmanuel Vadot    bus {
180c66ec88fSEmmanuel Vadot        #address-cells = <2>;
181c66ec88fSEmmanuel Vadot        #size-cells = <2>;
182c66ec88fSEmmanuel Vadot
183c66ec88fSEmmanuel Vadot        memory-controller@2c00000 {
184c66ec88fSEmmanuel Vadot            compatible = "nvidia,tegra186-mc";
185c66ec88fSEmmanuel Vadot            reg = <0x0 0x02c00000 0x0 0xb0000>;
186c66ec88fSEmmanuel Vadot            interrupts = <GIC_SPI 223 IRQ_TYPE_LEVEL_HIGH>;
187c66ec88fSEmmanuel Vadot
188c66ec88fSEmmanuel Vadot            #address-cells = <2>;
189c66ec88fSEmmanuel Vadot            #size-cells = <2>;
190c66ec88fSEmmanuel Vadot
191c66ec88fSEmmanuel Vadot            ranges = <0x0 0x02c00000 0x0 0x02c00000 0x0 0xb0000>;
192c66ec88fSEmmanuel Vadot
193c66ec88fSEmmanuel Vadot            /*
194c66ec88fSEmmanuel Vadot             * Memory clients have access to all 40 bits that the memory
195c66ec88fSEmmanuel Vadot             * controller can address.
196c66ec88fSEmmanuel Vadot             */
197c66ec88fSEmmanuel Vadot            dma-ranges = <0x0 0x0 0x0 0x0 0x100 0x0>;
198c66ec88fSEmmanuel Vadot
199c66ec88fSEmmanuel Vadot            external-memory-controller@2c60000 {
200c66ec88fSEmmanuel Vadot                compatible = "nvidia,tegra186-emc";
201c66ec88fSEmmanuel Vadot                reg = <0x0 0x02c60000 0x0 0x50000>;
202c66ec88fSEmmanuel Vadot                interrupts = <GIC_SPI 224 IRQ_TYPE_LEVEL_HIGH>;
203c66ec88fSEmmanuel Vadot                clocks = <&bpmp TEGRA186_CLK_EMC>;
204c66ec88fSEmmanuel Vadot                clock-names = "emc";
205c66ec88fSEmmanuel Vadot
206*e67e8565SEmmanuel Vadot                #interconnect-cells = <0>;
207*e67e8565SEmmanuel Vadot
208c66ec88fSEmmanuel Vadot                nvidia,bpmp = <&bpmp>;
209c66ec88fSEmmanuel Vadot            };
210c66ec88fSEmmanuel Vadot        };
211c66ec88fSEmmanuel Vadot    };
212