]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
2 years agoimx8mm-cl-iot-gate: Add SPL EEPROM support
Fabio Estevam [Tue, 12 Apr 2022 16:05:35 +0000 (13:05 -0300)]
imx8mm-cl-iot-gate: Add SPL EEPROM support

imx8mm-cl-iot-gate supports multiple DDR sizes and models.

The DDR type can be retrieved from the EEPROM, so add SPL code
that can be used to get the DDR information.

Based on the original code from Compulab's U-Boot.

Signed-off-by: Fabio Estevam <festevam@denx.de>
2 years agobsh: imx8mn-smm-s2/pro: Add iMX8MN BSH SMM S2 boards
Ariel D'Alessandro [Tue, 12 Apr 2022 13:31:38 +0000 (10:31 -0300)]
bsh: imx8mn-smm-s2/pro: Add iMX8MN BSH SMM S2 boards

Introduce BSH SystemMaster (SMM) S2 board family, which consists of:
iMX8MN SMM S2 and iMX8MN SMM S2 PRO boards.

Add support for iMX8MN BSH SMM S2 board:

- 256 MiB DDR3 RAM
- 512MiB Nand
- USBOTG1 peripheral - fastboot.
- 100Mbit Ethernet

Add support for iMX8MN BSH SMM S2 PRO board:

- 512 MiB DDR3 RAM
- 8 GiB eMMC
- USBOTG1 peripheral - fastboot.
- 100Mbit Ethernet

Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
2 years agonet: phy: nxp-tja11xx: Add NXP TJA11xx PHY driver
Michael Trimarchi [Tue, 12 Apr 2022 13:31:37 +0000 (10:31 -0300)]
net: phy: nxp-tja11xx: Add NXP TJA11xx PHY driver

Add driver for the NXP TJA1100 and TJA1101 PHYs. These PHYs are special
BroadRReach 100BaseT1 PHYs used in automotive.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2 years agonet: phy: Add phy_modify() accessor
Ariel D'Alessandro [Tue, 12 Apr 2022 13:31:36 +0000 (10:31 -0300)]
net: phy: Add phy_modify() accessor

Add read-modify-write unlocked accessor for accessing a PHY register.

Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2 years agoiopoll: Extend read_poll_timeout macro to support variable parameters
Ariel D'Alessandro [Tue, 12 Apr 2022 13:31:35 +0000 (10:31 -0300)]
iopoll: Extend read_poll_timeout macro to support variable parameters

This macro currently supports only one parameter. Based on Linux iopoll,
let's extend read_poll_timeout common API to allow multiple variable
parameters.

Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
2 years agophy: nxp-c45-tja11xx: Rename functions to be c45 tja11xx specific
Ariel D'Alessandro [Tue, 12 Apr 2022 13:31:34 +0000 (10:31 -0300)]
phy: nxp-c45-tja11xx: Rename functions to be c45 tja11xx specific

This driver supports NXP C45 TJA11XX PHYs, but there're also other NXP
TJA11XX PHYs. Let's rename functions in this driver to be c45 variant
specific, so further drivers can be introduced adding support for NXP
TJA11XX PHYs.

Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
2 years agoimx8m: add init_nand_clk
Michael Trimarchi [Tue, 12 Apr 2022 13:31:33 +0000 (10:31 -0300)]
imx8m: add init_nand_clk

Add init_nand_clk to enable gpmi nand clock. Since i.MX8M not use CCF,
so we still use legacy mode to configure the clock.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
2 years agoimx8m: add regs used by GPMI
Michael Trimarchi [Tue, 12 Apr 2022 13:31:32 +0000 (10:31 -0300)]
imx8m: add regs used by GPMI

Add regs used by GPMI

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2 years agoARM: imx8mm: verdin-imx8mm: Drop superfluous header
Marek Vasut [Mon, 11 Apr 2022 20:39:44 +0000 (22:39 +0200)]
ARM: imx8mm: verdin-imx8mm: Drop superfluous header

The power/bd71837.h should no longer be included, since V1.1 SoM
uses only the PCA9450 PMIC and the BD71837 support was removed.
Drop the header too.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <festevam@denx.de>
Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Cc: Max Krummenacher <max.krummenacher@toradex.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agodriver: pwm: pwm-imx: separe dm from non dm implementation
Tommaso Merciai [Sat, 26 Mar 2022 11:19:08 +0000 (12:19 +0100)]
driver: pwm: pwm-imx: separe dm from non dm implementation

Separe dm implementation from non dm implementation of pwm-imx
driver using CONFIG_DM_PWM

Signed-off-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.com>
2 years agodrivers: pwm: pwm-imx: move pwm-imx-util into pwm-imx
Tommaso Merciai [Sat, 26 Mar 2022 11:19:05 +0000 (12:19 +0100)]
drivers: pwm: pwm-imx: move pwm-imx-util into pwm-imx

Move pwm_imx_get_parms, pwm_id_to_reg functions into pwm-imx.c
and drop off pwm-imx-util.c

Signed-off-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.com>
2 years agoimx: mx7dsabresd: enable DM_SERIAL
Peng Fan [Mon, 11 Apr 2022 10:02:16 +0000 (18:02 +0800)]
imx: mx7dsabresd: enable DM_SERIAL

Enable CONFIG_DM_SERIAL, and `dm tree` could show:
 serial        1  [   ]   serial_mxc            |       |-- serial@30a80000

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx8mq: soc: Set the BYPASS ID SWAP bit (GPR10 bit 1)
Peng Fan [Sun, 10 Apr 2022 04:18:27 +0000 (12:18 +0800)]
imx8mq: soc: Set the BYPASS ID SWAP bit (GPR10 bit 1)

Set the BYPASS ID SWAP bit (GPR10 bit 1).
The ID SWAP function randomly make TZASC grant non-secure access to
secure memory. TZASC ID SWAP should be bypassed by setting the bit
TZASC_ID_SWAP_BYPASS(bit 1) in IOMUX_GPR10 register.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoboard: colibri-imx6ull: fix detecting sd card
Marcel Ziswiler [Fri, 8 Apr 2022 10:28:21 +0000 (12:28 +0200)]
board: colibri-imx6ull: fix detecting sd card

Turns out on certain carrier boards (e.g. Iris V2) and under certain
circumstances (e.g. after a software reset) the SD card may have been
left in a strange state which later failed as follows:

Colibri iMX6ULL # mmc dev 0
Card did not respond to voltage select! : -110

Fix this as follows:
- Re-name the signaling voltage rail regulator from vmmc to vqmmc.
- Fix the name of the GPIO property to gpios.
- Specify 4-bit bus width, no write-protect capability and no 1.8
  volt signaling voltage capability.
- Fix the clock vs. command pull-up vs. push-pull configuration.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoconfigs: colibri-imx6ull/-emmc: use micrel ksz8xxx phy driver
Marcel Ziswiler [Fri, 8 Apr 2022 10:28:15 +0000 (12:28 +0200)]
configs: colibri-imx6ull/-emmc: use micrel ksz8xxx phy driver

Use the Micrel KSZ8xxx specific Ethernet PHY driver rather than the
generic one.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agocolibri-imx6ull: fix nand bch geometry
Marcel Ziswiler [Fri, 8 Apr 2022 10:27:41 +0000 (12:27 +0200)]
colibri-imx6ull: fix nand bch geometry

Fix NAND BCH geometry as otherwise the following errors are observed
upon boot:

...
Loading Environment from NAND... NAND read from offset 380000 failed -74
...
NAND read from offset 800 failed -74
...
ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes
 from PEB 0:0, read 64 bytes
...

Fixes: ed48490f8d3f
("mtd: gpmi: fix the bch setting backward compatible issue")
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agodisk: part: add the device search failed log msg
Oleksii Bidnichenko [Fri, 8 Apr 2022 08:07:13 +0000 (10:07 +0200)]
disk: part: add the device search failed log msg

Add missing error message to blk_get_device_part_str.

Signed-off-by: Oleksii Bidnichenko <oleksii.bidnichenko@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoboard: colibri-imx6ull: fix detecting ethernet phy
Philippe Schenker [Fri, 8 Apr 2022 08:07:11 +0000 (10:07 +0200)]
board: colibri-imx6ull: fix detecting ethernet phy

Now that it is possible to use regulator-fixed-clock make use
of it. This makes U-Boot detect the PHY on first cold-boot.

This commit also adjusts the code in setup_fec and follows
how it is done in mx6ullevk.c

This commit also slows down the boot-process by about 150ms
as it now waits for the regulator-fixed-clock voltage that
drives the PHY to go up.
If you rely on very fast boot-speeds and don't need ethernet
for your boot-process you can safely revert the changes on
imx6ull-colibri.dtsi

Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoregulator: fixed: add possibility to enable by clock
Philippe Schenker [Fri, 8 Apr 2022 08:07:10 +0000 (10:07 +0200)]
regulator: fixed: add possibility to enable by clock

This commit adds the possibility to choose the compatible
"regulator-fixed-clock" in devicetree.

This is a special case of regulator-fixed where a clock has to
be used to switch the regulator on and off.

Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoboard: colibri-imx6ull: Do not leave variant variable unset
Philippe Schenker [Fri, 8 Apr 2022 08:07:08 +0000 (10:07 +0200)]
board: colibri-imx6ull: Do not leave variant variable unset

Toradex uses the variable variant to distinguish between modules with
eMMC, NAND with wifi and NAND without wifi.
This variable is set on every boot. Set this variable also if we have a
NAND module without wifi to prevent issues.

Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoapalis-tk1: avoid save environment unasked
Denys Drozdov [Fri, 8 Apr 2022 08:07:07 +0000 (10:07 +0200)]
apalis-tk1: avoid save environment unasked

U-Boot should never save the environment unasked.
This also avoids storing broken fdt_module to flash.

Signed-off-by: Denys Drozdov <denys.drozdov@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoapalis-imx6: avoid save environment unasked
Denys Drozdov [Fri, 8 Apr 2022 08:07:06 +0000 (10:07 +0200)]
apalis-imx6: avoid save environment unasked

U-Boot should never save the environment unasked.
This also avoids storing broken ftd_file to eMMC.

Signed-off-by: Denys Drozdov <denys.drozdov@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agocolibri-imx6ull: drop vidargs and remove video= settings
Oleksandr Suvorov [Fri, 8 Apr 2022 08:07:03 +0000 (10:07 +0200)]
colibri-imx6ull: drop vidargs and remove video= settings

Since we envision using overlays for display interfaces, the video=
settings within vidargs are obsolete. Remove these settings from the
U-Boot.

Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoinclude: colibri_vf: add missing tdxargs variable
Philippe Schenker [Fri, 8 Apr 2022 08:07:02 +0000 (10:07 +0200)]
include: colibri_vf: add missing tdxargs variable

All the other NAND-based boards have tdxargs specified for setting
manual kernel command-line arguments.

Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoconfigs: verdin-imx8mm: verdin-imx8mp: enable dm serial
Marcel Ziswiler [Fri, 8 Apr 2022 08:06:57 +0000 (10:06 +0200)]
configs: verdin-imx8mm: verdin-imx8mp: enable dm serial

Enable driver model for serial.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoarm64: dts: imx8mm-u-boot.dtsi: imx8mp-u-boot.dtsi: use atf-bl31 type
Marcel Ziswiler [Fri, 8 Apr 2022 08:06:56 +0000 (10:06 +0200)]
arm64: dts: imx8mm-u-boot.dtsi: imx8mp-u-boot.dtsi: use atf-bl31 type

Explicitly use the atf-bl31 type for the bl31.bin atf-blob. This uses
the path from the BL31 environment variable, if defined.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoARM: imx8mm: verdin-imx8mm: Rework board_early_init()
Marek Vasut [Fri, 8 Apr 2022 00:15:00 +0000 (02:15 +0200)]
ARM: imx8mm: verdin-imx8mm: Rework board_early_init()

Rename board_early_init_f() to board_early_init(), since this function
has nothing to do with actual board_early_init_f() as used throughout
U-Boot. The board_early_init() is function local to this board used to
configure UART and WDT pinmux. Wrap init_uart_clk() into this function
so that early UART init would be all in one place. Turn the function
into __weak one, so it could be overridden in case custom carrier board
uses different UART or needs custom IOMUX settings.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <festevam@denx.de>
Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Cc: Max Krummenacher <max.krummenacher@toradex.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
2 years agoimx8m: soc: Relocate u-boot to the top DDR in 4GB space
Ye Li [Thu, 7 Apr 2022 07:55:56 +0000 (15:55 +0800)]
imx8m: soc: Relocate u-boot to the top DDR in 4GB space

The EFI memory init uses gd->ram_top for conventional memory. In
current implementation, the ram_top is below optee address. This cause
grub failed to allocation memory for initrd.
The change updates DDR bank setup functions to place the u-boot at top
DDR in 4GB space.

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>
2 years agoimx8m: soc: drop phy-reset-gpios for fec
Peng Fan [Thu, 7 Apr 2022 07:55:55 +0000 (15:55 +0800)]
imx8m: soc: drop phy-reset-gpios for fec

Need to drop phy-reset-gpios before booting linux, this property
is legacy property and replaced with reset-gpios.

If provide both, kernel would failed to request the same gpio twice
and cause fec not work.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx: imx8m: soc: runtime drop extcon property from usbotg node
Peng Fan [Thu, 7 Apr 2022 07:55:54 +0000 (15:55 +0800)]
imx: imx8m: soc: runtime drop extcon property from usbotg node

The extcon is an decrepted property and not used by upstream Linux and
NXP 5.10 kernel, so we remove it before kicking linux in case it is in
dts. Otherwise distro kernel will not able to have usb function.

Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx: imx8mp: disable fused IP for UltraLite
Peng Fan [Thu, 7 Apr 2022 07:55:53 +0000 (15:55 +0800)]
imx: imx8mp: disable fused IP for UltraLite

Beside the fused modules on iMX8MP Lite, this part has also fused
GPU3D/2D, LVDS and MIPI DSI.
So we have to disable them for kernel and also disable MIPI DSI
in u-boot DTS for splash screen at runtime.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx: imx8mp: detect i.MX8MP UltraLite when get cpu rev
Peng Fan [Thu, 7 Apr 2022 07:55:52 +0000 (15:55 +0800)]
imx: imx8mp: detect i.MX8MP UltraLite when get cpu rev

Detect i.MX8MP UltraLite in get_cpu_variant_type

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx: imx8mp: Add iMX8MP UltraLite Part cpu type
Peng Fan [Thu, 7 Apr 2022 07:55:51 +0000 (15:55 +0800)]
imx: imx8mp: Add iMX8MP UltraLite Part cpu type

Add i.MX8MP UltraLite Part CPU type

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agomx6: ddr: Wait before issuing the first MRS cmd
Francesco Dolcini [Wed, 6 Apr 2022 11:53:25 +0000 (13:53 +0200)]
mx6: ddr: Wait before issuing the first MRS cmd

Wait 1ms before issuing the first MRS command to write DDR3 Mode
registers.

There is a requirement to wait a minimum time before issuing command to
the DDR3 device, according to the JEDEC standard this time is 500us
(after RESET_n is de-asserted until CKE becomes active) + tXPR (Reset
CKE Exit time, maximum value 360ns).

It seems that for some reason this is not enforced by the MMDC
controller.

Without this change we experienced random memory initialization failures
with about 2% boot failure rate on specific problematic boards, after
this change we were able to do more than 10.000 power-cycle without a
single failure.

Fixes: fe0f7f7842e1 ("mx6: add mmdc configuration for MX6Q/MX6DL")
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agomx6: ddr: Restore ralat/walat in write level calibration
Francesco Dolcini [Wed, 6 Apr 2022 11:53:24 +0000 (13:53 +0200)]
mx6: ddr: Restore ralat/walat in write level calibration

The current DDR write level calibration routine always overwrite
the ralat/walat fields to their maximum value, just save
the existing values at the beginning of the calibration routine
and restore it at the end.

In case the delay is estimated by the user to be more than one cycle the
walat should be configured according to that, this is not
automatically done.  From the i.MX6 RM:

   The user should read the results of the associated delay-line at
   MPWLDECTRL#[WL_DL_ABS_OFFSET#] and in case the user estimates that the
   reasonable delay may be above 1 cycle then the user should indicate it at
   MPWLDECTRL#[WL_CYC_DEL#]. Moreover the user should indicate it in
   MDMISC[WALAT] field. For example, if the result of the write leveling calibration
   is 100/256 parts of a cycle, but the user estimates that the delay is above 2 cycles
   then MPWLDECTRL#[WL_CYC_DEL#] should be configured to 2, so the total
   delay will be 2 and 100/256 parts of a cycle

Probably it would just possible to not overwrite the mdmisc register in
the first place, since this is not present in the write_level_calib() example
in NXP AN4467 nor in the i.MX6 RM (44.11.6.1 Hardware Write Leveling
Calibration).

Fixes: d339f16911c7 ("arm: imx6: Add DDR3 calibration code for MX6 Q/D/DL")
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agomisc: imx8ulp: Update fuse driver
Peng Fan [Wed, 6 Apr 2022 06:30:31 +0000 (14:30 +0800)]
misc: imx8ulp: Update fuse driver

- According to S400 API, the fuse bank 25 (Testconfig2) is able to
access. Add it into driver's mapping table.
- According to FSB words list, the reserved 48 words are ahead of
the bank 5 and bank 6. Fix the wrong position.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx: imx8ulp_evk: Enable multiple env storage devices
Ye Li [Wed, 6 Apr 2022 06:30:30 +0000 (14:30 +0800)]
imx: imx8ulp_evk: Enable multiple env storage devices

Enable multiple storages for u-boot env:
MMC or SPI flash or NOWHERE for usb
so u-boot can runtime select the storage flash according to boot device.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx: imx8ulp_evk: enlarge CONFIG_NR_DRAM_BANKS
Peng Fan [Wed, 6 Apr 2022 06:30:29 +0000 (14:30 +0800)]
imx: imx8ulp_evk: enlarge CONFIG_NR_DRAM_BANKS

When TEE is present, the DRAM maybe split to two parts,
so enlarge CONFIG_NR_DRAM_BANKS

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx: imx8ulp: reserve tee memory
Ji Luo [Wed, 6 Apr 2022 06:30:28 +0000 (14:30 +0800)]
imx: imx8ulp: reserve tee memory

The TEE memory should be reserved when TEE is present, so need
to runtime update dram bank and memory information according to
tee present or not.

Signed-off-by: Ji Luo <ji.luo@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx: imx8ulp: enable wdog_ad interrupt in CMC1
Peng Fan [Wed, 6 Apr 2022 06:30:27 +0000 (14:30 +0800)]
imx: imx8ulp: enable wdog_ad interrupt in CMC1

Enable wdog_ad interrupt being triggered by CMC1 to CM33 to let CM33
know A35 reset and reinitialize rpmsg.
Clear wdog_ad and AD_PERIPH reset interrupt after A35 up, otherwise
M33 will always receive interrupt.

Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx: imx8ulp_evk: Enable SD/MMC port auto detect
Peng Fan [Wed, 6 Apr 2022 06:30:26 +0000 (14:30 +0800)]
imx: imx8ulp_evk: Enable SD/MMC port auto detect

Enable the SD/MMC port auto detect.
The mmc relevant env can be reset when auto detect is enabled.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx: dynamic setting mmcdev and mmcroot
Peng Fan [Wed, 6 Apr 2022 06:30:25 +0000 (14:30 +0800)]
imx: dynamic setting mmcdev and mmcroot

Dynamic setting mmcdev and mmcroot.
Then when boot linux, we can have correct "root=/dev/mmcblk[x]p2"

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx: imx8ulp_evk: call the handshake with M33
Ye Li [Wed, 6 Apr 2022 06:30:23 +0000 (14:30 +0800)]
imx: imx8ulp_evk: call the handshake with M33

If M33 handshake is successful, TPM and DSI panel MUX setting is
done by M33, no need to set them.
If handshake is failed or M33 is not booted, continue the TPM
and DSI panel MUX setting

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx: imx8ulp_evk: Update LPDDR4 PHY settings
Ye Li [Wed, 6 Apr 2022 06:30:22 +0000 (14:30 +0800)]
imx: imx8ulp_evk: Update LPDDR4 PHY settings

Update DDR PHY settings to support LPDDR4 mode only by adjusting
DQ VREF ctrl, ODT and pads drive strength.

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>
2 years agoimx: imx8ulp: release CAAM for the Cortex-A35
Clement Faure [Wed, 6 Apr 2022 06:30:21 +0000 (14:30 +0800)]
imx: imx8ulp: release CAAM for the Cortex-A35

Release the CAAM for the A35 from the SPL.

Signed-off-by: Clement Faure <clement.faure@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agomisc: S400_API: Update S400 API for buffer dump
Ye Li [Wed, 6 Apr 2022 06:30:20 +0000 (14:30 +0800)]
misc: S400_API: Update S400 API for buffer dump

Add ahab_dump_buffer API to dump AHAB buffer for debug purpose

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agomisc: S400_API: add ahab_release_caam
Clement Faure [Wed, 6 Apr 2022 06:30:19 +0000 (14:30 +0800)]
misc: S400_API: add ahab_release_caam

Add ahab_release_caam() function to the S400 API.

Signed-off-by: Clement Faure <clement.faure@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx: imx8ulp: Load the lposc fuse for dual boot
Ye Li [Wed, 6 Apr 2022 06:30:18 +0000 (14:30 +0800)]
imx: imx8ulp: Load the lposc fuse for dual boot

Found the lposc fuse loading having impact to cpu idle in kernel.
Without the loading in dual boot mode, kernel will hang after idle
for a while.

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>
2 years agoimx: imx8ulp: Change LPAV assignment for dual boot
Ye Li [Wed, 6 Apr 2022 06:30:17 +0000 (14:30 +0800)]
imx: imx8ulp: Change LPAV assignment for dual boot

Assign the LPAV owner to RTD, and assign LPAV masters and peripherals
to APD. So except the masters and peripherals, other resources
(like DDR, cgc2, pcc5) in LPAV won't be reset during reboot and suspend.

No needs to initialize DDR again after reboot.

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>
2 years agomisc: imx8ulp: Add OEM SRK Hash fuse support
Ye Li [Wed, 6 Apr 2022 06:30:16 +0000 (14:30 +0800)]
misc: imx8ulp: Add OEM SRK Hash fuse support

Since latest S400 firmware has supported to read OEM SRK Hash, add
it to the driver's table

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>
2 years agoimx: imx8ulp: enable MU0_B clk by default
Peng Fan [Wed, 6 Apr 2022 06:30:15 +0000 (14:30 +0800)]
imx: imx8ulp: enable MU0_B clk by default

Enable MU0_B clk by default. When M33 image is loaded by Jlink,
the previous method not enable MU0_B clk and not able to communicate
with M33, so let's enable it by default.

And we not put it under kernel dts, because it conflicts with i.MX8QM
suspend/resume logic which requires large change.

Reviewed-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx: imx8ulp: cgc: Switch to NICLPAV to FRO192 before PLL4 init
Ye Li [Wed, 6 Apr 2022 06:30:14 +0000 (14:30 +0800)]
imx: imx8ulp: cgc: Switch to NICLPAV to FRO192 before PLL4 init

When reset with dual boot mode, the LPAV domain won't power down
due to its master is not assigned to APD. So the NICLPAV keeps the
last setting to use PLL4PFD1. So before SPL initialize the PLL4,
we need to switch NICLPAV to FRO192, otherwise system will hang.

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>
2 years agoimx: imx8ulp_evk: Skip init DDR for reboot in dual boot mode
Ye Li [Wed, 6 Apr 2022 06:30:13 +0000 (14:30 +0800)]
imx: imx8ulp_evk: Skip init DDR for reboot in dual boot mode

When M33 is LPAV owner in dual boot, DDR, PCC5, CGC2 won't be reset
during APD reset. So no need to init DDR again after reboot, but need to
reconfigure the PLL4 PFD/PFDDIV/LPAV NIC etc, because kernel may
change or disable some of them.

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>
2 years agoimx: imx8ulp: add ND/LD clock
Peng Fan [Wed, 6 Apr 2022 06:30:12 +0000 (14:30 +0800)]
imx: imx8ulp: add ND/LD clock

Add a new ddr script, defconfig for ND
Configure the clock for ND mode
changing A35 to 960MHz for OD mode
Update NIC CLK for the various modes
Introduce clock_init_early/late, late is used after pmic voltage
setting, early is used in the very early stage for upower mu, lpuart and
etc.

Note: NIC runs at 324MHz, 442MHz has some random kernel hang issue with
cpuidle enabled now.

Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx: imx8ulp_evk: Remove PMIC Bucks PWM mode settings
Ye Li [Wed, 6 Apr 2022 06:30:11 +0000 (14:30 +0800)]
imx: imx8ulp_evk: Remove PMIC Bucks PWM mode settings

This workaround is not needed on i.MX8ULP proto-1B EVK as board has
fixed the problem. Because we don't support proto-1A any longer,
remove the PMIC settings.

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>
2 years agoimx: imx8ulp: add CAAM clock entry
Peng Fan [Wed, 6 Apr 2022 06:30:10 +0000 (14:30 +0800)]
imx: imx8ulp: add CAAM clock entry

Add CAAM clock entry in PCC3

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx: imx8ulp: clock: Add clock support for i3c controller
Clark Wang [Wed, 6 Apr 2022 06:30:09 +0000 (14:30 +0800)]
imx: imx8ulp: clock: Add clock support for i3c controller

Add i3c controller clock enable/disable function for imx8ulp.

Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx: imx8ulp: Add M33 handshake functions
Ye Li [Wed, 6 Apr 2022 06:30:08 +0000 (14:30 +0800)]
imx: imx8ulp: Add M33 handshake functions

Add functions to check if M33 image is booted and handshake with M33
image via MU. A core notifies M33 to start init by FCR F0, then wait
M33 init done signal by checking FSR F0.

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx: imx8ulp: include pcc/cgc header in clock header
Peng Fan [Wed, 6 Apr 2022 06:30:07 +0000 (14:30 +0800)]
imx: imx8ulp: include pcc/cgc header in clock header

With this change, we no need to include pcc/cgc header files both.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx: imx8ulp: Set COUNTER_FREQUENCY to 1Mhz
Ye Li [Wed, 6 Apr 2022 06:30:06 +0000 (14:30 +0800)]
imx: imx8ulp: Set COUNTER_FREQUENCY to 1Mhz

The COUNTER_FREQUENCY is missed in 8ulp configs, it will cause SPL
and u-boot not set the cntfrq_el0. For u-boot, this is ok, because
ATF has set it. But for SPL, it will lead delay and get_timer
not working.

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>
2 years agophy: phy-imx8mq-usb: Add support for i.MX8MP USB PHY
Marek Vasut [Fri, 1 Apr 2022 01:18:31 +0000 (03:18 +0200)]
phy: phy-imx8mq-usb: Add support for i.MX8MP USB PHY

Add initial support for i.MX8MP USB PHY, i.MX8MP USB is similar to
the i.MX8MQ, except for clock and power domain design customization.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Tested-By: Tim Harvey <tharvey@gateworks.com> #imx8mp-venice-gw74xx
2 years agoclk: imx8mp: Fill in DWC3 USB, USB PHY, HSIOMIX clock
Marek Vasut [Fri, 1 Apr 2022 01:17:29 +0000 (03:17 +0200)]
clk: imx8mp: Fill in DWC3 USB, USB PHY, HSIOMIX clock

Add clock tables required to bring up DWC3 USB, USB PHY and HSIOMIX domain.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
2 years agoarm: imx: parse-container: add some missing end of line
Clément Péron [Wed, 30 Mar 2022 11:49:30 +0000 (13:49 +0200)]
arm: imx: parse-container: add some missing end of line

Some printf() have strings that doesn't terminate with end of line
and make the output hard to read.

Signed-off-by: Clément Péron <peron.clem@gmail.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2 years agoclk: imx8m: reduce rate table duplication
Angus Ainslie [Tue, 29 Mar 2022 14:02:40 +0000 (07:02 -0700)]
clk: imx8m: reduce rate table duplication

Re-factor the imx8m[nmpq] rate tables into the common pll1416x clock
driver.

43cdaa1567ad3 ("clk: imx8mm: Move 1443X/1416X PLL clock structure to common place")

Signed-off-by: Angus Ainslie <angus@akkea.ca>
Tested-by: Adam Ford <aford173@gmail.com> #imx8mm-beacon
2 years agoclk: imx8mq: Add a clock driver for the imx8mq
Angus Ainslie [Tue, 29 Mar 2022 14:02:39 +0000 (07:02 -0700)]
clk: imx8mq: Add a clock driver for the imx8mq

This is a DM clock driver based off the imx8mm u-boot driver and the linux
kernel driver.

All of the PLLs and clocks are initialized so the subsystems below are
functional and tested.

1) USB host and peripheral
2) ECSPI
3) UART
4) I2C all busses
5) USDHC for eMMC support
6) USB storage
7) GPIO
8) DRAM

Signed-off-by: Angus Ainslie <angus@akkea.ca>
Acked-by: Sean Anderson <seanga2@gmail.com>
2 years agodt-bindings: imx8mq-clock: add mainline definitions
Angus Ainslie [Tue, 29 Mar 2022 14:02:38 +0000 (07:02 -0700)]
dt-bindings: imx8mq-clock: add mainline definitions

Sync the clock ids with the mainline kernel

077de6e1c9f ("clk: imx8mq: add PLL monitor output")

Signed-off-by: Angus Ainslie <angus@akkea.ca>
Reviewed-by: Marek Vasut <marex@denx.de>
2 years agomtd: nand: mxs_nand_spl: Remove the page aligned access
Ye Li [Mon, 28 Mar 2022 09:14:07 +0000 (17:14 +0800)]
mtd: nand: mxs_nand_spl: Remove the page aligned access

The mxs_nand_spl driver can support to read from page unaligned offset,
so don't need to set bl_len to ask spl_load_simple_fit to handle
the page unaligned access.

Actually spl_load_simple_fit has two parts of reading:
spl_simple_fit_read and spl_load_fit_image.
The spl_load_fit_image can handle the page unaligned offset,
but the spl_simple_fit_read can't do it. spl_simple_fit_read requires
the FIT location at page aligned offset.

Hence, remove the nand_get_mtd overwrite function from mxs_nand_spl
to use page unaligned read by driver.

Signed-off-by: Ye Li <ye.li@nxp.com>
Tested-by: Tim Harvey <tharvey@gateworks.com> #gw_ventana
2 years agoconfigs: imx8mm_evk: add pwm backlight support
Tommaso Merciai [Sat, 26 Mar 2022 11:19:10 +0000 (12:19 +0100)]
configs: imx8mm_evk: add pwm backlight support

Enable support for backlight/pwm-imx driver

Signed-off-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.com>
2 years agoarm: dts: imx8mm_evk: add pwm1/backlight support
Tommaso Merciai [Sat, 26 Mar 2022 11:19:09 +0000 (12:19 +0100)]
arm: dts: imx8mm_evk: add pwm1/backlight support

Add pwm1/backlight support nodes for imx8mm_evk board

Signed-off-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.com>
2 years agodriver: pwm: pwm-imx: introduce pwm_dm_imx_get_parms
Tommaso Merciai [Sat, 26 Mar 2022 11:19:07 +0000 (12:19 +0100)]
driver: pwm: pwm-imx: introduce pwm_dm_imx_get_parms

Introduce pwm_dm_imx_get_parms, dm version of pwm_imx_get_parms.
This function get clock rate using clk dm api

Signed-off-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.com>
2 years agodriver: pwm: pwm-imx: get and enable per/ipg clock using dm
Tommaso Merciai [Sat, 26 Mar 2022 11:19:06 +0000 (12:19 +0100)]
driver: pwm: pwm-imx: get and enable per/ipg clock using dm

Get and enable ipg/per pwms clocks using dm api into imx_pwm_of_to_plat
and imx_pwm_probe driver function

Signed-off-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.com>
2 years agoclk: imx8mm: add pwm clocks support
Tommaso Merciai [Sat, 26 Mar 2022 11:19:04 +0000 (12:19 +0100)]
clk: imx8mm: add pwm clocks support

Add clocks support for the PWM controllers. This is ported from
Linux v5.17-rc8.

Signed-off-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.com>
2 years agoarch: mach-imx: imx8m: add pwm_regs struct in imx-regs
Tommaso Merciai [Sat, 26 Mar 2022 11:19:03 +0000 (12:19 +0100)]
arch: mach-imx: imx8m: add pwm_regs struct in imx-regs

Add pwm_regs struct for i.MX8MM SOC

Signed-off-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.com>
2 years agoarch: mach-imx: imx8m: add pwm ctrl registers fields defines
Tommaso Merciai [Sat, 26 Mar 2022 11:19:02 +0000 (12:19 +0100)]
arch: mach-imx: imx8m: add pwm ctrl registers fields defines

Add pwm control registers fields defines into imx-regs.h:

 - prescaler
 - dozeen
 - waiten
 - dbgen
 - clksrc_ipg_high
 - clksrc_ipg, en field

References:
 - iMX8MMRM.pdf p 3884

Signed-off-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.com>
2 years agoARM: imx: Decode ECSPI env location from i.MX8M ROMAPI tables
Marek Vasut [Fri, 25 Mar 2022 17:59:28 +0000 (18:59 +0100)]
ARM: imx: Decode ECSPI env location from i.MX8M ROMAPI tables

Decode ECSPI boot device in env_get_location() from i.MX8M ROMAPI tables.
This is necessary to correctly identify env is in SPI NOR when the system
boots from SPI NOR attached to ECSPI.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <festevam@denx.de>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoarm: imx: imx8mn_beacon: Remove unnecessary configs
Adam Ford [Sat, 19 Mar 2022 15:45:16 +0000 (10:45 -0500)]
arm: imx: imx8mn_beacon: Remove unnecessary configs

Because the Beacon imx8mn board uses device tree
for MMC/SD and Ethernet, there is no need to have some of the
config options. It's handled by the device tree.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoarm: imx: imx8mm_beacon: Remove unnecessary configs
Adam Ford [Sat, 19 Mar 2022 15:45:15 +0000 (10:45 -0500)]
arm: imx: imx8mm_beacon: Remove unnecessary configs

Because the Beacon imx8mm board uses device tree
for MMC/SD and Ethernet, there is no need to have some of the
config options. It's handled by the device tree.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoimx8ulp: Disable SPL exception vector
Ye Li [Fri, 18 Mar 2022 07:50:18 +0000 (15:50 +0800)]
imx8ulp: Disable SPL exception vector

Disable SPL exception vector which causes issue to ROM patch execution
when SPL calling ROM API.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2 years agotbs2910: Convert to DM_SERIAL
Fabio Estevam [Tue, 15 Mar 2022 20:47:05 +0000 (17:47 -0300)]
tbs2910: Convert to DM_SERIAL

Conversion to DM_SERIAL is mandatory.

Select DM_SERIAL and add a imx6q-tbs2910-u-boot.dtsi file
that describes the nodes that require dm-pre-reloc, which allows
the DM model to configure the UART pinctrl early.

Remove the now unneeded board UART initialization.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Tested-by: Soeren Moch <smoch@web.de>
2 years agowarp7: Remove UART initialization code
Fabio Estevam [Mon, 14 Mar 2022 23:24:06 +0000 (20:24 -0300)]
warp7: Remove UART initialization code

With DM_SERIAL selected, it is no longer needed board code to
initialize the UART.

Describe the nodes that require dm-pre-reloc, which allows
the DM model to configure the UART pinctrl early.

Remove the now unneeded board UART initialization.

Signed-off-by: Fabio Estevam <festevam@denx.de>
2 years agodrivers: misc: add Gateworks System Controller driver
Tim Harvey [Tue, 8 Mar 2022 00:24:04 +0000 (16:24 -0800)]
drivers: misc: add Gateworks System Controller driver

Add a driver for the Gateworks System Controller used on Gateworks boards
which provides a boot watchdog, power control, temperature monitor,
and voltage ADCs.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2 years agoboard: gateworks: gw_ventana: move ft_early_fixups out of common
Tim Harvey [Tue, 8 Mar 2022 00:24:03 +0000 (16:24 -0800)]
board: gateworks: gw_ventana: move ft_early_fixups out of common

DM is not used for the SPL and a generic DT is used in the SPL
which requires no fixups. Remove the call in the SPL and move the function
into the U-Boot code.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2 years agoboard: gateworks: gw_ventana: move GPIO config out of common
Tim Harvey [Tue, 8 Mar 2022 00:24:02 +0000 (16:24 -0800)]
board: gateworks: gw_ventana: move GPIO config out of common

Move gpio configuration out of common and into u-boot code as it is
not used by the SPL.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2 years agoboard: gateworks: gw_ventana: move SPL uart config out of common
Tim Harvey [Tue, 8 Mar 2022 00:24:01 +0000 (16:24 -0800)]
board: gateworks: gw_ventana: move SPL uart config out of common

Since DM_SERIAL is used for U-Boot we no longer need legacy UART code in
common.c shared by the SPL and U-Boot. Move the legacy UART config to
the non-DM SPL.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2 years agoboard: gateworks: gw_ventana: convert to DM_I2C
Tim Harvey [Tue, 8 Mar 2022 00:24:00 +0000 (16:24 -0800)]
board: gateworks: gw_ventana: convert to DM_I2C

convert to DM_I2C for U-Boot while leaving SPL legacy I2C:
 - Move I2C config from common to SPL
 - Move PMIC config from common to SPL (no need to re-configure pmic)
 - add DM_I2C support to eeprom/gsc functions shared by SPL and U-Boot

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2 years agoarm: dts: imx8mn_var_som: Set atf-bl31 blob entry type
Ariel D'Alessandro [Fri, 4 Mar 2022 12:48:16 +0000 (09:48 -0300)]
arm: dts: imx8mn_var_som: Set atf-bl31 blob entry type

Configure binman ATF blob entry type to use the path from the BL31
environment variable, if defined.

Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
2 years agoARM: imx: imx8mn-evk: enable DM_SERIAL
Heiko Thiery [Sat, 26 Feb 2022 09:44:21 +0000 (10:44 +0100)]
ARM: imx: imx8mn-evk: enable DM_SERIAL

U-Boot complains that CONFIG_SERIAL is not converted to CONFIG_DM_SERIAL
and gives a deadline before possibly removing the board. Migrate to
DM_SERIAL to fulfill the request.

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoimx8m: ddrphy_utils: Add 3732 MT/s mode
Marek Vasut [Sat, 26 Feb 2022 03:37:42 +0000 (04:37 +0100)]
imx8m: ddrphy_utils: Add 3732 MT/s mode

Add entry for 3732 MT/s mode of operation of the LPDDR4, in
which case the DDR PLL has to be configured in 933 MHz mode.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <festevam@denx.de>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoARM: imx: imx8m: Add 933 MHz PLL settings
Marek Vasut [Sat, 26 Feb 2022 03:37:41 +0000 (04:37 +0100)]
ARM: imx: imx8m: Add 933 MHz PLL settings

Add settings for operating PLL at 933 MHz. This setting is useful in
case the LPDDR4 DRAM should operate at 1866 MHz or 3733 MT/s.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <festevam@denx.de>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agopmic: pca9450: Add PCA9450C compatible string
Marek Vasut [Sat, 26 Feb 2022 03:37:08 +0000 (04:37 +0100)]
pmic: pca9450: Add PCA9450C compatible string

Add DT compatible string for PCA9450C PMIC. This is a variant of the
PCA9450 PMIC with 6 A dual-phase buck regulator and 3 A buck regulator,
and is software-wise compatible with the PCA9450B. This variant of the
PCA9450 is designed for use as companion PMIC for i.MX8MP.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <festevam@denx.de>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2 years agoARM: dts: net: dwc_eth_qos: Fix i.MX8MP compatible string
Marek Vasut [Sat, 26 Feb 2022 03:36:37 +0000 (04:36 +0100)]
ARM: dts: net: dwc_eth_qos: Fix i.MX8MP compatible string

The correct compatible string for i.MX8MP variant of DWC EQoS MAC
is "nxp,imx8mp-dwmac-eqos", use it. Drop the two current users of
the current wrong compatible string to avoid breaking them.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <festevam@denx.de>
Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2 years agoimx: imx8mm/imx8mn_beacon: Remove redundant code
Adam Ford [Wed, 23 Feb 2022 13:50:51 +0000 (07:50 -0600)]
imx: imx8mm/imx8mn_beacon: Remove redundant code

The Ethernet controller and PHY use the device tree info to
configure themselves, so it's not necessary to manually do it
in the board file.  This permits the removal of a bunch of headers
as well.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Acked-by: Peng Fan <peng.fan@nxp.com>
2 years agoARM: imx: imx8mn-*-evk: add qca, disable-smarteee phy node
Heiko Thiery [Wed, 23 Feb 2022 09:48:28 +0000 (10:48 +0100)]
ARM: imx: imx8mn-*-evk: add qca, disable-smarteee phy node

To be in sync with the linux devicetree add the disable-smarteee
property.

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
Tested-by: Marek Vasut <marex@denx.de> # 8MNANOD4-EVK
2 years agoARM: imx: imx8mn-*-evk: use reset-gpios in phy node
Heiko Thiery [Wed, 23 Feb 2022 09:48:26 +0000 (10:48 +0100)]
ARM: imx: imx8mn-*-evk: use reset-gpios in phy node

To be in sync with the linux devicetree change the 'phy-reset-gpios' in
the fec node to 'reset-gpios' in the phy node. The PHY reset will be
done by the eth-phy-uclass driver while probing the PHY. This is ok
since it is done before probing the fec.

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
Tested-by: Marek Vasut <marex@denx.de> # 8MNANOD4-EVK
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2 years agoARM: imx: imx8mn-*-evk: use DM settings for PHY configuration
Heiko Thiery [Wed, 23 Feb 2022 08:10:29 +0000 (09:10 +0100)]
ARM: imx: imx8mn-*-evk: use DM settings for PHY configuration

With the correct settings described in the device-tree the PHY settings
in the board init are no longer required. The values are taken from the
linux device tree.

The PHY latency settings are derived from the phy-mode property and the
voltage seetings are done via the regulator.

Suggested-by: Michael Walle <michael@walle.cc>
Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
Tested-by: Marek Vasut <marex@denx.de> # 8MNANOD4-EVK
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2 years agopinctrl: nxp: don't automatically select DEVRES
Angus Ainslie [Mon, 17 Jan 2022 14:18:46 +0000 (06:18 -0800)]
pinctrl: nxp: don't automatically select DEVRES

If we select DEVRES here then it breaks building an imx8m SPL without
DEVRES support.

Signed-off-by: Angus Ainslie <angus@akkea.ca>
2 years agoconfigs: imx6dl_mamoj_defconfig: Enable LTO on imx6dl_mamoj board
Michael Trimarchi [Wed, 23 Mar 2022 16:52:17 +0000 (17:52 +0100)]
configs: imx6dl_mamoj_defconfig: Enable LTO on imx6dl_mamoj board

Enable LTO on mamoj to reduce SPL and uboot size. Tested with gcc
gcc-11.1.0

U-Boot 2022.04-rc4-00051-g17fc5facd0 (Mar 23 2022 - 16:43:43 +0100)

CPU:   Freescale i.MX6DL rev1.3 996 MHz (running at 792 MHz)
CPU:   Extended Commercial temperature grade (-20C to 105C) at 40C
Reset cause: POR
Model: BTicino i.MX6DL Mamoj board
DRAM:  512 MiB
Core:  29 devices, 12 uclasses, devicetree: separate
MMC:   FSL_SDHC: 2
Loading Environment from MMC... OK
In:    serial
Out:   serial
Err:   serial
Net:
Error: ethernet@2188000 address not set.
No ethernet found.

Tested-by: Raffaele RECALCATI <raffaele.recalcati@bticino.it>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoupdate CAAM MAINTAINER
Gaurav Jain [Thu, 24 Mar 2022 06:20:38 +0000 (11:50 +0530)]
update CAAM MAINTAINER

updated CAAM driver files maintainer.

Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
2 years agoPPC: Enable Job ring driver model.
Gaurav Jain [Thu, 24 Mar 2022 06:20:37 +0000 (11:50 +0530)]
PPC: Enable Job ring driver model.

removed sec_init() call from board files.
sec is initialized based on job ring information processed
from device tree.

Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2 years agoPPC: Add crypto node in device tree
Gaurav Jain [Thu, 24 Mar 2022 06:20:36 +0000 (11:50 +0530)]
PPC: Add crypto node in device tree

device tree imported from linux kernel.
c500bee1c5b2 (tag: v5.14-rc4) Linux 5.14-rc4

Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>