Krzysztof Kozlowski | 79df4a9 | 2019-09-20 18:21:22 +0200 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0 |
| 2 | %YAML 1.2 |
| 3 | --- |
| 4 | $id: http://devicetree.org/schemas/watchdog/samsung-wdt.yaml# |
| 5 | $schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 | |
| 7 | title: Samsung SoC Watchdog Timer Controller |
| 8 | |
| 9 | maintainers: |
| 10 | - Krzysztof Kozlowski <krzk@kernel.org> |
| 11 | |
| 12 | description: |+ |
| 13 | The Samsung's Watchdog controller is used for resuming system operation |
| 14 | after a preset amount of time during which the WDT reset event has not |
| 15 | occurred. |
| 16 | |
| 17 | properties: |
| 18 | compatible: |
| 19 | enum: |
| 20 | - samsung,s3c2410-wdt # for S3C2410 |
| 21 | - samsung,s3c6410-wdt # for S3C6410, S5PV210 and Exynos4 |
| 22 | - samsung,exynos5250-wdt # for Exynos5250 |
| 23 | - samsung,exynos5420-wdt # for Exynos5420 |
| 24 | - samsung,exynos7-wdt # for Exynos7 |
Sam Protsenko | 0b59583 | 2021-11-21 18:56:37 +0200 | [diff] [blame] | 25 | - samsung,exynos850-wdt # for Exynos850 |
Krzysztof Kozlowski | 79df4a9 | 2019-09-20 18:21:22 +0200 | [diff] [blame] | 26 | |
| 27 | reg: |
| 28 | maxItems: 1 |
| 29 | |
Krzysztof Kozlowski | 6fd6404 | 2019-09-20 18:21:23 +0200 | [diff] [blame] | 30 | clocks: |
Sam Protsenko | 0b59583 | 2021-11-21 18:56:37 +0200 | [diff] [blame] | 31 | minItems: 1 |
| 32 | maxItems: 2 |
Krzysztof Kozlowski | 6fd6404 | 2019-09-20 18:21:23 +0200 | [diff] [blame] | 33 | |
| 34 | clock-names: |
Sam Protsenko | 0b59583 | 2021-11-21 18:56:37 +0200 | [diff] [blame] | 35 | minItems: 1 |
| 36 | maxItems: 2 |
Krzysztof Kozlowski | 6fd6404 | 2019-09-20 18:21:23 +0200 | [diff] [blame] | 37 | |
Krzysztof Kozlowski | 79df4a9 | 2019-09-20 18:21:22 +0200 | [diff] [blame] | 38 | interrupts: |
| 39 | maxItems: 1 |
| 40 | |
Sam Protsenko | 0b59583 | 2021-11-21 18:56:37 +0200 | [diff] [blame] | 41 | samsung,cluster-index: |
| 42 | $ref: /schemas/types.yaml#/definitions/uint32 |
| 43 | description: |
| 44 | Index of CPU cluster on which watchdog is running (in case of Exynos850) |
| 45 | |
Krzysztof Kozlowski | 79df4a9 | 2019-09-20 18:21:22 +0200 | [diff] [blame] | 46 | samsung,syscon-phandle: |
| 47 | $ref: /schemas/types.yaml#/definitions/phandle |
| 48 | description: |
Sam Protsenko | 33950f9 | 2021-11-21 18:56:36 +0200 | [diff] [blame] | 49 | Phandle to the PMU system controller node (in case of Exynos5250, |
Sam Protsenko | 0b59583 | 2021-11-21 18:56:37 +0200 | [diff] [blame] | 50 | Exynos5420, Exynos7 and Exynos850). |
Krzysztof Kozlowski | 79df4a9 | 2019-09-20 18:21:22 +0200 | [diff] [blame] | 51 | |
| 52 | required: |
| 53 | - compatible |
Krzysztof Kozlowski | 6fd6404 | 2019-09-20 18:21:23 +0200 | [diff] [blame] | 54 | - clocks |
| 55 | - clock-names |
Krzysztof Kozlowski | 79df4a9 | 2019-09-20 18:21:22 +0200 | [diff] [blame] | 56 | - interrupts |
| 57 | - reg |
| 58 | |
| 59 | allOf: |
| 60 | - $ref: watchdog.yaml# |
| 61 | - if: |
| 62 | properties: |
| 63 | compatible: |
| 64 | contains: |
| 65 | enum: |
| 66 | - samsung,exynos5250-wdt |
| 67 | - samsung,exynos5420-wdt |
Sam Protsenko | 33950f9 | 2021-11-21 18:56:36 +0200 | [diff] [blame] | 68 | - samsung,exynos7-wdt |
Sam Protsenko | 0b59583 | 2021-11-21 18:56:37 +0200 | [diff] [blame] | 69 | - samsung,exynos850-wdt |
Krzysztof Kozlowski | 79df4a9 | 2019-09-20 18:21:22 +0200 | [diff] [blame] | 70 | then: |
| 71 | required: |
| 72 | - samsung,syscon-phandle |
Sam Protsenko | 0b59583 | 2021-11-21 18:56:37 +0200 | [diff] [blame] | 73 | - if: |
| 74 | properties: |
| 75 | compatible: |
| 76 | contains: |
| 77 | enum: |
| 78 | - samsung,exynos850-wdt |
| 79 | then: |
| 80 | properties: |
| 81 | clocks: |
| 82 | items: |
| 83 | - description: Bus clock, used for register interface |
| 84 | - description: Source clock (driving watchdog counter) |
| 85 | clock-names: |
| 86 | items: |
| 87 | - const: watchdog |
| 88 | - const: watchdog_src |
| 89 | samsung,cluster-index: |
| 90 | enum: [0, 1] |
| 91 | required: |
| 92 | - samsung,cluster-index |
| 93 | else: |
| 94 | properties: |
| 95 | clocks: |
| 96 | items: |
| 97 | - description: Bus clock, which is also a source clock |
| 98 | clock-names: |
| 99 | items: |
| 100 | - const: watchdog |
| 101 | samsung,cluster-index: false |
Krzysztof Kozlowski | 79df4a9 | 2019-09-20 18:21:22 +0200 | [diff] [blame] | 102 | |
Rob Herring | 6fdc6e2 | 2020-10-05 13:38:27 -0500 | [diff] [blame] | 103 | unevaluatedProperties: false |
| 104 | |
Krzysztof Kozlowski | 79df4a9 | 2019-09-20 18:21:22 +0200 | [diff] [blame] | 105 | examples: |
| 106 | - | |
| 107 | watchdog@101d0000 { |
| 108 | compatible = "samsung,exynos5250-wdt"; |
| 109 | reg = <0x101D0000 0x100>; |
| 110 | interrupts = <0 42 0>; |
| 111 | clocks = <&clock 336>; |
| 112 | clock-names = "watchdog"; |
| 113 | samsung,syscon-phandle = <&pmu_syscon>; |
| 114 | }; |