]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
6 years agoxilinx: Move zynq_board_read_rom_ethaddr to shared location
Michal Simek [Mon, 21 Jan 2019 14:25:02 +0000 (15:25 +0100)] 
xilinx: Move zynq_board_read_rom_ethaddr to shared location

Zynq and ZynqMP are sharing similar code and there is no reason to do
code duplication. Move zynq_board_read_rom_ethaddr() to common file for
easier conversion to DM.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agomisc: i2c_eeprom: Add atmel,24c08 to the list
Michal Simek [Mon, 21 Jan 2019 12:53:05 +0000 (13:53 +0100)] 
misc: i2c_eeprom: Add atmel,24c08 to the list

Linux kernel binding is using atmel,24c08 compatible string. On the
other hand there is atmel,24c08a which is not listed in the kernel.
Add compatible string without "a" suffix to be compatible with Linux
kernel binding.

These eeproms are available on several ZynqMP development boards.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoARM: zynq: Convert Topic Miami to DM_I2C
Michal Simek [Tue, 22 Jan 2019 14:47:52 +0000 (15:47 +0100)] 
ARM: zynq: Convert Topic Miami to DM_I2C

Both boards have only controllers enabled that's why move to DM_I2C is
easy.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoARM: zynq: Disable i2c for Zybo/Zybo Z7
Michal Simek [Tue, 22 Jan 2019 13:04:20 +0000 (14:04 +0100)] 
ARM: zynq: Disable i2c for Zybo/Zybo Z7

There is no i2c connected in base DT that's why disable I2C commands.
Also remove zynq_zybo which is not needed now.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoi2c: mux: Generate longer i2c mux name
Michal Simek [Thu, 31 Jan 2019 15:31:03 +0000 (16:31 +0100)] 
i2c: mux: Generate longer i2c mux name

For !DM case busses are listed as
ZynqMP> i2c bus
Bus 0: zynq_0
Bus 1: zynq_0->PCA9544A@0x75:0
Bus 2: zynq_0->PCA9544A@0x75:1
Bus 3: zynq_0->PCA9544A@0x75:2
Bus 4: zynq_1
Bus 5: zynq_1->PCA9548@0x74:0
Bus 6: zynq_1->PCA9548@0x74:1
Bus 7: zynq_1->PCA9548@0x74:2
Bus 8: zynq_1->PCA9548@0x74:3
Bus 9: zynq_1->PCA9548@0x74:4
Bus 10: zynq_1->PCA9548@0x75:0
Bus 11: zynq_1->PCA9548@0x75:1
Bus 12: zynq_1->PCA9548@0x75:2
Bus 13: zynq_1->PCA9548@0x75:3
Bus 14: zynq_1->PCA9548@0x75:4
Bus 15: zynq_1->PCA9548@0x75:5
Bus 16: zynq_1->PCA9548@0x75:6
Bus 17: zynq_1->PCA9548@0x75:7

where is exactly describing i2c bus topology.
By moving to DM case i2c mux buses are using names from DT and because
i2c-muxes describing sub busses with the same names like i2c@0, etc it
is hard to identify which bus is where.
Linux is adding topology information to i2c-mux busses to identify them
better.
This patch is doing the same and composing bus name with topology
information.

When patch is applied with topology information on zcu102-revA.
ZynqMP> i2c bus
Bus 0: i2c@ff020000
   20: gpio@20, offset len 1, flags 0
   21: gpio@21, offset len 1, flags 0
   75: i2c-mux@75, offset len 1, flags 0
Bus 2: i2c@ff020000->i2c-mux@75->i2c@0
Bus 3: i2c@ff020000->i2c-mux@75->i2c@1
Bus 4: i2c@ff020000->i2c-mux@75->i2c@2
Bus 1: i2c@ff030000  (active 1)
   74: i2c-mux@74, offset len 1, flags 0
   75: i2c-mux@75, offset len 1, flags 0
Bus 5: i2c@ff030000->i2c-mux@74->i2c@0  (active 5)
   54: eeprom@54, offset len 1, flags 0
Bus 6: i2c@ff030000->i2c-mux@74->i2c@1
Bus 7: i2c@ff030000->i2c-mux@74->i2c@2
Bus 8: i2c@ff030000->i2c-mux@74->i2c@3
Bus 9: i2c@ff030000->i2c-mux@74->i2c@4
Bus 10: i2c@ff030000->i2c-mux@75->i2c@0
Bus 11: i2c@ff030000->i2c-mux@75->i2c@1
Bus 12: i2c@ff030000->i2c-mux@75->i2c@2
Bus 13: i2c@ff030000->i2c-mux@75->i2c@3
Bus 14: i2c@ff030000->i2c-mux@75->i2c@4
Bus 15: i2c@ff030000->i2c-mux@75->i2c@5
Bus 16: i2c@ff030000->i2c-mux@75->i2c@6
Bus 17: i2c@ff030000->i2c-mux@75->i2c@7

Behavior before the patch is applied.
ZynqMP> i2c bus
Bus 0: i2c@ff020000
   20: gpio@20, offset len 1, flags 0
   21: gpio@21, offset len 1, flags 0
   75: i2c-mux@75, offset len 1, flags 0
Bus 2: i2c@0
Bus 3: i2c@1
Bus 4: i2c@2
Bus 1: i2c@ff030000  (active 1)
   74: i2c-mux@74, offset len 1, flags 0
   75: i2c-mux@75, offset len 1, flags 0
Bus 5: i2c@0  (active 5)
   54: eeprom@54, offset len 1, flags 0
Bus 6: i2c@1
Bus 7: i2c@2
Bus 8: i2c@3
Bus 9: i2c@4
Bus 10: i2c@0
Bus 11: i2c@1
Bus 12: i2c@2
Bus 13: i2c@3
Bus 14: i2c@4
Bus 15: i2c@5
Bus 16: i2c@6
Bus 17: i2c@7

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
6 years agoi2c: Fill req_seq in i2c_post_bind()
Michal Simek [Thu, 31 Jan 2019 15:31:02 +0000 (16:31 +0100)] 
i2c: Fill req_seq in i2c_post_bind()

For i2c controllers which are missing alias in DT there is no req_seq
setup. This function is setting up proper ID based on highest found
alias ID.

On zcu102 this is the behavior when patch is applied.
ZynqMP> i2c bus
Bus 0: i2c@ff020000
   20: gpio@20, offset len 1, flags 0
   21: gpio@21, offset len 1, flags 0
   75: i2c-mux@75, offset len 1, flags 0
Bus 2: i2c@0
Bus 3: i2c@1
Bus 4: i2c@2
Bus 1: i2c@ff030000  (active 1)
   74: i2c-mux@74, offset len 1, flags 0
   75: i2c-mux@75, offset len 1, flags 0
Bus 5: i2c@0  (active 5)
   54: eeprom@54, offset len 1, flags 0
Bus 6: i2c@1
Bus 7: i2c@2
Bus 8: i2c@3
Bus 9: i2c@4
Bus 10: i2c@0
Bus 11: i2c@1
Bus 12: i2c@2
Bus 13: i2c@3
Bus 14: i2c@4
Bus 15: i2c@5
Bus 16: i2c@6
Bus 17: i2c@7

Before this patch applied (controllers have -1 ID)
ZynqMP> i2c bus
Bus 0: i2c@ff020000
   20: gpio@20, offset len 1, flags 0
   21: gpio@21, offset len 1, flags 0
   75: i2c-mux@75, offset len 1, flags 0
Bus -1: i2c@0
Bus -1: i2c@1
Bus -1: i2c@2
Bus 1: i2c@ff030000  (active 1)
   74: i2c-mux@74, offset len 1, flags 0
   75: i2c-mux@75, offset len 1, flags 0
Bus -1: i2c@0  (active 0)
   54: eeprom@54, offset len 1, flags 0
Bus -1: i2c@1
Bus -1: i2c@2
Bus -1: i2c@3
Bus -1: i2c@4
Bus -1: i2c@0
Bus -1: i2c@1
Bus -1: i2c@2
Bus -1: i2c@3
Bus -1: i2c@4
Bus -1: i2c@5
Bus -1: i2c@6
Bus -1: i2c@7

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
6 years agoi2c: dm: Record maximum id of devices before probing devices
Michal Simek [Thu, 31 Jan 2019 15:31:01 +0000 (16:31 +0100)] 
i2c: dm: Record maximum id of devices before probing devices

There is a need to find out the first free i2c ID which can be used for
i2s buses (including i2c buses connected to i2c mux). Do it early in
init and share this variable with other i2c classes for uniq bus
identification.

add from hs:
fix build problem in i2c-uclass.c for omap devices

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
6 years agodm: core: Add tests for dev_read_alias_highest_id()
Michal Simek [Thu, 31 Jan 2019 15:31:00 +0000 (16:31 +0100)] 
dm: core: Add tests for dev_read_alias_highest_id()

It is checking the highest alias ID for eth, gpio, pci, i2c and error
code on non existing alias.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agodm: core: Introduce dev_read_alias_highest_id()
Michal Simek [Thu, 31 Jan 2019 15:30:59 +0000 (16:30 +0100)] 
dm: core: Introduce dev_read_alias_highest_id()

It is wrapper for calling of_alias_get_highest_id() when live tree is
enabled and fdtdec_get_alias_highest_id() if not.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agofdt: Introduce fdtdec_get_alias_highest_id()
Michal Simek [Thu, 31 Jan 2019 15:30:58 +0000 (16:30 +0100)] 
fdt: Introduce fdtdec_get_alias_highest_id()

Find out the highest alias ID used for certain subsystem.
This call will be used for alocating IDs for i2c buses which are not
described in DT.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agodm: core: Add of_alias_get_highest_id()
Michal Simek [Thu, 31 Jan 2019 15:30:57 +0000 (16:30 +0100)] 
dm: core: Add of_alias_get_highest_id()

The same functionality was added to Linux for i2c bus registration with this
commit message:

"
of: base: add function to get highest id of an alias stem

I2C supports adding adapters using either a dynamic or fixed id. The
latter is provided by aliases in the DT case. To prevent id collisions
of those two types, install this function which gives us the highest
fixed id, so we can then let the dynamically created ones come after
this highest number.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
"

Add it also to U-Boot for DM I2C support.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoarm: Leave smccc calls in .text when efi_loader=n
Alexander Graf [Mon, 11 Feb 2019 14:13:58 +0000 (15:13 +0100)] 
arm: Leave smccc calls in .text when efi_loader=n

Commit 81ea00838c6 ("efi_loader: PSCI reset and shutdown") put the SMCCC
assembly code into the efi specific code section. This is wrong when we
do not have EFI_LOADER enabled, as that strips efi runtime sections from
the output binary

Reported-by: Michal Simek <monstr@monstr.eu>
Fixes: 81ea00838c6 ("efi_loader: PSCI reset and shutdown")
Signed-off-by: Alexander Graf <agraf@suse.de>
Reported-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Tested-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoARM: zynq: Remove unused GEM addresses
Michal Simek [Tue, 22 Jan 2019 12:15:46 +0000 (13:15 +0100)] 
ARM: zynq: Remove unused GEM addresses

With DM in place there is no need to have GEM addresses in headers. None
is using them.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Remove unused GEM addresses
Michal Simek [Tue, 22 Jan 2019 12:15:01 +0000 (13:15 +0100)] 
arm64: zynqmp: Remove unused GEM addresses

With DM in place there is no need to have GEM addresses in headers. None
is using them.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agozynq: Kconfig: extend the bootstrap malloc() pool
Anton Gerasimov [Mon, 24 Dec 2018 01:29:04 +0000 (02:29 +0100)] 
zynq: Kconfig: extend the bootstrap malloc() pool

Most of the memory is being consumed by device binding code,
more space needed for other data structures.

Z-turn board has already hit the limit, others may follow soon.

Measuring only the memory consumed in device_bind_common, I've got
the following results (in decimal):

  root_driver:               108
  mod_exp_sw:                108
  amba:                      120
  serial@e0000000 aka uart0: 112
  serial@e0001000 aka uart1: 88
  spi@e000d000 aka qspi:     120
  sdhci@e0100000 aka mmc0:   455
  sdhci@e0100000.blk:        208
  slcr@f8000000:             96
  clkc@100:                  72
  (total)                    1487 = 0x5cf of 0x600

Signed-off-by: Anton Gerasimov <tossel@gmail.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoboard: topic-miamiplus: Run IO PLL at 1000 MHz
Mike Looijmans [Fri, 18 Jan 2019 08:02:48 +0000 (09:02 +0100)] 
board: topic-miamiplus: Run IO PLL at 1000 MHz

The miamiplus can use GEM0 through MIO pins, which requires a 125 MHz TX
clock to be generated. With the IO PLL at 1200 MHz this isn't possible, so
change it to run at 1000 and adjust the divisors accordingly. Also set the
GEM0 clock source to MIO instead of EMIO.

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agotopic-miamiplus: Run CPU at 800MHz for speedgrade-2
Mike Looijmans [Fri, 18 Jan 2019 08:02:47 +0000 (09:02 +0100)] 
topic-miamiplus: Run CPU at 800MHz for speedgrade-2

The miamiplus contains a speedgrade-2 device, which may run the CPU at 800MHz.
Change the PLL setting to 800MHz, and adapt the setpoints in the devicetree.

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoi2c: cdns: Convert to livetree function
Michal Simek [Fri, 18 Jan 2019 09:43:39 +0000 (10:43 +0100)] 
i2c: cdns: Convert to livetree function

Update cadence i2c driver to support livetree
Similar changes were done by:
"net: zynq_gem: convert to use livetree"
(sha1: 26026e695afa794ac018a09e79a48120d322b60d)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Move SoC sources to mach-zynqmp
Michal Simek [Thu, 17 Jan 2019 07:22:43 +0000 (08:22 +0100)] 
arm64: zynqmp: Move SoC sources to mach-zynqmp

Similar changes was done for Zynq in past and this patch just follow
this pattern to separate cpu code from SoC code.

Move arch/arm/cpu/armv8/zynqmp/* -> arch/arm/mach-zynqmp/*
And also fix references to these files.

Based on
"ARM: zynq: move SoC sources to mach-zynq"
(sha1: 0107f2403669f764ab726d0d404e35bb9447bbcc)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agotravis: Wire Xilinx Versal Virt platform
Michal Simek [Thu, 20 Dec 2018 07:40:25 +0000 (08:40 +0100)] 
travis: Wire Xilinx Versal Virt platform

Test Xilinx Versal Virt platform running on the v3.1.0 Qemu.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agotravis: Switch QEMU to 3.1.0 version
Michal Simek [Wed, 16 Jan 2019 14:18:44 +0000 (15:18 +0100)] 
travis: Switch QEMU to 3.1.0 version

Vexpress ca15_tc2 is failing with 3.1.0 because of QEMU issue.
When this patch is applied
https://patchwork.kernel.org/patch/10754401/
Vexpress can be also turn to newer QEMU version.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agotravis: Setup QEMU_VERSION as variable
Michal Simek [Wed, 16 Jan 2019 14:18:43 +0000 (15:18 +0100)] 
travis: Setup QEMU_VERSION as variable

This change enables setting up specific Qemu version or sha1 for new
targets which are added after (current) v3.0.0 version.
This changes is preparation step for adding new Xilinx Versal Virt
platform which was merge after v3.0.0.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agofpga: zynqmp: show an error message when FPGA programming fails
Luca Ceresoli [Fri, 11 Jan 2019 16:09:45 +0000 (17:09 +0100)] 
fpga: zynqmp: show an error message when FPGA programming fails

When FPGA programming fails, it does so silently, unless debugging
code is enabled. This makes it hard to detect problems in production
environments.

Print the error message unconditionally so the error doesn't go
unnoticed.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Protect board_late_init function
Michal Simek [Thu, 20 Dec 2018 08:33:38 +0000 (09:33 +0100)] 
arm64: zynqmp: Protect board_late_init function

Function should be compiled only when CONFIG_BOARD_LATE_INIT is defined.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Do not protect zynqmp_pmufw_version()
Michal Simek [Thu, 20 Dec 2018 08:41:12 +0000 (09:41 +0100)] 
arm64: zynqmp: Do not protect zynqmp_pmufw_version()

There is hard dependency for CLK_ZYNQMP to have zynqmp_pmufw_version()
but also FPGA code is calling this function which is possible to use
without actual CLK_ZYNQMP firmware driver to be enabled.
This patch enables the case where only fixed-clock CLK setup is used.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoi2c: xiic: Add Xilinx AXI I2C driver
Marek Vasut [Wed, 19 Dec 2018 11:26:27 +0000 (12:26 +0100)] 
i2c: xiic: Add Xilinx AXI I2C driver

Add Xilinx AXI I2C controller driver based on the Linux i2c-xiic driver.
This driver is stripped of all the IRQ handling and uses pure polling,
yet tries to retain most of the structure of the Linux driver to make
backporting of fixes easy.

Note that the IP has a known limitation on 255 bytes read and write,
according to xilinx this is still being worked on [1].

[1] https://forums.xilinx.com/t5/Embedded-Processor-System-Design/AXI-IIC-V2-0-I2C-Master-Reading-multiple-bytes-from-I2C-slave/m-p/854419/highlight/true#M39387

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Heiko Schocher <hs@denx.de>
Reviewed-by: Heiko Schocher <hs@denx.de>
6 years agoi2c: mux: Convert to livetree functions
Michal Simek [Wed, 9 Jan 2019 10:58:24 +0000 (11:58 +0100)] 
i2c: mux: Convert to livetree functions

Updates i2c muxes drivers to support livetree.
Similar changes were done by:
"net: zynq_gem: convert to use livetree"
(sha1: 26026e695afa794ac018a09e79a48120d322b60d)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Define distro boot commnads for qspi and nand
Siva Durga Prasad Paladugu [Thu, 24 Jan 2019 06:02:04 +0000 (11:32 +0530)] 
arm64: zynqmp: Define distro boot commnads for qspi and nand

This patch adds distro boot commands for qspi and nand. The
distro boot commands now reads the script from flash offset
of 63.5MB and executes it.

Setup default location via script_offset_f to 63.5MB to match the most
xilinx reference boards. 512kB allocated space for script size
(script_size_f) should be more than enough to cover custom boot logic.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoxilinx: Fix typo in xilinxcmd
Siva Durga Prasad Paladugu [Thu, 24 Jan 2019 06:02:03 +0000 (11:32 +0530)] 
xilinx: Fix typo in xilinxcmd

Fix typo in xilinxcmd for both Zynq and ZynqMP
platforms.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Enable CONFIG_REMAKE_ELF
Siva Durga Prasad Paladugu [Tue, 22 Jan 2019 09:04:12 +0000 (14:34 +0530)] 
arm: zynq: Enable CONFIG_REMAKE_ELF

This patch enables CONFIG_REMAKE_ELF for Zynq platform
so that it generates u-boot.elf from binary which works
for all Zynq boards with OF_SEPARATE option enabled.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Convert all reference boards to OF_SEPARATE
Michal Simek [Fri, 14 Dec 2018 10:13:11 +0000 (11:13 +0100)] 
arm64: zynqmp: Convert all reference boards to OF_SEPARATE

Build warning was added by:
"fdt: Add warning about CONFIG_OF_EMBED"
(sha1: 841d5fbae4e993476fa87d8933db0cd58d3c2d41)

ZynqMP mini configurations are not moved yet and it is questionable if
make sense to move them too.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Align u-boot-spl.bin for boot.bin creation
Michal Simek [Wed, 16 Jan 2019 11:14:00 +0000 (12:14 +0100)] 
arm64: zynqmp: Align u-boot-spl.bin for boot.bin creation

Bootrom is not capable to work with non align bootloader partition
that's why it is necessary to align it before boot.bin creation.
The patch is creating new spl/u-boot-spl-align.bin which is used only
for boot.bin.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agotools: zynqmpimage: Align image_size/image_stored_size
Michal Simek [Fri, 14 Dec 2018 09:53:54 +0000 (10:53 +0100)] 
tools: zynqmpimage: Align image_size/image_stored_size

Bootrom is not capable to work with non aligned bootloader sizes.
SPL with OF_SEPARATE generates non-align images quite often that's
why this change is required before OF_SEPARATE enableding.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agotools: zynqmpimage: round up partition size
Michael Tretter [Mon, 3 Dec 2018 15:37:53 +0000 (16:37 +0100)] 
tools: zynqmpimage: round up partition size

The FSBL copies "Total Partition Word Length" * 4 bytes from the boot.bin,
which implies that the partition size is 4 byte aligned. When writing the
partition, mkimage calculates "Total Partition Word Length" by dividing
the size by 4. This implicitly cuts unaligned bytes at the end of the
added binary.

Instead of rounding down, the size must be round up to 4 bytes and the
binary padded accordingly.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Reviewed-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoARM: zynq: Convert all boards to OF_SEPARATE
Michal Simek [Tue, 15 Jan 2019 13:26:53 +0000 (14:26 +0100)] 
ARM: zynq: Convert all boards to OF_SEPARATE

Build warning was added by:
"fdt: Add warning about CONFIG_OF_EMBED"
(sha1: 841d5fbae4e993476fa87d8933db0cd58d3c2d41)

Zynq mini configurations are not moved yet and it is questionable if
make sense to move them too.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoARM: zynqmp_r5: Setup DM_ETH/MMC if NET/MMC is enabled
Michal Simek [Tue, 15 Jan 2019 08:06:46 +0000 (09:06 +0100)] 
ARM: zynqmp_r5: Setup DM_ETH/MMC if NET/MMC is enabled

Setup proper ETH/MMC dependency for the whole platform.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Disable MMC for for zc12xx_revA boards
Michal Simek [Tue, 15 Jan 2019 11:00:52 +0000 (12:00 +0100)] 
arm64: zynqmp: Disable MMC for for zc12xx_revA boards

All these boards have no SD enabled.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Setup proper SPI dependency
Michal Simek [Tue, 15 Jan 2019 09:50:39 +0000 (10:50 +0100)] 
arm64: zynqmp: Setup proper SPI dependency

Select DM_SPI/DM_SPI_FLASH for the whole SoC.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Setup DM_ETH/MMC if NET/MMC is enabled
Michal Simek [Tue, 15 Jan 2019 07:52:51 +0000 (08:52 +0100)] 
arm64: zynqmp: Setup DM_ETH/MMC if NET/MMC is enabled

Setup proper ETH/MMC dependency for the whole platform.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoMerge tag 'v2019.01' into master
Michal Simek [Tue, 15 Jan 2019 06:37:04 +0000 (07:37 +0100)] 
Merge tag 'v2019.01' into master

Prepare v2019.01

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoPrepare v2019.01 v2019.01
Tom Rini [Mon, 14 Jan 2019 22:02:36 +0000 (17:02 -0500)] 
Prepare v2019.01

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agommc: fsl_esdhc: Avoid infinite loop in esdhc_send_cmd_common()
Fabio Estevam [Mon, 19 Nov 2018 12:31:53 +0000 (10:31 -0200)] 
mmc: fsl_esdhc: Avoid infinite loop in esdhc_send_cmd_common()

The following hang is observed on a Hummingboard 2 MicroSOM
i2eX iMX6D - rev 1.3 with no eMMC populated on board:

U-Boot SPL 2018.11+gf6206f8587 (Nov 16 2018 - 00:56:34 +0000)
Trying to boot from MMC1

U-Boot 2018.11+gf6206f8587 (Nov 16 2018 - 00:56:34 +0000)

CPU:   Freescale i.MX6D rev1.5 996 MHz (running at 792 MHz)
CPU:   Extended Commercial temperature grade (-20C to 105C) at 33C
Reset cause: POR
Board: MX6 HummingBoard2
DRAM:  1 GiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... *** Warning - bad CRC, using default environment

No panel detected: default to HDMI
Display: HDMI (1024x768)
In:    serial
Out:   serial
Err:   serial
---> hangs

which is caused by the following infinite loop inside esdhc_send_cmd_common()

while (!(esdhc_read32(&regs->irqstat) & flags))
;

Instead of looping forever, provide an exit path so that a timeout
error can be propagated in the case irqstat does not report
any interrupts, which may happen when no eMMC is populated on
board.

Reported-by: Ricardo Salveti <rsalveti@rsalveti.net>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
Tested-by: Ricardo Salveti <rsalveti@rsalveti.net>
6 years agoimx8mq_evk_defconfig: Move file system options to Kconfig
Fabio Estevam [Sat, 29 Dec 2018 12:02:24 +0000 (10:02 -0200)] 
imx8mq_evk_defconfig: Move file system options to Kconfig

Chris Spencer reports that when enabling ext4 read support without
also enabling write support the following error is seen:

fs/fs.c:198:12: error: 'ext4_write_file' undeclared here (not in a
function); did you mean 'ext4_read_file'?
   .write = ext4_write_file,
            ^~~~~~~~~~~~~~~
Fix this problem by moving these options to Kconfig.

Reported-by: Chris Spencer <spencercw@gmail.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
6 years agopoplar: save environment at a different offset
Alex Elder [Tue, 18 Dec 2018 03:08:18 +0000 (11:08 +0800)] 
poplar: save environment at a different offset

Change CONFIG_ENV_OFFSET for Poplar to be 1MB further into the eMMC
than before.  This puts it immediately prior to the space we are
reserving offset 0x200000-0x400000 for UEFI to save its persistent
data.  Define CONFIG_ENV_SIZE as a product of env_mmc_nblks and the
sector size, like CONFIG_ENV_OFFSET is.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
6 years agoMerge branch 'master' of git://git.denx.de/u-boot-socfpga
Tom Rini [Fri, 11 Jan 2019 15:47:53 +0000 (10:47 -0500)] 
Merge branch 'master' of git://git.denx.de/u-boot-socfpga

6 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Tom Rini [Fri, 11 Jan 2019 15:47:41 +0000 (10:47 -0500)] 
Merge branch 'master' of git://git.denx.de/u-boot-usb

6 years agoRevert "fs: fat: assign rootdir sector when accessing root directory"
Tom Rini [Fri, 11 Jan 2019 14:54:44 +0000 (09:54 -0500)] 
Revert "fs: fat: assign rootdir sector when accessing root directory"

This particular commit is causing a regression on stih410-b2260 and
other platforms when reading from FAT16.  Noting that I had rebased the
original fix from Thomas onto then-current master, there is also
question from Akashi-san if the change is still needed after other FAT
fixes that have gone in.

This reverts commit a68b0e11ea774492713a65d9fd5bb525fcaefff3.

Reported-by: Patrice Chotard <patrice.chotard@st.com>
Cc: AKASHI Takahiro <takahiro.akashi@linaro.org>
Cc: Thomas RIENOESSL <thomas.rienoessl@bachmann.info>
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoRevert "dm: pinctrl: Prevent (re-)configuring pins when already done before relocation"
Lukasz Majewski [Wed, 9 Jan 2019 22:05:02 +0000 (23:05 +0100)] 
Revert "dm: pinctrl: Prevent (re-)configuring pins when already done before relocation"

This reverts commit a7f4b4b344396590845e6552c82829ef68ef9f89.

As reported by Alex Kiernan the above optimization introduces a
regression in the below use case where:

1. Device has defined 'u-boot,dm-spl' property (@ eMMC DTS node)

2. The device downloads its MLO/SPL via UART (not eMMC - the eMMC pinmux
pins are NOT probed/configured in MLO/SPL).

3. The loaded via UART MLO/SPL wants to load Linux from eMMC. In this case
the DM core and pinctrl uclass checks 'u-boot,dm-spl' and don't
configure pins (as it thinks that those were initialized in MLO/SPL).

As we are very close to release - please revert this commit.

Reported-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoARM: dts: socfpga: Add missing SDMMC reset
Tien Fong Chee [Sun, 30 Dec 2018 08:13:45 +0000 (16:13 +0800)] 
ARM: dts: socfpga: Add missing SDMMC reset

The SDMMC reset is missing from DT, so the reset manager cannot unreset
the SDMMC. Add the missing DT reset entry.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
6 years agodm: usb: gadget: Fix boot breakage on sunxi platforms
Jean-Jacques Hiblot [Fri, 21 Dec 2018 08:50:21 +0000 (09:50 +0100)] 
dm: usb: gadget: Fix boot breakage on sunxi platforms

Fixes commit 013116243950 ("dm: usb: create a new UCLASS ID for USB gadget
devices")

The UCLASS_DRIVER for id UCLASS_USB_GADGET_GENERIC needs to be declared
even for platforms that do not enable DM_USB_GADGET. Otherwise the driver
for their usb peripheral controller fails to bind.

Reported-by: Priit Laes <plaes@plaes.org>
Reported-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Tested-by: Priit Laes <plaes@plaes.org>
Acked-by: Jagan Teki <jagan@openedev.com>
6 years agousb: Make compiling gadget support optional
Jean-Jacques Hiblot [Thu, 10 Jan 2019 14:44:14 +0000 (15:44 +0100)] 
usb: Make compiling gadget support optional

There is no need to compile and include this code if it is not used.
CONFIG_USB_GADGET can be used for the purpose.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
6 years agoKconfig: rename CONFIG_SPL_USB_GADGET_SUPPORT as CONFIG_SPL_USB_GADGET
Jean-Jacques Hiblot [Thu, 10 Jan 2019 14:44:13 +0000 (15:44 +0100)] 
Kconfig: rename CONFIG_SPL_USB_GADGET_SUPPORT as CONFIG_SPL_USB_GADGET

The SPL option for USB gadget should be named after the option for u-boot
(CONFIG_USB_GADGET)

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
6 years agoARM: dts: define USB aliases for all omap5 platforms
Jean-Jacques Hiblot [Sat, 15 Dec 2018 16:43:28 +0000 (17:43 +0100)] 
ARM: dts: define USB aliases for all omap5 platforms

This allows us to properly map the USB controller indexes

Tested on dra76 evm, am572 evm

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
6 years agodm: usb: udc: Use SEQ_ALIAS to index the USB gadget ports
Jean-Jacques Hiblot [Sat, 15 Dec 2018 16:43:27 +0000 (17:43 +0100)] 
dm: usb: udc: Use SEQ_ALIAS to index the USB gadget ports

dfu, fastbot and other usb gadget commands take the USB port index as a
parameter. Currently this index is assigned in the order of the driver
bindings.
Changing this behavior using the SEQ_ALIAS feature. This option assign to
the device a SEQ number based on its alias (if it exists)

To use it we must set the DM_UC_FLAG_SEQ_ALIAS flag and follow the existing
naming convention: use "usb" for the name of the gadget UCLASS_DRIVER
(same as for the UCLASS_USB).

If no alias is provided, then the index falls back to the order in which
the bindings took place.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reported-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Tested-by: Sam Protsenko <semen.protsenko@linaro.org>
6 years agoMerge branch 'master' of git://git.denx.de/u-boot-sunxi
Tom Rini [Thu, 10 Jan 2019 14:28:28 +0000 (09:28 -0500)] 
Merge branch 'master' of git://git.denx.de/u-boot-sunxi

6 years agoMerge tag 'u-boot-imx-20190110' of git://git.denx.de/u-boot-imx
Tom Rini [Thu, 10 Jan 2019 14:28:16 +0000 (09:28 -0500)] 
Merge tag 'u-boot-imx-20190110' of git://git.denx.de/u-boot-imx

Fixes for 2019.01

6 years agommc: sunxi: Fix mmc clocks for DM_MMC
Jagan Teki [Wed, 9 Jan 2019 11:28:39 +0000 (16:58 +0530)] 
mmc: sunxi: Fix mmc clocks for DM_MMC

Existing clock configure code has been followed based on the
legacy MMC dt node definitions and it cannot work with recent
dts(i) sync from Linux.

So, add clock configure code for Allwinner platforms which support
DM_MMC and eventually this will drop once CLK support is in Mainline.

Fixes: 3c92cca3cda0 ("ARM: dts: sun4i: Update A10 dts(i) files from Linux-v4.18-rc3")
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Priit Laes <plaes@plaes.org> # Gemei G9 A10 Tablet
Tested-by: Marek Kraus <gamelasterv2@gmail.com> # A10-OLinuXino-Lime
6 years agoMerge branch '2019-01-08-master-imports'
Tom Rini [Wed, 9 Jan 2019 21:02:29 +0000 (16:02 -0500)] 
Merge branch '2019-01-08-master-imports'

- stm32f7 GPIO fixes
- SATA env fixes
- More DM migration deadline warnings
- Regression fix for non-DM MMC drivers
- dma_alloc_coherent size fix on ARM.

6 years agoimx8m: clock: Fix oscillator values
Fabio Estevam [Fri, 28 Dec 2018 18:43:01 +0000 (16:43 -0200)] 
imx8m: clock: Fix oscillator values

OSC_27M_CLK should return 27MHz and OSC_32K_CLK should return
32768Hz to reflect the reality.

This also keeps the values in sync with the Linux clock tree.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
6 years agotools: imx8image: set dcd_skip to true
Peng Fan [Sat, 15 Dec 2018 12:19:58 +0000 (12:19 +0000)] 
tools: imx8image: set dcd_skip to true

To B0[+] chips, dcd_skip needs to be true. For A0 chip, it needs
to be false, however A0 chip is no longer being supported anymore.
Considering we are moving code from imx-mkimage to uboot mkimage,
to make sure we not introduce some surprise, we still keep dcd_skip
code there.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
6 years agoimx8: cpu: correct info
Peng Fan [Sat, 15 Dec 2018 12:19:55 +0000 (12:19 +0000)] 
imx8: cpu: correct info

The CPU banner printed is as following:
CPU:   CPU:   Freescale i.MX8QXP RevB A35 at 147228 MHz

1. Drop the CPU:
2. Change vendor from Freescale to NXP

Signed-off-by: Peng Fan <peng.fan@nxp.com>
6 years agomisc: imx8: scu: use platdata instead of priv data
Peng Fan [Sat, 15 Dec 2018 12:19:52 +0000 (12:19 +0000)] 
misc: imx8: scu: use platdata instead of priv data

priv data has not been allocated when doing bind, so it is
wrong to use dev_get_priv in bind call back.

Let's switch to use platdata in the driver to fix the issue.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agomisc: imx: scu: avoid write null pointer
Peng Fan [Sat, 15 Dec 2018 12:19:49 +0000 (12:19 +0000)] 
misc: imx: scu: avoid write null pointer

When boot_dev is true, fill boot device. However the original logic is when
boot_dev is false, fill boot device, this will trigger data abort.

Also fix sc_misc_get_control when using pointer val.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
6 years agoclk: imx8: fix build warning
Peng Fan [Sat, 15 Dec 2018 12:19:46 +0000 (12:19 +0000)] 
clk: imx8: fix build warning

When build clk driver in spl, met the warning:
"
drivers/clk/imx/clk-imx8.c:21:25: warning: ‘imx8_clk_names’ defined but not used [-Wunused-variable]
 static struct imx8_clks imx8_clk_names[] = {
                         ^~~~~~~~~~~~~~
"

Fix with wrapping the array with CONFIG_CMD_CLK.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
6 years agoMAINTAINERS: update NXP i.MX mail list address
Peng Fan [Sat, 15 Dec 2018 12:07:02 +0000 (12:07 +0000)] 
MAINTAINERS: update NXP i.MX mail list address

Update NXP i.MX mail list address

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
6 years agoboard: tbs2910: Remove FIT support in defconfig to reduce u-boot size
Soeren Moch [Sat, 5 Jan 2019 08:31:18 +0000 (09:31 +0100)] 
board: tbs2910: Remove FIT support in defconfig to reduce u-boot size

The current defconfig build generates a u-boot.imx file that is too large
for the available space on a eMMC/SD card. Installing this file overwrites
the u-boot environment. So disable the unused FIT support to reduce the
size of the u-boot binary.

Signed-off-by: Soeren Moch <smoch@web.de>
6 years agoboard: tbs2910: Add u-boot.imx size limit check
Soeren Moch [Sat, 5 Jan 2019 08:31:17 +0000 (09:31 +0100)] 
board: tbs2910: Add u-boot.imx size limit check

Check the size of the generated u-boot.imx file. Report an error
if it would be too big and overwrite the u-boot environment.

Signed-off-by: Soeren Moch <smoch@web.de>
6 years agoimx: Add Makefile dependency for mkimage_fit_atf.sh
Chris Spencer [Thu, 20 Dec 2018 09:25:24 +0000 (09:25 +0000)] 
imx: Add Makefile dependency for mkimage_fit_atf.sh

The mkimage_fit_atf.sh SPL FIT generator script requires
u-boot-nodtb.bin, but this was not enforced by the Makefile. This could
cause the generator script to be executed before u-boot-nodtb.bin has
been created.

Signed-off-by: Chris Spencer <christopher.spencer@sea.co.uk>
Cc: NXP i.MX U-Boot Team <uboot-imx@nxp.com>
6 years agoarm: mx5: Enable WDT and bootcounter on M53Menlo
Marek Vasut [Fri, 7 Dec 2018 01:36:38 +0000 (02:36 +0100)] 
arm: mx5: Enable WDT and bootcounter on M53Menlo

Enable watchdog and bootcounter support on the M53Menlo board.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
6 years agoARM: vf610: ddrmc: do not write CR79 by default
Stefan Agner [Tue, 4 Dec 2018 10:10:21 +0000 (11:10 +0100)] 
ARM: vf610: ddrmc: do not write CR79 by default

The current value CTLUPD_AREF(0) is the reset value of the register,
so there is no need to write a value. If needed, the register can be
written using board specific CR settings.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
6 years agoARM: vf610: ddrmc: fix initialization completion detection
Stefan Agner [Tue, 4 Dec 2018 10:10:20 +0000 (11:10 +0100)] 
ARM: vf610: ddrmc: fix initialization completion detection

The CR80 register has multiple interrupt bits, the code is supposed
to check bit 8 but instead uses a logical and. In most cases this
probably did not affect real operations since at that stage typically
none of the other bits are set.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agoARM: vf610: ddrmc: fix CR138 preprocessor define
Stefan Agner [Tue, 4 Dec 2018 10:10:19 +0000 (11:10 +0100)] 
ARM: vf610: ddrmc: fix CR138 preprocessor define

According to the data sheet bits 10-8 are PHYDRAM_CK_EN. Fix mask
to allow setting PHYDRAM_CK_EN correctly.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
6 years agotoradex: colibri_vf: fix memory initialization
Stefan Agner [Tue, 4 Dec 2018 10:10:18 +0000 (11:10 +0100)] 
toradex: colibri_vf: fix memory initialization

Commit 3f353ceccbbb ("vf610: refactor DDRMC code") changed on-die
termination (ODT) values from 120 Ohm to 60 Ohm and enabled a static
read/write leveling which has not been tested with this board. This
commit reverts both changes and makes sure that memory gets
initialized as it has been done before the mentioned commit.

Fixes: 3f353ceccbbb ("vf610: refactor DDRMC code")
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
6 years agoARM: vf610: ddrmc: program Dummy DDRBYTE1/2
Stefan Agner [Fri, 14 Dec 2018 14:26:00 +0000 (15:26 +0100)] 
ARM: vf610: ddrmc: program Dummy DDRBYTE1/2

The Vybrid reference manual VFXXXRM Rev. 0 10/2016 states in chapter
5.2.6.1 DUMMY PADS (DDR/QuadSPI) that those pads need to be programed
for correct operation of DDR. Assume the default DDR pin configuration
which seems to work well on a Colibri VF50.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
6 years agoboard: toradex: colibri_vf: unset NFS and LOADS/B
Stefan Agner [Thu, 6 Dec 2018 13:55:03 +0000 (14:55 +0100)] 
board: toradex: colibri_vf: unset NFS and LOADS/B

Safe some space by not selecting CMD_NFS and CMD_LOADS/B.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
6 years agousb: xhci-mem: Fix scratchpad array issue
Ye Li [Mon, 7 Jan 2019 02:45:46 +0000 (02:45 +0000)] 
usb: xhci-mem: Fix scratchpad array issue

After updating the value of dev_context_ptrs[0], we should flush this
from cache to memory. Otherwise the xhci controller won't use it.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Marek Vasut <marex@denx.de>
6 years agogpio: stm32f7: Fix SPL code size
Patrice Chotard [Fri, 4 Jan 2019 09:55:06 +0000 (10:55 +0100)] 
gpio: stm32f7: Fix SPL code size

In order to keep SPL code size below the 32Kb limit,
put under CONFIG_SPL_BUILD flag all unused code in SPL.
This is needed for stm32f7xx board which are using SPL.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agogpio: stm32f7: Fix gpio bank hole management
Patrice Chotard [Fri, 4 Jan 2019 09:55:05 +0000 (10:55 +0100)] 
gpio: stm32f7: Fix gpio bank hole management

In case "gpio-ranges" property is not present in device tree,
use default value for gpio_count and gpio_range.
This fixes an issue on stm32 F7 and H7 boards where "pinmux status -a"
command didn't return any pin status due to the fact that both stm32 F7
and H7 board DT doesn't use the gpio-ranges property.

Fixes: dbf928dd2634a6("gpio: stm32f7: Add gpio bank holes management")
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoenv: sata: Fix saveenv issue
Ye Li [Mon, 7 Jan 2019 09:22:35 +0000 (09:22 +0000)] 
env: sata: Fix saveenv issue

Wrong env buffer was passed into sata write function, cause the saveenv
not work.

Signed-off-by: Ye Li <ye.li@nxp.com>
6 years agoarm: ti: boot: Remove legacy Android partitions
Sam Protsenko [Fri, 4 Jan 2019 20:09:08 +0000 (22:09 +0200)] 
arm: ti: boot: Remove legacy Android partitions

Remove unused Android partitions:
  - efs, crypto, cache: we don't use it anymore (images are not built
    in AOSP
  - ipu1, ipu2: IPU firmware is now a part of vendor image and doesn't
    reside as a separate partition

While at it, rename "reserved" partition to "uboot-env", as it's
actually stores U-Boot environment.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
6 years agoenv: sata: Add missed env location for SATA boot
Ye Li [Fri, 4 Jan 2019 09:34:24 +0000 (09:34 +0000)] 
env: sata: Add missed env location for SATA boot

The env location label ENVL_ESATA is missed in location tables, so
when we configure the ENV in SATA, u-boot fails to get correct env
location and cause boot hang in board_f.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
6 years agoarm: Round the dma_alloc_coherent memory size to cache line aligned
Ye Li [Fri, 4 Jan 2019 09:24:14 +0000 (09:24 +0000)] 
arm: Round the dma_alloc_coherent memory size to cache line aligned

When running usb dwc3 gadget driver, we meet random USB enumeration failure in fastboot.
The root cause is a cache coherence issue. When it happens, the ctrl_req in
gadget driver is allocated at 0xfe932f40, and the usb_composite_dev (cdev)
is allocated at 0xfe932f60. So after we submit the setup request (cache flushed) to USB
controller, any accessing to usb_composite_dev variable will cause the cache line refill, then
when setup transfer is completed, reading the setup data in ctrl_req will gets old value from
cache not from memory.

The ctrl_req is allocated by API dma_alloc_coherent, but u-boot don't have cohernet memory.
so it still needs cache maintain operations before/after HW accessing. Since the cache flush or
invalidate bases on cache line, so when the allocated memory size is not cache line aligned,
potentially it may meet such issue.

This patch modifies the dma_alloc_coherent API to round the size to cache line aligned.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
6 years agodoc: README.commands: fix type
Heinrich Schuchardt [Sun, 30 Dec 2018 12:00:51 +0000 (13:00 +0100)] 
doc: README.commands: fix type

%s/commmand/command/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agodm: video: lcd: MIGRATION: Add migration plan for video
Simon Glass [Fri, 28 Dec 2018 21:03:08 +0000 (14:03 -0700)] 
dm: video: lcd: MIGRATION: Add migration plan for video

Add a migration plan for video which is an important subsystem in U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agodm: pci: MIGRATION: Add migration plan for PCI
Simon Glass [Fri, 28 Dec 2018 21:03:07 +0000 (14:03 -0700)] 
dm: pci: MIGRATION: Add migration plan for PCI

Add a migration plan for PCI which is an important subsystem in U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 years agoigep003x: MAINTAINER: Remove myself as maintainer and add Javier
Enric Balletbo i Serra [Fri, 28 Dec 2018 10:55:47 +0000 (11:55 +0100)] 
igep003x: MAINTAINER: Remove myself as maintainer and add Javier

I can't continue maintaining the board because I don't have access to the
hardware anymore, so remove myself from the entry and add Javier who has
volunteered to help and maintain the board.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Javier Martínez Canillas <javier@dowhile0.org>
6 years agoAdd a github template telling people to not use pull requests there
Tom Rini [Thu, 27 Dec 2018 14:22:55 +0000 (09:22 -0500)] 
Add a github template telling people to not use pull requests there

On our mirror account on github we have gotten a handful of pull
requests.  At this time github does not allow you to disable pull
requests on a project.  The generally suggested work-around is to add a
pull request template that tells people to not use that workflow.  Add
one here that points to the wiki page on submitted patches.

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agommc: bring back partition init for non-DM MMC drivers
Andre Przywara [Mon, 17 Dec 2018 10:05:45 +0000 (10:05 +0000)] 
mmc: bring back partition init for non-DM MMC drivers

Commit d0851c893706 ("blk: Call part_init() in the post_probe() method")
removed the call to part_init() in mmc.c, as this is done by the DM_MMC
framework.
However Allwinner is (still) relying on a non-DM MMC driver, so we are
now missing the implicit partition init, leading to failing MMC accesses
due to the missing partition information.

Bring the call back just for non-DM MMC driver to fix this regression.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Soeren Moch <smoch@web.de>
6 years agosunxi: drop default SPL_LIBDISK_SUPPORT enablement
Andre Przywara [Mon, 17 Dec 2018 10:05:44 +0000 (10:05 +0000)] 
sunxi: drop default SPL_LIBDISK_SUPPORT enablement

There is no code for using partition labels in the Allwinner SPL port.
Even so the name is slightly misleading, CONFIG_SPL_LIBDISK_SUPPORT was
meant to guard partition code for the SPL.

Remove the "imply" line in the Kconfig to make this obvious and avoid
unneeded code inclusions, helping to keep the H6 SPL code small.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoMerge tag 'v2019.01-rc3' into master
Michal Simek [Wed, 9 Jan 2019 10:19:45 +0000 (11:19 +0100)] 
Merge tag 'v2019.01-rc3' into master

Prepare v2019.01-rc3

CONFIG_USB_STORAGE is removed from zc702/zc706_eeprom because it is
selected automatically.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoARM: zynq: Remove hardcoded ethaddr
Michal Simek [Mon, 17 Dec 2018 15:26:04 +0000 (16:26 +0100)] 
ARM: zynq: Remove hardcoded ethaddr

Eth address should be randomly generated.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Add support for SHA3 command
T Karthik Reddy [Mon, 7 Jan 2019 11:35:11 +0000 (17:05 +0530)] 
arm64: zynqmp: Add support for SHA3 command

This patch adds support for SHA3 command. It takes data blob
as input and generates 48 bytes sha3 hash value.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Add support for RSA command
T Karthik Reddy [Mon, 7 Jan 2019 11:35:10 +0000 (17:05 +0530)] 
arm64: zynqmp: Add support for RSA command

This patch adds support for RSA command, performs RSA encrypt &
RSA decrypt on data blob of key size.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoARM: zynq: Run distribution boot commands first
Michal Simek [Thu, 3 Jan 2019 12:58:27 +0000 (13:58 +0100)] 
ARM: zynq: Run distribution boot commands first

This patch is doing two things.
1. Exchanging order of boot commands. distro_bootcmd is run first
followed by Xilinx boot command.
2. Remove CONFIG_BOOTCOMMAND from configs (and follow mainline) by
creating Xilinx distribution bootcommand and wiring it as the last
bootcommand.

QSPI, NAND distribution boot command will be added later.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoARM: zynq: Deprecate xilinx boot commands
Michal Simek [Thu, 3 Jan 2019 12:47:17 +0000 (13:47 +0100)] 
ARM: zynq: Deprecate xilinx boot commands

Start to deprecate Xilinx commands which should be replaced by more
generic distribution commands. All current Xilinx bootcommands will be
in tree till end of 2019 and then they will be removed.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agonet: phy: Fix logic around gmiitorgmii wiring
Michal Simek [Fri, 21 Dec 2018 07:35:30 +0000 (08:35 +0100)] 
net: phy: Fix logic around gmiitorgmii wiring

There is no reason to try to connect gmii2rgmii bridge if fixed phy is
detected already. Check phydev before gmii2rgmii bridge is connected.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agozynq-gem: Use appropriate cache flush/invalidate for RX and TX
Stefan Theil [Mon, 17 Dec 2018 08:12:30 +0000 (09:12 +0100)] 
zynq-gem: Use appropriate cache flush/invalidate for RX and TX

The cache was only flushed before *transmitting* packets, but not
when receiving them, leading to an issue where new packets were
handed to the receive handler with old contents in cache. This
only happens when a lot of packets are received without sending
packages every now and then. Also flushing the receive buffers
in the transmit function makes no sense and can be removed.

Signed-off-by: Stefan Theil <stefan.theil@mixed-mode.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoi2c: i2c-cdns: Use proper input frequency
Tomasz Gorochowik [Thu, 20 Dec 2018 15:10:35 +0000 (16:10 +0100)] 
i2c: i2c-cdns: Use proper input frequency

This is needed to properly calculate i2c bus speed divisors.

Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
Signed-off-by: Wojciech Tatarski <wtatarski@antmicro.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Fix mmc node names to be in sync with kernel
Siva Durga Prasad Paladugu [Thu, 3 Jan 2019 10:14:24 +0000 (15:44 +0530)] 
arm64: zynqmp: Fix mmc node names to be in sync with kernel

This patches renames sd nodes in dts to be in line with
kernel. This patch also modifies the references for the same
in code.
It checks mmc first to have no time penalty for new DT node names based
on left-to-right expression evaluation.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Run distribution boot commands first
Michal Simek [Wed, 12 Dec 2018 13:03:14 +0000 (14:03 +0100)] 
arm64: zynqmp: Run distribution boot commands first

This patch is doing two things.
1. Exchanging order of boot commands. distro_bootcmd is run first
followed by Xilinx boot command.
2. Remove CONFIG_BOOTCOMMAND from configs (and follow mainline) by
creating Xilinx distribution bootcommand and wiring it as the last
bootcommand.

QSPI, NAND distribution boot command will be added later.

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