From: Stefano Babic <sbabic@denx.de>
To: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>, Stefano Babic <sbabic@denx.de>
Cc: "festevam@gmail.com" <festevam@gmail.com>,
"u-boot@lists.denx.de" <u-boot@lists.denx.de>,
dl-uboot-imx <uboot-imx@nxp.com>, Ye Li <ye.li@nxp.com>
Subject: Re: [PATCH V2 19/26] imx: imx8ulp_evk: Power down the domains may used in u-boot
Date: Wed, 13 Apr 2022 09:45:13 +0200 [thread overview]
Message-ID: <cc087af4-3527-ef67-e302-63e4b62bbbb5@denx.de> (raw)
In-Reply-To: <4963df3b-ba38-5d33-ab57-ecb5344971a6@oss.nxp.com>
Hi Peng,
On 13.04.22 05:00, Peng Fan (OSS) wrote:
> Hi Stefano,
>
> On 2022/4/13 1:10, Stefano Babic wrote:
>> Hi Peng,Ye,
>>
>> On 06.04.22 08:30, Peng Fan (OSS) wrote:
>>> From: Ye Li <ye.li@nxp.com>
>>>
>>> Since ATF power domain will hold the enable counter for each power
>>> domain,
>>> We need to power off them before entering kernel to avoid this
>>> power domain can't be really powered off.
>>>
>>> Signed-off-by: Ye Li <ye.li@nxp.com>
>>> Signed-off-by: Peng Fan <peng.fan@nxp.com>
>>> ---
>>> board/freescale/imx8ulp_evk/imx8ulp_evk.c | 30
>>> +++++++++++++++++++++++
>>> 1 file changed, 30 insertions(+)
>>>
>>> diff --git a/board/freescale/imx8ulp_evk/imx8ulp_evk.c
>>> b/board/freescale/imx8ulp_evk/imx8ulp_evk.c
>>> index b61a4cfbe8d..1bd308148f3 100644
>>> --- a/board/freescale/imx8ulp_evk/imx8ulp_evk.c
>>> +++ b/board/freescale/imx8ulp_evk/imx8ulp_evk.c
>>> @@ -13,6 +13,8 @@
>>> #include <miiphy.h>
>>> #include <netdev.h>
>>> #include <asm/gpio.h>
>>> +#include <power-domain.h>
>>> +#include <dt-bindings/power/imx8ulp-power.h>
>>
>> But which patch is adding the file above ? I cannot find it, it is not
>> part of this series and of course build is broken without it.
>
> V5 patchset should not have such issue. I just see you already picked up
> V5 in your repo.
>
Which series are you talking about ? This series is in V2, and yes, I
merged the whole series with the exception of this patch, but none of
the applied patches added imx8ulp-power.h.
Regards,
Stefano
> Thanks,
> Peng.
>
>>
>> Best regards,
>> Stefano
>>
>>> DECLARE_GLOBAL_DATA_PTR;
>>> @@ -129,3 +131,31 @@ int board_late_init(void)
>>> {
>>> return 0;
>>> }
>>> +
>>> +void board_quiesce_devices(void)
>>> +{
>>> + /* Disable the power domains may used in u-boot before entering
>>> kernel */
>>> +#if CONFIG_IS_ENABLED(POWER_DOMAIN)
>>> + struct udevice *scmi_devpd;
>>> + int ret, i;
>>> + struct power_domain pd;
>>> + ulong ids[] = { IMX8ULP_PD_FLEXSPI2, IMX8ULP_PD_USB0,
>>> IMX8ULP_PD_USDHC0,
>>> + IMX8ULP_PD_USDHC1, IMX8ULP_PD_USDHC2_USB1,
>>> IMX8ULP_PD_DCNANO,
>>> + IMX8ULP_PD_MIPI_DSI };
>>> +
>>> + ret = uclass_get_device(UCLASS_POWER_DOMAIN, 0, &scmi_devpd);
>>> + if (ret) {
>>> + printf("Cannot get scmi devpd: err=%d\n", ret);
>>> + return;
>>> + }
>>> +
>>> + pd.dev = scmi_devpd;
>>> +
>>> + for (i = 0; i < ARRAY_SIZE(ids); i++) {
>>> + pd.id = ids[i];
>>> + ret = power_domain_off(&pd);
>>> + if (ret)
>>> + printf("power_domain_off %lu failed: err=%d\n", ids[i],
>>> ret);
>>> + }
>>> +#endif
>>> +}
>>
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
next prev parent reply other threads:[~2022-04-13 7:45 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-06 6:30 [PATCH V2 00/26] imx: imx8ulp: misc update from downstream Peng Fan (OSS)
2022-04-06 6:30 ` [PATCH V2 01/26] imx: imx8ulp: Set COUNTER_FREQUENCY to 1Mhz Peng Fan (OSS)
2022-04-12 18:43 ` sbabic
2022-04-06 6:30 ` [PATCH V2 02/26] imx: imx8ulp: include pcc/cgc header in clock header Peng Fan (OSS)
2022-04-12 18:46 ` sbabic
2022-04-06 6:30 ` [PATCH V2 03/26] imx: imx8ulp: Add M33 handshake functions Peng Fan (OSS)
2022-04-12 18:46 ` sbabic
2022-04-06 6:30 ` [PATCH V2 04/26] imx: imx8ulp: clock: Add clock support for i3c controller Peng Fan (OSS)
2022-04-12 18:44 ` sbabic
2022-04-06 6:30 ` [PATCH V2 05/26] imx: imx8ulp: add CAAM clock entry Peng Fan (OSS)
2022-04-12 18:43 ` sbabic
2022-04-06 6:30 ` [PATCH V2 06/26] imx: imx8ulp_evk: Remove PMIC Bucks PWM mode settings Peng Fan (OSS)
2022-04-12 18:42 ` sbabic
2022-04-06 6:30 ` [PATCH V2 07/26] imx: imx8ulp: add ND/LD clock Peng Fan (OSS)
2022-04-12 18:43 ` sbabic
2022-04-06 6:30 ` [PATCH V2 08/26] imx: imx8ulp_evk: Skip init DDR for reboot in dual boot mode Peng Fan (OSS)
2022-04-12 18:45 ` sbabic
2022-04-06 6:30 ` [PATCH V2 09/26] imx: imx8ulp: cgc: Switch to NICLPAV to FRO192 before PLL4 init Peng Fan (OSS)
2022-04-12 18:45 ` sbabic
2022-04-06 6:30 ` [PATCH V2 10/26] imx: imx8ulp: enable MU0_B clk by default Peng Fan (OSS)
2022-04-12 18:46 ` sbabic
2022-04-06 6:30 ` [PATCH V2 11/26] misc: imx8ulp: Add OEM SRK Hash fuse support Peng Fan (OSS)
2022-04-12 18:46 ` sbabic
2022-04-06 6:30 ` [PATCH V2 12/26] imx: imx8ulp: Change LPAV assignment for dual boot Peng Fan (OSS)
2022-04-12 18:42 ` sbabic
2022-04-06 6:30 ` [PATCH V2 13/26] imx: imx8ulp: Load the lposc fuse " Peng Fan (OSS)
2022-04-12 18:47 ` sbabic
2022-04-06 6:30 ` [PATCH V2 14/26] misc: S400_API: add ahab_release_caam Peng Fan (OSS)
2022-04-12 18:41 ` sbabic
2022-04-06 6:30 ` [PATCH V2 15/26] misc: S400_API: Update S400 API for buffer dump Peng Fan (OSS)
2022-04-12 18:47 ` sbabic
2022-04-06 6:30 ` [PATCH V2 16/26] imx: imx8ulp: release CAAM for the Cortex-A35 Peng Fan (OSS)
2022-04-12 18:47 ` sbabic
2022-04-06 6:30 ` [PATCH V2 17/26] imx: imx8ulp_evk: Update LPDDR4 PHY settings Peng Fan (OSS)
2022-04-12 18:42 ` sbabic
2022-04-06 6:30 ` [PATCH V2 18/26] imx: imx8ulp_evk: call the handshake with M33 Peng Fan (OSS)
2022-04-12 18:47 ` sbabic
2022-04-06 6:30 ` [PATCH V2 19/26] imx: imx8ulp_evk: Power down the domains may used in u-boot Peng Fan (OSS)
2022-04-12 17:10 ` Stefano Babic
2022-04-13 3:00 ` Peng Fan (OSS)
2022-04-13 7:45 ` Stefano Babic [this message]
2022-04-06 6:30 ` [PATCH V2 20/26] imx: dynamic setting mmcdev and mmcroot Peng Fan (OSS)
2022-04-12 18:45 ` sbabic
2022-04-25 19:58 ` Tim Harvey
2022-04-26 11:24 ` Peng Fan (OSS)
2022-04-06 6:30 ` [PATCH V2 21/26] imx: imx8ulp_evk: Enable SD/MMC port auto detect Peng Fan (OSS)
2022-04-12 18:46 ` sbabic
2022-04-06 6:30 ` [PATCH V2 22/26] imx: imx8ulp: enable wdog_ad interrupt in CMC1 Peng Fan (OSS)
2022-04-12 18:47 ` sbabic
2022-04-06 6:30 ` [PATCH V2 23/26] imx: imx8ulp: reserve tee memory Peng Fan (OSS)
2022-04-12 18:43 ` sbabic
2022-04-06 6:30 ` [PATCH V2 24/26] imx: imx8ulp_evk: enlarge CONFIG_NR_DRAM_BANKS Peng Fan (OSS)
2022-04-12 18:43 ` sbabic
2022-04-06 6:30 ` [PATCH V2 25/26] imx: imx8ulp_evk: Enable multiple env storage devices Peng Fan (OSS)
2022-04-12 18:43 ` sbabic
2022-04-06 6:30 ` [PATCH V2 26/26] misc: imx8ulp: Update fuse driver Peng Fan (OSS)
2022-04-12 18:46 ` sbabic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cc087af4-3527-ef67-e302-63e4b62bbbb5@denx.de \
--to=sbabic@denx.de \
--cc=festevam@gmail.com \
--cc=peng.fan@oss.nxp.com \
--cc=u-boot@lists.denx.de \
--cc=uboot-imx@nxp.com \
--cc=ye.li@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox