Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame^] | 1 | # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 | %YAML 1.2 |
| 3 | --- |
| 4 | $id: http://devicetree.org/schemas/mfd/kontron,sl28cpld.yaml# |
| 5 | $schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 | |
| 7 | title: Kontron's sl28cpld board management controller |
| 8 | |
| 9 | maintainers: |
| 10 | - Michael Walle <michael@walle.cc> |
| 11 | |
| 12 | description: | |
| 13 | The board management controller may contain different IP blocks like |
| 14 | watchdog, fan monitoring, PWM controller, interrupt controller and a |
| 15 | GPIO controller. |
| 16 | |
| 17 | properties: |
| 18 | compatible: |
| 19 | const: kontron,sl28cpld |
| 20 | |
| 21 | reg: |
| 22 | description: |
| 23 | I2C device address. |
| 24 | maxItems: 1 |
| 25 | |
| 26 | "#address-cells": |
| 27 | const: 1 |
| 28 | |
| 29 | "#size-cells": |
| 30 | const: 0 |
| 31 | |
| 32 | "#interrupt-cells": |
| 33 | const: 2 |
| 34 | |
| 35 | interrupts: |
| 36 | maxItems: 1 |
| 37 | |
| 38 | interrupt-controller: true |
| 39 | |
| 40 | patternProperties: |
| 41 | "^gpio(@[0-9a-f]+)?$": |
| 42 | $ref: ../gpio/kontron,sl28cpld-gpio.yaml |
| 43 | |
| 44 | "^hwmon(@[0-9a-f]+)?$": |
| 45 | $ref: ../hwmon/kontron,sl28cpld-hwmon.yaml |
| 46 | |
| 47 | "^interrupt-controller(@[0-9a-f]+)?$": |
| 48 | $ref: ../interrupt-controller/kontron,sl28cpld-intc.yaml |
| 49 | |
| 50 | "^pwm(@[0-9a-f]+)?$": |
| 51 | $ref: ../pwm/kontron,sl28cpld-pwm.yaml |
| 52 | |
| 53 | "^watchdog(@[0-9a-f]+)?$": |
| 54 | $ref: ../watchdog/kontron,sl28cpld-wdt.yaml |
| 55 | |
| 56 | required: |
| 57 | - "#address-cells" |
| 58 | - "#size-cells" |
| 59 | - compatible |
| 60 | - reg |
| 61 | |
| 62 | additionalProperties: false |
| 63 | |
| 64 | examples: |
| 65 | - | |
| 66 | #include <dt-bindings/interrupt-controller/irq.h> |
| 67 | i2c { |
| 68 | #address-cells = <1>; |
| 69 | #size-cells = <0>; |
| 70 | |
| 71 | sl28cpld@4a { |
| 72 | compatible = "kontron,sl28cpld"; |
| 73 | reg = <0x4a>; |
| 74 | #address-cells = <1>; |
| 75 | #size-cells = <0>; |
| 76 | |
| 77 | watchdog@4 { |
| 78 | compatible = "kontron,sl28cpld-wdt"; |
| 79 | reg = <0x4>; |
| 80 | kontron,assert-wdt-timeout-pin; |
| 81 | }; |
| 82 | |
| 83 | hwmon@b { |
| 84 | compatible = "kontron,sl28cpld-fan"; |
| 85 | reg = <0xb>; |
| 86 | }; |
| 87 | |
| 88 | pwm@c { |
| 89 | compatible = "kontron,sl28cpld-pwm"; |
| 90 | reg = <0xc>; |
| 91 | #pwm-cells = <2>; |
| 92 | }; |
| 93 | |
| 94 | pwm@e { |
| 95 | compatible = "kontron,sl28cpld-pwm"; |
| 96 | reg = <0xe>; |
| 97 | #pwm-cells = <2>; |
| 98 | }; |
| 99 | |
| 100 | gpio@10 { |
| 101 | compatible = "kontron,sl28cpld-gpio"; |
| 102 | reg = <0x10>; |
| 103 | interrupts-extended = <&gpio2 6 |
| 104 | IRQ_TYPE_EDGE_FALLING>; |
| 105 | |
| 106 | gpio-controller; |
| 107 | #gpio-cells = <2>; |
| 108 | gpio-line-names = "a", "b", "c"; |
| 109 | |
| 110 | interrupt-controller; |
| 111 | #interrupt-cells = <2>; |
| 112 | }; |
| 113 | |
| 114 | gpio@15 { |
| 115 | compatible = "kontron,sl28cpld-gpio"; |
| 116 | reg = <0x15>; |
| 117 | interrupts-extended = <&gpio2 6 |
| 118 | IRQ_TYPE_EDGE_FALLING>; |
| 119 | |
| 120 | gpio-controller; |
| 121 | #gpio-cells = <2>; |
| 122 | |
| 123 | interrupt-controller; |
| 124 | #interrupt-cells = <2>; |
| 125 | }; |
| 126 | |
| 127 | gpio@1a { |
| 128 | compatible = "kontron,sl28cpld-gpo"; |
| 129 | reg = <0x1a>; |
| 130 | |
| 131 | gpio-controller; |
| 132 | #gpio-cells = <2>; |
| 133 | }; |
| 134 | |
| 135 | gpio@1b { |
| 136 | compatible = "kontron,sl28cpld-gpi"; |
| 137 | reg = <0x1b>; |
| 138 | |
| 139 | gpio-controller; |
| 140 | #gpio-cells = <2>; |
| 141 | }; |
| 142 | |
| 143 | interrupt-controller@1c { |
| 144 | compatible = "kontron,sl28cpld-intc"; |
| 145 | reg = <0x1c>; |
| 146 | interrupts-extended = <&gpio2 6 |
| 147 | IRQ_TYPE_EDGE_FALLING>; |
| 148 | |
| 149 | interrupt-controller; |
| 150 | #interrupt-cells = <2>; |
| 151 | }; |
| 152 | }; |
| 153 | }; |