Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: AXP20x: Add bindings documentation

Bindings documentation for the AXP20x driver. In this file also
sub-nodes are documented.

Signed-off-by: Carlo Caione <carlo@caione.org>
[wens@csie.org: clarify interrupt source for the axp PMIC]
[wens@csie.org: explain dcdc-workmode in detail and trim lines to 80 chars]
[wens@csie.org: make regulator supplies optional if using unregulated input]
[wens@csie.org: use cubieboard2 regulator nodes as example]
[wens@csie.org: x-powers,dcdc-workmode default changed to 'current hardware setting']
[wens@csie.org: reorganized regulator related properties into separate section.]
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Carlo Caione and committed by
Lee Jones
cf1d5439 eea2e596

+96
+96
Documentation/devicetree/bindings/mfd/axp20x.txt
··· 1 + AXP202/AXP209 device tree bindings 2 + 3 + The axp20x family current members : 4 + axp202 (X-Powers) 5 + axp209 (X-Powers) 6 + 7 + Required properties: 8 + - compatible: "x-powers,axp202" or "x-powers,axp209" 9 + - reg: The I2C slave address for the AXP chip 10 + - interrupt-parent: The parent interrupt controller 11 + - interrupts: SoC NMI / GPIO interrupt connected to the PMIC's IRQ pin 12 + - interrupt-controller: axp20x has its own internal IRQs 13 + - #interrupt-cells: Should be set to 1 14 + 15 + Optional properties: 16 + - x-powers,dcdc-freq: defines the work frequency of DC-DC in KHz 17 + (range: 750-1875). Default: 1.5MHz 18 + - <input>-supply: a phandle to the regulator supply node. May be omitted if 19 + inputs are unregulated, such as using the IPSOUT output 20 + from the PMIC. 21 + 22 + - regulators: A node that houses a sub-node for each regulator. Regulators 23 + not used but preferred to be managed by the OS should be 24 + listed as well. 25 + See Documentation/devicetree/bindings/regulator/regulator.txt 26 + for more information on standard regulator bindings. 27 + 28 + Optional properties for DCDC regulators: 29 + - x-powers,dcdc-workmode: 1 for PWM mode, 0 for AUTO (PWM/PFM) mode 30 + Default: Current hardware setting 31 + The DCDC regulators work in a mixed PWM/PFM mode, 32 + using PFM under light loads and switching to PWM 33 + for heavier loads. Forcing PWM mode trades efficiency 34 + under light loads for lower output noise. This 35 + probably makes sense for HiFi audio related 36 + applications that aren't battery constrained. 37 + 38 + 39 + AXP202/AXP209 regulators, type, and corresponding input supply names: 40 + 41 + Regulator Type Supply Name Notes 42 + --------- ---- ----------- ----- 43 + DCDC2 : DC-DC buck : vin2-supply 44 + DCDC3 : DC-DC buck : vin3-supply 45 + LDO1 : LDO : acin-supply : always on 46 + LDO2 : LDO : ldo24in-supply : shared supply 47 + LDO3 : LDO : ldo3in-supply 48 + LDO4 : LDO : ldo24in-supply : shared supply 49 + LDO5 : LDO : ldo5in-supply 50 + 51 + Example: 52 + 53 + axp209: pmic@34 { 54 + compatible = "x-powers,axp209"; 55 + reg = <0x34>; 56 + interrupt-parent = <&nmi_intc>; 57 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 58 + interrupt-controller; 59 + #interrupt-cells = <1>; 60 + 61 + regulators { 62 + x-powers,dcdc-freq = <1500>; 63 + 64 + vdd_cpu: dcdc2 { 65 + regulator-always-on; 66 + regulator-min-microvolt = <1000000>; 67 + regulator-max-microvolt = <1450000>; 68 + regulator-name = "vdd-cpu"; 69 + }; 70 + 71 + vdd_int_dll: dcdc3 { 72 + regulator-always-on; 73 + regulator-min-microvolt = <1000000>; 74 + regulator-max-microvolt = <1400000>; 75 + regulator-name = "vdd-int-dll"; 76 + }; 77 + 78 + vdd_rtc: ldo1 { 79 + regulator-always-on; 80 + regulator-min-microvolt = <1200000>; 81 + regulator-max-microvolt = <1400000>; 82 + regulator-name = "vdd-rtc"; 83 + }; 84 + 85 + avcc: ldo2 { 86 + regulator-always-on; 87 + regulator-min-microvolt = <2700000>; 88 + regulator-max-microvolt = <3300000>; 89 + regulator-name = "avcc"; 90 + }; 91 + 92 + ldo3 { 93 + /* unused but preferred to be managed by OS */ 94 + }; 95 + }; 96 + };