0001 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/mfd/st,stmfx.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: STMicroelectonics Multi-Function eXpander (STMFX) bindings
0008
0009 description: ST Multi-Function eXpander (STMFX) is a slave controller using I2C for
0010 communication with the main MCU. Its main features are GPIO expansion,
0011 main MCU IDD measurement (IDD is the amount of current that flows
0012 through VDD) and resistive touchscreen controller.
0013
0014 maintainers:
0015 - Amelie Delaunay <amelie.delaunay@foss.st.com>
0016
0017 properties:
0018 compatible:
0019 const: st,stmfx-0300
0020
0021 reg:
0022 enum: [ 0x42, 0x43 ]
0023
0024 interrupts:
0025 maxItems: 1
0026
0027 drive-open-drain: true
0028
0029 vdd-supply: true
0030
0031 pinctrl:
0032 type: object
0033
0034 properties:
0035 compatible:
0036 const: st,stmfx-0300-pinctrl
0037
0038 "#gpio-cells":
0039 const: 2
0040
0041 "#interrupt-cells":
0042 const: 2
0043
0044 gpio-controller: true
0045
0046 interrupt-controller: true
0047
0048 gpio-ranges:
0049 description: if all STMFX pins[24:0] are available (no other STMFX function in use),
0050 you should use gpio-ranges = <&stmfx_pinctrl 0 0 24>;
0051 if agpio[3:0] are not available (STMFX Touchscreen function in use),
0052 you should use gpio-ranges = <&stmfx_pinctrl 0 0 16>, <&stmfx_pinctrl 20 20 4>;
0053 if agpio[7:4] are not available (STMFX IDD function in use),
0054 you should use gpio-ranges = <&stmfx_pinctrl 0 0 20>;
0055 maxItems: 1
0056
0057 patternProperties:
0058 "^[a-zA-Z]*-pins$":
0059 type: object
0060
0061 allOf:
0062 - $ref: ../pinctrl/pinmux-node.yaml
0063
0064 properties:
0065 pins: true
0066 bias-disable: true
0067 bias-pull-up: true
0068 bias-pull-pin-default: true
0069 bias-pull-down: true
0070 drive-open-drain: true
0071 drive-push-pull: true
0072 output-high: true
0073 output-low: true
0074
0075 additionalProperties: false
0076
0077 required:
0078 - compatible
0079 - "#gpio-cells"
0080 - "#interrupt-cells"
0081 - gpio-controller
0082 - interrupt-controller
0083 - gpio-ranges
0084
0085 additionalProperties: false
0086
0087 required:
0088 - compatible
0089 - reg
0090 - interrupts
0091
0092 examples:
0093 - |
0094 #include <dt-bindings/interrupt-controller/arm-gic.h>
0095 i2c {
0096 #address-cells = <1>;
0097 #size-cells = <0>;
0098 stmfx@42 {
0099 compatible = "st,stmfx-0300";
0100 reg = <0x42>;
0101 interrupts = <8 IRQ_TYPE_EDGE_RISING>;
0102 interrupt-parent = <&gpioi>;
0103 vdd-supply = <&v3v3>;
0104
0105 stmfx_pinctrl: pinctrl {
0106 compatible = "st,stmfx-0300-pinctrl";
0107 #gpio-cells = <2>;
0108 #interrupt-cells = <2>;
0109 gpio-controller;
0110 interrupt-controller;
0111 gpio-ranges = <&stmfx_pinctrl 0 0 24>;
0112
0113 joystick_pins: joystick-pins {
0114 pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4";
0115 drive-push-pull;
0116 bias-pull-up;
0117 };
0118 };
0119 };
0120 };
0121 ...