]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
3 years agoMerge tag 'u-boot-imx-20210616' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
Tom Rini [Wed, 16 Jun 2021 15:18:11 +0000 (11:18 -0400)]
Merge tag 'u-boot-imx-20210616' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

u-boot-imx-20210616
-------------------

- imxrt : fixes, USB, imxrt1020-evk
- imx8m:
fix for verdin-imx8mm
Add conga-QMX8 board
- imx6 :
documentation for pico-imx6:
Add SeeedStudio NPI-IMX6ULL Support
ventana: DM PCI
- imx7d:
added SMEGW01 board

CI : https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/7765

3 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-marvell
Tom Rini [Tue, 15 Jun 2021 12:23:04 +0000 (08:23 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-marvell

- Turris: Fix bootcmd_rescue (Pali)

3 years agoarm: mvebu: turris_{omnia, mox}: ensure running bootcmd_rescue always works
Pali Rohár [Mon, 14 Jun 2021 14:45:58 +0000 (16:45 +0200)]
arm: mvebu: turris_{omnia, mox}: ensure running bootcmd_rescue always works

One of the points of putting the rescue boot command into default
environment is that user can invoke it without physical access to the
board (without having to press the factory reset button), by running
  run bootcmd_rescue
in U-Boot's console.

Therefore we have to ensure that bootcmd_rescue is always set to default
value, regardless of whether the factory reset button was pressed.
Otherwise the variable will be empty for example after upgrade from
previous U-Boot.

Fixes: ec3784d62646 ("arm: mvebu: turris_mox: add support for board rescue mode")
Fixes: 176c3e7760a2 ("arm: mvebu: turris_omnia: support invoking rescue boot from console")
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoMerge tag 'xilinx-for-v2021.07-rc5' of https://source.denx.de/u-boot/custodians/u...
Tom Rini [Fri, 11 Jun 2021 12:29:34 +0000 (08:29 -0400)]
Merge tag 'xilinx-for-v2021.07-rc5' of https://source.denx.de/u-boot/custodians/u-boot-microblaze

Xilinx changes for v2021.07-rc5

zynqmp:
- Fix ANALOG_BUS value after powerup
- Disable EFI_CAPSULE_ON_DISK_EARLY

zynqmp-gqspi:
- Fix write issue

3 years agoarm64: zynqmp: Disable EFI_CAPSULE_ON_DISK_EARLY
Michal Simek [Thu, 10 Jun 2021 12:33:55 +0000 (14:33 +0200)]
arm64: zynqmp: Disable EFI_CAPSULE_ON_DISK_EARLY

Sata/scsi and usb based devices are not started at this stage that's why
disks are not found and early update can't happen.
It is because of deficiency in the UEFI implementation which is not able to
deal with block devices which are added or removed after initialization.

EFI capsule on disk early feature needs to be fixed first to be able to
enable this feature properly.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agospi: zynqmp_gqspi: Fix write issue
Ashok Reddy Soma [Tue, 25 May 2021 12:36:27 +0000 (06:36 -0600)]
spi: zynqmp_gqspi: Fix write issue

Enable manual start in zynqmp_qspi_fill_gen_fifo().
Also enable GQSPI_IXR_GFNFULL_MASK and check for it instead of
GQSPI_IXR_GFEMTY_MASK.

Add dummy write to genfifo register in chipselect.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
3 years agoarm64: zynqmp: Writing correct value to ANALOG_BUS
Adrian Fiergolski [Tue, 8 Jun 2021 10:37:23 +0000 (12:37 +0200)]
arm64: zynqmp: Writing correct value to ANALOG_BUS

The default register configuration after powerup for PSSYSMON_ANALOG_BUS
register is incorrect. Hence, fix this in SPL by writing correct fixed
value. It follows UG1085 chapter 'PS SYSMON Analog_Bus' and reflects commit
sw_apps:zynq ("056ca65d44549ce27f716d423e8dfdefeee7440c")
in Xilinx:embeddedsw[1].

[1] https://github.com/Xilinx/embeddedsw

Signed-off-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
3 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-marvell
Tom Rini [Thu, 10 Jun 2021 17:27:14 +0000 (13:27 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-marvell

- mvebu: Turris MOX misc updates (cmds, rescue mode, LED's etc)
  (Marek)
- mvebu: correct Armada 8K addresses (Heinrich)

3 years agoarm64: mvebu: correct Armada 8K addresses
Heinrich Schuchardt [Tue, 8 Jun 2021 10:00:35 +0000 (12:00 +0200)]
arm64: mvebu: correct Armada 8K addresses

0x04000000- 0x06000000 is reserved memory. We cannot load to anything here.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoarm: mvebu: turris_mox: enable options for Turris network boot
Marek Behún [Mon, 7 Jun 2021 14:34:51 +0000 (16:34 +0200)]
arm: mvebu: turris_mox: enable options for Turris network boot

Enable configuration options to support Turris network boot. This
includes FIT support and some crypto commands.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoarm: mvebu: dts: turris_mox: add nodes for SPI NOR partitions
Marek Behún [Mon, 7 Jun 2021 14:34:50 +0000 (16:34 +0200)]
arm: mvebu: dts: turris_mox: add nodes for SPI NOR partitions

Add nodes for SPI NOR partitions to the device tree of Turris MOX, as
are in Linux' device tree.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoarm: mvebu: configs: turris_mox: add fdtfile default env variable
Marek Behún [Mon, 7 Jun 2021 14:34:49 +0000 (16:34 +0200)]
arm: mvebu: configs: turris_mox: add fdtfile default env variable

Add default fdtfile environment variable with value
marvell/armada-3720-turris-mox.dtb.

This can be useful for some boot scenarios.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoarm: mvebu: turris_mox: start blinking PHY LEDs when entering rescue
Marek Behún [Mon, 7 Jun 2021 14:34:48 +0000 (16:34 +0200)]
arm: mvebu: turris_mox: start blinking PHY LEDs when entering rescue

Configure blinking on ethernet PHY LEDs on the MOX A board when entering
rescue mode via reset button.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoarm: mvebu: turris_mox: add support for board rescue mode
Marek Behún [Mon, 7 Jun 2021 14:34:47 +0000 (16:34 +0200)]
arm: mvebu: turris_mox: add support for board rescue mode

Add necessary config options and board code to support board factory
reset / rescue mode on Turris MOX.

In order to also support invoking rescue mode from U-Boot console,
without having to press the factory reset button, put the rescue command
into `bootcmd_rescue` default environment variable. When factory reset
button is pressed, invoke rescue mode via distroboot by setting
`boot_targets` to `rescue`.

Rescue boot from console can be invoked by running
  run bootcmd_rescue

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoarm: mvebu: dts: turris_mox: add button and LED nodes
Marek Behún [Mon, 7 Jun 2021 14:34:46 +0000 (16:34 +0200)]
arm: mvebu: dts: turris_mox: add button and LED nodes

Add nodes for indicator LED and reset button so that board code can
implement board factory reset mechanism.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agofs/squashfs: fix reading of fragmented files
Joao Marcos Costa [Mon, 17 May 2021 21:20:38 +0000 (18:20 -0300)]
fs/squashfs: fix reading of fragmented files

The fragmented files were not correctly read because of two issues:

- The squashfs_file_info struct has a field named 'comp', which tells if
the file's fragment is compressed or not. This field was always set to
'true' in sqfs_get_regfile_info and sqfs_get_lregfile_info. It should
actually take sqfs_frag_lookup's return value. This patch addresses
these two assignments.

- In sqfs_read, the fragments (compressed or not) were copied to the
output buffer through a for loop which was reading data at the wrong
offset. Replace these loops by equivalent calls to memcpy, with the
right parameters.

I tested this patch by comparing the MD5 checksum of a few fragmented
files with the respective md5sum output in sandbox, considering both
compressed and uncompressed fragments.

Signed-off-by: Joao Marcos Costa <jmcosta944@gmail.com>
Tested-by: Richard Genoud <richard.genoud@posteo.net>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
3 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-usb
Tom Rini [Wed, 9 Jun 2021 12:20:36 +0000 (08:20 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-usb

- dwc2 and cdns3 fixes

3 years agoMerge tag 'efi-2021-07-rc5' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Wed, 9 Jun 2021 12:20:24 +0000 (08:20 -0400)]
Merge tag 'efi-2021-07-rc5' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request for efi-2021-07-rc5

Documentation:

* pinmux and ums man-page

Bug fixes:

* Consider that partition numbers as hexadecimal.
* Avoid a possible NULL dereference in efi_capsule_delete_file().

3 years agomx7d: Add Storopack's SMEGW01 board
Fabio Estevam [Fri, 28 May 2021 13:26:57 +0000 (10:26 -0300)]
mx7d: Add Storopack's SMEGW01 board

Add support for Storopack's SMEGW01 board, which is an
IoT gateway based on the i.MX7D SoC.

Based on the original U-Boot work done by Phytec.

Signed-off-by: Fabio Estevam <festevam@denx.de>
3 years agoimx8mn: configs: add support for distro boot commands
Andrey Zhizhikin [Sun, 2 May 2021 14:32:37 +0000 (16:32 +0200)]
imx8mn: configs: add support for distro boot commands

Supported boot device types in iMX8MN: MMC, DHCP.

Add DISTRO_DEFAULTS config option and include the distro boot command
header file to enable full support of distro boot on i.MX8M Nano EVK (both
DDR and LPDDR derivatives).

Drop previous environment, which was targeting customized boot commands and
boot order.

Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Cc: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
3 years agoimx: Add SeeedStudio NPI-IMX6ULL Support
Navin Sankar Velliangiri [Tue, 18 May 2021 03:33:20 +0000 (09:03 +0530)]
imx: Add SeeedStudio NPI-IMX6ULL Support

CPU:   Freescale i.MX6ULL rev1.1 792 MHz (running at 396 MHz)
CPU:   Industrial temperature grade (-40C to 105C) at 49C
Reset cause: POR
Model: Seeed NPi iMX6ULL Dev Board with NAND
Board: Seeed NPi i.MX6ULL Dev Board
DRAM:  512 MiB
NAND:  512 MiB
MMC:   FSL_SDHC: 0
In:    serial@2020000
Out:   serial@2020000
Err:   serial@2020000
Net:   FEC0

Working:
- Eth0
- MMC/SD
- NAND
- UART 1
- USB host

Signed-off-by: Navin Sankar Velliangiri <navin@linumiz.com>
Note:

Changes in v2:

 * removed unnecessary space in imx6ull-seeed-npi-imx6ull-dev-board.dts file.
 * Used SZ_2M for CONFIG_SYS_MALLOC_LEN size allocation.

3 years agoimx: support for conga-QMX8 board
Oliver Graute [Mon, 31 May 2021 13:50:40 +0000 (15:50 +0200)]
imx: support for conga-QMX8 board

Add i.MX8QM qmx8 congatec board support

U-Boot 2021.07-rc3-00528-gc9a966d9dd (May 31 2021 - 15:21:25 +0200)

CPU:   NXP i.MX8QM RevB A53 at 1200 MHz

Model: Congatec QMX8 Qseven series
Board: conga-QMX8
Build: SCFW 494c97f3, SECO-FW d63fdb21, ATF 09c5cc9
Boot:  SD2
DRAM:  6 GiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... OK
In:    serial@5a060000
Out:   serial@5a060000
Err:   serial@5a060000
switch to partitions #0, OK
mmc2 is current device
Net:
Error: ethernet@5b040000 address not set.
No ethernet found.

Hit any key to stop autoboot:  0

Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Ye Li <ye.li@nxp.com>
Cc: uboot-imx <uboot-imx@nxp.com>
3 years agoarm: imx: imx8mm: correct unrecognized fracpll frequency
Andrey Zhizhikin [Mon, 3 May 2021 07:59:17 +0000 (09:59 +0200)]
arm: imx: imx8mm: correct unrecognized fracpll frequency

Frequency requested by ddrphy_init_set_dfi_clk from fracpll uses MHZ()
macro, which expands the value provided to the Hz range without taking into
account the precise Hz setting. This causes the frequency of 266 MHz not ot
be found in the imx8mm_fracpll_tbl, since it is entered there with a
precise Hz value. This in turn causes the boot hang in SPL, as proper DDR
fracpll frequency cannot be determined.

Correct the value in imx8mm_fracpll_tbl to match the one expanded by
MHZ(266) macro, rounding it down to MHz range only.

Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: "NXP i.MX U-Boot Team" <uboot-imx@nxp.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Ye Li <ye.li@nxp.com>
Fixes: 825ab6b406 ("driver: ddr: Refine the ddr init driver on imx8m")
Reviewed-by: Fabio Estevam <festevam@gmail.com>
3 years agopico-imx6: README: Fix the boot mode settings URL
Fabio Estevam [Thu, 27 May 2021 21:43:06 +0000 (18:43 -0300)]
pico-imx6: README: Fix the boot mode settings URL

The original URL that explains the boot mode setting is no longer
valid.

Update to the new one.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
3 years agoimx: ventana: enable dm support for PCI and FEC ethernet
Tim Harvey [Mon, 3 May 2021 18:21:27 +0000 (11:21 -0700)]
imx: ventana: enable dm support for PCI and FEC ethernet

Enable driver model support for FEC ethernet which allows us to remove
the iomux and board_eth_init function. Replace the toggling of the ethernet
phy reset with dt configuration.

Enable driver model support for PCI which allows us to remove the
eth1000_initialize() call. Additionally enable PCI_INIT_R to scan for
PCI devices on init such as the e1000 that is present on the GW552x.

Convert board_pci_fixup to use dm callback and remove pcidisable env
variable which is not supported for DM_PCI and thus leave PCI always
enabled during init.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
3 years agoarm: imx: imx8mm: clock: make debug output more descriptive
Andrey Zhizhikin [Mon, 3 May 2021 08:02:10 +0000 (10:02 +0200)]
arm: imx: imx8mm: clock: make debug output more descriptive

Clock initialization functionality has ambitious debug messages, which are
printed out when failures are triggered during execution:
- Separate frequency table lookup functions have the the same output that
  makes it impossible to understand which function failed and produced the
  output
- PLL decoding routine has a generic debug statement printed, which does
  not state the actual value failed to be found

Extend the output for both cases with prefixing table lookup functions
output with function name, and report the failed value in PLL decoding
routine.

Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: "NXP i.MX U-Boot Team" <uboot-imx@nxp.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Ye Li <ye.li@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
3 years agoAdd EV-iMX280-NANO-X-MB board
Oleh Kravchenko [Fri, 14 May 2021 21:18:33 +0000 (00:18 +0300)]
Add EV-iMX280-NANO-X-MB board

A simple prototyping board with one microSD port, one Ethernet port,
2 USB ports, I2C, SPI, GPIO, and UART interfaces.

Signed-off-by: Oleh Kravchenko <oleg@kaa.org.ua>
Cc: Stefano Babic <sbabic@denx.de>
3 years agoAdd out4.ru O4-iMX-NANO board
Oleh Kravchenko [Fri, 14 May 2021 21:18:31 +0000 (00:18 +0300)]
Add out4.ru O4-iMX-NANO board

Board designed for quick prototyping and has one microSD port,
2 Ethernet ports, 2 USB ports, I2C, SPI, CAN, RS-485, GPIO,
UART interfaces, and 2 RGB LEDs.

Signed-off-by: Oleh Kravchenko <oleg@kaa.org.ua>
Cc: Stefano Babic <sbabic@denx.de>
3 years agoARM: imx8m: verdin-imx8mm: Increase bootm size to 64 MiB
Marek Vasut [Mon, 17 May 2021 22:40:30 +0000 (00:40 +0200)]
ARM: imx8m: verdin-imx8mm: Increase bootm size to 64 MiB

Uncompressed aarch64 kernel Image are rather large, increase the bootm
size limit to 64 MiB to cater for that.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Cc: Max Krummenacher <max.krummenacher@toradex.com>
Cc: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
3 years agoconfigs: imxrt1050-evk: enable host usb support and its command
Giulio Benetti [Thu, 20 May 2021 14:10:18 +0000 (16:10 +0200)]
configs: imxrt1050-evk: enable host usb support and its command

Now that usb host is supported let's enable it on this board.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
3 years agoARM: dts: imxrt1050-evk: enable usbotg1 node as host
Giulio Benetti [Thu, 20 May 2021 14:10:17 +0000 (16:10 +0200)]
ARM: dts: imxrt1050-evk: enable usbotg1 node as host

Enable usbotg1 port node as host usb.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
3 years agoARM: dts: imxrt1050: add usbotg1, usbphy1 and usbmisc nodes
Giulio Benetti [Thu, 20 May 2021 14:10:16 +0000 (16:10 +0200)]
ARM: dts: imxrt1050: add usbotg1, usbphy1 and usbmisc nodes

Usb is now supported so add all required nodes for it in imxrt1050.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
3 years agousb: ehci-mx6: add support for i.MXRT
Giulio Benetti [Thu, 20 May 2021 14:10:15 +0000 (16:10 +0200)]
usb: ehci-mx6: add support for i.MXRT

Add support for usb1 and usb2 present on i.IMXRT.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
3 years agoclk: imx: clk-imxrt1050: introduce IMXRT1050_CLK_USBOH3
Giulio Benetti [Thu, 20 May 2021 14:10:14 +0000 (16:10 +0200)]
clk: imx: clk-imxrt1050: introduce IMXRT1050_CLK_USBOH3

Usb needs IMXRT1050_CLK_USBOH3 clock to be enabled, so let's add it to
clock driver.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
3 years agoARM: IMXRT: introduce is_imxrt*() macros and get_cpu_rev()
Giulio Benetti [Thu, 20 May 2021 14:10:13 +0000 (16:10 +0200)]
ARM: IMXRT: introduce is_imxrt*() macros and get_cpu_rev()

We need those macros to instruct drivers on how to behave for SoC specific
quirks, so let's add it as done for other i.MX SoCs.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
3 years agoARM: dts: imxrt1020: add gpio5 node to this SoC
Giulio Benetti [Sun, 16 May 2021 21:57:02 +0000 (23:57 +0200)]
ARM: dts: imxrt1020: add gpio5 node to this SoC

i.MXRT1020 supports gpio5, so let's add a node for it.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
3 years agoARM: dts: imxrt1020-evk: move all u-boot, dm-spl to imxrt1020-evk-u-boot.dtsi file
Giulio Benetti [Sun, 16 May 2021 21:57:01 +0000 (23:57 +0200)]
ARM: dts: imxrt1020-evk: move all u-boot, dm-spl to imxrt1020-evk-u-boot.dtsi file

At the moment a lot of u-boot,dm-spl properties are present in board .dts
file but this is not correct since u-boot,dm-spl property is u-boot
specific and must be listed into the separate imrt1020-evk-u-boot.dtsi
file. So let's move every u-boot,dm-spl property present in
imxrt1020-evk.dts to imxrt1020-evk-u-boot.dtsi file.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
3 years agoARM: dts: imxrt1050-evk: move all u-boot, dm-spl to imxrt1050-evk-u-boot.dtsi file
Giulio Benetti [Sun, 16 May 2021 21:57:00 +0000 (23:57 +0200)]
ARM: dts: imxrt1050-evk: move all u-boot, dm-spl to imxrt1050-evk-u-boot.dtsi file

At the moment a lot of u-boot,dm-spl properties are present in board .dts
file but this is not correct since u-boot,dm-spl property is u-boot
specific and must be listed into the separate imrt1050-evk-u-boot.dtsi
file. So let's move every u-boot,dm-spl property present in
imxrt1050-evk.dts to imxrt1050-evk-u-boot.dtsi file.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
3 years agoARM: dts: imxrt1050-evk: remove u-boot,dm-spl
Giulio Benetti [Thu, 13 May 2021 10:19:36 +0000 (12:19 +0200)]
ARM: dts: imxrt1050-evk: remove u-boot,dm-spl

We don't need lcdif to be enable in SPL, so let's remove u-boot,dm-spl.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
3 years agoARM: dts: imxrt1050: set lcdif clocks according to mxsfb driver
Giulio Benetti [Thu, 13 May 2021 10:19:35 +0000 (12:19 +0200)]
ARM: dts: imxrt1050: set lcdif clocks according to mxsfb driver

Lcdif needs both "pix" and "axi" clocks to be enabled so let's add them to
lcdif node.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
3 years agoARM: dts: imxrt1050: move lcdif assigned clock to dtsi
Giulio Benetti [Thu, 13 May 2021 10:19:34 +0000 (12:19 +0200)]
ARM: dts: imxrt1050: move lcdif assigned clock to dtsi

Since we assume pll5 is the default lcdif clock source let's move
assigned-clocks(-parents) properties to .dtsi file.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
3 years agoclk: imx: clk-imxrt1050: introduce LCDIF_PIX and rename LCDIF to LCDIF_APB
Giulio Benetti [Thu, 13 May 2021 10:19:33 +0000 (12:19 +0200)]
clk: imx: clk-imxrt1050: introduce LCDIF_PIX and rename LCDIF to LCDIF_APB

Lcd peripheral needs 2 different gates to be enable to work, so let's
introduce the missing one(LCDIF_PIX) and rename the existing one
(LCDIF_APB).

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
3 years agovideo: mxsfb: add enabling of "disp_axi" clock
Giulio Benetti [Thu, 13 May 2021 10:18:47 +0000 (12:18 +0200)]
video: mxsfb: add enabling of "disp_axi" clock

Some SoC needs "disp_axi" clock to be enabled, so let's try to retrieve it
and enabling. If it fails it gives only a debug(), but this clock as well
as "axi" clock is not mandatory.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
3 years agovideo: mxsfb: add enabling of "axi" clock other than "per" clock
Giulio Benetti [Thu, 13 May 2021 10:18:46 +0000 (12:18 +0200)]
video: mxsfb: add enabling of "axi" clock other than "per" clock

On some SoC mxsfb needs more than one clock gate(actual "per" clock). So
let's introduce "axi" clock that can be provided but it's not mandatory.
This is inspired from linux mxsfb driver. Also let's rename "per" clock to
"pix" clock for compatibility with already existing .dts lcdif nodes
implementation.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
3 years agoconfigs: imxrt1050-evk: enable imx gpt timer as tick-timer
Giulio Benetti [Thu, 13 May 2021 10:18:45 +0000 (12:18 +0200)]
configs: imxrt1050-evk: enable imx gpt timer as tick-timer

Let's enable imx-gpt-timer in imx1050-evk defconfig.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
3 years agoARM: dts: imxrt1050-evk: add device_type = "memory" to memory node
Giulio Benetti [Thu, 13 May 2021 10:18:44 +0000 (12:18 +0200)]
ARM: dts: imxrt1050-evk: add device_type = "memory" to memory node

Now device_type = "memory" is mandatory to allow u-boot to read memory
node, so let's add it to memory node.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
3 years agoARM: dts: imxrt1050-evk-u-boot: make gpt1 present for SPL
Giulio Benetti [Thu, 13 May 2021 10:18:43 +0000 (12:18 +0200)]
ARM: dts: imxrt1050-evk-u-boot: make gpt1 present for SPL

Timer needs to be already enabled in spl, so let's add its node to spl dtb.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
3 years agoARM: dts: imxrt1050-evk: set gpt1 as tick-timer for u-boot
Giulio Benetti [Thu, 13 May 2021 10:18:42 +0000 (12:18 +0200)]
ARM: dts: imxrt1050-evk: set gpt1 as tick-timer for u-boot

Let's set gpt1 as u-boot timer.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
3 years agoARM: dts: imxrt1050-evk: enable gpt1 timer
Giulio Benetti [Thu, 13 May 2021 10:18:41 +0000 (12:18 +0200)]
ARM: dts: imxrt1050-evk: enable gpt1 timer

Enable gpt1 timer.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
3 years agoARM: dts: imxrt1050: add gpt1 node
Giulio Benetti [Thu, 13 May 2021 10:18:40 +0000 (12:18 +0200)]
ARM: dts: imxrt1050: add gpt1 node

Add gpt1 node for using it as timer.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
3 years agoARM: dts: imxrt1050: add node label to osc
Giulio Benetti [Thu, 13 May 2021 10:18:39 +0000 (12:18 +0200)]
ARM: dts: imxrt1050: add node label to osc

Let's add node label to osc to be used as clock source for other nodes.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
3 years agoconfigs: imxrt1020-evk: enable imx gpt timer as tick-timer
Giulio Benetti [Thu, 13 May 2021 10:18:38 +0000 (12:18 +0200)]
configs: imxrt1020-evk: enable imx gpt timer as tick-timer

Let's enable imx-gpt-timer in imx1020-evk defconfig.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
3 years agoARM: dts: imxrt1020-evk: add device_type = "memory" to memory node
Giulio Benetti [Thu, 13 May 2021 10:18:37 +0000 (12:18 +0200)]
ARM: dts: imxrt1020-evk: add device_type = "memory" to memory node

Now device_type = "memory" is mandatory to allow u-boot to read memory
node, so let's add it to memory node.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
3 years agoARM: dts: imxrt1020-evk-u-boot: make gpt1 present for SPL
Giulio Benetti [Thu, 13 May 2021 10:18:36 +0000 (12:18 +0200)]
ARM: dts: imxrt1020-evk-u-boot: make gpt1 present for SPL

Timer needs to be already enabled in spl, so let's add its node to spl dtb.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
3 years agoARM: dts: imxrt1020-evk: set gpt1 as tick-timer for u-boot
Giulio Benetti [Thu, 13 May 2021 10:18:35 +0000 (12:18 +0200)]
ARM: dts: imxrt1020-evk: set gpt1 as tick-timer for u-boot

Let's set gpt1 as u-boot timer.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
3 years agoARM: dts: imxrt1020-evk: enable gpt1 timer
Giulio Benetti [Thu, 13 May 2021 10:18:34 +0000 (12:18 +0200)]
ARM: dts: imxrt1020-evk: enable gpt1 timer

Enable gpt1 timer.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
3 years agoARM: dts: imxrt1020: add gpt1 node
Giulio Benetti [Thu, 13 May 2021 10:18:33 +0000 (12:18 +0200)]
ARM: dts: imxrt1020: add gpt1 node

Add gpt1 node for using it as timer.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
3 years agoARM: dts: imxrt1020: add node label to osc
Giulio Benetti [Thu, 13 May 2021 10:18:32 +0000 (12:18 +0200)]
ARM: dts: imxrt1020: add node label to osc

Let's add node label to osc to be used as clock source for other nodes.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
3 years agotimer: imx-gpt: Add timer support for i.MX SoCs family
Giulio Benetti [Thu, 13 May 2021 10:18:31 +0000 (12:18 +0200)]
timer: imx-gpt: Add timer support for i.MX SoCs family

This timer driver uses GPT Timer (General Purpose Timer) available on
a lot of i.MX SoCs family. This driver deals with both 24Mhz oscillator
as well as peripheral clock.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
[Giulio: added the driver's stub and handled peripheral clock prescaler
setting making driver to work correctly]
Signed-off-by: Jesse Taube <mr.bossman075@gmail.com>
[Jesse: added init, setting prescaler for 24Mhz support and enabling
timer]

3 years agoarm: imxrt: soc: make mpu regions generic
Giulio Benetti [Thu, 13 May 2021 10:18:30 +0000 (12:18 +0200)]
arm: imxrt: soc: make mpu regions generic

This mpu handling works for every i.MXRT SoC that we have, so let's
generalize imxrt1050_region_config to imxrt_region_config.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
3 years agoefi_loader: fix Sphinx warning
Heinrich Schuchardt [Tue, 8 Jun 2021 22:21:24 +0000 (00:21 +0200)]
efi_loader: fix Sphinx warning

Brackets '[' need to be escaped to avoid a build warning

    lib/efi_loader/efi_image_loader.c:223:
    WARNING: Inline strong start-string without end-string.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Masahisa Kojima <masahisa.kojima@linaro.org>
3 years agousb: dwc2: Avoid delay when initializing USB peripheral by dwc2
João Loureiro [Wed, 17 Mar 2021 15:52:21 +0000 (16:52 +0100)]
usb: dwc2: Avoid delay when initializing USB peripheral by dwc2

When `usb start` is called on the terminal, the dwc2 driver will try
to start every USB device as host first, even if it is explicitly
configured as peripheral in the device tree (dr_mode = "peripheral").

So to avoid an unwanted 15 seconds delay when initializing the usb
(one second per channel = 1s x 15), this patch adds a check to the
initialization, and will skip host initialization of the device is
explicitly set as peripheral. The checking is already done similarly
in the `drivers/usb/gadget/dwc2_udc_otg.c` driver.

Signed-off-by: João Loureiro <joaofl@gmail.com>
3 years agoefi_loader: efi_capsule_delete_file() NULL dereference
Heinrich Schuchardt [Wed, 2 Jun 2021 17:28:22 +0000 (19:28 +0200)]
efi_loader: efi_capsule_delete_file() NULL dereference

If opening a file fails, the file handle pointer is not valid and must not
be dereferenced.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years agoefi_loader: partition numbers are hexadecimal
Heinrich Schuchardt [Tue, 25 May 2021 16:00:13 +0000 (18:00 +0200)]
efi_loader: partition numbers are hexadecimal

If we want to address partition 15 of virtio block device 11, we have to
write:

virtio b:f

When calling sprintf() we must use %x for the device and partition numbers.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years agodoc: usage: man-page for ums command
Patrick Delaunay [Fri, 4 Jun 2021 16:51:47 +0000 (18:51 +0200)]
doc: usage: man-page for ums command

Provide a man-page for the ums command - USB Mass Storage.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years agocmd: Add dependency for ums command
Patrick Delaunay [Fri, 4 Jun 2021 16:51:46 +0000 (18:51 +0200)]
cmd: Add dependency for ums command

Add the missing dependency for the command ums:
- CONFIG_BLK: call of blk_* functions in usb_mass_storage.c
- CONFIG_USB_GADGET: required to select CONFIG_USB_FUNCTION_MASS_STORAGE

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years agodoc: usage: man-page for pinmux command
Patrick Delaunay [Wed, 2 Jun 2021 11:56:45 +0000 (13:56 +0200)]
doc: usage: man-page for pinmux command

Provide a man-page for the pinmux command.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
3 years agodoc: usage: reorder commands in index.rst
Patrick Delaunay [Wed, 2 Jun 2021 08:11:19 +0000 (10:11 +0200)]
doc: usage: reorder commands in index.rst

Reorder alphabetically the command in the index of usage
in U-Boot documentation.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-sh
Tom Rini [Tue, 8 Jun 2021 21:46:49 +0000 (17:46 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-sh

- More pinctrl updates

3 years agousb: cdns3: cdns3-ti: Fix clk_get_by_name() to get the correct name
Kishon Vijay Abraham I [Tue, 1 Jun 2021 10:56:16 +0000 (16:26 +0530)]
usb: cdns3: cdns3-ti: Fix clk_get_by_name() to get the correct name

Kernel device tree got updated to use clock name as "ref" instead of
"usb2_refclk". Fix cdns3-ti.c to use the correct name.

Fixes: 70e167495ab2 ("arm: dts: k3-j721e: Sync Linux v5.11-rc6 dts into U-Boot")
Fixes: 6239cc8c4e84 ("arm: dts: k3-j7200: Sync Linux v5.11-rc6 dts into U-Boot")
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
3 years agopinctrl: renesas: Synchronize R-Car Gen2/Gen3 tables with Linux 5.12
Marek Vasut [Mon, 26 Apr 2021 20:04:11 +0000 (22:04 +0200)]
pinctrl: renesas: Synchronize R-Car Gen2/Gen3 tables with Linux 5.12

Synchronize R-Car Gen2/Gen3 pinctrl tables with Linux 5.12,
commit 9f4ad9e425a1 ("Linux 5.12") . This is a rather large
commit, since the macros in sh-pfc.h also got updated, so
all the PFC tables must be updated in lockstep.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
3 years agoPrepare v2021.07-rc4
Tom Rini [Mon, 7 Jun 2021 13:26:39 +0000 (09:26 -0400)]
Prepare v2021.07-rc4

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoconfigs: Resync with savedefconfig
Tom Rini [Mon, 7 Jun 2021 12:09:35 +0000 (08:09 -0400)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoMerge tag 'u-boot-rockchip-20210606' of https://source.denx.de/u-boot/custodians...
Tom Rini [Mon, 7 Jun 2021 11:22:14 +0000 (07:22 -0400)]
Merge tag 'u-boot-rockchip-20210606' of https://source.denx.de/u-boot/custodians/u-boot-rockchip

3 years agoMerge tag 'dm-pull-6jun21' of https://source.denx.de/u-boot/custodians/u-boot-dm
Tom Rini [Sun, 6 Jun 2021 17:00:23 +0000 (13:00 -0400)]
Merge tag 'dm-pull-6jun21' of https://source.denx.de/u-boot/custodians/u-boot-dm

Minor fixes for sandbox and handling of dm-ranges

3 years agoMerge tag 'video-for-2021-07-rc3' of https://source.denx.de/u-boot/custodians/u-boot...
Tom Rini [Sat, 5 Jun 2021 15:17:55 +0000 (11:17 -0400)]
Merge tag 'video-for-2021-07-rc3' of https://source.denx.de/u-boot/custodians/u-boot-video

 - disable legacy video for brxre1, mx28evk, pico-imx6ul,
   pxm2 and rut boards after DM_VIDEO conversion deadline

3 years agotest: add dm_test_read_resource
Patrick Delaunay [Fri, 21 May 2021 10:25:00 +0000 (12:25 +0200)]
test: add dm_test_read_resource

Add a test of dev_read_resource with translation or without translation

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agonet: luton: remove address translation after ofnode_read_resource
Patrick Delaunay [Fri, 21 May 2021 10:24:59 +0000 (12:24 +0200)]
net: luton: remove address translation after ofnode_read_resource

Removed call of ofnode_translate_address() after ofnode_read_resource
in luton_switch.c:luton_probe(); it is unnecessary since
the commit feb7ac457c20 ("dm: core: Add address translation in
fdt_get_resource").

Fixes: feb7ac457c20 ("dm: core: Add address translation in fdt_get_resource")
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reported-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
3 years agopwm: cros_ec: Rename "priv_auto_alloc_size" to "priv_auto"
Alper Nebi Yasak [Fri, 14 May 2021 13:48:40 +0000 (16:48 +0300)]
pwm: cros_ec: Rename "priv_auto_alloc_size" to "priv_auto"

With commit 41575d8e4c33 ("dm: treewide: Rename auto_alloc_size members
to be shorter") "priv_auto_alloc_size" was renamed to "priv_auto". This
driver was sent to the mailing list before that change, merged after it,
and still has the old form. Apply the rename here as well.

Fixes: 1b9ee2882e6b ("pwm: Add a driver for Chrome OS EC PWM")
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agosandbox: correct determination of the text base
Heinrich Schuchardt [Sat, 15 May 2021 17:29:13 +0000 (19:29 +0200)]
sandbox: correct determination of the text base

os_find_text_base() assumes that first line of /proc/self/maps holds
information about the text. Hence we must call the function before calling
os_malloc() which calls mmap(0x10000000,).

Failure to do so has led to incorrect values for pc_reloc when an
exception was reported

    => exception undefined

    Illegal instruction
    pc = 0x5628d82e9d3c, pc_reloc = 0x5628c82e9d3c

as well as incorrect output of the bdinfo command

    => bdinfo
    relocaddr   = 0x0000000007858000
    reloc off   = 0x0000000010000000

Fixes: b308d9fd18fa ("sandbox: Avoid using malloc() for system state")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoof: addr: Remove call to dev_count_cells() in of_get_address()
Bin Meng [Fri, 30 Apr 2021 13:16:59 +0000 (21:16 +0800)]
of: addr: Remove call to dev_count_cells() in of_get_address()

In of_get_address(), there is:

  dev_count_cells(dev, &na, &ns);

followed by:

  bus->count_cells(dev, &na, &ns);

but no codes in between use na/ns, hence the first call is useless.
By dropping the first call, dev_count_cells() is now useless too.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoof: addr: Translate 'dma-ranges' for parent nodes missing 'dma-ranges'
Bin Meng [Fri, 30 Apr 2021 13:16:58 +0000 (21:16 +0800)]
of: addr: Translate 'dma-ranges' for parent nodes missing 'dma-ranges'

'dma-ranges' frequently exists without parent nodes having 'dma-ranges'.
While this is an error for 'ranges', this is fine because DMA capable
devices always have a translatable DMA address. Also, with no
'dma-ranges' at all, the assumption is that DMA addresses are 1:1 with
no restrictions unless perhaps the device itself has implicit
restrictions.

This keeps in sync with Linux kernel commit:

  81db12ee15cb: of/address: Translate 'dma-ranges' for parent nodes missing 'dma-ranges'

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agopico-imx6ul: disable video after DM_VIDEO conversion deadline
Anatolij Gustschin [Mon, 24 May 2021 15:31:26 +0000 (17:31 +0200)]
pico-imx6ul: disable video after DM_VIDEO conversion deadline

These boards were not converted to DM_VIDEO before deadline,
so disable video support for now.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Richard Hu <richard.hu@technexion.com>
Cc: Fabio Estevam <festevam@gmail.com>
3 years agobrxre1: disable video after DM_VIDEO conversion deadline
Anatolij Gustschin [Mon, 24 May 2021 15:19:56 +0000 (17:19 +0200)]
brxre1: disable video after DM_VIDEO conversion deadline

The board was not converted to DM_VIDEO before deadline, so disable
video support for now.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
3 years agomx28evk: disable video after DM_VIDEO conversion deadline
Anatolij Gustschin [Mon, 24 May 2021 14:45:29 +0000 (16:45 +0200)]
mx28evk: disable video after DM_VIDEO conversion deadline

The board was not converted to DM_VIDEO before deadline, so disable
video support for now.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
3 years agosiemens: pxm2: disable video after DM_VIDEO conversion deadline
Anatolij Gustschin [Mon, 24 May 2021 14:35:57 +0000 (16:35 +0200)]
siemens: pxm2: disable video after DM_VIDEO conversion deadline

The board was not converted to DM_VIDEO before deadline, so disable
video support for now.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
3 years agosiemens: rut: disable video after DM_VIDEO conversion deadline
Anatolij Gustschin [Mon, 24 May 2021 14:26:51 +0000 (16:26 +0200)]
siemens: rut: disable video after DM_VIDEO conversion deadline

The board was not converted to DM_VIDEO before deadline, so disable
video support for now.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
3 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-marvell
Tom Rini [Fri, 4 Jun 2021 13:34:21 +0000 (09:34 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-marvell

- mvebu: a37xx: PCI related enhancements and fixes (Pali)
- mvebu: turris_omnia: Board specific updates, e.g. rescue
  boot cmd etc (Marek)

3 years agoarm: mvebu: turris_omnia: support invoking rescue boot from console
Marek Behún [Fri, 28 May 2021 08:00:49 +0000 (10:00 +0200)]
arm: mvebu: turris_omnia: support invoking rescue boot from console

Make it possible to invoke rescue boot from U-Boot console, without
having to press the factory reset button. This is needed when accessing
the device remotely, for example.

Achieve this by putting rescue command into `bootcmd_rescue` default
environment variable and setting some distroboot environment variables
to their default values when the factory button is pressed.

Rescue boot from console can be invoked by running
  run bootcmd_rescue

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoarm: mvebu: turris_omnia: update rescue mode boot command
Marek Behún [Fri, 28 May 2021 08:00:48 +0000 (10:00 +0200)]
arm: mvebu: turris_omnia: update rescue mode boot command

Update rescue mode boot command on Turris Omnia. We are compressing the
image with lzma now.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoarm: a37xx: pci: Fix configuring PCIe resources
Pali Rohár [Wed, 26 May 2021 15:59:40 +0000 (17:59 +0200)]
arm: a37xx: pci: Fix configuring PCIe resources

The `ranges` DT property of the PCIe node is currently ignored by
Aardvark driver - all entries are used as transparent PCIe MEM, despite
some of them being defined for IO in DT.

This is because the driver does not setup PCIe outbound windows and thus
a default configuration is used.

This can cause an external abort on CPU when a device driver tries to
access non-MEM space.

Setup the PCIe windows according to the `ranges` property for all
non-MEM resources (currently only IO) and also non-transparent MEM
resources.

Because Linux expects that bootloader does not setup Aardvark PCIe
windows, disable them before booting Linux.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoarm: a37xx: pci: Increase PCIe MEM size from 16 MiB to 127 MiB
Pali Rohár [Wed, 26 May 2021 15:59:39 +0000 (17:59 +0200)]
arm: a37xx: pci: Increase PCIe MEM size from 16 MiB to 127 MiB

For some configurations with more PCIe cards and PCIe bridges, 16 MiB of
PCIe MEM space may not be enough. Since TF-A already allocates a 128 MiB
CPU window for PCIe, and since IO port space is only 64 KiB in total,
use all the remaining space (64 + 32 + 16 + 8 + 4 + 2 + 1 = 127 MiB) for
PCIe MEM.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoarm: a37xx: pci: Fix a3700_fdt_fix_pcie_regions() function
Pali Rohár [Wed, 26 May 2021 15:59:38 +0000 (17:59 +0200)]
arm: a37xx: pci: Fix a3700_fdt_fix_pcie_regions() function

Current version of this function uses a lot of incorrect assumptions about
the `ranges` DT property:

 * parent(#address-cells) == 2
 * #size-cells == 2
 * number of entries == 2
 * address size of first entry == 0x1000000
 * second child address entry == base + 0x1000000

Trying to increase PCIe MEM space to more than 16 MiB leads to an overlap
with PCIe IO space, and trying to define additional MEM space (as a third
entry in the `ranges` DT property) causes U-Boot to crash when booting the
kernel.

  ## Flattened Device Tree blob at 04f00000
     Booting using the fdt blob at 0x4f00000
     Loading Device Tree to 000000001fb01000, end 000000001fb08f12 ... OK
  ERROR: board-specific fdt fixup failed: <unknown error>
   - must RESET the board to recover.

Fix a3700_fdt_fix_pcie_regions() to properly parse and update all addresses
in the `ranges` property according to
https://elinux.org/Device_Tree_Usage#PCI_Address_Translation

Now it is possible to increase PCIe MEM space from 16 MiB to maximal value
of 127 MiB.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Fixes: cb2ddb291ee6 ("arm64: mvebu: a37xx: add device-tree fixer for PCIe regions")
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoarm: a37xx: pci: Find PCIe controller node by compatible instead of path
Pali Rohár [Wed, 26 May 2021 15:59:37 +0000 (17:59 +0200)]
arm: a37xx: pci: Find PCIe controller node by compatible instead of path

Find PCIe DT node by compatible string instead of retrieving it by using
hardcoded DT path.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoarm: a37xx: pci: Fix DT compatible string to Linux' DT compatible
Pali Rohár [Wed, 26 May 2021 15:59:36 +0000 (17:59 +0200)]
arm: a37xx: pci: Fix DT compatible string to Linux' DT compatible

Change DT compatible string for A3700 PCIe from 'marvell,armada-37xx-pcie'
to 'marvell,armada-3700-pcie' to make U-Boot A3700 PCIe DT node compatible
with Linux' DT node.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoarm: a37xx: pci: Disable bus mastering when unloading driver
Pali Rohár [Wed, 26 May 2021 15:59:35 +0000 (17:59 +0200)]
arm: a37xx: pci: Disable bus mastering when unloading driver

Disable Root Bridge I/O space, memory space and bus mastering in Aardvark's
remove method, which is called before booting Linux kernel.

This ensures that PCIe device which was initialized and used by U-Boot
cannot do new DMA transfers until Linux initializes PCI subsystem and loads
appropriate drivers for the device.

During initialization of PCI subsystem Linux in fact disables this bus
mastering on Root Bridge (and later enables it when driver is loaded and
configured), but there is a possibility of a small window after U-Boot
boots Linux when bus mastering is enabled, which is not correct.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoarm: a37xx: pci: Don't put link into LTSSM Recovery state during probe
Pali Rohár [Wed, 26 May 2021 15:59:34 +0000 (17:59 +0200)]
arm: a37xx: pci: Don't put link into LTSSM Recovery state during probe

During our debugging of the Aardvark driver in Linux we have discovered
that the PCIE_CORE_LINK_CTRL_STAT_REG register in fact controls standard
PCIe Link Control Register for PCIe Root Bridge. This led us to discover
that the name of the PCIE_CORE_LINK_TRAINING macro and the corresponding
comment by this macro's usage is misleading; this bit in fact controls
Retrain Link, which, according to PCIe base spec is defined as:

  A write of 1b to this bit initiates Link retraining by directing the
  Physical Layer LTSSM to the Recovery state. If the LTSSM is already in
  Recovery or Configuration, re-entering Recovery is permitted but not
  required.

Entering Recovery state is normally done from LTSSM L0, L0s and L1 states.
But since the pci-aardvark.c driver enables Link Training just a few lines
above, the controller is not in L0 ready state yet. So setting aardvark bit
PCIE_CORE_LINK_TRAINING does not actually enter Recovery state at this
place.

Moreover, trying to enter LTSSM Recovery state without other configuration
is causing issues for some cards (e.g. Atheros AR9xxx and QCA9xxx). Since
Recovery state is not entered, these issues are not triggered.

Remove code which tries to enter LTSSM Recovery state completely.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agofastboot: Fix overflow when calculating chunk size
Sean Anderson [Thu, 27 May 2021 16:02:34 +0000 (12:02 -0400)]
fastboot: Fix overflow when calculating chunk size

If a chunk was larger than 4GiB, then chunk_data_sz would overflow and
blkcnt would not be calculated correctly. Upgrade it to a u64 and cast
its multiplicands as well. Also fix bytes_written while we're at it.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
3 years agoMAINTAINERS: Update maintainer's mail address
Kever Yang [Tue, 30 Mar 2021 10:02:07 +0000 (18:02 +0800)]
MAINTAINERS: Update maintainer's mail address

Philipp has change the mail and the legacy one is not available, update it
to the new one.

CC: Philipp Tomsich <philipp.tomsich@vrull.eu>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
3 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Mon, 31 May 2021 14:19:14 +0000 (10:19 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv

- SiFive FU740 and Unmatched support