]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
4 years agodwc3: versal: Correct the logic for GFLADJ adjustment
Ashok Reddy Soma [Thu, 26 Sep 2019 11:31:00 +0000 (05:31 -0600)] 
dwc3: versal: Correct the logic for GFLADJ adjustment

This patch corrects the logic used for adjusting GFLADJ register.

Currently during phy initialization, USB core reset is happening.
Because of reset USB GFLADJ register is getting restored to default
values. This patch updates the GFADJ[21:8] & GFLADJ[5:0] bits if
they are not equal to the requested value from dts.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: pending

4 years agousb: dwc3: Increase the timeout for generic commands
Siva Durga Prasad Paladugu [Wed, 13 Apr 2016 11:57:25 +0000 (17:27 +0530)] 
usb: dwc3: Increase the timeout for generic commands

Increase the response timeout for generic commands
for handling worst case scenarios

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: pending

4 years agozynq: cfi: Fix nor issue for Zynq
Siva Durga Prasad Paladugu [Tue, 18 Jul 2017 07:21:31 +0000 (12:51 +0530)] 
zynq: cfi: Fix nor issue for Zynq

There is a hack needed in cfi_flash.c for zynq
This patch adds back the same through defconfig
to get NOR working on zynq.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: not-upstreamable

4 years agotest: py: Detect case when card is not present in the slot
Michal Simek [Wed, 6 May 2020 07:28:41 +0000 (09:28 +0200)] 
test: py: Detect case when card is not present in the slot

This is cover cases where the same tests run on qemu and card is not wired.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: pending

4 years agopy: tests: Mark mdio/mmc tests as xfail
Michal Simek [Tue, 5 May 2020 08:53:12 +0000 (10:53 +0200)] 
py: tests: Mark mdio/mmc tests as xfail

Mdio/mmc tests depend on platform setup. That's why it can fail on qemu
target checked by travis. Similar change was done by commit 4e8d5fdbbe92
("py: tests: Mark mii tests as xfail").

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: pending

4 years agopy/test: Fix xilinx i2c eeprom test
Michal Simek [Thu, 5 Mar 2020 07:29:37 +0000 (08:29 +0100)] 
py/test: Fix xilinx i2c eeprom test

By converting Zynq boards to generic configuration there is no longer
option to use marking like "@pytest.mark.boardspec("zynq_zc706")" to run
certain tests.
That's why change this code to look for device specification what to test.

Here is setup for zc706

env__i2c_eeprom_device_test = {
"bus": 3,
"eeprom_addr": 0x54,
}

Variable env__i2c_device_test_skip is completely removed because logic has
changed.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: pending

4 years agotest: py: Add py-test case for test command
T Karthik Reddy [Tue, 2 Jul 2019 11:00:34 +0000 (16:30 +0530)] 
test: py: Add py-test case for test command

This patch adds py-test case for test command.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
State: pending

4 years agopytest: zynqmp: secure: Add pytest for zynqmp secure command
Siva Durga Prasad Paladugu [Wed, 28 Feb 2018 07:56:54 +0000 (13:26 +0530)] 
pytest: zynqmp: secure: Add pytest for zynqmp secure command

This patch adds pytest for zynqmp secure command.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: pending

4 years agopytest: Add pytest case for zynqrsa command
Siva Durga Prasad Paladugu [Thu, 3 May 2018 11:15:01 +0000 (16:45 +0530)] 
pytest: Add pytest case for zynqrsa command

This patch adds pytest case for zynqrsa command
This test runs only in bootmodes other than jtag
It tests authentication of images with valid keys
and invalid keys as well.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: pending

4 years agopytest: zynq_aes: Add pytest for zynqaes command
Siva Durga Prasad Paladugu [Tue, 6 Mar 2018 12:07:11 +0000 (17:37 +0530)] 
pytest: zynq_aes: Add pytest for zynqaes command

This patch adds pytest for zynqaes commands. It tests
loading encrypted image back to DDR and tests loading
encrypted bitstream to PL using "zynqaes load" command.
This test needs to be executed only in bootmode, if not it
wil be skipped.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: pending

4 years agopy: test: Add simple sata test for zcu102
Michal Simek [Tue, 16 Jan 2018 14:43:51 +0000 (15:43 +0100)] 
py: test: Add simple sata test for zcu102

Sata is supported on zcu102. It is testing proper serdes setting from
psu_init* and also at least HDD detection.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: pending

4 years agotest/py: Add basic QSPI testing
Michal Simek [Wed, 16 Mar 2016 22:05:39 +0000 (23:05 +0100)] 
test/py: Add basic QSPI testing

This is the first attempt how to test qspi.
Detect SPI size. Read it all, random size, erase every block,
write random data with random size and read it back,
erase the whole qspi and at the end load kernel image via tftp
and save it to memory.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: pending

4 years agotest/py: Add support for boot kernel with netboot
Michal Simek [Fri, 29 Apr 2016 13:21:27 +0000 (15:21 +0200)] 
test/py: Add support for boot kernel with netboot

Tested on zc706 and zcu102.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: pending

4 years agotest: pytest: Add pytest support for Nand
Siva Durga Prasad Paladugu [Tue, 30 May 2017 14:49:53 +0000 (20:19 +0530)] 
test: pytest: Add pytest support for Nand

This adds support for nand test cases,ss of now
it adds support for some commands such as info,
bad, erase, read and write.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: pending

4 years agotest/py: Add code for mmc testing
Michal Simek [Mon, 9 May 2016 12:45:54 +0000 (14:45 +0200)] 
test/py: Add code for mmc testing

More partitions are handled.
Save information about saved file to structure.
Also use fs_generic commands to handle files.
Support fat, ext2 and ext4 filesystems.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: pending

4 years agotest: py: Add mtest command
Michal Simek [Tue, 18 Jul 2017 09:33:16 +0000 (11:33 +0200)] 
test: py: Add mtest command

Simply command for running mtest.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: pending

4 years agotest/py: Add basic mii and mdio tests
Michal Simek [Fri, 6 May 2016 11:30:48 +0000 (13:30 +0200)] 
test/py: Add basic mii and mdio tests

Add simple mii and mdio testing functions.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: pending

4 years agotest/py: Add basic i2c tests
Michal Simek [Fri, 6 May 2016 11:31:17 +0000 (13:31 +0200)] 
test/py: Add basic i2c tests

This was tested on zcu102.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: pending

4 years agopy: test_gpio: Add support for GPIO pytest
Vipul Kumar [Tue, 12 Sep 2017 12:31:07 +0000 (18:01 +0530)] 
py: test_gpio: Add support for GPIO pytest

This patch tests the gpio commands using the
gpio data from boardenv file.

Also one test will show the default status of all the gpio's
supported by the processor.

Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: pending

4 years agotest/py: Add simple dm commands run without checking
Michal Simek [Thu, 14 Jul 2016 13:45:50 +0000 (15:45 +0200)] 
test/py: Add simple dm commands run without checking

Just to make sure that dm commands can operate.
This was problem on Microblaze in past.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: pending

4 years agotest/py: Detect timeout in phy negotiation
Michal Simek [Fri, 29 Apr 2016 11:53:37 +0000 (13:53 +0200)] 
test/py: Detect timeout in phy negotiation

If timeout happen it should be reported as fault.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: pending

4 years agotest/py: Add support for extending timeout for large files
Michal Simek [Fri, 29 Apr 2016 13:52:48 +0000 (15:52 +0200)] 
test/py: Add support for extending timeout for large files

Slow network or big image filesize is not able to be finished
in 30s. Add option to user to extend timeout(in miliseconds).

env__net_tftp_readable_file = {
    'fn': '192.168.0.105:zc706/image.ub',
    'addr': 0x20000000,
    'size': 20484981,
    'crc32': '873a30ae',
    'timeout": 50000,
}

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: pending

4 years agoxilinx: Update github pull request template
Michal Simek [Fri, 11 Oct 2019 09:07:57 +0000 (11:07 +0200)] 
xilinx: Update github pull request template

People are trying to use pull request via github which is not the way how
u-boot patches should be handled. That's why update template with guidance
how to contribute to Xilinx repository.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: not-upstreamable

4 years agommc: zynq_sdhci: Make variables/structure static
Michal Simek [Tue, 1 Dec 2020 13:19:44 +0000 (14:19 +0100)] 
mmc: zynq_sdhci: Make variables/structure static

All these variables/structure are local and should be static.

Issues are reported by sparse:
drivers/mmc/zynq_sdhci.c:49:11: warning: symbol 'zynqmp_iclk_phases' was not declared. Should it be static?
drivers/mmc/zynq_sdhci.c:50:11: warning: symbol 'zynqmp_oclk_phases' was not declared. Should it be static?
drivers/mmc/zynq_sdhci.c:53:11: warning: symbol 'versal_iclk_phases' was not declared. Should it be static?
drivers/mmc/zynq_sdhci.c:54:11: warning: symbol 'versal_oclk_phases' was not declared. Should it be static?
drivers/mmc/zynq_sdhci.c:546:24: warning: symbol 'arasan_ops' was not declared. Should it be static?

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: pending

4 years agommc: zynq_sdhci: Fix kernel doc warnings
Michal Simek [Tue, 1 Dec 2020 12:46:28 +0000 (13:46 +0100)] 
mmc: zynq_sdhci: Fix kernel doc warnings

Fix these kernel doc warnings:
drivers/mmc/zynq_sdhci.c:181: warning: contents before sections
drivers/mmc/zynq_sdhci.c:187: warning: Function parameter or member 'degrees' not described in 'sdhci_zynqmp_sdcardclk_set_phase'
drivers/mmc/zynq_sdhci.c:236: warning: contents before sections
drivers/mmc/zynq_sdhci.c:242: warning: Function parameter or member 'degrees' not described in 'sdhci_zynqmp_sampleclk_set_phase'
drivers/mmc/zynq_sdhci.c:291: warning: contents before sections
drivers/mmc/zynq_sdhci.c:297: warning: Function parameter or member 'degrees' not described in 'sdhci_versal_sdcardclk_set_phase'
drivers/mmc/zynq_sdhci.c:354: warning: contents before sections
drivers/mmc/zynq_sdhci.c:360: warning: Function parameter or member 'degrees' not described in 'sdhci_versal_sampleclk_set_phase'
drivers/mmc/zynq_sdhci.c:467: warning: contents before sections

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: pending

4 years agommc: zynq_sdhci: Fix UHS 1.8v switching with 5ms delay
Ashok Reddy Soma [Mon, 30 Nov 2020 15:08:47 +0000 (08:08 -0700)] 
mmc: zynq_sdhci: Fix UHS 1.8v switching with 5ms delay

SD3.0 spec needs 5ms delay after host controller switches to 1.8v.
Remove the clock disable/enable logic from sdhci.c and add 5ms delay.

Return if clock is disabled from set_ios() so that we dont touch
anything else.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
State: pending

4 years agommc: zynq_sdhci: Split set_tapdelay function to in and out
Ashok Reddy Soma [Mon, 30 Nov 2020 15:08:45 +0000 (08:08 -0700)] 
mmc: zynq_sdhci: Split set_tapdelay function to in and out

Split arasan_zynqmp_set_tapdelay() to handle input and output tapdelays
separately. This is required to handle zero values for ITAP and OTAP
values. If we dont split, we will have to remove the if() in the
function, which makes ITAP values to be overwritten when OTAP values are
called to set and vice-versa.

Restrict tap_delay value calculated to max allowed 8 bits for ITAP and 6
bits for OTAP for ZynqMP.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
State: pending

4 years agommc: zynq_sdhci: Use Mask writes for Tap delays
Ashok Reddy Soma [Mon, 30 Nov 2020 15:08:44 +0000 (08:08 -0700)] 
mmc: zynq_sdhci: Use Mask writes for Tap delays

Restrict tap_delay value to the allowed size(8bits for itap and 6 bits
for otap) before writing to the tap delay register.

Clear ITAP and OTAP delay bits before updating with the new tap value
for Versal platform.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
State: pending

4 years agommc: zynq_sdhci: Allow configuring zero Tap values
Ashok Reddy Soma [Mon, 30 Nov 2020 15:08:43 +0000 (08:08 -0700)] 
mmc: zynq_sdhci: Allow configuring zero Tap values

Allow configuring ITAP and OTAP values with zero to avoid failures in
some cases (one of them is SD boot mode). Legacy, SDR12 modes require
to program the ITAP and OTAP values as zero, whereas for SDR50 and SDR104
modes ITAP value is zero.

In SD boot mode firmware configures the SD ITAP and OTAP values and
in this case u-boot has to re-configure required tap values(including zero)
based on the operating mode.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
State: pending

4 years agommc: zynq_sdhci: Resolve uninitialized return value
Ashok Reddy Soma [Mon, 30 Nov 2020 15:08:42 +0000 (08:08 -0700)] 
mmc: zynq_sdhci: Resolve uninitialized return value

set_phase() functions are not modifying the ret value and returning
the same uninitialized ret, return 0 instead.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
State: pending

4 years agoenv: Remove all dependencies for SYS_REDUNDAND_ENVIRONMENT
Michal Simek [Wed, 13 Jan 2021 09:25:50 +0000 (10:25 +0100)] 
env: Remove all dependencies for SYS_REDUNDAND_ENVIRONMENT

CONFIG_SYS_REDUNDAND_ENVIRONMENT is changing in env_internal.h how u-boot
works with variables. struct environment_s has one byte flags property
which also affects ENV_SIZE macro.

I have reached the case where CONFIG_ENV_IS_NOWHERE is default setup
but custom scripts can be designed in a way that u-boot is asked to
import/export variables from/to file which can be in certain format.
That's why also for this configuration make sense to enable
CONFIG_SYS_REDUNDAND_ENVIRONMENT because it depends on environment file
format.

The patch is removing dependency on this configuration to support selecting
environment file format without any specific dependency where variables are
stored.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
State: upstream (4e3fc5efeb70857ef2f9a2afd0a587c032c9a07b)

4 years agoxilinx: common: Fix CONFIG_XILINX_OF_BOARD_DTB_ADDR handling for ZynqMP
Michal Simek [Tue, 2 Feb 2021 12:33:22 +0000 (13:33 +0100)] 
xilinx: common: Fix CONFIG_XILINX_OF_BOARD_DTB_ADDR handling for ZynqMP

Fix bug introduced by commit listed below. It is for cases where Versal or
ZynqMP don't have DDR mapped. Later SPL was also excluded by
commit a672b9871b57 ("xilinx: common: Do not touch
CONFIG_XILINX_OF_BOARD_DTB_ADDR in SPL").

Fixes: 506009fc1022 ("xilinx: common: Change macro handling in board_fdt_blob_setup()")
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lists.denx.de/pipermail/u-boot/2021-February/439592.html
State: waiting

4 years agoxilinx: common: Do not touch CONFIG_XILINX_OF_BOARD_DTB_ADDR in SPL
Michal Simek [Mon, 4 Jan 2021 10:07:28 +0000 (11:07 +0100)] 
xilinx: common: Do not touch CONFIG_XILINX_OF_BOARD_DTB_ADDR in SPL

This hook is used in full U-Boot that's why there is no reason to touch
this location from SPL. The hook was introduced for QEMU usage but none is
really running SPL on QEMU that's why it shouldn't break any usecase.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: upstream (a672b9871b57fa1f1e86faa33360a49e218b9c57)

4 years agoxilinx: common: Change macro handling in board_fdt_blob_setup()
Michal Simek [Mon, 4 Jan 2021 10:03:36 +0000 (11:03 +0100)] 
xilinx: common: Change macro handling in board_fdt_blob_setup()

Remove ifdef logic which is handled by preprocessor and move it link time
optimization to get full compile code coverage.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: upstream (506009fc1022d5b883e95502e1c5dc38ac1da127)

4 years agoxilinx: zynqmp: Save bootseq number for SD/EMMC boot modes
Michal Simek [Mon, 11 Jan 2021 12:46:58 +0000 (13:46 +0100)] 
xilinx: zynqmp: Save bootseq number for SD/EMMC boot modes

For systems which has both sdhci controllers enable it is worth to export
bootseq number for variables. Then the variable can be used in custom
scripts to tune logic for OS.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: upstream (2784befbd7ef21b77ad246ce258f06e4aa711d81)

4 years agoarm64: zynqmp: Enable seps and related video configs
Michal Simek [Thu, 7 Jan 2021 13:05:23 +0000 (14:05 +0100)] 
arm64: zynqmp: Enable seps and related video configs

Enable this driver to get build and probe for our platform.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
State: upstream (7f2d57a29710d4bbef3e4c9febd3dbbfa21cca3e)

4 years agovideo: Call video_sync in video_clear()
Michal Simek [Tue, 15 Dec 2020 14:12:09 +0000 (15:12 +0100)] 
video: Call video_sync in video_clear()

There is a need to call sync when anybody asking for clearing display.
For example via cls command.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
State: upstream (5337663e5beb47e6dfe757417452a9e5de8128a1)

4 years agovideo: seps525: Add seps525 SPI driver
Michal Simek [Thu, 3 Dec 2020 08:31:35 +0000 (09:31 +0100)] 
video: seps525: Add seps525 SPI driver

Add support for the WiseChip Semiconductor Inc. (UG-6028GDEBF02) display
using the SEPS525 (Syncoam) LCD Controller. Syncoam Seps525 PM-Oled is RGB
160x128 display. This driver has been tested through zynq-spi driver.

ZynqMP> load mmc 1 100000 rainbow.bmp
61562 bytes read in 20 ms (2.9 MiB/s)
ZynqMP> bmp info 100000
Image size    : 160 x 128
Bits per pixel: 24
Compression   : 0
ZynqMP> bmp display 100000
ZynqMP> setenv stdout vidconsole

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
State: upstream (b66d7af41f333f3fc960a18714d25474c512bcaa)

4 years agovideo: seps525: Add dt binding description
Vikhyat Goyal [Wed, 2 Dec 2020 22:21:51 +0000 (15:21 -0700)] 
video: seps525: Add dt binding description

Added dt binding for seps525 display driver.

Signed-off-by: Vikhyat Goyal <vikhyat.goyal@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
State: upstream (1ac1a04b9ed809e8f9510f6ec6b4d4b9139984c0)

4 years agovideo: Introduce video_sync operation
Michal Simek [Thu, 3 Dec 2020 08:30:00 +0000 (09:30 +0100)] 
video: Introduce video_sync operation

Some drivers like LCD connected via SPI requires explicit sync function
which copy framebuffer content over SPI to controller to display.
This hook doesn't exist yet that's why introduce it via video operations.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
State: upstream (9d69c2d9a8eb27bfa2ac0ac1a0fc779f5eccb49b)

4 years agovideo: Let video_sync to return error value
Michal Simek [Mon, 14 Dec 2020 07:47:52 +0000 (08:47 +0100)] 
video: Let video_sync to return error value

This patch is preparation for follow up one to support cases where
synchronization can fail.

Suggested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
State: upstream (9de731f295c5f1aa0f55f30b076b94f9cb72428e

4 years agovideo: Fix video sync kernel-doc format
Michal Simek [Mon, 14 Dec 2020 08:14:03 +0000 (09:14 +0100)] 
video: Fix video sync kernel-doc format

Place description below function parameters to make kernel-doc stript
happy. Also rename dev to vid to be aligned with function parameters.

Fixes: 1acafc73bfc7 ("dm: video: Add a video uclass")
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
State: upstream (17da310ac41424f056af3a88a0ff081925a027ff)

4 years agofru: ops: avoid out of bounds access
Heinrich Schuchardt [Sun, 3 Jan 2021 17:07:53 +0000 (18:07 +0100)] 
fru: ops: avoid out of bounds access

Building xilinx_zynq_virt_defconfig fails on origin/next as reported by
GCC 10.2 (as provided by Debian Bullseye):

  CC      board/xilinx/common/fru_ops.o
board/xilinx/common/fru_ops.c: In function ‘fru_capture’:
board/xilinx/common/fru_ops.c:173:8:
error: array subscript 284 is outside array bounds of
‘struct fru_table[1]’ [-Werror=array-bounds]
  173 |  limit = data + sizeof(struct fru_board_data);
      |  ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
board/xilinx/common/fru_ops.c:17:18: note: while referencing ‘fru_data’
   17 | struct fru_table fru_data __section(.data);
      |                  ^~~~~~~~

When using sizeof(struct fru_board_data) to find the end of the structure
you should add it to the start of the structure.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: upstream (b6d14c52f91b57367e7bd8499c963b74fb74b41e)

4 years agozynq: mtd: nand: remove superfluous if
Heinrich Schuchardt [Sun, 27 Dec 2020 10:28:12 +0000 (11:28 +0100)] 
zynq: mtd: nand: remove superfluous if

This sort of code does not make much sense:

    if (ondie_ecc_enabled) {
        if (ondie_ecc_enabled) {

Remove the inner if.

The problem was indicated by cppcheck.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: upstream (389b45d6b05784c0043bac859666b98a5f704402)

4 years agoarm64: zynqmp: Add Ethernet node for zcu1285 revA
Harini Katakam [Tue, 18 Feb 2020 08:50:18 +0000 (14:20 +0530)] 
arm64: zynqmp: Add Ethernet node for zcu1285 revA

This patch add ethernet node gem1 to zcu1285 RevB.
GMII to RGMII converter sits between MAC and external
phy connected over GMII to MAC and RGMMI to external phy

Signed-off-by: Harini Katakam <harini.katakam@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: upstream (59fbd5c1f80fc730d003dfaa5bd16ad6fe3c04a2)

4 years agoarm64: zynqmp: Add ethernet node for zcu1275 revB
Siva Durga Prasad Paladugu [Fri, 12 Oct 2018 11:25:36 +0000 (16:55 +0530)] 
arm64: zynqmp: Add ethernet node for zcu1275 revB

This patch add ethernet node gem1 to zcu1275 RevB.
GMII to RGMII converter sits between MAC and external
phy connected over GMII to MAC and RGMMI to external phy.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: upstream (59fbd5c1f80fc730d003dfaa5bd16ad6fe3c04a2)

4 years agomicroblaze: Add nor device to distro boot
T Karthik Reddy [Thu, 17 Dec 2020 10:15:56 +0000 (03:15 -0700)] 
microblaze: Add nor device to distro boot

Add parallel nor device to distroboot for microblaze.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: upstream (6b80de790cf95c5e2e3fab57b33a9db1004e4ccb)

4 years agomicroblaze: Set script_offset_nor env variable
T Karthik Reddy [Thu, 17 Dec 2020 10:15:55 +0000 (03:15 -0700)] 
microblaze: Set script_offset_nor env variable

Set script_offset_nor env variable using CONFIG_BOOT_SCRIPT_OFFSET
and nor flash start address to keep bootscript offset configurable.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: upstream (5766429b7c7b71f5cc333b727c569809d5c82d34)

4 years agoarm64: zynqmp: Sync DT with Linux kernel
Michal Simek [Tue, 29 Sep 2020 11:43:22 +0000 (13:43 +0200)] 
arm64: zynqmp: Sync DT with Linux kernel

All changes are recorded in lore.kernel.org. Here are links to that patches
for the record.
Link: https://lore.kernel.org/r/f59a63d8cb941592de6d2dee8afa6f120b2e40c8.1601379794.git.michal.simek@xilinx.com
Link: https://lore.kernel.org/r/68f20a2b2bb0feee80bc3348619c2ee98aa69963.1598263539.git.michal.simek@xilinx.com
Link: https://lore.kernel.org/r/f767fe007e446a2299fda9905e75b723c650a424.1605021644.git.michal.simek@xilinx.com
Link: https://lore.kernel.org/r/cc294ae1a79ef845af6809ddb4049f0c0f5bb87a.1598259551.git.michal.simek@xilinx.com
Link: https://lore.kernel.org/r/20200629081744.13916-1-krzk@kernel.org
And there are other minor changes (just moving things around).

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: upstream (2d381d2fe2d202694d0b201ee81034c486028641)

4 years agoserial: uartlite: Fix uninitialized ret in debug uartlite
Ashok Reddy Soma [Tue, 1 Dec 2020 07:34:47 +0000 (00:34 -0700)] 
serial: uartlite: Fix uninitialized ret in debug uartlite

Endianness detection is checked against uninitialized ret variable.
Assign ret with read value from status register to fix this.

Fixes: 31a359f87eaa ("serial: uartlite: Add support to work with any endianness")
Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
State: upstream (e5e8bbd25a499e65e7403b0b054fe35abe5187b3)

4 years agoPrepare v2021.01 v2021.01
Tom Rini [Mon, 11 Jan 2021 18:11:43 +0000 (13:11 -0500)] 
Prepare v2021.01

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoxea: config: Disable CONFIG_SPL_OF_PLATDATA_PARENT on XEA (imx28)
Lukasz Majewski [Sat, 26 Dec 2020 00:09:02 +0000 (01:09 +0100)] 
xea: config: Disable CONFIG_SPL_OF_PLATDATA_PARENT on XEA (imx28)

On the XEA board (imx28) one needs in the SPL support for GPIO, MMC and
SPI. Two last ones are necessary for booting the device. The GPIO support
allows deciding which medium will be used. For example the GPIO DTS node
(gpio@0 at imx28.dtsi) has pinctrl parent (pinctrl@80018000) for which we
don't need driver asigned for correct operation.
In the spl/dts/dt-platdata.c the gpio@0 has index 4 and its parent -
pinctrl@80018000 has index 5.

In the bind_drivers_pass() function (at drivers/core/lists.c) call to
device_bind_by_name() for `fsl_imx23_pinctrl` returns -2, which is
expected.

With current setup - when the SPL_OF_PLATDATA_PARENT=y
The gpio@0 node with index 4 is skipped as its parent with 5 is not yet
bound. It cannot be as we don't need and provide the driver for it.
As a result the gpio@0 is never bound and we end up with bricked board in
the SPL stage.

When CONFIG_SPL_OF_PLATDATA_PARENT is NOT set, all entries from
spl/dts/dt-platdata.c are scanned in ascending index order, so gpio@0 is
properly initialized. For `fsl_imx_pinctrl` we simply check 10 times if
the driver for is available (which is not) and exit.

As a result the GPIOs are initialized and can be used in early SPL stage.
This commit fixes XEA regression introduced with e41651fffda7da55f6.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoxea: config: Use CONFIG_PREBOOT from Kconfig
Lukasz Majewski [Sat, 26 Dec 2020 00:09:01 +0000 (01:09 +0100)] 
xea: config: Use CONFIG_PREBOOT from Kconfig

The usage of the preboot feature is now controlled via a separate Kconfig
option - namely CONFIG_USE_PREBOOT.
It must be enabled for preboot code executing commands now defined in
CONFIG_PREBOOT (also moved to the Kconfig).

After defining both CONFIG_USE_PREBOOT and CONFIG_PREBOOT in
imx28_xea_defconfig the define of CONFIG_PREBOOT shall be removed from
xea.h as it is redundant.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
4 years agoxea: spl: Disable pull UP for GPIO0_2{35}
Lukasz Majewski [Sat, 26 Dec 2020 00:09:00 +0000 (01:09 +0100)] 
xea: spl: Disable pull UP for GPIO0_2{35}

On the imx287 pin GPMI_WRN (GPIO0_25) no PullUP is available that can be
enabled.

To get the same behavior for both boot select pins (i.e. GPIO0_2{35})
disable pull UPs on both.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
4 years agorockchip: pinebook-pro: default to SPI bus 1 for SPI-flash
Hugh Cole-Baker [Sun, 22 Nov 2020 13:03:44 +0000 (13:03 +0000)] 
rockchip: pinebook-pro: default to SPI bus 1 for SPI-flash

SPI flash on this machine is located on bus 1, default to using bus 1
for SPI flash and stop aliasing it to bus 0.

Signed-off-by: Hugh Cole-Baker <sigmaris@gmail.com>
Suggested-by: Simon Glass <sjg@chromium.org>
Fixes: c4cea2bb ("rockchip: Enable building a SPI ROM image on bob")
4 years agoMerge tag 'u-boot-stm32-20210106' of https://gitlab.denx.de/u-boot/custodians/u-boot-stm
Tom Rini [Wed, 6 Jan 2021 12:48:19 +0000 (07:48 -0500)] 
Merge tag 'u-boot-stm32-20210106' of https://gitlab.denx.de/u-boot/custodians/u-boot-stm

- Fix GPIO hog flags on DHCOM boards

4 years agoARM: dts: stm32: Fix GPIO hog flags on DHCOM DRC02
Marek Vasut [Sat, 2 Jan 2021 16:44:47 +0000 (17:44 +0100)] 
ARM: dts: stm32: Fix GPIO hog flags on DHCOM DRC02

The GPIO hog flags are ignored by gpiolib-of.c now, set the flags to 0.
Since GPIO_ACTIVE_HIGH is defined as 0, this change only increases the
correctness of the DT.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrice Chotard <patrice.chotard@st.com>
Cc: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
4 years agoARM: dts: stm32: Fix GPIO hog flags on DHCOM PicoITX
Marek Vasut [Sat, 2 Jan 2021 16:44:46 +0000 (17:44 +0100)] 
ARM: dts: stm32: Fix GPIO hog flags on DHCOM PicoITX

The GPIO hog flags are ignored by gpiolib-of.c now, set the flags to 0.
Due to a change in gpiolib-of.c, setting flags to GPIO_ACTIVE_LOW and
using output-low DT property leads to the GPIO being set high instead.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrice Chotard <patrice.chotard@st.com>
Cc: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
4 years agoMerge tag 'ti-v2021.01-rc5' of https://gitlab.denx.de/u-boot/custodians/u-boot-ti
Tom Rini [Tue, 5 Jan 2021 21:10:33 +0000 (16:10 -0500)] 
Merge tag 'ti-v2021.01-rc5' of https://gitlab.denx.de/u-boot/custodians/u-boot-ti

- Fix I2C speed for Nokia RX51

4 years agoNokia RX-51: Decrease i2c speed to 100000
Pali Rohár [Sat, 21 Nov 2020 22:30:11 +0000 (23:30 +0100)] 
Nokia RX-51: Decrease i2c speed to 100000

It looks like that i2c bus lot of times timeout on some units. Prior
migration to CONFIG_DM_I2C i2c speed was set to CONFIG_SYS_OMAP24_I2C_SPEED
value which was 100000. Lower speed fixes timeout problems, so change speed
back to its previous value.

Signed-off-by: Pali Rohár <pali@kernel.org>
Fixes: 8d8c18170325 ("Nokia RX-51: Convert to CONFIG_DM_I2C")
Reviewed-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoimage: support board_fit_config_name_match
Sebastian Reichel [Mon, 4 Jan 2021 19:48:04 +0000 (20:48 +0100)] 
image: support board_fit_config_name_match

Support reusing board_fit_config_name_match() to automatically
select a sensible default configuration for booting fitImages
using 'bootm'.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
4 years agoimage: cleanup pre-processor usage
Sebastian Reichel [Mon, 4 Jan 2021 19:48:03 +0000 (20:48 +0100)] 
image: cleanup pre-processor usage

Replace most #ifdef checks for USE_HOSTCC and CONFIG_*
with normal if instructions.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
4 years agoPrepare v2021.01-rc5 v2021.01-rc5
Tom Rini [Tue, 5 Jan 2021 12:30:39 +0000 (07:30 -0500)] 
Prepare v2021.01-rc5

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoMerge branch '2021-01-04-minor-fixes'
Tom Rini [Mon, 4 Jan 2021 14:11:35 +0000 (09:11 -0500)] 
Merge branch '2021-01-04-minor-fixes'

- Assorted fixes

4 years agocosmetic: fix typo in drivers/usb/Kconfig
Marc Ferland [Wed, 23 Dec 2020 15:13:22 +0000 (10:13 -0500)] 
cosmetic: fix typo in drivers/usb/Kconfig

This commit fixes a simple typo: sPL --> SPL.

Signed-off-by: Marc Ferland <ferlandm@amotus.ca>
4 years agocmd: ubi: don't allow to rename a volume to a name that already exist
Philippe Reynes [Wed, 23 Dec 2020 14:33:07 +0000 (15:33 +0100)] 
cmd: ubi: don't allow to rename a volume to a name that already exist

This commits add a check on the command ubi rename. This check avoids
to rename a volume to with a name that is already used on another ubi
volume. If two volumes has the same name, then the ubi device can't be
mounted anymore.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
4 years agomailmap: Update mail address for Igor Opaniuk
Igor Opaniuk [Wed, 30 Dec 2020 17:25:47 +0000 (19:25 +0200)] 
mailmap: Update mail address for Igor Opaniuk

My address at Toradex doesn't exist anymore, map this address
to my personal email.

Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agodoc: android/boot-image: invalid C declaration
Heinrich Schuchardt [Wed, 30 Dec 2020 16:55:22 +0000 (17:55 +0100)] 
doc: android/boot-image: invalid C declaration

make htmldocs results in an error:

doc/android/boot-image.rst:33:
WARNING: Unparseable C cross-reference: 'struct andr_img_hdr'
Invalid C declaration: Expected identifier in nested name, got keyword:
struct [error at 6]

Follow the style prescribed in
https://www.kernel.org/doc/html/latest/doc-guide/kernel-doc.html#highlights-and-cross-references

Add missing definite article.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agonvme: Use only 32-bit accesses in nvme_writeq/nvme_readq
Stefan Agner [Wed, 30 Dec 2020 12:16:36 +0000 (13:16 +0100)] 
nvme: Use only 32-bit accesses in nvme_writeq/nvme_readq

There might be hardware configurations where 64-bit data accesses
to NVMe registers are not supported properly.  This patch removes
the readq/writeq so always two 32-bit accesses are used to read/write
64-bit NVMe registers, similarly as it is done in Linux kernel.

This patch fixes operation of NVMe devices on RPi4 Broadcom BCM2711 SoC
based board, where the PCIe Root Complex, which is attached to the
system through the SCB bridge.

Even though the architecture is 64-bit the PCIe BAR is 32-bit and likely
the 64-bit wide register accesses initiated by the CPU are not properly
translated to a sequence of 32-bit PCIe accesses.
nvme_readq(), for example, always returns same value in upper and lower
32-bits, e.g. 0x3c033fff3c033fff which lead to NVMe devices to fail
probing.

This fix is analogous to commit 8e2ab05000ab ("usb: xhci: Use only
32-bit accesses in xhci_writeq/xhci_readq").

Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Cc: Matthias Brugger <mbrugger@suse.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Stefan Agner <stefan@agner.ch>
4 years agoMerge tag 'efi-2021-01-rc5-2' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Tue, 29 Dec 2020 15:23:58 +0000 (10:23 -0500)] 
Merge tag 'efi-2021-01-rc5-2' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi

Pull request for UEFI sub-system for efi-2021-01-rc5 (2)

The following errors in the UEFI sub-system are fixed:

* use after free in efi_exit()
* invalid free when using the boot manager
* pressing escape key once not recognized

4 years agoefi_loader: use after free in efi_exit()
Heinrich Schuchardt [Mon, 28 Dec 2020 22:24:40 +0000 (23:24 +0100)] 
efi_loader: use after free in efi_exit()

Do not use data from the loaded image object after deleting it.

Fixes: 126a43f15b36 ("efi_loader: unload applications upon Exit()")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: describe struct efi_loaded_image_obj
Heinrich Schuchardt [Mon, 28 Dec 2020 21:42:51 +0000 (22:42 +0100)] 
efi_loader: describe struct efi_loaded_image_obj

Add the missing description of some fields of struct efi_loaded_image_obj.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: efi_signal_event() fix comment typos
Heinrich Schuchardt [Sun, 27 Dec 2020 23:59:09 +0000 (00:59 +0100)] 
efi_loader: efi_signal_event() fix comment typos

Add missing commas.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: avoid invalid free
Heinrich Schuchardt [Sun, 27 Dec 2020 14:46:00 +0000 (15:46 +0100)] 
efi_loader: avoid invalid free

load_options passed from do_efibootmgr() to do_bootefi_exec() may contain
invalid data from the stack which will lead to an invalid free().

Fixes: 0ad64007feb9 ("efi_loader: set load options in boot manager")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: escape key handling
Heinrich Schuchardt [Sun, 27 Dec 2020 13:47:50 +0000 (14:47 +0100)] 
efi_loader: escape key handling

Up to now the escape key was not correctly detected in UEFI applications.
We had to hit it twice for a single escape to be recognized.

Use a 10 ms delay to detect if we are dealing with the escape key or an
escape sequence.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_loader: missing parentheses after if
Heinrich Schuchardt [Sun, 27 Dec 2020 14:33:09 +0000 (15:33 +0100)] 
efi_loader: missing parentheses after if

IS_ENABLED() contains parentheses. But we should still put extra
parentheses around it in an if statement for readability.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoMerge tag 'u-boot-imx-20201227' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
Tom Rini [Mon, 28 Dec 2020 12:44:03 +0000 (07:44 -0500)] 
Merge tag 'u-boot-imx-20201227' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

Fixes for 2021.1
----------------

CI: https://gitlab.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/5680

- fixes for Variscite dart6ul
- imx8mp : increase malloc area
- fixes for bx50v3
- imx8m: HS400ES and UHS for EVK
- imx8qm-rom7720: fix phy bind

4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell
Tom Rini [Mon, 28 Dec 2020 12:43:28 +0000 (07:43 -0500)] 
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell

- Fix "Assert PERST# signal when unloading driver" in a37xx PCI
  driver (Pali)
- Fix SPL on armada-xp-gp (add u-boot,dm-pre-reloc and alias) (myself)

4 years agoRevert "arm64: a37xx: pci: Assert PERST# signal when unloading driver"
Pali Rohár [Wed, 23 Dec 2020 15:07:08 +0000 (16:07 +0100)] 
Revert "arm64: a37xx: pci: Assert PERST# signal when unloading driver"

This reverts commit 828d32621686aec593076d16445d39b9b8d49c05.

This change revers code which asserting PERST# signal when unloading
driver. Driver's remove callback is still there as it is used for other
functionality.

Asserting PERST# signal prior booting kernel is causing that A3720 boards
(Turris MOX and Espressobin) with stable Linux kernel versions 4.14 and
4.19 are not able to detect some PCIe cards (e.g. Compex WLE200 and WLE900)
and anymore. When PERST# signal is not asserted these cards are detected
correctly. As this is regression for existing stable Linux kernel versions
revert this problematic change in U-Boot.

To make cards working with OpenWRT 4.14 kernel it is needed to disable link
training prior booting kernel, which is already done in driver's remove
callback.

Described issue is in Linux kernel pci aardvark driver which is (hopefully)
fixed in latest upstream versions. Latest upstream versions should be able
to initialize PCIe bus and detects cards independently of the link training
and PERST# signal state.

So with this change, U-Boot on A3720 boards should be able to boot OpenWRT
4.14 kernel, stable 4.14 and 4.19 kernels and also latest mainline kernels.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoarm: mvebu: armada-xp-gp.dts: Add spi0 alias
Stefan Roese [Fri, 11 Dec 2020 04:47:40 +0000 (05:47 +0100)] 
arm: mvebu: armada-xp-gp.dts: Add spi0 alias

For correct spi bus detection the spi0 alias is needed in the DT.
Otherwise this error will ocurr in U-Boot:

Invalid bus 0 (err=-19)
Failed to initialize SPI flash at 0:0 (error -19)

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Dennis Gilmore <dgilmore@redhat.com>
Tested-by: Dennis Gilmore <dgilmore@redhat.com>
4 years agoarm: mvebu: Add armada-xp-gp-u-boot.dtsi for U-Boot properties
Stefan Roese [Thu, 10 Dec 2020 05:40:10 +0000 (06:40 +0100)] 
arm: mvebu: Add armada-xp-gp-u-boot.dtsi for U-Boot properties

Add some missing "u-boot,dm-pre-reloc;" properties to UART0, SPI
controller and SPI NOR flash node to enable usage in SPL. Otherwise
these devices will not be available.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Dennis Gilmore <dgilmore@redhat.com>
Tested-by: Dennis Gilmore <dgilmore@redhat.com>
4 years agoi2c: mxc_i2c: improve error message readability
Marc Ferland [Mon, 21 Dec 2020 14:50:16 +0000 (09:50 -0500)] 
i2c: mxc_i2c: improve error message readability

Use 0x%2lx to print the i2c bus base address in hexadecimal format
instead of printing as an integer.

Signed-off-by: Marc Ferland <ferlandm@amotus.ca>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
4 years agoimx: mx7: clock: use correct format strings
Heinrich Schuchardt [Fri, 25 Dec 2020 15:22:27 +0000 (16:22 +0100)] 
imx: mx7: clock: use correct format strings

Use %u and not %d for unsigned values.
Print kHz and not khz.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
4 years agoarm: dart6ul: read and print SoM info from eeprom on startup
Marc Ferland [Tue, 22 Dec 2020 19:24:12 +0000 (14:24 -0500)] 
arm: dart6ul: read and print SoM info from eeprom on startup

The dart6ul has an i2c eeprom at 0x50 which contains, among other
things, the manufacturing/revision/options info of the SoM. This patch
replaces the current checkboard() implementation with a more
exhaustive one based on the content of the eeprom.

Since this code uses the new driver model, some changes were also
required in the DTS to make the nodes related to i2c available before
relocation.

This code was inspired from the supported u-boot code from Variscite
which can be found here:

https://github.com/varigit/uboot-imx/tree/imx_v2018.03_4.14.78_1.0.0_ga_var02

New output example:

Board: PN: VSM-6UL-705B, Assy: AS1812142257, Date: 2019 Feb 17
       Storage: eMMC, Wifi: yes, DDR: 1024 MiB, Rev: 2.4G

Signed-off-by: Marc Ferland <ferlandm@amotus.ca>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
4 years agoarm: dart6ul: change compatible string for eeprom
Marc Ferland [Tue, 22 Dec 2020 19:24:11 +0000 (14:24 -0500)] 
arm: dart6ul: change compatible string for eeprom

The eeprom at address 0x50 is a BR24G04NUX-3TTR. It has a
4Kbit (512x8) capacity, change the compatible string to reflect this
fact.

Also, add an alias to easily refer to this eeprom with
fdt_path_offset() which will be in another commit.

Signed-off-by: Marc Ferland <ferlandm@amotus.ca>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
4 years agotoradex: hand over maintainership
Igor Opaniuk [Tue, 22 Dec 2020 15:56:46 +0000 (17:56 +0200)] 
toradex: hand over maintainership

Hand over maintainership of Toradex SoMs (that I was responsible of) to
Oleksandr because of my resignation from Toradex, as such I will
have no immediate involvement with these modules and as a result not
able to continue maintaining these boards.

CC: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Acked-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
4 years agoimx8mp_evk: Increase CONFIG_SYS_MALLOC_F_LEN
Fabio Estevam [Mon, 21 Dec 2020 18:40:37 +0000 (15:40 -0300)] 
imx8mp_evk: Increase CONFIG_SYS_MALLOC_F_LEN

When booting imx8mp-evk the following allocation error
message is seen:

U-Boot 2021.01-rc3-00200-ge668bec96a5f (Dec 21 2020 - 14:36:42 -0300)

alloc space exhausted

Fix it by increasing CONFIG_SYS_MALLOC_F_LEN to 0x10000 like it
is done on other i.MX8MM/8MN boards.

Reported-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Tested-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
4 years agoimx: ahab: allow to bypass confirmation for ahab_close cmd
Clément Péron [Mon, 21 Dec 2020 17:31:28 +0000 (18:31 +0100)] 
imx: ahab: allow to bypass confirmation for ahab_close cmd

Calling ahab_close cmd force the user to interact for confirmation.

This is not user-friendly when using this cmd during factory process.

Allow the user to pass '-y' option to bypass this confirmation.

Signed-off-by: Clément Péron <peron.clem@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Oliver Graute <oliver.graute@kococonnector.com>
4 years agoboard: ge: bx50v3: cleanup phy config
Sebastian Reichel [Mon, 14 Dec 2020 23:41:57 +0000 (00:41 +0100)] 
board: ge: bx50v3: cleanup phy config

The current PHY rework does the following things:

1. Configure 125MHz clock
2. Setup the TX clock delay (RX is enabled by default),
3. Setup reserved bits to avoid voltage peak

The clock delays are nowadays already configured by the
PHY driver (in ar803x_delay_config). The code for that
can simply be dropped. The clock speed can also be
configured by the PHY driver by adding the device tree
property "qca,clk-out-frequency".

What is left is setting up the undocumented reserved bits
to avoid the voltage peak problem. I slightly improved its
documentation while updating the board's PHY rework code.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
4 years agoboard: ge: bx50v3: remove confidx magic numbers
Sebastian Reichel [Mon, 14 Dec 2020 23:41:56 +0000 (00:41 +0100)] 
board: ge: bx50v3: remove confidx magic numbers

Instead of hardcoding index magic numbers in the board code,
also rely on board_fit_config_name_match choosing the right
config for the fitImage containing the kernel.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
4 years agoMerge tag 'efi-2021-01-rc5' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Sat, 26 Dec 2020 13:02:19 +0000 (08:02 -0500)] 
Merge tag 'efi-2021-01-rc5' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi

Pull request for UEFI sub-system for efi-2021-01-rc5

* In the Standalone MM based implementation of UEFI variables
  check the internal OP-TEE return code

4 years agoefi_loader: Extra checks while opening an OPTEE session
Ilias Apalodimas [Wed, 23 Dec 2020 11:25:00 +0000 (13:25 +0200)] 
efi_loader: Extra checks while opening an OPTEE session

When opening an OP-TEE session we need to check the internal return
value of OP-TEE call arguments as well the return code of the
function itself.
The code was also ignoring to close the OP-TEE session in case the
shared memory registration failed.

Fixes: f042e47e8fb43 ("efi_loader: Implement EFI variable handling via OP-TEE")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agocompiler.h: add host_build()
Sebastian Reichel [Mon, 14 Dec 2020 23:41:53 +0000 (00:41 +0100)] 
compiler.h: add host_build()

Add a host_build() function, so that it's possible to
check for software being build with USE_HOSTCC without
relying on preprocessor conditions. In other words

 #ifdef USE_HOSTCC
  host_only_code();
 #endif

can be written like this instead:

 if (host_build())
  host_only_code();

This improves code readability and test coverage and
compiler will eleminate this unreachable code.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agomx6sabresd: Remove unneeded checkboard()
Fabio Estevam [Mon, 14 Dec 2020 17:32:39 +0000 (14:32 -0300)] 
mx6sabresd: Remove unneeded checkboard()

After the conversion to device tree the board information becomes
redundant:

Model: Freescale i.MX6 Quad Plus SABRE Smart Device Board
Board: MX6-SabreSD

Remove the printing of the board information.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
4 years agoconfigs: imx8m: enable eMMC HS400ES and SD UHS mode on EVK
Andrey Zhizhikin [Sat, 5 Dec 2020 17:29:19 +0000 (17:29 +0000)] 
configs: imx8m: enable eMMC HS400ES and SD UHS mode on EVK

i.MX8M series includes support for high speed modes in uSDHC controllers.
Turn on corresponding configuration options for EVK boards, which would
enable high speed modes to be included in U-Boot.

Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
4 years agoARM: dts: imx8m: add UHS or HS400/HS400ES properties
Andrey Zhizhikin [Sat, 5 Dec 2020 17:29:18 +0000 (17:29 +0000)] 
ARM: dts: imx8m: add UHS or HS400/HS400ES properties

i.MX8M series provide support for high speed grades in their
usdhc controllers, which has eMMC and SDHC connected to them.

Enable this support across the entire i.MX8M family by providing quirks
to usdhc controllers designated by storage media connected to them.

Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Ye Li <ye.li@nxp.com>
4 years agoARM: dts: imx8m: increase off-on delay on the SD Vcc regulator
Andrey Zhizhikin [Sat, 5 Dec 2020 17:29:17 +0000 (17:29 +0000)] 
ARM: dts: imx8m: increase off-on delay on the SD Vcc regulator

Some SD Card controller and power circuitry has increased capacitance,
which keeps the internal logic remains powered after regulator is switch
off. This is generally the case when card is switched to SD104 mode,
where a power cycle should be performed. In case if the card internal
logic remains powered, it causes a subsequent failure of mode
transition, effectively leading to failed enumeration.

Introduce a delay of 20 msec in order to provide a possibility for
internal card circuitry to drain voltages and perform a power cycle
correctly.

Similar fix is done in commit c49d0ac38a76 ("ARM: dts: rmobile: Increase
off-on delay on the SD Vcc regulator") targeted Renesas SOCs.

Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Cc: Stefano Babic <sbabic@denx.de>
4 years agoimx8mm_beacon: Enable HS400 on MMC controller
Adam Ford [Sat, 5 Dec 2020 00:59:43 +0000 (18:59 -0600)] 
imx8mm_beacon: Enable HS400 on MMC controller

The i.MX8MM is capable of HS400.  Enable it in both
U-Boot and SPL for faster throughput.

Signed-off-by: Adam Ford <aford173@gmail.com>
4 years agoarm64: dts: imx8mm-beacon: Re-sync dts file with Linux 5.10-rc6
Adam Ford [Fri, 4 Dec 2020 23:27:47 +0000 (17:27 -0600)] 
arm64: dts: imx8mm-beacon: Re-sync dts file with Linux 5.10-rc6

There have been some updates to the device trees, so re-sync.

Signed-off-by: Adam Ford <aford173@gmail.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
4 years agoarm: dts: imx8mm: sync dts from Linux Kernel 5.10-rc6
Adam Ford [Fri, 4 Dec 2020 23:27:46 +0000 (17:27 -0600)] 
arm: dts: imx8mm: sync dts from Linux Kernel 5.10-rc6

There have been some updates to the device tree since 5.6.
This also includes some clocks, and makes it easier to keep
board device tree files in sync with Linux

Signed-off-by: Adam Ford <aford173@gmail.com>
Acked-by: Peng Fan <peng.fan@nxp.com>