Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/mfd/kontron,sl28cpld.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Kontron's sl28cpld board management controller
0008 
0009 maintainers:
0010   - Michael Walle <michael@walle.cc>
0011 
0012 description: |
0013   The board management controller may contain different IP blocks like
0014   watchdog, fan monitoring, PWM controller, interrupt controller and a
0015   GPIO controller.
0016 
0017 properties:
0018   compatible:
0019     const: kontron,sl28cpld
0020 
0021   reg:
0022     description:
0023       I2C device address.
0024     maxItems: 1
0025 
0026   "#address-cells":
0027     const: 1
0028 
0029   "#size-cells":
0030     const: 0
0031 
0032   "#interrupt-cells":
0033     const: 2
0034 
0035   interrupts:
0036     maxItems: 1
0037 
0038   interrupt-controller: true
0039 
0040 patternProperties:
0041   "^gpio(@[0-9a-f]+)?$":
0042     $ref: ../gpio/kontron,sl28cpld-gpio.yaml
0043 
0044   "^hwmon(@[0-9a-f]+)?$":
0045     $ref: ../hwmon/kontron,sl28cpld-hwmon.yaml
0046 
0047   "^interrupt-controller(@[0-9a-f]+)?$":
0048     $ref: ../interrupt-controller/kontron,sl28cpld-intc.yaml
0049 
0050   "^pwm(@[0-9a-f]+)?$":
0051     $ref: ../pwm/kontron,sl28cpld-pwm.yaml
0052 
0053   "^watchdog(@[0-9a-f]+)?$":
0054     $ref: ../watchdog/kontron,sl28cpld-wdt.yaml
0055 
0056 required:
0057   - "#address-cells"
0058   - "#size-cells"
0059   - compatible
0060   - reg
0061 
0062 additionalProperties: false
0063 
0064 examples:
0065   - |
0066     #include <dt-bindings/interrupt-controller/irq.h>
0067     i2c {
0068         #address-cells = <1>;
0069         #size-cells = <0>;
0070 
0071         sl28cpld@4a {
0072             compatible = "kontron,sl28cpld";
0073             reg = <0x4a>;
0074             #address-cells = <1>;
0075             #size-cells = <0>;
0076 
0077             watchdog@4 {
0078                 compatible = "kontron,sl28cpld-wdt";
0079                 reg = <0x4>;
0080                 kontron,assert-wdt-timeout-pin;
0081             };
0082 
0083             hwmon@b {
0084                 compatible = "kontron,sl28cpld-fan";
0085                 reg = <0xb>;
0086             };
0087 
0088             pwm@c {
0089                 compatible = "kontron,sl28cpld-pwm";
0090                 reg = <0xc>;
0091                 #pwm-cells = <2>;
0092             };
0093 
0094             pwm@e {
0095                 compatible = "kontron,sl28cpld-pwm";
0096                 reg = <0xe>;
0097                 #pwm-cells = <2>;
0098             };
0099 
0100             gpio@10 {
0101                 compatible = "kontron,sl28cpld-gpio";
0102                 reg = <0x10>;
0103                 interrupts-extended = <&gpio2 6
0104                                IRQ_TYPE_EDGE_FALLING>;
0105 
0106                 gpio-controller;
0107                 #gpio-cells = <2>;
0108                 gpio-line-names = "a", "b", "c";
0109 
0110                 interrupt-controller;
0111                 #interrupt-cells = <2>;
0112             };
0113 
0114             gpio@15 {
0115                 compatible = "kontron,sl28cpld-gpio";
0116                 reg = <0x15>;
0117                 interrupts-extended = <&gpio2 6
0118                                IRQ_TYPE_EDGE_FALLING>;
0119 
0120                 gpio-controller;
0121                 #gpio-cells = <2>;
0122 
0123                 interrupt-controller;
0124                 #interrupt-cells = <2>;
0125             };
0126 
0127             gpio@1a {
0128                 compatible = "kontron,sl28cpld-gpo";
0129                 reg = <0x1a>;
0130 
0131                 gpio-controller;
0132                 #gpio-cells = <2>;
0133             };
0134 
0135             gpio@1b {
0136                 compatible = "kontron,sl28cpld-gpi";
0137                 reg = <0x1b>;
0138 
0139                 gpio-controller;
0140                 #gpio-cells = <2>;
0141             };
0142 
0143             interrupt-controller@1c {
0144                 compatible = "kontron,sl28cpld-intc";
0145                 reg = <0x1c>;
0146                 interrupts-extended = <&gpio2 6
0147                                IRQ_TYPE_EDGE_FALLING>;
0148 
0149                 interrupt-controller;
0150                 #interrupt-cells = <2>;
0151             };
0152         };
0153     };