xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/memory-controllers/exynos5422-dmc.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun* Exynos5422 frequency and voltage scaling for Dynamic Memory Controller device
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunThe Samsung Exynos5422 SoC has DMC (Dynamic Memory Controller) to which the DRAM
4*4882a593Smuzhiyunmemory chips are connected. The driver is to monitor the controller in runtime
5*4882a593Smuzhiyunand switch frequency and voltage. To monitor the usage of the controller in
6*4882a593Smuzhiyunruntime, the driver uses the PPMU (Platform Performance Monitoring Unit), which
7*4882a593Smuzhiyunis able to measure the current load of the memory.
8*4882a593SmuzhiyunWhen 'userspace' governor is used for the driver, an application is able to
9*4882a593Smuzhiyunswitch the DMC and memory frequency.
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunRequired properties for DMC device for Exynos5422:
12*4882a593Smuzhiyun- compatible: Should be "samsung,exynos5422-dmc".
13*4882a593Smuzhiyun- clocks : list of clock specifiers, must contain an entry for each
14*4882a593Smuzhiyun  required entry in clock-names for CLK_FOUT_SPLL, CLK_MOUT_SCLK_SPLL,
15*4882a593Smuzhiyun  CLK_FF_DOUT_SPLL2, CLK_FOUT_BPLL, CLK_MOUT_BPLL, CLK_SCLK_BPLL,
16*4882a593Smuzhiyun  CLK_MOUT_MX_MSPLL_CCORE, CLK_MOUT_MX_MSPLL_CCORE_PHY, CLK_MOUT_MCLK_CDREX,
17*4882a593Smuzhiyun- clock-names : should include "fout_spll", "mout_sclk_spll", "ff_dout_spll2",
18*4882a593Smuzhiyun  "fout_bpll", "mout_bpll", "sclk_bpll", "mout_mx_mspll_ccore",
19*4882a593Smuzhiyun  "mout_mclk_cdrex"  entries
20*4882a593Smuzhiyun- devfreq-events : phandles for PPMU devices connected to this DMC.
21*4882a593Smuzhiyun- vdd-supply : phandle for voltage regulator which is connected.
22*4882a593Smuzhiyun- reg : registers of two CDREX controllers.
23*4882a593Smuzhiyun- operating-points-v2 : phandle for OPPs described in v2 definition.
24*4882a593Smuzhiyun- device-handle : phandle of the connected DRAM memory device. For more
25*4882a593Smuzhiyun	information please refer to documentation file:
26*4882a593Smuzhiyun	Documentation/devicetree/bindings/ddr/lpddr3.txt
27*4882a593Smuzhiyun- devfreq-events : phandles of the PPMU events used by the controller.
28*4882a593Smuzhiyun- samsung,syscon-clk : phandle of the clock register set used by the controller,
29*4882a593Smuzhiyun	these registers are used for enabling a 'pause' feature and are not
30*4882a593Smuzhiyun	exposed by clock framework but they must be used in a safe way.
31*4882a593Smuzhiyun	The register offsets are in the driver code and specyfic for this SoC
32*4882a593Smuzhiyun	type.
33*4882a593Smuzhiyun
34*4882a593SmuzhiyunOptional properties for DMC device for Exynos5422:
35*4882a593Smuzhiyun- interrupt-parent : The parent interrupt controller.
36*4882a593Smuzhiyun- interrupts : Contains the IRQ line numbers for the DMC internal performance
37*4882a593Smuzhiyun  event counters in DREX0 and DREX1 channels. Align with specification of the
38*4882a593Smuzhiyun  interrupt line(s) in the interrupt-parent controller.
39*4882a593Smuzhiyun- interrupt-names : IRQ names "drex_0" and "drex_1", the order should be the
40*4882a593Smuzhiyun  same as in the 'interrupts' list above.
41*4882a593Smuzhiyun
42*4882a593SmuzhiyunExample:
43*4882a593Smuzhiyun
44*4882a593Smuzhiyun	ppmu_dmc0_0: ppmu@10d00000 {
45*4882a593Smuzhiyun		compatible = "samsung,exynos-ppmu";
46*4882a593Smuzhiyun		reg = <0x10d00000 0x2000>;
47*4882a593Smuzhiyun		clocks = <&clock CLK_PCLK_PPMU_DREX0_0>;
48*4882a593Smuzhiyun		clock-names = "ppmu";
49*4882a593Smuzhiyun		events {
50*4882a593Smuzhiyun			ppmu_event_dmc0_0: ppmu-event3-dmc0_0 {
51*4882a593Smuzhiyun				event-name = "ppmu-event3-dmc0_0";
52*4882a593Smuzhiyun			};
53*4882a593Smuzhiyun		};
54*4882a593Smuzhiyun	};
55*4882a593Smuzhiyun
56*4882a593Smuzhiyun	dmc: memory-controller@10c20000 {
57*4882a593Smuzhiyun		compatible = "samsung,exynos5422-dmc";
58*4882a593Smuzhiyun		reg = <0x10c20000 0x10000>, <0x10c30000 0x10000>;
59*4882a593Smuzhiyun		clocks = <&clock CLK_FOUT_SPLL>,
60*4882a593Smuzhiyun			 <&clock CLK_MOUT_SCLK_SPLL>,
61*4882a593Smuzhiyun			 <&clock CLK_FF_DOUT_SPLL2>,
62*4882a593Smuzhiyun			 <&clock CLK_FOUT_BPLL>,
63*4882a593Smuzhiyun			 <&clock CLK_MOUT_BPLL>,
64*4882a593Smuzhiyun			 <&clock CLK_SCLK_BPLL>,
65*4882a593Smuzhiyun			 <&clock CLK_MOUT_MX_MSPLL_CCORE>,
66*4882a593Smuzhiyun			 <&clock CLK_MOUT_MCLK_CDREX>;
67*4882a593Smuzhiyun		clock-names = "fout_spll",
68*4882a593Smuzhiyun			      "mout_sclk_spll",
69*4882a593Smuzhiyun			      "ff_dout_spll2",
70*4882a593Smuzhiyun			      "fout_bpll",
71*4882a593Smuzhiyun			      "mout_bpll",
72*4882a593Smuzhiyun			      "sclk_bpll",
73*4882a593Smuzhiyun			      "mout_mx_mspll_ccore",
74*4882a593Smuzhiyun			      "mout_mclk_cdrex";
75*4882a593Smuzhiyun		operating-points-v2 = <&dmc_opp_table>;
76*4882a593Smuzhiyun		devfreq-events = <&ppmu_event3_dmc0_0>,	<&ppmu_event3_dmc0_1>,
77*4882a593Smuzhiyun				 <&ppmu_event3_dmc1_0>, <&ppmu_event3_dmc1_1>;
78*4882a593Smuzhiyun		device-handle = <&samsung_K3QF2F20DB>;
79*4882a593Smuzhiyun		vdd-supply = <&buck1_reg>;
80*4882a593Smuzhiyun		samsung,syscon-clk = <&clock>;
81*4882a593Smuzhiyun		interrupt-parent = <&combiner>;
82*4882a593Smuzhiyun		interrupts = <16 0>, <16 1>;
83*4882a593Smuzhiyun		interrupt-names = "drex_0", "drex_1";
84*4882a593Smuzhiyun	};
85