mbox series

[v3,0/8] arm64: dts: qcom: sa8295p: Enable GPU

Message ID 20240123-sa8295p-gpu-v3-0-d5b4474c8f33@quicinc.com
Headers show
Series arm64: dts: qcom: sa8295p: Enable GPU | expand

Message

Bjorn Andersson Jan. 24, 2024, 4:25 a.m. UTC
Due to the different PMIC configuration found in the SA8295P platform,
compared to SC8280XP, the VDD_GFX pads are supplied by an dedicated
MAX20411 LDO.

Support for expressing the regulator supply is added to the binding, the
support for enabling the parent supply for GX is added, the missing
gfx.lvl power-domain is dropped, and the DeviceTree is wired up to
enable the GPU in this configuration.

Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
---
Changes in v3:
- Removed one unnecessary empty line in DT node
- Rebased series to v6.8-rc1
- Link to v2: https://lore.kernel.org/r/20231220-sa8295p-gpu-v2-0-4763246b72c0@quicinc.com

Changes in v2:
- Made gpucc binding accept either power-domain or vdd-gfx-supply
- Updated comment in gdsc_gx_do_nothing_enable()
- Added a comment for the /delete-property/ power-domains
- Fixed node and property sort order in dts
- Switched zap firmware to use mbn file
- Link to v1: https://lore.kernel.org/r/20231220-sa8295p-gpu-v1-0-d8cdf2257f97@quicinc.com

---
Bjorn Andersson (8):
      dt-bindings: clock: qcom: Allow VDD_GFX supply to GX
      clk: qcom: gdsc: Enable supply reglator in GPU GX handler
      clk: qcom: gpucc-sc8280xp: Add external supply for GX gdsc
      soc: qcom: rpmhpd: Drop SA8540P gfx.lvl
      arm64: dts: qcom: sa8540p: Drop gfx.lvl as power-domain for gpucc
      arm64: dts: qcom: sa8295p-adp: add max20411
      arm64: dts: qcom: sa8295p-adp: Enable GPU
      arm64: defconfig: Enable MAX20411 regulator driver

 .../devicetree/bindings/clock/qcom,gpucc.yaml      | 16 +++++
 arch/arm64/boot/dts/qcom/sa8295p-adp.dts           | 68 ++++++++++++++++++++++
 arch/arm64/boot/dts/qcom/sa8540p.dtsi              |  3 +
 arch/arm64/configs/defconfig                       |  1 +
 drivers/clk/qcom/gdsc.c                            | 12 +++-
 drivers/clk/qcom/gpucc-sc8280xp.c                  |  1 +
 drivers/pmdomain/qcom/rpmhpd.c                     |  1 -
 7 files changed, 99 insertions(+), 3 deletions(-)
---
base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d
change-id: 20231220-sa8295p-gpu-51c5f343e3ec

Best regards,

Comments

Krzysztof Kozlowski Jan. 24, 2024, 6:31 a.m. UTC | #1
On 24/01/2024 05:25, Bjorn Andersson wrote:
> +# Allow either power-domains or vdd-gfx-supply, not both
> +oneOf:
> +  - required:
> +      - power-domains
> +  - required:
> +      - vdd-gfx-supply
> +  - not:
> +      anyOf:
> +        - required:
> +            - power-domains
> +        - required:
> +            - vdd-gfx-supply

I don't fully understand what you want to achieve here. If only "allow
either", so not a "require either", then simpler:

https://lore.kernel.org/all/20230118163208.GA117919-robh@kernel.org/


Best regards,
Krzysztof
Ulf Hansson Jan. 24, 2024, 9:36 a.m. UTC | #2
On Wed, 24 Jan 2024 at 05:25, Bjorn Andersson <quic_bjorande@quicinc.com> wrote:
>
> On SA8295P and SA8540P gfx.lvl is not provdied by rpmh, but rather is
> handled by an external regulator (max20411). Drop gfx.lvl from the list
> of power-domains exposed on this platform.
>
> Fixes: f68f1cb3437d ("soc: qcom: rpmhpd: add sc8280xp & sa8540p rpmh power-domains")
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>

I assume you are picking this via your tree? If not, please tell me if I should.

Before applying, please amend the prefix of commit message header to
be "pmdomain: ..."

Kind regards
Uffe

> ---
>  drivers/pmdomain/qcom/rpmhpd.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/pmdomain/qcom/rpmhpd.c b/drivers/pmdomain/qcom/rpmhpd.c
> index 3078896b1300..27a73ff72614 100644
> --- a/drivers/pmdomain/qcom/rpmhpd.c
> +++ b/drivers/pmdomain/qcom/rpmhpd.c
> @@ -217,7 +217,6 @@ static struct rpmhpd *sa8540p_rpmhpds[] = {
>         [SC8280XP_CX] = &cx,
>         [SC8280XP_CX_AO] = &cx_ao,
>         [SC8280XP_EBI] = &ebi,
> -       [SC8280XP_GFX] = &gfx,
>         [SC8280XP_LCX] = &lcx,
>         [SC8280XP_LMX] = &lmx,
>         [SC8280XP_MMCX] = &mmcx,
>
> --
> 2.25.1
>
Bjorn Andersson Jan. 24, 2024, 9:23 p.m. UTC | #3
On Wed, Jan 24, 2024 at 10:36:34AM +0100, Ulf Hansson wrote:
> On Wed, 24 Jan 2024 at 05:25, Bjorn Andersson <quic_bjorande@quicinc.com> wrote:
> >
> > On SA8295P and SA8540P gfx.lvl is not provdied by rpmh, but rather is
> > handled by an external regulator (max20411). Drop gfx.lvl from the list
> > of power-domains exposed on this platform.
> >
> > Fixes: f68f1cb3437d ("soc: qcom: rpmhpd: add sc8280xp & sa8540p rpmh power-domains")
> > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
> > Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> > Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
> 
> I assume you are picking this via your tree? If not, please tell me if I should.
> 

That sounds good, thanks.

> Before applying, please amend the prefix of commit message header to
> be "pmdomain: ..."
> 

Thanks for noticing, I will update accordingly.

Regards,
Bjorn

> Kind regards
> Uffe
> 
> > ---
> >  drivers/pmdomain/qcom/rpmhpd.c | 1 -
> >  1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/pmdomain/qcom/rpmhpd.c b/drivers/pmdomain/qcom/rpmhpd.c
> > index 3078896b1300..27a73ff72614 100644
> > --- a/drivers/pmdomain/qcom/rpmhpd.c
> > +++ b/drivers/pmdomain/qcom/rpmhpd.c
> > @@ -217,7 +217,6 @@ static struct rpmhpd *sa8540p_rpmhpds[] = {
> >         [SC8280XP_CX] = &cx,
> >         [SC8280XP_CX_AO] = &cx_ao,
> >         [SC8280XP_EBI] = &ebi,
> > -       [SC8280XP_GFX] = &gfx,
> >         [SC8280XP_LCX] = &lcx,
> >         [SC8280XP_LMX] = &lmx,
> >         [SC8280XP_MMCX] = &mmcx,
> >
> > --
> > 2.25.1
> >
Krzysztof Kozlowski Jan. 25, 2024, 7:39 a.m. UTC | #4
On 24/01/2024 22:21, Bjorn Andersson wrote:
> On Wed, Jan 24, 2024 at 07:31:34AM +0100, Krzysztof Kozlowski wrote:
>> On 24/01/2024 05:25, Bjorn Andersson wrote:
>>> +# Allow either power-domains or vdd-gfx-supply, not both
>>> +oneOf:
>>> +  - required:
>>> +      - power-domains
>>> +  - required:
>>> +      - vdd-gfx-supply
>>> +  - not:
>>> +      anyOf:
>>> +        - required:
>>> +            - power-domains
>>> +        - required:
>>> +            - vdd-gfx-supply
>>
>> I don't fully understand what you want to achieve here. If only "allow
>> either", so not a "require either", then simpler:
>>
>> https://lore.kernel.org/all/20230118163208.GA117919-robh@kernel.org/
>>
> 
> As discussed in v2, power-domains is currently an optional property in
> this binding and I'm adding vdd-gfx-supply as an alternative to that.
> 

Then go with Rob's syntax - not:required: Much easier code.

Best regards,
Krzysztof
Bjorn Andersson Jan. 25, 2024, 9 p.m. UTC | #5
On Thu, Jan 25, 2024 at 08:39:15AM +0100, Krzysztof Kozlowski wrote:
> On 24/01/2024 22:21, Bjorn Andersson wrote:
> > On Wed, Jan 24, 2024 at 07:31:34AM +0100, Krzysztof Kozlowski wrote:
> >> On 24/01/2024 05:25, Bjorn Andersson wrote:
> >>> +# Allow either power-domains or vdd-gfx-supply, not both
> >>> +oneOf:
> >>> +  - required:
> >>> +      - power-domains
> >>> +  - required:
> >>> +      - vdd-gfx-supply
> >>> +  - not:
> >>> +      anyOf:
> >>> +        - required:
> >>> +            - power-domains
> >>> +        - required:
> >>> +            - vdd-gfx-supply
> >>
> >> I don't fully understand what you want to achieve here. If only "allow
> >> either", so not a "require either", then simpler:
> >>
> >> https://lore.kernel.org/all/20230118163208.GA117919-robh@kernel.org/
> >>
> > 
> > As discussed in v2, power-domains is currently an optional property in
> > this binding and I'm adding vdd-gfx-supply as an alternative to that.
> > 
> 
> Then go with Rob's syntax - not:required: Much easier code.
> 

I looked at it, but was not able to understand that it expressed my
desired result. Now I do, and I agree with you, so will update it.

Thanks,
Bjorn