Commit d877cad6 authored by Mark Brown's avatar Mark Brown

regulator: da9063: disable unused voltage monitors

Merge series from Benjamin Bara <bbara93@gmail.com>:

Follow-up for my initial patch regarding the disabling of unused
voltage monitors. We use the PWR_OK functionality, which asserts GP_FB2
if every monitored voltage is in range. This patch should provide the
possibility to deactivate a voltage monitor from the DT if the regulator
might be disabled during run time. For this purpose, the regulator
notification support is used:
https://lore.kernel.org/all/cover.1622628333.git.matti.vaittinen@fi.rohmeurope.com/
parents c4a413e5 0271b61b
...@@ -12,6 +12,11 @@ maintainers: ...@@ -12,6 +12,11 @@ maintainers:
description: | description: |
For device-tree bindings of other sub-modules refer to the binding documents For device-tree bindings of other sub-modules refer to the binding documents
under the respective sub-system directories. under the respective sub-system directories.
Using regulator-{uv,ov}-{warn,error,protection}-microvolt requires special
handling: First, when GP_FB2 is used, it must be ensured that there is no
moment where all voltage monitors are disabled. Next, as da9063 only supports
UV *and* OV monitoring, both must be set to the same severity and value
(0: disable, 1: enable).
properties: properties:
compatible: compatible:
...@@ -121,11 +126,19 @@ examples: ...@@ -121,11 +126,19 @@ examples:
regulator-max-microamp = <2000000>; regulator-max-microamp = <2000000>;
regulator-boot-on; regulator-boot-on;
}; };
ldo6 {
/* UNUSED */
regulator-name = "LDO_6";
regulator-uv-protection-microvolt = <0>;
regulator-ov-protection-microvolt = <0>;
};
ldo11 { ldo11 {
regulator-name = "LDO_11"; regulator-name = "LDO_11";
regulator-min-microvolt = <900000>; regulator-min-microvolt = <900000>;
regulator-max-microvolt = <3600000>; regulator-max-microvolt = <900000>;
regulator-boot-on; regulator-uv-protection-microvolt = <1>;
regulator-ov-protection-microvolt = <1>;
regulator-always-on;
}; };
}; };
}; };
......
This diff is collapsed.
...@@ -1040,6 +1040,29 @@ ...@@ -1040,6 +1040,29 @@
/* DA9063_REG_CONFIG_J (addr=0x10F) */ /* DA9063_REG_CONFIG_J (addr=0x10F) */
#define DA9063_TWOWIRE_TO 0x40 #define DA9063_TWOWIRE_TO 0x40
/* DA9063_REG_MON_REG_2 (addr=0x115) */
#define DA9063_LDO1_MON_EN 0x01
#define DA9063_LDO2_MON_EN 0x02
#define DA9063_LDO3_MON_EN 0x04
#define DA9063_LDO4_MON_EN 0x08
#define DA9063_LDO5_MON_EN 0x10
#define DA9063_LDO6_MON_EN 0x20
#define DA9063_LDO7_MON_EN 0x40
#define DA9063_LDO8_MON_EN 0x80
/* DA9063_REG_MON_REG_3 (addr=0x116) */
#define DA9063_LDO9_MON_EN 0x01
#define DA9063_LDO10_MON_EN 0x02
#define DA9063_LDO11_MON_EN 0x04
/* DA9063_REG_MON_REG_4 (addr=0x117) */
#define DA9063_BCORE1_MON_EN 0x04
#define DA9063_BCORE2_MON_EN 0x08
#define DA9063_BPRO_MON_EN 0x10
#define DA9063_BIO_MON_EN 0x20
#define DA9063_BMEM_MON_EN 0x40
#define DA9063_BPERI_MON_EN 0x80
/* DA9063_REG_MON_REG_5 (addr=0x116) */ /* DA9063_REG_MON_REG_5 (addr=0x116) */
#define DA9063_MON_A8_IDX_MASK 0x07 #define DA9063_MON_A8_IDX_MASK 0x07
#define DA9063_MON_A8_IDX_NONE 0x00 #define DA9063_MON_A8_IDX_NONE 0x00
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment