128 lines · plain
1Pincontrol driver for MAX77620 Power management IC from Maxim Semiconductor.2 3Device has 8 GPIO pins which can be configured as GPIO as well as the4special IO functions.5 6Please refer file <devicetree/bindings/pinctrl/pinctrl-bindings.txt>7for details of the common pinctrl bindings used by client devices,8including the meaning of the phrase "pin configuration node".9 10Optional Pinmux properties:11--------------------------12Following properties are required if default setting of pins are required13at boot.14- pinctrl-names: A pinctrl state named per <pinctrl-bindings.txt>.15- pinctrl[0...n]: Properties to contain the phandle for pinctrl states per16 <pinctrl-bindings.txt>.17 18The pin configurations are defined as child of the pinctrl states node. Each19sub-node have following properties:20 21Required properties:22------------------23- pins: List of pins. Valid values of pins properties are:24 gpio0, gpio1, gpio2, gpio3, gpio4, gpio5, gpio6, gpio7.25 26Optional properties:27-------------------28Following are optional properties defined as pinmux DT binding document29<pinctrl-bindings.txt>. Absence of properties will leave the configuration30on default.31 function,32 drive-push-pull,33 drive-open-drain,34 bias-pull-up,35 bias-pull-down.36 37Valid values for function properties are:38 gpio, lpm-control-in, fps-out, 32k-out, sd0-dvs-in, sd1-dvs-in,39 reference-out40 41There are also customised properties for the GPIO1, GPIO2 and GPIO3. These42customised properties are required to configure FPS configuration parameters43of these GPIOs. Please refer <devicetree/bindings/mfd/max77620.txt> for more44detail of Flexible Power Sequence (FPS).45 46- maxim,active-fps-source: FPS source for the GPIOs to get47 enabled/disabled when system is in48 active state. Valid values are:49 - MAX77620_FPS_SRC_0,50 FPS source is FPS0.51 - MAX77620_FPS_SRC_1,52 FPS source is FPS153 - MAX77620_FPS_SRC_2 and54 FPS source is FPS255 - MAX77620_FPS_SRC_NONE.56 GPIO is not controlled57 by FPS events and it gets58 enabled/disabled by register59 access.60 Absence of this property will leave61 the FPS configuration register for that62 GPIO to default configuration.63 64- maxim,active-fps-power-up-slot: Sequencing event slot number on which65 the GPIO get enabled when66 master FPS input event set to HIGH.67 Valid values are 0 to 7.68 This is applicable if FPS source is69 selected as FPS0, FPS1 or FPS2.70 71- maxim,active-fps-power-down-slot: Sequencing event slot number on which72 the GPIO get disabled when master73 FPS input event set to LOW.74 Valid values are 0 to 7.75 This is applicable if FPS source is76 selected as FPS0, FPS1 or FPS2.77 78- maxim,suspend-fps-source: This is same as property79 "maxim,active-fps-source" but value80 get configured when system enters in81 to suspend state.82 83- maxim,suspend-fps-power-up-slot: This is same as property84 "maxim,active-fps-power-up-slot" but85 this value get configured into FPS86 configuration register when system87 enters into suspend.88 This is applicable if suspend state89 FPS source is selected as FPS0, FPS1 or90 91- maxim,suspend-fps-power-down-slot: This is same as property92 "maxim,active-fps-power-down-slot" but93 this value get configured into FPS94 configuration register when system95 enters into suspend.96 This is applicable if suspend state97 FPS source is selected as FPS0, FPS1 or98 FPS2.99 100Example:101--------102#include <dt-bindings/mfd/max77620.h>103...104max77620@3c {105 106 pinctrl-names = "default";107 pinctrl-0 = <&spmic_default>;108 109 spmic_default: pinmux@0 {110 pin_gpio0 {111 pins = "gpio0";112 function = "gpio";113 };114 115 pin_gpio1 {116 pins = "gpio1";117 function = "fps-out";118 maxim,active-fps-source = <MAX77620_FPS_SRC_0>;119 };120 121 pin_gpio2 {122 pins = "gpio2";123 function = "fps-out";124 maxim,active-fps-source = <MAX77620_FPS_SRC_1>;125 };126 };127};128