18c2ecf20Sopenharmony_ciRegulator DT binding for MAX77620 Power management IC from Maxim Semiconductor.
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciDevice has multiple DCDC(sd[0-3] and LDOs(ldo[0-8]). The input supply
48c2ecf20Sopenharmony_ciof these regulators are defined under parent device node.
58c2ecf20Sopenharmony_ciDetails of regulator properties are defined as child node under
68c2ecf20Sopenharmony_cisub-node "regulators" which is child node of device node.
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ciPlease refer file <Documentation/devicetree/bindings/regulator/regulator.txt>
98c2ecf20Sopenharmony_cifor common regulator bindings used by client.
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ciFollowing are properties of parent node related to regulators.
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ciOptional properties:
148c2ecf20Sopenharmony_ci-------------------
158c2ecf20Sopenharmony_ciThe input supply of regulators are the optional properties on the
168c2ecf20Sopenharmony_ciparent device node. The input supply of these regulators are provided
178c2ecf20Sopenharmony_cithrough following properties:
188c2ecf20Sopenharmony_ciin-sd0-supply:		Input supply for SD0, INA-SD0 or INB-SD0 pins.
198c2ecf20Sopenharmony_ciin-sd1-supply:		Input supply for SD1.
208c2ecf20Sopenharmony_ciin-sd2-supply:		Input supply for SD2.
218c2ecf20Sopenharmony_ciin-sd3-supply:		Input supply for SD3.
228c2ecf20Sopenharmony_ciin-ldo0-1-supply:	Input supply for LDO0 and LDO1.
238c2ecf20Sopenharmony_ciin-ldo2-supply:		Input supply for LDO2.
248c2ecf20Sopenharmony_ciin-ldo3-5-supply:	Input supply for LDO3 and LDO5
258c2ecf20Sopenharmony_ciin-ldo4-6-supply:	Input supply for LDO4 and LDO6.
268c2ecf20Sopenharmony_ciin-ldo7-8-supply:	Input supply for LDO7 and LDO8.
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ciOptional sub nodes for regulators under "regulators" subnode:
298c2ecf20Sopenharmony_ci------------------------------------------------------------
308c2ecf20Sopenharmony_ciThe subnodes name is the name of regulator and it must be one of:
318c2ecf20Sopenharmony_ci	sd[0-3], ldo[0-8]
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ciEach sub-node should contain the constraints and initialization
348c2ecf20Sopenharmony_ciinformation for that regulator. The definition for each of these
358c2ecf20Sopenharmony_cinodes is defined using the standard binding for regulators found at
368c2ecf20Sopenharmony_ci<Documentation/devicetree/bindings/regulator/regulator.txt>.
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ciTheres are also additional properties for SD/LDOs. These additional properties
398c2ecf20Sopenharmony_ciare required to configure FPS configuration parameters for SDs and LDOs.
408c2ecf20Sopenharmony_ciPlease refer <devicetree/bindings/mfd/max77620.txt> for more detail of Flexible
418c2ecf20Sopenharmony_ciPower Sequence (FPS).
428c2ecf20Sopenharmony_ciFollowing are additional properties:
438c2ecf20Sopenharmony_ci
448c2ecf20Sopenharmony_ci- maxim,active-fps-source:		FPS source for the regulators to get
458c2ecf20Sopenharmony_ci					enabled/disabled when system is in
468c2ecf20Sopenharmony_ci					active state.  Valid values are:
478c2ecf20Sopenharmony_ci					- MAX77620_FPS_SRC_0,
488c2ecf20Sopenharmony_ci						FPS source is FPS0.
498c2ecf20Sopenharmony_ci					- MAX77620_FPS_SRC_1,
508c2ecf20Sopenharmony_ci						FPS source is FPS1
518c2ecf20Sopenharmony_ci					- MAX77620_FPS_SRC_2 and
528c2ecf20Sopenharmony_ci						FPS source is FPS2
538c2ecf20Sopenharmony_ci					- MAX77620_FPS_SRC_NONE.
548c2ecf20Sopenharmony_ci						Regulator is not controlled
558c2ecf20Sopenharmony_ci						by FPS events and it gets
568c2ecf20Sopenharmony_ci						enabled/disabled by register
578c2ecf20Sopenharmony_ci						access.
588c2ecf20Sopenharmony_ci					Absence of this property will leave
598c2ecf20Sopenharmony_ci					the FPS configuration register for that
608c2ecf20Sopenharmony_ci					regulator to default configuration.
618c2ecf20Sopenharmony_ci
628c2ecf20Sopenharmony_ci- maxim,active-fps-power-up-slot:	Sequencing event slot number on which
638c2ecf20Sopenharmony_ci					the regulator get enabled when
648c2ecf20Sopenharmony_ci					master FPS input event set to HIGH.
658c2ecf20Sopenharmony_ci					Valid values are 0 to 7.
668c2ecf20Sopenharmony_ci					This is applicable if FPS source is
678c2ecf20Sopenharmony_ci					selected as FPS0, FPS1 or FPS2.
688c2ecf20Sopenharmony_ci			
698c2ecf20Sopenharmony_ci- maxim,active-fps-power-down-slot:	Sequencing event slot number on which
708c2ecf20Sopenharmony_ci					the regulator get disabled when master
718c2ecf20Sopenharmony_ci					FPS input event set to LOW.
728c2ecf20Sopenharmony_ci					Valid values are 0 to 7.
738c2ecf20Sopenharmony_ci					This is applicable if FPS source is
748c2ecf20Sopenharmony_ci					selected as FPS0, FPS1 or FPS2.
758c2ecf20Sopenharmony_ci			
768c2ecf20Sopenharmony_ci- maxim,suspend-fps-source:		This is same as property
778c2ecf20Sopenharmony_ci					"maxim,active-fps-source" but value
788c2ecf20Sopenharmony_ci					get configured when system enters in
798c2ecf20Sopenharmony_ci					to suspend state.
808c2ecf20Sopenharmony_ci
818c2ecf20Sopenharmony_ci- maxim,suspend-fps-power-up-slot:	This is same as property
828c2ecf20Sopenharmony_ci					"maxim,active-fps-power-up-slot" but
838c2ecf20Sopenharmony_ci					this value get configured into FPS
848c2ecf20Sopenharmony_ci					configuration register when system
858c2ecf20Sopenharmony_ci					enters into suspend.
868c2ecf20Sopenharmony_ci					This is applicable if suspend state
878c2ecf20Sopenharmony_ci					FPS source is selected as FPS0, FPS1 or
888c2ecf20Sopenharmony_ci
898c2ecf20Sopenharmony_ci- maxim,suspend-fps-power-down-slot:	This is same as property
908c2ecf20Sopenharmony_ci					"maxim,active-fps-power-down-slot" but
918c2ecf20Sopenharmony_ci					this value get configured into FPS
928c2ecf20Sopenharmony_ci					configuration register when system
938c2ecf20Sopenharmony_ci					enters into suspend.
948c2ecf20Sopenharmony_ci					This is applicable if suspend state
958c2ecf20Sopenharmony_ci					FPS source is selected as FPS0, FPS1 or
968c2ecf20Sopenharmony_ci					FPS2.
978c2ecf20Sopenharmony_ci- maxim,ramp-rate-setting:		integer, ramp rate(uV/us) setting to be
988c2ecf20Sopenharmony_ci					configured to the device.
998c2ecf20Sopenharmony_ci					The platform may have different ramp
1008c2ecf20Sopenharmony_ci					rate than advertised ramp rate if it has
1018c2ecf20Sopenharmony_ci					design variation from Maxim's
1028c2ecf20Sopenharmony_ci					recommended. On this case, platform
1038c2ecf20Sopenharmony_ci					specific ramp rate is used for ramp time
1048c2ecf20Sopenharmony_ci					calculation and this property is used
1058c2ecf20Sopenharmony_ci					for device register configurations.
1068c2ecf20Sopenharmony_ci					The measured ramp rate of platform is
1078c2ecf20Sopenharmony_ci					provided by the regulator-ramp-delay
1088c2ecf20Sopenharmony_ci					as described in <devicetree/bindings/
1098c2ecf20Sopenharmony_ci					regulator/regulator.txt>.
1108c2ecf20Sopenharmony_ci					Maxim Max77620 supports following ramp
1118c2ecf20Sopenharmony_ci					delay:
1128c2ecf20Sopenharmony_ci					  SD: 13.75mV/us, 27.5mV/us, 55mV/us
1138c2ecf20Sopenharmony_ci					  LDOs: 5mV/us, 100mV/us
1148c2ecf20Sopenharmony_ci
1158c2ecf20Sopenharmony_ciNote: If the measured ramp delay is same as advertised ramp delay then it is not
1168c2ecf20Sopenharmony_cirequired to provide the ramp delay with property "maxim,ramp-rate-setting". The
1178c2ecf20Sopenharmony_ciramp rate can be provided by the regulator-ramp-delay which will be used for
1188c2ecf20Sopenharmony_ciramp time calculation for voltage change as well as for device configuration.
1198c2ecf20Sopenharmony_ci
1208c2ecf20Sopenharmony_ciExample:
1218c2ecf20Sopenharmony_ci--------
1228c2ecf20Sopenharmony_ci#include <dt-bindings/mfd/max77620.h>
1238c2ecf20Sopenharmony_ci...
1248c2ecf20Sopenharmony_cimax77620@3c {
1258c2ecf20Sopenharmony_ci	in-ldo0-1-supply = <&max77620_sd2>;
1268c2ecf20Sopenharmony_ci	in-ldo7-8-supply = <&max77620_sd2>;
1278c2ecf20Sopenharmony_ci	regulators {
1288c2ecf20Sopenharmony_ci		sd0 {
1298c2ecf20Sopenharmony_ci			regulator-name = "vdd-core";
1308c2ecf20Sopenharmony_ci			regulator-min-microvolt = <600000>;
1318c2ecf20Sopenharmony_ci			regulator-max-microvolt = <1400000>;
1328c2ecf20Sopenharmony_ci			regulator-boot-on;
1338c2ecf20Sopenharmony_ci			regulator-always-on;
1348c2ecf20Sopenharmony_ci			maxim,active-fps-source = <MAX77620_FPS_SRC_1>;
1358c2ecf20Sopenharmony_ci		};
1368c2ecf20Sopenharmony_ci
1378c2ecf20Sopenharmony_ci		sd1 {
1388c2ecf20Sopenharmony_ci			regulator-name = "vddio-ddr";
1398c2ecf20Sopenharmony_ci			regulator-min-microvolt = <1200000>;
1408c2ecf20Sopenharmony_ci			regulator-max-microvolt = <1200000>;
1418c2ecf20Sopenharmony_ci			regulator-always-on;
1428c2ecf20Sopenharmony_ci			regulator-boot-on;
1438c2ecf20Sopenharmony_ci			maxim,active-fps-source = <MAX77620_FPS_SRC_0>;
1448c2ecf20Sopenharmony_ci		};
1458c2ecf20Sopenharmony_ci
1468c2ecf20Sopenharmony_ci		sd2 {
1478c2ecf20Sopenharmony_ci			regulator-name = "vdd-pre-reg";
1488c2ecf20Sopenharmony_ci			regulator-min-microvolt = <1350000>;
1498c2ecf20Sopenharmony_ci			regulator-max-microvolt = <1350000>;
1508c2ecf20Sopenharmony_ci		};
1518c2ecf20Sopenharmony_ci
1528c2ecf20Sopenharmony_ci		sd3 {
1538c2ecf20Sopenharmony_ci			regulator-name = "vdd-1v8";
1548c2ecf20Sopenharmony_ci			regulator-min-microvolt = <1800000>;
1558c2ecf20Sopenharmony_ci			regulator-max-microvolt = <1800000>;
1568c2ecf20Sopenharmony_ci			regulator-always-on;
1578c2ecf20Sopenharmony_ci			regulator-boot-on;
1588c2ecf20Sopenharmony_ci		};
1598c2ecf20Sopenharmony_ci
1608c2ecf20Sopenharmony_ci		ldo0 {
1618c2ecf20Sopenharmony_ci			regulator-name = "avdd-sys";
1628c2ecf20Sopenharmony_ci			regulator-min-microvolt = <1200000>;
1638c2ecf20Sopenharmony_ci			regulator-max-microvolt = <1200000>;
1648c2ecf20Sopenharmony_ci			regulator-always-on;
1658c2ecf20Sopenharmony_ci			regulator-boot-on;
1668c2ecf20Sopenharmony_ci		};
1678c2ecf20Sopenharmony_ci
1688c2ecf20Sopenharmony_ci		ldo1 {
1698c2ecf20Sopenharmony_ci			regulator-name = "vdd-pex";
1708c2ecf20Sopenharmony_ci			regulator-min-microvolt = <1050000>;
1718c2ecf20Sopenharmony_ci			regulator-max-microvolt = <1050000>;
1728c2ecf20Sopenharmony_ci		};
1738c2ecf20Sopenharmony_ci
1748c2ecf20Sopenharmony_ci		ldo2 {
1758c2ecf20Sopenharmony_ci			regulator-name = "vddio-sdmmc3";
1768c2ecf20Sopenharmony_ci			regulator-min-microvolt = <1800000>;
1778c2ecf20Sopenharmony_ci			regulator-max-microvolt = <3300000>;
1788c2ecf20Sopenharmony_ci		};
1798c2ecf20Sopenharmony_ci
1808c2ecf20Sopenharmony_ci		ldo3 {
1818c2ecf20Sopenharmony_ci			regulator-name = "vdd-cam-hv";
1828c2ecf20Sopenharmony_ci			regulator-min-microvolt = <2800000>;
1838c2ecf20Sopenharmony_ci			regulator-max-microvolt = <2800000>;
1848c2ecf20Sopenharmony_ci		};
1858c2ecf20Sopenharmony_ci
1868c2ecf20Sopenharmony_ci		ldo4 {
1878c2ecf20Sopenharmony_ci			regulator-name = "vdd-rtc";
1888c2ecf20Sopenharmony_ci			regulator-min-microvolt = <1250000>;
1898c2ecf20Sopenharmony_ci			regulator-max-microvolt = <1250000>;
1908c2ecf20Sopenharmony_ci			regulator-always-on;
1918c2ecf20Sopenharmony_ci			regulator-boot-on;
1928c2ecf20Sopenharmony_ci		};
1938c2ecf20Sopenharmony_ci
1948c2ecf20Sopenharmony_ci		ldo5 {
1958c2ecf20Sopenharmony_ci			regulator-name = "avdd-ts-hv";
1968c2ecf20Sopenharmony_ci			regulator-min-microvolt = <3000000>;
1978c2ecf20Sopenharmony_ci			regulator-max-microvolt = <3000000>;
1988c2ecf20Sopenharmony_ci		};
1998c2ecf20Sopenharmony_ci
2008c2ecf20Sopenharmony_ci		ldo6 {
2018c2ecf20Sopenharmony_ci			regulator-name = "vdd-ts";
2028c2ecf20Sopenharmony_ci			regulator-min-microvolt = <1800000>;
2038c2ecf20Sopenharmony_ci			regulator-max-microvolt = <1800000>;
2048c2ecf20Sopenharmony_ci			regulator-always-on;
2058c2ecf20Sopenharmony_ci			regulator-boot-on;
2068c2ecf20Sopenharmony_ci		};
2078c2ecf20Sopenharmony_ci
2088c2ecf20Sopenharmony_ci		ldo7 {
2098c2ecf20Sopenharmony_ci			regulator-name = "vdd-gen-pll-edp";
2108c2ecf20Sopenharmony_ci			regulator-min-microvolt = <1050000>;
2118c2ecf20Sopenharmony_ci			regulator-max-microvolt = <1050000>;
2128c2ecf20Sopenharmony_ci			regulator-always-on;
2138c2ecf20Sopenharmony_ci			regulator-boot-on;
2148c2ecf20Sopenharmony_ci		};
2158c2ecf20Sopenharmony_ci
2168c2ecf20Sopenharmony_ci		ldo8 {
2178c2ecf20Sopenharmony_ci			regulator-name = "vdd-hdmi-dp";
2188c2ecf20Sopenharmony_ci			regulator-min-microvolt = <1050000>;
2198c2ecf20Sopenharmony_ci			regulator-max-microvolt = <1050000>;
2208c2ecf20Sopenharmony_ci		};
2218c2ecf20Sopenharmony_ci	};
2228c2ecf20Sopenharmony_ci};
223