WIP FPC-III support
[linux/fpc-iii.git] / Documentation / devicetree / bindings / mfd / st,stmfx.yaml
blob19e9afb385acb42429959eff845105785218e59c
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/mfd/st,stmfx.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: STMicroelectonics Multi-Function eXpander (STMFX) bindings
9 description: ST Multi-Function eXpander (STMFX) is a slave controller using I2C for
10                communication with the main MCU. Its main features are GPIO expansion,
11                main MCU IDD measurement (IDD is the amount of current that flows
12                through VDD) and resistive touchscreen controller.
14 maintainers:
15   - Amelie Delaunay <amelie.delaunay@st.com>
17 properties:
18   compatible:
19     const: st,stmfx-0300
21   reg:
22     enum: [ 0x42, 0x43 ]
24   interrupts:
25     maxItems: 1
27   drive-open-drain: true
29   vdd-supply: true
31   pinctrl:
32     type: object
34     properties:
35       compatible:
36         const: st,stmfx-0300-pinctrl
38       "#gpio-cells":
39         const: 2
41       "#interrupt-cells":
42         const: 2
44       gpio-controller: true
46       interrupt-controller: true
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: 1
57     patternProperties:
58       "^[a-zA-Z]*-pins$":
59         type: object
61         allOf:
62           - $ref: ../pinctrl/pinmux-node.yaml
64         properties:
65           pins: true
66           bias-disable: true
67           bias-pull-up: true
68           bias-pull-pin-default: true
69           bias-pull-down: true
70           drive-open-drain: true
71           drive-push-pull: true
72           output-high: true
73           output-low: true
75     additionalProperties: false
77     required:
78       - compatible
79       - "#gpio-cells"
80       - "#interrupt-cells"
81       - gpio-controller
82       - interrupt-controller
83       - gpio-ranges
85 additionalProperties: false
87 required:
88   - compatible
89   - reg
90   - interrupts
92 examples:
93   - |
94     #include <dt-bindings/interrupt-controller/arm-gic.h>
95     i2c {
96       #address-cells = <1>;
97       #size-cells = <0>;
98       stmfx@42 {
99         compatible = "st,stmfx-0300";
100         reg = <0x42>;
101         interrupts = <8 IRQ_TYPE_EDGE_RISING>;
102         interrupt-parent = <&gpioi>;
103         vdd-supply = <&v3v3>;
105         stmfx_pinctrl: pinctrl {
106           compatible = "st,stmfx-0300-pinctrl";
107           #gpio-cells = <2>;
108           #interrupt-cells = <2>;
109           gpio-controller;
110           interrupt-controller;
111           gpio-ranges = <&stmfx_pinctrl 0 0 24>;
113           joystick_pins: joystick-pins {
114             pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4";
115             drive-push-pull;
116             bias-pull-up;
117           };
118         };
119       };
120     };