Skip to contentSkip to conversation

regulator: act8865: add input supply handling

PATCH Superseded Heiko Stuebner 2 participants 5 messages Mar 7, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 regulator: act8865: add input supply handling

The act8846/act8865 regulators have a number of input supplies supplying the individual regulators. This may even be recursively like on most Rockchip boards using the act8846 where REG4 is most of the time connected to the inl1-supply.

Therefore add the ability to specify the input supplies for the individual inputs. The input-names are taken from the datasheets of both act8846 and act8865.

---
 .../bindings/regulator/act8865-regulator.txt       | 16 +++++++++
 drivers/regulator/act8865-regulator.c              | 41 +++++++++++-----------
 2 files changed, 37 insertions(+), 20 deletions(-)
Documentation/devicetree/bindings/regulator/act8865-regulator.txt +16 -0
index dad6358..45028bb 100644
@@ -9,6 +9,22 @@ Optional properties:
 - system-power-controller: Telling whether or not this pmic is controlling
   the system power. See Documentation/devicetree/bindings/power/power-controller.txt .
 
+Optional input supply properties:
+- for act8846:
+  - vp1-supply:  The input supply for REG1
+  - vp2-supply:  The input supply for REG2
+  - vp3-supply:  The input supply for REG3
+  - vp4-supply:  The input supply for REG4
+  - inl1-supply:  The input supply for REG5, REG6 and REG7
+  - inl2-supply:  The input supply for REG8 and LDO_REG9
+  - inl3-supply:  The input supply for REG10, REG11 and REG12
+- for act8865:
+  - vp1-supply:  The input supply for DCDC_REG1
+  - vp2-supply:  The input supply for DCDC_REG2
+  - vp3-supply:  The input supply for DCDC_REG3
+  - inl45-supply:  The input supply for LDO_REG1 and LDO_REG2
+  - inl67-supply:  The input supply for LDO_REG3 and LDO_REG4
+
 Any standard regulator properties can be used to configure the single regulator.
 
 The valid names for regulators are:
drivers/regulator/act8865-regulator.c +21 -20

58 lines not on this page · raw message

Signature · 1 line
2.1.4
#1 lore raw

PATCH 2/2 ARM: dts: rockchip: add input supplies for the act8846 on Radxa Rock

On the Radxa Rock board most supplies come from the static 5v vsys supply, but the inl1-supply comes from the REG4 of the act8846 itself. Model this dependency using the added supply-handling to make sure the supplying regulator gets handled correctly and not accidentially turned off.

---
I'll apply this one to my dts branch myself, if patch 1/2 is accepted

 arch/arm/boot/dts/rk3188-radxarock.dts | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/arm/boot/dts/rk3188-radxarock.dts +16 -0
index 9a09579..bdf8570 100644
@@ -103,6 +103,14 @@
 		regulator-always-on;
 		regulator-boot-on;
 	};
+
+	vsys: vsys-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "vsys";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		regulator-boot-on;
+	};
 };
 
 &emac {
@@ -148,6 +156,14 @@
 		pinctrl-names = "default";
 		pinctrl-0 = <&act8846_dvs0_ctl>;
 
+		vp1-supply = <&vsys>;
+		vp2-supply = <&vsys>;
+		vp3-supply = <&vsys>;
+		vp4-supply = <&vsys>;
+		inl1-supply = <&vcc_io>;
+		inl2-supply = <&vsys>;
+		inl3-supply = <&vsys>;
+
 		regulators {
 			vcc_ddr: REG1 {
 				regulator-name = "VCC_DDR";
Signature · 1 line
2.1.4
maintainer
#2 lore raw
In reply to Heiko Stuebner
Quoted 2 lines · Heiko Stuebner

The act8846/act8865 regulators have a number of input supplies supplying the individual regulators. This may even be recursively like on most Rockchip boards

This doesn't apply against current code, please check and resend.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150307/48e81323/attachment.sig>

#3 lore raw

PATCH v2 1/2 regulator: act8865: add input supply handling

The act88600/act8846/act8865 regulators have a number of input supplies supplying the individual regulators. This may even be recursively like on most Rockchip boards using the act8846 where REG4 is most of the time connected to the inl1-supply.

Therefore add the ability to specify the input supplies for the individual inputs. The input-names are taken from the datasheets of act8600, act8846 and act8865. On the act8600 some regulators do not have separate input supplies.

---
changes since v1:
adapt to newly added act8600 support. In contrast to the previous 2 chips some regulators of the act8600 do not seem to have separate input supplies.

 .../bindings/regulator/act8865-regulator.txt       | 22 +++++++++
 drivers/regulator/act8865-regulator.c              | 55 +++++++++++-----------
 2 files changed, 50 insertions(+), 27 deletions(-)
Documentation/devicetree/bindings/regulator/act8865-regulator.txt +22 -0
index e170df2..e91485d 100644
@@ -9,6 +9,28 @@ Optional properties:
 - system-power-controller: Telling whether or not this pmic is controlling
   the system power. See Documentation/devicetree/bindings/power/power-controller.txt .
 
+Optional input supply properties:
+- for act8600:
+  - vp1-supply: The input supply for DCDC_REG1
+  - vp2-supply: The input supply for DCDC_REG2
+  - vp3-supply: The input supply for DCDC_REG3
+  - inl-supply: The input supply for LDO_REG5, LDO_REG6, LDO_REG7 and LDO_REG8
+  SUDCDC_REG4, LDO_REG9 and LDO_REG10 do not have separate supplies.
+- for act8846:
+  - vp1-supply: The input supply for REG1
+  - vp2-supply: The input supply for REG2
+  - vp3-supply: The input supply for REG3
+  - vp4-supply: The input supply for REG4
+  - inl1-supply: The input supply for REG5, REG6 and REG7
+  - inl2-supply: The input supply for REG8 and LDO_REG9
+  - inl3-supply: The input supply for REG10, REG11 and REG12
+- for act8865:
+  - vp1-supply: The input supply for DCDC_REG1
+  - vp2-supply: The input supply for DCDC_REG2
+  - vp3-supply: The input supply for DCDC_REG3
+  - inl45-supply: The input supply for LDO_REG1 and LDO_REG2
+  - inl67-supply: The input supply for LDO_REG3 and LDO_REG4
+
 Any standard regulator properties can be used to configure the single regulator.
 
 The valid names for regulators are:
drivers/regulator/act8865-regulator.c +28 -27

84 lines not on this page · raw message

Signature · 1 line
2.1.4
maintainer
#4 lore raw
Quoted 4 lines · Heiko Stuebner

The act88600/act8846/act8865 regulators have a number of input supplies supplying the individual regulators. This may even be recursively like on most Rockchip boards using the act8846 where REG4 is most of the time connected to the inl1-supply.

Applied, thanks. The recursive supplies are very common - DCDCs are
vastly more efficient than LDOs so if you've got the capacity and care
about power it's much better to drop your main supply voltage down to
something near the LDO headroom with a DCDC in order to improve system
performance.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150307/2a52fb38/attachment.sig>