xref: /openbmc/linux/Documentation/devicetree/bindings/pinctrl/pinctrl-max77620.txt (revision c900529f3d9161bfde5cca0754f83b4d3c3e0220)
17916c0c3SLaxman DewanganPincontrol driver for MAX77620 Power management IC from Maxim Semiconductor.
27916c0c3SLaxman Dewangan
37916c0c3SLaxman DewanganDevice has 8 GPIO pins which can be configured as GPIO as well as the
47916c0c3SLaxman Dewanganspecial IO functions.
57916c0c3SLaxman Dewangan
67916c0c3SLaxman DewanganPlease refer file <devicetree/bindings/pinctrl/pinctrl-bindings.txt>
77916c0c3SLaxman Dewanganfor details of the common pinctrl bindings used by client devices,
87916c0c3SLaxman Dewanganincluding the meaning of the phrase "pin configuration node".
97916c0c3SLaxman Dewangan
107916c0c3SLaxman DewanganOptional Pinmux properties:
117916c0c3SLaxman Dewangan--------------------------
127916c0c3SLaxman DewanganFollowing properties are required if default setting of pins are required
137916c0c3SLaxman Dewanganat boot.
1418ba1f98SMauro Carvalho Chehab- pinctrl-names: A pinctrl state named per <pinctrl-bindings.txt>.
157916c0c3SLaxman Dewangan- pinctrl[0...n]: Properties to contain the phandle for pinctrl states per
1618ba1f98SMauro Carvalho Chehab		<pinctrl-bindings.txt>.
177916c0c3SLaxman Dewangan
187916c0c3SLaxman DewanganThe pin configurations are defined as child of the pinctrl states node. Each
197916c0c3SLaxman Dewangansub-node have following properties:
207916c0c3SLaxman Dewangan
217916c0c3SLaxman DewanganRequired properties:
227916c0c3SLaxman Dewangan------------------
237916c0c3SLaxman Dewangan- pins: List of pins. Valid values of pins properties are:
247916c0c3SLaxman Dewangan		      gpio0, gpio1, gpio2, gpio3, gpio4, gpio5, gpio6, gpio7.
257916c0c3SLaxman Dewangan
267916c0c3SLaxman DewanganOptional properties:
277916c0c3SLaxman Dewangan-------------------
287916c0c3SLaxman DewanganFollowing are optional properties defined as pinmux DT binding document
297916c0c3SLaxman Dewangan<pinctrl-bindings.txt>. Absence of properties will leave the configuration
307916c0c3SLaxman Dewanganon default.
317916c0c3SLaxman Dewangan	function,
327916c0c3SLaxman Dewangan	drive-push-pull,
337916c0c3SLaxman Dewangan	drive-open-drain,
347916c0c3SLaxman Dewangan	bias-pull-up,
357916c0c3SLaxman Dewangan	bias-pull-down.
367916c0c3SLaxman Dewangan
377916c0c3SLaxman DewanganValid values for function properties are:
387916c0c3SLaxman Dewangan	gpio, lpm-control-in, fps-out, 32k-out, sd0-dvs-in, sd1-dvs-in,
397916c0c3SLaxman Dewangan	reference-out
407916c0c3SLaxman Dewangan
41*47aab533SBjorn HelgaasThere are also customised properties for the GPIO1, GPIO2 and GPIO3. These
427916c0c3SLaxman Dewangancustomised properties are required to configure FPS configuration parameters
437916c0c3SLaxman Dewanganof these GPIOs. Please refer <devicetree/bindings/mfd/max77620.txt> for more
447916c0c3SLaxman Dewangandetail of Flexible Power Sequence (FPS).
457916c0c3SLaxman Dewangan
467916c0c3SLaxman Dewangan- maxim,active-fps-source:		FPS source for the GPIOs to get
477916c0c3SLaxman Dewangan					enabled/disabled when system is in
487916c0c3SLaxman Dewangan					active state.  Valid values are:
497916c0c3SLaxman Dewangan					- MAX77620_FPS_SRC_0,
507916c0c3SLaxman Dewangan						FPS source is FPS0.
517916c0c3SLaxman Dewangan					- MAX77620_FPS_SRC_1,
527916c0c3SLaxman Dewangan						FPS source is FPS1
537916c0c3SLaxman Dewangan					- MAX77620_FPS_SRC_2 and
547916c0c3SLaxman Dewangan						FPS source is FPS2
557916c0c3SLaxman Dewangan					- MAX77620_FPS_SRC_NONE.
567916c0c3SLaxman Dewangan						GPIO is not controlled
577916c0c3SLaxman Dewangan						by FPS events and it gets
587916c0c3SLaxman Dewangan						enabled/disabled by register
597916c0c3SLaxman Dewangan						access.
607916c0c3SLaxman Dewangan					Absence of this property will leave
617916c0c3SLaxman Dewangan					the FPS configuration register for that
627916c0c3SLaxman Dewangan					GPIO to default configuration.
637916c0c3SLaxman Dewangan
647916c0c3SLaxman Dewangan- maxim,active-fps-power-up-slot:	Sequencing event slot number on which
657916c0c3SLaxman Dewangan					the GPIO get enabled when
667916c0c3SLaxman Dewangan					master FPS input event set to HIGH.
677916c0c3SLaxman Dewangan					Valid values are 0 to 7.
687916c0c3SLaxman Dewangan					This is applicable if FPS source is
697916c0c3SLaxman Dewangan					selected as FPS0, FPS1 or FPS2.
707916c0c3SLaxman Dewangan
717916c0c3SLaxman Dewangan- maxim,active-fps-power-down-slot:	Sequencing event slot number on which
727916c0c3SLaxman Dewangan					the GPIO get disabled when master
737916c0c3SLaxman Dewangan					FPS input event set to LOW.
747916c0c3SLaxman Dewangan					Valid values are 0 to 7.
757916c0c3SLaxman Dewangan					This is applicable if FPS source is
767916c0c3SLaxman Dewangan					selected as FPS0, FPS1 or FPS2.
777916c0c3SLaxman Dewangan
787916c0c3SLaxman Dewangan- maxim,suspend-fps-source:		This is same as property
797916c0c3SLaxman Dewangan					"maxim,active-fps-source" but value
807916c0c3SLaxman Dewangan					get configured when system enters in
817916c0c3SLaxman Dewangan					to suspend state.
827916c0c3SLaxman Dewangan
837916c0c3SLaxman Dewangan- maxim,suspend-fps-power-up-slot:	This is same as property
847916c0c3SLaxman Dewangan					"maxim,active-fps-power-up-slot" but
857916c0c3SLaxman Dewangan					this value get configured into FPS
867916c0c3SLaxman Dewangan					configuration register when system
877916c0c3SLaxman Dewangan					enters into suspend.
887916c0c3SLaxman Dewangan					This is applicable if suspend state
897916c0c3SLaxman Dewangan					FPS source is selected as FPS0, FPS1 or
907916c0c3SLaxman Dewangan
917916c0c3SLaxman Dewangan- maxim,suspend-fps-power-down-slot:	This is same as property
927916c0c3SLaxman Dewangan					"maxim,active-fps-power-down-slot" but
937916c0c3SLaxman Dewangan					this value get configured into FPS
947916c0c3SLaxman Dewangan					configuration register when system
957916c0c3SLaxman Dewangan					enters into suspend.
967916c0c3SLaxman Dewangan					This is applicable if suspend state
977916c0c3SLaxman Dewangan					FPS source is selected as FPS0, FPS1 or
987916c0c3SLaxman Dewangan					FPS2.
997916c0c3SLaxman Dewangan
1007916c0c3SLaxman DewanganExample:
1017916c0c3SLaxman Dewangan--------
1027916c0c3SLaxman Dewangan#include <dt-bindings/mfd/max77620.h>
1037916c0c3SLaxman Dewangan...
1047916c0c3SLaxman Dewanganmax77620@3c {
1057916c0c3SLaxman Dewangan
1067916c0c3SLaxman Dewangan	pinctrl-names = "default";
1077916c0c3SLaxman Dewangan	pinctrl-0 = <&spmic_default>;
1087916c0c3SLaxman Dewangan
1097916c0c3SLaxman Dewangan	spmic_default: pinmux@0 {
1107916c0c3SLaxman Dewangan		pin_gpio0 {
1117916c0c3SLaxman Dewangan			pins = "gpio0";
1127916c0c3SLaxman Dewangan			function = "gpio";
1137916c0c3SLaxman Dewangan		};
1147916c0c3SLaxman Dewangan
1157916c0c3SLaxman Dewangan		pin_gpio1 {
1167916c0c3SLaxman Dewangan			pins = "gpio1";
1177916c0c3SLaxman Dewangan			function = "fps-out";
1187916c0c3SLaxman Dewangan			maxim,active-fps-source = <MAX77620_FPS_SRC_0>;
1197916c0c3SLaxman Dewangan		};
1207916c0c3SLaxman Dewangan
1217916c0c3SLaxman Dewangan		pin_gpio2 {
1227916c0c3SLaxman Dewangan			pins = "gpio2";
1237916c0c3SLaxman Dewangan			function = "fps-out";
1247916c0c3SLaxman Dewangan			maxim,active-fps-source = <MAX77620_FPS_SRC_1>;
1257916c0c3SLaxman Dewangan		};
1267916c0c3SLaxman Dewangan	};
1277916c0c3SLaxman Dewangan};
128