xref: /linux/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra30-mc.yaml (revision cdd38c5f1ce4398ec58fec95904b75824daab7b5)
1785685b7SDmitry Osipenko# SPDX-License-Identifier: (GPL-2.0)
2785685b7SDmitry Osipenko%YAML 1.2
3785685b7SDmitry Osipenko---
4785685b7SDmitry Osipenko$id: http://devicetree.org/schemas/memory-controllers/nvidia,tegra30-mc.yaml#
5785685b7SDmitry Osipenko$schema: http://devicetree.org/meta-schemas/core.yaml#
6785685b7SDmitry Osipenko
7785685b7SDmitry Osipenkotitle: NVIDIA Tegra30 SoC Memory Controller
8785685b7SDmitry Osipenko
9785685b7SDmitry Osipenkomaintainers:
10785685b7SDmitry Osipenko  - Dmitry Osipenko <digetx@gmail.com>
11785685b7SDmitry Osipenko  - Jon Hunter <jonathanh@nvidia.com>
12785685b7SDmitry Osipenko  - Thierry Reding <thierry.reding@gmail.com>
13785685b7SDmitry Osipenko
14785685b7SDmitry Osipenkodescription: |
15785685b7SDmitry Osipenko  Tegra30 Memory Controller architecturally consists of the following parts:
16785685b7SDmitry Osipenko
17785685b7SDmitry Osipenko    Arbitration Domains, which can handle a single request or response per
18785685b7SDmitry Osipenko    clock from a group of clients. Typically, a system has a single Arbitration
19785685b7SDmitry Osipenko    Domain, but an implementation may divide the client space into multiple
20785685b7SDmitry Osipenko    Arbitration Domains to increase the effective system bandwidth.
21785685b7SDmitry Osipenko
22785685b7SDmitry Osipenko    Protocol Arbiter, which manage a related pool of memory devices. A system
23785685b7SDmitry Osipenko    may have a single Protocol Arbiter or multiple Protocol Arbiters.
24785685b7SDmitry Osipenko
25785685b7SDmitry Osipenko    Memory Crossbar, which routes request and responses between Arbitration
26785685b7SDmitry Osipenko    Domains and Protocol Arbiters. In the simplest version of the system, the
27785685b7SDmitry Osipenko    Memory Crossbar is just a pass through between a single Arbitration Domain
28785685b7SDmitry Osipenko    and a single Protocol Arbiter.
29785685b7SDmitry Osipenko
30785685b7SDmitry Osipenko    Global Resources, which include things like configuration registers which
31785685b7SDmitry Osipenko    are shared across the Memory Subsystem.
32785685b7SDmitry Osipenko
33785685b7SDmitry Osipenko  The Tegra30 Memory Controller handles memory requests from internal clients
34785685b7SDmitry Osipenko  and arbitrates among them to allocate memory bandwidth for DDR3L and LPDDR2
35785685b7SDmitry Osipenko  SDRAMs.
36785685b7SDmitry Osipenko
37785685b7SDmitry Osipenkoproperties:
38785685b7SDmitry Osipenko  compatible:
39785685b7SDmitry Osipenko    const: nvidia,tegra30-mc
40785685b7SDmitry Osipenko
41785685b7SDmitry Osipenko  reg:
42785685b7SDmitry Osipenko    maxItems: 1
43785685b7SDmitry Osipenko
44785685b7SDmitry Osipenko  clocks:
45785685b7SDmitry Osipenko    maxItems: 1
46785685b7SDmitry Osipenko
47785685b7SDmitry Osipenko  clock-names:
48785685b7SDmitry Osipenko    items:
49785685b7SDmitry Osipenko      - const: mc
50785685b7SDmitry Osipenko
51785685b7SDmitry Osipenko  interrupts:
52785685b7SDmitry Osipenko    maxItems: 1
53785685b7SDmitry Osipenko
54785685b7SDmitry Osipenko  "#reset-cells":
55785685b7SDmitry Osipenko    const: 1
56785685b7SDmitry Osipenko
57785685b7SDmitry Osipenko  "#iommu-cells":
58785685b7SDmitry Osipenko    const: 1
59785685b7SDmitry Osipenko
60*ed7f6f2eSDmitry Osipenko  "#interconnect-cells":
61*ed7f6f2eSDmitry Osipenko    const: 1
62*ed7f6f2eSDmitry Osipenko
63785685b7SDmitry OsipenkopatternProperties:
64785685b7SDmitry Osipenko  "^emc-timings-[0-9]+$":
65785685b7SDmitry Osipenko    type: object
66785685b7SDmitry Osipenko    properties:
67785685b7SDmitry Osipenko      nvidia,ram-code:
68785685b7SDmitry Osipenko        $ref: /schemas/types.yaml#/definitions/uint32
69785685b7SDmitry Osipenko        description:
70785685b7SDmitry Osipenko          Value of RAM_CODE this timing set is used for.
71785685b7SDmitry Osipenko
72785685b7SDmitry Osipenko    patternProperties:
73785685b7SDmitry Osipenko      "^timing-[0-9]+$":
74785685b7SDmitry Osipenko        type: object
75785685b7SDmitry Osipenko        properties:
76785685b7SDmitry Osipenko          clock-frequency:
77785685b7SDmitry Osipenko            description:
78785685b7SDmitry Osipenko              Memory clock rate in Hz.
79785685b7SDmitry Osipenko            minimum: 1000000
80785685b7SDmitry Osipenko            maximum: 900000000
81785685b7SDmitry Osipenko
82785685b7SDmitry Osipenko          nvidia,emem-configuration:
833d21a460SRob Herring            $ref: /schemas/types.yaml#/definitions/uint32-array
84785685b7SDmitry Osipenko            description: |
85785685b7SDmitry Osipenko              Values to be written to the EMEM register block. See section
86785685b7SDmitry Osipenko              "18.13.1 MC Registers" in the TRM.
87785685b7SDmitry Osipenko            items:
88785685b7SDmitry Osipenko              - description: MC_EMEM_ARB_CFG
89785685b7SDmitry Osipenko              - description: MC_EMEM_ARB_OUTSTANDING_REQ
90785685b7SDmitry Osipenko              - description: MC_EMEM_ARB_TIMING_RCD
91785685b7SDmitry Osipenko              - description: MC_EMEM_ARB_TIMING_RP
92785685b7SDmitry Osipenko              - description: MC_EMEM_ARB_TIMING_RC
93785685b7SDmitry Osipenko              - description: MC_EMEM_ARB_TIMING_RAS
94785685b7SDmitry Osipenko              - description: MC_EMEM_ARB_TIMING_FAW
95785685b7SDmitry Osipenko              - description: MC_EMEM_ARB_TIMING_RRD
96785685b7SDmitry Osipenko              - description: MC_EMEM_ARB_TIMING_RAP2PRE
97785685b7SDmitry Osipenko              - description: MC_EMEM_ARB_TIMING_WAP2PRE
98785685b7SDmitry Osipenko              - description: MC_EMEM_ARB_TIMING_R2R
99785685b7SDmitry Osipenko              - description: MC_EMEM_ARB_TIMING_W2W
100785685b7SDmitry Osipenko              - description: MC_EMEM_ARB_TIMING_R2W
101785685b7SDmitry Osipenko              - description: MC_EMEM_ARB_TIMING_W2R
102785685b7SDmitry Osipenko              - description: MC_EMEM_ARB_DA_TURNS
103785685b7SDmitry Osipenko              - description: MC_EMEM_ARB_DA_COVERS
104785685b7SDmitry Osipenko              - description: MC_EMEM_ARB_MISC0
105785685b7SDmitry Osipenko              - description: MC_EMEM_ARB_RING1_THROTTLE
106785685b7SDmitry Osipenko
107785685b7SDmitry Osipenko        required:
108785685b7SDmitry Osipenko          - clock-frequency
109785685b7SDmitry Osipenko          - nvidia,emem-configuration
110785685b7SDmitry Osipenko
111785685b7SDmitry Osipenko        additionalProperties: false
112785685b7SDmitry Osipenko
113785685b7SDmitry Osipenko    required:
114785685b7SDmitry Osipenko      - nvidia,ram-code
115785685b7SDmitry Osipenko
116785685b7SDmitry Osipenko    additionalProperties: false
117785685b7SDmitry Osipenko
118785685b7SDmitry Osipenkorequired:
119785685b7SDmitry Osipenko  - compatible
120785685b7SDmitry Osipenko  - reg
121785685b7SDmitry Osipenko  - interrupts
122785685b7SDmitry Osipenko  - clocks
123785685b7SDmitry Osipenko  - clock-names
124785685b7SDmitry Osipenko  - "#reset-cells"
125785685b7SDmitry Osipenko  - "#iommu-cells"
126*ed7f6f2eSDmitry Osipenko  - "#interconnect-cells"
127785685b7SDmitry Osipenko
128785685b7SDmitry OsipenkoadditionalProperties: false
129785685b7SDmitry Osipenko
130785685b7SDmitry Osipenkoexamples:
131785685b7SDmitry Osipenko  - |
132785685b7SDmitry Osipenko    memory-controller@7000f000 {
133785685b7SDmitry Osipenko        compatible = "nvidia,tegra30-mc";
134785685b7SDmitry Osipenko        reg = <0x7000f000 0x400>;
135785685b7SDmitry Osipenko        clocks = <&tegra_car 32>;
136785685b7SDmitry Osipenko        clock-names = "mc";
137785685b7SDmitry Osipenko
138785685b7SDmitry Osipenko        interrupts = <0 77 4>;
139785685b7SDmitry Osipenko
140785685b7SDmitry Osipenko        #iommu-cells = <1>;
141785685b7SDmitry Osipenko        #reset-cells = <1>;
142*ed7f6f2eSDmitry Osipenko        #interconnect-cells = <1>;
143785685b7SDmitry Osipenko
144785685b7SDmitry Osipenko        emc-timings-1 {
145785685b7SDmitry Osipenko            nvidia,ram-code = <1>;
146785685b7SDmitry Osipenko
147785685b7SDmitry Osipenko            timing-667000000 {
148785685b7SDmitry Osipenko                clock-frequency = <667000000>;
149785685b7SDmitry Osipenko
150785685b7SDmitry Osipenko                nvidia,emem-configuration = <
151785685b7SDmitry Osipenko                    0x0000000a /* MC_EMEM_ARB_CFG */
152785685b7SDmitry Osipenko                    0xc0000079 /* MC_EMEM_ARB_OUTSTANDING_REQ */
153785685b7SDmitry Osipenko                    0x00000003 /* MC_EMEM_ARB_TIMING_RCD */
154785685b7SDmitry Osipenko                    0x00000004 /* MC_EMEM_ARB_TIMING_RP */
155785685b7SDmitry Osipenko                    0x00000010 /* MC_EMEM_ARB_TIMING_RC */
156785685b7SDmitry Osipenko                    0x0000000b /* MC_EMEM_ARB_TIMING_RAS */
157785685b7SDmitry Osipenko                    0x0000000a /* MC_EMEM_ARB_TIMING_FAW */
158785685b7SDmitry Osipenko                    0x00000001 /* MC_EMEM_ARB_TIMING_RRD */
159785685b7SDmitry Osipenko                    0x00000003 /* MC_EMEM_ARB_TIMING_RAP2PRE */
160785685b7SDmitry Osipenko                    0x0000000b /* MC_EMEM_ARB_TIMING_WAP2PRE */
161785685b7SDmitry Osipenko                    0x00000002 /* MC_EMEM_ARB_TIMING_R2R */
162785685b7SDmitry Osipenko                    0x00000002 /* MC_EMEM_ARB_TIMING_W2W */
163785685b7SDmitry Osipenko                    0x00000004 /* MC_EMEM_ARB_TIMING_R2W */
164785685b7SDmitry Osipenko                    0x00000008 /* MC_EMEM_ARB_TIMING_W2R */
165785685b7SDmitry Osipenko                    0x08040202 /* MC_EMEM_ARB_DA_TURNS */
166785685b7SDmitry Osipenko                    0x00130b10 /* MC_EMEM_ARB_DA_COVERS */
167785685b7SDmitry Osipenko                    0x70ea1f11 /* MC_EMEM_ARB_MISC0 */
168785685b7SDmitry Osipenko                    0x001f0000 /* MC_EMEM_ARB_RING1_THROTTLE */
169785685b7SDmitry Osipenko                >;
170785685b7SDmitry Osipenko            };
171785685b7SDmitry Osipenko        };
172785685b7SDmitry Osipenko    };
173