Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: GPL-2.0
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/devfreq/event/samsung,exynos-ppmu.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Samsung Exynos SoC PPMU (Platform Performance Monitoring Unit)
0008 
0009 maintainers:
0010   - Chanwoo Choi <cw00.choi@samsung.com>
0011   - Krzysztof Kozlowski <krzk@kernel.org>
0012 
0013 description: |
0014   The Samsung Exynos SoC has PPMU (Platform Performance Monitoring Unit) for
0015   each IP. PPMU provides the primitive values to get performance data. These
0016   PPMU events provide information of the SoC's behaviors so that you may use to
0017   analyze system performance, to make behaviors visible and to count usages of
0018   each IP (DMC, CPU, RIGHTBUS, LEFTBUS, CAM interface, LCD, G3D, MFC).  The
0019   Exynos PPMU driver uses the devfreq-event class to provide event data to
0020   various devfreq devices. The devfreq devices would use the event data when
0021   derterming the current state of each IP.
0022 
0023 properties:
0024   compatible:
0025     enum:
0026       - samsung,exynos-ppmu
0027       - samsung,exynos-ppmu-v2
0028 
0029   clock-names:
0030     items:
0031       - const: ppmu
0032 
0033   clocks:
0034     maxItems: 1
0035 
0036   reg:
0037     maxItems: 1
0038 
0039   events:
0040     type: object
0041 
0042     patternProperties:
0043       '^ppmu-event[0-9]+(-[a-z0-9]+){,2}$':
0044         type: object
0045         properties:
0046           event-name:
0047             description: |
0048               The unique event name among PPMU device
0049             $ref: /schemas/types.yaml#/definitions/string
0050 
0051           event-data-type:
0052             description: |
0053               Define the type of data which shell be counted by the counter.
0054               You can check include/dt-bindings/pmu/exynos_ppmu.h for all
0055               possible type, i.e. count read requests, count write data in
0056               bytes, etc.  This field is optional and when it is missing, the
0057               driver code will use default data type.
0058             $ref: /schemas/types.yaml#/definitions/uint32
0059 
0060         required:
0061           - event-name
0062 
0063         additionalProperties: false
0064 
0065     additionalProperties: false
0066 
0067 required:
0068   - compatible
0069   - reg
0070 
0071 additionalProperties: false
0072 
0073 examples:
0074   - |
0075     // PPMUv1 nodes for Exynos3250 (although the board DTS defines events)
0076     #include <dt-bindings/clock/exynos3250.h>
0077 
0078     ppmu_dmc0: ppmu@106a0000 {
0079         compatible = "samsung,exynos-ppmu";
0080         reg = <0x106a0000 0x2000>;
0081 
0082         events {
0083             ppmu_dmc0_3: ppmu-event3-dmc0 {
0084                 event-name = "ppmu-event3-dmc0";
0085             };
0086 
0087             ppmu_dmc0_2: ppmu-event2-dmc0 {
0088                 event-name = "ppmu-event2-dmc0";
0089             };
0090 
0091             ppmu_dmc0_1: ppmu-event1-dmc0 {
0092                 event-name = "ppmu-event1-dmc0";
0093             };
0094 
0095             ppmu_dmc0_0: ppmu-event0-dmc0 {
0096                 event-name = "ppmu-event0-dmc0";
0097             };
0098         };
0099     };
0100 
0101     ppmu_rightbus: ppmu@112a0000 {
0102         compatible = "samsung,exynos-ppmu";
0103         reg = <0x112a0000 0x2000>;
0104         clocks = <&cmu CLK_PPMURIGHT>;
0105         clock-names = "ppmu";
0106 
0107         events {
0108             ppmu_rightbus_3: ppmu-event3-rightbus {
0109                 event-name = "ppmu-event3-rightbus";
0110             };
0111         };
0112     };
0113 
0114   - |
0115     // PPMUv2 nodes in Exynos5433
0116     ppmu_d0_cpu: ppmu@10480000 {
0117         compatible = "samsung,exynos-ppmu-v2";
0118         reg = <0x10480000 0x2000>;
0119     };
0120 
0121     ppmu_d0_general: ppmu@10490000 {
0122         compatible = "samsung,exynos-ppmu-v2";
0123         reg = <0x10490000 0x2000>;
0124 
0125         events {
0126             ppmu_event0_d0_general: ppmu-event0-d0-general {
0127                 event-name = "ppmu-event0-d0-general";
0128             };
0129         };
0130     };
0131 
0132     ppmu_d0_rt: ppmu@104a0000 {
0133         compatible = "samsung,exynos-ppmu-v2";
0134         reg = <0x104a0000 0x2000>;
0135     };
0136 
0137     ppmu_d1_cpu: ppmu@104b0000 {
0138         compatible = "samsung,exynos-ppmu-v2";
0139         reg = <0x104b0000 0x2000>;
0140     };
0141 
0142     ppmu_d1_general: ppmu@104c0000 {
0143         compatible = "samsung,exynos-ppmu-v2";
0144         reg = <0x104c0000 0x2000>;
0145     };
0146 
0147     ppmu_d1_rt: ppmu@104d0000 {
0148         compatible = "samsung,exynos-ppmu-v2";
0149         reg = <0x104d0000 0x2000>;
0150     };
0151 
0152   - |
0153     // PPMUv1 nodes with event-data-type for Exynos4412
0154     #include <dt-bindings/pmu/exynos_ppmu.h>
0155 
0156     ppmu@106a0000 {
0157         compatible = "samsung,exynos-ppmu";
0158         reg = <0x106a0000 0x2000>;
0159         clocks = <&clock 400>;
0160         clock-names = "ppmu";
0161 
0162         events {
0163             ppmu-event3-dmc0 {
0164                 event-name = "ppmu-event3-dmc0";
0165                 event-data-type = <(PPMU_RO_DATA_CNT |
0166                                     PPMU_WO_DATA_CNT)>;
0167             };
0168         };
0169     };