All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gary Bisson <bisson.gary@gmail.com>
To: "Sébastien Szymanski" <sebastien.szymanski@armadeus.com>
Cc: Refik Tuzakli <tuzakli.refik@gmail.com>,
	Julien Olivain <ju.o@free.fr>, Fabio Estevam <festevam@gmail.com>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v3 1/3] package/freescale-imx: add i.MX91 and i.MX93 SoC support
Date: Mon, 22 Jan 2024 12:01:31 +0100	[thread overview]
Message-ID: <Za5LC0fMBoDVzuiS@p1g2> (raw)
In-Reply-To: <20240109172600.12811-2-sebastien.szymanski@armadeus.com>

Hi Sébastien,

On Tue, Jan 09, 2024 at 06:25:58PM +0100, Sébastien Szymanski wrote:
> This commit adds i.MX91 and i.MX93 support to Buildroot.
> https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-9-processors:IMX9-PROCESSORS
> 
> There is no i.MX95 software provided by NXP at the moment that's why
> i.MX95 is left behind.
> 
> Adapt package firmware-imx for the LPPDR4 firwmares binaries.
> 
> Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
> ---
> 
> Changes for v3:
>  - none
> 
> Changes for v2:
>  - none
> 
>  package/freescale-imx/Config.in               |  8 +++++++
>  package/freescale-imx/firmware-imx/Config.in  |  9 ++++++++
>  .../firmware-imx/firmware-imx.mk              | 23 +++++++++++++++++++
>  3 files changed, 40 insertions(+)
> 
> diff --git a/package/freescale-imx/Config.in b/package/freescale-imx/Config.in
> index 1c26b3cc6f4c..0229eaf0271f 100644
> --- a/package/freescale-imx/Config.in
> +++ b/package/freescale-imx/Config.in
> @@ -61,6 +61,12 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X
>  config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8DXL
>  	bool "imx8dxl"
>  
> +config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91
> +	bool "imx91"
> +
> +config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93
> +	bool "imx93"
> +
>  endchoice
>  
>  config BR2_PACKAGE_FREESCALE_IMX_PLATFORM
> @@ -80,6 +86,8 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM
>  	default "IMX8MM" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM
>  	default "IMX8MN" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MN
>  	default "IMX8MP" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MP
> +	default "IMX91" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91
> +	default "IMX93" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93
>  
>  config BR2_PACKAGE_FREESCALE_IMX_HAS_VPU
>  	bool
> diff --git a/package/freescale-imx/firmware-imx/Config.in b/package/freescale-imx/firmware-imx/Config.in
> index 087ddef8771b..7be6761253c9 100644
> --- a/package/freescale-imx/firmware-imx/Config.in
> +++ b/package/freescale-imx/firmware-imx/Config.in
> @@ -55,6 +55,8 @@ config BR2_PACKAGE_FIRMWARE_IMX_NEEDS_DDR_FW
>  	default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM
>  	default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MN
>  	default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MP
> +	default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91
> +	default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93
>  
>  if BR2_PACKAGE_FIRMWARE_IMX_NEEDS_DDR_FW
>  
> @@ -73,11 +75,15 @@ config BR2_PACKAGE_FIRMWARE_IMX_LPDDR4
>  
>  config BR2_PACKAGE_FIRMWARE_IMX_DDR4
>  	bool "DDR4"
> +	depends on !BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91
> +	depends on !BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93
>  	help
>  	  Use DDR4 binaries (i.e.: ddr4_*_201810.bin).
>  
>  config BR2_PACKAGE_FIRMWARE_IMX_DDR3
>  	bool "DDR3"
> +	depends on !BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91
> +	depends on !BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93
>  	help
>  	  Use DDR3 binaries (i.e.: ddr3_*_201810.bin).
>  
> @@ -89,6 +95,9 @@ config BR2_PACKAGE_FIRMWARE_IMX_DDR_VERSION
>  	# unconditionally use HW version 201810 when DDR3/DDR4 was
>  	# selected
>  	default "201810" if BR2_PACKAGE_FIRMWARE_IMX_DDR3 || BR2_PACKAGE_FIRMWARE_IMX_DDR4
> +	default "202201" if \
> +		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91 || \
> +		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93

Why not having the DDR version set as "v202201" here?

>  	help
>  	  Use a specific version of the imx ddr binaries. Leaving this
>  	  field empty will select the default version.
> diff --git a/package/freescale-imx/firmware-imx/firmware-imx.mk b/package/freescale-imx/firmware-imx/firmware-imx.mk
> index 66ef8c3930be..a08e8c4fb097 100644
> --- a/package/freescale-imx/firmware-imx/firmware-imx.mk
> +++ b/package/freescale-imx/firmware-imx/firmware-imx.mk
> @@ -43,11 +43,33 @@ endef
>  FIRMWARE_IMX_DDR_VERSION = $(call qstrip,$(BR2_PACKAGE_FIRMWARE_IMX_DDR_VERSION))
>  ifneq ($(FIRMWARE_IMX_DDR_VERSION),)
>  FIRMWARE_IMX_DDR_VERSION_SUFFIX = _$(FIRMWARE_IMX_DDR_VERSION)
> +ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91)$(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93),y)
> +FIRMWARE_IMX_DDR_VERSION_SUFFIX = _v$(FIRMWARE_IMX_DDR_VERSION)
> +endif

That would allow to get rid of the above and keep the suffix variable
somewhat generic across the CPUs?
No strong feelings here, just a suggestion to make the patch even
smaller.

>  endif
>  
>  ifeq ($(BR2_PACKAGE_FIRMWARE_IMX_LPDDR4),y)
>  FIRMWARE_IMX_DDRFW_DIR = $(@D)/firmware/ddr/synopsys
>  
> +ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91)$(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93),y)
> +define FIRMWARE_IMX_INSTALL_IMAGE_DDR_FW
> +	# Create padded versions of lpddr4_pmu_* and generate lpddr4_pmu_train_fw.bin.
> +	# lpddr4_pmu_train_fw.bin is needed when generating imx9-boot-sd.bin
> +	# which is done in post-image script.
> +	$(call FIRMWARE_IMX_PREPARE_DDR_FW, \
> +		lpddr4_imem_1d$(FIRMWARE_IMX_DDR_VERSION_SUFFIX),
> +		lpddr4_dmem_1d$(FIRMWARE_IMX_DDR_VERSION_SUFFIX),
> +		lpddr4_pmu_train_1d_fw)
> +	$(call FIRMWARE_IMX_PREPARE_DDR_FW, \
> +		lpddr4_imem_2d$(FIRMWARE_IMX_DDR_VERSION_SUFFIX),
> +		lpddr4_dmem_2d$(FIRMWARE_IMX_DDR_VERSION_SUFFIX),
> +		lpddr4_pmu_train_2d_fw)
> +	cat $(FIRMWARE_IMX_DDRFW_DIR)/lpddr4_pmu_train_1d_fw.bin \
> +		$(FIRMWARE_IMX_DDRFW_DIR)/lpddr4_pmu_train_2d_fw.bin > \
> +		$(BINARIES_DIR)/lpddr4_pmu_train_fw.bin
> +	ln -sf $(BINARIES_DIR)/lpddr4_pmu_train_fw.bin $(BINARIES_DIR)/ddr_fw.bin
> +endef
> +else
>  define FIRMWARE_IMX_INSTALL_IMAGE_DDR_FW
>  	# Create padded versions of lpddr4_pmu_* and generate lpddr4_pmu_train_fw.bin.
>  	# lpddr4_pmu_train_fw.bin is needed when generating imx8-boot-sd.bin
> @@ -71,6 +93,7 @@ define FIRMWARE_IMX_INSTALL_IMAGE_DDR_FW
>  	cp $(FIRMWARE_IMX_DDRFW_DIR)/lpddr4*.bin $(BINARIES_DIR)/
>  endef
>  endif
> +endif
>  
>  ifeq ($(BR2_PACKAGE_FIRMWARE_IMX_DDR4),y)
>  FIRMWARE_IMX_DDRFW_DIR = $(@D)/firmware/ddr/synopsys

Otherwise the rest looks good.

Regards,
Gary
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2024-01-22 11:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-09 17:25 [Buildroot] [PATCH v3 0/3] i.MX91 and i.MX93 support Sébastien Szymanski
2024-01-09 17:25 ` [Buildroot] [PATCH v3 1/3] package/freescale-imx: add i.MX91 and i.MX93 SoC support Sébastien Szymanski
2024-01-22 11:01   ` Gary Bisson [this message]
2024-01-09 17:25 ` [Buildroot] [PATCH v3 2/3] package/freescale-imx/firmware-ele-imx: new package Sébastien Szymanski
2024-01-22 11:05   ` Gary Bisson
2024-01-09 17:26 ` [Buildroot] [PATCH v3 3/3] configs/freescale_imx93evk: new defconfig Sébastien Szymanski
2024-01-10 22:07   ` Julien Olivain

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=Za5LC0fMBoDVzuiS@p1g2 \
    --to=bisson.gary@gmail.com \
    --cc=buildroot@buildroot.org \
    --cc=festevam@gmail.com \
    --cc=ju.o@free.fr \
    --cc=sebastien.szymanski@armadeus.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=tuzakli.refik@gmail.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.