brintos

brintos / linux-shallow public Read only

0
0
Text · 3.0 KiB · 61daf36 Raw
123 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/mfd/st,stmfx.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: STMicroelectonics Multi-Function eXpander (STMFX)8 9description: ST Multi-Function eXpander (STMFX) is a slave controller using I2C for10               communication with the main MCU. Its main features are GPIO expansion,11               main MCU IDD measurement (IDD is the amount of current that flows12               through VDD) and resistive touchscreen controller.13 14maintainers:15  - Amelie Delaunay <amelie.delaunay@foss.st.com>16 17properties:18  compatible:19    const: st,stmfx-030020 21  reg:22    enum: [ 0x42, 0x43 ]23 24  interrupts:25    maxItems: 126 27  drive-open-drain: true28 29  vdd-supply: true30 31  pinctrl:32    type: object33 34    properties:35      compatible:36        const: st,stmfx-0300-pinctrl37 38      "#gpio-cells":39        const: 240 41      "#interrupt-cells":42        const: 243 44      gpio-controller: true45 46      interrupt-controller: true47 48      gpio-ranges:49        description: if all STMFX pins[24:0] are available (no other STMFX function in use),50                     you should use gpio-ranges = <&stmfx_pinctrl 0 0 24>;51                     if agpio[3:0] are not available (STMFX Touchscreen function in use),52                     you should use gpio-ranges = <&stmfx_pinctrl 0 0 16>, <&stmfx_pinctrl 20 20 4>;53                     if agpio[7:4] are not available (STMFX IDD function in use),54                     you should use gpio-ranges = <&stmfx_pinctrl 0 0 20>;55        maxItems: 156 57    patternProperties:58      "^[a-zA-Z]*-pins$":59        type: object60        additionalProperties: false61 62        allOf:63          - $ref: /schemas/pinctrl/pinmux-node.yaml64 65        properties:66          pins: true67          bias-disable: true68          bias-pull-up: true69          bias-pull-pin-default: true70          bias-pull-down: true71          drive-open-drain: true72          drive-push-pull: true73          output-high: true74          output-low: true75 76    additionalProperties: false77 78    required:79      - compatible80      - "#gpio-cells"81      - "#interrupt-cells"82      - gpio-controller83      - interrupt-controller84      - gpio-ranges85 86additionalProperties: false87 88required:89  - compatible90  - reg91  - interrupts92 93examples:94  - |95    #include <dt-bindings/interrupt-controller/arm-gic.h>96    i2c {97      #address-cells = <1>;98      #size-cells = <0>;99      stmfx@42 {100        compatible = "st,stmfx-0300";101        reg = <0x42>;102        interrupts = <8 IRQ_TYPE_EDGE_RISING>;103        interrupt-parent = <&gpioi>;104        vdd-supply = <&v3v3>;105 106        stmfx_pinctrl: pinctrl {107          compatible = "st,stmfx-0300-pinctrl";108          #gpio-cells = <2>;109          #interrupt-cells = <2>;110          gpio-controller;111          interrupt-controller;112          gpio-ranges = <&stmfx_pinctrl 0 0 24>;113 114          joystick_pins: joystick-pins {115            pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4";116            drive-push-pull;117            bias-pull-up;118          };119        };120      };121    };122...123