mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Davis <afd@ti.com>
To: Siddharth Karanam <sid9.karanam@gmail.com>, <nm@ti.com>,
	<vigneshr@ti.com>, <kristo@kernel.org>, <robh@kernel.org>,
	<krzk+dt@kernel.org>, <conor+dt@kernel.org>
Cc: <linux-arm-kernel@lists.infradead.org>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] arm64: dts: ti: k3-am62-mcu: Add power-domains property for M4FSS
Date: Tue, 29 Sep 2026 11:37:21 -0500	[thread overview]
Message-ID: <8cb23b44-027d-4d81-b342-7eaca0248f63@ti.com> (raw)
In-Reply-To: <20260922171942.201947-1-sid9.karanam@gmail.com>

On 9/22/26 12:19 PM, Siddharth Karanam wrote:
> Assign the power domain to the MCU M4FSS (Cortex-M4F) node by following
> the device ids info published in TI-SCI public documentation.
> 
> This will be useful in future patches that will attempt at abstracting
> ti_sci_dev_ops's calls such as get_device and put_device via pm_runtime
> calls.
> 
> Signed-off-by: Siddharth Karanam <sid9.karanam@gmail.com>
> ---
>   arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi b/arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi
> index 68e906796aefe..1ae0870893c16 100644
> --- a/arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi
> @@ -181,6 +181,7 @@ mcu_m4fss: m4fss@5000000 {
>   		      <0x00 0x5040000 0x00 0x10000>;
>   		reg-names = "iram", "dram";
>   		resets = <&k3_reset 9 1>;
> +		power-domains = <&k3_pds 7 TI_SCI_PD_EXCLUSIVE>;

The surrounding M4 subsystem's power domain is 7, but the core's power domain number
is 9 (see below in `ti,sci-dev-id`). Enabling 9 should also enable 7 as it is a
dependency. We probably should have modeled the M4 in DT the way we did the R5[0].
With the core being a subnode of the subsystem. Then 7 goes in subsystem and 9
goes in the core's subnode.

Anyway, the reason we don't use the normal "power-domains", and instead manage
the power using `ti,sci-dev-id`, is because the normal power domain framework
has a nasty habit of unconditionally powering up devices before the driver can
probe. Which in the case of remoteprocs can cause the core to start running
and executing random data. We have to do things in order,

  * Power up subsystem
  * Set reset line for core
  * Power up the core
  * Setup the core (load firmware and set boot address)
  * Release reset line for core to start it running

Andrew

[0] https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi#L178

>   		firmware-name = "am62-mcu-m4f0_0-fw";
>   		ti,sci = <&dmsc>;
>   		ti,sci-dev-id = <9>;


      reply	other threads:[~2026-09-29 16:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-22 17:19 Siddharth Karanam
2026-09-29 16:37 ` Andrew Davis [this message]

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=8cb23b44-027d-4d81-b342-7eaca0248f63@ti.com \
    --to=afd@ti.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kristo@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=robh@kernel.org \
    --cc=sid9.karanam@gmail.com \
    --cc=vigneshr@ti.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

all inboxes | Powered by JetHome®