1 RK3368 dynamic memory controller driver
2 =======================================
4 The RK3368 DMC (dynamic memory controller) driver supports setup/initialisation
5 during TPL using configuration data from the DTS (i.e. OF_PLATDATA), based on
6 the following key configuration data:
7 (a) a target-frequency (i.e. operating point) for the memory operation
8 (b) a speed-bin (as defined in JESD-79) for the DDR3 used in hardware
9 (c) a memory-schedule (i.e. mapping from physical addresses to the address
10 pins of the memory bus)
15 - compatible: "rockchip,rk3368-dmc"
17 protocol controller (PCTL) address and PHY controller (DDRPHY) address
18 - rockchip,ddr-speed-bin
19 the DDR3 device's speed-bin (as specified according to JESD-79)
41 - rockchip,ddr-frequency:
42 target DDR clock frequency in Hz (not all frequencies may be supported,
43 as there's some cooperation from the clock-driver required)
44 - rockchip,memory-schedule:
45 controls the decoding of physical addresses to DRAM addressing (i.e. how
46 the physical address maps onto the address pins/chip-select of the device)
47 DMC_MSCH_CBDR: column -> bank -> device -> row
48 DMC_MSCH_CBRD: column -> band -> row -> device
49 DMC_MSCH_CRBD: column -> row -> band -> device
51 Example (for DDR3-1600K and 800MHz)
52 -----------------------------------
54 #include <dt-bindings/memory/rk3368-dmc.h>
58 compatible = "rockchip,rk3368-dmc";
59 reg = <0 0xff610000 0 0x400
60 0 0xff620000 0 0x400>;
64 rockchip,ddr-speed-bin = <DDR3_1600K>;
65 rockchip,ddr-frequency = <800000000>;
66 rockchip,memory-schedule = <DMC_MSCH_CBRD>;