xref: /freebsd/sys/contrib/device-tree/Bindings/interconnect/samsung,exynos-bus.yaml (revision cb7aa33ac6cd46a5434798e50363136e64f3ae98)
1b97ee269SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0
2b97ee269SEmmanuel Vadot%YAML 1.2
3b97ee269SEmmanuel Vadot---
4b97ee269SEmmanuel Vadot$id: http://devicetree.org/schemas/interconnect/samsung,exynos-bus.yaml#
5b97ee269SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6b97ee269SEmmanuel Vadot
7b97ee269SEmmanuel Vadottitle: Samsung Exynos SoC Bus and Interconnect
8b97ee269SEmmanuel Vadot
9b97ee269SEmmanuel Vadotmaintainers:
10b97ee269SEmmanuel Vadot  - Chanwoo Choi <cw00.choi@samsung.com>
11b97ee269SEmmanuel Vadot  - Krzysztof Kozlowski <krzk@kernel.org>
12b97ee269SEmmanuel Vadot
13b97ee269SEmmanuel Vadotdescription: |
14b97ee269SEmmanuel Vadot  The Samsung Exynos SoC has many buses for data transfer between DRAM and
15b97ee269SEmmanuel Vadot  sub-blocks in SoC. Most Exynos SoCs share the common architecture for buses.
16b97ee269SEmmanuel Vadot  Generally, each bus of Exynos SoC includes a source clock and a power line,
17b97ee269SEmmanuel Vadot  which are able to change the clock frequency of the bus in runtime. To
18b97ee269SEmmanuel Vadot  monitor the usage of each bus in runtime, the driver uses the PPMU (Platform
19b97ee269SEmmanuel Vadot  Performance Monitoring Unit), which is able to measure the current load of
20b97ee269SEmmanuel Vadot  sub-blocks.
21b97ee269SEmmanuel Vadot
22b97ee269SEmmanuel Vadot  The Exynos SoC includes the various sub-blocks which have the each AXI bus.
23b97ee269SEmmanuel Vadot  The each AXI bus has the owned source clock but, has not the only owned power
24b97ee269SEmmanuel Vadot  line. The power line might be shared among one more sub-blocks.  So, we can
25b97ee269SEmmanuel Vadot  divide into two type of device as the role of each sub-block.  There are two
26b97ee269SEmmanuel Vadot  type of bus devices as following::
27b97ee269SEmmanuel Vadot   - parent bus device
28b97ee269SEmmanuel Vadot   - passive bus device
29b97ee269SEmmanuel Vadot
30b97ee269SEmmanuel Vadot  Basically, parent and passive bus device share the same power line.  The
31b97ee269SEmmanuel Vadot  parent bus device can only change the voltage of shared power line and the
32b97ee269SEmmanuel Vadot  rest bus devices (passive bus device) depend on the decision of the parent
33b97ee269SEmmanuel Vadot  bus device. If there are three blocks which share the VDD_xxx power line,
34b97ee269SEmmanuel Vadot  Only one block should be parent device and then the rest blocks should depend
35b97ee269SEmmanuel Vadot  on the parent device as passive device.
36b97ee269SEmmanuel Vadot
37b97ee269SEmmanuel Vadot    VDD_xxx |--- A block (parent)
38b97ee269SEmmanuel Vadot      |--- B block (passive)
39b97ee269SEmmanuel Vadot      |--- C block (passive)
40b97ee269SEmmanuel Vadot
41b97ee269SEmmanuel Vadot  There are a little different composition among Exynos SoC because each Exynos
42b97ee269SEmmanuel Vadot  SoC has different sub-blocks. Therefore, such difference should be specified
43b97ee269SEmmanuel Vadot  in devicetree file instead of each device driver. In result, this driver is
44b97ee269SEmmanuel Vadot  able to support the bus frequency for all Exynos SoCs.
45b97ee269SEmmanuel Vadot
46b97ee269SEmmanuel Vadot  Detailed correlation between sub-blocks and power line according
47b97ee269SEmmanuel Vadot  to Exynos SoC::
48b97ee269SEmmanuel Vadot   - In case of Exynos3250, there are two power line as following::
49b97ee269SEmmanuel Vadot     VDD_MIF |--- DMC (Dynamic Memory Controller)
50b97ee269SEmmanuel Vadot
51b97ee269SEmmanuel Vadot     VDD_INT |--- LEFTBUS (parent device)
52b97ee269SEmmanuel Vadot       |--- PERIL
53b97ee269SEmmanuel Vadot       |--- MFC
54b97ee269SEmmanuel Vadot       |--- G3D
55b97ee269SEmmanuel Vadot       |--- RIGHTBUS
56b97ee269SEmmanuel Vadot       |--- PERIR
57b97ee269SEmmanuel Vadot       |--- FSYS
58b97ee269SEmmanuel Vadot       |--- LCD0
59b97ee269SEmmanuel Vadot       |--- PERIR
60b97ee269SEmmanuel Vadot       |--- ISP
61b97ee269SEmmanuel Vadot       |--- CAM
62b97ee269SEmmanuel Vadot
63b97ee269SEmmanuel Vadot     - MIF bus's frequency/voltage table
64b97ee269SEmmanuel Vadot       -----------------------
65b97ee269SEmmanuel Vadot       |Lv| Freq   | Voltage |
66b97ee269SEmmanuel Vadot       -----------------------
67b97ee269SEmmanuel Vadot       |L1| 50000  |800000   |
68b97ee269SEmmanuel Vadot       |L2| 100000 |800000   |
69b97ee269SEmmanuel Vadot       |L3| 134000 |800000   |
70b97ee269SEmmanuel Vadot       |L4| 200000 |825000   |
71b97ee269SEmmanuel Vadot       |L5| 400000 |875000   |
72b97ee269SEmmanuel Vadot       -----------------------
73b97ee269SEmmanuel Vadot
74b97ee269SEmmanuel Vadot     - INT bus's frequency/voltage table
75b97ee269SEmmanuel Vadot       ----------------------------------------------------------
76b97ee269SEmmanuel Vadot       |Block|LEFTBUS|RIGHTBUS|MCUISP |ISP    |PERIL  ||VDD_INT |
77b97ee269SEmmanuel Vadot       | name|       |LCD0    |       |       |       ||        |
78b97ee269SEmmanuel Vadot       |     |       |FSYS    |       |       |       ||        |
79b97ee269SEmmanuel Vadot       |     |       |MFC     |       |       |       ||        |
80b97ee269SEmmanuel Vadot       ----------------------------------------------------------
81b97ee269SEmmanuel Vadot       |Mode |*parent|passive |passive|passive|passive||        |
82b97ee269SEmmanuel Vadot       ----------------------------------------------------------
83b97ee269SEmmanuel Vadot       |Lv   |Frequency                               ||Voltage |
84b97ee269SEmmanuel Vadot       ----------------------------------------------------------
85b97ee269SEmmanuel Vadot       |L1   |50000  |50000   |50000  |50000  |50000  ||900000  |
86b97ee269SEmmanuel Vadot       |L2   |80000  |80000   |80000  |80000  |80000  ||900000  |
87b97ee269SEmmanuel Vadot       |L3   |100000 |100000  |100000 |100000 |100000 ||1000000 |
88b97ee269SEmmanuel Vadot       |L4   |134000 |134000  |200000 |200000 |       ||1000000 |
89b97ee269SEmmanuel Vadot       |L5   |200000 |200000  |400000 |300000 |       ||1000000 |
90b97ee269SEmmanuel Vadot       ----------------------------------------------------------
91b97ee269SEmmanuel Vadot
92b97ee269SEmmanuel Vadot   - In case of Exynos4210, there is one power line as following::
93b97ee269SEmmanuel Vadot     VDD_INT |--- DMC (parent device, Dynamic Memory Controller)
94b97ee269SEmmanuel Vadot       |--- LEFTBUS
95b97ee269SEmmanuel Vadot       |--- PERIL
96b97ee269SEmmanuel Vadot       |--- MFC(L)
97b97ee269SEmmanuel Vadot       |--- G3D
98b97ee269SEmmanuel Vadot       |--- TV
99b97ee269SEmmanuel Vadot       |--- LCD0
100b97ee269SEmmanuel Vadot       |--- RIGHTBUS
101b97ee269SEmmanuel Vadot       |--- PERIR
102b97ee269SEmmanuel Vadot       |--- MFC(R)
103b97ee269SEmmanuel Vadot       |--- CAM
104b97ee269SEmmanuel Vadot       |--- FSYS
105b97ee269SEmmanuel Vadot       |--- GPS
106b97ee269SEmmanuel Vadot       |--- LCD0
107b97ee269SEmmanuel Vadot       |--- LCD1
108b97ee269SEmmanuel Vadot
109b97ee269SEmmanuel Vadot   - In case of Exynos4x12, there are two power line as following::
110b97ee269SEmmanuel Vadot     VDD_MIF |--- DMC (Dynamic Memory Controller)
111b97ee269SEmmanuel Vadot
112b97ee269SEmmanuel Vadot     VDD_INT |--- LEFTBUS (parent device)
113b97ee269SEmmanuel Vadot       |--- PERIL
114b97ee269SEmmanuel Vadot       |--- MFC(L)
115b97ee269SEmmanuel Vadot       |--- G3D
116b97ee269SEmmanuel Vadot       |--- TV
117b97ee269SEmmanuel Vadot       |--- IMAGE
118b97ee269SEmmanuel Vadot       |--- RIGHTBUS
119b97ee269SEmmanuel Vadot       |--- PERIR
120b97ee269SEmmanuel Vadot       |--- MFC(R)
121b97ee269SEmmanuel Vadot       |--- CAM
122b97ee269SEmmanuel Vadot       |--- FSYS
123b97ee269SEmmanuel Vadot       |--- GPS
124b97ee269SEmmanuel Vadot       |--- LCD0
125b97ee269SEmmanuel Vadot       |--- ISP
126b97ee269SEmmanuel Vadot
127b97ee269SEmmanuel Vadot   - In case of Exynos5422, there are two power line as following::
128b97ee269SEmmanuel Vadot     VDD_MIF |--- DREX 0 (parent device, DRAM EXpress controller)
129b97ee269SEmmanuel Vadot             |--- DREX 1
130b97ee269SEmmanuel Vadot
131b97ee269SEmmanuel Vadot     VDD_INT |--- NoC_Core (parent device)
132b97ee269SEmmanuel Vadot       |--- G2D
133b97ee269SEmmanuel Vadot       |--- G3D
134b97ee269SEmmanuel Vadot       |--- DISP1
135b97ee269SEmmanuel Vadot       |--- NoC_WCORE
136b97ee269SEmmanuel Vadot       |--- GSCL
137b97ee269SEmmanuel Vadot       |--- MSCL
138b97ee269SEmmanuel Vadot       |--- ISP
139b97ee269SEmmanuel Vadot       |--- MFC
140b97ee269SEmmanuel Vadot       |--- GEN
141b97ee269SEmmanuel Vadot       |--- PERIS
142b97ee269SEmmanuel Vadot       |--- PERIC
143b97ee269SEmmanuel Vadot       |--- FSYS
144b97ee269SEmmanuel Vadot       |--- FSYS2
145b97ee269SEmmanuel Vadot
146b97ee269SEmmanuel Vadot   - In case of Exynos5433, there is VDD_INT power line as following::
147b97ee269SEmmanuel Vadot     VDD_INT |--- G2D (parent device)
148b97ee269SEmmanuel Vadot       |--- MSCL
149b97ee269SEmmanuel Vadot       |--- GSCL
150b97ee269SEmmanuel Vadot       |--- JPEG
151b97ee269SEmmanuel Vadot       |--- MFC
152b97ee269SEmmanuel Vadot       |--- HEVC
153b97ee269SEmmanuel Vadot       |--- BUS0
154b97ee269SEmmanuel Vadot       |--- BUS1
155b97ee269SEmmanuel Vadot       |--- BUS2
156b97ee269SEmmanuel Vadot       |--- PERIS (Fixed clock rate)
157b97ee269SEmmanuel Vadot       |--- PERIC (Fixed clock rate)
158b97ee269SEmmanuel Vadot       |--- FSYS  (Fixed clock rate)
159b97ee269SEmmanuel Vadot
160b97ee269SEmmanuel Vadotproperties:
161b97ee269SEmmanuel Vadot  compatible:
162b97ee269SEmmanuel Vadot    enum:
163b97ee269SEmmanuel Vadot      - samsung,exynos-bus
164b97ee269SEmmanuel Vadot
165b97ee269SEmmanuel Vadot  clocks:
166b97ee269SEmmanuel Vadot    maxItems: 1
167b97ee269SEmmanuel Vadot
168b97ee269SEmmanuel Vadot  clock-names:
169b97ee269SEmmanuel Vadot    items:
170b97ee269SEmmanuel Vadot      - const: bus
171b97ee269SEmmanuel Vadot
172b97ee269SEmmanuel Vadot  devfreq:
173b97ee269SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
174b97ee269SEmmanuel Vadot    description:
175b97ee269SEmmanuel Vadot      Parent bus device. Valid and required only for the passive bus devices.
176b97ee269SEmmanuel Vadot
177b97ee269SEmmanuel Vadot  devfreq-events:
178b97ee269SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle-array
179b97ee269SEmmanuel Vadot    minItems: 1
180b97ee269SEmmanuel Vadot    maxItems: 4
181b97ee269SEmmanuel Vadot    description:
182b97ee269SEmmanuel Vadot      Devfreq-event device to monitor the current utilization of buses. Valid
183b97ee269SEmmanuel Vadot      and required only for the parent bus devices.
184b97ee269SEmmanuel Vadot
185b97ee269SEmmanuel Vadot  exynos,saturation-ratio:
186b97ee269SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
187b97ee269SEmmanuel Vadot    description:
188b97ee269SEmmanuel Vadot      Percentage value which is used to calibrate the performance count against
189b97ee269SEmmanuel Vadot      total cycle count.  Valid only for the parent bus devices.
190b97ee269SEmmanuel Vadot
191b97ee269SEmmanuel Vadot  '#interconnect-cells':
192b97ee269SEmmanuel Vadot    const: 0
193b97ee269SEmmanuel Vadot
194b97ee269SEmmanuel Vadot  interconnects:
195b97ee269SEmmanuel Vadot    minItems: 1
196b97ee269SEmmanuel Vadot    maxItems: 2
197b97ee269SEmmanuel Vadot
198b97ee269SEmmanuel Vadot  operating-points-v2: true
199*cb7aa33aSEmmanuel Vadot  opp-table:
200*cb7aa33aSEmmanuel Vadot    type: object
201b97ee269SEmmanuel Vadot
202b97ee269SEmmanuel Vadot  samsung,data-clock-ratio:
203b97ee269SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
204b97ee269SEmmanuel Vadot    default: 8
205b97ee269SEmmanuel Vadot    description:
206b97ee269SEmmanuel Vadot      Ratio of the data throughput in B/s to minimum data clock frequency in
207b97ee269SEmmanuel Vadot      Hz.
208b97ee269SEmmanuel Vadot
209b97ee269SEmmanuel Vadot  vdd-supply:
210b97ee269SEmmanuel Vadot    description:
211b97ee269SEmmanuel Vadot      Main bus power rail. Valid and required only for the parent bus devices.
212b97ee269SEmmanuel Vadot
213b97ee269SEmmanuel Vadotrequired:
214b97ee269SEmmanuel Vadot  - compatible
215b97ee269SEmmanuel Vadot  - clocks
216b97ee269SEmmanuel Vadot  - clock-names
217b97ee269SEmmanuel Vadot  - operating-points-v2
218b97ee269SEmmanuel Vadot
219b97ee269SEmmanuel VadotadditionalProperties: false
220b97ee269SEmmanuel Vadot
221b97ee269SEmmanuel Vadotexamples:
222b97ee269SEmmanuel Vadot  - |
223b97ee269SEmmanuel Vadot    #include <dt-bindings/clock/exynos3250.h>
224b97ee269SEmmanuel Vadot
225b97ee269SEmmanuel Vadot    bus-dmc {
226b97ee269SEmmanuel Vadot        compatible = "samsung,exynos-bus";
227b97ee269SEmmanuel Vadot        clocks = <&cmu_dmc CLK_DIV_DMC>;
228b97ee269SEmmanuel Vadot        clock-names = "bus";
229b97ee269SEmmanuel Vadot        operating-points-v2 = <&bus_dmc_opp_table>;
230b97ee269SEmmanuel Vadot        devfreq-events = <&ppmu_dmc0_3>, <&ppmu_dmc1_3>;
231b97ee269SEmmanuel Vadot        vdd-supply = <&buck1_reg>;
232*cb7aa33aSEmmanuel Vadot
233*cb7aa33aSEmmanuel Vadot        bus_dmc_opp_table: opp-table {
234*cb7aa33aSEmmanuel Vadot            compatible = "operating-points-v2";
235*cb7aa33aSEmmanuel Vadot
236*cb7aa33aSEmmanuel Vadot            opp-50000000 {
237*cb7aa33aSEmmanuel Vadot                opp-hz = /bits/ 64 <50000000>;
238*cb7aa33aSEmmanuel Vadot                opp-microvolt = <800000>;
239*cb7aa33aSEmmanuel Vadot            };
240*cb7aa33aSEmmanuel Vadot            opp-100000000 {
241*cb7aa33aSEmmanuel Vadot                opp-hz = /bits/ 64 <100000000>;
242*cb7aa33aSEmmanuel Vadot                opp-microvolt = <800000>;
243*cb7aa33aSEmmanuel Vadot            };
244*cb7aa33aSEmmanuel Vadot            opp-134000000 {
245*cb7aa33aSEmmanuel Vadot                opp-hz = /bits/ 64 <134000000>;
246*cb7aa33aSEmmanuel Vadot                opp-microvolt = <800000>;
247*cb7aa33aSEmmanuel Vadot            };
248*cb7aa33aSEmmanuel Vadot            opp-200000000 {
249*cb7aa33aSEmmanuel Vadot                opp-hz = /bits/ 64 <200000000>;
250*cb7aa33aSEmmanuel Vadot                opp-microvolt = <825000>;
251*cb7aa33aSEmmanuel Vadot            };
252*cb7aa33aSEmmanuel Vadot            opp-400000000 {
253*cb7aa33aSEmmanuel Vadot                opp-hz = /bits/ 64 <400000000>;
254*cb7aa33aSEmmanuel Vadot                opp-microvolt = <875000>;
255*cb7aa33aSEmmanuel Vadot            };
256*cb7aa33aSEmmanuel Vadot        };
257b97ee269SEmmanuel Vadot    };
258b97ee269SEmmanuel Vadot
259b97ee269SEmmanuel Vadot    ppmu_dmc0: ppmu@106a0000 {
260b97ee269SEmmanuel Vadot        compatible = "samsung,exynos-ppmu";
261b97ee269SEmmanuel Vadot        reg = <0x106a0000 0x2000>;
262b97ee269SEmmanuel Vadot        events {
263b97ee269SEmmanuel Vadot            ppmu_dmc0_3: ppmu-event3-dmc0 {
264b97ee269SEmmanuel Vadot                event-name = "ppmu-event3-dmc0";
265b97ee269SEmmanuel Vadot            };
266b97ee269SEmmanuel Vadot        };
267b97ee269SEmmanuel Vadot    };
268b97ee269SEmmanuel Vadot
269b97ee269SEmmanuel Vadot    bus_leftbus: bus-leftbus {
270b97ee269SEmmanuel Vadot        compatible = "samsung,exynos-bus";
271b97ee269SEmmanuel Vadot        clocks = <&cmu CLK_DIV_GDL>;
272b97ee269SEmmanuel Vadot        clock-names = "bus";
273b97ee269SEmmanuel Vadot        operating-points-v2 = <&bus_leftbus_opp_table>;
274b97ee269SEmmanuel Vadot        devfreq-events = <&ppmu_leftbus_3>, <&ppmu_rightbus_3>;
275b97ee269SEmmanuel Vadot        vdd-supply = <&buck3_reg>;
276b97ee269SEmmanuel Vadot    };
277b97ee269SEmmanuel Vadot
278b97ee269SEmmanuel Vadot    bus-rightbus {
279b97ee269SEmmanuel Vadot        compatible = "samsung,exynos-bus";
280b97ee269SEmmanuel Vadot        clocks = <&cmu CLK_DIV_GDR>;
281b97ee269SEmmanuel Vadot        clock-names = "bus";
282b97ee269SEmmanuel Vadot        operating-points-v2 = <&bus_leftbus_opp_table>;
283b97ee269SEmmanuel Vadot        devfreq = <&bus_leftbus>;
284b97ee269SEmmanuel Vadot    };
285b97ee269SEmmanuel Vadot
286b97ee269SEmmanuel Vadot  - |
287b97ee269SEmmanuel Vadot    dmc: bus-dmc {
288b97ee269SEmmanuel Vadot        compatible = "samsung,exynos-bus";
289b97ee269SEmmanuel Vadot        clocks = <&clock CLK_DIV_DMC>;
290b97ee269SEmmanuel Vadot        clock-names = "bus";
291b97ee269SEmmanuel Vadot        operating-points-v2 = <&bus_dmc_opp_table>;
292b97ee269SEmmanuel Vadot        samsung,data-clock-ratio = <4>;
293b97ee269SEmmanuel Vadot        #interconnect-cells = <0>;
294b97ee269SEmmanuel Vadot        devfreq-events = <&ppmu_dmc0_3>, <&ppmu_dmc1_3>;
295b97ee269SEmmanuel Vadot        vdd-supply = <&buck1_reg>;
296b97ee269SEmmanuel Vadot    };
297b97ee269SEmmanuel Vadot
298b97ee269SEmmanuel Vadot    leftbus: bus-leftbus {
299b97ee269SEmmanuel Vadot        compatible = "samsung,exynos-bus";
300b97ee269SEmmanuel Vadot        clocks = <&clock CLK_DIV_GDL>;
301b97ee269SEmmanuel Vadot        clock-names = "bus";
302b97ee269SEmmanuel Vadot        operating-points-v2 = <&bus_leftbus_opp_table>;
303b97ee269SEmmanuel Vadot        interconnects = <&dmc>;
304b97ee269SEmmanuel Vadot        #interconnect-cells = <0>;
305b97ee269SEmmanuel Vadot        devfreq-events = <&ppmu_leftbus_3>, <&ppmu_rightbus_3>;
306b97ee269SEmmanuel Vadot        vdd-supply = <&buck3_reg>;
307b97ee269SEmmanuel Vadot    };
308b97ee269SEmmanuel Vadot
309b97ee269SEmmanuel Vadot    display: bus-display {
310b97ee269SEmmanuel Vadot        compatible = "samsung,exynos-bus";
311b97ee269SEmmanuel Vadot        clocks = <&clock CLK_DIV_ACLK_266>;
312b97ee269SEmmanuel Vadot        clock-names = "bus";
313b97ee269SEmmanuel Vadot        operating-points-v2 = <&bus_display_opp_table>;
314b97ee269SEmmanuel Vadot        interconnects = <&leftbus &dmc>;
315b97ee269SEmmanuel Vadot        #interconnect-cells = <0>;
316b97ee269SEmmanuel Vadot        devfreq = <&leftbus>;
317b97ee269SEmmanuel Vadot    };
318