Commit graph

80899 commits

Author SHA1 Message Date
Peng Fan
07110c6f53 imx: pinctrl: add pinctrl and pinfunc file for i.MX93
Add the pinctrl driver and pinfunc header file to support iMX93

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2022-07-26 11:29:00 +02:00
Peng Fan
636afd1bea gpio: pca953x: support pcal6524
Support pcal6524 IO expander driver

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2022-07-26 11:29:00 +02:00
Peng Fan
4eb2cbdd45 fsl_lpuart: add i.MX9 support
i.MX9 shares same register layout as i.MX7ULP, so
add the i.MX9 define here.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2022-07-26 11:29:00 +02:00
Peng Fan
881df6ed84 imx: add basic i.MX9 support
Add i.MX9 Kconfig and basic files for the new SoC

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2022-07-26 11:29:00 +02:00
Peng Fan
787f04bb6a imx: add USB2_BOOT type
Add USB2_BOOT type for i.MX8ULP and i.MX9

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2022-07-26 11:29:00 +02:00
Peng Fan
b0a284a7c9 imx: move get_boot_device to common file
i.MX8MN/P/ULP supports ROM API, they have almost same get_boot_device
implementation, so move to a common file. And when support i.MX9,
no need to include the other function copy.

Since sys_proto.h is included in imx_romapi.c, there will be build
warning for i.MX8M because wdog_regs not defined, so include imx-regs.h
in i.MX8M sys_proro.h

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2022-07-26 11:29:00 +02:00
Peng Fan
1859b8b60d imx: move get_boot_device to common header
Most i.MX implements get_boot_device, move it to common header to
simplify code

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2022-07-26 11:29:00 +02:00
Peng Fan
793b760fb0 imx: simplify dependency with SPL_BOOTROM_SUPPORT
For SoCs support ROM API, CONFIG_SPL_BOOTROM_SUPPORT is needed,
so use this macro to guard the code to avoid extend the list.

And drop the guard with structure definition, there is no need.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2022-07-26 11:29:00 +02:00
Ye Li
bf43907f6e imx: spl: Allow iMX7/8/8M to overwrite spl_board_boot_device
Move the default mapping of spl_boot_device to weak function of
spl_board_boot_device. So that every board of iMX7/8/8M can overwrite
this function to implement specific mapping.

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2022-07-26 11:29:00 +02:00
Ye Li
9270cc8f3b imx: Change USB boot device type
The SPL SDP is configured as BOOT_DEVICE_BOARD, so when booting from
USB, change its type to BOOT_DEVICE_BOARD, so we can use SDP.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2022-07-26 11:29:00 +02:00
Peng Fan
2f5ee7f812 arm: makefile: cleanup mach-imx usage
All the SoCs use mach-imx has CONFIG_MACH_IMX selected, so
the macro could be the gate to build arch/arm/mach-imx to simplify
the rules.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2022-07-26 11:29:00 +02:00
Peng Fan
658ff9d035 spl: imx8mm: enlarge SPL_MAX_SIZE
The CONFIG_SPL_MAX_SIZE could be 0x27000 for i.MX8MM when SPL_TEXT_BASE
set to 0x7E1000.

The DDR firmware max uses 96KB, there is a 4KB padding header before
SPL_TEXT_BASE, so the SPL MAX SIZE is `256KB - 96KB - 4KB`.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2022-07-26 11:28:59 +02:00
Martyn Welch
bb19f85168 MAINTAINERS: Update file list for ARM Freescale IMX
The MAINTAINERS file currently lists files in
arch/arm/include/asm/arch-imx/ being part of the IMX maintainers
purview, however the arch/arm/include/asm/ directory also contains the
directories arch-imx8, arch-imx8m, arch-imx8ulp and arch-imxrt which
would also appear to be relevant to the team. Tweak the entry to cover
these directories so that tools like get_maintainers.pl will suggest
relevant maintainers when making changes just in these directories.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>
2022-07-26 11:28:43 +02:00
Jun Nie
651478777b imx: syscounter: support timer_get_boot_us
With supporting timer_get_boot_us, we can profile boot up time with below
configs and function bootstage_mark_name().

CONFIG_BOOTSTAGE=y
CONFIG_BOOTSTAGE_REPORT=y
CONFIG_CMD_BOOTSTAGE=y

Signed-off-by: Jun Nie <jun.nie@linaro.org>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2022-07-26 11:28:43 +02:00
Ying-Chun Liu (PaulLiu)
085d041b57 configs: imx8mm-cl-iot-gate: enable extension command
For imx8mm-cl-iot-gate we can use extension command to scan
extension boards attached on the mainboard. We enable the
extension command by default for users to detect the extension
boards.

Signed-off-by: Ying-Chun Liu (PaulLiu) <paulliu@debian.org>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP i.MX U-Boot Team <uboot-imx@nxp.com>
2022-07-26 09:09:59 +02:00
Tim Harvey
a4a130651d configs: imx8mp_venice: remove unnecessary FEC_QUIRK_ENET_MAC
FEC_QUIRK_ENET_MAC is defined in the imx-regs.h include file and thus
does not need to be defined in the various board config includes.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2022-07-26 08:58:25 +02:00
Marcel Ziswiler
24a7a3c1c0 imx8mm: synchronise device tree with linux
Synchronise device tree with linux v5.19-rc5.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-07-25 16:12:01 +02:00
Marcel Ziswiler
87c4601c57 board: toradex: apalis-imx8: fix file names in maintainers
Fix device tree file names in MAINTAINERS file.

Fixes: 3d60366500 ("board: toradex: add apalis imx8qm 4gb wb it v1.0b module support")
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-07-25 16:12:01 +02:00
Marcel Ziswiler
181d1684ca imx8mq: synchronise device tree with linux
Synchronise device tree with linux v5.19-rc5.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-07-25 16:12:01 +02:00
Marcel Ziswiler
e6ad8070a7 verdin-imx8mp: synchronise device tree with linux
Synchronise device tree with linux v5.19-rc5.

Please note that this also means that instead of the previous "generic"
U-Boot specific carrier board agnostic device tree we are now using the
regular one for the Verdin Development (carrier) board (e.g.
imx8mp-verdin-wifi-dev.dtb rather than the previous imx8mp-verdin.dtb).

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-07-25 16:12:01 +02:00
Marcel Ziswiler
84c5cd9b84 imx8mp-rsb3720-a1: fix pwms property warnings
Fix the following build-time pwms property warnings:

w+arch/arm/dts/imx8mp-rsb3720-a1.dtb: Warning (pwms_property):
 /lvds_backlight@0:pwms: property size (12) too small for cell size 3
w+arch/arm/dts/imx8mp-rsb3720-a1.dtb: Warning (pwms_property):
 /lvds_backlight@1:pwms: property size (12) too small for cell size 3

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-07-25 16:12:01 +02:00
Marcel Ziswiler
e0caa84ca6 imx8mp: synchronise device tree with linux
Synchronise device tree with linux v5.19-rc5.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-07-25 16:12:01 +02:00
Marcel Ziswiler
4e5114daf9 imx8mn: synchronise device tree with linux
Synchronise device tree with linux v5.19-rc5.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-07-25 16:12:00 +02:00
Marcel Ziswiler
a68bad0a37 imx8mm-mx8menlo/verdin-imx8mm: synchronise device tree with linux
Synchronise device tree with linux v5.19-rc5.

Please note that this also means that instead of the previous "generic"
U-Boot specific carrier board agnostic device tree we are now using the
regular one for the Verdin Development (carrier) board (e.g.
imx8mm-verdin-wifi-dev.dtb rather than the previous imx8mm-verdin.dtb).

Please further note that the PMIC node name got changed from a pmic
label to pmic@25 which required adjustment in resp. board SPL file
board/toradex/verdin-imx8mm/spl.c.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-07-25 16:12:00 +02:00
Marcel Ziswiler
35c819ed4e imx8mm-kontron-n801x-s-lvds: fix pwms property warnings
Fix the following build-time pwms property warnings:

w+arch/arm/dts/imx8mm-kontron-n801x-s-lvds.dtb: Warning (pwms_property):
 /backlight:pwms: property size (12) too small for cell size 3

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-07-25 16:12:00 +02:00
Marcel Ziswiler
b96a9683e5 imx8mm-venice-gw700x: prepare to synchronise device trees with linux
As a preparatory step remove the pinctrl_pmic reference which does not
exist in the Linux upistream device tree.

This avoids the following error once synchronised:

+Error: arch/arm/dts/imx8mm-venice-gw700x-u-boot.dtsi:26.1-14 Label or
 path pinctrl_pmic not found

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-07-25 16:12:00 +02:00
Marcel Ziswiler
b4052d55ad colibri_vf: synchronise device tree with linux
Synchronise device tree with linux v5.19-rc5.

Please note that this also means that instead of the previous "generic"
U-Boot specific carrier board agnostic device tree we are now using the
regular one for the Colibri Evaluation (carrier) board V3 (e.g.
vf610-colibri-eval-v3.dtb rather than the previous vf610-colibri.dtb).

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-07-25 16:12:00 +02:00
Marcel Ziswiler
e8a9521e64 vf500/vf610: synchronise device trees with linux
Synchronise device trees with linux v5.19-rc5.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-07-25 16:12:00 +02:00
Marcel Ziswiler
fed2e400ff ARM: DTS: bk4r1/pcm052: prepare to synchronise device trees with linux
As a preparatory step rename the included SoC dtsi from vf.dtsi to
vf610.dtsi as this is how it is named in Linux upstream.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-07-25 16:12:00 +02:00
Marcel Ziswiler
25ab97986c colibri-imx7d/-emmc: synchronise device tree with linux
Synchronise device tree with linux-next next-20220708.

Please note that this also means that instead of the previous "generic"
U-Boot specific carrier board agnostic device trees we are now using the
regular ones for the Colibri Evaluation (carrier) board V3 (e.g.
imx7d-colibri-eval-v3.dtb rather than the previous
imx7-colibri-rawnand.dtb and imx7d-colibri-emmc-eval-v3.dtb rather than
the previous imx7-colibri-emmc.dtb).

Please further note that the PMIC node name got changed from rn5t567@33
to pmic@33 which required adjustment in resp. board file
board/toradex/colibri_imx7/colibri_imx7.c.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-07-25 16:12:00 +02:00
Marcel Ziswiler
2f96d4dd95 imx7s/d: synchronise device trees with linux
Synchronise device tree with linux-next next-20220708.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-07-25 16:12:00 +02:00
Marcel Ziswiler
868b5cb74e imx: imx7d-sdb: prepare to synchronise device trees with linux
As a preparatory step remove the epdc reference which does not exist in
the Linux upstream device tree and rename the qspi1 reference to qspi as
this is how it is named in the Linux upstream device tree.

This avoids the following error once synchronised:

+Error: arch/arm/dts/.imx7d-sdb-qspi.dtb.pre.tmp:10.1-6 Label or path
 epdc not found
+Error: arch/arm/dts/.imx7d-sdb-qspi.dtb.pre.tmp:29.1-7 Label or path
 qspi1 not found
+Error: arch/arm/dts/imx7d-sdb-qspi-u-boot.dtsi:6.1-7 Label or path
 qspi1 not found

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-07-25 16:12:00 +02:00
Marcel Ziswiler
7b4a934d73 imx: imx7-cm: prepare to synchronise device trees with linux
As a preparatory step rename the qspi1 reference to qspi as this is how
it is named in the Linux upstream device tree.

This avoids the following error once synchronised:

+Error: arch/arm/dts/.imx7-cm.dtb.pre.tmp:96.1-7 Label or path qspi1 not
 found

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-07-25 16:12:00 +02:00
Marcel Ziswiler
c21b61bff1 colibri-imx6ull/-emmc: synchronise device tree with linux
Synchronise device tree with linux v5.19-rc5.

Please note that this also means that instead of the previous "generic"
U-Boot specific carrier board agnostic device trees we are now using the
regular ones for the Colibri Evaluation (carrier) board V3 (e.g.
imx6ull-colibri-eval-v3.dtb rather than the previous imx6ull-colibri.dtb
and imx6ull-colibri-emmc-eval-v3.dtb rather than the previous
imx6ull-colibri-emmc.dtb).

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-07-25 16:12:00 +02:00
Marcel Ziswiler
5d7a95f499 imx6ul/imx6ull: synchronise device trees with linux
Synchronise device trees with linux v5.19-rc5.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-07-25 16:12:00 +02:00
Marcel Ziswiler
091a03f8f3 imx: mx6ul_14x14_evk: prepare to synchronise device trees with linux
As a preparatory step remove the qspi node with its flash0 label as this
is already in the Linux upstream device tree.

This avoids the following error once synchronised:

+arch/arm/dts/imx6ul-14x14-evk.dtb: ERROR (duplicate_label):
 /soc/bus@2100000/spi@21e0000/n25q256a@0: Duplicate label 'flash0' on
 /soc/bus@2100000/spi@21e0000/n25q256a@0 and
 /soc/bus@2100000/spi@21e0000/flash@0

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-07-25 16:12:00 +02:00
Marcel Ziswiler
bd483b7a9f colibri_imx6: synchronise device tree with linux
Synchronise device tree with linux-next next-20220708.

Please note that this also means that instead of the previous "generic"
U-Boot specific carrier board agnostic device tree we are now using the
regular one for the Colibri Evaluation (carrier) board V3 (e.g.
imx6dl-colibri-eval-v3.dtb rather than the previous imx6-colibri.dtb).

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-07-25 16:12:00 +02:00
Marcel Ziswiler
50ba171e2d apalis_imx6: synchronise device tree with linux
Synchronise device tree with linux-next 20220706.

Please note that this also means that instead of the previous "generic"
U-Boot specific carrier board agnostic device tree we are now using the
regular one for the Apalis Evaluation (carrier) board (e.g.
imx6q-apalis-eval.dtb rather than the previous imx6-apalis.dtb).

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-07-25 16:12:00 +02:00
Marcel Ziswiler
d0399a46e7 imx6dl/imx6qdl: synchronise device trees with linux
Synchronise device trees with linux-next next-20220708.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-07-25 16:12:00 +02:00
Marcel Ziswiler
50b229523b tbs2910: prepare to synchronise device trees with linux
As a preparatory step make sure to refer to absolute node paths where
labels were removed in Linux upstream.

This avoids the following error once synchronised:

+Error: arch/arm/dts/imx6q-tbs2910-u-boot.dtsi:3.1-7 Label or path aips1
 not found
+Error: arch/arm/dts/imx6q-tbs2910-u-boot.dtsi:11.1-5 Label or path soc
 not found

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-07-25 16:12:00 +02:00
Marcel Ziswiler
6f7db3a968 imx6: aristainetos: fix pwms property warnings
Fix the following build-time pwms property warnings:

w+arch/arm/dts/imx6dl-aristainetos2c_7.dtb: Warning (pwms_property):
 /backlight:pwms: property size (12) too small for cell size 3
w+arch/arm/dts/imx6dl-aristainetos2c_cslb_7.dtb: Warning (pwms_property):
 /backlight:pwms: property size (12) too small for cell size 3

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
2022-07-25 16:12:00 +02:00
Marcel Ziswiler
398ae1dca1 board/BuR/brppt2: fix pwms property warning
Fix the following build-time pwms property warning:

w+arch/arm/dts/imx6dl-brppt2.dtb: Warning (pwms_property):
 /backlight:pwms: property size (12) too small for cell size 3

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-07-25 16:12:00 +02:00
Francesco Dolcini
abe52f58bc toradex: common: Improve product/serial print during boot
Add product id print in show_board_info(), with an increasing number of
Toradex SKUs available with small differences it makes sense to print it.

Move serial number print to a dedicated line, this prevents the previous
line with the product name to overflow the 80 columns with any
reasonable product name length.

Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2022-07-25 16:12:00 +02:00
Francesco Dolcini
4f0c33c46d toradex: tdx-cfg-block: Use official SKU names
Up to now in the code we named Toradex SKUs in a slightly different way
compared to the official product name, start using the official names
from now on to avoid misunderstanding.

This has also the nice benefit of the string being shorter, allowing
to fit nicely in 80 columns even adding the product ID when printing
the hardware information.

Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2022-07-25 16:12:00 +02:00
Francesco Dolcini
9762fbeea4 toradex: common: Remove #ifdef usage for 2nd ethaddr
Fix checkpatch warn, use `IS_ENABLED(CONFIG_TDX_CFG_BLOCK_2ND_ETHADDR)`
instead of `#ifdef CONFIG_TDX_CFG_BLOCK_2ND_ETHADDR`.

Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2022-07-25 16:12:00 +02:00
Francesco Dolcini
0d4b692c80 toradex: common: Remove stale function declaration
Remove stale show_boot_logo() declaration, not used anywhere.

Fixes: e6fd30dd9e ("toradex: drop legacy show_boot_logo function and use splashscreen")
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2022-07-25 16:12:00 +02:00
Francesco Dolcini
8b6dc5d394 toradex: tdx-cfg-block: Cleanup interactive cfg block creation
Simplify interactive config block creation code, instead of having a
a long list of questions and a complex tree of preprocessor directive to
guess the exact SKU, just ask the user to select it from a list.

The modules list is filtered out to include only SKUs that are supported
by the specific u-boot binary in execution.

Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2022-07-25 16:12:00 +02:00
Francesco Dolcini
cdc39c6aae toradex: common: Use ARRAY_SIZE macro
Use generally available ARRAY_SIZE macro, instead of hand-coding it
every time is needed.

Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2022-07-25 16:12:00 +02:00
Francesco Dolcini
ea1dc32f31 toradex: common: Remove stale comments about modules availability
Remove comment "not currently on sale" on specific SKUs, this
information does not belong to the code and will never be accurate.

Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2022-07-25 16:12:00 +02:00
Philippe Schenker
a2da29a4e2 toradex: tdx-cfg-block: add 0068 i.mx 8m mini sku
Add new i.MX 8M Mini SKU to ConfigBlock handling.

0068: Verdin iMX8M Mini Quad 2GB WB IT No CAN

This SKU is identical to 0055 but without CAN. Mention this in the name
so those modules can be distinguished.

Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2022-07-25 16:12:00 +02:00