xref: /freebsd/sys/contrib/device-tree/Bindings/memory-controllers/samsung,exynos5422-dmc.yaml (revision fac71e4e09885bb2afa3d984a0c239a52e1a7418)
1354d7675SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0
2354d7675SEmmanuel Vadot%YAML 1.2
3354d7675SEmmanuel Vadot---
4354d7675SEmmanuel Vadot$id: http://devicetree.org/schemas/memory-controllers/samsung,exynos5422-dmc.yaml#
5354d7675SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6354d7675SEmmanuel Vadot
7354d7675SEmmanuel Vadottitle: |
8354d7675SEmmanuel Vadot  Samsung Exynos5422 SoC frequency and voltage scaling for Dynamic Memory
9354d7675SEmmanuel Vadot  Controller device
10354d7675SEmmanuel Vadot
11354d7675SEmmanuel Vadotmaintainers:
12c9ccf3a3SEmmanuel Vadot  - Krzysztof Kozlowski <krzk@kernel.org>
13354d7675SEmmanuel Vadot  - Lukasz Luba <lukasz.luba@arm.com>
14354d7675SEmmanuel Vadot
15354d7675SEmmanuel Vadotdescription: |
16354d7675SEmmanuel Vadot  The Samsung Exynos5422 SoC has DMC (Dynamic Memory Controller) to which the
17354d7675SEmmanuel Vadot  DRAM memory chips are connected. The driver is to monitor the controller in
18354d7675SEmmanuel Vadot  runtime and switch frequency and voltage. To monitor the usage of the
19354d7675SEmmanuel Vadot  controller in runtime, the driver uses the PPMU (Platform Performance
20354d7675SEmmanuel Vadot  Monitoring Unit), which is able to measure the current load of the memory.
21354d7675SEmmanuel Vadot  When 'userspace' governor is used for the driver, an application is able to
22354d7675SEmmanuel Vadot  switch the DMC and memory frequency.
23354d7675SEmmanuel Vadot
24354d7675SEmmanuel Vadotproperties:
25354d7675SEmmanuel Vadot  compatible:
26354d7675SEmmanuel Vadot    items:
27354d7675SEmmanuel Vadot      - const: samsung,exynos5422-dmc
28354d7675SEmmanuel Vadot
29354d7675SEmmanuel Vadot  clock-names:
30354d7675SEmmanuel Vadot    items:
31354d7675SEmmanuel Vadot      - const: fout_spll
32354d7675SEmmanuel Vadot      - const: mout_sclk_spll
33354d7675SEmmanuel Vadot      - const: ff_dout_spll2
34354d7675SEmmanuel Vadot      - const: fout_bpll
35354d7675SEmmanuel Vadot      - const: mout_bpll
36354d7675SEmmanuel Vadot      - const: sclk_bpll
37354d7675SEmmanuel Vadot      - const: mout_mx_mspll_ccore
38354d7675SEmmanuel Vadot      - const: mout_mclk_cdrex
39354d7675SEmmanuel Vadot
40354d7675SEmmanuel Vadot  clocks:
41354d7675SEmmanuel Vadot    minItems: 8
42354d7675SEmmanuel Vadot    maxItems: 8
43354d7675SEmmanuel Vadot
44354d7675SEmmanuel Vadot  devfreq-events:
45*fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle-array
46354d7675SEmmanuel Vadot    minItems: 1
47354d7675SEmmanuel Vadot    maxItems: 16
48c9ccf3a3SEmmanuel Vadot    items:
49c9ccf3a3SEmmanuel Vadot      maxItems: 1
50354d7675SEmmanuel Vadot    description: phandles of the PPMU events used by the controller.
51354d7675SEmmanuel Vadot
52354d7675SEmmanuel Vadot  device-handle:
53*fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
54354d7675SEmmanuel Vadot    description: |
55354d7675SEmmanuel Vadot      phandle of the connected DRAM memory device. For more information please
56c9ccf3a3SEmmanuel Vadot      refer to jedec,lpddr3.yaml.
57354d7675SEmmanuel Vadot
58354d7675SEmmanuel Vadot  operating-points-v2: true
59354d7675SEmmanuel Vadot
60354d7675SEmmanuel Vadot  interrupts:
61354d7675SEmmanuel Vadot    items:
62354d7675SEmmanuel Vadot      - description: DMC internal performance event counters in DREX0
63354d7675SEmmanuel Vadot      - description: DMC internal performance event counters in DREX1
64354d7675SEmmanuel Vadot
65354d7675SEmmanuel Vadot  interrupt-names:
66354d7675SEmmanuel Vadot    items:
67354d7675SEmmanuel Vadot      - const: drex_0
68354d7675SEmmanuel Vadot      - const: drex_1
69354d7675SEmmanuel Vadot
70354d7675SEmmanuel Vadot  reg:
71354d7675SEmmanuel Vadot    items:
72354d7675SEmmanuel Vadot      - description: registers of DREX0
73354d7675SEmmanuel Vadot      - description: registers of DREX1
74354d7675SEmmanuel Vadot
75354d7675SEmmanuel Vadot  samsung,syscon-clk:
76*fac71e4eSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
77354d7675SEmmanuel Vadot    description: |
78354d7675SEmmanuel Vadot      Phandle of the clock register set used by the controller, these registers
79354d7675SEmmanuel Vadot      are used for enabling a 'pause' feature and are not exposed by clock
80354d7675SEmmanuel Vadot      framework but they must be used in a safe way.  The register offsets are
81354d7675SEmmanuel Vadot      in the driver code and specyfic for this SoC type.
82354d7675SEmmanuel Vadot
83354d7675SEmmanuel Vadot  vdd-supply: true
84354d7675SEmmanuel Vadot
85354d7675SEmmanuel Vadotrequired:
86354d7675SEmmanuel Vadot  - compatible
87354d7675SEmmanuel Vadot  - clock-names
88354d7675SEmmanuel Vadot  - clocks
89354d7675SEmmanuel Vadot  - devfreq-events
90354d7675SEmmanuel Vadot  - device-handle
91354d7675SEmmanuel Vadot  - reg
92354d7675SEmmanuel Vadot  - samsung,syscon-clk
93354d7675SEmmanuel Vadot
94354d7675SEmmanuel VadotadditionalProperties: false
95354d7675SEmmanuel Vadot
96354d7675SEmmanuel Vadotexamples:
97354d7675SEmmanuel Vadot  - |
98354d7675SEmmanuel Vadot    #include <dt-bindings/clock/exynos5420.h>
99354d7675SEmmanuel Vadot    ppmu_dmc0_0: ppmu@10d00000 {
100354d7675SEmmanuel Vadot        compatible = "samsung,exynos-ppmu";
101354d7675SEmmanuel Vadot        reg = <0x10d00000 0x2000>;
102354d7675SEmmanuel Vadot        clocks = <&clock CLK_PCLK_PPMU_DREX0_0>;
103354d7675SEmmanuel Vadot        clock-names = "ppmu";
104354d7675SEmmanuel Vadot        events {
105354d7675SEmmanuel Vadot            ppmu_event_dmc0_0: ppmu-event3-dmc0-0 {
106354d7675SEmmanuel Vadot                event-name = "ppmu-event3-dmc0_0";
107354d7675SEmmanuel Vadot            };
108354d7675SEmmanuel Vadot        };
109354d7675SEmmanuel Vadot    };
110354d7675SEmmanuel Vadot
111354d7675SEmmanuel Vadot    memory-controller@10c20000 {
112354d7675SEmmanuel Vadot        compatible = "samsung,exynos5422-dmc";
113354d7675SEmmanuel Vadot        reg = <0x10c20000 0x10000>, <0x10c30000 0x10000>;
114354d7675SEmmanuel Vadot        clocks = <&clock CLK_FOUT_SPLL>,
115354d7675SEmmanuel Vadot                 <&clock CLK_MOUT_SCLK_SPLL>,
116354d7675SEmmanuel Vadot                 <&clock CLK_FF_DOUT_SPLL2>,
117354d7675SEmmanuel Vadot                 <&clock CLK_FOUT_BPLL>,
118354d7675SEmmanuel Vadot                 <&clock CLK_MOUT_BPLL>,
119354d7675SEmmanuel Vadot                 <&clock CLK_SCLK_BPLL>,
120354d7675SEmmanuel Vadot                 <&clock CLK_MOUT_MX_MSPLL_CCORE>,
121354d7675SEmmanuel Vadot                 <&clock CLK_MOUT_MCLK_CDREX>;
122354d7675SEmmanuel Vadot        clock-names = "fout_spll",
123354d7675SEmmanuel Vadot                      "mout_sclk_spll",
124354d7675SEmmanuel Vadot                      "ff_dout_spll2",
125354d7675SEmmanuel Vadot                      "fout_bpll",
126354d7675SEmmanuel Vadot                      "mout_bpll",
127354d7675SEmmanuel Vadot                      "sclk_bpll",
128354d7675SEmmanuel Vadot                      "mout_mx_mspll_ccore",
129354d7675SEmmanuel Vadot                      "mout_mclk_cdrex";
130354d7675SEmmanuel Vadot        operating-points-v2 = <&dmc_opp_table>;
131354d7675SEmmanuel Vadot        devfreq-events = <&ppmu_event3_dmc0_0>,	<&ppmu_event3_dmc0_1>,
132354d7675SEmmanuel Vadot                         <&ppmu_event3_dmc1_0>, <&ppmu_event3_dmc1_1>;
133354d7675SEmmanuel Vadot        device-handle = <&samsung_K3QF2F20DB>;
134354d7675SEmmanuel Vadot        vdd-supply = <&buck1_reg>;
135354d7675SEmmanuel Vadot        samsung,syscon-clk = <&clock>;
136354d7675SEmmanuel Vadot        interrupt-parent = <&combiner>;
137354d7675SEmmanuel Vadot        interrupts = <16 0>, <16 1>;
138354d7675SEmmanuel Vadot        interrupt-names = "drex_0", "drex_1";
139354d7675SEmmanuel Vadot    };
140