]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
2 years agoimx: toradex/apalis-imx8: correct SCU API usage
Peng Fan [Thu, 15 Jun 2023 10:08:59 +0000 (18:08 +0800)] 
imx: toradex/apalis-imx8: correct SCU API usage

The return value is int type, not sc_err_t(u8), correct the usage.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx: mach: correct SCU API usage
Peng Fan [Thu, 15 Jun 2023 10:08:58 +0000 (18:08 +0800)] 
imx: mach: correct SCU API usage

The return value is int type, not sc_err_t(u8), correct the usage.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoconfigs: phycore-imx8mm_defconfig: Enable LTO
Teresa Remmet [Wed, 14 Jun 2023 12:36:48 +0000 (14:36 +0200)] 
configs: phycore-imx8mm_defconfig: Enable LTO

Enable LTO for binary size reduction.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
2 years agoconfigs: phycore-imx8mp_defconfig: Enable LTO
Teresa Remmet [Wed, 14 Jun 2023 12:36:47 +0000 (14:36 +0200)] 
configs: phycore-imx8mp_defconfig: Enable LTO

Enable LTO for binary size reduction.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
2 years agocolibri_imx6: fix RALAT and WALAT values
Stefan Eichenberger [Wed, 14 Jun 2023 09:01:37 +0000 (11:01 +0200)] 
colibri_imx6: fix RALAT and WALAT values

Running a memtest in U-Boot and Linux shows that some Colibri iMX6
produce bitflips at temperatures above 60°C. This happens because the
RALAT and WALAT values on the Colibri iMX6 are too low. The problems
were introduced by commit 09dbac8174c4 ("mx6: ddr: Restore ralat/walat
in write level calibration") before the calibration process overwrote
the values and set them to the maximum value. With this commit, we make
sure that the RALAT and WALAT values are set to the maximum values
again. This has been proven to work for years.

Fixes: 09dbac8174c4 ("mx6: ddr: Restore ralat/walat in write level calibration")
Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2 years agodoc: board: phytec: add phycore_imx8mp
Yannic Moog [Wed, 14 Jun 2023 07:12:20 +0000 (09:12 +0200)] 
doc: board: phytec: add phycore_imx8mp

Add documentation on how to build a bootable U-Boot image for the PHYTEC
phyCORE-i.MX 8M Plus.

Signed-off-by: Yannic Moog <y.moog@phytec.de>
2 years agodoc: board: phytec: add phycore_imx8mm
Yannic Moog [Wed, 14 Jun 2023 07:12:19 +0000 (09:12 +0200)] 
doc: board: phytec: add phycore_imx8mm

Add documentation on how to build a bootable U-Boot image for the PHYTEC
phyCORE-i.MX 8M Mini.

Signed-off-by: Yannic Moog <y.moog@phytec.de>
2 years agoconfigs: T1024RDB: enable DM_SERIAL
Camelia Groza [Tue, 11 Jul 2023 12:49:33 +0000 (15:49 +0300)] 
configs: T1024RDB: enable DM_SERIAL

As the serial devices are configured in the device tree, enable
DM_SERIAL in the non-SPL T1024RDB defconfigs.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agopowerpc: dts: t1024rdb: tag serial nodes with bootph-all
Camelia Groza [Tue, 11 Jul 2023 12:49:32 +0000 (15:49 +0300)] 
powerpc: dts: t1024rdb: tag serial nodes with bootph-all

Make sure the serial driver is initialized before relocation by tagging
the serial nodes with "bootph-all". Add these u-boot specific properties
to an *-u-boot.dtsi file.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agopowerpc: dts: t1024rdb: add serial nodes
Camelia Groza [Tue, 11 Jul 2023 12:49:31 +0000 (15:49 +0300)] 
powerpc: dts: t1024rdb: add serial nodes

Add the serial node descriptions similar to Linux v6.4 for the
t1024rdb board and its dependencies.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoboard: freescale: t102xrdb: implement get_serial_clock
Camelia Groza [Tue, 11 Jul 2023 12:49:30 +0000 (15:49 +0300)] 
board: freescale: t102xrdb: implement get_serial_clock

The serial clock is provided by the get_serial_clock() callback on PPC
under DM_SERIAL. Use the same method to compute the clock as for
non-DM_SERIAL use cases.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoboard: freescale: t102xrdb: enumerate PCI devices
Camelia Groza [Tue, 11 Jul 2023 12:49:29 +0000 (15:49 +0300)] 
board: freescale: t102xrdb: enumerate PCI devices

Call pci_init() to force PCI enumeration at probe time.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoconfigs: T1042D4RDB: enable DM_SERIAL
Camelia Groza [Tue, 11 Jul 2023 12:49:28 +0000 (15:49 +0300)] 
configs: T1042D4RDB: enable DM_SERIAL

As the serial devices are configured in the device tree, enable
DM_SERIAL in the non-SPL T1042D4RDB defconfigs.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agopowerpc: dts: t1042d4rdb: tag serial nodes with bootph-all
Camelia Groza [Tue, 11 Jul 2023 12:49:27 +0000 (15:49 +0300)] 
powerpc: dts: t1042d4rdb: tag serial nodes with bootph-all

Make sure the serial driver is initialized before relocation by tagging
the serial nodes with "bootph-all". Add these u-boot specific properties
to an *-u-boot.dtsi file.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agopowerpc: dts: t1042d4rdb: add serial nodes
Camelia Groza [Tue, 11 Jul 2023 12:49:26 +0000 (15:49 +0300)] 
powerpc: dts: t1042d4rdb: add serial nodes

Add the serial node descriptions similar to Linux v6.4 for the
t1042d4rdb board and its dependencies.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoboard: freescale: t104xrdb: implement get_serial_clock
Camelia Groza [Tue, 11 Jul 2023 12:49:25 +0000 (15:49 +0300)] 
board: freescale: t104xrdb: implement get_serial_clock

The serial clock is provided by the get_serial_clock() callback on PPC
under DM_SERIAL. Use the same method to compute the clock as for
non-DM_SERIAL use cases.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoboard: freescale: t104xrdb: enumerate PCI devices
Camelia Groza [Tue, 11 Jul 2023 12:49:24 +0000 (15:49 +0300)] 
board: freescale: t104xrdb: enumerate PCI devices

Call pci_init() to force PCI enumeration at probe time.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoconfigs: T4240RDB: enable DM_SERIAL
Camelia Groza [Tue, 11 Jul 2023 12:49:23 +0000 (15:49 +0300)] 
configs: T4240RDB: enable DM_SERIAL

As the serial devices are configured in the device tree, enable
DM_SERIAL in the non-SPL T4240RDB defconfig.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agopowerpc: dts: t4240rdb: tag serial nodes with bootph-all
Camelia Groza [Tue, 11 Jul 2023 12:49:22 +0000 (15:49 +0300)] 
powerpc: dts: t4240rdb: tag serial nodes with bootph-all

Make sure the serial driver is initialized before relocation by tagging
the serial nodes with "bootph-all". Add these u-boot specific properties
to an *-u-boot.dtsi file.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agopowerpc: dts: t4240rdb: add serial nodes
Camelia Groza [Tue, 11 Jul 2023 12:49:21 +0000 (15:49 +0300)] 
powerpc: dts: t4240rdb: add serial nodes

Add the serial node descriptions similar to Linux v6.4 for the t4240rdb
board and its dependencies.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoboard: freescale: t4240rdb: implement get_serial_clock
Camelia Groza [Tue, 11 Jul 2023 12:49:20 +0000 (15:49 +0300)] 
board: freescale: t4240rdb: implement get_serial_clock

The serial clock is provided by the get_serial_clock() callback on PPC
under DM_SERIAL. Use the same method to compute the clock as for
non-DM_SERIAL use cases.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoboard: freescale: t4240rdb: enumerate PCI devices
Camelia Groza [Tue, 11 Jul 2023 12:49:19 +0000 (15:49 +0300)] 
board: freescale: t4240rdb: enumerate PCI devices

Call pci_init() to force PCI enumeration at probe time.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoconfigs: T2080RDB: enable DM_SERIAL
Camelia Groza [Tue, 11 Jul 2023 12:49:18 +0000 (15:49 +0300)] 
configs: T2080RDB: enable DM_SERIAL

As the serial devices are configured in the device tree, enable
DM_SERIAL in the non-SPL T2080RDB defconfigs.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agopowerpc: dts: t2080rdb: tag serial nodes with bootph-all
Camelia Groza [Tue, 11 Jul 2023 12:49:17 +0000 (15:49 +0300)] 
powerpc: dts: t2080rdb: tag serial nodes with bootph-all

Make sure the serial driver is initialized before relocation by tagging
the serial nodes with "bootph-all". Add these u-boot specific properties
to an *-u-boot.dtsi file.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agopowerpc: dts: t2080rdb: add serial nodes
Camelia Groza [Tue, 11 Jul 2023 12:49:16 +0000 (15:49 +0300)] 
powerpc: dts: t2080rdb: add serial nodes

Add the serial node descriptions similar to Linux v6.4 for the t2080rdb
board and its dependencies.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoboard: freescale: t2080rdb: implement get_serial_clock
Camelia Groza [Tue, 11 Jul 2023 12:49:15 +0000 (15:49 +0300)] 
board: freescale: t2080rdb: implement get_serial_clock

The serial clock is provided by the get_serial_clock() callback on PPC
under DM_SERIAL. Use the same method to compute the clock as for
non-DM_SERIAL use cases.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoboard: freescale: t2080rdb: enumerate PCI devices
Camelia Groza [Tue, 11 Jul 2023 12:49:14 +0000 (15:49 +0300)] 
board: freescale: t2080rdb: enumerate PCI devices

Call pci_init() to force PCI enumeration at probe time.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agomtd: spi-nor: Add support for w25q256jwm
Venkatesh Yadav Abbarapu [Mon, 26 Jun 2023 03:32:37 +0000 (09:02 +0530)] 
mtd: spi-nor: Add support for w25q256jwm

Add support for Winbond 256M-bit flash w25q256jwm.
Performed basic erase/write/readback operations on
ZynqMP zc1751+dc1 board.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2 years agospi: npcm_pspi: use ACTIVE_LOW flag for cs gpio and set default max_hz
Jim Liu [Tue, 4 Jul 2023 08:01:56 +0000 (16:01 +0800)] 
spi: npcm_pspi: use ACTIVE_LOW flag for cs gpio and set default max_hz

If cs gpio is requested with ACTIVE_HIGH flag, it will
be pulled low(i.e. active). This is not what we expected.

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2 years agomtd: spi-nor-ids: add xtxtech part#
Bruce Suen [Thu, 13 Jul 2023 08:42:41 +0000 (14:12 +0530)] 
mtd: spi-nor-ids: add xtxtech part#

add following XTX part numbers to the list:

xt25f08: 3V QSPI, 8Mbit
xt25f16: 3V QSPI, 16Mbit
xt25f32: 3V QSPI, 32Mbit
xt25f64: 3V QSPI, 64Mbit
xt25f128: 3V QSPI, 128Mbit
xt25f256: 3V QSPI, 256Mbit
xt25q08: 1.8V QSPI, 8Mbit
xt25q16: 1.8V QSPI, 16Mbit
xt25q32: 1.8V QSPI, 32Mbit
xt25q64: 1.8V QSPI, 64Mbit
xt25q128: 1.8V QSPI, 128Mbit
xt25q256: 1.8V QSPI, 256Mbit
xt25q512: 1.8V QSPI, 512Mbit
xt25q01g: 1.8V QSPI, 1Gbit
xt25w512: wide voltage, QSPI, 512Mbit
xt25w01g: wide voltage, QSPI, 1Gbit

remove xt25f128b and add xt25f128,because xt25f128b andxt25f128f
share same jdec id,we use xt25f128 instead.

Signed-off-by: Bruce Suen <bruce_suen@163.com>
[jagan: re-edited the entire patch]
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2 years agomtd: spi-nor-ids: change full company name of XTX
Bruce Suen [Mon, 19 Jun 2023 10:28:58 +0000 (06:28 -0400)] 
mtd: spi-nor-ids: change full company name of XTX

XTX changed full company name from "XTX Technology (Shenzhen) Limited
to "XTX Technology Limited" since 2020,So remove "(Shenzhen)".

Signed-off-by: Bruce Suen <bruce_suen@163.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2 years agodoc: bindings: soft-spi: Remove the usage of deprecated properties
Fabio Estevam [Thu, 18 May 2023 22:22:41 +0000 (19:22 -0300)] 
doc: bindings: soft-spi: Remove the usage of deprecated properties

According to Documentation/devicetree/bindings/spi/spi-gpio.yaml
from Linux, the recommended spio-gpio properties are:

sck-gpios, miso-gpios and mosi-gpios.

gpio-sck, gpio-mosi and gpio-miso are considered deprecated.

Update the bindings to suggest the recommeded properties.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2 years agospi: soft_spi: Support the recommended soft spi properties
Fabio Estevam [Thu, 18 May 2023 22:22:40 +0000 (19:22 -0300)] 
spi: soft_spi: Support the recommended soft spi properties

According to Documentation/devicetree/bindings/spi/spi-gpio.yaml
from Linux, the recommended spio-gpio properties are:

sck-gpios, miso-gpios and mosi-gpios.

gpio-sck, gpio-mosi and gpio-miso are considered deprecated.

Currently, U-Boot only supports the deprecated properties.

Allow the soft_spi driver to support both the new and old properties.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2 years agodt-bindings: spi: Add bcm63xx-hsspi controller support
William Zhang [Wed, 7 Jun 2023 23:37:06 +0000 (16:37 -0700)] 
dt-bindings: spi: Add bcm63xx-hsspi controller support

Bring the device tree binding document from Linux to u-boot

Port from linux patches:
Link: https://lore.kernel.org/r/20230207065826.285013-2-william.zhang@broadcom.com
Link: https://lore.kernel.org/r/20230207065826.285013-3-william.zhang@broadcom.com
Signed-off-by: William Zhang <william.zhang@broadcom.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2 years agospi: synquacer: remove SPI_TX_BYTE handling
Masahisa Kojima [Wed, 24 May 2023 07:32:46 +0000 (16:32 +0900)] 
spi: synquacer: remove SPI_TX_BYTE handling

Current code expects that SPI_TX_BYTE is single bit mode
but it is wrong. It indicates byte program mode,
not single bit mode.

If SPI_TX_DUAL, SPI_TX_QUAD and SPI_TX_OCTAL bits are not set,
the default transfer bus width is single bit.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2 years agospi: bcmbca-hsspi: Add driver for newer HSSPI controller
William Zhang [Wed, 7 Jun 2023 23:37:05 +0000 (16:37 -0700)] 
spi: bcmbca-hsspi: Add driver for newer HSSPI controller

The newer BCMBCA SoCs such as BCM6756, BCM4912 and BCM6855 include an
updated SPI controller that add the capability to allow the driver to
control chip select explicitly. Driver can control and keep cs low
between the transfers natively. Hence the dummy cs workaround or prepend
mode found in the bcm63xx-hsspi driver are no longer needed and this new
driver is much cleaner.

Port from linux patch:
Link: https://lore.kernel.org/r/20230209200246.141520-15-william.zhang@broadcom.com
Signed-off-by: William Zhang <william.zhang@broadcom.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2 years agospi: bcm63xx-hsspi: Add prepend mode support
William Zhang [Wed, 7 Jun 2023 23:37:04 +0000 (16:37 -0700)] 
spi: bcm63xx-hsspi: Add prepend mode support

Due to the controller limitation to keep the chip select low during the
bus idle time between the transfer, a dummy cs workaround was used when
this driver was first upstreamed to the u-boot based on linux kernel
driver. It basically picks the dummy cs as !actual_cs so typically dummy
cs is 1 when most of the case only cs 0 is used in the board design.
Then invert the polarity of both cs and tell the controller to start the
transfers using dummy cs. Assuming both cs are active low before the
inversion, effectively this keeps dummy cs high and actual cs low during
the transfer and workaround the issue.

This workaround requires that dummy cs 1 pin to is set to SPI chip
selection function in the pinmux when the transfer clock is above 25MHz.
The old chips likely have default pinmux set to chip select on the dummy
cs pin so it works but this is not case for the new Broadband BCA chips
and this workaround stop working. This is specifically an issue to
support SPI NAND and SPI NOR flash because these flash devices can
typically run at or above 100MHz.

This patch utilizes the prepend feature of the controller to combine the
multiple transfers in the same message to a single transfer when
possible. This way there is no need to keep clock low between transfers
and solve the issue without any pinmux requirement.

Multiple transfers within a SPI message may be combined into one
transfer if the following are all true:
  * One or more half duplex write transfer in single bit mode
  * Optional full duplex read/write at the end
  * No delay and cs_change between transfers

Most of the SPI device meets this requirements such as SPI NOR, SPI NAND
flash, Broadcom SPI voice card and etc. So this change switches to the
prepend mode as the default mode. For any SPI message that does not meet
the above requirement, we switch to original dummy cs mode but limit the
clock rate to the safe 25MHz.

Port from linux patch:
Link: https://lore.kernel.org/r/20230209200246.141520-12-william.zhang@broadcom.com
Signed-off-by: William Zhang <william.zhang@broadcom.com>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
2 years agospi: bcm63xx-hsspi: Add new compatible string support
William Zhang [Wed, 7 Jun 2023 23:37:03 +0000 (16:37 -0700)] 
spi: bcm63xx-hsspi: Add new compatible string support

New compatible string brcm,bcmbca-hsspi-v1.0 is introduced based on
dts document brcm,bcm63xx-hsspi.yaml. Add it to the driver to support
this new binding.

Port from linux patch:
Link: https://lore.kernel.org/r/20230207065826.285013-6-william.zhang@broadcom.com
Signed-off-by: William Zhang <william.zhang@broadcom.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2 years agospi: bcm63xx-hsspi: Fix multi-bit mode setting
William Zhang [Wed, 7 Jun 2023 23:37:02 +0000 (16:37 -0700)] 
spi: bcm63xx-hsspi: Fix multi-bit mode setting

Currently the driver always sets the controller to dual data bit mode
for both tx and rx data in the profile mode control register even for
single data bit transfer. Luckily the opcode is set correctly according
to SPI transfer data bit width so it does not actually cause issues.

This change fixes the problem by setting tx and rx data bit mode field
correctly according to the actual SPI transfer tx and rx data bit width.

Fixes: 29cc4368ad4b ("dm: spi: add BCM63xx HSSPI driver")
Port from linux patch:
Link: https://lore.kernel.org/r/20230209200246.141520-11-william.zhang@broadcom.com
Signed-off-by: William Zhang <william.zhang@broadcom.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2 years agospi: bcm63xx-hsspi: Make driver depend on BCMBCA arch
William Zhang [Wed, 7 Jun 2023 23:37:01 +0000 (16:37 -0700)] 
spi: bcm63xx-hsspi: Make driver depend on BCMBCA arch

ARCH_BCMBCA was introduced to cover individual Broadcom broadband SoC
for common features and IP blocks. Use this config instead of each chip
config as the Kconfig dependency for Broadcom HSSPI driver.

Signed-off-by: William Zhang <william.zhang@broadcom.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2 years agospi: pl022: Add chip-select gpio support
Lukas Funke [Fri, 28 Apr 2023 12:38:50 +0000 (14:38 +0200)] 
spi: pl022: Add chip-select gpio support

Add support for an optional external chip-select gpio.

Signed-off-by: Lukas Funke <lukas.funke@weidmueller.com>
Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2 years agospi: pl022: Remove platform data header
Stefan Herbrechtsmeier [Fri, 28 Apr 2023 12:38:49 +0000 (14:38 +0200)] 
spi: pl022: Remove platform data header

Remove the platform data header because its content is only used by the
driver.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2 years agospi: pl022: Rename flush into pl022_spi_flush
Stefan Herbrechtsmeier [Fri, 28 Apr 2023 12:38:48 +0000 (14:38 +0200)] 
spi: pl022: Rename flush into pl022_spi_flush

Rename the flush function into pl022_spi_flush to avoid conflicting
types with previous declaration of the function in stdio.h header.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2 years agospi: pl022: Align compatible property with device tree binding
Lukas Funke [Fri, 28 Apr 2023 12:38:47 +0000 (14:38 +0200)] 
spi: pl022: Align compatible property with device tree binding

Align the compatible property with the kernel device tree binding [1]
by removing the '-spi' suffix.

[1] https://www.kernel.org/doc/Documentation/devicetree/bindings/spi/spi-pl022.yaml

Signed-off-by: Lukas Funke <lukas.funke@weidmueller.com>
Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2 years agomtd: nand: pxa3xx: Enable devbus/nand arbiter on Armada 8K
Chris Packham [Sun, 9 Jul 2023 22:47:35 +0000 (10:47 +1200)] 
mtd: nand: pxa3xx: Enable devbus/nand arbiter on Armada 8K

The CN9130 SoC (an ARMADA 8K type) has both a NAND Flash Controller and
a generic local bus controller (Device Bus Controller) that share common
pins.

With a board design that incorporates both a NAND flash and uses
the Device Bus (in our case for an SRAM) accessing the Device Bus device
fails unless the NfArbiterEn bit is set. Setting the bit enables
arbitration between the Device Bus and the NAND flash.

Since there is no obvious downside in enabling this for designs that
don't require arbitration, we always enable it.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agomtd: nand: pxa3xx: Add support for the Marvell AC5 SoC
Chris Packham [Sun, 9 Jul 2023 22:47:34 +0000 (10:47 +1200)] 
mtd: nand: pxa3xx: Add support for the Marvell AC5 SoC

The NAND flash controller (NFC) on the AC5/AC5X SoC is the same as
the NFC used on other Marvell SoCs. It does have the additional
restriction of only supporting SDR timing modes up to 3.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoarm: mvebu: ac5: Define mvebu_get_nand_clock()
Chris Packham [Sun, 9 Jul 2023 22:47:33 +0000 (10:47 +1200)] 
arm: mvebu: ac5: Define mvebu_get_nand_clock()

The NF_CLK for the AC5 SoC runs at 400MHz. There's no strapping
or gating require so just add a mvebu_get_nand_clock() that
returns this value.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoarm: mvebu: ac5: Add nand-controller node
Chris Packham [Sun, 9 Jul 2023 22:47:32 +0000 (10:47 +1200)] 
arm: mvebu: ac5: Add nand-controller node

The AC5/AC5X SoC has a NAND flash controller. Add this to the
SoC device tree.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoarm: mvebu: Enable gpio-fan for Thecus N2350 board
Tony Dinh [Tue, 20 Jun 2023 23:20:22 +0000 (16:20 -0700)] 
arm: mvebu: Enable gpio-fan for Thecus N2350 board

Add gpio-fan in the DTS and enable the GPIO in board file to start the fan
during boot.

Note that this patch depends on
https://patchwork.ozlabs.org/project/uboot/patch/20230606214539.4229-1-mibodhi@gmail.com/

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoarm: mvebu: Clean up Thecus N2350 board DTS
Tony Dinh [Tue, 6 Jun 2023 21:45:39 +0000 (14:45 -0700)] 
arm: mvebu: Clean up Thecus N2350 board DTS

- Update the Thecus N2350 DTS to conform with latest device-tree binding
and styles.
- Correct typo in mdio node.

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Pali Rohár <pali@kernel.org>
2 years agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Wed, 12 Jul 2023 17:10:04 +0000 (13:10 -0400)] 
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-riscv

- Add ethernet driver for StarFive JH7110 SoC
- Add ACLINT mtimer and mswi devices support
- Add Lichee PI 4A board

2 years agodoc: t-head: lpi4a: document Lichee PI 4A board
Yixun Lan [Sat, 8 Jul 2023 11:24:35 +0000 (19:24 +0800)] 
doc: t-head: lpi4a: document Lichee PI 4A board

Reviewed-by: Wei Fu <wefu@redhat.com>
Signed-off-by: Yixun Lan <dlan@gentoo.org>
2 years agoconfigs: th1520_lpi4a_defconfig: Add initial config
Yixun Lan [Sat, 8 Jul 2023 11:24:34 +0000 (19:24 +0800)] 
configs: th1520_lpi4a_defconfig: Add initial config

Add basic config for Sipeed Lichee PI 4A board which make it capable of
booting into serial console.

Reviewed-by: Wei Fu <wefu@redhat.com>
Signed-off-by: Yixun Lan <dlan@gentoo.org>
2 years agoriscv: dts: t-head: Add basic device tree for Sipeed Lichee PI 4A board
Yixun Lan [Sat, 8 Jul 2023 11:24:33 +0000 (19:24 +0800)] 
riscv: dts: t-head: Add basic device tree for Sipeed Lichee PI 4A board

Only add basic support for CPU, PLIC UART and Timer.

Reviewed-by: Wei Fu <wefu@redhat.com>
Signed-off-by: Yixun Lan <dlan@gentoo.org>
2 years agoriscv: t-head: licheepi4a: initial support added
Yixun Lan [Sat, 8 Jul 2023 11:24:32 +0000 (19:24 +0800)] 
riscv: t-head: licheepi4a: initial support added

Add support for Sipeed's Lichee Pi 4A board which based on T-HEAD's
TH1520 SoC, only minimal device tree and serial console are enabled,
so it's capable of chain booting from T-HEAD's vendor u-boot.

Reviewed-by: Wei Fu <wefu@redhat.com>
Signed-off-by: Yixun Lan <dlan@gentoo.org>
2 years agoriscv: Rename SiFive CLINT to RISC-V ALINT
Bin Meng [Wed, 21 Jun 2023 15:11:46 +0000 (23:11 +0800)] 
riscv: Rename SiFive CLINT to RISC-V ALINT

As the RISC-V ACLINT specification is defined to be backward compatible
with the SiFive CLINT specification, we rename SiFive CLINT to RISC-V
ALINT in the source tree to be future-proof.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Rick Chen <rick@andestech.com>
2 years agoriscv: clint: Update the sifive clint ipi driver to support aclint
Bin Meng [Wed, 21 Jun 2023 15:11:45 +0000 (23:11 +0800)] 
riscv: clint: Update the sifive clint ipi driver to support aclint

This RISC-V ACLINT specification [1] defines a set of memory mapped
devices which provide inter-processor interrupts (IPI) and timer
functionalities for each HART on a multi-HART RISC-V platform.

The RISC-V ACLINT specification is defined to be backward compatible
with the SiFive CLINT specification, however the device tree binding
is a new one. This change updates the sifive clint ipi driver to
support ACLINT mswi device, by checking the per-driver data field of
the ACLINT mtimer driver to determine whether a syscon based approach
needs to be taken to get the base address of the ACLINT mswi device.

[1] https://github.com/riscv/riscv-aclint/blob/main/riscv-aclint.adoc

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Rick Chen <rick@andestech.com>
2 years agoriscv: timer: Update the sifive clint timer driver to support aclint
Bin Meng [Wed, 21 Jun 2023 15:11:44 +0000 (23:11 +0800)] 
riscv: timer: Update the sifive clint timer driver to support aclint

This RISC-V ACLINT specification [1] defines a set of memory mapped
devices which provide inter-processor interrupts (IPI) and timer
functionalities for each HART on a multi-HART RISC-V platform.

The RISC-V ACLINT specification is defined to be backward compatible
with the SiFive CLINT specification, however the device tree binding
is a new one. This change updates the sifive clint timer driver to
support ACLINT mtimer device, using a per-driver data field to hold
the mtimer offset to the base address encoded in the mtimer node.

[1] https://github.com/riscv/riscv-aclint/blob/main/riscv-aclint.adoc

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Rick Chen <rick@andestech.com>
2 years agoboard: starfive: Dynamic configuration of DT for 1.2A and 1.3B
Yanhong Wang [Thu, 15 Jun 2023 09:36:52 +0000 (17:36 +0800)] 
board: starfive: Dynamic configuration of DT for 1.2A and 1.3B

The main difference between StarFive VisionFive 2 1.2A and 1.3B is gmac.
You can read the PCB version of the current board by
get_pcb_revision_from_eeprom(), and then dynamically configure the
difference of gmac in spl_perform_fixups() according to different PCB
versions, so that one DT and one defconfig can support both 1.2A and
1.3B versions, which is more user-friendly.

Signed-off-by: Yanhong Wang <yanhong.wang@starfivetech.com>
Reviewed-by: Rick Chen <rick@andestech.com>
2 years agoram: starfive: Read memory size information from EEPROM
Yanhong Wang [Thu, 15 Jun 2023 09:36:51 +0000 (17:36 +0800)] 
ram: starfive: Read memory size information from EEPROM

StarFive VisionFive 2 has two versions, 1.2A and 1.3B, each version of
DDR capacity includes 2G/4G/8G, a DT can not support multiple
capacities, so the capacity size information is recorded to EEPROM, when
DDR initialization required capacity size information is read from
EEPROM.

If there is no information in EEPROM, it is initialized with the default
size defined in DT.

Signed-off-by: Yanhong Wang <yanhong.wang@starfivetech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 years agoconfigs: starfive: Enable ID EEPROM configuration
Yanhong Wang [Thu, 15 Jun 2023 09:36:50 +0000 (17:36 +0800)] 
configs: starfive: Enable ID EEPROM configuration

Enabled ID_EEPROM and I2C configuration for StarFive VisionFive2 board.

Signed-off-by: Yanhong Wang <yanhong.wang@starfivetech.com>
Reviewed-By: Leo Yu-Chi Linag <ycliang@andestech.com>
2 years agoriscv: dts: starfive: Add support eeprom device tree node
Yanhong Wang [Thu, 15 Jun 2023 09:36:49 +0000 (17:36 +0800)] 
riscv: dts: starfive: Add support eeprom device tree node

Add support "atmel,24c04" eeprom for StarFive VisionFive2 board.

Signed-off-by: Yanhong Wang <yanhong.wang@starfivetech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 years agoeeprom: starfive: Enable ID EEPROM configuration
Yanhong Wang [Thu, 15 Jun 2023 09:36:48 +0000 (17:36 +0800)] 
eeprom: starfive: Enable ID EEPROM configuration

Enabled ID_EEPROM configuration for StarFive VisionFive2 board.

Signed-off-by: Yanhong Wang <yanhong.wang@starfivetech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 years agoconfigs: starfive: Enable ethernet configuration for StarFive VisionFive2
Yanhong Wang [Thu, 15 Jun 2023 09:36:47 +0000 (17:36 +0800)] 
configs: starfive: Enable ethernet configuration for StarFive VisionFive2

Enable DWC_ETH_QOS and PHY_MOTORCOMM configuration to support ethernet
function for StarFive VisionFive 2 board,including versions 1.2A and
1.3B.

Signed-off-by: Yanhong Wang <yanhong.wang@starfivetech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 years agodoc: board: starfive: Reword the make defconfig information
Yanhong Wang [Thu, 15 Jun 2023 09:36:46 +0000 (17:36 +0800)] 
doc: board: starfive: Reword the make defconfig information

The defconfig file name for StarFive VisionFive2 has been changed, and
the documentation description has also changed.

Signed-off-by: Yanhong Wang <yanhong.wang@starfivetech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 years agoriscv: dts: jh7110: Combine the board device tree files of 1.2A and 1.3B
Yanhong Wang [Thu, 15 Jun 2023 09:36:45 +0000 (17:36 +0800)] 
riscv: dts: jh7110: Combine the board device tree files of 1.2A and 1.3B

The difference between 1.2A and 1.3B is dynamically configured according
to the PCB version, and there is no difference on the board device tree,
so the same DT file can be used.

Signed-off-by: Yanhong Wang <yanhong.wang@starfivetech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 years agoriscv: dts: jh7110: Add ethernet device tree nodes
Yanhong Wang [Thu, 15 Jun 2023 09:36:44 +0000 (17:36 +0800)] 
riscv: dts: jh7110: Add ethernet device tree nodes

Add ethernet device tree node to support StarFive ethernet driver for
the JH7110 RISC-V SoC.

Signed-off-by: Yanhong Wang <yanhong.wang@starfivetech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 years agonet: dwc_eth_qos: Add StarFive ethernet driver glue layer
Yanhong Wang [Thu, 15 Jun 2023 09:36:43 +0000 (17:36 +0800)] 
net: dwc_eth_qos: Add StarFive ethernet driver glue layer

The StarFive ETHQOS hardware has its own clock and reset,so add a
corresponding glue driver to configure them.

Signed-off-by: Yanhong Wang <yanhong.wang@starfivetech.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2 years agonet: phy: Add driver for Motorcomm yt8531 gigabit ethernet phy
Yanhong Wang [Thu, 15 Jun 2023 09:36:42 +0000 (17:36 +0800)] 
net: phy: Add driver for Motorcomm yt8531 gigabit ethernet phy

Add a driver for the motorcomm yt8531 gigabit ethernet phy. We have
verified the driver on StarFive VisionFive2 board.

Signed-off-by: Yanhong Wang <yanhong.wang@starfivetech.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
3 years agoMerge tag 'efi-2023-07-rc7' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Tue, 11 Jul 2023 17:27:32 +0000 (13:27 -0400)] 
Merge tag 'efi-2023-07-rc7' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request efi-2023-07-rc7

Documentation:

* Fix links to Linux kernel documentation

UEFI:

* Fix memory leak in efidebug dh subcommand
* Fix underflow when calculating remaining variable store size
* Increase default variable store size to 64 KiB
* mkeficapsule: fix efi_firmware_management_capsule_header data type

3 years agoMakefile: Drop -rc6
Tom Rini [Tue, 11 Jul 2023 13:55:53 +0000 (09:55 -0400)] 
Makefile: Drop -rc6

When tagging and releasing v2023.07 I forgot to drop the -rc6 tag. For
regular use, I've made a v2023.07.01 tag, but for here we can just drop
the -rc6 tag.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoboard: gateworks: venice: add imx8mp-gw7905-2x support
Tim Harvey [Fri, 9 Jun 2023 16:54:51 +0000 (09:54 -0700)] 
board: gateworks: venice: add imx8mp-gw7905-2x support

The Gateworks imx8mp-venice-gw7905-2x consists of a SOM + baseboard.

The GW702x SOM contains the following:
 - i.MX8M Plus SoC
 - LPDDR4 memory
 - eMMC Boot device
 - Gateworks System Controller (GSC) with integrated EEPROM, button
   controller, and ADC's
 - PMIC
 - SOM connector providing:
  - eQoS GbE MII
  - 1x SPI
  - 2x I2C
  - 4x UART
  - 2x USB 3.0
  - 1x PCI
  - 1x SDIO (4-bit 3.3V)
  - 1x SDIO (4-bit 3.3V/1.8V)
  - GPIO

The GW7905 Baseboard contains the following:
 - GPS
 - microSD
 - off-board I/O connector with I2C, SPI, GPIO
 - EERPOM
 - PCIe clock generator
 - 1x full-length miniPCIe socket with PCI/USB3 (via mux) and USB2.0
 - 1x half-length miniPCIe socket with USB2.0 and USB3.0
 - USB 3.0 HUB
 - USB Type-C with USB PD Sink capability and peripheral support
 - USB Type-C with USB 3.0 host support

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
3 years agoboard: gateworks: venice: display dram speed
Tim Harvey [Fri, 9 Jun 2023 16:54:01 +0000 (09:54 -0700)] 
board: gateworks: venice: display dram speed

Display dram speed during configuration.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
3 years agoboard: gateworks: venice: assume emmc device for USB boot
Tim Harvey [Fri, 9 Jun 2023 16:51:46 +0000 (09:51 -0700)] 
board: gateworks: venice: assume emmc device for USB boot

When booting from USB (SDP) setup firmware-update environment
for emmc device.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
3 years agoimx8m: beacon: Update MAINTAINER file to include beacon rst files
Adam Ford [Sun, 28 May 2023 19:18:04 +0000 (14:18 -0500)] 
imx8m: beacon: Update MAINTAINER file to include beacon rst files

With variou README files migrated to rst, add them to the
MAINTAINER file for Beacon.

Signed-off-by: Adam Ford <aford173@gmail.com>
3 years agoimx8m: imx8mn-beacon: Migrate README to rst
Adam Ford [Sun, 28 May 2023 19:18:03 +0000 (14:18 -0500)] 
imx8m: imx8mn-beacon: Migrate README to rst

Since U-Boot builds HTML documentation, migrate the contents
of the README file to an rst file which can generate the
proper outputs.

Signed-off-by: Adam Ford <aford173@gmail.com>
3 years agoimx: imx8mn-beacon: Move environment definition to env file
Adam Ford [Sun, 28 May 2023 19:18:02 +0000 (14:18 -0500)] 
imx: imx8mn-beacon: Move environment definition to env file

Instead of cluttering up a header file with a bunch of defines,
move the default environmental variables to a file called
imx8mn_beacon.env and reference it from the defconfigs.

Signed-off-by: Adam Ford <aford173@gmail.com>
3 years agoimx8m: imx8mm-beacon: Migrate README to rst
Adam Ford [Sun, 28 May 2023 19:18:01 +0000 (14:18 -0500)] 
imx8m: imx8mm-beacon: Migrate README to rst

Since U-Boot builds HTML documentation, migrate the contents
of the README file to an rst file which can generate the
proper outputs.

Signed-off-by: Adam Ford <aford173@gmail.com>
3 years agoimx: imx8mm-beacon: Move environment definition to env file
Adam Ford [Sun, 28 May 2023 19:18:00 +0000 (14:18 -0500)] 
imx: imx8mm-beacon: Move environment definition to env file

Instead of cluttering up a header file with a bunch of defines,
move the default environmental variables to a file called
imx8mm_beacon.env and reference it from the defconfig.

Signed-off-by: Adam Ford <aford173@gmail.com>
3 years agoimx8mn-var-som: read eth MAC address from EEPROM
Hugo Villeneuve [Thu, 25 May 2023 21:02:28 +0000 (17:02 -0400)] 
imx8mn-var-som: read eth MAC address from EEPROM

Read ethernet MAC address from EEPROM located on the SOM.

Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
3 years agoarm: dts: imx8mn-var-som: fix PHY detection bug by adding deassert delay
Hugo Villeneuve [Thu, 25 May 2023 21:02:27 +0000 (17:02 -0400)] 
arm: dts: imx8mn-var-som: fix PHY detection bug by adding deassert delay

While testing the ethernet interface on a Variscite symphony carrier
board using an imx8mn SOM with an onboard ADIN1300 PHY (EC hardware
configuration), the ethernet PHY is not detected.

The ADIN1300 datasheet indicate that the "Management interface
active (t4)" state is reached at most 5ms after the reset signal is
deasserted.

The device tree in Variscite custom git repository uses the following
property:

    phy-reset-post-delay = <20>;

Add a new MDIO property 'reset-deassert-us' of 20ms to have the same
delay inside the ethphy node. Adding this property fixes the problem
with the PHY detection.

Note that this SOM can also have an Atheros AR8033 PHY. In this case,
a 1ms deassert delay is sufficient. Add a comment to that effect.

Fixes: c4c1ed68c1e8 ("imx8mn_var_som: Add support for Variscite
VAR-SOM-MX8M-NANO board")

Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
3 years agoimx8mn-var-som: fix non-applied PHY reset-gpios properties
Hugo Villeneuve [Thu, 25 May 2023 21:02:26 +0000 (17:02 -0400)] 
imx8mn-var-som: fix non-applied PHY reset-gpios properties

Select DM_ETH_PHY so that the reset-gpios property of the ethphy node
can be used.

Also select DM_PCA953X, which is needed for resetting the
ethernet PHY on the carrier board via the PCA9534 I/O expander.

Commit 4e5114daf9eb ("imx8mn: synchronise device tree with linux") did
synchronise device tree with linux, which in effect removed obsolete
PHY reset properties and replaced them with new mdio DM
properties. But the commit didn't activate DM_ETH_PHY or DM_PCA953X.

Fixes: 4e5114daf9eb ("imx8mn: synchronise device tree with linux")
Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
3 years agoimx8mn-var-som: read and print SoM infos from eeprom on startup
Hugo Villeneuve [Thu, 25 May 2023 21:02:25 +0000 (17:02 -0400)] 
imx8mn-var-som: read and print SoM infos from eeprom on startup

Enable support to read and display configuration/manufacturing infos
from 4Kbit EEPROM located on SOM board.

Note: CONFIG_DISPLAY_BOARDINFO is automatically selected for ARM arch.

Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
3 years agoimx8m: soc.c: demote some printfs to debug
Rasmus Villemoes [Mon, 22 May 2023 09:27:28 +0000 (11:27 +0200)] 
imx8m: soc.c: demote some printfs to debug

Getting

  Found /vpu_g1@38300000 node
  Modify /vpu_g1@38300000:status disabled
  Found /vpu_g2@38310000 node
  Modify /vpu_g2@38310000:status disabled

etc. on the console on every boot is needlessly verbose. Demote the
"Found ..." lines to debug(), which is consistent with other instances
in soc.c.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agoconfig: xea: Enable DM_SERIAL for the XEA - single binary (SB) u-boot
Lukasz Majewski [Fri, 19 May 2023 10:43:58 +0000 (12:43 +0200)] 
config: xea: Enable DM_SERIAL for the XEA - single binary (SB) u-boot

The single binary version of u-boot for XEA board is used to debrick and
factory programming.

The produced u-boot.sb is a single file, which allows having fully
operational u-boot prompt loaded with imx287 ROM.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
3 years agoconfig: xea: Enable DM_SERIAL for the XEA (imx287 based) board
Lukasz Majewski [Fri, 19 May 2023 10:43:57 +0000 (12:43 +0200)] 
config: xea: Enable DM_SERIAL for the XEA (imx287 based) board

The XEA board now supports the DM_SERIAL feature in u-boot.

The SPL is using the SPL_OF_PLATDATA - i.e. NOT SPL_DM_SERIAL to
reduce the overall size of the SPL binary.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
3 years agoarm: Kconfig: Switch XEA (imx287 based) board to use CONFIG_PL01X_SERIAL
Lukasz Majewski [Fri, 19 May 2023 10:43:56 +0000 (12:43 +0200)] 
arm: Kconfig: Switch XEA (imx287 based) board to use CONFIG_PL01X_SERIAL

The CONFIG_PL011 used by all other ARCH_MX28 based boards is not
supporting DM_SERIAL. Instead, other define - namely CONFIG_PL01X_SERIAL
shall be used by boards supporting DM_SERIAL.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
3 years agoarm: xea: Call spl_early_init() before DM serial console is enabled in SPL
Lukasz Majewski [Fri, 19 May 2023 10:43:55 +0000 (12:43 +0200)] 
arm: xea: Call spl_early_init() before DM serial console is enabled in SPL

The in-spl enabled DM serial console requires the board setup to be
able to parse SPL_OF_PLATDATA based serial driver (pl01x) for the
imx28 based XEA board.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
3 years agoarm: mxs: Prevent serial console init when in very early SPL boot code
Lukasz Majewski [Fri, 19 May 2023 10:43:54 +0000 (12:43 +0200)] 
arm: mxs: Prevent serial console init when in very early SPL boot code

When DM_SERIAL is enabled on mxs (i.e. imx28) platform, the console
early initialization must be postponed until the driver model is
correctly setup.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
3 years agoserial: pl01x: Modify pending callback to test if transmit FIFO is empty
Lukasz Majewski [Fri, 19 May 2023 10:43:53 +0000 (12:43 +0200)] 
serial: pl01x: Modify pending callback to test if transmit FIFO is empty

Before this change the FR_TXFF (Transmit FIFO full) bit (5 in
HW_UARTDBG_FR) has been used to assess if there is still data pending
to be sent via UART.

This approach is problematic, as it may happen that serial is in the
middle of transmission (so the TX FIFO is NOT full anymore) and this
test returns true infinitely. As a result, for example in _serial_flush()
DM serial function we are locked in endless while().

The fix here is to test explicitly if the TX FIFO is empty.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
3 years agoserial: pl01x: Prepare the driver to support SPL_OF_PLATDATA
Lukasz Majewski [Fri, 19 May 2023 10:43:52 +0000 (12:43 +0200)] 
serial: pl01x: Prepare the driver to support SPL_OF_PLATDATA

This commit prepares the pl01x serial driver to be used with
SPL_OF_PLATDATA enabled.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
3 years agoserial: pl01x: Change OF_CONTROL to OF_REAL
Lukasz Majewski [Fri, 19 May 2023 10:43:51 +0000 (12:43 +0200)] 
serial: pl01x: Change OF_CONTROL to OF_REAL

Before this change, building this driver for SPL with enabled SPL_DM_SERIAL
was problematic, as '-Wunused-const-variable=' warning was visible.

Now, the code is only considered when u-boot proper is build.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
3 years agodts: xea: Disable 'clks' node for xea (imx287)
Lukasz Majewski [Fri, 19 May 2023 10:43:50 +0000 (12:43 +0200)] 
dts: xea: Disable 'clks' node for xea (imx287)

As imx28 family of SoCs is NOT supporting the Common Clock Framework (CCF)
the 'clks' property shall NOT be enabled by default.

Without this change u-boot proper before relocation tries to bind driver
(which doesn't exists) for this device. As a result, pre-relocation DTB
parsing is finished with error and the board hangs in a very early stage
of u-boot proper boot process.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
3 years agodts: xea: Remove clocks property from debug UART on XEA
Lukasz Majewski [Fri, 19 May 2023 10:43:49 +0000 (12:43 +0200)] 
dts: xea: Remove clocks property from debug UART on XEA

The imx287 SoC doesn't support common clock framework (CCF), so the
'clocks' property is removed to avoid early (i.e. in SPL) errors when
SPL_OF_PLATDATA is used.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
3 years agodts: xea: Add u-boot specific 'type' property to duart
Lukasz Majewski [Fri, 19 May 2023 10:43:48 +0000 (12:43 +0200)] 
dts: xea: Add u-boot specific 'type' property to duart

The DM_SERIAL implicitly requires CONFIG_PL01X_SERIAL, which
allows support for both serial IP block versions (i.e. PL011 and
PL010).

The decision about used IP block is based on the compatible string,
when DM is used.

In the XEA, the OF_PLATDATA is used to allow usage of serial driver in
the SPL (as the size of SPL is crucial). In this case one cannot extract
the type of IP block from .data field (corresponding to compatible) and
it must be explicitly read at probe from dtoc generated, u-boot specific
property.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
3 years agodts: xea: Enable debug UART support in XEA's SPL (DM_SERIAL)
Lukasz Majewski [Fri, 19 May 2023 10:43:47 +0000 (12:43 +0200)] 
dts: xea: Enable debug UART support in XEA's SPL (DM_SERIAL)

After enabling DM_SERIAL for XEA board, the same serial shall be used
in the SPL (with SPL_OF_PLATDATA support).

Signed-off-by: Lukasz Majewski <lukma@denx.de>
3 years agospl: xea: Provide stub DM driver for imx28 clocks
Lukasz Majewski [Fri, 19 May 2023 10:43:46 +0000 (12:43 +0200)] 
spl: xea: Provide stub DM driver for imx28 clocks

This code fixes following WARNING:
  DTOC    spl/dts/dt-plat.c
fsl_imx28_clkctrl: WARNING: the driver fsl_imx28_clkctrl was not found in the driver list

As imx28 doesn't yet support common clock framework, this prevents from
DTOC warnings during SPL build.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
3 years agodefconfig: xea: Change default spi-nor memory bus to 2
Lukasz Majewski [Fri, 19 May 2023 10:43:45 +0000 (12:43 +0200)] 
defconfig: xea: Change default spi-nor memory bus to 2

After the re-sync with Linux kernel (v6.0) of the XEA DTS
(SHA1: 7d08ddd09b75e7a3c103cc0d0d3ed700287f268e) the alias
for SPI bus, to which SPI-NOR  memory is connected, has changed from
'spi3' to 'spi2'.

To be in sync with current u-boot's xea dts, the default bus number
(which allows running 'sf probe' without any extra parameters given)
has been adjusted.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
3 years agodts: xea: Provide missing FEC required properties (mac0 and reg_fec_3v3)
Lukasz Majewski [Fri, 19 May 2023 10:43:44 +0000 (12:43 +0200)] 
dts: xea: Provide missing FEC required properties (mac0 and reg_fec_3v3)

After the commit (SHA1: 7d08ddd09b75e7a3c103cc0d0d3ed700287f268e) some
u-boot specific XEA FEC related properties have been replaced by ones
from the Linux kernel.

To be more specific - XEA board (and imx287 in general) has built L2
switch connected to FEC, which needs some special treatment.

In u-boot it is handled with 'mac0' node, whereas Linux uses dedicated
switch DTS node.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
3 years agodts: xea: Delete not used in u-boot DTS nodes
Lukasz Majewski [Fri, 19 May 2023 10:43:43 +0000 (12:43 +0200)] 
dts: xea: Delete not used in u-boot DTS nodes

After the re-sync with Linux Kernel's DTS
(SHA1: 7d08ddd09b75e7a3c103cc0d0d3ed700287f268e), the XEA's
descripion has nodes and properties, which are NOT utilized
in the u-boot.

To avoid confusion - those are deleted.

Signed-off-by: Lukasz Majewski <lukma@denx.de>