On Thu, Jun 4, 2020 at 4:46 PM Pavel Machek wrote: > > Hi! > > > From: Viresh Kumar > > > > commit ffdb8cc7a27c89175e541e68e2a73f1f63ab8c6b upstream. > > > > Depending on the version of hardware or its properties, which are only > > known at runtime, various properties of the OPP can change. For example, > > an OPP with frequency 1.2 GHz, may have different voltage/current > > requirements based on the version of the hardware it is running on. > > > > In order to not replicate the same OPP tables for varying values of all > > such fields, this commit introduces the concept of opp-property-. > > The can be chosen by the platform at runtime, and OPPs will be > > initialized depending on that name string. Currently support is extended > > for the following properties: > > - opp-microvolt- > > - opp-microamp- > > That's really quite "interesting" design. I wondered if devicetree > people are okay with that. > > > If the name string isn't provided by the platform, or if it is provided > > but doesn't match the properties present in the OPP node, we will fall > > back to the original properties without the - string, if they are > > available. > > > > Reviewed-by: Stephen Boyd > > Signed-off-by: Viresh Kumar > > Signed-off-by: Rafael J. Wysocki > > Signed-off-by: Chen-Yu Tsai (Moxa) > > But, interestingly, their review tag is missing...? > > As this is mainline, I don't think we need to do anything here. I > wonder how this kind of "wildcard" property names will play with new > yml format or automatic device tree checks. The new bindings format can take regex for node names and property names, so that itself shouldn't be an issue. The name itself is likely hardware specific so there's not much the automatic checker can do either. ChenYu > Best regards, > Pavel > > > +++ b/Documentation/devicetree/bindings/opp/opp.txt > > @@ -100,6 +100,14 @@ Optional properties: > > Entries for multiple regulators must be present in the same order as > > regulators are specified in device's DT node. > > > > +- opp-microvolt-: Named opp-microvolt property. This is exactly similar to > > + the above opp-microvolt property, but allows multiple voltage ranges to be > > + provided for the same OPP. At runtime, the platform can pick a and > > + matching opp-microvolt- property will be enabled for all OPPs. If the > > + platform doesn't pick a specific or the doesn't match with any > > + opp-microvolt- properties, then opp-microvolt property shall be used, if > > + present. > > + > > - opp-microamp: The maximum current drawn by the device in microamperes > > considering system specific parameters (such as transients, process, aging, > > maximum operating temperature range etc.) as necessary. This may be used to > > -- > DENX Software Engineering GmbH, Managing Director: Wolfgang Denk > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany