xref: /freebsd/sys/contrib/device-tree/Bindings/memory-controllers/fsl/imx8m-ddrc.yaml (revision 7ef62cebc2f965b0f640263e179276928885e33d)
1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0
2c66ec88fSEmmanuel Vadot%YAML 1.2
3c66ec88fSEmmanuel Vadot---
4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/memory-controllers/fsl/imx8m-ddrc.yaml#
5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c66ec88fSEmmanuel Vadot
7c66ec88fSEmmanuel Vadottitle: i.MX8M DDR Controller
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel Vadotmaintainers:
10b97ee269SEmmanuel Vadot  - Peng Fan <peng.fan@nxp.com>
11c66ec88fSEmmanuel Vadot
12c66ec88fSEmmanuel Vadotdescription:
13c66ec88fSEmmanuel Vadot  The DDRC block is integrated in i.MX8M for interfacing with DDR based
14c66ec88fSEmmanuel Vadot  memories.
15c66ec88fSEmmanuel Vadot
16c66ec88fSEmmanuel Vadot  It supports switching between different frequencies at runtime but during
17c66ec88fSEmmanuel Vadot  this process RAM itself becomes briefly inaccessible so actual frequency
18c66ec88fSEmmanuel Vadot  switching is implemented by TF-A code which runs from a SRAM area.
19c66ec88fSEmmanuel Vadot
20c66ec88fSEmmanuel Vadot  The Linux driver for the DDRC doesn't even map registers (they're included
21c66ec88fSEmmanuel Vadot  for the sake of "describing hardware"), it mostly just exposes firmware
22c66ec88fSEmmanuel Vadot  capabilities through standard Linux mechanism like devfreq and OPP tables.
23c66ec88fSEmmanuel Vadot
24c66ec88fSEmmanuel Vadotproperties:
25c66ec88fSEmmanuel Vadot  compatible:
26c66ec88fSEmmanuel Vadot    items:
27c66ec88fSEmmanuel Vadot      - enum:
28c66ec88fSEmmanuel Vadot          - fsl,imx8mn-ddrc
29c66ec88fSEmmanuel Vadot          - fsl,imx8mm-ddrc
30c66ec88fSEmmanuel Vadot          - fsl,imx8mq-ddrc
31c66ec88fSEmmanuel Vadot      - const: fsl,imx8m-ddrc
32c66ec88fSEmmanuel Vadot
33c66ec88fSEmmanuel Vadot  reg:
34c66ec88fSEmmanuel Vadot    maxItems: 1
35c66ec88fSEmmanuel Vadot    description:
36c66ec88fSEmmanuel Vadot      Base address and size of DDRC CTL area.
37c66ec88fSEmmanuel Vadot      This is not currently mapped by the imx8m-ddrc driver.
38c66ec88fSEmmanuel Vadot
39c66ec88fSEmmanuel Vadot  clocks:
40c66ec88fSEmmanuel Vadot    maxItems: 4
41c66ec88fSEmmanuel Vadot
42c66ec88fSEmmanuel Vadot  clock-names:
43c66ec88fSEmmanuel Vadot    items:
44c66ec88fSEmmanuel Vadot      - const: core
45c66ec88fSEmmanuel Vadot      - const: pll
46c66ec88fSEmmanuel Vadot      - const: alt
47c66ec88fSEmmanuel Vadot      - const: apb
48c66ec88fSEmmanuel Vadot
49c66ec88fSEmmanuel Vadot  operating-points-v2: true
50*7ef62cebSEmmanuel Vadot  opp-table:
51*7ef62cebSEmmanuel Vadot    type: object
52c66ec88fSEmmanuel Vadot
53c66ec88fSEmmanuel Vadotrequired:
54c66ec88fSEmmanuel Vadot  - reg
55c66ec88fSEmmanuel Vadot  - compatible
56c66ec88fSEmmanuel Vadot  - clocks
57c66ec88fSEmmanuel Vadot  - clock-names
58c66ec88fSEmmanuel Vadot
59c66ec88fSEmmanuel VadotadditionalProperties: false
60c66ec88fSEmmanuel Vadot
61c66ec88fSEmmanuel Vadotexamples:
62c66ec88fSEmmanuel Vadot  - |
63c66ec88fSEmmanuel Vadot    #include <dt-bindings/clock/imx8mm-clock.h>
64c66ec88fSEmmanuel Vadot    ddrc: memory-controller@3d400000 {
65c66ec88fSEmmanuel Vadot        compatible = "fsl,imx8mm-ddrc", "fsl,imx8m-ddrc";
66c66ec88fSEmmanuel Vadot        reg = <0x3d400000 0x400000>;
67c66ec88fSEmmanuel Vadot        clock-names = "core", "pll", "alt", "apb";
68c66ec88fSEmmanuel Vadot        clocks = <&clk IMX8MM_CLK_DRAM_CORE>,
69c66ec88fSEmmanuel Vadot                 <&clk IMX8MM_DRAM_PLL>,
70c66ec88fSEmmanuel Vadot                 <&clk IMX8MM_CLK_DRAM_ALT>,
71c66ec88fSEmmanuel Vadot                 <&clk IMX8MM_CLK_DRAM_APB>;
72c66ec88fSEmmanuel Vadot        operating-points-v2 = <&ddrc_opp_table>;
73c66ec88fSEmmanuel Vadot    };
74