1*354d7675SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0 2*354d7675SEmmanuel Vadot%YAML 1.2 3*354d7675SEmmanuel Vadot--- 4*354d7675SEmmanuel Vadot$id: http://devicetree.org/schemas/devfreq/event/samsung,exynos-ppmu.yaml# 5*354d7675SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*354d7675SEmmanuel Vadot 7*354d7675SEmmanuel Vadottitle: Samsung Exynos SoC PPMU (Platform Performance Monitoring Unit) 8*354d7675SEmmanuel Vadot 9*354d7675SEmmanuel Vadotmaintainers: 10*354d7675SEmmanuel Vadot - Chanwoo Choi <cw00.choi@samsung.com> 11*354d7675SEmmanuel Vadot - Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> 12*354d7675SEmmanuel Vadot 13*354d7675SEmmanuel Vadotdescription: | 14*354d7675SEmmanuel Vadot The Samsung Exynos SoC has PPMU (Platform Performance Monitoring Unit) for 15*354d7675SEmmanuel Vadot each IP. PPMU provides the primitive values to get performance data. These 16*354d7675SEmmanuel Vadot PPMU events provide information of the SoC's behaviors so that you may use to 17*354d7675SEmmanuel Vadot analyze system performance, to make behaviors visible and to count usages of 18*354d7675SEmmanuel Vadot each IP (DMC, CPU, RIGHTBUS, LEFTBUS, CAM interface, LCD, G3D, MFC). The 19*354d7675SEmmanuel Vadot Exynos PPMU driver uses the devfreq-event class to provide event data to 20*354d7675SEmmanuel Vadot various devfreq devices. The devfreq devices would use the event data when 21*354d7675SEmmanuel Vadot derterming the current state of each IP. 22*354d7675SEmmanuel Vadot 23*354d7675SEmmanuel Vadotproperties: 24*354d7675SEmmanuel Vadot compatible: 25*354d7675SEmmanuel Vadot enum: 26*354d7675SEmmanuel Vadot - samsung,exynos-ppmu 27*354d7675SEmmanuel Vadot - samsung,exynos-ppmu-v2 28*354d7675SEmmanuel Vadot 29*354d7675SEmmanuel Vadot clock-names: 30*354d7675SEmmanuel Vadot items: 31*354d7675SEmmanuel Vadot - const: ppmu 32*354d7675SEmmanuel Vadot 33*354d7675SEmmanuel Vadot clocks: 34*354d7675SEmmanuel Vadot maxItems: 1 35*354d7675SEmmanuel Vadot 36*354d7675SEmmanuel Vadot reg: 37*354d7675SEmmanuel Vadot maxItems: 1 38*354d7675SEmmanuel Vadot 39*354d7675SEmmanuel Vadot events: 40*354d7675SEmmanuel Vadot type: object 41*354d7675SEmmanuel Vadot 42*354d7675SEmmanuel Vadot patternProperties: 43*354d7675SEmmanuel Vadot '^ppmu-event[0-9]+(-[a-z0-9]+){,2}$': 44*354d7675SEmmanuel Vadot type: object 45*354d7675SEmmanuel Vadot properties: 46*354d7675SEmmanuel Vadot event-name: 47*354d7675SEmmanuel Vadot description: | 48*354d7675SEmmanuel Vadot The unique event name among PPMU device 49*354d7675SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/string 50*354d7675SEmmanuel Vadot 51*354d7675SEmmanuel Vadot event-data-type: 52*354d7675SEmmanuel Vadot description: | 53*354d7675SEmmanuel Vadot Define the type of data which shell be counted by the counter. 54*354d7675SEmmanuel Vadot You can check include/dt-bindings/pmu/exynos_ppmu.h for all 55*354d7675SEmmanuel Vadot possible type, i.e. count read requests, count write data in 56*354d7675SEmmanuel Vadot bytes, etc. This field is optional and when it is missing, the 57*354d7675SEmmanuel Vadot driver code will use default data type. 58*354d7675SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 59*354d7675SEmmanuel Vadot 60*354d7675SEmmanuel Vadot required: 61*354d7675SEmmanuel Vadot - event-name 62*354d7675SEmmanuel Vadot 63*354d7675SEmmanuel Vadot additionalProperties: false 64*354d7675SEmmanuel Vadot 65*354d7675SEmmanuel Vadot additionalProperties: false 66*354d7675SEmmanuel Vadot 67*354d7675SEmmanuel Vadotrequired: 68*354d7675SEmmanuel Vadot - compatible 69*354d7675SEmmanuel Vadot - reg 70*354d7675SEmmanuel Vadot 71*354d7675SEmmanuel VadotadditionalProperties: false 72*354d7675SEmmanuel Vadot 73*354d7675SEmmanuel Vadotexamples: 74*354d7675SEmmanuel Vadot - | 75*354d7675SEmmanuel Vadot // PPMUv1 nodes for Exynos3250 (although the board DTS defines events) 76*354d7675SEmmanuel Vadot #include <dt-bindings/clock/exynos3250.h> 77*354d7675SEmmanuel Vadot 78*354d7675SEmmanuel Vadot ppmu_dmc0: ppmu@106a0000 { 79*354d7675SEmmanuel Vadot compatible = "samsung,exynos-ppmu"; 80*354d7675SEmmanuel Vadot reg = <0x106a0000 0x2000>; 81*354d7675SEmmanuel Vadot 82*354d7675SEmmanuel Vadot events { 83*354d7675SEmmanuel Vadot ppmu_dmc0_3: ppmu-event3-dmc0 { 84*354d7675SEmmanuel Vadot event-name = "ppmu-event3-dmc0"; 85*354d7675SEmmanuel Vadot }; 86*354d7675SEmmanuel Vadot 87*354d7675SEmmanuel Vadot ppmu_dmc0_2: ppmu-event2-dmc0 { 88*354d7675SEmmanuel Vadot event-name = "ppmu-event2-dmc0"; 89*354d7675SEmmanuel Vadot }; 90*354d7675SEmmanuel Vadot 91*354d7675SEmmanuel Vadot ppmu_dmc0_1: ppmu-event1-dmc0 { 92*354d7675SEmmanuel Vadot event-name = "ppmu-event1-dmc0"; 93*354d7675SEmmanuel Vadot }; 94*354d7675SEmmanuel Vadot 95*354d7675SEmmanuel Vadot ppmu_dmc0_0: ppmu-event0-dmc0 { 96*354d7675SEmmanuel Vadot event-name = "ppmu-event0-dmc0"; 97*354d7675SEmmanuel Vadot }; 98*354d7675SEmmanuel Vadot }; 99*354d7675SEmmanuel Vadot }; 100*354d7675SEmmanuel Vadot 101*354d7675SEmmanuel Vadot ppmu_rightbus: ppmu@112a0000 { 102*354d7675SEmmanuel Vadot compatible = "samsung,exynos-ppmu"; 103*354d7675SEmmanuel Vadot reg = <0x112a0000 0x2000>; 104*354d7675SEmmanuel Vadot clocks = <&cmu CLK_PPMURIGHT>; 105*354d7675SEmmanuel Vadot clock-names = "ppmu"; 106*354d7675SEmmanuel Vadot 107*354d7675SEmmanuel Vadot events { 108*354d7675SEmmanuel Vadot ppmu_rightbus_3: ppmu-event3-rightbus { 109*354d7675SEmmanuel Vadot event-name = "ppmu-event3-rightbus"; 110*354d7675SEmmanuel Vadot }; 111*354d7675SEmmanuel Vadot }; 112*354d7675SEmmanuel Vadot }; 113*354d7675SEmmanuel Vadot 114*354d7675SEmmanuel Vadot - | 115*354d7675SEmmanuel Vadot // PPMUv2 nodes in Exynos5433 116*354d7675SEmmanuel Vadot ppmu_d0_cpu: ppmu@10480000 { 117*354d7675SEmmanuel Vadot compatible = "samsung,exynos-ppmu-v2"; 118*354d7675SEmmanuel Vadot reg = <0x10480000 0x2000>; 119*354d7675SEmmanuel Vadot }; 120*354d7675SEmmanuel Vadot 121*354d7675SEmmanuel Vadot ppmu_d0_general: ppmu@10490000 { 122*354d7675SEmmanuel Vadot compatible = "samsung,exynos-ppmu-v2"; 123*354d7675SEmmanuel Vadot reg = <0x10490000 0x2000>; 124*354d7675SEmmanuel Vadot 125*354d7675SEmmanuel Vadot events { 126*354d7675SEmmanuel Vadot ppmu_event0_d0_general: ppmu-event0-d0-general { 127*354d7675SEmmanuel Vadot event-name = "ppmu-event0-d0-general"; 128*354d7675SEmmanuel Vadot }; 129*354d7675SEmmanuel Vadot }; 130*354d7675SEmmanuel Vadot }; 131*354d7675SEmmanuel Vadot 132*354d7675SEmmanuel Vadot ppmu_d0_rt: ppmu@104a0000 { 133*354d7675SEmmanuel Vadot compatible = "samsung,exynos-ppmu-v2"; 134*354d7675SEmmanuel Vadot reg = <0x104a0000 0x2000>; 135*354d7675SEmmanuel Vadot }; 136*354d7675SEmmanuel Vadot 137*354d7675SEmmanuel Vadot ppmu_d1_cpu: ppmu@104b0000 { 138*354d7675SEmmanuel Vadot compatible = "samsung,exynos-ppmu-v2"; 139*354d7675SEmmanuel Vadot reg = <0x104b0000 0x2000>; 140*354d7675SEmmanuel Vadot }; 141*354d7675SEmmanuel Vadot 142*354d7675SEmmanuel Vadot ppmu_d1_general: ppmu@104c0000 { 143*354d7675SEmmanuel Vadot compatible = "samsung,exynos-ppmu-v2"; 144*354d7675SEmmanuel Vadot reg = <0x104c0000 0x2000>; 145*354d7675SEmmanuel Vadot }; 146*354d7675SEmmanuel Vadot 147*354d7675SEmmanuel Vadot ppmu_d1_rt: ppmu@104d0000 { 148*354d7675SEmmanuel Vadot compatible = "samsung,exynos-ppmu-v2"; 149*354d7675SEmmanuel Vadot reg = <0x104d0000 0x2000>; 150*354d7675SEmmanuel Vadot }; 151*354d7675SEmmanuel Vadot 152*354d7675SEmmanuel Vadot - | 153*354d7675SEmmanuel Vadot // PPMUv1 nodes with event-data-type for Exynos4412 154*354d7675SEmmanuel Vadot #include <dt-bindings/pmu/exynos_ppmu.h> 155*354d7675SEmmanuel Vadot 156*354d7675SEmmanuel Vadot ppmu@106a0000 { 157*354d7675SEmmanuel Vadot compatible = "samsung,exynos-ppmu"; 158*354d7675SEmmanuel Vadot reg = <0x106a0000 0x2000>; 159*354d7675SEmmanuel Vadot clocks = <&clock 400>; 160*354d7675SEmmanuel Vadot clock-names = "ppmu"; 161*354d7675SEmmanuel Vadot 162*354d7675SEmmanuel Vadot events { 163*354d7675SEmmanuel Vadot ppmu-event3-dmc0 { 164*354d7675SEmmanuel Vadot event-name = "ppmu-event3-dmc0"; 165*354d7675SEmmanuel Vadot event-data-type = <(PPMU_RO_DATA_CNT | 166*354d7675SEmmanuel Vadot PPMU_WO_DATA_CNT)>; 167*354d7675SEmmanuel Vadot }; 168*354d7675SEmmanuel Vadot }; 169*354d7675SEmmanuel Vadot }; 170