All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sumit Garg <sumit.garg@kernel.org>
To: Neil Armstrong <neil.armstrong@linaro.org>
Cc: u-boot-qcom@groups.io, u-boot@lists.denx.de, trini@konsulko.com,
	casey.connolly@linaro.org, jorge.ramirez@oss.qualcomm.com,
	varadarajan.narayanan@oss.qualcomm.com, tonyh@qti.qualcomm.com,
	Sumit Garg <sumit.garg@oss.qualcomm.com>
Subject: Re: [PATCH 1/2] mach-snapdragon: of_fixup: Add OP-TEE DT fixup support
Date: Fri, 9 Jan 2026 15:54:00 +0530	[thread overview]
Message-ID: <aWDXQFXQcaoeV7ka@sumit-xelite> (raw)
In-Reply-To: <b60d5ee7-fa27-4dc1-8a09-964912ec5654@linaro.org>

On Thu, Jan 08, 2026 at 05:19:32PM +0100, neil.armstrong@linaro.org wrote:
> On 12/29/25 12:43, Sumit Garg wrote:
> > From: Sumit Garg <sumit.garg@oss.qualcomm.com>
> > 
> > Add support for OP-TEE live tree DT fixup support which enables U-Boot
> > OP-TEE driver to be probed. As well as the EFI DT fixup protocol allows
> > the live tree fixup to be carried over to the OS for the OP-TEE driver
> > in the OS to probe as well.
> > 
> > Note that this fixup only gets applied if CONFIG_OPTEE gets enabled.
> 
> Can't the presence of OP-TEE be detected dynamically via scm calls ?

SCM calls aren't present in case of TF-A/OP-TEE flow.

-Sumit

> 
> Thanks,
> Neil
> 
> > 
> > Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
> > ---
> >   arch/arm/mach-snapdragon/of_fixup.c | 34 +++++++++++++++++++++++++++++
> >   1 file changed, 34 insertions(+)
> > 
> > diff --git a/arch/arm/mach-snapdragon/of_fixup.c b/arch/arm/mach-snapdragon/of_fixup.c
> > index eec2c0c757e..29a99f73cf3 100644
> > --- a/arch/arm/mach-snapdragon/of_fixup.c
> > +++ b/arch/arm/mach-snapdragon/of_fixup.c
> > @@ -146,6 +146,37 @@ static void fixup_power_domains(struct device_node *root)
> >   	}
> >   }
> > +static void add_optee_node(struct device_node *root)
> > +{
> > +	struct device_node *fw = NULL, *optee = NULL;
> > +	int ret;
> > +
> > +	fw = of_find_node_by_path("/firmware");
> > +	if (!fw) {
> > +		log_err("Failed to find /firmware node\n");
> > +		return;
> > +	}
> > +
> > +	ret = of_add_subnode(fw, "optee", strlen("optee") + 1, &optee);
> > +	if (ret) {
> > +		log_err("Failed to add 'maximum-speed' property: %d\n", ret);
> > +		return;
> > +	}
> > +
> > +	ret = of_write_prop(optee, "compatible", strlen("linaro,optee-tz") + 1,
> > +			    "linaro,optee-tz");
> > +	if (ret) {
> > +		log_err("Failed to optee 'compatible' property: %d\n", ret);
> > +		return;
> > +	}
> > +
> > +	ret = of_write_prop(optee, "method", strlen("smc") + 1, "smc");
> > +	if (ret) {
> > +		log_err("Failed to optee 'method' property: %d\n", ret);
> > +		return;
> > +	}
> > +}
> > +
> >   #define time_call(func, ...) \
> >   	do { \
> >   		u64 start = timer_get_us(); \
> > @@ -160,6 +191,9 @@ static int qcom_of_fixup_nodes(void * __maybe_unused ctx, struct event *event)
> >   	time_call(fixup_usb_nodes, root);
> >   	time_call(fixup_power_domains, root);
> > +	if (IS_ENABLED(CONFIG_OPTEE))
> > +		time_call(add_optee_node, root);
> > +
> >   	return 0;
> >   }
> 

  reply	other threads:[~2026-01-09 10:24 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-29 11:43 [PATCH 1/2] mach-snapdragon: of_fixup: Add OP-TEE DT fixup support Sumit Garg
2025-12-29 11:43 ` [PATCH 2/2] configs: Add generic qcom_tfa_optee_defconfig Sumit Garg
2026-01-08 16:41   ` Casey Connolly
2026-01-09 11:02     ` Sumit Garg
2026-01-14 14:56       ` Casey Connolly
2026-01-15  6:10         ` Sumit Garg
2026-01-15 10:49           ` neil.armstrong
2026-01-15 12:25             ` Sumit Garg
2026-01-15 13:03               ` Neil Armstrong
2026-01-15 13:27                 ` Sumit Garg
2026-01-15 13:35                   ` Neil Armstrong
2026-01-16  6:57                     ` Sumit Garg
2026-01-16  7:34                       ` Neil Armstrong
2026-01-16  7:53                         ` Sumit Garg
2026-01-16  9:53                           ` Neil Armstrong
2026-01-16 12:17                             ` Sumit Garg
2026-01-16 17:46                               ` Casey Connolly
2026-01-21  7:21                                 ` Sumit Garg
2026-01-21 10:38                                   ` Casey Connolly
2026-01-21 11:30                                     ` Sumit Garg
2026-01-08 16:19 ` [PATCH 1/2] mach-snapdragon: of_fixup: Add OP-TEE DT fixup support neil.armstrong
2026-01-09 10:24   ` Sumit Garg [this message]
2026-01-21 11:46     ` Neil Armstrong

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=aWDXQFXQcaoeV7ka@sumit-xelite \
    --to=sumit.garg@kernel.org \
    --cc=casey.connolly@linaro.org \
    --cc=jorge.ramirez@oss.qualcomm.com \
    --cc=neil.armstrong@linaro.org \
    --cc=sumit.garg@oss.qualcomm.com \
    --cc=tonyh@qti.qualcomm.com \
    --cc=trini@konsulko.com \
    --cc=u-boot-qcom@groups.io \
    --cc=u-boot@lists.denx.de \
    --cc=varadarajan.narayanan@oss.qualcomm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.