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