162306a36Sopenharmony_ciPalmas Pincontrol bindings
262306a36Sopenharmony_ci
362306a36Sopenharmony_ciThe pins of Palmas device can be set on different option and provides
462306a36Sopenharmony_cithe configuration for Pull UP/DOWN, open drain etc.
562306a36Sopenharmony_ci
662306a36Sopenharmony_ciRequired properties:
762306a36Sopenharmony_ci- compatible: It must be one of following:
862306a36Sopenharmony_ci  - "ti,palmas-pinctrl" for Palma series of the pincontrol.
962306a36Sopenharmony_ci  - "ti,tps65913-pinctrl" for Palma series device TPS65913.
1062306a36Sopenharmony_ci  - "ti,tps80036-pinctrl" for Palma series device TPS80036.
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_ciPlease refer to pinctrl-bindings.txt in this directory for details of the
1362306a36Sopenharmony_cicommon pinctrl bindings used by client devices, including the meaning of the
1462306a36Sopenharmony_ciphrase "pin configuration node".
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ciPalmas's pin configuration nodes act as a container for an arbitrary number of
1762306a36Sopenharmony_cisubnodes. Each of these subnodes represents some desired configuration for a
1862306a36Sopenharmony_cilist of pins. This configuration can include the mux function to select on
1962306a36Sopenharmony_cithose pin(s), and various pin configuration parameters, such as pull-up,
2062306a36Sopenharmony_ciopen drain.
2162306a36Sopenharmony_ci
2262306a36Sopenharmony_ciThe name of each subnode is not important; all subnodes should be enumerated
2362306a36Sopenharmony_ciand processed purely based on their content.
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ciEach subnode only affects those parameters that are explicitly listed. In
2662306a36Sopenharmony_ciother words, a subnode that lists a mux function but no pin configuration
2762306a36Sopenharmony_ciparameters implies no information about any pin configuration parameters.
2862306a36Sopenharmony_ciSimilarly, a pin subnode that describes a pullup parameter implies no
2962306a36Sopenharmony_ciinformation about e.g. the mux function.
3062306a36Sopenharmony_ci
3162306a36Sopenharmony_ciOptional properties:
3262306a36Sopenharmony_ci- ti,palmas-enable-dvfs1: Enable DVFS1. Configure pins for DVFS1 mode.
3362306a36Sopenharmony_ci	Selection primary or secondary function associated to I2C2_SCL_SCE,
3462306a36Sopenharmony_ci	I2C2_SDA_SDO pin/pad for DVFS1 interface
3562306a36Sopenharmony_ci- ti,palmas-enable-dvfs2: Enable DVFS2. Configure pins for DVFS2 mode.
3662306a36Sopenharmony_ci	Selection primary or secondary function associated to GPADC_START
3762306a36Sopenharmony_ci	and SYSEN2 pin/pad for DVFS2 interface
3862306a36Sopenharmony_ci- ti,palmas-override-powerhold: This is applicable for PMICs for which
3962306a36Sopenharmony_ci	GPIO7 is configured in POWERHOLD mode which has higher priority
4062306a36Sopenharmony_ci	over DEV_ON bit and keeps the PMIC supplies on even after the DEV_ON
4162306a36Sopenharmony_ci	bit is turned off. This property enables driver to over ride the
4262306a36Sopenharmony_ci	POWERHOLD value to GPIO7 so as to turn off the PMIC in power off
4362306a36Sopenharmony_ci	scenarios. So for GPIO7 if ti,palmas-override-powerhold is set
4462306a36Sopenharmony_ci	then the GPIO_7 field should never be muxed to anything else.
4562306a36Sopenharmony_ci	It should be set to POWERHOLD by default and only in case of
4662306a36Sopenharmony_ci	power off scenarios the driver will over ride the mux value.
4762306a36Sopenharmony_ci
4862306a36Sopenharmony_ciThis binding uses the following generic properties as defined in
4962306a36Sopenharmony_cipinctrl-bindings.txt:
5062306a36Sopenharmony_ci
5162306a36Sopenharmony_ciRequired: pins
5262306a36Sopenharmony_ciOptions: function, bias-disable, bias-pull-up, bias-pull-down,
5362306a36Sopenharmony_ci	 drive-open-drain.
5462306a36Sopenharmony_ci
5562306a36Sopenharmony_ciNote that many of these properties are only valid for certain specific pins.
5662306a36Sopenharmony_ciSee the Palmas device datasheet for complete details regarding which pins
5762306a36Sopenharmony_cisupport which functionality.
5862306a36Sopenharmony_ci
5962306a36Sopenharmony_ciValid values for pin names are:
6062306a36Sopenharmony_ci	gpio0, gpio1, gpio2, gpio3, gpio4, gpio5, gpio6, gpio7, gpio8, gpio9,
6162306a36Sopenharmony_ci	gpio10, gpio11, gpio12, gpio13, gpio14, gpio15, vac, powergood,
6262306a36Sopenharmony_ci	nreswarm, pwrdown, gpadc_start, reset_in, nsleep, enable1, enable2,
6362306a36Sopenharmony_ci	int.
6462306a36Sopenharmony_ci
6562306a36Sopenharmony_ciValid value of function names are:
6662306a36Sopenharmony_ci	gpio, led, pwm, regen, sysen, clk32kgaudio, id, vbus_det, chrg_det,
6762306a36Sopenharmony_ci	vac, vacok, powergood, usb_psel, msecure, pwrhold, int, nreswarm,
6862306a36Sopenharmony_ci	simrsto, simrsti, low_vbat, wireless_chrg1, rcm, pwrdown, gpadc_start,
6962306a36Sopenharmony_ci	reset_in, nsleep, enable.
7062306a36Sopenharmony_ci
7162306a36Sopenharmony_ciThere are 4 special functions: opt0, opt1, opt2 and opt3. If any of these
7262306a36Sopenharmony_cifunctions is selected then directly pins register will be written with 0, 1, 2
7362306a36Sopenharmony_cior 3 respectively if it is valid for that pins or list of pins.
7462306a36Sopenharmony_ci
7562306a36Sopenharmony_ciExample:
7662306a36Sopenharmony_ci	palmas: tps65913 {
7762306a36Sopenharmony_ci		....
7862306a36Sopenharmony_ci		pinctrl {
7962306a36Sopenharmony_ci			compatible = "ti,tps65913-pinctrl";
8062306a36Sopenharmony_ci			ti,palmas-enable-dvfs1;
8162306a36Sopenharmony_ci			pinctrl-names = "default";
8262306a36Sopenharmony_ci			pinctrl-0 = <&palmas_pins_state>;
8362306a36Sopenharmony_ci
8462306a36Sopenharmony_ci			palmas_pins_state: pinmux {
8562306a36Sopenharmony_ci				gpio0 {
8662306a36Sopenharmony_ci					pins = "gpio0";
8762306a36Sopenharmony_ci					function = "id";
8862306a36Sopenharmony_ci					bias-pull-up;
8962306a36Sopenharmony_ci				};
9062306a36Sopenharmony_ci
9162306a36Sopenharmony_ci				vac {
9262306a36Sopenharmony_ci					pins = "vac";
9362306a36Sopenharmony_ci					function = "vacok";
9462306a36Sopenharmony_ci					bias-pull-down;
9562306a36Sopenharmony_ci				};
9662306a36Sopenharmony_ci
9762306a36Sopenharmony_ci				gpio5 {
9862306a36Sopenharmony_ci					pins = "gpio5";
9962306a36Sopenharmony_ci					function = "opt0";
10062306a36Sopenharmony_ci					drive-open-drain = <1>;
10162306a36Sopenharmony_ci				};
10262306a36Sopenharmony_ci			};
10362306a36Sopenharmony_ci		};
10462306a36Sopenharmony_ci		....
10562306a36Sopenharmony_ci	};
106