From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Marco Felsch <m.felsch@pengutronix.de>,
Fabian Pflug <f.pflug@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] ARM: boards: i.MX93: Add NXP FRDM i.MX93 support
Date: Tue, 27 May 2025 14:37:34 +0200 [thread overview]
Message-ID: <e828f655-f841-4e00-90bf-b2bf52f4e8a3@pengutronix.de> (raw)
In-Reply-To: <20250527122316.5iwpshtvwx4nihsm@pengutronix.de>
Hi,
On 5/27/25 14:23, Marco Felsch wrote:
> On 25-05-27, Fabian Pflug wrote:
>> +++ b/arch/arm/boards/nxp-imx93-frdm/board.c
>> @@ -0,0 +1,34 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +
>> +#define pr_fmt(fmt) "FRDM i.MX93: " fmt
>> +
>> +#include <bootsource.h>
>> +#include <common.h>
>> +#include <init.h>
>> +#include <deep-probe.h>
>> +
>> +static int frdm_imx93_probe(struct device *dev)
>> +{
>> + if (bootsource_get() == BOOTSOURCE_MMC && bootsource_get_instance() == 2) {
>> + of_device_enable_path("/choosen/environment-sd");
>> + } else {
>> + of_device_enable_path("/choosen/environment-emmc");
>> + }
>> + return 0;
>
> Out of curiosity: could this be handled in a common way, so we can drop
> this board driver completely?
Yes, this should just be dropped and environment should come from the
bootsource via Type UUID. FWIW, this is non-functional anyway;
The device tree added in this series has no barebox,environment
compatible node and if it did, nothing descends into /choosen
(as opposed to /chosen).
>> +BAREBOX_DEEP_PROBE_ENABLE(frdm_imx93_of_match);
This will need to remain. I have a series for deep probe to become the
default, but for now just keep the match struct and the
BAREBOX_DEEP_PROBE_ENABLE and drop the driver code.
>> diff --git a/arch/arm/boards/nxp-imx93-frdm/lowlevel.c b/arch/arm/boards/nxp-imx93-frdm/lowlevel.c
>> new file mode 100644
>> index 0000000000..7fbb7e96c5
>> --- /dev/null
>> +++ b/arch/arm/boards/nxp-imx93-frdm/lowlevel.c
>> @@ -0,0 +1,46 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +
>> +#include <common.h>
>> +#include <debug_ll.h>
>> +#include <mach/imx/debug_ll.h>
>> +#include <mach/imx/generic.h>
>> +#include <mach/imx/xload.h>
>> +#include <asm/barebox-arm.h>
>> +#include <soc/imx9/ddr.h>
>> +#include <mach/imx/atf.h>
>> +#include <mach/imx/xload.h>
>> +#include <mach/imx/esdctl.h>
>> +
>> +extern char __dtb_z_imx93_frdm_start[];
>> +extern struct dram_timing_info frdm_imx93_dram_timing;
>> +
>> +static noinline void frdm_imx93_continue(void)
>> +{
>> + void *base = IOMEM(MX9_UART1_BASE_ADDR);
void __iomem *
>> + void *muxbase = IOMEM(MX9_IOMUXC_BASE_ADDR);
void __iomem *
>> +
>> + /* configure LPUART1 TX pin */
>> + writel(0x0, muxbase + 0x184);
>> +
>> + imx9_uart_setup(IOMEM(base));
IOMEM here is redundant with above changes.
>> + pbl_set_putc(lpuart32_putc, base + 0x10);
>> + putc_ll('>');
putchar(). I think it's useful to print it always.
Cheers,
Ahmad
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
prev parent reply other threads:[~2025-05-27 12:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-27 11:42 Fabian Pflug
2025-05-27 12:23 ` Marco Felsch
2025-05-27 12:37 ` Ahmad Fatoum [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=e828f655-f841-4e00-90bf-b2bf52f4e8a3@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=f.pflug@pengutronix.de \
--cc=m.felsch@pengutronix.de \
/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