18c2ecf20Sopenharmony_ciAXP family PMIC device tree bindings
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciThe axp20x family current members :
48c2ecf20Sopenharmony_ciaxp152 (X-Powers)
58c2ecf20Sopenharmony_ciaxp202 (X-Powers)
68c2ecf20Sopenharmony_ciaxp209 (X-Powers)
78c2ecf20Sopenharmony_ciaxp221 (X-Powers)
88c2ecf20Sopenharmony_ciaxp223 (X-Powers)
98c2ecf20Sopenharmony_ciaxp803 (X-Powers)
108c2ecf20Sopenharmony_ciaxp806 (X-Powers)
118c2ecf20Sopenharmony_ciaxp809 (X-Powers)
128c2ecf20Sopenharmony_ciaxp813 (X-Powers)
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ciThe AXP813 is 2 chips packaged into 1. The 2 chips do not share anything
158c2ecf20Sopenharmony_ciother than the packaging. Pins are routed separately. As such they should
168c2ecf20Sopenharmony_cibe treated as separate entities. The other half is an AC100 RTC/codec
178c2ecf20Sopenharmony_cicombo chip. Please see ./ac100.txt for its bindings.
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ciRequired properties:
208c2ecf20Sopenharmony_ci- compatible: should be one of:
218c2ecf20Sopenharmony_ci    * "x-powers,axp152"
228c2ecf20Sopenharmony_ci    * "x-powers,axp202"
238c2ecf20Sopenharmony_ci    * "x-powers,axp209"
248c2ecf20Sopenharmony_ci    * "x-powers,axp221"
258c2ecf20Sopenharmony_ci    * "x-powers,axp223"
268c2ecf20Sopenharmony_ci    * "x-powers,axp803"
278c2ecf20Sopenharmony_ci    * "x-powers,axp806"
288c2ecf20Sopenharmony_ci    * "x-powers,axp805", "x-powers,axp806"
298c2ecf20Sopenharmony_ci    * "x-powers,axp809"
308c2ecf20Sopenharmony_ci    * "x-powers,axp813"
318c2ecf20Sopenharmony_ci- reg: The I2C slave address or RSB hardware address for the AXP chip
328c2ecf20Sopenharmony_ci- interrupts: SoC NMI / GPIO interrupt connected to the PMIC's IRQ pin
338c2ecf20Sopenharmony_ci- interrupt-controller: The PMIC has its own internal IRQs
348c2ecf20Sopenharmony_ci- #interrupt-cells: Should be set to 1
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ciSupported common regulator properties, see ../regulator/regulator.txt for
378c2ecf20Sopenharmony_cimore information:
388c2ecf20Sopenharmony_ci- regulator-ramp-delay: sets the ramp up delay in uV/us
398c2ecf20Sopenharmony_ci			AXP20x/DCDC2: 1600, 800
408c2ecf20Sopenharmony_ci			AXP20x/LDO3:  1600, 800
418c2ecf20Sopenharmony_ci- regulator-soft-start:	enable the output at the lowest possible voltage and
428c2ecf20Sopenharmony_ci			only then set the desired voltage
438c2ecf20Sopenharmony_ci			AXP20x/LDO3: software-based implementation
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_ciOptional properties:
468c2ecf20Sopenharmony_ci- x-powers,dcdc-freq: defines the work frequency of DC-DC in KHz
478c2ecf20Sopenharmony_ci		      AXP152/20X: range:  750-1875, Default: 1.5 MHz
488c2ecf20Sopenharmony_ci		      AXP22X/8XX: range: 1800-4050, Default: 3   MHz
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_ci- x-powers,drive-vbus-en: boolean, set this when the N_VBUSEN pin is
518c2ecf20Sopenharmony_ci			  used as an output pin to control an external
528c2ecf20Sopenharmony_ci			  regulator to drive the OTG VBus, rather then
538c2ecf20Sopenharmony_ci			  as an input pin which signals whether the
548c2ecf20Sopenharmony_ci			  board is driving OTG VBus or not.
558c2ecf20Sopenharmony_ci			  (axp221 / axp223 / axp803/ axp813 only)
568c2ecf20Sopenharmony_ci
578c2ecf20Sopenharmony_ci- x-powers,self-working-mode and
588c2ecf20Sopenharmony_ci  x-powers,master-mode: Boolean (axp806 only). Set either of these when the
598c2ecf20Sopenharmony_ci			PMIC is wired for self-working mode or master mode.
608c2ecf20Sopenharmony_ci			If neither is set then slave mode is assumed.
618c2ecf20Sopenharmony_ci			This corresponds to how the MODESET pin is wired.
628c2ecf20Sopenharmony_ci
638c2ecf20Sopenharmony_ci- <input>-supply: a phandle to the regulator supply node. May be omitted if
648c2ecf20Sopenharmony_ci		  inputs are unregulated, such as using the IPSOUT output
658c2ecf20Sopenharmony_ci		  from the PMIC.
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ci- regulators: A node that houses a sub-node for each regulator. Regulators
688c2ecf20Sopenharmony_ci	      not used but preferred to be managed by the OS should be
698c2ecf20Sopenharmony_ci	      listed as well.
708c2ecf20Sopenharmony_ci	      See Documentation/devicetree/bindings/regulator/regulator.txt
718c2ecf20Sopenharmony_ci	      for more information on standard regulator bindings.
728c2ecf20Sopenharmony_ci
738c2ecf20Sopenharmony_ciOptional properties for DCDC regulators:
748c2ecf20Sopenharmony_ci- x-powers,dcdc-workmode: 1 for PWM mode, 0 for AUTO (PWM/PFM) mode
758c2ecf20Sopenharmony_ci			  Default: Current hardware setting
768c2ecf20Sopenharmony_ci			  The DCDC regulators work in a mixed PWM/PFM mode,
778c2ecf20Sopenharmony_ci			  using PFM under light loads and switching to PWM
788c2ecf20Sopenharmony_ci			  for heavier loads. Forcing PWM mode trades efficiency
798c2ecf20Sopenharmony_ci			  under light loads for lower output noise. This
808c2ecf20Sopenharmony_ci			  probably makes sense for HiFi audio related
818c2ecf20Sopenharmony_ci			  applications that aren't battery constrained.
828c2ecf20Sopenharmony_ci
838c2ecf20Sopenharmony_ciAXP202/AXP209 regulators, type, and corresponding input supply names:
848c2ecf20Sopenharmony_ci
858c2ecf20Sopenharmony_ciRegulator	  Type		  Supply Name		  Notes
868c2ecf20Sopenharmony_ci---------	  ----		  -----------		  -----
878c2ecf20Sopenharmony_ciDCDC2		: DC-DC buck	: vin2-supply
888c2ecf20Sopenharmony_ciDCDC3		: DC-DC	buck	: vin3-supply
898c2ecf20Sopenharmony_ciLDO1		: LDO		: acin-supply		: always on
908c2ecf20Sopenharmony_ciLDO2		: LDO		: ldo24in-supply	: shared supply
918c2ecf20Sopenharmony_ciLDO3		: LDO		: ldo3in-supply
928c2ecf20Sopenharmony_ciLDO4		: LDO		: ldo24in-supply	: shared supply
938c2ecf20Sopenharmony_ciLDO5		: LDO		: ldo5in-supply
948c2ecf20Sopenharmony_ci
958c2ecf20Sopenharmony_ciAXP221/AXP223 regulators, type, and corresponding input supply names:
968c2ecf20Sopenharmony_ci
978c2ecf20Sopenharmony_ciRegulator	  Type		  Supply Name		  Notes
988c2ecf20Sopenharmony_ci---------	  ----		  -----------		  -----
998c2ecf20Sopenharmony_ciDCDC1		: DC-DC buck	: vin1-supply
1008c2ecf20Sopenharmony_ciDCDC2		: DC-DC buck	: vin2-supply
1018c2ecf20Sopenharmony_ciDCDC3		: DC-DC	buck	: vin3-supply
1028c2ecf20Sopenharmony_ciDCDC4		: DC-DC	buck	: vin4-supply
1038c2ecf20Sopenharmony_ciDCDC5		: DC-DC	buck	: vin5-supply
1048c2ecf20Sopenharmony_ciDC1SW		: On/Off Switch	:			: DCDC1 secondary output
1058c2ecf20Sopenharmony_ciDC5LDO		: LDO		:			: input from DCDC5
1068c2ecf20Sopenharmony_ciALDO1		: LDO		: aldoin-supply		: shared supply
1078c2ecf20Sopenharmony_ciALDO2		: LDO		: aldoin-supply		: shared supply
1088c2ecf20Sopenharmony_ciALDO3		: LDO		: aldoin-supply		: shared supply
1098c2ecf20Sopenharmony_ciDLDO1		: LDO		: dldoin-supply		: shared supply
1108c2ecf20Sopenharmony_ciDLDO2		: LDO		: dldoin-supply		: shared supply
1118c2ecf20Sopenharmony_ciDLDO3		: LDO		: dldoin-supply		: shared supply
1128c2ecf20Sopenharmony_ciDLDO4		: LDO		: dldoin-supply		: shared supply
1138c2ecf20Sopenharmony_ciELDO1		: LDO		: eldoin-supply		: shared supply
1148c2ecf20Sopenharmony_ciELDO2		: LDO		: eldoin-supply		: shared supply
1158c2ecf20Sopenharmony_ciELDO3		: LDO		: eldoin-supply		: shared supply
1168c2ecf20Sopenharmony_ciLDO_IO0		: LDO		: ips-supply		: GPIO 0
1178c2ecf20Sopenharmony_ciLDO_IO1		: LDO		: ips-supply		: GPIO 1
1188c2ecf20Sopenharmony_ciRTC_LDO		: LDO		: ips-supply		: always on
1198c2ecf20Sopenharmony_ciDRIVEVBUS	: Enable output	: drivevbus-supply	: external regulator
1208c2ecf20Sopenharmony_ci
1218c2ecf20Sopenharmony_ciAXP803 regulators, type, and corresponding input supply names:
1228c2ecf20Sopenharmony_ci
1238c2ecf20Sopenharmony_ciRegulator	  Type		  Supply Name		  Notes
1248c2ecf20Sopenharmony_ci---------	  ----		  -----------		  -----
1258c2ecf20Sopenharmony_ciDCDC1		: DC-DC buck	: vin1-supply
1268c2ecf20Sopenharmony_ciDCDC2		: DC-DC buck	: vin2-supply		: poly-phase capable
1278c2ecf20Sopenharmony_ciDCDC3		: DC-DC	buck	: vin3-supply		: poly-phase capable
1288c2ecf20Sopenharmony_ciDCDC4		: DC-DC	buck	: vin4-supply
1298c2ecf20Sopenharmony_ciDCDC5		: DC-DC	buck	: vin5-supply		: poly-phase capable
1308c2ecf20Sopenharmony_ciDCDC6		: DC-DC	buck	: vin6-supply		: poly-phase capable
1318c2ecf20Sopenharmony_ciDC1SW		: On/Off Switch	:			: DCDC1 secondary output
1328c2ecf20Sopenharmony_ciALDO1		: LDO		: aldoin-supply		: shared supply
1338c2ecf20Sopenharmony_ciALDO2		: LDO		: aldoin-supply		: shared supply
1348c2ecf20Sopenharmony_ciALDO3		: LDO		: aldoin-supply		: shared supply
1358c2ecf20Sopenharmony_ciDLDO1		: LDO		: dldoin-supply		: shared supply
1368c2ecf20Sopenharmony_ciDLDO2		: LDO		: dldoin-supply		: shared supply
1378c2ecf20Sopenharmony_ciDLDO3		: LDO		: dldoin-supply		: shared supply
1388c2ecf20Sopenharmony_ciDLDO4		: LDO		: dldoin-supply		: shared supply
1398c2ecf20Sopenharmony_ciELDO1		: LDO		: eldoin-supply		: shared supply
1408c2ecf20Sopenharmony_ciELDO2		: LDO		: eldoin-supply		: shared supply
1418c2ecf20Sopenharmony_ciELDO3		: LDO		: eldoin-supply		: shared supply
1428c2ecf20Sopenharmony_ciFLDO1		: LDO		: fldoin-supply		: shared supply
1438c2ecf20Sopenharmony_ciFLDO2		: LDO		: fldoin-supply		: shared supply
1448c2ecf20Sopenharmony_ciLDO_IO0		: LDO		: ips-supply		: GPIO 0
1458c2ecf20Sopenharmony_ciLDO_IO1		: LDO		: ips-supply		: GPIO 1
1468c2ecf20Sopenharmony_ciRTC_LDO		: LDO		: ips-supply		: always on
1478c2ecf20Sopenharmony_ciDRIVEVBUS	: Enable output	: drivevbus-supply	: external regulator
1488c2ecf20Sopenharmony_ci
1498c2ecf20Sopenharmony_ciAXP806 regulators, type, and corresponding input supply names:
1508c2ecf20Sopenharmony_ci
1518c2ecf20Sopenharmony_ciRegulator	  Type		  Supply Name		  Notes
1528c2ecf20Sopenharmony_ci---------	  ----		  -----------		  -----
1538c2ecf20Sopenharmony_ciDCDCA		: DC-DC buck	: vina-supply		: poly-phase capable
1548c2ecf20Sopenharmony_ciDCDCB		: DC-DC buck	: vinb-supply		: poly-phase capable
1558c2ecf20Sopenharmony_ciDCDCC		: DC-DC	buck	: vinc-supply		: poly-phase capable
1568c2ecf20Sopenharmony_ciDCDCD		: DC-DC	buck	: vind-supply		: poly-phase capable
1578c2ecf20Sopenharmony_ciDCDCE		: DC-DC	buck	: vine-supply		: poly-phase capable
1588c2ecf20Sopenharmony_ciALDO1		: LDO		: aldoin-supply		: shared supply
1598c2ecf20Sopenharmony_ciALDO2		: LDO		: aldoin-supply		: shared supply
1608c2ecf20Sopenharmony_ciALDO3		: LDO		: aldoin-supply		: shared supply
1618c2ecf20Sopenharmony_ciBLDO1		: LDO		: bldoin-supply		: shared supply
1628c2ecf20Sopenharmony_ciBLDO2		: LDO		: bldoin-supply		: shared supply
1638c2ecf20Sopenharmony_ciBLDO3		: LDO		: bldoin-supply		: shared supply
1648c2ecf20Sopenharmony_ciBLDO4		: LDO		: bldoin-supply		: shared supply
1658c2ecf20Sopenharmony_ciCLDO1		: LDO		: cldoin-supply		: shared supply
1668c2ecf20Sopenharmony_ciCLDO2		: LDO		: cldoin-supply		: shared supply
1678c2ecf20Sopenharmony_ciCLDO3		: LDO		: cldoin-supply		: shared supply
1688c2ecf20Sopenharmony_ciSW		: On/Off Switch : swin-supply
1698c2ecf20Sopenharmony_ci
1708c2ecf20Sopenharmony_ciAdditionally, the AXP806 DC-DC regulators support poly-phase arrangements
1718c2ecf20Sopenharmony_cifor higher output current. The possible groupings are: A+B, A+B+C, D+E.
1728c2ecf20Sopenharmony_ci
1738c2ecf20Sopenharmony_ciAXP809 regulators, type, and corresponding input supply names:
1748c2ecf20Sopenharmony_ci
1758c2ecf20Sopenharmony_ciRegulator	  Type		  Supply Name		  Notes
1768c2ecf20Sopenharmony_ci---------	  ----		  -----------		  -----
1778c2ecf20Sopenharmony_ciDCDC1		: DC-DC buck	: vin1-supply
1788c2ecf20Sopenharmony_ciDCDC2		: DC-DC buck	: vin2-supply
1798c2ecf20Sopenharmony_ciDCDC3		: DC-DC	buck	: vin3-supply
1808c2ecf20Sopenharmony_ciDCDC4		: DC-DC	buck	: vin4-supply
1818c2ecf20Sopenharmony_ciDCDC5		: DC-DC	buck	: vin5-supply
1828c2ecf20Sopenharmony_ciDC1SW		: On/Off Switch	:			: DCDC1 secondary output
1838c2ecf20Sopenharmony_ciDC5LDO		: LDO		:			: input from DCDC5
1848c2ecf20Sopenharmony_ciALDO1		: LDO		: aldoin-supply		: shared supply
1858c2ecf20Sopenharmony_ciALDO2		: LDO		: aldoin-supply		: shared supply
1868c2ecf20Sopenharmony_ciALDO3		: LDO		: aldoin-supply		: shared supply
1878c2ecf20Sopenharmony_ciDLDO1		: LDO		: dldoin-supply		: shared supply
1888c2ecf20Sopenharmony_ciDLDO2		: LDO		: dldoin-supply		: shared supply
1898c2ecf20Sopenharmony_ciELDO1		: LDO		: eldoin-supply		: shared supply
1908c2ecf20Sopenharmony_ciELDO2		: LDO		: eldoin-supply		: shared supply
1918c2ecf20Sopenharmony_ciELDO3		: LDO		: eldoin-supply		: shared supply
1928c2ecf20Sopenharmony_ciLDO_IO0		: LDO		: ips-supply		: GPIO 0
1938c2ecf20Sopenharmony_ciLDO_IO1		: LDO		: ips-supply		: GPIO 1
1948c2ecf20Sopenharmony_ciRTC_LDO		: LDO		: ips-supply		: always on
1958c2ecf20Sopenharmony_ciSW		: On/Off Switch : swin-supply
1968c2ecf20Sopenharmony_ci
1978c2ecf20Sopenharmony_ciAXP813 regulators, type, and corresponding input supply names:
1988c2ecf20Sopenharmony_ci
1998c2ecf20Sopenharmony_ciRegulator	  Type		  Supply Name		  Notes
2008c2ecf20Sopenharmony_ci---------	  ----		  -----------		  -----
2018c2ecf20Sopenharmony_ciDCDC1		: DC-DC buck	: vin1-supply
2028c2ecf20Sopenharmony_ciDCDC2		: DC-DC buck	: vin2-supply		: poly-phase capable
2038c2ecf20Sopenharmony_ciDCDC3		: DC-DC	buck	: vin3-supply		: poly-phase capable
2048c2ecf20Sopenharmony_ciDCDC4		: DC-DC	buck	: vin4-supply
2058c2ecf20Sopenharmony_ciDCDC5		: DC-DC	buck	: vin5-supply		: poly-phase capable
2068c2ecf20Sopenharmony_ciDCDC6		: DC-DC	buck	: vin6-supply		: poly-phase capable
2078c2ecf20Sopenharmony_ciDCDC7		: DC-DC	buck	: vin7-supply
2088c2ecf20Sopenharmony_ciALDO1		: LDO		: aldoin-supply		: shared supply
2098c2ecf20Sopenharmony_ciALDO2		: LDO		: aldoin-supply		: shared supply
2108c2ecf20Sopenharmony_ciALDO3		: LDO		: aldoin-supply		: shared supply
2118c2ecf20Sopenharmony_ciDLDO1		: LDO		: dldoin-supply		: shared supply
2128c2ecf20Sopenharmony_ciDLDO2		: LDO		: dldoin-supply		: shared supply
2138c2ecf20Sopenharmony_ciDLDO3		: LDO		: dldoin-supply		: shared supply
2148c2ecf20Sopenharmony_ciDLDO4		: LDO		: dldoin-supply		: shared supply
2158c2ecf20Sopenharmony_ciELDO1		: LDO		: eldoin-supply		: shared supply
2168c2ecf20Sopenharmony_ciELDO2		: LDO		: eldoin-supply		: shared supply
2178c2ecf20Sopenharmony_ciELDO3		: LDO		: eldoin-supply		: shared supply
2188c2ecf20Sopenharmony_ciFLDO1		: LDO		: fldoin-supply		: shared supply
2198c2ecf20Sopenharmony_ciFLDO2		: LDO		: fldoin-supply		: shared supply
2208c2ecf20Sopenharmony_ciFLDO3		: LDO		: fldoin-supply		: shared supply
2218c2ecf20Sopenharmony_ciLDO_IO0		: LDO		: ips-supply		: GPIO 0
2228c2ecf20Sopenharmony_ciLDO_IO1		: LDO		: ips-supply		: GPIO 1
2238c2ecf20Sopenharmony_ciRTC_LDO		: LDO		: ips-supply		: always on
2248c2ecf20Sopenharmony_ciSW		: On/Off Switch : swin-supply
2258c2ecf20Sopenharmony_ciDRIVEVBUS	: Enable output	: drivevbus-supply	: external regulator
2268c2ecf20Sopenharmony_ci
2278c2ecf20Sopenharmony_ciExample:
2288c2ecf20Sopenharmony_ci
2298c2ecf20Sopenharmony_ciaxp209: pmic@34 {
2308c2ecf20Sopenharmony_ci	compatible = "x-powers,axp209";
2318c2ecf20Sopenharmony_ci	reg = <0x34>;
2328c2ecf20Sopenharmony_ci	interrupt-parent = <&nmi_intc>;
2338c2ecf20Sopenharmony_ci	interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
2348c2ecf20Sopenharmony_ci	interrupt-controller;
2358c2ecf20Sopenharmony_ci	#interrupt-cells = <1>;
2368c2ecf20Sopenharmony_ci
2378c2ecf20Sopenharmony_ci	regulators {
2388c2ecf20Sopenharmony_ci		x-powers,dcdc-freq = <1500>;
2398c2ecf20Sopenharmony_ci
2408c2ecf20Sopenharmony_ci		vdd_cpu: dcdc2 {
2418c2ecf20Sopenharmony_ci			regulator-always-on;
2428c2ecf20Sopenharmony_ci			regulator-min-microvolt = <1000000>;
2438c2ecf20Sopenharmony_ci			regulator-max-microvolt = <1450000>;
2448c2ecf20Sopenharmony_ci			regulator-name = "vdd-cpu";
2458c2ecf20Sopenharmony_ci		};
2468c2ecf20Sopenharmony_ci
2478c2ecf20Sopenharmony_ci		vdd_int_dll: dcdc3 {
2488c2ecf20Sopenharmony_ci			regulator-always-on;
2498c2ecf20Sopenharmony_ci			regulator-min-microvolt = <1000000>;
2508c2ecf20Sopenharmony_ci			regulator-max-microvolt = <1400000>;
2518c2ecf20Sopenharmony_ci			regulator-name = "vdd-int-dll";
2528c2ecf20Sopenharmony_ci		};
2538c2ecf20Sopenharmony_ci
2548c2ecf20Sopenharmony_ci		vdd_rtc: ldo1 {
2558c2ecf20Sopenharmony_ci			regulator-always-on;
2568c2ecf20Sopenharmony_ci			regulator-min-microvolt = <1200000>;
2578c2ecf20Sopenharmony_ci			regulator-max-microvolt = <1400000>;
2588c2ecf20Sopenharmony_ci			regulator-name = "vdd-rtc";
2598c2ecf20Sopenharmony_ci		};
2608c2ecf20Sopenharmony_ci
2618c2ecf20Sopenharmony_ci		avcc: ldo2 {
2628c2ecf20Sopenharmony_ci			regulator-always-on;
2638c2ecf20Sopenharmony_ci			regulator-min-microvolt = <2700000>;
2648c2ecf20Sopenharmony_ci			regulator-max-microvolt = <3300000>;
2658c2ecf20Sopenharmony_ci			regulator-name = "avcc";
2668c2ecf20Sopenharmony_ci		};
2678c2ecf20Sopenharmony_ci
2688c2ecf20Sopenharmony_ci		ldo3 {
2698c2ecf20Sopenharmony_ci			/* unused but preferred to be managed by OS */
2708c2ecf20Sopenharmony_ci		};
2718c2ecf20Sopenharmony_ci	};
2728c2ecf20Sopenharmony_ci};
273