Re: [PATCH v1 12/12] board: nxp: imx952_evk: Add i.MX952 15x15 lpddr4x board support

Tom Rini
2026-02-05T15:46:07Z

[-- Attachment #1: Type: text/plain, Size: 2897 bytes --]

On Thu, Feb 05, 2026 at 09:55:18PM +0800, alice.guo@oss.nxp.com wrote:

> From: Peng Fan <peng.fan@nxp.com>
>
> Add support for i.MX952 15x15 lpddr4x board support.
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> Signed-off-by: Ye Li <ye.li@nxp.com>
> Signed-off-by: Alice Guo <alice.guo@nxp.com>
[snip]
> +void board_quiesce_devices(void)
> +{
> + int ret;
> + struct uclass *uc_dev;
> +
> + ret = imx9_scmi_power_domain_enable(PD_HSIO_TOP, false);
> + if (ret) {
> + printf("%s: Failed for HSIO MIX: %d\n", __func__, ret);
> + return;
> + }
> +
> + ret = imx9_scmi_power_domain_enable(PD_NETC, false);
> + if (ret) {
> + printf("%s: Failed for NETC MIX: %d\n", __func__, ret);
> + return;
> + }
> +
> + ret = uclass_get(UCLASS_SPI_FLASH, &uc_dev);
> + if (uc_dev)
> + ret = uclass_destroy(uc_dev);
> + if (ret)
> + printf("couldn't remove SPI FLASH devices\n");
> +}

Can we instead handle all of this via setting DM_FLAG_OS_PREPARE in
drivers as needed, so they're properly cleaned / released before OS
boot?

[snip]
> diff --git a/doc/board/nxp/imx952_evk.rst b/doc/board/nxp/imx952_evk.rst
> new file mode 100644
> index 00000000000..9f20db2403f
> --- /dev/null
> +++ b/doc/board/nxp/imx952_evk.rst
> @@ -0,0 +1,112 @@
> +.. SPDX-License-Identifier: GPL-2.0+
> +
> +imx952_evk
> +=======================

This will be a doc warning and fail CI, please either push through CI or
build the docs locally (see doc/build/documentation.rst) with KDOC_WERROR=1

[snip]
> diff --git a/include/configs/imx952_evk.h b/include/configs/imx952_evk.h
> new file mode 100644
> index 00000000000..dadc883027f
> --- /dev/null
> +++ b/include/configs/imx952_evk.h
> @@ -0,0 +1,31 @@
> +/* SPDX-License-Identifier: GPL-2.0+ */
> +/*
> + * Copyright 2025-2026 NXP
> + */
> +
> +#ifndef __IMX952_EVK_H
> +#define __IMX952_EVK_H
> +
> +#include <linux/sizes.h>
> +#include <linux/stringify.h>
> +#include <asm/arch/imx-regs.h>
> +
> +#define CFG_SYS_INIT_RAM_ADDR 0x90000000
> +#define CFG_SYS_INIT_RAM_SIZE 0x200000
> +
> +#define CFG_SYS_SDRAM_BASE 0x90000000
> +#define PHYS_SDRAM 0x90000000
> +
> +#define PHYS_SDRAM_SIZE 0x70000000 /* 2GB - 256MB DDR */
> +#define PHYS_SDRAM_2_SIZE 0x380000000 /* 14GB */
> +
> +#define CFG_SYS_SECURE_SDRAM_BASE 0x8A000000 /* Secure DDR region for A55, SPL could use first 2MB */
> +#define CFG_SYS_SECURE_SDRAM_SIZE 0x06000000
> +
> +#define WDOG_BASE_ADDR WDG3_BASE_ADDR
> +
> +#ifdef CONFIG_ANDROID_SUPPORT
> +#include "imx952_evk_android.h"
> +#endif

It's a really bad idea having the board.h file bring in other includes.
We aren't using SZ macros, and a patch to clean up WDOG_BASE_ADDR so it
doesn't need to be in the board.h would be a good cleanup to do, but
maybe for now just make sure the watchdog driver has the regs header
included?

--
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]