]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
2 years agoimx6qdl: synchronise device tree with linux
Marcel Ziswiler [Sat, 22 Oct 2022 21:59:39 +0000 (23:59 +0200)]
imx6qdl: synchronise device tree with linux

Synchronise device tree with linux v6.0-rc1.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoimx6qp: synchronise device tree with linux
Marcel Ziswiler [Sat, 22 Oct 2022 21:59:38 +0000 (23:59 +0200)]
imx6qp: synchronise device tree with linux

Synchronise device tree with linux v6.0-rc1.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoimx6sl: synchronise device tree with linux
Marcel Ziswiler [Sat, 22 Oct 2022 21:59:37 +0000 (23:59 +0200)]
imx6sl: synchronise device tree with linux

Synchronise device tree with linux v6.0-rc1.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoimx6sll: synchronise device tree with linux
Marcel Ziswiler [Sat, 22 Oct 2022 21:59:36 +0000 (23:59 +0200)]
imx6sll: synchronise device tree with linux

Synchronise device tree with linux v6.0-rc1.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoimx6sx: synchronise device tree with linux
Marcel Ziswiler [Sat, 22 Oct 2022 21:59:35 +0000 (23:59 +0200)]
imx6sx: synchronise device tree with linux

Synchronise device tree with linux v6.0-rc1.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoimx6ulz: synchronise device tree with linux
Marcel Ziswiler [Sat, 22 Oct 2022 21:59:34 +0000 (23:59 +0200)]
imx6ulz: synchronise device tree with linux

Synchronise device tree with linux v6.0-rc1.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoimx6ull: synchronise device tree with linux
Marcel Ziswiler [Sat, 22 Oct 2022 21:59:33 +0000 (23:59 +0200)]
imx6ull: synchronise device tree with linux

Synchronise device tree with linux v6.0-rc1.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoimx6ul: synchronise device tree with linux
Marcel Ziswiler [Sat, 22 Oct 2022 21:59:32 +0000 (23:59 +0200)]
imx6ul: synchronise device tree with linux

Synchronise device tree with linux v6.0-rc1.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoimx7d: synchronise device tree with linux
Marcel Ziswiler [Sat, 22 Oct 2022 21:59:31 +0000 (23:59 +0200)]
imx7d: synchronise device tree with linux

Synchronise device tree with linux v6.0-rc1.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoimx7ulp: synchronise device tree with linux
Marcel Ziswiler [Sat, 22 Oct 2022 21:59:30 +0000 (23:59 +0200)]
imx7ulp: synchronise device tree with linux

Synchronise device tree with linux v6.0-rc1.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoarm: dts: imx8mn-venice: Consolidate with imx8mn-u-boot
Adam Ford [Sat, 22 Oct 2022 00:58:37 +0000 (19:58 -0500)]
arm: dts: imx8mn-venice: Consolidate with imx8mn-u-boot

Now that a unified imx8mn-u-boot is available, remove duplicated
code for generating flash.bin and other common imx8mn peripherals.

Signed-off-by: Adam Ford <aford173@gmail.com>
2 years agoarm: dts: imx8mn-var-som-symphony: Consolidate with imx8mn-u-boot
Adam Ford [Sat, 22 Oct 2022 00:58:36 +0000 (19:58 -0500)]
arm: dts: imx8mn-var-som-symphony: Consolidate with imx8mn-u-boot

Now that a unified imx8mn-u-boot is available, remove duplicated
code for generating flash.bin and other common imx8mn peripherals.

Signed-off-by: Adam Ford <aford173@gmail.com>
2 years agoarm: dts: imx8mn-evk: Consolidate with imx8mn-u-boot
Adam Ford [Sat, 22 Oct 2022 00:58:35 +0000 (19:58 -0500)]
arm: dts: imx8mn-evk: Consolidate with imx8mn-u-boot

Now that a unified imx8mn-u-boot is available, remove duplicated
code for generating flash.bin and other common imx8mn peripherals.

Signed-off-by: Adam Ford <aford173@gmail.com>
2 years agoarm: dts: imx8mn-ddr4-evk: Consolidate with imx8mn-u-boot
Adam Ford [Sat, 22 Oct 2022 00:58:34 +0000 (19:58 -0500)]
arm: dts: imx8mn-ddr4-evk: Consolidate with imx8mn-u-boot

Now that a unified imx8mn-u-boot is available, remove duplicated
code for generating flash.bin and other common imx8mn peripherals.

Signed-off-by: Adam Ford <aford173@gmail.com>
2 years agoarm: dts: imx8mn-bsh-smm-s2: Consolidate with imx8mn-u-boot
Adam Ford [Sat, 22 Oct 2022 00:58:33 +0000 (19:58 -0500)]
arm: dts: imx8mn-bsh-smm-s2: Consolidate with imx8mn-u-boot

Now that a unified imx8mn-u-boot is available, remove duplicated
code for generating flash.bin and other common imx8mn peripherals.

Signed-off-by: Adam Ford <aford173@gmail.com>
2 years agoarm: dts: imx8mn-beacon-kit: Consolidate with imx8mn-u-boot
Adam Ford [Sat, 22 Oct 2022 00:58:32 +0000 (19:58 -0500)]
arm: dts: imx8mn-beacon-kit: Consolidate with imx8mn-u-boot

Now that a unified imx8mn-u-boot is available, remove duplicated
code for generating flash.bin and other common imx8mn peripherals.

Signed-off-by: Adam Ford <aford173@gmail.com>
2 years agoarm: dts: imx8mn-u-boot: Create common imx8mn-u-boot.dtsi
Adam Ford [Sat, 22 Oct 2022 00:58:31 +0000 (19:58 -0500)]
arm: dts: imx8mn-u-boot: Create common imx8mn-u-boot.dtsi

Multiple boards create duplicate entries in their respective
-u-boot.dtsi files which all basically do the same thing.
To consolidate these and make it easier to make improvements
going forward, consolidate them all into one place.

This file creates a flash.bin image using binman, and supports
LPDDR4, DDR4 and DDR3.  Since individual boards use different
peripherals and different UART ports, those entries were kept
in their respective board files, but the spba1 node was addded
which contains all UART1-3 to help facilitate SPL_DM_SERIAL.
Individual users will still need to include their respective
UART and pinctrl nodes for those UARTS.

This consolidated file also supports generating a flash.bin file
which can boot from flexSPI if CONFIG_FSPI_CONF_HEADER is
enabled.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoimx8m: fix reading of DDR4 MR registers [again]
Rasmus Villemoes [Thu, 6 Oct 2022 12:56:50 +0000 (14:56 +0200)]
imx8m: fix reading of DDR4 MR registers [again]

Commit 290ffe5788 (imx8m: fix reading of DDR4 MR registers) lifted a
private definition of lpddr4_mr_read() from imx8mm-cl-iot-gate board
code to drivers/ddr/imx/imx8m/ddrphy_utils.c, because that version
actually seems to work in practice.

However, commit 99c7cc58e1 (ddr: imx: Add i.MX9 DDR controller driver)
reintroduced the broken version in drivers/ddr/imx/imx8m/ddr_init.c,
copied most of the rest of ddrphy_utils.c to
drivers/ddr/imx/phy/ddrphy_utils.c, and stopped building
drivers/ddr/imx/imx8m/ddrphy_utils.c [and that file was then finally
completely removed with 7e9bd84883 (imx8m: ddrphy_utils: Remove unused
file)].

I assume this must have broken the imx8mm-cl-iot-gate board, at least
those that have not had their eeprom programmed with the proper
information. It certainly did break our out-of-tree board which always
reads back the ID register and uses that for a sanity check.

So apply the fix from 290ffe5788 once again.

Fixes: 99c7cc58e1 (ddr: imx: Add i.MX9 DDR controller driver)
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoverdin-imx8mp: spl: initialize caam
Andrejs Cainikovs [Tue, 4 Oct 2022 11:06:31 +0000 (13:06 +0200)]
verdin-imx8mp: spl: initialize caam

This change initializes Cryptographic Accelerator and Assurance Module.

Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2 years agoarm: dts: verdin-imx8mp: enable caam in SPL
Andrejs Cainikovs [Tue, 4 Oct 2022 11:06:30 +0000 (13:06 +0200)]
arm: dts: verdin-imx8mp: enable caam in SPL

CAAM is initialized in SPL, so relevant device tree nodes needs to be
updated.

Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2 years agoverdin-imx8mp: various config additions and improvements
Marcel Ziswiler [Thu, 22 Sep 2022 21:28:34 +0000 (23:28 +0200)]
verdin-imx8mp: various config additions and improvements

- enable bootcount command
- enable CRC32 and MD5
- enable time commands
- enable GPIO LED support
- enable further eMMC HS400 functionality
- enable fixed PHY and MDIO driver model
- enable USB host functionality
- enable thermal management unit driver
- enable hexdump

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoverdin-imx8mm: various config additions and improvements
Marcel Ziswiler [Thu, 22 Sep 2022 21:28:33 +0000 (23:28 +0200)]
verdin-imx8mm: various config additions and improvements

- enable bootcount command
- integrate bootcount using SNVS_LP general purpose register LPGPR0
- enable link-time optimisation
- explicitly set a boot delay of one second
- enable CRC32 and MD5
- enable command for low-level access to data in a partition
- enable time commands
- enable PMIC commands
- improve ETHPRIME configuration
- enable eMMC HS400 functionality
- enable fixed PHY and MDIO driver model
- remove stale PFUZE100 PMIC driver
- enable thermal management unit driver
- enable more USB host functionality
- enable hexdump

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoverdin-imx8mm: verdin-imx8mp: update env memory layout (again)
Marcel Ziswiler [Thu, 22 Sep 2022 21:28:32 +0000 (23:28 +0200)]
verdin-imx8mm: verdin-imx8mp: update env memory layout (again)

Update the distro config env memory layout for the Verdin iMX8M Mini and
Verdin iMX8M Plus again:

- loadaddr=0x48200000 allows for 128MB area for uncompressing (ie FIT
  images, kernel_comp_addr_r, kernel_comp_size)
- fdt_addr_r = loadaddr + 128MB - allows for 128MB kernel
- scriptaddr = fdt_addr_r + 512KB - allows for 512KB fdt
- ramdisk_addr_r = scriptaddr + 512KB - allows for 512KB script

Memory layout taken from commit fd5c7173ade4
("imx8m{m,n}_venice: update env memory layout").

Note that for our regular BSP Layers and Reference Images for Yocto
Project an updated distro boot script is required (see
meta-toradex-bsp-common/recipes-bsp/u-boot/u-boot-distro-boot).

Note that this corrects a pre-maturely applied version 2 of the same
patch set.

Fixes: bbe0089d29e ("verdin-imx8mm: verdin-imx8mp: update env memory layout")
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoboard: gateworks: venice: add imx8mm-gw7904 support
Tim Harvey [Wed, 14 Sep 2022 16:02:19 +0000 (09:02 -0700)]
board: gateworks: venice: add imx8mm-gw7904 support

The GW7904 is based on the i.MX 8M Mini SoC featuring:
 - LPDDR4 DRAM
 - eMMC FLASH
 - microSD connector with UHS support
 - LIS2DE12 3-axis accelerometer
 - Gateworks System Controller
 - IMX8M FEC
 - 2x RS232 off-board connectors
 - PMIC
 - 10x bi-color LED's
 - 1x miniPCIe socket with PCIe and USB2.0
 - 802.3at Class 4 PoE
 - 10-30VDC input via barrel-jack

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2 years agoboard: imx8mp: Add Engicam i.Core MX8M Plus EDIMM2.2 Starter Kit
Manoj Sai [Fri, 26 Aug 2022 12:33:37 +0000 (18:03 +0530)]
board: imx8mp: Add Engicam i.Core MX8M Plus EDIMM2.2 Starter Kit

i.Core MX8M Plus is an EDIMM SoM based on NXP i.MX8M Plus from Engicam.

i.Core MX8M Plus needs to mount on top of this Evaluation board for
creating complete i.Core MX8M Plus EDIMM2.2 Starter Kit.

Add support for it.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: Manoj Sai <abbaraju.manojsai@amarulasolutions.com>
2 years agoarm64: dts: imx8mp: Add Engicam i.Core MX8M Plus EDIMM2.2 Starter Kit
Manoj Sai [Fri, 26 Aug 2022 12:33:36 +0000 (18:03 +0530)]
arm64: dts: imx8mp: Add Engicam i.Core MX8M Plus EDIMM2.2 Starter Kit

Genaral features:
- LCD 7" C.Touch
- microSD slot
- Ethernet 1Gb
- Wifi/BT
- 2x LVDS Full HD interfaces
- 3x USB 2.0
- 1x USB 3.0
- HDMI Out
- Plus PCIe
- MIPI CSI
- 2x CAN
- Audio Out

i.Core MX8M Plus is an EDIMM SoM based on NXP i.MX8M Plus from Engicam.

i.Core MX8M Plus needs to mount on top of this Evaluation board for
creating complete i.Core MX8M Plus EDIMM2.2 Starter Kit.

Add support for it.

Sync the i.Core MX8M Plus is an EDIMM SoM based on NXP
devicetree file from linux-next tree.
commit <aec8ad34f7f24> (arm64: dts: imx8mp: Add Engicam i.Core MX8M Plus EDIMM2.2 Starter Kit)

Signed-off-by: Manoj Sai <abbaraju.manojsai@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2 years agoarm64: dts: imx8mp: Add Engicam i.Core MX8M Plus SoM
Manoj Sai [Fri, 26 Aug 2022 12:33:35 +0000 (18:03 +0530)]
arm64: dts: imx8mp: Add Engicam i.Core MX8M Plus SoM

i.Core MX8M Plus is an EDIMM SoM based on NXP i.MX8M Plus
from Engicam.

General features:
- NXP i.MX8M Plus
- Up to 4GB LDDR4
- 8 eMMC
- Gigabit Ethernet
- USB 3.0, 2.0 Host/OTG
- PCIe 3.0 interface
- I2S
- LVDS
- rest of i.MX8M Plus features

i.Core MX8M Plus needs to mount on top of Engicam baseboards
for creating complete platform solutions.

Add support for it.

Sync the i.Core MX8M Plus is an EDIMM SoM based on NXP i.MX8M Plus
from Engicam devicetree file from linux-next tree.
commit <eefe06b295087> (arm64: dts: imx8mp: Add Engicam i.Core MX8M Plus SoM)

Signed-off-by: Manoj Sai <abbaraju.manojsai@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2 years agoboard: gateworks: venice: add GW7903 PMIC
Tim Harvey [Thu, 11 Aug 2022 18:57:04 +0000 (11:57 -0700)]
board: gateworks: venice: add GW7903 PMIC

The GW7903 has a BD71847 PMIC on I2C1. Adjust the model compare strings
to add it.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2 years agoimx8mn-venice-u-boot: Fix broken boot
Fabio Estevam [Mon, 3 Oct 2022 13:59:24 +0000 (10:59 -0300)]
imx8mn-venice-u-boot: Fix broken boot

When the imx8mm.dtsi file was pulled in from Linux, the UARTs
were moved into an spba sub-node which wasn't being included
in the SPL device tree.  This meant the references to the UART
weren't being handled properly and when booting the system would
constantly reboot.  Fix this by adding the spba node to the spl
device tree to restore normal booting.

Based on the patch from Adam Ford for the imx8mn-beacon-kit-u-boot
board.

Fixes: 4e5114daf9eb ("imx8mn: synchronise device tree with linux")
Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
2 years agoimx8mn-ddr4-evk-u-boot: Fix broken boot
Fabio Estevam [Mon, 3 Oct 2022 13:39:21 +0000 (10:39 -0300)]
imx8mn-ddr4-evk-u-boot: Fix broken boot

When the imx8mm.dtsi file was pulled in from Linux, the UARTs
were moved into an spba sub-node which wasn't being included
in the SPL device tree.  This meant the references to the UART
weren't being handled properly and when booting the system would
constantly reboot.  Fix this by adding the spba node to the spl
device tree to restore normal booting.

Based on the patch from Adam Ford for the imx8mn-beacon-kit-u-boot
board.

Fixes: 4e5114daf9eb ("imx8mn: synchronise device tree with linux")
Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
2 years agoboard: gateworks: gw_ventana: fix mmc env dev
Tim Harvey [Wed, 28 Sep 2022 21:00:35 +0000 (14:00 -0700)]
board: gateworks: gw_ventana: fix mmc env dev

Fix the MMC env device for boards with eMMC by adding a
board_mmc_get_env_dev override to return the boot device as the
MMC env device.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2 years agoARM: imx6: dh-imx6: Use sf update instead of sf erase and write
Marek Vasut [Wed, 28 Sep 2022 16:45:18 +0000 (18:45 +0200)]
ARM: imx6: dh-imx6: Use sf update instead of sf erase and write

With sf update fixed to support unaligned start offset, use plain
sf update to update the bootloader in SPI NOR. This also helps
avoid the case where not enough SPI NOR has been erased and the
bootloader has been written to unerased area, and thus corrupted.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2 years agoARM: imx: Enable btrfs support on DHSOM
Marek Vasut [Wed, 28 Sep 2022 15:40:11 +0000 (17:40 +0200)]
ARM: imx: Enable btrfs support on DHSOM

The btrfs filesystem provides advanced functionality like copy-on-write
and snapshots, as well as metadata and data duplication and checksumming.
Enable btrfs in U-Boot to permit even the primary partition to be btrfs
and let system boot from it.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2 years agocrypto/fsl: fsl_rsa: Fix dcache issue in the driver
Ye Li [Wed, 28 Sep 2022 10:19:02 +0000 (15:49 +0530)]
crypto/fsl: fsl_rsa: Fix dcache issue in the driver

issue:
CAAM fails with key error when perform Modular Exponentiation
using PKHA Block in CAAM

Fix:
add flush and invalidate dcache for keys, signature
and output decrypted data processed by CAAM.

Fixes: 34276478f7 (DM: crypto/fsl - Add Freescale rsa DM driver)
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Gaurav Jain <gaurav.jain@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
2 years agoapalis/colibri_imx6/-imx6ull/_imx7: update env memory layout
Marcel Ziswiler [Tue, 27 Sep 2022 15:50:52 +0000 (17:50 +0200)]
apalis/colibri_imx6/-imx6ull/_imx7: update env memory layout

Update the distro config env memory layout for the Apalis iMX6,
Colibri iMX6, Colibri iMX6ULL and Colibri iMX7:

- loadaddr=0x84200000 (resp. 0x14200000 on them i.MX 6) allows for 64MB
  area for uncompressing (ie FIT images)
- fdt_addr_r = loadaddr + 64MB : allows for 64MB kernel
- scriptaddr = fdt_addr_r + 512KB : allows for 512KB fdt
- pxefile_addr_r = scriptaddr + 512KB : allows for 512KB script
- ramdisk_addr_r = pxefile_addr_r + 512KB : allows for 1MB extlinux.conf

Memory layout analogous to 64-bit one from commit fd5c7173ade4
("imx8m{m,n}_venice: update env memory layout") but left pxefile_addr_r
updated according to doc/develop/distro.rst.

This fixes a potential issue caused by the compressed kernel being
relocated on top of the ramdisk causing its corruption.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agonitrogen6x: Remove extra quotes in fdtfile
Ariel D'Alessandro [Tue, 27 Sep 2022 14:24:53 +0000 (11:24 -0300)]
nitrogen6x: Remove extra quotes in fdtfile

After commit 395110284b56 ("nitrogen6x: Populate FDTFILE at build-time
for all platforms") iMX.6Q Sabrelite fails to boot due to a bad fdtfile
string:

  Retrieving file: /dtbs/5.18.0-0.deb11.4-armmp/"imx6q-sabrelite".dtb
  ** File not found /dtbs/5.18.0-0.deb11.4-armmp/"imx6q-sabrelite".dtb **

CONFIG_DEFAULT_DEVICE_TREE option is string typed, so __stringify() is
adding extra quotes. Remove this.

Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Acked-by: Troy Kisky <troy.kisky@boundarydevices.com>
2 years agoclk-imx8mm: Only build QSPI clocks when CONFIG_NXP_FSPI=y
Fabio Estevam [Mon, 26 Sep 2022 16:40:11 +0000 (13:40 -0300)]
clk-imx8mm: Only build QSPI clocks when CONFIG_NXP_FSPI=y

The QSPI clocks are only used when CONFIG_NXP_FSPI=y, so only build the
QSPI clocks in this case to reduce the final SPL binary size.

Signed-off-by: Fabio Estevam <festevam@denx.de>
2 years agoclk-imx8mm: Only build ecspi clocks when CONFIG_DM_SPI=y
Fabio Estevam [Mon, 26 Sep 2022 16:40:10 +0000 (13:40 -0300)]
clk-imx8mm: Only build ecspi clocks when CONFIG_DM_SPI=y

The ecspi clocks are only used when CONFIG_DM_SPI=y, so only build the
ecspi clocks in this case to reduce the final SPL binary size.

Signed-off-by: Fabio Estevam <festevam@denx.de>
2 years agoclk-imx8mm: Move CLK_ENET_AXI to the non-SPL section
Fabio Estevam [Mon, 26 Sep 2022 16:40:09 +0000 (13:40 -0300)]
clk-imx8mm: Move CLK_ENET_AXI to the non-SPL section

Ethernet is not used inside SPL, so move the IMX8MM_CLK_ENET_AXI clock
inside the non-SPL block to reduce the final SPL binary size.

Signed-off-by: Fabio Estevam <festevam@denx.de>
2 years agoclk-imx8mm: Only build PWM clocks in non-SPL code
Fabio Estevam [Mon, 26 Sep 2022 16:40:08 +0000 (13:40 -0300)]
clk-imx8mm: Only build PWM clocks in non-SPL code

PWM is not used inside SPL, so do not define the PWM clocks inside
SPL to reduce the final SPL binary size.

Signed-off-by: Fabio Estevam <festevam@denx.de>
2 years agommc: fsl_esdhc: fix problem when using clk driver
Ye Li [Fri, 23 Sep 2022 22:29:33 +0000 (00:29 +0200)]
mmc: fsl_esdhc: fix problem when using clk driver

Move init_clk_usdhc to non-clk driver case, since assigned-clocks properties
will initialize the clocks by clk driver.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2 years agoverdin-imx8mm: verdin-imx8mp: drop obsolete net/phy configs
Marcel Ziswiler [Wed, 21 Sep 2022 11:34:19 +0000 (13:34 +0200)]
verdin-imx8mm: verdin-imx8mp: drop obsolete net/phy configs

Drop obsolete networking/PHY related configuration defines.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2 years agoboard: tbs2910: Add serial rx buffer in defconfig
Soeren Moch [Tue, 20 Sep 2022 16:05:41 +0000 (18:05 +0200)]
board: tbs2910: Add serial rx buffer in defconfig

... to avoid loosing characters when pasting text into the serial console.
This allows to remove the workaround to disable the vidconsole output
when no HDMI device is detected. This workaround only was there to speed-up
serial console processing.

Signed-off-by: Soeren Moch <smoch@web.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoboard: tbs2910: Set all board dts files as maintained
Soeren Moch [Tue, 20 Sep 2022 16:05:40 +0000 (18:05 +0200)]
board: tbs2910: Set all board dts files as maintained

This also includes the imx6q-tbs2910-u-boot.dtsi file now.

Signed-off-by: Soeren Moch <smoch@web.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoimx8mm_evk: Add Serial Download Protocol support
Fabio Estevam [Tue, 20 Sep 2022 00:20:14 +0000 (21:20 -0300)]
imx8mm_evk: Add Serial Download Protocol support

Add Serial Download Protocol support as it is a useful method to
load flash.bin to RAM and run it via 'uuu'.

With this patch, it is possible to start both U-Boot SPL and U-Boot
proper using the following 'uuu'command:

$ uuu -brun spl flash.bin

Based on a patch from Marek Vasut for the imx8mm-mx8menlo board.

Also, to fit the SPL binary into the internal RAM, select CONFIG_LTO
to reduce its size.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx8mm_evk: Add an entry for USB boot
Fabio Estevam [Tue, 20 Sep 2022 00:20:13 +0000 (21:20 -0300)]
imx8mm_evk: Add an entry for USB boot

Add an entry for USB boot so that U-Boot could be loaded via
the Serial Download Protocol.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2 years agoARM: dts: imx8m: imx8mm-mx8menlo: Enable SPL SDP support
Marek Vasut [Mon, 19 Sep 2022 19:41:18 +0000 (21:41 +0200)]
ARM: dts: imx8m: imx8mm-mx8menlo: Enable SPL SDP support

Enable DM USB, DM PHY and USB gadget support in imx8mm-mx8menlo SPL
to let the board continue SDP loading of second stage after the first
stage was loaded by BootROM SDP implementation. It is not possible to
jump back into BootROM v1 and let the BootROM implementation continue
the SDP loading, all this has to be performed by the U-Boot CI HDRC
controller driver and SDP protocol implementation, both of which fit
into the SPL just barely.

With this patch, it is possible to start both U-Boot SPL and U-Boot
using e.g. uuu on this board as follows:

$ uuu -brun spl flash.bin

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2 years agoARM: imx8m: verdin-imx8mm: Drop bogus content from spl_board_init()
Marek Vasut [Mon, 19 Sep 2022 19:41:17 +0000 (21:41 +0200)]
ARM: imx8m: verdin-imx8mm: Drop bogus content from spl_board_init()

The current implementation of spl_board_init() USB boot handling is
not correct, the MX8MM BootROM v1 does not support SDP load when
re-entered from U-Boot SPL, it is up to U-Boot to perform the next
stage load using its own internal CI gadget driver and SDP protocol
implementation. Drop the spl_board_init() to let SPL continue with
normal load in case the SDP support is enabled.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2 years agoARM: imx8m: phycore_imx8mm: Drop bogus spl_board_init()
Marek Vasut [Mon, 19 Sep 2022 19:41:16 +0000 (21:41 +0200)]
ARM: imx8m: phycore_imx8mm: Drop bogus spl_board_init()

The current implementation of spl_board_init() is not correct,
the MX8MM BootROM v1 does not support SDP load when re-entered
from U-Boot SPL, it is up to U-Boot to perform the next stage
load using its own internal CI gadget driver and SDP protocol
implementation. Drop the spl_board_init() to let SPL continue
with normal load in case the SDP support is enabled.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2 years agoARM: imx8m: Deduplicate CAAM init with arch_misc_init() call
Marek Vasut [Mon, 19 Sep 2022 19:41:15 +0000 (21:41 +0200)]
ARM: imx8m: Deduplicate CAAM init with arch_misc_init() call

Instead of duplicating code implemented by i.MX8M version of arch_misc_init()
in every board, enable CONFIG_ARCH_MISC_INIT and call arch_misc_init() from
spl_board_init(). This removes the duplication. No functional change.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2 years agoARM: dts: imx8mm: Swap i.MX8M Mini Menlo board UARTs back
Marek Vasut [Mon, 19 Sep 2022 19:35:56 +0000 (21:35 +0200)]
ARM: dts: imx8mm: Swap i.MX8M Mini Menlo board UARTs back

The first production revision of the MX8M Mini Menlo board implements
a hardware change which swaps console UART and another UART connector.
Implement the swap, which maps the console UART back to the way Verdin
console is mapped.

Signed-off-by: Marek Vasut <marex@denx.de>
2 years agoarm: dts: imx8mm-venice-gw7903: add dig1_ctl and dig2_ctl gpios
Tim Harvey [Fri, 9 Sep 2022 22:58:42 +0000 (15:58 -0700)]
arm: dts: imx8mm-venice-gw7903: add dig1_ctl and dig2_ctl gpios

The GW7903 revision B adds two additional GPIO's to control the
direction of the 2 isolated digital I/O circuits.

Define them as:
 - dig1_ctl
 - dig2_ctl

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2 years agoboard: gateworks: venice: update GW74xx PMIC config
Tim Harvey [Thu, 8 Sep 2022 21:41:09 +0000 (14:41 -0700)]
board: gateworks: venice: update GW74xx PMIC config

Update the GW74xx PMIC configuration:
 - increase VDD_SOC DVS1 to 0.85V per datasheet
 - increase VDD_SOC DVS0 to 0.95V before first DRAM access
 - increase VDD_ARM DVS0 to 0.95V to support kernel overdrive voltage (OD)
 - remove unnecessary changes to VDD_DRAM as we don't use 3GHz DRAM
 - remove unnecessary change to LDO2 as it is unused

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
v2: update commit log with more detail

2 years agoarm: dts: imx8mp-venice-gw74xx: update M2 gpio hogs
Tim Harvey [Thu, 8 Sep 2022 20:42:01 +0000 (13:42 -0700)]
arm: dts: imx8mp-venice-gw74xx: update M2 gpio hogs

Update the M2 socket gpio hogs such that they are not active on boot by
flagging them as GPIO_ACTIVE_HIGH so that 'output-high' drives high.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2 years agoarm: dts: imx8mp-venice-gw74xx: fix uart configuration gpio hogs
Tim Harvey [Thu, 8 Sep 2022 20:41:08 +0000 (13:41 -0700)]
arm: dts: imx8mp-venice-gw74xx: fix uart configuration gpio hogs

Update the UART config gpio hogs such that it is configured for RS232
by default on boot. Additionally rename them to match the names used
on the reset of the venice boards.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2 years agoARM: imx8mp: verdin-imx8mp: Add memory size detection
Francesco Dolcini [Wed, 7 Sep 2022 09:51:05 +0000 (11:51 +0200)]
ARM: imx8mp: verdin-imx8mp: Add memory size detection

Add RAM auto-sizing, without this change memory size for all SKU is set
to 8GB and the system will crash on SKU with less memory as soon as the
non existent memory addresses are accessed.

Fixes: 2bc2f817cea7 ("board: toradex: add verdin imx8m plus support")
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoboard: verdin-imx8mp: add call to ft_common_board_setup
Philippe Schenker [Mon, 29 Aug 2022 17:59:53 +0000 (19:59 +0200)]
board: verdin-imx8mp: add call to ft_common_board_setup

With this call the following attributes get set to the device-tree
and are then accessible from linux in /proc/device-tree/

serial-number: The serial number that is stored in config-block
toradex,board-rev: The version of the module (e.g. V1.1A)
toradex,product-id: The SKU number of the module runnin

Fixes: commit 2bc2f817cea7 ("board: toradex: add verdin imx8m plus support")
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoboard: verdin-imx8mm: add call to ft_common_board_setup
Philippe Schenker [Mon, 29 Aug 2022 17:59:52 +0000 (19:59 +0200)]
board: verdin-imx8mm: add call to ft_common_board_setup

With this call the following attributes get set to the device-tree
and are then accessible from linux in /proc/device-tree/

serial-number: The serial number that is stored in config-block
toradex,board-rev: The version of the module (e.g. V1.1A)
toradex,product-id: The SKU number of the module running

Fixes: commit 14d5aeff776b ("board: toradex: Add Verdin iMX8M Mini support")
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoimx: kontron-sl-mx8mm: Prepare for I2C display detection in environment script
Frieder Schrempf [Wed, 24 Aug 2022 13:59:20 +0000 (15:59 +0200)]
imx: kontron-sl-mx8mm: Prepare for I2C display detection in environment script

Enable the I2C bus and set a env variable for the reset GPIO of the touch
controller. This allows us to probe the panel in a script.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoimx: kontron-sl-mx8mm: Add support for Kontron Electronics SoM SL i.MX8MM OSM-S
Frieder Schrempf [Wed, 24 Aug 2022 13:59:19 +0000 (15:59 +0200)]
imx: kontron-sl-mx8mm: Add support for Kontron Electronics SoM SL i.MX8MM OSM-S

This adds support for the Kontron Electronics SoM SL i.MX8MM OSM-S
and the matching baseboard BL i.MX8MM OSM-S.

The SoM hardware complies to the Open Standard Module (OSM) 1.0
specification, size S (https://sget.org/standards/osm).

The existing board configuration for the non-OSM SoM is reused and
allows to detect the SoM variant at runtime.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoimx: kontron-sl-mx8mm: Simplify code in spl.c
Frieder Schrempf [Wed, 24 Aug 2022 13:59:18 +0000 (15:59 +0200)]
imx: kontron-sl-mx8mm: Simplify code in spl.c

Refactor the code a bit without any functional changes.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoimx: kontron-sl-mx8mm: Use voltage rail names from schematic for PMIC regulator-names
Frieder Schrempf [Wed, 24 Aug 2022 13:59:17 +0000 (15:59 +0200)]
imx: kontron-sl-mx8mm: Use voltage rail names from schematic for PMIC regulator-names

Improve the naming of the regulators to contain the voltage rail
names from the schematic.

Suggested-by: Heiko Thiery <heiko.thiery@gmail.com>
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoimx: kontron-sl-mx8mm: Use the VSELECT signal to switch SD card IO voltage
Frieder Schrempf [Wed, 24 Aug 2022 13:59:16 +0000 (15:59 +0200)]
imx: kontron-sl-mx8mm: Use the VSELECT signal to switch SD card IO voltage

It turns out that it is not necessary to declare the VSELECT signal as
GPIO and let the PMIC driver set it to a fixed high level. This switches
the voltage between 3.3V and 1.8V by setting the PMIC register for LDO5
accordingly.

Instead we can do it like other boards already do and simply mux the
VSELECT signal of the USDHC interface to the pin. This makes sure that
the correct voltage is selected by setting the PMIC's SD_VSEL input
to high or low accordingly.

Reported-by: Heiko Thiery <heiko.thiery@gmail.com>
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Heiko Thiery <heiko.thiery@gmail.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoimx: kontron-sl-mx8mm: Adjust devicetree names, compatibles and model strings
Frieder Schrempf [Wed, 24 Aug 2022 13:59:15 +0000 (15:59 +0200)]
imx: kontron-sl-mx8mm: Adjust devicetree names, compatibles and model strings

This adjusts the names of the boards and SoMs to the official naming
used by Kontron marketing. These changes also affect devicetree
names and compatibles. The same changes have been submitted to the
Linux kernel.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoimx: kontron-sl-mx8mm: Prepare for other i.MX8MM SoM types
Frieder Schrempf [Wed, 24 Aug 2022 13:59:14 +0000 (15:59 +0200)]
imx: kontron-sl-mx8mm: Prepare for other i.MX8MM SoM types

This sets an env variable 'som_type' from the board code. It can
later be used by environment scripts, e. g. to select the proper
devicetree for the board.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoimx: kontron-sl-mx8mm: Use new LPDDR4 config parameters
Frieder Schrempf [Wed, 24 Aug 2022 13:59:13 +0000 (15:59 +0200)]
imx: kontron-sl-mx8mm: Use new LPDDR4 config parameters

These parameters are needed for stable performance on new hardware
with Nanya LPDDR4 chips.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoimx: kontron-sl-mx8mm: Remove 100mt DDR setpoint
Frieder Schrempf [Wed, 24 Aug 2022 13:59:12 +0000 (15:59 +0200)]
imx: kontron-sl-mx8mm: Remove 100mt DDR setpoint

The new stable configuration is missing the 100mt setpoint, remove
it before updating the config to make sure the changes are separated
cleanly.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoimx: kontron-sl-mx8mm: lpddr4_timing.c: Add spaces for proper alignment
Frieder Schrempf [Wed, 24 Aug 2022 13:59:11 +0000 (15:59 +0200)]
imx: kontron-sl-mx8mm: lpddr4_timing.c: Add spaces for proper alignment

Fix the spaces and alignment for easier tracking of changes and comparing
with configs generated by the tools.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoimx: kontron-sl-mx8mm: Enable bootaux command
Frieder Schrempf [Wed, 24 Aug 2022 13:59:10 +0000 (15:59 +0200)]
imx: kontron-sl-mx8mm: Enable bootaux command

Enable the bootaux command in order to be able to load a
binary into the M4 core when needed.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoimx: kontron-sl-mx8mm: Migrate to use CONFIG_EXTRA_ENV_TEXT
Frieder Schrempf [Wed, 24 Aug 2022 13:59:09 +0000 (15:59 +0200)]
imx: kontron-sl-mx8mm: Migrate to use CONFIG_EXTRA_ENV_TEXT

Move the environment from the board header to a separate text file
and also drop those variables that are already set in env_default.h
from the Kconfig options.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoimx: kontron-sl-mx8mm: Enable environment in MMC
Frieder Schrempf [Wed, 24 Aug 2022 13:59:08 +0000 (15:59 +0200)]
imx: kontron-sl-mx8mm: Enable environment in MMC

In case we boot from SD card or eMMC, we also want to load
the environment from the according boot device.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoimx: kontron-sl-mx8mm: Add redundant environment and SPI NOR partitions
Frieder Schrempf [Wed, 24 Aug 2022 13:59:07 +0000 (15:59 +0200)]
imx: kontron-sl-mx8mm: Add redundant environment and SPI NOR partitions

Enable the redundant environment feature to allow falling back in case of
storage corruption. The partition layout for the SPI NOR device is added
to the devicetree.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoimx: kontron-sl-mx8mm: Enable MTD command
Frieder Schrempf [Wed, 24 Aug 2022 13:59:06 +0000 (15:59 +0200)]
imx: kontron-sl-mx8mm: Enable MTD command

Enable the MTD command to be used for the SPI NOR on the SoM.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoimx: kontron-sl-mx8mm: Increase CONFIG_SYS_CBSIZE to 2K
Frieder Schrempf [Wed, 24 Aug 2022 13:59:05 +0000 (15:59 +0200)]
imx: kontron-sl-mx8mm: Increase CONFIG_SYS_CBSIZE to 2K

This allows using the command line with longer lines like
large scripts in env variables.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoimx: kontron-sl-mx8mm: Remove custom board_boot_order() workaround
Frieder Schrempf [Wed, 24 Aug 2022 13:59:04 +0000 (15:59 +0200)]
imx: kontron-sl-mx8mm: Remove custom board_boot_order() workaround

Nowadays detecting the SPI NOR as boot device from the ROMAPI is
fixed and works even if the SPI NOR is used as fallback boot device.

Therefore we don't need this workaround anymore.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoimx: kontron-sl-mx8mm: Add support for loading from SPI NOR in SPL
Frieder Schrempf [Wed, 24 Aug 2022 13:52:24 +0000 (15:52 +0200)]
imx: kontron-sl-mx8mm: Add support for loading from SPI NOR in SPL

This was initially enabled, but got accidentally dropped while
migrating Kconfig options and resyncing the defconfig in:

commit 9802154a94d6 ("configs: Resync with savedefconfig")

Let's enable this again to be able to boot from SPI NOR.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoimx: kontron-sl-mx8mm: Remove LVDS board type and devicetrees
Frieder Schrempf [Wed, 24 Aug 2022 13:52:23 +0000 (15:52 +0200)]
imx: kontron-sl-mx8mm: Remove LVDS board type and devicetrees

The display isn't and won't be used in U-Boot. Also the display setup
is not yet supported in mainline Linux, so even for cases where the
U-Boot devicetree is passed to the kernel there is currently no use
for this configuration.

Selecting the proper configuration in the kernel FIT image automatically
depending on the detected hardware can be handled by a script in the
environment.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoimx: imx6ul: kontron-sl-mx6ul: Sync devicetrees
Frieder Schrempf [Tue, 23 Aug 2022 14:29:15 +0000 (16:29 +0200)]
imx: imx6ul: kontron-sl-mx6ul: Sync devicetrees

Sync the devicetrees with Linux and adjust the board names.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
2 years agoimx: imx6ul: kontron-sl-mx6ul: Migrate to use CONFIG_EXTRA_ENV_TEXT
Frieder Schrempf [Tue, 23 Aug 2022 14:29:14 +0000 (16:29 +0200)]
imx: imx6ul: kontron-sl-mx6ul: Migrate to use CONFIG_EXTRA_ENV_TEXT

Move the environment from the board header to a separate text file
and also drop those variables that are already set in env_default.h
from the Kconfig options or are not needed anymore.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
2 years agoimx: imx6ul: kontron-sl-mx6ul: Select correct boot and env device
Frieder Schrempf [Tue, 23 Aug 2022 14:29:13 +0000 (16:29 +0200)]
imx: imx6ul: kontron-sl-mx6ul: Select correct boot and env device

Instead of checking both, SPI NOR and MMC for loading U-Boot proper
and the environment, implement a way to detect the actual boot
device even if the BootROM doesn't report it and we can't rely
solely on the fuse settings, as by default we use MMC as primary
boot device and boot from SPI NOR via the secondary fallback device
(EEPROM Recovery Mode).

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
2 years agoimx: imx6ul: kontron-sl-mx6ul: Fix CONFIG_ENV_SPI_BUS
Frieder Schrempf [Tue, 23 Aug 2022 14:29:12 +0000 (16:29 +0200)]
imx: imx6ul: kontron-sl-mx6ul: Fix CONFIG_ENV_SPI_BUS

The SPI NOR is on ECSPI1 so CONFIG_ENV_SPI_BUS should be 1
to detect the environment on the SPI NOR.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
2 years agoimx: imx6ul: kontron-sl-mx6ul: Enable migrated Kconfig options
Frieder Schrempf [Tue, 23 Aug 2022 14:29:11 +0000 (16:29 +0200)]
imx: imx6ul: kontron-sl-mx6ul: Enable migrated Kconfig options

The board support was merged at the same time as some Kconfig options
for SPL were migrated/renamed. As a result some essential features
like serial output, MMC support, etc. are currently missing. Fix this
by enabling the required options.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
2 years agoMakefile: Make flash.bin target available for all platforms
Frieder Schrempf [Tue, 23 Aug 2022 14:29:10 +0000 (16:29 +0200)]
Makefile: Make flash.bin target available for all platforms

There is no reason for restricting the use of the flash.bin target
to the i.MX8 platform. Others can benefit from this as well.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
2 years agoboard: gateworks: venice: rename eeprom_init
Tim Harvey [Thu, 11 Aug 2022 19:04:01 +0000 (12:04 -0700)]
board: gateworks: venice: rename eeprom_init

rename eeprom_init to avoid build failure when using CMD_EEPROM.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2 years agoarm: dts: imx8mm-venice-gw7902: add LTE modem gpios
Tim Harvey [Thu, 11 Aug 2022 19:02:48 +0000 (12:02 -0700)]
arm: dts: imx8mm-venice-gw7902: add LTE modem gpios

Add missing LTE_PWR# and LTE_RST gpio pinmux.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx8*_venice_defconfig: configure default MMC env device
Tim Harvey [Thu, 11 Aug 2022 18:53:32 +0000 (11:53 -0700)]
imx8*_venice_defconfig: configure default MMC env device

When booting from USB/SDP mmc_get_env_dev() returns
CONFIG_SYS_MMC_ENV_DEV as the MMC env device (while booting from MMC
will call board_mmc_get_env_dev() to get this). Configure
CONFIG_SYS_MMC_ENV_DEV for SDHC3 (devno=2) as all Gateworks Venice
boards use SDHC3 as eMMC so that persistent env works when booting from
USB/SDP.

Reviewed-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2 years agoMerge branch '2022-10-18-TI-platform-updates'
Tom Rini [Tue, 18 Oct 2022 22:13:39 +0000 (18:13 -0400)]
Merge branch '2022-10-18-TI-platform-updates'

- Assorted fixes and improvements to some TI platforms

2 years agowatchdog: omap_wdt: Switch required include for watchdog defines
Tom Rini [Mon, 10 Oct 2022 20:29:17 +0000 (16:29 -0400)]
watchdog: omap_wdt: Switch required include for watchdog defines

All of the required values for using the omap_wdt.c driver are found in
<asm/ti-common/omap_wdt.h> and this is what is indirectly pulled in via
<asm/arch/hardware.h> when it exists.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoNokia RX-51: Fix compilation with non-zero CONFIG_SYS_TEXT_BASE
Pali Rohár [Sun, 9 Oct 2022 19:37:13 +0000 (21:37 +0200)]
Nokia RX-51: Fix compilation with non-zero CONFIG_SYS_TEXT_BASE

For some unknown reason GNU assembler version 2.31.1 (arm-linux-gnueabi-as
from Debian Buster) cannot compile following code from located in file
board/nokia/rx51/lowlevel_init.S:

  kernoffs:
    .word  KERNEL_OFFSET - (. - CONFIG_SYS_TEXT_BASE)

when CONFIG_SYS_TEXT_BASE is set to 0x80008000. It throws strange compile
error which is even without line number:

    AS      board/nokia/rx51/lowlevel_init.o
  {standard input}: Assembler messages:
  {standard input}: Error: attempt to get value of unresolved symbol `L0'
  make[2]: *** [scripts/Makefile.build:293: board/nokia/rx51/lowlevel_init.o] Error 1

I have no idea about this error and my experiments showed that ARM GNU
assembler is happy with negation of that number. So changing code to:

  kernoffs:
    .word  . - CONFIG_SYS_TEXT_BASE - KERNEL_OFFSET

and then replacing mathematical addition by substraction of "kernoffs"
value (so calculation of address does not change) compiles assembler file
without any error now.

There should be not any functional change.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agoarm: mach-k3: Move hardware handling to common files
Andrew Davis [Fri, 7 Oct 2022 19:22:05 +0000 (14:22 -0500)]
arm: mach-k3: Move hardware handling to common files

These hardware register definitions are common for all K3, remove
duplicate data them by moving them to hardware.h.

While here do some minor whitespace cleanup + grouping.

Signed-off-by: Andrew Davis <afd@ti.com>
2 years agoarm: mach-k3: security: Use dma-mapping for cache ops
Andrew Davis [Fri, 7 Oct 2022 17:12:29 +0000 (12:12 -0500)]
arm: mach-k3: security: Use dma-mapping for cache ops

This matches how this would be done in Linux and these functions
do the alignment for us which makes the code look cleaner.

Signed-off-by: Andrew Davis <afd@ti.com>
2 years agodma: Transfer dma_ops should use DMA address types
Andrew Davis [Fri, 7 Oct 2022 17:11:13 +0000 (12:11 -0500)]
dma: Transfer dma_ops should use DMA address types

DMA operations should function on DMA addresses, not virtual addresses.
Although these are usually the same in U-Boot, it is more correct
to be explicit with our types here.

Signed-off-by: Andrew Davis <afd@ti.com>
2 years agodma: ti-edma3: Add DMA map operations before and after transfers
Andrew Davis [Fri, 7 Oct 2022 17:11:12 +0000 (12:11 -0500)]
dma: ti-edma3: Add DMA map operations before and after transfers

We should clean the caches before any DMA operation and clean+invalidate
after. This matches what the DMA framework does for us already but adds
it to the two functions here in this driver that don't yet go through the
new DMA framework.

Signed-off-by: Andrew Davis <afd@ti.com>
2 years agodma: Use dma-mapping for cache ops and sync after write
Andrew Davis [Fri, 7 Oct 2022 17:11:11 +0000 (12:11 -0500)]
dma: Use dma-mapping for cache ops and sync after write

The DMA'd memory area needs cleaned and invalidated after the DMA
write so that any stale cache lines do not mask new data.

Signed-off-by: Andrew Davis <afd@ti.com>
2 years agoarm: mach-k3: common: Set boot_fit on non-GP devices
Andrew Davis [Fri, 7 Oct 2022 16:27:46 +0000 (11:27 -0500)]
arm: mach-k3: common: Set boot_fit on non-GP devices

This matches what we did for pre-K3 devices. This allows us to build
boot commands that can check for our device type at runtime.

Signed-off-by: Andrew Davis <afd@ti.com>
2 years agophy: ti: j721e-wiz: add j784s4-wiz-10g module support
Matt Ranostay [Wed, 5 Oct 2022 20:51:30 +0000 (13:51 -0700)]
phy: ti: j721e-wiz: add j784s4-wiz-10g module support

Add support for j784s4-wiz-10g device which has two core reference
clocks (e.g core_ref_clk, core_ref1_clk) which requires an additional
mux selection option.

Signed-off-by: Matt Ranostay <mranostay@ti.com>
2 years agoarm: dts: k3-am64-evm: EMIF tool update to v0.08.40 for 1600MT/s DDR4
Dave Gerlach [Thu, 29 Sep 2022 17:35:49 +0000 (12:35 -0500)]
arm: dts: k3-am64-evm: EMIF tool update to v0.08.40 for 1600MT/s DDR4

Move to latest DDR4 1600MT/s for k3-am64-evm based on EMIF tool
v0.08.40.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
2 years agoarm: dts: k3-am64-sk: EMIF tool update to v0.08.40 and move to 1600MT/s LPDDR4
Dave Gerlach [Thu, 29 Sep 2022 17:35:48 +0000 (12:35 -0500)]
arm: dts: k3-am64-sk: EMIF tool update to v0.08.40 and move to 1600MT/s LPDDR4

Move k3-am64-sk to use 1600MT/s LPDDR4 configuration and update to latest EMIF
tool v0.08.40.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
2 years agoMerge tag 'dm-pull-18oct22' of https://source.denx.de/u-boot/custodians/u-boot-dm
Tom Rini [Tue, 18 Oct 2022 11:36:52 +0000 (07:36 -0400)]
Merge tag 'dm-pull-18oct22' of https://source.denx.de/u-boot/custodians/u-boot-dm

Update uclass iterators to work better when devices fail to probe
Support VBE OS requests / fixups
Minor error-handling tweaks to bootm command

2 years agoMerge tag 'u-boot-stm32-20221018' of https://source.denx.de/u-boot/custodians/u-boot-stm
Tom Rini [Tue, 18 Oct 2022 11:36:39 +0000 (07:36 -0400)]
Merge tag 'u-boot-stm32-20221018' of https://source.denx.de/u-boot/custodians/u-boot-stm

- stm32mp: fix compilation issue with DEBUG_UART
- DT update :
  - Remove buck3 regulator-always-on on AV96
  - Enable btrfs support on DHSOM
  - Drop extra newline from AV96 U-Boot extras DT
  - Add DHCOR based Testbench board
  - Fix and expand PLL configuration comments
  - update SCMI dedicated file