1# Copyright 2023 NXP
2# SPDX-License-Identifier: Apache-2.0
3
4title: NXP FlexRAM on-chip RAM controller
5
6description: |
7  If the flexram,bank-spec property is specified, then the flexram will be
8  dynamically reconfigured to the configuration specified at runtime. An
9  example to configure the flexram dynamically using the
10  flexram,bank-spec property for rt1060 is as follows:
11
12  &itcm {
13          reg = < 0x0 DT_SIZE_K(64) >;
14  };
15  &dtcm {
16          reg = < 0x20000000 DT_SIZE_K(384) >;
17  };
18  &ocram {
19          reg = < 0x20280000 DT_SIZE_K(64) >;
20  };
21  &flexram {
22          flexram,bank-spec = <FLEXRAM_OCRAM>,
23                              <FLEXRAM_OCRAM>,
24                              <FLEXRAM_DTCM>,
25                              <FLEXRAM_DTCM>,
26                              <FLEXRAM_DTCM>,
27                              <FLEXRAM_DTCM>,
28                              <FLEXRAM_DTCM>,
29                              <FLEXRAM_DTCM>,
30                              <FLEXRAM_ITCM>,
31                              <FLEXRAM_ITCM>,
32                              <FLEXRAM_DTCM>,
33                              <FLEXRAM_DTCM>,
34                              <FLEXRAM_DTCM>,
35                              <FLEXRAM_DTCM>,
36                              <FLEXRAM_DTCM>,
37                              <FLEXRAM_DTCM>;
38  };
39
40  This will configure the flexram for 384K of DTCM, 64K of ITCM,
41  and 64K of OCRAM.
42
43
44include: base.yaml
45
46compatible: "nxp,flexram"
47
48properties:
49  reg:
50    required: true
51
52  interrupts:
53    required: true
54
55  flexram,has-magic-addr:
56    type: boolean
57    description: |
58      Whether or not the flexram on the SOC has the
59      magic address feature, which allows for an interrupt
60      on arbitrary address access in any on chip RAM region.
61
62  flexram,num-ram-banks:
63    type: int
64    required: true
65    description: |
66      Number of RAM banks in the SOC ram array
67
68  flexram,bank-size:
69    type: int
70    required: true
71    description: |
72      Size of each RAM bank in KB
73
74  flexram,bank-spec:
75    type: array
76    description: |
77      Custom mapping of runtime RAM bank partitions. If this
78      property is present, then it will be used. If this
79      property is not present, then the fusemap configuration
80      will be used.
81
82  flexram,tcm-read-wait-mode:
83    type: boolean
84    description: |
85      TCM RAM read will finish in 2 cycles instead of 1.
86
87  flexram,tcm-write-wait-mode:
88    type: boolean
89    description: |
90      TCM RAM write will finish in 2 cycles instead of 1.
91