Re: System can not go into suspend when remoteproc is probed on AM62X

2025-07-29 Thread Hiago De Franco
On Sat, Jul 26, 2025 at 12:48:14PM -0500, Andrew Davis wrote: > On 7/26/25 9:39 AM, Hiago De Franco wrote: > > Hi Andrew, Beleswar, > > > > On Fri, Jul 25, 2025 at 02:29:22PM -0500, Andrew Davis wrote: > > > > > > So the issue then looks to be this messa

Re: System can not go into suspend when remoteproc is probed on AM62X

2025-07-26 Thread Hiago De Franco
Hi Andrew, Beleswar, On Fri, Jul 25, 2025 at 02:29:22PM -0500, Andrew Davis wrote: > > So the issue then looks to be this message we send here when we setup > the mailbox[0]. This mailbox setup is done during probe() for the K3 > rproc drivers now (mailbox setup used to be done during > rproc_{st

Re: System can not go into suspend when remoteproc is probed on AM62X

2025-07-25 Thread Hiago De Franco
Hi Andrew, On Fri, Jul 25, 2025 at 02:29:22PM -0500, Andrew Davis wrote: > So the issue then looks to be this message we send here when we setup > the mailbox[0]. This mailbox setup is done during probe() for the K3 > rproc drivers now (mailbox setup used to be done during > rproc_{start,attach}()

System can not go into suspend when remoteproc is probed on AM62X

2025-07-25 Thread Hiago De Franco
Hello everyone, I noticed something that I am trying to debug, maybe you have any idea or tips to help me debugging this issue. On AM62 and AM62P SoCs that I tested, when the remote proc driver is probed, suspend to RAM mode does not work anymore. Without the remote proc driver enabled, everythin

Re: [PATCH v7 3/3] remoteproc: imx_rproc: detect and attach to pre-booted remote cores

2025-07-16 Thread Hiago De Franco
On Wed, Jul 16, 2025 at 08:56:37PM +0200, Ulf Hansson wrote: > On Wed, 16 Jul 2025 at 19:23, Hiago De Franco wrote: > > > > On Wed, Jul 16, 2025 at 10:50:08AM -0600, Mathieu Poirier wrote: > > > On Wed, Jul 16, 2025 at 10:25:52AM -0300, Hiago De Franco wrote:

[PATCH v8] remoteproc: imx_rproc: detect and attach to pre-booted remote cores

2025-07-16 Thread Hiago De Franco
From: Hiago De Franco When the Cortex-M remote core is started and already running before Linux boots (typically by the Cortex-A bootloader using a command like bootaux), the current driver is unable to attach to it. This is because the driver only checks for remote cores running in different

Re: [PATCH v7 3/3] remoteproc: imx_rproc: detect and attach to pre-booted remote cores

2025-07-16 Thread Hiago De Franco
On Wed, Jul 16, 2025 at 10:50:08AM -0600, Mathieu Poirier wrote: > On Wed, Jul 16, 2025 at 10:25:52AM -0300, Hiago De Franco wrote: > > Hi Mathieu, Ulf, > > > > On Tue, Jul 15, 2025 at 09:32:44AM -0600, Mathieu Poirier wrote: > > > On Sun, Jun 29, 2025 at 02:25:12P

Re: [PATCH v7 3/3] remoteproc: imx_rproc: detect and attach to pre-booted remote cores

2025-07-16 Thread Hiago De Franco
Hi Mathieu, Ulf, On Tue, Jul 15, 2025 at 09:32:44AM -0600, Mathieu Poirier wrote: > On Sun, Jun 29, 2025 at 02:25:12PM -0300, Hiago De Franco wrote: > > From: Hiago De Franco > > > > When the Cortex-M remote core is started and already running before > > Linux boots

Re: [PATCH] remoteproc: imx_rproc: merge ITCM and DTCM regions

2025-07-10 Thread Hiago De Franco
On Wed, Jul 09, 2025 at 04:26:52PM +0800, Peng Fan wrote: > On Tue, Jul 08, 2025 at 02:29:53PM -0300, Hiago De Franco wrote: > >Hi Peng, Mathieu, > > > >On Mon, Jul 07, 2025 at 10:13:02AM -0600, Mathieu Poirier wrote: > >> On Fri, Jul 04, 2025 at 04:08:16PM -0300, Hi

Re: [PATCH] remoteproc: imx_rproc: merge ITCM and DTCM regions

2025-07-08 Thread Hiago De Franco
Hi Peng, Mathieu, On Mon, Jul 07, 2025 at 10:13:02AM -0600, Mathieu Poirier wrote: > On Fri, Jul 04, 2025 at 04:08:16PM -0300, Hiago De Franco wrote: > > Hi Mathieu, > > > > On Fri, Jul 04, 2025 at 10:25:19AM -0600, Mathieu Poirier wrote: > > > Good morning, > &

Re: [PATCH] remoteproc: imx_rproc: merge ITCM and DTCM regions

2025-07-04 Thread Hiago De Franco
Hi Mathieu, On Fri, Jul 04, 2025 at 10:25:19AM -0600, Mathieu Poirier wrote: > Good morning, > > On Thu, Jul 03, 2025 at 10:08:31AM -0300, Hiago De Franco wrote: > > From: Hiago De Franco > > > > Merge the contiguous ITCM and DTCM regions into a single region t

[PATCH] remoteproc: imx_rproc: merge ITCM and DTCM regions

2025-07-03 Thread Hiago De Franco
From: Hiago De Franco Merge the contiguous ITCM and DTCM regions into a single region to prevent failures when loading ELF files with large sections: remoteproc remoteproc0: powering up imx-rproc remoteproc remoteproc0: Booting fw image rproc-imx-rproc-fw, size 151824 imx-rproc imx8mp-cm7

[PATCH v7 0/3] remoteproc: imx_rproc: allow attaching to running core kicked by the bootloader

2025-06-29 Thread Hiago De Franco
From: Hiago De Franco This patch series depends on Ulf's patches that are currently under review, "pmdomain: Add generic ->sync_state() support to genpd" [1]. Without them, this series is not going to work. For the i.MX8X and i.MX8 family SoCs, currently when the remotecore

[PATCH v7 3/3] remoteproc: imx_rproc: detect and attach to pre-booted remote cores

2025-06-29 Thread Hiago De Franco
From: Hiago De Franco When the Cortex-M remote core is started and already running before Linux boots (typically by the Cortex-A bootloader using a command like bootaux), the current driver is unable to attach to it. This is because the driver only checks for remote cores running in different

[PATCH v7 2/3] remoteproc: imx_rproc: skip clock enable when M-core is managed by the SCU

2025-06-29 Thread Hiago De Franco
From: Hiago De Franco For the i.MX8X and i.MX8 family SoCs, when the Cortex-M core is powered up and started by the Cortex-A core using the bootloader (e.g., via the U-Boot bootaux command), both M-core and Linux run within the same SCFW (System Controller Firmware) partition. With that, Linux

[PATCH v7 1/3] pmdomain: core: introduce dev_pm_genpd_is_on()

2025-06-29 Thread Hiago De Franco
From: Hiago De Franco This helper function returns the current power status of a given generic power domain. As example, remoteproc/imx_rproc.c can now use this function to check the power status of the remote core to properly set "attached" or "offline" modes. Sugge

Re: [PATCH v6 0/3] remoteproc: imx_rproc: allow attaching to running core kicked by the bootloader

2025-06-29 Thread Hiago De Franco
On Fri, Jun 27, 2025 at 09:40:27AM -0600, Mathieu Poirier wrote: > On Fri, 27 Jun 2025 at 08:50, Hiago De Franco wrote: > > > > On Fri, Jun 27, 2025 at 08:31:20AM -0600, Mathieu Poirier wrote: > > > On Thu, 26 Jun 2025 at 15:59, Hiago De Franco > > > wrote: >

Re: [PATCH v6 0/3] remoteproc: imx_rproc: allow attaching to running core kicked by the bootloader

2025-06-27 Thread Hiago De Franco
On Fri, Jun 27, 2025 at 08:31:20AM -0600, Mathieu Poirier wrote: > On Thu, 26 Jun 2025 at 15:59, Hiago De Franco wrote: > > > > From: Hiago De Franco > > > > This patch series depends on Ulf's patches that are currently under > > review, "pmdomain: Add

Re: [PATCH v6 0/3] remoteproc: imx_rproc: allow attaching to running core kicked by the bootloader

2025-06-27 Thread Hiago De Franco
On Thu, Jun 26, 2025 at 06:59:08PM -0300, Hiago De Franco wrote: > From: Hiago De Franco > > This patch series depends on Ulf's patches that are currently under > review, "pmdomain: Add generic ->sync_state() support to genpd" [1]. > Without them, this series i

[PATCH v6 3/3] remoteproc: imx_rproc: detect and attach to pre-booted remote cores

2025-06-26 Thread Hiago De Franco
From: Hiago De Franco When the Cortex-M remote core is started and already running before Linux boots (typically by the Cortex-A bootloader using a command like bootaux), the current driver is unable to attach to it. This is because the driver only checks for remote cores running in different

[PATCH v6 2/3] remoteproc: imx_rproc: skip clock enable when M-core is managed by the SCU

2025-06-26 Thread Hiago De Franco
From: Hiago De Franco For the i.MX8X and i.MX8 family SoCs, when the Cortex-M core is powered up and started by the Cortex-A core using the bootloader (e.g., via the U-Boot bootaux command), both M-core and Linux run within the same SCFW (System Controller Firmware) partition. With that, Linux

[PATCH v6 1/3] pmdomain: core: introduce dev_pm_genpd_is_on()

2025-06-26 Thread Hiago De Franco
From: Hiago De Franco This helper function returns the current power status of a given generic power domain. As example, remoteproc/imx_rproc.c can now use this function to check the power status of the remote core to properly set "attached" or "offline" modes. Sugge

[PATCH v6 0/3] remoteproc: imx_rproc: allow attaching to running core kicked by the bootloader

2025-06-26 Thread Hiago De Franco
From: Hiago De Franco This patch series depends on Ulf's patches that are currently under review, "pmdomain: Add generic ->sync_state() support to genpd" [1]. Without them, this series is not going to work. For the i.MX8X and i.MX8 family SoCs, currently when the remotecore

Re: [PATCH v5 0/3] remoteproc: imx_rproc: allow attaching to running core kicked by the bootloader

2025-06-24 Thread Hiago De Franco
On Mon, Jun 23, 2025 at 09:32:54AM -0600, Mathieu Poirier wrote: > On Tue, Jun 17, 2025 at 04:34:47PM -0300, Hiago De Franco wrote: > > From: Hiago De Franco > > > > This patch series depends on Ulf's patches that are currently under > > review, "pmdomain:

Re: [PATCH v5 3/3] remoteproc: imx_rproc: detect and attach to pre-booted remote cores

2025-06-24 Thread Hiago De Franco
On Mon, Jun 23, 2025 at 09:29:47AM -0600, Mathieu Poirier wrote: > On Tue, Jun 17, 2025 at 04:34:50PM -0300, Hiago De Franco wrote: > > From: Hiago De Franco > > > > When the remote core is started before Linux boots (e.g., by the > > bootloader), the driver curr

Re: [PATCH v5 2/3] remoteproc: imx_rproc: skip clock enable when M-core is managed by the SCU

2025-06-24 Thread Hiago De Franco
Hi Mathieu, On Mon, Jun 23, 2025 at 09:15:52AM -0600, Mathieu Poirier wrote: > Hi Hiago, > > On Tue, Jun 17, 2025 at 04:34:49PM -0300, Hiago De Franco wrote: > > From: Hiago De Franco > > > > For the i.MX8X and i.MX8 family SoCs, when the M-core is powered up > &

[PATCH v5 3/3] remoteproc: imx_rproc: detect and attach to pre-booted remote cores

2025-06-17 Thread Hiago De Franco
From: Hiago De Franco When the remote core is started before Linux boots (e.g., by the bootloader), the driver currently is not able to attach because it only checks for cores running in different partitions. If the core was kicked by the bootloader, it is in the same partition as Linux and it

[PATCH v5 2/3] remoteproc: imx_rproc: skip clock enable when M-core is managed by the SCU

2025-06-17 Thread Hiago De Franco
From: Hiago De Franco For the i.MX8X and i.MX8 family SoCs, when the M-core is powered up by the bootloader, M-core and Linux are in same SCFW (System Controller Firmware) partition, so linux has permission to control M-core. But when M-core is started, the SCFW will automatically enable the

[PATCH v5 1/3] pmdomain: core: introduce dev_pm_genpd_is_on()

2025-06-17 Thread Hiago De Franco
From: Hiago De Franco This helper function returns the current power status of a given generic power domain. As example, remoteproc/imx_rproc.c can now use this function to check the power status of the remote core to properly set "attached" or "offline" modes. Sugge

[PATCH v5 0/3] remoteproc: imx_rproc: allow attaching to running core kicked by the bootloader

2025-06-17 Thread Hiago De Franco
From: Hiago De Franco This patch series depends on Ulf's patches that are currently under review, "pmdomain: Add generic ->sync_state() support to genpd" [1]. Without them, this series is not going to work. For the i.MX8X and i.MX8 family SoCs, currently when the remotecore

Re: [PATCH v4 3/3] remoteproc: imx_rproc: detect and attach to pre-booted remote cores

2025-06-17 Thread Hiago De Franco
On Tue, Jun 17, 2025 at 10:39:58AM +0800, Peng Fan wrote: > On Mon, Jun 16, 2025 at 01:05:11PM -0300, Hiago De Franco wrote: > >Hi Peng, > > > >On Thu, Jun 12, 2025 at 02:03:17PM -0300, Hiago De Franco wrote: > >> Hi Peng, > >> > >> On Wed,

Re: [PATCH v4 3/3] remoteproc: imx_rproc: detect and attach to pre-booted remote cores

2025-06-16 Thread Hiago De Franco
Hi Peng, On Thu, Jun 12, 2025 at 02:03:17PM -0300, Hiago De Franco wrote: > Hi Peng, > > On Wed, Jun 11, 2025 at 03:27:09AM +, Peng Fan wrote: > > > > > > Sorry for the delay. > > > > > > I tested it now and there must be something missing on m

Re: [PATCH v4 1/3] pmdomain: core: introduce dev_pm_genpd_is_on

2025-06-12 Thread Hiago De Franco
On Wed, Jun 11, 2025 at 10:32:28AM -0500, Bjorn Andersson wrote: > On Mon, Jun 02, 2025 at 10:19:03AM -0300, Hiago De Franco wrote: > > From: Hiago De Franco > > > > This helper function returns the current power status of a given generic > > power domain. > &g

Re: [PATCH v4 3/3] remoteproc: imx_rproc: detect and attach to pre-booted remote cores

2025-06-12 Thread Hiago De Franco
Hi Bjorn, On Wed, Jun 11, 2025 at 10:36:33AM -0500, Bjorn Andersson wrote: > On Wed, Jun 04, 2025 at 03:19:52AM +, Peng Fan wrote: > > > Subject: [PATCH v4 3/3] remoteproc: imx_rproc: detect and attach to > > > pre-booted remote cores > > > > > > From:

Re: [PATCH v4 3/3] remoteproc: imx_rproc: detect and attach to pre-booted remote cores

2025-06-12 Thread Hiago De Franco
Hi Peng, On Wed, Jun 11, 2025 at 03:27:09AM +, Peng Fan wrote: > > > > Sorry for the delay. > > > > I tested it now and there must be something missing on my U-Boot: > > > > Disable imx8x-cm4 rsrc 278 not owned > > Disable imx8x-cm4 rsrc 297 not owned > > > > It removes my nodes from the D

Re: [PATCH v4 3/3] remoteproc: imx_rproc: detect and attach to pre-booted remote cores

2025-06-09 Thread Hiago De Franco
On Wed, Jun 04, 2025 at 03:19:52AM +, Peng Fan wrote: > > Subject: [PATCH v4 3/3] remoteproc: imx_rproc: detect and attach to > > pre-booted remote cores > > > > From: Hiago De Franco > > > > When the remote core is started before Linux boots (e.g.

Re: [PATCH v4 3/3] remoteproc: imx_rproc: detect and attach to pre-booted remote cores

2025-06-05 Thread Hiago De Franco
Hi Peng, On Wed, Jun 04, 2025 at 03:19:52AM +, Peng Fan wrote: > > Subject: [PATCH v4 3/3] remoteproc: imx_rproc: detect and attach to > > pre-booted remote cores > > > > From: Hiago De Franco > > > > When the remote core is started before Linux boot

Re: [PATCH v4 0/3] remoteproc: imx_rproc: allow attaching to running core kicked by the bootloader

2025-06-03 Thread Hiago De Franco
On Tue, Jun 03, 2025 at 02:09:14PM +0200, Ulf Hansson wrote: > On Mon, 2 Jun 2025 at 15:19, Hiago De Franco wrote: > > > > From: Hiago De Franco > > > > This patch series depends on Ulf's patches that are currently under review, > > "pmdomain: Add

[PATCH v4 3/3] remoteproc: imx_rproc: detect and attach to pre-booted remote cores

2025-06-02 Thread Hiago De Franco
From: Hiago De Franco When the remote core is started before Linux boots (e.g., by the bootloader), the driver currently is not able to attach because it only checks for cores running in different partitions. If the core was kicked by the bootloader, it is in the same partition as Linux and it

[PATCH v4 2/3] remoteproc: imx_rproc: skip clock enable when M-core is managed by the SCU

2025-06-02 Thread Hiago De Franco
From: Hiago De Franco For the i.MX8X and i.MX8 family SoCs, when the M-core is powered up by the bootloader, M-core and Linux are in same SCFW (System Controller Firmware) partition, so linux has permission to control M-core. But when M-core is started, the SCFW will automatically enable the

[PATCH v4 1/3] pmdomain: core: introduce dev_pm_genpd_is_on

2025-06-02 Thread Hiago De Franco
From: Hiago De Franco This helper function returns the current power status of a given generic power domain. As example, remoteproc/imx_rproc.c can now use this function to check the power status of the remote core to properly set "attached" or "offline" modes. Sugge

[PATCH v4 0/3] remoteproc: imx_rproc: allow attaching to running core kicked by the bootloader

2025-06-02 Thread Hiago De Franco
From: Hiago De Franco This patch series depends on Ulf's patches that are currently under review, "pmdomain: Add generic ->sync_state() support to genpd" [1]. Without them, this series is not going to work. For the i.MX8X and i.MX8 family SoCs, currently when the remotecore

Re: [PATCH v2 3/3] remoteproc: imx_rproc: add power mode check for remote core attachment

2025-05-29 Thread Hiago De Franco
On Thu, May 29, 2025 at 03:54:47AM +, Peng Fan wrote: [...] > > We are making progress ;-) > > > > With the patches you shared Ulf (I added them on top of the current > > master branch), it works as expected, dev_pm_genpd_is_on() returns 0 > > when I boot the kernel without M4 running and it

Re: [PATCH v2 3/3] remoteproc: imx_rproc: add power mode check for remote core attachment

2025-05-28 Thread Hiago De Franco
On Tue, May 27, 2025 at 10:45:25AM -0300, Hiago De Franco wrote: [...] > > > > Thanks for the detailed analysis! > > > > This is a very similar issue as many other genpd providers are > > suffering from - and something that I have been working on recently to >

Re: [PATCH v2 3/3] remoteproc: imx_rproc: add power mode check for remote core attachment

2025-05-27 Thread Hiago De Franco
On Tue, May 27, 2025 at 01:58:46PM +0200, Ulf Hansson wrote: > On Tue, 27 May 2025 at 03:29, Peng Fan wrote: > > > > On Mon, May 26, 2025 at 09:05:10PM -0300, Hiago De Franco wrote: > > >On Mon, May 26, 2025 at 12:07:49PM +0200, Ulf Hansson wrote: > > >> On

Re: [PATCH v2 3/3] remoteproc: imx_rproc: add power mode check for remote core attachment

2025-05-26 Thread Hiago De Franco
On Mon, May 26, 2025 at 12:07:49PM +0200, Ulf Hansson wrote: > On Fri, 23 May 2025 at 21:17, Hiago De Franco wrote: > > > > Hi Ulf, > > > > On Wed, May 21, 2025 at 02:11:02PM +0200, Ulf Hansson wrote: > > > You should not provide any flag (or attach_data to &

Re: [PATCH v2 3/3] remoteproc: imx_rproc: add power mode check for remote core attachment

2025-05-23 Thread Hiago De Franco
Hi Ulf, On Wed, May 21, 2025 at 02:11:02PM +0200, Ulf Hansson wrote: > You should not provide any flag (or attach_data to > dev_pm_domain_attach_list()) at all. In other words just call > dev_pm_domain_attach_list(dev, NULL, &priv->pd_list), similar to how > drivers/remoteproc/imx_dsp_rproc.c does

Re: [PATCH v2 3/3] remoteproc: imx_rproc: add power mode check for remote core attachment

2025-05-19 Thread Hiago De Franco
Hi Ulf, On Mon, May 19, 2025 at 04:33:30PM +0200, Ulf Hansson wrote: > On Fri, 9 May 2025 at 21:13, Hiago De Franco wrote: > > > > On Fri, May 09, 2025 at 12:37:02PM +0200, Ulf Hansson wrote: > > > On Thu, 8 May 2025 at 22:28, Hiago De Franco > >

[PATCH v3 1/3] firmware: imx: introduce imx_sc_pm_get_resource_power_mode()

2025-05-19 Thread Hiago De Franco
From: Hiago De Franco This SCU API returns the power mode of a given resource. As example, remoteproc/imx_rproc.c can now use this function to check the power mode of the remote core to properly set "attached" or "offline" modes. Since there is no proper firmware/im

[PATCH v3 3/3] remoteproc: imx_rproc: add power mode check for remote core attachment

2025-05-19 Thread Hiago De Franco
From: Hiago De Franco When the remote core is started before Linux boots (e.g., by the bootloader), the driver currently is not able to attach because it only checks for cores running in different partitions. If the core was kicked by the bootloader, it is in the same partition as Linux and it

[PATCH v3 2/3] remoteproc: imx_rproc: skip clock enable when M-core is managed by the SCU

2025-05-19 Thread Hiago De Franco
From: Hiago De Franco For the i.MX8X and i.MX8 family SoCs, when the M-core is powered up by the bootloader, M-core and Linux are in same SCFW (System Controller Firmware) partition, so linux has permission to control M-core. But when M-core is started, the SCFW will automatically enable the

[PATCH v3 0/3] remoteproc: imx_rproc: allow attaching to running core kicked by the bootloader

2025-05-19 Thread Hiago De Franco
From: Hiago De Franco For the i.MX8X and i.MX8 family SoCs, currently when the remotecore is started by the bootloader and the M core and A core are in the same partition, the driver is not capable to detect the remote core and report the correct state of it. This series of patches implement an

Re: [PATCH v2 1/3] firmware: imx: move get power mode function from scu-pd.c to misc.c

2025-05-13 Thread Hiago De Franco
Hi Peng, On Tue, May 13, 2025 at 03:43:37PM +0800, Peng Fan wrote: > Hi Hiago, > > On Wed, May 07, 2025 at 01:00:54PM -0300, Hiago De Franco wrote: > >From: Hiago De Franco > > > >Move imx_sc_get_pd_power() from pmdomain/imx/scu-pd.c to > >fir

Re: [PATCH v2 3/3] remoteproc: imx_rproc: add power mode check for remote core attachment

2025-05-12 Thread Hiago De Franco
Hi Peng, On Mon, May 12, 2025 at 12:56:13PM +0800, Peng Fan wrote: > > Ulf's new API dev_pm_genpd_is_on needs to run after power domain attached. > > But if run after power domain attached, there is no API to know whether > M4 is kicked by bootloader or now. > > Even imx_rproc_attach_pd has a chec

Re: [PATCH v2 3/3] remoteproc: imx_rproc: add power mode check for remote core attachment

2025-05-09 Thread Hiago De Franco
On Fri, May 09, 2025 at 12:37:02PM +0200, Ulf Hansson wrote: > On Thu, 8 May 2025 at 22:28, Hiago De Franco wrote: > > > > Hello, > > > > On Thu, May 08, 2025 at 12:03:33PM +0200, Ulf Hansson wrote: > > > On Wed, 7 May 2025 at 18:02, Hiago De Franco > &g

Re: [PATCH v2 3/3] remoteproc: imx_rproc: add power mode check for remote core attachment

2025-05-08 Thread Hiago De Franco
Hello, On Thu, May 08, 2025 at 12:03:33PM +0200, Ulf Hansson wrote: > On Wed, 7 May 2025 at 18:02, Hiago De Franco wrote: > > > > From: Hiago De Franco > > > > When the remote core is started before Linux boots (e.g., by the > > bootloader), the driver currently

[PATCH v2 1/3] firmware: imx: move get power mode function from scu-pd.c to misc.c

2025-05-07 Thread Hiago De Franco
From: Hiago De Franco Move imx_sc_get_pd_power() from pmdomain/imx/scu-pd.c to firmware/imx/misc.c and rename it to imx_sc_pm_get_resource_power_mode() to maintain the same naming logic with other functions in misc.c. This makes the API available for other use cases. For example, remoteproc

[PATCH v2 0/3] remoteproc: imx_rproc: allow attaching to running core kicked by the bootloader

2025-05-07 Thread Hiago De Franco
From: Hiago De Franco For the i.MX8X and i.MX8 family SoCs, currently when the remotecore is started by the bootloader and the M core and A core are in the same partition, the driver is not capable to detect the remote core and report the correct state of it. This series of patches implement an

[PATCH v2 3/3] remoteproc: imx_rproc: add power mode check for remote core attachment

2025-05-07 Thread Hiago De Franco
From: Hiago De Franco When the remote core is started before Linux boots (e.g., by the bootloader), the driver currently is not able to attach because it only checks for cores running in different partitions. If the core was kicked by the bootloader, it is in the same partition as Linux and it

[PATCH v2 2/3] remoteproc: imx_rproc: skip clock enable when M-core is managed by the SCU

2025-05-07 Thread Hiago De Franco
From: Hiago De Franco For the i.MX8X and i.MX8 family SoCs, when the M-core is powered up by the bootloader, M-core and Linux are in same SCFW (System Controller Firmware) partition, so linux has permission to control M-core. But when M-core is started, the SCFW will automatically enable the

Re: [PATCH 2/3] firmware: imx: move get power mode function from scu-pd.c to misc.c

2025-05-07 Thread Hiago De Franco
Hi Peng, On Tue, May 06, 2025 at 12:46:18PM +0800, Peng Fan wrote: > On Mon, May 05, 2025 at 12:48:48PM -0300, Hiago De Franco wrote: > >From: Hiago De Franco > > > >Move imx_sc_get_pd_power() from pmdomain/imx/scu-pd.c to > >firmware/imx/misc.c and rename it to imx_sc

Re: [PATCH 1/3] remoteproc: imx_rproc: skip clock enable when M-core is managed by the SCU

2025-05-06 Thread Hiago De Franco
Hi Peng, On Tue, May 06, 2025 at 12:38:35PM +0800, Peng Fan wrote: > On Mon, May 05, 2025 at 12:48:47PM -0300, Hiago De Franco wrote: > >From: Hiago De Franco > > > >For the i.MX8X and i.MX8 family SoCs, when the M-core is powered up > >before Linux starts (e.g., b

[PATCH 3/3] remoteproc: imx_rproc: add power mode check for remote core attachment

2025-05-05 Thread Hiago De Franco
From: Hiago De Franco When the remote core is started before Linux boots (e.g., by the bootloader), the driver currently is not able to attach because it only checks for cores running in different partitions. If the core was kicked by the bootloader, it is in the same partition as Linux and it

[PATCH 2/3] firmware: imx: move get power mode function from scu-pd.c to misc.c

2025-05-05 Thread Hiago De Franco
From: Hiago De Franco Move imx_sc_get_pd_power() from pmdomain/imx/scu-pd.c to firmware/imx/misc.c and rename it to imx_sc_pm_get_resource_power_mode() to maintain the same naming logic with other functions in misc.c. This makes the API available for other use cases. For example, remoteproc

[PATCH 1/3] remoteproc: imx_rproc: skip clock enable when M-core is managed by the SCU

2025-05-05 Thread Hiago De Franco
From: Hiago De Franco For the i.MX8X and i.MX8 family SoCs, when the M-core is powered up before Linux starts (e.g., by the bootloader) and it is being managed by the SCU, the SCFW will not allow the kernel to enable the clock again. This currently causes an SCU fault reset when the M-core is up

[PATCH 0/3] remoteproc: imx_rproc: allow attaching to running core kicked by the bootloader

2025-05-05 Thread Hiago De Franco
From: Hiago De Franco For the i.MX8X and i.MX8 family SoCs, currently when the remotecore is started by the bootloader and the M core and A core are in the same partition, the driver is not capable to detect the remote core and report the correct state of it. This series of patches implement an

Re: [PATCH] remoteproc: imx_rproc: replace devm_clk_get() with devm_clk_get_optional()

2025-04-30 Thread Hiago De Franco
On Wed, Apr 30, 2025 at 02:08:35PM +0800, Peng Fan wrote: > On Mon, Apr 28, 2025 at 02:12:57PM -0300, Hiago De Franco wrote: > >On Sat, Apr 26, 2025 at 09:49:58PM +0800, Peng Fan wrote: > >> On Wed, Apr 23, 2025 at 04:21:56PM -0300, Hiago De Franco wrote: > >> >Hi Mat

Re: [PATCH] remoteproc: imx_rproc: replace devm_clk_get() with devm_clk_get_optional()

2025-04-28 Thread Hiago De Franco
On Sat, Apr 26, 2025 at 09:49:58PM +0800, Peng Fan wrote: > On Wed, Apr 23, 2025 at 04:21:56PM -0300, Hiago De Franco wrote: > >Hi Mathieu, > > > >On Wed, Apr 23, 2025 at 11:14:17AM -0600, Mathieu Poirier wrote: > >> Good morning, > >> > >> On

Re: [PATCH] remoteproc: imx_rproc: replace devm_clk_get() with devm_clk_get_optional()

2025-04-28 Thread Hiago De Franco
On Sun, Apr 27, 2025 at 10:08:25AM +0800, Peng Fan wrote: > On Sat, Apr 26, 2025 at 03:47:50PM -0600, Mathieu Poirier wrote: > >On Sat, 26 Apr 2025 at 06:41, Peng Fan wrote: > >> > >> On Wed, Apr 23, 2025 at 04:21:56PM -0300, Hiago De Franco wrote: > >> >

Re: [PATCH] remoteproc: imx_rproc: replace devm_clk_get() with devm_clk_get_optional()

2025-04-23 Thread Hiago De Franco
Hi Mathieu, On Wed, Apr 23, 2025 at 11:14:17AM -0600, Mathieu Poirier wrote: > Good morning, > > On Wed, Apr 23, 2025 at 12:51:31PM -0300, Hiago De Franco wrote: > > From: Hiago De Franco > > > > The "clocks" device tree property is not mandatory, and if

[PATCH] remoteproc: imx_rproc: replace devm_clk_get() with devm_clk_get_optional()

2025-04-23 Thread Hiago De Franco
From: Hiago De Franco The "clocks" device tree property is not mandatory, and if not provided Linux will shut down the remote processor power domain during boot if it is not present, even if it is running (e.g. it was started by U-Boot's bootaux command). Use the optional devm_