• Stephan Gerhold's avatar
    remoteproc: qcom_wcnss: Allow replacing regulators with power domains · 858bce9c
    Stephan Gerhold authored
    
    
    So far we have been doing all proxy votes by voting for raw voltages/load
    through the regulator interface. But actually VDDCX and VDDMX represent
    power domains that should be preferably managed using corner votes
    through the power domain interface.
    
    Looking closer the code was actually never doing the proxy votes
    correctly: The vddcx regulator is specified as:
    
    	{ "vddcx", .super_turbo = true },
    
    which is supposed to say that we should vote for the maximum corner
    of the VDDCX power domain. But actually "super_turbo" is unused so
    all we did so far is to enable the power domain. We did not vote for
    it to scale to the maximum performance state.
    
    Using them through the power domain interface allows voting for the
    maximum performance state. However, we still need to support using
    them through the regulator interface for old device trees.
    
    The way this is implemented here is that we check if attaching the
    two power domain succeeds. If yes, we skip the first "num_pd_vregs"
    regulators in the "vregs" list and only request the remaining ones.
    Signed-off-by: default avatarStephan Gerhold <stephan@gerhold.net>
    Link: https://lore.kernel.org/r/20200916104135.25085-9-stephan@gerhold.net
    
    Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
    858bce9c
qcom_wcnss.c 16.3 KB