diff mbox series

[V4,11/13] dt-bindings: regulator: add DVFSRC regulator dt-bindings

Message ID 1584092066-24425-12-git-send-email-henryc.chen@mediatek.com (mailing list archive)
State New, archived
Headers show
Series Add driver for dvfsrc, support for active state of scpsys | expand

Commit Message

Henry Chen March 13, 2020, 9:34 a.m. UTC
From: "henryc.chen" <henryc.chen@mediatek.com>

Add a regulator as sub device into dvfsrc dt-bindings for MT8183.

Signed-off-by: Henry Chen <henryc.chen@mediatek.com>
---
 Documentation/devicetree/bindings/soc/mediatek/dvfsrc.txt | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

Comments

Mark Brown March 24, 2020, 8:38 p.m. UTC | #1
On Fri, Mar 13, 2020 at 05:34:24PM +0800, Henry Chen wrote:

> +- regulator : The DVFSRC regulator is modelled as a subdevice of the DVFSRC.
> +	Because DVFSRC can request power directly via register read/write, likes
> +	vcore which is a core power of mt8183. As such, the DVFSRC regulator
> +	requires that DVFSRC nodes be present. shall contain only one of the
> +	following: "mediatek,mt8183-dvfsrc-regulator"

Why do we even need a compatible here - it's not adding any new
information to the parent mt8183 node, the compatible is mainly for the
way Linux divides things up rather than a description of the hardware.
We could just say that the regulator node always has a particular name
instead.

It's also not quite true that it contains "only" the compatible - it
also allows the regulator constraints to be defined.
Henry Chen March 30, 2020, 5:19 a.m. UTC | #2
Hi Mark,
On Tue, 2020-03-24 at 20:38 +0000, Mark Brown wrote:
> On Fri, Mar 13, 2020 at 05:34:24PM +0800, Henry Chen wrote:
> 
> > +- regulator : The DVFSRC regulator is modelled as a subdevice of the DVFSRC.
> > +	Because DVFSRC can request power directly via register read/write, likes
> > +	vcore which is a core power of mt8183. As such, the DVFSRC regulator
> > +	requires that DVFSRC nodes be present. shall contain only one of the
> > +	following: "mediatek,mt8183-dvfsrc-regulator"
> 
> Why do we even need a compatible here - it's not adding any new
> information to the parent mt8183 node, the compatible is mainly for the
> way Linux divides things up rather than a description of the hardware.
> We could just say that the regulator node always has a particular name
> instead.
Sorry, not quite sure what you mean, because I think DVFSRC is a
regulator provider that can provide vcore voltage control on mt8183, and
it can provide more power control in the next generation Mediatek SOC.
Here I add a sub-node to describe it. Or should I move this node to
regulator folder? 

> 
> It's also not quite true that it contains "only" the compatible - it
> also allows the regulator constraints to be defined.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/soc/mediatek/dvfsrc.txt b/Documentation/devicetree/bindings/soc/mediatek/dvfsrc.txt
index da98ec9..80f09c0 100644
--- a/Documentation/devicetree/bindings/soc/mediatek/dvfsrc.txt
+++ b/Documentation/devicetree/bindings/soc/mediatek/dvfsrc.txt
@@ -17,6 +17,11 @@  Required Properties:
 	The provider is able to communicate with the DVFSRC and send the dram
 	bandwidth to it. shall contain only one of the following:
 	"mediatek,mt8183-emi"
+- regulator : The DVFSRC regulator is modelled as a subdevice of the DVFSRC.
+	Because DVFSRC can request power directly via register read/write, likes
+	vcore which is a core power of mt8183. As such, the DVFSRC regulator
+	requires that DVFSRC nodes be present. shall contain only one of the
+	following: "mediatek,mt8183-dvfsrc-regulator"
 
 Example:
 
@@ -29,4 +34,13 @@  Example:
 			compatible = "mediatek,mt8183-emi";
 			#interconnect-cells = <1>;
 		};
+		dvfsrc-regulator {
+			compatible = "mediatek,mt8183-dvfsrc-regulator";
+			dvfsrc_vcore: dvfsrc-vcore {
+				regulator-name = "dvfsrc-vcore";
+				regulator-min-microvolt = <725000>;
+				regulator-max-microvolt = <800000>;
+				regulator-always-on;
+			};
+		};
 	};