18c2ecf20Sopenharmony_ciPincontrol driver for MAX77620 Power management IC from Maxim Semiconductor.
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciDevice has 8 GPIO pins which can be configured as GPIO as well as the
48c2ecf20Sopenharmony_cispecial IO functions.
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ciPlease refer file <devicetree/bindings/pinctrl/pinctrl-bindings.txt>
78c2ecf20Sopenharmony_cifor details of the common pinctrl bindings used by client devices,
88c2ecf20Sopenharmony_ciincluding the meaning of the phrase "pin configuration node".
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ciOptional Pinmux properties:
118c2ecf20Sopenharmony_ci--------------------------
128c2ecf20Sopenharmony_ciFollowing properties are required if default setting of pins are required
138c2ecf20Sopenharmony_ciat boot.
148c2ecf20Sopenharmony_ci- pinctrl-names: A pinctrl state named per <pinctrl-bindings.txt>.
158c2ecf20Sopenharmony_ci- pinctrl[0...n]: Properties to contain the phandle for pinctrl states per
168c2ecf20Sopenharmony_ci		<pinctrl-bindings.txt>.
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ciThe pin configurations are defined as child of the pinctrl states node. Each
198c2ecf20Sopenharmony_cisub-node have following properties:
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ciRequired properties:
228c2ecf20Sopenharmony_ci------------------
238c2ecf20Sopenharmony_ci- pins: List of pins. Valid values of pins properties are:
248c2ecf20Sopenharmony_ci		      gpio0, gpio1, gpio2, gpio3, gpio4, gpio5, gpio6, gpio7.
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ciOptional properties:
278c2ecf20Sopenharmony_ci-------------------
288c2ecf20Sopenharmony_ciFollowing are optional properties defined as pinmux DT binding document
298c2ecf20Sopenharmony_ci<pinctrl-bindings.txt>. Absence of properties will leave the configuration
308c2ecf20Sopenharmony_cion default.
318c2ecf20Sopenharmony_ci	function,
328c2ecf20Sopenharmony_ci	drive-push-pull,
338c2ecf20Sopenharmony_ci	drive-open-drain,
348c2ecf20Sopenharmony_ci	bias-pull-up,
358c2ecf20Sopenharmony_ci	bias-pull-down.
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ciValid values for function properties are:
388c2ecf20Sopenharmony_ci	gpio, lpm-control-in, fps-out, 32k-out, sd0-dvs-in, sd1-dvs-in,
398c2ecf20Sopenharmony_ci	reference-out
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ciTheres is also customised properties for the GPIO1, GPIO2 and GPIO3. These
428c2ecf20Sopenharmony_cicustomised properties are required to configure FPS configuration parameters
438c2ecf20Sopenharmony_ciof these GPIOs. Please refer <devicetree/bindings/mfd/max77620.txt> for more
448c2ecf20Sopenharmony_cidetail of Flexible Power Sequence (FPS).
458c2ecf20Sopenharmony_ci
468c2ecf20Sopenharmony_ci- maxim,active-fps-source:		FPS source for the GPIOs to get
478c2ecf20Sopenharmony_ci					enabled/disabled when system is in
488c2ecf20Sopenharmony_ci					active state.  Valid values are:
498c2ecf20Sopenharmony_ci					- MAX77620_FPS_SRC_0,
508c2ecf20Sopenharmony_ci						FPS source is FPS0.
518c2ecf20Sopenharmony_ci					- MAX77620_FPS_SRC_1,
528c2ecf20Sopenharmony_ci						FPS source is FPS1
538c2ecf20Sopenharmony_ci					- MAX77620_FPS_SRC_2 and
548c2ecf20Sopenharmony_ci						FPS source is FPS2
558c2ecf20Sopenharmony_ci					- MAX77620_FPS_SRC_NONE.
568c2ecf20Sopenharmony_ci						GPIO is not controlled
578c2ecf20Sopenharmony_ci						by FPS events and it gets
588c2ecf20Sopenharmony_ci						enabled/disabled by register
598c2ecf20Sopenharmony_ci						access.
608c2ecf20Sopenharmony_ci					Absence of this property will leave
618c2ecf20Sopenharmony_ci					the FPS configuration register for that
628c2ecf20Sopenharmony_ci					GPIO to default configuration.
638c2ecf20Sopenharmony_ci
648c2ecf20Sopenharmony_ci- maxim,active-fps-power-up-slot:	Sequencing event slot number on which
658c2ecf20Sopenharmony_ci					the GPIO get enabled when
668c2ecf20Sopenharmony_ci					master FPS input event set to HIGH.
678c2ecf20Sopenharmony_ci					Valid values are 0 to 7.
688c2ecf20Sopenharmony_ci					This is applicable if FPS source is
698c2ecf20Sopenharmony_ci					selected as FPS0, FPS1 or FPS2.
708c2ecf20Sopenharmony_ci
718c2ecf20Sopenharmony_ci- maxim,active-fps-power-down-slot:	Sequencing event slot number on which
728c2ecf20Sopenharmony_ci					the GPIO get disabled when master
738c2ecf20Sopenharmony_ci					FPS input event set to LOW.
748c2ecf20Sopenharmony_ci					Valid values are 0 to 7.
758c2ecf20Sopenharmony_ci					This is applicable if FPS source is
768c2ecf20Sopenharmony_ci					selected as FPS0, FPS1 or FPS2.
778c2ecf20Sopenharmony_ci
788c2ecf20Sopenharmony_ci- maxim,suspend-fps-source:		This is same as property
798c2ecf20Sopenharmony_ci					"maxim,active-fps-source" but value
808c2ecf20Sopenharmony_ci					get configured when system enters in
818c2ecf20Sopenharmony_ci					to suspend state.
828c2ecf20Sopenharmony_ci
838c2ecf20Sopenharmony_ci- maxim,suspend-fps-power-up-slot:	This is same as property
848c2ecf20Sopenharmony_ci					"maxim,active-fps-power-up-slot" but
858c2ecf20Sopenharmony_ci					this value get configured into FPS
868c2ecf20Sopenharmony_ci					configuration register when system
878c2ecf20Sopenharmony_ci					enters into suspend.
888c2ecf20Sopenharmony_ci					This is applicable if suspend state
898c2ecf20Sopenharmony_ci					FPS source is selected as FPS0, FPS1 or
908c2ecf20Sopenharmony_ci
918c2ecf20Sopenharmony_ci- maxim,suspend-fps-power-down-slot:	This is same as property
928c2ecf20Sopenharmony_ci					"maxim,active-fps-power-down-slot" but
938c2ecf20Sopenharmony_ci					this value get configured into FPS
948c2ecf20Sopenharmony_ci					configuration register when system
958c2ecf20Sopenharmony_ci					enters into suspend.
968c2ecf20Sopenharmony_ci					This is applicable if suspend state
978c2ecf20Sopenharmony_ci					FPS source is selected as FPS0, FPS1 or
988c2ecf20Sopenharmony_ci					FPS2.
998c2ecf20Sopenharmony_ci
1008c2ecf20Sopenharmony_ciExample:
1018c2ecf20Sopenharmony_ci--------
1028c2ecf20Sopenharmony_ci#include <dt-bindings/mfd/max77620.h>
1038c2ecf20Sopenharmony_ci...
1048c2ecf20Sopenharmony_cimax77620@3c {
1058c2ecf20Sopenharmony_ci
1068c2ecf20Sopenharmony_ci	pinctrl-names = "default";
1078c2ecf20Sopenharmony_ci	pinctrl-0 = <&spmic_default>;
1088c2ecf20Sopenharmony_ci
1098c2ecf20Sopenharmony_ci	spmic_default: pinmux@0 {
1108c2ecf20Sopenharmony_ci		pin_gpio0 {
1118c2ecf20Sopenharmony_ci			pins = "gpio0";
1128c2ecf20Sopenharmony_ci			function = "gpio";
1138c2ecf20Sopenharmony_ci		};
1148c2ecf20Sopenharmony_ci
1158c2ecf20Sopenharmony_ci		pin_gpio1 {
1168c2ecf20Sopenharmony_ci			pins = "gpio1";
1178c2ecf20Sopenharmony_ci			function = "fps-out";
1188c2ecf20Sopenharmony_ci			maxim,active-fps-source = <MAX77620_FPS_SRC_0>;
1198c2ecf20Sopenharmony_ci		};
1208c2ecf20Sopenharmony_ci
1218c2ecf20Sopenharmony_ci		pin_gpio2 {
1228c2ecf20Sopenharmony_ci			pins = "gpio2";
1238c2ecf20Sopenharmony_ci			function = "fps-out";
1248c2ecf20Sopenharmony_ci			maxim,active-fps-source = <MAX77620_FPS_SRC_1>;
1258c2ecf20Sopenharmony_ci		};
1268c2ecf20Sopenharmony_ci	};
1278c2ecf20Sopenharmony_ci};
128