diff options
Diffstat (limited to 'doc/device-tree-bindings/regulator')
-rw-r--r-- | doc/device-tree-bindings/regulator/fixed.txt | 38 | ||||
-rw-r--r-- | doc/device-tree-bindings/regulator/max77686.txt | 70 | ||||
-rw-r--r-- | doc/device-tree-bindings/regulator/regulator.txt | 54 | ||||
-rw-r--r-- | doc/device-tree-bindings/regulator/sandbox.txt | 45 |
4 files changed, 207 insertions, 0 deletions
diff --git a/doc/device-tree-bindings/regulator/fixed.txt b/doc/device-tree-bindings/regulator/fixed.txt new file mode 100644 index 0000000..4ff39b8 --- /dev/null +++ b/doc/device-tree-bindings/regulator/fixed.txt @@ -0,0 +1,38 @@ +Fixed Voltage regulator + +Binding: +The binding is done by the property "compatible" - this is different, than for +binding by the node prefix (doc/device-tree-bindings/regulator/regulator.txt). + +Required properties: +- compatible: "regulator-fixed" +- regulator-name: this is required by the regulator uclass + +Optional properties: +- gpio: GPIO to use for enable control +- regulator constraints (binding info: regulator.txt) + +Other kernel-style properties, are currently not used. + +Note: +For the regulator constraints, driver expects that: +- regulator-min-microvolt is equal to regulator-max-microvolt +- regulator-min-microamp is equal to regulator-max-microamp + +Example: +fixed_regulator@0 { + /* Mandatory */ + compatible = "regulator-fixed"; + regulator-name = "LED_3.3V"; + + /* Optional: */ + gpio = <&gpc1 0 GPIO_ACTIVE_LOW>; + + /* Optional for regulator uclass */ + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-min-microamp = <15000>; + regulator-max-microamp = <15000>; + regulator-always-on; + regulator-boot-on; +}; diff --git a/doc/device-tree-bindings/regulator/max77686.txt b/doc/device-tree-bindings/regulator/max77686.txt new file mode 100644 index 0000000..ae9b1b6 --- /dev/null +++ b/doc/device-tree-bindings/regulator/max77686.txt @@ -0,0 +1,70 @@ +MAXIM, MAX77686 regulators + +This device uses two drivers: +- drivers/power/pmic/max77686.c (as parent I/O device) +- drivers/power/regulator/max77686.c (for child regulators) + +This file describes the binding info for the REGULATOR driver. + +First, please read the binding info for the pmic: +- doc/device-tree-bindings/pmic/max77686.txt + +Required subnode: +- voltage-regulators: required for the PMIC driver + +Required properties: +- regulator-name: used for regulator uclass platform data '.name' + +Optional: +- regulator-min-microvolt: minimum allowed Voltage to set +- regulator-max-microvolt: minimum allowed Voltage to set +- regulator-always-on: regulator should be never disabled +- regulator-boot-on: regulator should be enabled by the bootloader + +Example: +(subnode of max77686 pmic node) +voltage-regulators { + ldo1 { + regulator-name = "VDD_ALIVE_1.0V"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-always-on; + regulator-boot-on; + }; + + ldo2 { + regulator-name = "VDDQ_VM1M2_1.2V"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-always-on; + regulator-boot-on; + }; + . + . + . + ldo26 { + regulator-name = "nc"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-always-on; + regulator-boot-on; + }; + + buck1 { + regulator-compatible = "BUCK1"; + regulator-name = "VDD_MIF_1.0V"; + regulator-min-microvolt = <8500000>; + regulator-max-microvolt = <1100000>; + regulator-always-on; + regulator-boot-on; + }; + . + . + . + buck9 { + regulator-compatible = "BUCK9"; + regulator-name = "nc"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + }; +}; diff --git a/doc/device-tree-bindings/regulator/regulator.txt b/doc/device-tree-bindings/regulator/regulator.txt new file mode 100644 index 0000000..68b02a8 --- /dev/null +++ b/doc/device-tree-bindings/regulator/regulator.txt @@ -0,0 +1,54 @@ +Voltage/Current regulator + +Binding: +The regulator devices don't use the "compatible" property. The binding is done +by the prefix of regulator node's name. Usually the pmic I/O driver will provide +the array of 'struct pmic_child_info' with the prefixes and compatible drivers. +The bind is done by calling function: pmic_bind_childs(). +Example drivers: +pmic: drivers/power/pmic/max77686.c +regulator: drivers/power/regulator/max77686.c + +For the node name e.g.: "prefix[:alpha:]num { ... }": +- the driver prefix should be: "prefix" or "PREFIX" - case insensitive +- the node name's "num" is set as "dev->driver_data" on bind + +Example the prefix "ldo" will pass for: "ldo1", "ldo@1", "LDO1", "LDOREG@1"... + +Required properties: +- regulator-name: a string, required by the regulator uclass + +Note +The "regulator-name" constraint is used for setting the device's uclass +platform data '.name' field. And the regulator device name is set from +it's node name. + +Optional properties: +- regulator-min-microvolt: a minimum allowed Voltage value +- regulator-max-microvolt: a maximum allowed Voltage value +- regulator-min-microamp: a minimum allowed Current value +- regulator-max-microamp: a maximum allowed Current value +- regulator-always-on: regulator should never be disabled +- regulator-boot-on: enabled by bootloader/firmware + +Other kernel-style properties, are currently not used. + +Note: +For the regulator autoset from constraints, the framework expects that: +- regulator-min-microvolt is equal to regulator-max-microvolt +- regulator-min-microamp is equal to regulator-max-microamp +- regulator-always-on or regulator-boot-on is set + +Example: +ldo0 { + /* Mandatory */ + regulator-name = "VDDQ_EMMC_1.8V"; + + /* Optional */ + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-min-microamp = <100000>; + regulator-max-microamp = <100000>; + regulator-always-on; + regulator-boot-on; +}; diff --git a/doc/device-tree-bindings/regulator/sandbox.txt b/doc/device-tree-bindings/regulator/sandbox.txt new file mode 100644 index 0000000..d70494c --- /dev/null +++ b/doc/device-tree-bindings/regulator/sandbox.txt @@ -0,0 +1,45 @@ +Sandbox, PMIC regulators + +This device uses two drivers: +- drivers/power/pmic/sandbox.c (as parent I/O device) +- drivers/power/regulator/sandbox.c (for child regulators) + +This file describes the binding info for the REGULATOR driver. + +First, please read the binding info for the PMIC: +- doc/device-tree-bindings/pmic/sandbox.txt + +Required subnodes: +- ldoN { }; +- buckN { }; + +The sandbox PMIC can support: ldo1, ldo2, buck1, buck2. + +For each PMIC's regulator subnode, there is one required property: +- regulator-name: used for regulator uclass platform data '.name' + +Optional: +- regulator-min-microvolt: minimum allowed Voltage to set +- regulator-max-microvolt: minimum allowed Voltage to set +- regulator-min-microamps: minimum allowed Current limit to set (LDO1/BUCK1) +- regulator-max-microamps: minimum allowed Current limit to set (LDO1/BUCK1) +- regulator-always-on: regulator should be never disabled +- regulator-boot-on: regulator should be enabled by the bootloader + +Example PMIC's regulator subnodes: + +ldo1 { + regulator-name = "VDD_1.0V"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1200000>; + regulator-min-microamps = <100000>; + regulator-max-microamps = <400000>; + regulator-always-on; +}; + +buck2 { + regulator-name = "VDD_1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; +}; |