Przemyslaw Marczak | 08edd00 | 2015-04-20 20:07:42 +0200 | [diff] [blame] | 1 | Voltage/Current regulator |
| 2 | |
| 3 | Binding: |
| 4 | The regulator devices don't use the "compatible" property. The binding is done |
| 5 | by the prefix of regulator node's name. Usually the pmic I/O driver will provide |
| 6 | the array of 'struct pmic_child_info' with the prefixes and compatible drivers. |
| 7 | The bind is done by calling function: pmic_bind_childs(). |
| 8 | Example drivers: |
| 9 | pmic: drivers/power/pmic/max77686.c |
| 10 | regulator: drivers/power/regulator/max77686.c |
| 11 | |
| 12 | For the node name e.g.: "prefix[:alpha:]num { ... }": |
| 13 | - the driver prefix should be: "prefix" or "PREFIX" - case insensitive |
| 14 | - the node name's "num" is set as "dev->driver_data" on bind |
| 15 | |
| 16 | Example the prefix "ldo" will pass for: "ldo1", "ldo@1", "LDO1", "LDOREG@1"... |
| 17 | |
Przemyslaw Marczak | 08edd00 | 2015-04-20 20:07:42 +0200 | [diff] [blame] | 18 | Optional properties: |
Peng Fan | b4cb9ce | 2015-08-07 16:43:43 +0800 | [diff] [blame] | 19 | - regulator-name: a string, required by the regulator uclass |
Przemyslaw Marczak | 08edd00 | 2015-04-20 20:07:42 +0200 | [diff] [blame] | 20 | - regulator-min-microvolt: a minimum allowed Voltage value |
| 21 | - regulator-max-microvolt: a maximum allowed Voltage value |
| 22 | - regulator-min-microamp: a minimum allowed Current value |
| 23 | - regulator-max-microamp: a maximum allowed Current value |
| 24 | - regulator-always-on: regulator should never be disabled |
| 25 | - regulator-boot-on: enabled by bootloader/firmware |
| 26 | |
Peng Fan | b4cb9ce | 2015-08-07 16:43:43 +0800 | [diff] [blame] | 27 | Note |
| 28 | The "regulator-name" constraint is used for setting the device's uclass |
| 29 | platform data '.name' field. And the regulator device name is set from |
| 30 | it's node name. If "regulator-name" is not provided in dts, node name |
| 31 | is chosen for setting the device's uclass platform data '.name' field. |
| 32 | |
Przemyslaw Marczak | 08edd00 | 2015-04-20 20:07:42 +0200 | [diff] [blame] | 33 | Other kernel-style properties, are currently not used. |
| 34 | |
| 35 | Note: |
| 36 | For the regulator autoset from constraints, the framework expects that: |
| 37 | - regulator-min-microvolt is equal to regulator-max-microvolt |
| 38 | - regulator-min-microamp is equal to regulator-max-microamp |
| 39 | - regulator-always-on or regulator-boot-on is set |
| 40 | |
| 41 | Example: |
| 42 | ldo0 { |
Przemyslaw Marczak | 08edd00 | 2015-04-20 20:07:42 +0200 | [diff] [blame] | 43 | /* Optional */ |
Peng Fan | b4cb9ce | 2015-08-07 16:43:43 +0800 | [diff] [blame] | 44 | regulator-name = "VDDQ_EMMC_1.8V"; |
Przemyslaw Marczak | 08edd00 | 2015-04-20 20:07:42 +0200 | [diff] [blame] | 45 | regulator-min-microvolt = <1800000>; |
| 46 | regulator-max-microvolt = <1800000>; |
| 47 | regulator-min-microamp = <100000>; |
| 48 | regulator-max-microamp = <100000>; |
| 49 | regulator-always-on; |
| 50 | regulator-boot-on; |
| 51 | }; |