1e8da9ed0SBenjamin Gaignard# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2e8da9ed0SBenjamin Gaignard%YAML 1.2 3e8da9ed0SBenjamin Gaignard--- 4e8da9ed0SBenjamin Gaignard$id: http://devicetree.org/schemas/mfd/st,stmfx.yaml# 5e8da9ed0SBenjamin Gaignard$schema: http://devicetree.org/meta-schemas/core.yaml# 6e8da9ed0SBenjamin Gaignard 7*84e85359SKrzysztof Kozlowskititle: STMicroelectonics Multi-Function eXpander (STMFX) 8e8da9ed0SBenjamin Gaignard 9e8da9ed0SBenjamin Gaignarddescription: ST Multi-Function eXpander (STMFX) is a slave controller using I2C for 10e8da9ed0SBenjamin Gaignard communication with the main MCU. Its main features are GPIO expansion, 11e8da9ed0SBenjamin Gaignard main MCU IDD measurement (IDD is the amount of current that flows 12e8da9ed0SBenjamin Gaignard through VDD) and resistive touchscreen controller. 13e8da9ed0SBenjamin Gaignard 14e8da9ed0SBenjamin Gaignardmaintainers: 15f4eedebdSPatrice Chotard - Amelie Delaunay <amelie.delaunay@foss.st.com> 16e8da9ed0SBenjamin Gaignard 17e8da9ed0SBenjamin Gaignardproperties: 18e8da9ed0SBenjamin Gaignard compatible: 19e8da9ed0SBenjamin Gaignard const: st,stmfx-0300 20e8da9ed0SBenjamin Gaignard 21e8da9ed0SBenjamin Gaignard reg: 22e8da9ed0SBenjamin Gaignard enum: [ 0x42, 0x43 ] 23e8da9ed0SBenjamin Gaignard 24e8da9ed0SBenjamin Gaignard interrupts: 25e8da9ed0SBenjamin Gaignard maxItems: 1 26e8da9ed0SBenjamin Gaignard 27e8da9ed0SBenjamin Gaignard drive-open-drain: true 28e8da9ed0SBenjamin Gaignard 299bfaf9c7SRob Herring vdd-supply: true 30e8da9ed0SBenjamin Gaignard 31e8da9ed0SBenjamin Gaignard pinctrl: 32e8da9ed0SBenjamin Gaignard type: object 33e8da9ed0SBenjamin Gaignard 34e8da9ed0SBenjamin Gaignard properties: 35e8da9ed0SBenjamin Gaignard compatible: 36e8da9ed0SBenjamin Gaignard const: st,stmfx-0300-pinctrl 37e8da9ed0SBenjamin Gaignard 38e8da9ed0SBenjamin Gaignard "#gpio-cells": 39e8da9ed0SBenjamin Gaignard const: 2 40e8da9ed0SBenjamin Gaignard 41e8da9ed0SBenjamin Gaignard "#interrupt-cells": 42e8da9ed0SBenjamin Gaignard const: 2 43e8da9ed0SBenjamin Gaignard 44e8da9ed0SBenjamin Gaignard gpio-controller: true 45e8da9ed0SBenjamin Gaignard 46e8da9ed0SBenjamin Gaignard interrupt-controller: true 47e8da9ed0SBenjamin Gaignard 48e8da9ed0SBenjamin Gaignard gpio-ranges: 49e8da9ed0SBenjamin Gaignard description: if all STMFX pins[24:0] are available (no other STMFX function in use), 50e8da9ed0SBenjamin Gaignard you should use gpio-ranges = <&stmfx_pinctrl 0 0 24>; 51e8da9ed0SBenjamin Gaignard if agpio[3:0] are not available (STMFX Touchscreen function in use), 52e8da9ed0SBenjamin Gaignard you should use gpio-ranges = <&stmfx_pinctrl 0 0 16>, <&stmfx_pinctrl 20 20 4>; 53e8da9ed0SBenjamin Gaignard if agpio[7:4] are not available (STMFX IDD function in use), 54e8da9ed0SBenjamin Gaignard you should use gpio-ranges = <&stmfx_pinctrl 0 0 20>; 55e8da9ed0SBenjamin Gaignard maxItems: 1 56e8da9ed0SBenjamin Gaignard 57e8da9ed0SBenjamin Gaignard patternProperties: 58e8da9ed0SBenjamin Gaignard "^[a-zA-Z]*-pins$": 59e8da9ed0SBenjamin Gaignard type: object 6042839dcaSRob Herring additionalProperties: false 61e8da9ed0SBenjamin Gaignard 62e8da9ed0SBenjamin Gaignard allOf: 63e8da9ed0SBenjamin Gaignard - $ref: ../pinctrl/pinmux-node.yaml 64e8da9ed0SBenjamin Gaignard 65e8da9ed0SBenjamin Gaignard properties: 66e8da9ed0SBenjamin Gaignard pins: true 67e8da9ed0SBenjamin Gaignard bias-disable: true 68e8da9ed0SBenjamin Gaignard bias-pull-up: true 69e8da9ed0SBenjamin Gaignard bias-pull-pin-default: true 70e8da9ed0SBenjamin Gaignard bias-pull-down: true 71e8da9ed0SBenjamin Gaignard drive-open-drain: true 72e8da9ed0SBenjamin Gaignard drive-push-pull: true 73e8da9ed0SBenjamin Gaignard output-high: true 74e8da9ed0SBenjamin Gaignard output-low: true 75e8da9ed0SBenjamin Gaignard 76e8da9ed0SBenjamin Gaignard additionalProperties: false 77e8da9ed0SBenjamin Gaignard 78e8da9ed0SBenjamin Gaignard required: 79e8da9ed0SBenjamin Gaignard - compatible 80e8da9ed0SBenjamin Gaignard - "#gpio-cells" 81e8da9ed0SBenjamin Gaignard - "#interrupt-cells" 82e8da9ed0SBenjamin Gaignard - gpio-controller 83e8da9ed0SBenjamin Gaignard - interrupt-controller 84e8da9ed0SBenjamin Gaignard - gpio-ranges 85e8da9ed0SBenjamin Gaignard 86e8da9ed0SBenjamin GaignardadditionalProperties: false 87e8da9ed0SBenjamin Gaignard 88e8da9ed0SBenjamin Gaignardrequired: 89e8da9ed0SBenjamin Gaignard - compatible 90e8da9ed0SBenjamin Gaignard - reg 91e8da9ed0SBenjamin Gaignard - interrupts 92e8da9ed0SBenjamin Gaignard 93e8da9ed0SBenjamin Gaignardexamples: 94e8da9ed0SBenjamin Gaignard - | 95e8da9ed0SBenjamin Gaignard #include <dt-bindings/interrupt-controller/arm-gic.h> 96a3f673d0SFabio Estevam i2c { 97e8da9ed0SBenjamin Gaignard #address-cells = <1>; 98e8da9ed0SBenjamin Gaignard #size-cells = <0>; 99e8da9ed0SBenjamin Gaignard stmfx@42 { 100e8da9ed0SBenjamin Gaignard compatible = "st,stmfx-0300"; 101e8da9ed0SBenjamin Gaignard reg = <0x42>; 102e8da9ed0SBenjamin Gaignard interrupts = <8 IRQ_TYPE_EDGE_RISING>; 103e8da9ed0SBenjamin Gaignard interrupt-parent = <&gpioi>; 104e8da9ed0SBenjamin Gaignard vdd-supply = <&v3v3>; 105e8da9ed0SBenjamin Gaignard 106e8da9ed0SBenjamin Gaignard stmfx_pinctrl: pinctrl { 107e8da9ed0SBenjamin Gaignard compatible = "st,stmfx-0300-pinctrl"; 108e8da9ed0SBenjamin Gaignard #gpio-cells = <2>; 109e8da9ed0SBenjamin Gaignard #interrupt-cells = <2>; 110e8da9ed0SBenjamin Gaignard gpio-controller; 111e8da9ed0SBenjamin Gaignard interrupt-controller; 112e8da9ed0SBenjamin Gaignard gpio-ranges = <&stmfx_pinctrl 0 0 24>; 113e8da9ed0SBenjamin Gaignard 114e8da9ed0SBenjamin Gaignard joystick_pins: joystick-pins { 115e8da9ed0SBenjamin Gaignard pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4"; 116e8da9ed0SBenjamin Gaignard drive-push-pull; 117e8da9ed0SBenjamin Gaignard bias-pull-up; 118e8da9ed0SBenjamin Gaignard }; 119e8da9ed0SBenjamin Gaignard }; 120e8da9ed0SBenjamin Gaignard }; 121e8da9ed0SBenjamin Gaignard }; 122e8da9ed0SBenjamin Gaignard... 123