1*4882a593SmuzhiyunPincontrol driver for MAX77620 Power management IC from Maxim Semiconductor. 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunDevice has 8 GPIO pins which can be configured as GPIO as well as the 4*4882a593Smuzhiyunspecial IO functions. 5*4882a593Smuzhiyun 6*4882a593SmuzhiyunPlease refer file <devicetree/bindings/pinctrl/pinctrl-bindings.txt> 7*4882a593Smuzhiyunfor details of the common pinctrl bindings used by client devices, 8*4882a593Smuzhiyunincluding the meaning of the phrase "pin configuration node". 9*4882a593Smuzhiyun 10*4882a593SmuzhiyunOptional Pinmux properties: 11*4882a593Smuzhiyun-------------------------- 12*4882a593SmuzhiyunFollowing properties are required if default setting of pins are required 13*4882a593Smuzhiyunat boot. 14*4882a593Smuzhiyun- pinctrl-names: A pinctrl state named per <pinctrl-bindings.txt>. 15*4882a593Smuzhiyun- pinctrl[0...n]: Properties to contain the phandle for pinctrl states per 16*4882a593Smuzhiyun <pinctrl-bindings.txt>. 17*4882a593Smuzhiyun 18*4882a593SmuzhiyunThe pin configurations are defined as child of the pinctrl states node. Each 19*4882a593Smuzhiyunsub-node have following properties: 20*4882a593Smuzhiyun 21*4882a593SmuzhiyunRequired properties: 22*4882a593Smuzhiyun------------------ 23*4882a593Smuzhiyun- pins: List of pins. Valid values of pins properties are: 24*4882a593Smuzhiyun gpio0, gpio1, gpio2, gpio3, gpio4, gpio5, gpio6, gpio7. 25*4882a593Smuzhiyun 26*4882a593SmuzhiyunOptional properties: 27*4882a593Smuzhiyun------------------- 28*4882a593SmuzhiyunFollowing are optional properties defined as pinmux DT binding document 29*4882a593Smuzhiyun<pinctrl-bindings.txt>. Absence of properties will leave the configuration 30*4882a593Smuzhiyunon default. 31*4882a593Smuzhiyun function, 32*4882a593Smuzhiyun drive-push-pull, 33*4882a593Smuzhiyun drive-open-drain, 34*4882a593Smuzhiyun bias-pull-up, 35*4882a593Smuzhiyun bias-pull-down. 36*4882a593Smuzhiyun 37*4882a593SmuzhiyunValid values for function properties are: 38*4882a593Smuzhiyun gpio, lpm-control-in, fps-out, 32k-out, sd0-dvs-in, sd1-dvs-in, 39*4882a593Smuzhiyun reference-out 40*4882a593Smuzhiyun 41*4882a593SmuzhiyunTheres is also customised properties for the GPIO1, GPIO2 and GPIO3. These 42*4882a593Smuzhiyuncustomised properties are required to configure FPS configuration parameters 43*4882a593Smuzhiyunof these GPIOs. Please refer <devicetree/bindings/mfd/max77620.txt> for more 44*4882a593Smuzhiyundetail of Flexible Power Sequence (FPS). 45*4882a593Smuzhiyun 46*4882a593Smuzhiyun- maxim,active-fps-source: FPS source for the GPIOs to get 47*4882a593Smuzhiyun enabled/disabled when system is in 48*4882a593Smuzhiyun active state. Valid values are: 49*4882a593Smuzhiyun - MAX77620_FPS_SRC_0, 50*4882a593Smuzhiyun FPS source is FPS0. 51*4882a593Smuzhiyun - MAX77620_FPS_SRC_1, 52*4882a593Smuzhiyun FPS source is FPS1 53*4882a593Smuzhiyun - MAX77620_FPS_SRC_2 and 54*4882a593Smuzhiyun FPS source is FPS2 55*4882a593Smuzhiyun - MAX77620_FPS_SRC_NONE. 56*4882a593Smuzhiyun GPIO is not controlled 57*4882a593Smuzhiyun by FPS events and it gets 58*4882a593Smuzhiyun enabled/disabled by register 59*4882a593Smuzhiyun access. 60*4882a593Smuzhiyun Absence of this property will leave 61*4882a593Smuzhiyun the FPS configuration register for that 62*4882a593Smuzhiyun GPIO to default configuration. 63*4882a593Smuzhiyun 64*4882a593Smuzhiyun- maxim,active-fps-power-up-slot: Sequencing event slot number on which 65*4882a593Smuzhiyun the GPIO get enabled when 66*4882a593Smuzhiyun master FPS input event set to HIGH. 67*4882a593Smuzhiyun Valid values are 0 to 7. 68*4882a593Smuzhiyun This is applicable if FPS source is 69*4882a593Smuzhiyun selected as FPS0, FPS1 or FPS2. 70*4882a593Smuzhiyun 71*4882a593Smuzhiyun- maxim,active-fps-power-down-slot: Sequencing event slot number on which 72*4882a593Smuzhiyun the GPIO get disabled when master 73*4882a593Smuzhiyun FPS input event set to LOW. 74*4882a593Smuzhiyun Valid values are 0 to 7. 75*4882a593Smuzhiyun This is applicable if FPS source is 76*4882a593Smuzhiyun selected as FPS0, FPS1 or FPS2. 77*4882a593Smuzhiyun 78*4882a593Smuzhiyun- maxim,suspend-fps-source: This is same as property 79*4882a593Smuzhiyun "maxim,active-fps-source" but value 80*4882a593Smuzhiyun get configured when system enters in 81*4882a593Smuzhiyun to suspend state. 82*4882a593Smuzhiyun 83*4882a593Smuzhiyun- maxim,suspend-fps-power-up-slot: This is same as property 84*4882a593Smuzhiyun "maxim,active-fps-power-up-slot" but 85*4882a593Smuzhiyun this value get configured into FPS 86*4882a593Smuzhiyun configuration register when system 87*4882a593Smuzhiyun enters into suspend. 88*4882a593Smuzhiyun This is applicable if suspend state 89*4882a593Smuzhiyun FPS source is selected as FPS0, FPS1 or 90*4882a593Smuzhiyun 91*4882a593Smuzhiyun- maxim,suspend-fps-power-down-slot: This is same as property 92*4882a593Smuzhiyun "maxim,active-fps-power-down-slot" but 93*4882a593Smuzhiyun this value get configured into FPS 94*4882a593Smuzhiyun configuration register when system 95*4882a593Smuzhiyun enters into suspend. 96*4882a593Smuzhiyun This is applicable if suspend state 97*4882a593Smuzhiyun FPS source is selected as FPS0, FPS1 or 98*4882a593Smuzhiyun FPS2. 99*4882a593Smuzhiyun 100*4882a593SmuzhiyunExample: 101*4882a593Smuzhiyun-------- 102*4882a593Smuzhiyun#include <dt-bindings/mfd/max77620.h> 103*4882a593Smuzhiyun... 104*4882a593Smuzhiyunmax77620@3c { 105*4882a593Smuzhiyun 106*4882a593Smuzhiyun pinctrl-names = "default"; 107*4882a593Smuzhiyun pinctrl-0 = <&spmic_default>; 108*4882a593Smuzhiyun 109*4882a593Smuzhiyun spmic_default: pinmux@0 { 110*4882a593Smuzhiyun pin_gpio0 { 111*4882a593Smuzhiyun pins = "gpio0"; 112*4882a593Smuzhiyun function = "gpio"; 113*4882a593Smuzhiyun }; 114*4882a593Smuzhiyun 115*4882a593Smuzhiyun pin_gpio1 { 116*4882a593Smuzhiyun pins = "gpio1"; 117*4882a593Smuzhiyun function = "fps-out"; 118*4882a593Smuzhiyun maxim,active-fps-source = <MAX77620_FPS_SRC_0>; 119*4882a593Smuzhiyun }; 120*4882a593Smuzhiyun 121*4882a593Smuzhiyun pin_gpio2 { 122*4882a593Smuzhiyun pins = "gpio2"; 123*4882a593Smuzhiyun function = "fps-out"; 124*4882a593Smuzhiyun maxim,active-fps-source = <MAX77620_FPS_SRC_1>; 125*4882a593Smuzhiyun }; 126*4882a593Smuzhiyun }; 127*4882a593Smuzhiyun}; 128