xref: /freebsd/sys/contrib/device-tree/Bindings/memory-controllers/nvidia,tegra30-mc.yaml (revision 5def4c47d4bd90b209b9b4a4ba9faec15846d8fd)
1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0)
2c66ec88fSEmmanuel Vadot%YAML 1.2
3c66ec88fSEmmanuel Vadot---
4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/memory-controllers/nvidia,tegra30-mc.yaml#
5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c66ec88fSEmmanuel Vadot
7c66ec88fSEmmanuel Vadottitle: NVIDIA Tegra30 SoC Memory Controller
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel Vadotmaintainers:
10c66ec88fSEmmanuel Vadot  - Dmitry Osipenko <digetx@gmail.com>
11c66ec88fSEmmanuel Vadot  - Jon Hunter <jonathanh@nvidia.com>
12c66ec88fSEmmanuel Vadot  - Thierry Reding <thierry.reding@gmail.com>
13c66ec88fSEmmanuel Vadot
14c66ec88fSEmmanuel Vadotdescription: |
15c66ec88fSEmmanuel Vadot  Tegra30 Memory Controller architecturally consists of the following parts:
16c66ec88fSEmmanuel Vadot
17c66ec88fSEmmanuel Vadot    Arbitration Domains, which can handle a single request or response per
18c66ec88fSEmmanuel Vadot    clock from a group of clients. Typically, a system has a single Arbitration
19c66ec88fSEmmanuel Vadot    Domain, but an implementation may divide the client space into multiple
20c66ec88fSEmmanuel Vadot    Arbitration Domains to increase the effective system bandwidth.
21c66ec88fSEmmanuel Vadot
22c66ec88fSEmmanuel Vadot    Protocol Arbiter, which manage a related pool of memory devices. A system
23c66ec88fSEmmanuel Vadot    may have a single Protocol Arbiter or multiple Protocol Arbiters.
24c66ec88fSEmmanuel Vadot
25c66ec88fSEmmanuel Vadot    Memory Crossbar, which routes request and responses between Arbitration
26c66ec88fSEmmanuel Vadot    Domains and Protocol Arbiters. In the simplest version of the system, the
27c66ec88fSEmmanuel Vadot    Memory Crossbar is just a pass through between a single Arbitration Domain
28c66ec88fSEmmanuel Vadot    and a single Protocol Arbiter.
29c66ec88fSEmmanuel Vadot
30c66ec88fSEmmanuel Vadot    Global Resources, which include things like configuration registers which
31c66ec88fSEmmanuel Vadot    are shared across the Memory Subsystem.
32c66ec88fSEmmanuel Vadot
33c66ec88fSEmmanuel Vadot  The Tegra30 Memory Controller handles memory requests from internal clients
34c66ec88fSEmmanuel Vadot  and arbitrates among them to allocate memory bandwidth for DDR3L and LPDDR2
35c66ec88fSEmmanuel Vadot  SDRAMs.
36c66ec88fSEmmanuel Vadot
37c66ec88fSEmmanuel Vadotproperties:
38c66ec88fSEmmanuel Vadot  compatible:
39c66ec88fSEmmanuel Vadot    const: nvidia,tegra30-mc
40c66ec88fSEmmanuel Vadot
41c66ec88fSEmmanuel Vadot  reg:
42c66ec88fSEmmanuel Vadot    maxItems: 1
43c66ec88fSEmmanuel Vadot
44c66ec88fSEmmanuel Vadot  clocks:
45c66ec88fSEmmanuel Vadot    maxItems: 1
46c66ec88fSEmmanuel Vadot
47c66ec88fSEmmanuel Vadot  clock-names:
48c66ec88fSEmmanuel Vadot    items:
49c66ec88fSEmmanuel Vadot      - const: mc
50c66ec88fSEmmanuel Vadot
51c66ec88fSEmmanuel Vadot  interrupts:
52c66ec88fSEmmanuel Vadot    maxItems: 1
53c66ec88fSEmmanuel Vadot
54c66ec88fSEmmanuel Vadot  "#reset-cells":
55c66ec88fSEmmanuel Vadot    const: 1
56c66ec88fSEmmanuel Vadot
57c66ec88fSEmmanuel Vadot  "#iommu-cells":
58c66ec88fSEmmanuel Vadot    const: 1
59c66ec88fSEmmanuel Vadot
60*5def4c47SEmmanuel Vadot  "#interconnect-cells":
61*5def4c47SEmmanuel Vadot    const: 1
62*5def4c47SEmmanuel Vadot
63c66ec88fSEmmanuel VadotpatternProperties:
64c66ec88fSEmmanuel Vadot  "^emc-timings-[0-9]+$":
65c66ec88fSEmmanuel Vadot    type: object
66c66ec88fSEmmanuel Vadot    properties:
67c66ec88fSEmmanuel Vadot      nvidia,ram-code:
68c66ec88fSEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint32
69c66ec88fSEmmanuel Vadot        description:
70c66ec88fSEmmanuel Vadot          Value of RAM_CODE this timing set is used for.
71c66ec88fSEmmanuel Vadot
72c66ec88fSEmmanuel Vadot    patternProperties:
73c66ec88fSEmmanuel Vadot      "^timing-[0-9]+$":
74c66ec88fSEmmanuel Vadot        type: object
75c66ec88fSEmmanuel Vadot        properties:
76c66ec88fSEmmanuel Vadot          clock-frequency:
77c66ec88fSEmmanuel Vadot            description:
78c66ec88fSEmmanuel Vadot              Memory clock rate in Hz.
79c66ec88fSEmmanuel Vadot            minimum: 1000000
80c66ec88fSEmmanuel Vadot            maximum: 900000000
81c66ec88fSEmmanuel Vadot
82c66ec88fSEmmanuel Vadot          nvidia,emem-configuration:
83c66ec88fSEmmanuel Vadot            $ref: /schemas/types.yaml#/definitions/uint32-array
84c66ec88fSEmmanuel Vadot            description: |
85c66ec88fSEmmanuel Vadot              Values to be written to the EMEM register block. See section
86c66ec88fSEmmanuel Vadot              "18.13.1 MC Registers" in the TRM.
87c66ec88fSEmmanuel Vadot            items:
88c66ec88fSEmmanuel Vadot              - description: MC_EMEM_ARB_CFG
89c66ec88fSEmmanuel Vadot              - description: MC_EMEM_ARB_OUTSTANDING_REQ
90c66ec88fSEmmanuel Vadot              - description: MC_EMEM_ARB_TIMING_RCD
91c66ec88fSEmmanuel Vadot              - description: MC_EMEM_ARB_TIMING_RP
92c66ec88fSEmmanuel Vadot              - description: MC_EMEM_ARB_TIMING_RC
93c66ec88fSEmmanuel Vadot              - description: MC_EMEM_ARB_TIMING_RAS
94c66ec88fSEmmanuel Vadot              - description: MC_EMEM_ARB_TIMING_FAW
95c66ec88fSEmmanuel Vadot              - description: MC_EMEM_ARB_TIMING_RRD
96c66ec88fSEmmanuel Vadot              - description: MC_EMEM_ARB_TIMING_RAP2PRE
97c66ec88fSEmmanuel Vadot              - description: MC_EMEM_ARB_TIMING_WAP2PRE
98c66ec88fSEmmanuel Vadot              - description: MC_EMEM_ARB_TIMING_R2R
99c66ec88fSEmmanuel Vadot              - description: MC_EMEM_ARB_TIMING_W2W
100c66ec88fSEmmanuel Vadot              - description: MC_EMEM_ARB_TIMING_R2W
101c66ec88fSEmmanuel Vadot              - description: MC_EMEM_ARB_TIMING_W2R
102c66ec88fSEmmanuel Vadot              - description: MC_EMEM_ARB_DA_TURNS
103c66ec88fSEmmanuel Vadot              - description: MC_EMEM_ARB_DA_COVERS
104c66ec88fSEmmanuel Vadot              - description: MC_EMEM_ARB_MISC0
105c66ec88fSEmmanuel Vadot              - description: MC_EMEM_ARB_RING1_THROTTLE
106c66ec88fSEmmanuel Vadot
107c66ec88fSEmmanuel Vadot        required:
108c66ec88fSEmmanuel Vadot          - clock-frequency
109c66ec88fSEmmanuel Vadot          - nvidia,emem-configuration
110c66ec88fSEmmanuel Vadot
111c66ec88fSEmmanuel Vadot        additionalProperties: false
112c66ec88fSEmmanuel Vadot
113c66ec88fSEmmanuel Vadot    required:
114c66ec88fSEmmanuel Vadot      - nvidia,ram-code
115c66ec88fSEmmanuel Vadot
116c66ec88fSEmmanuel Vadot    additionalProperties: false
117c66ec88fSEmmanuel Vadot
118c66ec88fSEmmanuel Vadotrequired:
119c66ec88fSEmmanuel Vadot  - compatible
120c66ec88fSEmmanuel Vadot  - reg
121c66ec88fSEmmanuel Vadot  - interrupts
122c66ec88fSEmmanuel Vadot  - clocks
123c66ec88fSEmmanuel Vadot  - clock-names
124c66ec88fSEmmanuel Vadot  - "#reset-cells"
125c66ec88fSEmmanuel Vadot  - "#iommu-cells"
126*5def4c47SEmmanuel Vadot  - "#interconnect-cells"
127c66ec88fSEmmanuel Vadot
128c66ec88fSEmmanuel VadotadditionalProperties: false
129c66ec88fSEmmanuel Vadot
130c66ec88fSEmmanuel Vadotexamples:
131c66ec88fSEmmanuel Vadot  - |
132c66ec88fSEmmanuel Vadot    memory-controller@7000f000 {
133c66ec88fSEmmanuel Vadot        compatible = "nvidia,tegra30-mc";
134c66ec88fSEmmanuel Vadot        reg = <0x7000f000 0x400>;
135c66ec88fSEmmanuel Vadot        clocks = <&tegra_car 32>;
136c66ec88fSEmmanuel Vadot        clock-names = "mc";
137c66ec88fSEmmanuel Vadot
138c66ec88fSEmmanuel Vadot        interrupts = <0 77 4>;
139c66ec88fSEmmanuel Vadot
140c66ec88fSEmmanuel Vadot        #iommu-cells = <1>;
141c66ec88fSEmmanuel Vadot        #reset-cells = <1>;
142*5def4c47SEmmanuel Vadot        #interconnect-cells = <1>;
143c66ec88fSEmmanuel Vadot
144c66ec88fSEmmanuel Vadot        emc-timings-1 {
145c66ec88fSEmmanuel Vadot            nvidia,ram-code = <1>;
146c66ec88fSEmmanuel Vadot
147c66ec88fSEmmanuel Vadot            timing-667000000 {
148c66ec88fSEmmanuel Vadot                clock-frequency = <667000000>;
149c66ec88fSEmmanuel Vadot
150c66ec88fSEmmanuel Vadot                nvidia,emem-configuration = <
151c66ec88fSEmmanuel Vadot                    0x0000000a /* MC_EMEM_ARB_CFG */
152c66ec88fSEmmanuel Vadot                    0xc0000079 /* MC_EMEM_ARB_OUTSTANDING_REQ */
153c66ec88fSEmmanuel Vadot                    0x00000003 /* MC_EMEM_ARB_TIMING_RCD */
154c66ec88fSEmmanuel Vadot                    0x00000004 /* MC_EMEM_ARB_TIMING_RP */
155c66ec88fSEmmanuel Vadot                    0x00000010 /* MC_EMEM_ARB_TIMING_RC */
156c66ec88fSEmmanuel Vadot                    0x0000000b /* MC_EMEM_ARB_TIMING_RAS */
157c66ec88fSEmmanuel Vadot                    0x0000000a /* MC_EMEM_ARB_TIMING_FAW */
158c66ec88fSEmmanuel Vadot                    0x00000001 /* MC_EMEM_ARB_TIMING_RRD */
159c66ec88fSEmmanuel Vadot                    0x00000003 /* MC_EMEM_ARB_TIMING_RAP2PRE */
160c66ec88fSEmmanuel Vadot                    0x0000000b /* MC_EMEM_ARB_TIMING_WAP2PRE */
161c66ec88fSEmmanuel Vadot                    0x00000002 /* MC_EMEM_ARB_TIMING_R2R */
162c66ec88fSEmmanuel Vadot                    0x00000002 /* MC_EMEM_ARB_TIMING_W2W */
163c66ec88fSEmmanuel Vadot                    0x00000004 /* MC_EMEM_ARB_TIMING_R2W */
164c66ec88fSEmmanuel Vadot                    0x00000008 /* MC_EMEM_ARB_TIMING_W2R */
165c66ec88fSEmmanuel Vadot                    0x08040202 /* MC_EMEM_ARB_DA_TURNS */
166c66ec88fSEmmanuel Vadot                    0x00130b10 /* MC_EMEM_ARB_DA_COVERS */
167c66ec88fSEmmanuel Vadot                    0x70ea1f11 /* MC_EMEM_ARB_MISC0 */
168c66ec88fSEmmanuel Vadot                    0x001f0000 /* MC_EMEM_ARB_RING1_THROTTLE */
169c66ec88fSEmmanuel Vadot                >;
170c66ec88fSEmmanuel Vadot            };
171c66ec88fSEmmanuel Vadot        };
172c66ec88fSEmmanuel Vadot    };
173