mbox series

[0/2] SDM670 Power Domains

Message ID 20220920021927.2489-1-mailingradian@gmail.com
Headers show
Series SDM670 Power Domains | expand

Message

Richard Acayan Sept. 20, 2022, 2:19 a.m. UTC
These are the power domains for the Qualcomm Snapdragon 670. I haven't
tried to turn on EBI with pd_ignore_unused but it is not present in the
Google's msm-4.9 vendor kernel.

 .../devicetree/bindings/power/qcom,rpmpd.yaml          |  1 +
 drivers/soc/qcom/rpmhpd.c                              | 18 ++++++++++++++++++
 include/dt-bindings/power/qcom-rpmpd.h                 | 10 ++++++++++
 3 files changed, 29 insertions(+)

Comments

Konrad Dybcio Sept. 20, 2022, 10:50 p.m. UTC | #1
On 20.09.2022 04:19, Richard Acayan wrote:
> The Snapdragon 670 has similar power domains to SDM845 but no EBI power
> domain. Add a new array for them to avoid requesting a power domain which
> is unsupported by the hardware.
> 
> Signed-off-by: Richard Acayan <mailingradian@gmail.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org>

Konrad

>  drivers/soc/qcom/rpmhpd.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/drivers/soc/qcom/rpmhpd.c b/drivers/soc/qcom/rpmhpd.c
> index 092f6ab09acf..319a2cf7e694 100644
> --- a/drivers/soc/qcom/rpmhpd.c
> +++ b/drivers/soc/qcom/rpmhpd.c
> @@ -210,6 +210,23 @@ static const struct rpmhpd_desc sa8540p_desc = {
>  	.num_pds = ARRAY_SIZE(sa8540p_rpmhpds),
>  };
>  
> +/* SDM670 RPMH powerdomains */
> +static struct rpmhpd *sdm670_rpmhpds[] = {
> +	[SDM670_CX] = &cx_w_mx_parent,
> +	[SDM670_CX_AO] = &cx_ao_w_mx_parent,
> +	[SDM670_GFX] = &gfx,
> +	[SDM670_LCX] = &lcx,
> +	[SDM670_LMX] = &lmx,
> +	[SDM670_MSS] = &mss,
> +	[SDM670_MX] = &mx,
> +	[SDM670_MX_AO] = &mx_ao,
> +};
> +
> +static const struct rpmhpd_desc sdm670_desc = {
> +	.rpmhpds = sdm670_rpmhpds,
> +	.num_pds = ARRAY_SIZE(sdm670_rpmhpds),
> +};
> +
>  /* SDM845 RPMH powerdomains */
>  static struct rpmhpd *sdm845_rpmhpds[] = {
>  	[SDM845_CX] = &cx_w_mx_parent,
> @@ -435,6 +452,7 @@ static const struct of_device_id rpmhpd_match_table[] = {
>  	{ .compatible = "qcom,sc7280-rpmhpd", .data = &sc7280_desc },
>  	{ .compatible = "qcom,sc8180x-rpmhpd", .data = &sc8180x_desc },
>  	{ .compatible = "qcom,sc8280xp-rpmhpd", .data = &sc8280xp_desc },
> +	{ .compatible = "qcom,sdm670-rpmhpd", .data = &sdm670_desc },
>  	{ .compatible = "qcom,sdm845-rpmhpd", .data = &sdm845_desc },
>  	{ .compatible = "qcom,sdx55-rpmhpd", .data = &sdx55_desc},
>  	{ .compatible = "qcom,sdx65-rpmhpd", .data = &sdx65_desc},