[PATCH] arm64: dts: imx8mp: add vpu pgc nodes

Greg Ungerer gerg at linux-m68k.org
Mon Mar 27 19:34:08 PDT 2023



On 28/3/23 12:15, Peng Fan wrote:
> 
> 
>> -----Original Message-----
>> From: Greg Ungerer <gerg at linux-m68k.org>
>> Sent: 2023年3月27日 21:24
>> To: Peng Fan <peng.fan at nxp.com>; Peng Fan (OSS)
>> <peng.fan at oss.nxp.com>
>> Cc: Markus.Niebel at ew.tq-group.com; aford173 at gmail.com; Aisheng Dong
>> <aisheng.dong at nxp.com>; alexander.stein at ew.tq-group.com;
>> devicetree at vger.kernel.org; festevam at gmail.com; kernel at pengutronix.de;
>> krzysztof.kozlowski+dt at linaro.org; l.stach at pengutronix.de;
>> laurent.pinchart at ideasonboard.com; linux-arm-kernel at lists.infradead.org;
>> dl-linux-imx <linux-imx at nxp.com>; linux-kernel at vger.kernel.org;
>> marex at denx.de; paul.elder at ideasonboard.com; robh+dt at kernel.org;
>> s.hauer at pengutronix.de; shawnguo at kernel.org; gerg at kernel.org
>> Subject: Re: [PATCH] arm64: dts: imx8mp: add vpu pgc nodes
>>
>> Hi Peng,
>>
>> On 27/3/23 20:01, Peng Fan wrote:
>>>> Subject: Re: [PATCH] arm64: dts: imx8mp: add vpu pgc nodes
>>>>
>>>> On 22/8/22 14:45, Peng Fan wrote:
>>>>> Add i.MX8MP PGC nodes for vpu, which are used to supply power for
>> VPU.
>>>>>
>>>>> Signed-off-by: Peng Fan <peng.fan at nxp.com>
>>>>> Signed-off-by: Shawn Guo <shawnguo at kernel.org>
>>>>> ---
>>>>>    arch/arm64/boot/dts/freescale/imx8mp.dtsi | 27
>>>>> +++++++++++++++++++++++
>>>>>    1 file changed, 27 insertions(+)
>>>>>
>>>>> diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
>>>>> b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
>>>>> index 0b165f98a82c..34af983b0210 100644
>>>>> --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
>>>>> +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
>>>>> @@ -598,6 +598,33 @@ pgc_ispdwp: power-domain at 18 {
>>>>>                                                   reg =
>>>> <IMX8MP_POWER_DOMAIN_MEDIAMIX_ISPDWP>;
>>>>>                                                   clocks = <&clk
>> IMX8MP_CLK_MEDIA_ISP_ROOT>;
>>>>>                                           };
>>>>> +
>>>>> +                                       pgc_vpumix: power-domain at 19 {
>>>>> +                                               #power-domain-cells = <0>;
>>>>> +                                               reg = <IMX8MP_POWER_DOMAIN_VPUMIX>;
>>>>> +                                               clocks =<&clk IMX8MP_CLK_VPU_ROOT>;
>>>>> +                                       };
>>>>> +
>>>>> +                                       pgc_vpu_g1: power-domain at 20 {
>>>>> +                                               #power-domain-cells = <0>;
>>>>> +                                               power-domains = <&pgc_vpumix>;
>>>>> +                                               reg = <IMX8MP_POWER_DOMAIN_VPU_G1>;
>>>>> +                                               clocks = <&clk IMX8MP_CLK_VPU_G1_ROOT>;
>>>>> +                                       };
>>>>> +
>>>>> +                                       pgc_vpu_g2: power-domain at 21 {
>>>>> +                                               #power-domain-cells = <0>;
>>>>> +                                               power-domains = <&pgc_vpumix>;
>>>>> +                                               reg = <IMX8MP_POWER_DOMAIN_VPU_G2>;
>>>>> +                                               clocks = <&clk IMX8MP_CLK_VPU_G2_ROOT>;
>>>>> +                                       };
>>>>> +
>>>>> +                                       pgc_vpu_vc8000e: power-domain at 22 {
>>>>> +                                               #power-domain-cells = <0>;
>>>>> +                                               power-domains = <&pgc_vpumix>;
>>>>> +                                               reg =
>>>> <IMX8MP_POWER_DOMAIN_VPU_VC8000E>;
>>>>> +                                               clocks = <&clk
>>>> IMX8MP_CLK_VPU_VC8KE_ROOT>;
>>>>> +                                       };
>>>>>                                   };
>>>>>                           };
>>>>>                   };
>>>>
>>>> This change causes new error messages to come out during boot, for
>>>> example:
>>>>
>>>>       ...
>>>>       imx-pgc imx-pgc-domain.8: failed to command PGC
>>>>       imx-pgc imx-pgc-domain.8: failed to command PGC
>>>>       imx-pgc imx-pgc-domain.8: failed to command PGC
>>>>       30890000.serial: ttymxc1 at MMIO 0x30890000 (irq = 197,
>>>> base_baud =
>>>> 1500000) is a IMX
>>>>       ...
>>>>       hwmon hwmon1: temp1_input not attached to any thermal zone
>>>>       imx-pgc imx-pgc-domain.8: failed to command PGC
>>>>       imx-pgc imx-pgc-domain.8: failed to command PGC
>>>>       imx-pgc imx-pgc-domain.8: failed to command PGC
>>>>       ...
>>>>
>>>> They don't seem to cause any problems on the hardware I am using,
>>>> well, at least not that I have found so far.
>>>>
>>>> This first appeared for me in linux-6.1. But it is the same in todays
>>>> linux 6.3- rc4. Reverting this change (not completely trivial due to
>>>> a couple of commits after it that rely on it) fixes it - no more errors.
>>> [Peng Fan]
>>>
>>> The VPU BLK CTRL seems not enabled.
>>
>> How to enable it?
>> I have the blk-ctrl config options enabled:
>>
>>       #
>>       # i.MX SoC drivers
>>       #
>>       CONFIG_IMX_GPCV2_PM_DOMAINS=y
>>       CONFIG_SOC_IMX8M=y
>>       CONFIG_SOC_IMX9=y
>>       CONFIG_IMX8M_BLK_CTRL=y
>>       CONFIG_IMX9_BLK_CTRL=y
>>       # end of i.MX SoC drivers
>>
>> Running with the full arm64 defconfig and using the imx8mp-evk.dtb still
>> outputs these messages:
>>
>>       [   18.150679] imx-pgc imx-pgc-domain.8: failed to command PGC
>>       [   18.159241] imx-pgc imx-pgc-domain.8: failed to command PGC
>>       [   18.167822] imx-pgc imx-pgc-domain.8: failed to command PGC
>>
>> Or do you mean something more fundamental, like the hardware block not
>> being enabled by boot loader?  (Something to keep in mind is that the
>> platform I am using has no video output, only serial console).
> [Peng Fan]
> 
> The imx8mp vpu blk ctrl already in imx8m-blk-ctrl.c, so it should work.
> Have you enabled imx8mp interconnect driver?
> CONFIG_INTERCONNECT_IMX8MP

Yes, it is enabled:

     CONFIG_INTERCONNECT=y
     CONFIG_INTERCONNECT_IMX=y
     # CONFIG_INTERCONNECT_IMX8MM is not set
     # CONFIG_INTERCONNECT_IMX8MN is not set
     # CONFIG_INTERCONNECT_IMX8MQ is not set
     CONFIG_INTERCONNECT_IMX8MP=y

Regards
Greg





More information about the linux-arm-kernel mailing list