1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0 2c66ec88fSEmmanuel Vadot%YAML 1.2 3c66ec88fSEmmanuel Vadot--- 4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/timer/samsung,exynos4210-mct.yaml# 5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c66ec88fSEmmanuel Vadot 7c66ec88fSEmmanuel Vadottitle: Samsung Exynos SoC Multi Core Timer (MCT) 8c66ec88fSEmmanuel Vadot 9c66ec88fSEmmanuel Vadotmaintainers: 10c66ec88fSEmmanuel Vadot - Krzysztof Kozlowski <krzk@kernel.org> 11c66ec88fSEmmanuel Vadot 12c66ec88fSEmmanuel Vadotdescription: |+ 13c66ec88fSEmmanuel Vadot The Samsung's Multi Core Timer (MCT) module includes two main blocks, the 14c66ec88fSEmmanuel Vadot global timer and CPU local timers. The global timer is a 64-bit free running 15c66ec88fSEmmanuel Vadot up-counter and can generate 4 interrupts when the counter reaches one of the 16c66ec88fSEmmanuel Vadot four preset counter values. The CPU local timers are 32-bit free running 17c66ec88fSEmmanuel Vadot down-counters and generate an interrupt when the counter expires. There is 18c66ec88fSEmmanuel Vadot one CPU local timer instantiated in MCT for every CPU in the system. 19c66ec88fSEmmanuel Vadot 20c66ec88fSEmmanuel Vadotproperties: 21c66ec88fSEmmanuel Vadot compatible: 22d5b0e70fSEmmanuel Vadot oneOf: 23d5b0e70fSEmmanuel Vadot - enum: 24c66ec88fSEmmanuel Vadot - samsung,exynos4210-mct 25c66ec88fSEmmanuel Vadot - samsung,exynos4412-mct 26d5b0e70fSEmmanuel Vadot - items: 27d5b0e70fSEmmanuel Vadot - enum: 28*7ef62cebSEmmanuel Vadot - axis,artpec8-mct 29d5b0e70fSEmmanuel Vadot - samsung,exynos3250-mct 30d5b0e70fSEmmanuel Vadot - samsung,exynos5250-mct 31d5b0e70fSEmmanuel Vadot - samsung,exynos5260-mct 32d5b0e70fSEmmanuel Vadot - samsung,exynos5420-mct 33d5b0e70fSEmmanuel Vadot - samsung,exynos5433-mct 34d5b0e70fSEmmanuel Vadot - samsung,exynos850-mct 35d5b0e70fSEmmanuel Vadot - tesla,fsd-mct 36d5b0e70fSEmmanuel Vadot - const: samsung,exynos4210-mct 37c66ec88fSEmmanuel Vadot 386be33864SEmmanuel Vadot clocks: 396be33864SEmmanuel Vadot maxItems: 2 406be33864SEmmanuel Vadot 416be33864SEmmanuel Vadot clock-names: 426be33864SEmmanuel Vadot items: 43d5b0e70fSEmmanuel Vadot - const: fin_pll 44d5b0e70fSEmmanuel Vadot - const: mct 456be33864SEmmanuel Vadot 46c66ec88fSEmmanuel Vadot reg: 47c66ec88fSEmmanuel Vadot maxItems: 1 48c66ec88fSEmmanuel Vadot 49*7ef62cebSEmmanuel Vadot samsung,frc-shared: 50*7ef62cebSEmmanuel Vadot type: boolean 51*7ef62cebSEmmanuel Vadot description: | 52*7ef62cebSEmmanuel Vadot Indicates that the hardware requires that this processor share the 53*7ef62cebSEmmanuel Vadot free-running counter with a different (main) processor. 54*7ef62cebSEmmanuel Vadot 55*7ef62cebSEmmanuel Vadot samsung,local-timers: 56*7ef62cebSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 57*7ef62cebSEmmanuel Vadot minItems: 1 58*7ef62cebSEmmanuel Vadot maxItems: 16 59*7ef62cebSEmmanuel Vadot description: | 60*7ef62cebSEmmanuel Vadot List of indices of local timers usable from this processor. 61*7ef62cebSEmmanuel Vadot 62c66ec88fSEmmanuel Vadot interrupts: 63c66ec88fSEmmanuel Vadot description: | 64c66ec88fSEmmanuel Vadot Interrupts should be put in specific order. This is, the local timer 65c66ec88fSEmmanuel Vadot interrupts should be specified after the four global timer interrupts 66c66ec88fSEmmanuel Vadot have been specified: 67c66ec88fSEmmanuel Vadot 0: Global Timer Interrupt 0 68c66ec88fSEmmanuel Vadot 1: Global Timer Interrupt 1 69c66ec88fSEmmanuel Vadot 2: Global Timer Interrupt 2 70c66ec88fSEmmanuel Vadot 3: Global Timer Interrupt 3 71c66ec88fSEmmanuel Vadot 4: Local Timer Interrupt 0 72c66ec88fSEmmanuel Vadot 5: Local Timer Interrupt 1 73c66ec88fSEmmanuel Vadot 6: .. 74c66ec88fSEmmanuel Vadot 7: .. 75c66ec88fSEmmanuel Vadot i: Local Timer Interrupt n 76c66ec88fSEmmanuel Vadot For MCT block that uses a per-processor interrupt for local timers, such 77c66ec88fSEmmanuel Vadot as ones compatible with "samsung,exynos4412-mct", only one local timer 78c66ec88fSEmmanuel Vadot interrupt might be specified, meaning that all local timers use the same 79c66ec88fSEmmanuel Vadot per processor interrupt. 80c66ec88fSEmmanuel Vadot minItems: 5 # 4 Global + 1 local 81c66ec88fSEmmanuel Vadot maxItems: 20 # 4 Global + 16 local 82c66ec88fSEmmanuel Vadot 83c66ec88fSEmmanuel Vadotrequired: 84c66ec88fSEmmanuel Vadot - compatible 856be33864SEmmanuel Vadot - clock-names 866be33864SEmmanuel Vadot - clocks 87c66ec88fSEmmanuel Vadot - interrupts 88c66ec88fSEmmanuel Vadot - reg 89c66ec88fSEmmanuel Vadot 90d5b0e70fSEmmanuel VadotallOf: 91d5b0e70fSEmmanuel Vadot - if: 92*7ef62cebSEmmanuel Vadot not: 93*7ef62cebSEmmanuel Vadot properties: 94*7ef62cebSEmmanuel Vadot compatible: 95*7ef62cebSEmmanuel Vadot contains: 96*7ef62cebSEmmanuel Vadot enum: 97*7ef62cebSEmmanuel Vadot - axis,artpec8-mct 98*7ef62cebSEmmanuel Vadot then: 99*7ef62cebSEmmanuel Vadot properties: 100*7ef62cebSEmmanuel Vadot samsung,local-timers: false 101*7ef62cebSEmmanuel Vadot samsung,frc-shared: false 102*7ef62cebSEmmanuel Vadot - if: 103d5b0e70fSEmmanuel Vadot properties: 104d5b0e70fSEmmanuel Vadot compatible: 105d5b0e70fSEmmanuel Vadot contains: 106d5b0e70fSEmmanuel Vadot const: samsung,exynos3250-mct 107d5b0e70fSEmmanuel Vadot then: 108d5b0e70fSEmmanuel Vadot properties: 109d5b0e70fSEmmanuel Vadot interrupts: 110d5b0e70fSEmmanuel Vadot minItems: 8 111d5b0e70fSEmmanuel Vadot maxItems: 8 112d5b0e70fSEmmanuel Vadot 113d5b0e70fSEmmanuel Vadot - if: 114d5b0e70fSEmmanuel Vadot properties: 115d5b0e70fSEmmanuel Vadot compatible: 116d5b0e70fSEmmanuel Vadot contains: 117d5b0e70fSEmmanuel Vadot const: samsung,exynos5250-mct 118d5b0e70fSEmmanuel Vadot then: 119d5b0e70fSEmmanuel Vadot properties: 120d5b0e70fSEmmanuel Vadot interrupts: 121d5b0e70fSEmmanuel Vadot minItems: 6 122d5b0e70fSEmmanuel Vadot maxItems: 6 123d5b0e70fSEmmanuel Vadot 124d5b0e70fSEmmanuel Vadot - if: 125d5b0e70fSEmmanuel Vadot properties: 126d5b0e70fSEmmanuel Vadot compatible: 127d5b0e70fSEmmanuel Vadot contains: 128d5b0e70fSEmmanuel Vadot enum: 129*7ef62cebSEmmanuel Vadot - axis,artpec8-mct 130d5b0e70fSEmmanuel Vadot - samsung,exynos5260-mct 131d5b0e70fSEmmanuel Vadot - samsung,exynos5420-mct 132d5b0e70fSEmmanuel Vadot - samsung,exynos5433-mct 133d5b0e70fSEmmanuel Vadot - samsung,exynos850-mct 134d5b0e70fSEmmanuel Vadot then: 135d5b0e70fSEmmanuel Vadot properties: 136d5b0e70fSEmmanuel Vadot interrupts: 137d5b0e70fSEmmanuel Vadot minItems: 12 138d5b0e70fSEmmanuel Vadot maxItems: 12 139d5b0e70fSEmmanuel Vadot 140d5b0e70fSEmmanuel Vadot - if: 141d5b0e70fSEmmanuel Vadot properties: 142d5b0e70fSEmmanuel Vadot compatible: 143d5b0e70fSEmmanuel Vadot contains: 144d5b0e70fSEmmanuel Vadot enum: 145d5b0e70fSEmmanuel Vadot - tesla,fsd-mct 146d5b0e70fSEmmanuel Vadot then: 147d5b0e70fSEmmanuel Vadot properties: 148d5b0e70fSEmmanuel Vadot interrupts: 149d5b0e70fSEmmanuel Vadot minItems: 16 150d5b0e70fSEmmanuel Vadot maxItems: 16 151d5b0e70fSEmmanuel Vadot 152c66ec88fSEmmanuel VadotadditionalProperties: false 153c66ec88fSEmmanuel Vadot 154c66ec88fSEmmanuel Vadotexamples: 155c66ec88fSEmmanuel Vadot - | 156c66ec88fSEmmanuel Vadot // In this example, the IP contains two local timers, using separate 157c66ec88fSEmmanuel Vadot // interrupts, so two local timer interrupts have been specified, 158c66ec88fSEmmanuel Vadot // in addition to four global timer interrupts. 1596be33864SEmmanuel Vadot #include <dt-bindings/clock/exynos4.h> 160c66ec88fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 161c66ec88fSEmmanuel Vadot 162c66ec88fSEmmanuel Vadot timer@10050000 { 163c66ec88fSEmmanuel Vadot compatible = "samsung,exynos4210-mct"; 164c66ec88fSEmmanuel Vadot reg = <0x10050000 0x800>; 1656be33864SEmmanuel Vadot clocks = <&clock CLK_FIN_PLL>, <&clock CLK_MCT>; 1666be33864SEmmanuel Vadot clock-names = "fin_pll", "mct"; 1676be33864SEmmanuel Vadot 168c66ec88fSEmmanuel Vadot interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>, 169c66ec88fSEmmanuel Vadot <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>, 170c66ec88fSEmmanuel Vadot <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>, 171c66ec88fSEmmanuel Vadot <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>, 172c66ec88fSEmmanuel Vadot <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>, 173c66ec88fSEmmanuel Vadot <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>; 174c66ec88fSEmmanuel Vadot }; 175c66ec88fSEmmanuel Vadot 176c66ec88fSEmmanuel Vadot - | 177c66ec88fSEmmanuel Vadot // In this example, the timer interrupts are connected to two separate 178c66ec88fSEmmanuel Vadot // interrupt controllers. Hence, an interrupts-extended is needed. 1796be33864SEmmanuel Vadot #include <dt-bindings/clock/exynos4.h> 180c66ec88fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 181c66ec88fSEmmanuel Vadot 182c66ec88fSEmmanuel Vadot timer@101c0000 { 183c66ec88fSEmmanuel Vadot compatible = "samsung,exynos4210-mct"; 184c66ec88fSEmmanuel Vadot reg = <0x101C0000 0x800>; 1856be33864SEmmanuel Vadot clocks = <&clock CLK_FIN_PLL>, <&clock CLK_MCT>; 1866be33864SEmmanuel Vadot clock-names = "fin_pll", "mct"; 1876be33864SEmmanuel Vadot 188c66ec88fSEmmanuel Vadot interrupts-extended = <&gic GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>, 189c66ec88fSEmmanuel Vadot <&gic GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>, 190c66ec88fSEmmanuel Vadot <&combiner 12 6>, 191c66ec88fSEmmanuel Vadot <&combiner 12 7>, 192c66ec88fSEmmanuel Vadot <&gic GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>, 193c66ec88fSEmmanuel Vadot <&gic GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>; 194c66ec88fSEmmanuel Vadot }; 195c66ec88fSEmmanuel Vadot 196c66ec88fSEmmanuel Vadot - | 197c66ec88fSEmmanuel Vadot // In this example, the IP contains four local timers, but using 198c66ec88fSEmmanuel Vadot // a per-processor interrupt to handle them. Only one first local 199c66ec88fSEmmanuel Vadot // interrupt is specified. 2006be33864SEmmanuel Vadot #include <dt-bindings/clock/exynos4.h> 201c66ec88fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 202c66ec88fSEmmanuel Vadot 203c66ec88fSEmmanuel Vadot timer@10050000 { 204c66ec88fSEmmanuel Vadot compatible = "samsung,exynos4412-mct"; 205c66ec88fSEmmanuel Vadot reg = <0x10050000 0x800>; 2066be33864SEmmanuel Vadot clocks = <&clock CLK_FIN_PLL>, <&clock CLK_MCT>; 2076be33864SEmmanuel Vadot clock-names = "fin_pll", "mct"; 208c66ec88fSEmmanuel Vadot 209c66ec88fSEmmanuel Vadot interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>, 210c66ec88fSEmmanuel Vadot <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>, 211c66ec88fSEmmanuel Vadot <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>, 212c66ec88fSEmmanuel Vadot <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>, 213c66ec88fSEmmanuel Vadot <GIC_PPI 42 IRQ_TYPE_LEVEL_HIGH>; 214c66ec88fSEmmanuel Vadot }; 215c66ec88fSEmmanuel Vadot 216c66ec88fSEmmanuel Vadot - | 217c66ec88fSEmmanuel Vadot // In this example, the IP contains four local timers, but using 218c66ec88fSEmmanuel Vadot // a per-processor interrupt to handle them. All the local timer 219c66ec88fSEmmanuel Vadot // interrupts are specified. 2206be33864SEmmanuel Vadot #include <dt-bindings/clock/exynos4.h> 221c66ec88fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 222c66ec88fSEmmanuel Vadot 223c66ec88fSEmmanuel Vadot timer@10050000 { 224c66ec88fSEmmanuel Vadot compatible = "samsung,exynos4412-mct"; 225c66ec88fSEmmanuel Vadot reg = <0x10050000 0x800>; 2266be33864SEmmanuel Vadot clocks = <&clock CLK_FIN_PLL>, <&clock CLK_MCT>; 2276be33864SEmmanuel Vadot clock-names = "fin_pll", "mct"; 228c66ec88fSEmmanuel Vadot 229c66ec88fSEmmanuel Vadot interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>, 230c66ec88fSEmmanuel Vadot <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>, 231c66ec88fSEmmanuel Vadot <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>, 232c66ec88fSEmmanuel Vadot <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>, 233c66ec88fSEmmanuel Vadot <GIC_PPI 42 IRQ_TYPE_LEVEL_HIGH>, 234c66ec88fSEmmanuel Vadot <GIC_PPI 42 IRQ_TYPE_LEVEL_HIGH>, 235c66ec88fSEmmanuel Vadot <GIC_PPI 42 IRQ_TYPE_LEVEL_HIGH>, 236c66ec88fSEmmanuel Vadot <GIC_PPI 42 IRQ_TYPE_LEVEL_HIGH>; 237c66ec88fSEmmanuel Vadot }; 238