162306a36Sopenharmony_ciPincontrol driver for MAX77620 Power management IC from Maxim Semiconductor.
262306a36Sopenharmony_ci
362306a36Sopenharmony_ciDevice has 8 GPIO pins which can be configured as GPIO as well as the
462306a36Sopenharmony_cispecial IO functions.
562306a36Sopenharmony_ci
662306a36Sopenharmony_ciPlease refer file <devicetree/bindings/pinctrl/pinctrl-bindings.txt>
762306a36Sopenharmony_cifor details of the common pinctrl bindings used by client devices,
862306a36Sopenharmony_ciincluding the meaning of the phrase "pin configuration node".
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ciOptional Pinmux properties:
1162306a36Sopenharmony_ci--------------------------
1262306a36Sopenharmony_ciFollowing properties are required if default setting of pins are required
1362306a36Sopenharmony_ciat boot.
1462306a36Sopenharmony_ci- pinctrl-names: A pinctrl state named per <pinctrl-bindings.txt>.
1562306a36Sopenharmony_ci- pinctrl[0...n]: Properties to contain the phandle for pinctrl states per
1662306a36Sopenharmony_ci		<pinctrl-bindings.txt>.
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ciThe pin configurations are defined as child of the pinctrl states node. Each
1962306a36Sopenharmony_cisub-node have following properties:
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ciRequired properties:
2262306a36Sopenharmony_ci------------------
2362306a36Sopenharmony_ci- pins: List of pins. Valid values of pins properties are:
2462306a36Sopenharmony_ci		      gpio0, gpio1, gpio2, gpio3, gpio4, gpio5, gpio6, gpio7.
2562306a36Sopenharmony_ci
2662306a36Sopenharmony_ciOptional properties:
2762306a36Sopenharmony_ci-------------------
2862306a36Sopenharmony_ciFollowing are optional properties defined as pinmux DT binding document
2962306a36Sopenharmony_ci<pinctrl-bindings.txt>. Absence of properties will leave the configuration
3062306a36Sopenharmony_cion default.
3162306a36Sopenharmony_ci	function,
3262306a36Sopenharmony_ci	drive-push-pull,
3362306a36Sopenharmony_ci	drive-open-drain,
3462306a36Sopenharmony_ci	bias-pull-up,
3562306a36Sopenharmony_ci	bias-pull-down.
3662306a36Sopenharmony_ci
3762306a36Sopenharmony_ciValid values for function properties are:
3862306a36Sopenharmony_ci	gpio, lpm-control-in, fps-out, 32k-out, sd0-dvs-in, sd1-dvs-in,
3962306a36Sopenharmony_ci	reference-out
4062306a36Sopenharmony_ci
4162306a36Sopenharmony_ciThere are also customised properties for the GPIO1, GPIO2 and GPIO3. These
4262306a36Sopenharmony_cicustomised properties are required to configure FPS configuration parameters
4362306a36Sopenharmony_ciof these GPIOs. Please refer <devicetree/bindings/mfd/max77620.txt> for more
4462306a36Sopenharmony_cidetail of Flexible Power Sequence (FPS).
4562306a36Sopenharmony_ci
4662306a36Sopenharmony_ci- maxim,active-fps-source:		FPS source for the GPIOs to get
4762306a36Sopenharmony_ci					enabled/disabled when system is in
4862306a36Sopenharmony_ci					active state.  Valid values are:
4962306a36Sopenharmony_ci					- MAX77620_FPS_SRC_0,
5062306a36Sopenharmony_ci						FPS source is FPS0.
5162306a36Sopenharmony_ci					- MAX77620_FPS_SRC_1,
5262306a36Sopenharmony_ci						FPS source is FPS1
5362306a36Sopenharmony_ci					- MAX77620_FPS_SRC_2 and
5462306a36Sopenharmony_ci						FPS source is FPS2
5562306a36Sopenharmony_ci					- MAX77620_FPS_SRC_NONE.
5662306a36Sopenharmony_ci						GPIO is not controlled
5762306a36Sopenharmony_ci						by FPS events and it gets
5862306a36Sopenharmony_ci						enabled/disabled by register
5962306a36Sopenharmony_ci						access.
6062306a36Sopenharmony_ci					Absence of this property will leave
6162306a36Sopenharmony_ci					the FPS configuration register for that
6262306a36Sopenharmony_ci					GPIO to default configuration.
6362306a36Sopenharmony_ci
6462306a36Sopenharmony_ci- maxim,active-fps-power-up-slot:	Sequencing event slot number on which
6562306a36Sopenharmony_ci					the GPIO get enabled when
6662306a36Sopenharmony_ci					master FPS input event set to HIGH.
6762306a36Sopenharmony_ci					Valid values are 0 to 7.
6862306a36Sopenharmony_ci					This is applicable if FPS source is
6962306a36Sopenharmony_ci					selected as FPS0, FPS1 or FPS2.
7062306a36Sopenharmony_ci
7162306a36Sopenharmony_ci- maxim,active-fps-power-down-slot:	Sequencing event slot number on which
7262306a36Sopenharmony_ci					the GPIO get disabled when master
7362306a36Sopenharmony_ci					FPS input event set to LOW.
7462306a36Sopenharmony_ci					Valid values are 0 to 7.
7562306a36Sopenharmony_ci					This is applicable if FPS source is
7662306a36Sopenharmony_ci					selected as FPS0, FPS1 or FPS2.
7762306a36Sopenharmony_ci
7862306a36Sopenharmony_ci- maxim,suspend-fps-source:		This is same as property
7962306a36Sopenharmony_ci					"maxim,active-fps-source" but value
8062306a36Sopenharmony_ci					get configured when system enters in
8162306a36Sopenharmony_ci					to suspend state.
8262306a36Sopenharmony_ci
8362306a36Sopenharmony_ci- maxim,suspend-fps-power-up-slot:	This is same as property
8462306a36Sopenharmony_ci					"maxim,active-fps-power-up-slot" but
8562306a36Sopenharmony_ci					this value get configured into FPS
8662306a36Sopenharmony_ci					configuration register when system
8762306a36Sopenharmony_ci					enters into suspend.
8862306a36Sopenharmony_ci					This is applicable if suspend state
8962306a36Sopenharmony_ci					FPS source is selected as FPS0, FPS1 or
9062306a36Sopenharmony_ci
9162306a36Sopenharmony_ci- maxim,suspend-fps-power-down-slot:	This is same as property
9262306a36Sopenharmony_ci					"maxim,active-fps-power-down-slot" but
9362306a36Sopenharmony_ci					this value get configured into FPS
9462306a36Sopenharmony_ci					configuration register when system
9562306a36Sopenharmony_ci					enters into suspend.
9662306a36Sopenharmony_ci					This is applicable if suspend state
9762306a36Sopenharmony_ci					FPS source is selected as FPS0, FPS1 or
9862306a36Sopenharmony_ci					FPS2.
9962306a36Sopenharmony_ci
10062306a36Sopenharmony_ciExample:
10162306a36Sopenharmony_ci--------
10262306a36Sopenharmony_ci#include <dt-bindings/mfd/max77620.h>
10362306a36Sopenharmony_ci...
10462306a36Sopenharmony_cimax77620@3c {
10562306a36Sopenharmony_ci
10662306a36Sopenharmony_ci	pinctrl-names = "default";
10762306a36Sopenharmony_ci	pinctrl-0 = <&spmic_default>;
10862306a36Sopenharmony_ci
10962306a36Sopenharmony_ci	spmic_default: pinmux@0 {
11062306a36Sopenharmony_ci		pin_gpio0 {
11162306a36Sopenharmony_ci			pins = "gpio0";
11262306a36Sopenharmony_ci			function = "gpio";
11362306a36Sopenharmony_ci		};
11462306a36Sopenharmony_ci
11562306a36Sopenharmony_ci		pin_gpio1 {
11662306a36Sopenharmony_ci			pins = "gpio1";
11762306a36Sopenharmony_ci			function = "fps-out";
11862306a36Sopenharmony_ci			maxim,active-fps-source = <MAX77620_FPS_SRC_0>;
11962306a36Sopenharmony_ci		};
12062306a36Sopenharmony_ci
12162306a36Sopenharmony_ci		pin_gpio2 {
12262306a36Sopenharmony_ci			pins = "gpio2";
12362306a36Sopenharmony_ci			function = "fps-out";
12462306a36Sopenharmony_ci			maxim,active-fps-source = <MAX77620_FPS_SRC_1>;
12562306a36Sopenharmony_ci		};
12662306a36Sopenharmony_ci	};
12762306a36Sopenharmony_ci};
128