1354d7675SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0 2354d7675SEmmanuel Vadot%YAML 1.2 3354d7675SEmmanuel Vadot--- 4354d7675SEmmanuel Vadot$id: http://devicetree.org/schemas/devfreq/event/samsung,exynos-ppmu.yaml# 5354d7675SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6354d7675SEmmanuel Vadot 7354d7675SEmmanuel Vadottitle: Samsung Exynos SoC PPMU (Platform Performance Monitoring Unit) 8354d7675SEmmanuel Vadot 9354d7675SEmmanuel Vadotmaintainers: 10354d7675SEmmanuel Vadot - Chanwoo Choi <cw00.choi@samsung.com> 11c9ccf3a3SEmmanuel Vadot - Krzysztof Kozlowski <krzk@kernel.org> 12354d7675SEmmanuel Vadot 13354d7675SEmmanuel Vadotdescription: | 14354d7675SEmmanuel Vadot The Samsung Exynos SoC has PPMU (Platform Performance Monitoring Unit) for 15354d7675SEmmanuel Vadot each IP. PPMU provides the primitive values to get performance data. These 16354d7675SEmmanuel Vadot PPMU events provide information of the SoC's behaviors so that you may use to 17354d7675SEmmanuel Vadot analyze system performance, to make behaviors visible and to count usages of 18354d7675SEmmanuel Vadot each IP (DMC, CPU, RIGHTBUS, LEFTBUS, CAM interface, LCD, G3D, MFC). The 19354d7675SEmmanuel Vadot Exynos PPMU driver uses the devfreq-event class to provide event data to 20354d7675SEmmanuel Vadot various devfreq devices. The devfreq devices would use the event data when 21*aa1a8ff2SEmmanuel Vadot determining the current state of each IP. 22354d7675SEmmanuel Vadot 23354d7675SEmmanuel Vadotproperties: 24354d7675SEmmanuel Vadot compatible: 25354d7675SEmmanuel Vadot enum: 26354d7675SEmmanuel Vadot - samsung,exynos-ppmu 27354d7675SEmmanuel Vadot - samsung,exynos-ppmu-v2 28354d7675SEmmanuel Vadot 29354d7675SEmmanuel Vadot clock-names: 30354d7675SEmmanuel Vadot items: 31354d7675SEmmanuel Vadot - const: ppmu 32354d7675SEmmanuel Vadot 33354d7675SEmmanuel Vadot clocks: 34354d7675SEmmanuel Vadot maxItems: 1 35354d7675SEmmanuel Vadot 36354d7675SEmmanuel Vadot reg: 37354d7675SEmmanuel Vadot maxItems: 1 38354d7675SEmmanuel Vadot 39354d7675SEmmanuel Vadot events: 40354d7675SEmmanuel Vadot type: object 41354d7675SEmmanuel Vadot 42354d7675SEmmanuel Vadot patternProperties: 43354d7675SEmmanuel Vadot '^ppmu-event[0-9]+(-[a-z0-9]+){,2}$': 44354d7675SEmmanuel Vadot type: object 45354d7675SEmmanuel Vadot properties: 46354d7675SEmmanuel Vadot event-name: 47354d7675SEmmanuel Vadot description: | 48354d7675SEmmanuel Vadot The unique event name among PPMU device 49354d7675SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/string 50354d7675SEmmanuel Vadot 51354d7675SEmmanuel Vadot event-data-type: 52354d7675SEmmanuel Vadot description: | 53354d7675SEmmanuel Vadot Define the type of data which shell be counted by the counter. 54354d7675SEmmanuel Vadot You can check include/dt-bindings/pmu/exynos_ppmu.h for all 55354d7675SEmmanuel Vadot possible type, i.e. count read requests, count write data in 56354d7675SEmmanuel Vadot bytes, etc. This field is optional and when it is missing, the 57354d7675SEmmanuel Vadot driver code will use default data type. 58354d7675SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 59354d7675SEmmanuel Vadot 60354d7675SEmmanuel Vadot required: 61354d7675SEmmanuel Vadot - event-name 62354d7675SEmmanuel Vadot 63354d7675SEmmanuel Vadot additionalProperties: false 64354d7675SEmmanuel Vadot 65354d7675SEmmanuel Vadot additionalProperties: false 66354d7675SEmmanuel Vadot 67354d7675SEmmanuel Vadotrequired: 68354d7675SEmmanuel Vadot - compatible 69354d7675SEmmanuel Vadot - reg 70354d7675SEmmanuel Vadot 71354d7675SEmmanuel VadotadditionalProperties: false 72354d7675SEmmanuel Vadot 73354d7675SEmmanuel Vadotexamples: 74354d7675SEmmanuel Vadot - | 75354d7675SEmmanuel Vadot // PPMUv1 nodes for Exynos3250 (although the board DTS defines events) 76354d7675SEmmanuel Vadot #include <dt-bindings/clock/exynos3250.h> 77354d7675SEmmanuel Vadot 78354d7675SEmmanuel Vadot ppmu_dmc0: ppmu@106a0000 { 79354d7675SEmmanuel Vadot compatible = "samsung,exynos-ppmu"; 80354d7675SEmmanuel Vadot reg = <0x106a0000 0x2000>; 81354d7675SEmmanuel Vadot 82354d7675SEmmanuel Vadot events { 83354d7675SEmmanuel Vadot ppmu_dmc0_3: ppmu-event3-dmc0 { 84354d7675SEmmanuel Vadot event-name = "ppmu-event3-dmc0"; 85354d7675SEmmanuel Vadot }; 86354d7675SEmmanuel Vadot 87354d7675SEmmanuel Vadot ppmu_dmc0_2: ppmu-event2-dmc0 { 88354d7675SEmmanuel Vadot event-name = "ppmu-event2-dmc0"; 89354d7675SEmmanuel Vadot }; 90354d7675SEmmanuel Vadot 91354d7675SEmmanuel Vadot ppmu_dmc0_1: ppmu-event1-dmc0 { 92354d7675SEmmanuel Vadot event-name = "ppmu-event1-dmc0"; 93354d7675SEmmanuel Vadot }; 94354d7675SEmmanuel Vadot 95354d7675SEmmanuel Vadot ppmu_dmc0_0: ppmu-event0-dmc0 { 96354d7675SEmmanuel Vadot event-name = "ppmu-event0-dmc0"; 97354d7675SEmmanuel Vadot }; 98354d7675SEmmanuel Vadot }; 99354d7675SEmmanuel Vadot }; 100354d7675SEmmanuel Vadot 101354d7675SEmmanuel Vadot ppmu_rightbus: ppmu@112a0000 { 102354d7675SEmmanuel Vadot compatible = "samsung,exynos-ppmu"; 103354d7675SEmmanuel Vadot reg = <0x112a0000 0x2000>; 104354d7675SEmmanuel Vadot clocks = <&cmu CLK_PPMURIGHT>; 105354d7675SEmmanuel Vadot clock-names = "ppmu"; 106354d7675SEmmanuel Vadot 107354d7675SEmmanuel Vadot events { 108354d7675SEmmanuel Vadot ppmu_rightbus_3: ppmu-event3-rightbus { 109354d7675SEmmanuel Vadot event-name = "ppmu-event3-rightbus"; 110354d7675SEmmanuel Vadot }; 111354d7675SEmmanuel Vadot }; 112354d7675SEmmanuel Vadot }; 113354d7675SEmmanuel Vadot 114354d7675SEmmanuel Vadot - | 115354d7675SEmmanuel Vadot // PPMUv2 nodes in Exynos5433 116354d7675SEmmanuel Vadot ppmu_d0_cpu: ppmu@10480000 { 117354d7675SEmmanuel Vadot compatible = "samsung,exynos-ppmu-v2"; 118354d7675SEmmanuel Vadot reg = <0x10480000 0x2000>; 119354d7675SEmmanuel Vadot }; 120354d7675SEmmanuel Vadot 121354d7675SEmmanuel Vadot ppmu_d0_general: ppmu@10490000 { 122354d7675SEmmanuel Vadot compatible = "samsung,exynos-ppmu-v2"; 123354d7675SEmmanuel Vadot reg = <0x10490000 0x2000>; 124354d7675SEmmanuel Vadot 125354d7675SEmmanuel Vadot events { 126354d7675SEmmanuel Vadot ppmu_event0_d0_general: ppmu-event0-d0-general { 127354d7675SEmmanuel Vadot event-name = "ppmu-event0-d0-general"; 128354d7675SEmmanuel Vadot }; 129354d7675SEmmanuel Vadot }; 130354d7675SEmmanuel Vadot }; 131354d7675SEmmanuel Vadot 132354d7675SEmmanuel Vadot ppmu_d0_rt: ppmu@104a0000 { 133354d7675SEmmanuel Vadot compatible = "samsung,exynos-ppmu-v2"; 134354d7675SEmmanuel Vadot reg = <0x104a0000 0x2000>; 135354d7675SEmmanuel Vadot }; 136354d7675SEmmanuel Vadot 137354d7675SEmmanuel Vadot ppmu_d1_cpu: ppmu@104b0000 { 138354d7675SEmmanuel Vadot compatible = "samsung,exynos-ppmu-v2"; 139354d7675SEmmanuel Vadot reg = <0x104b0000 0x2000>; 140354d7675SEmmanuel Vadot }; 141354d7675SEmmanuel Vadot 142354d7675SEmmanuel Vadot ppmu_d1_general: ppmu@104c0000 { 143354d7675SEmmanuel Vadot compatible = "samsung,exynos-ppmu-v2"; 144354d7675SEmmanuel Vadot reg = <0x104c0000 0x2000>; 145354d7675SEmmanuel Vadot }; 146354d7675SEmmanuel Vadot 147354d7675SEmmanuel Vadot ppmu_d1_rt: ppmu@104d0000 { 148354d7675SEmmanuel Vadot compatible = "samsung,exynos-ppmu-v2"; 149354d7675SEmmanuel Vadot reg = <0x104d0000 0x2000>; 150354d7675SEmmanuel Vadot }; 151354d7675SEmmanuel Vadot 152354d7675SEmmanuel Vadot - | 153354d7675SEmmanuel Vadot // PPMUv1 nodes with event-data-type for Exynos4412 154354d7675SEmmanuel Vadot #include <dt-bindings/pmu/exynos_ppmu.h> 155354d7675SEmmanuel Vadot 156354d7675SEmmanuel Vadot ppmu@106a0000 { 157354d7675SEmmanuel Vadot compatible = "samsung,exynos-ppmu"; 158354d7675SEmmanuel Vadot reg = <0x106a0000 0x2000>; 159354d7675SEmmanuel Vadot clocks = <&clock 400>; 160354d7675SEmmanuel Vadot clock-names = "ppmu"; 161354d7675SEmmanuel Vadot 162354d7675SEmmanuel Vadot events { 163354d7675SEmmanuel Vadot ppmu-event3-dmc0 { 164354d7675SEmmanuel Vadot event-name = "ppmu-event3-dmc0"; 165354d7675SEmmanuel Vadot event-data-type = <(PPMU_RO_DATA_CNT | 166354d7675SEmmanuel Vadot PPMU_WO_DATA_CNT)>; 167354d7675SEmmanuel Vadot }; 168354d7675SEmmanuel Vadot }; 169354d7675SEmmanuel Vadot }; 170