platform/kernel/u-boot.git
5 years agoclk: Get the CLK by index without device
Jagan Teki [Wed, 27 Feb 2019 18:56:52 +0000 (00:26 +0530)]
clk: Get the CLK by index without device

Getting a CLK by index with device is not straight forward
for some use-cases like handling clock operations for child
node in parent driver. So we need to process the child node
in parent probe via ofnode and process CLK operation for child
without udevice but with ofnode.

So add clk_get_by_index_nodev() and move the common code
in clk_get_by_index_tail() to use for clk_get_by_index()

Cc: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agoserial: sifive: Change include order
Jagan Teki [Wed, 8 May 2019 14:26:16 +0000 (19:56 +0530)]
serial: sifive: Change include order

Like clk_get_by_index, there is requirement for
clk_get_by_index_nodev. In this case to make common
code functionalities for dev and nodev, clk_get_by_index
is trying to get the index of clock by passing ofnode
instead of actual dev like current gpio uclass does.

In these scenarios with current order of include files
the serial_sifive driver is unable to find CONFIG_ENV_SIZE.

In file included from arch/riscv/include/asm/u-boot.h:23:0,
                 from include/dm/of.h:10,
                 from include/dm/ofnode.h:12,
                 from include/clk.h:11,
                 from drivers/serial/serial_sifive.c:6:
include/environment.h:145:19: error: 'CONFIG_ENV_SIZE'
undeclared here (not in a function); did you mean 'CONFIG_CMD_XIMG'?
 #define ENV_SIZE (CONFIG_ENV_SIZE - ENV_HEADER_SIZE)

So, fix consists of changing the order of include files
in serial_sifive.c to include first common.h file.

Cc: Anup Patel <Anup.Patel@wdc.com>
Cc: Rick Chen <rick@andestech.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agoclk: sifive: fu540-prci: Change include order
Jagan Teki [Wed, 8 May 2019 14:22:18 +0000 (19:52 +0530)]
clk: sifive: fu540-prci: Change include order

Like clk_get_by_index, there is requirement for
clk_get_by_index_nodev. In this case to make common
code functionalities for dev and nodev, clk_get_by_index
is trying to get the index of clock by passing ofnode
instead of actual dev like current gpio uclass does.

In these scenarios with current order of include files
the fu540-prci driver is unable to find CONFIG_ENV_SIZE.

In file included from arch/riscv/include/asm/u-boot.h:23:0,
                 from include/dm/of.h:10,
                 from include/dm/ofnode.h:12,
                 from include/clk.h:11,
                 from include/clk-uclass.h:13,
                 from drivers/clk/sifive/fu540-prci.c:32:
include/environment.h:145:19: error: 'CONFIG_ENV_SIZE'
undeclared here (not in a function); did you mean 'CONFIG_CMD_XIMG'?
 #define ENV_SIZE (CONFIG_ENV_SIZE - ENV_HEADER_SIZE)

So, fix consists of changing the order of include files
in fu540-prci.c to include first common.h file.

Cc: Anup Patel <Anup.Patel@wdc.com>
Cc: Rick Chen <rick@andestech.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: atcspi200: Change include order
Jagan Teki [Wed, 8 May 2019 14:12:16 +0000 (19:42 +0530)]
spi: atcspi200: Change include order

Like clk_get_by_index, there is requirement for
clk_get_by_index_nodev. In this case to make common
code functionalities for dev and nodev, clk_get_by_index
is trying to get the index of clock by passing ofnode
instead of actual dev like current gpio uclass does.

In these scenarios with current order of include files
the atcspi200_spi driver is unable to find CONFIG_ENV_SIZE.

In file included from arch/nds32/include/asm/u-boot.h:24,
                 from include/dm/of.h:10,
                 from include/dm/ofnode.h:12,
                 from include/clk.h:11,
                 from drivers/spi/atcspi200_spi.c:9:
include/environment.h:145:19: error: 'CONFIG_ENV_SIZE'
undeclared here (not in a function); did you mean 'CONFIG_CMD_XIMG'?
 #define ENV_SIZE (CONFIG_ENV_SIZE - ENV_HEADER_SIZE)

So, fix consists of changing the order of include files
in atcspi200_spi.c to include first common.h file.

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agosunxi: Fix build when CONFIG_CMD_PXE or CONFIG_CMD_DHCP are disabled
Ondrej Jirman [Wed, 13 Feb 2019 17:50:36 +0000 (18:50 +0100)]
sunxi: Fix build when CONFIG_CMD_PXE or CONFIG_CMD_DHCP are disabled

Fixes a compilation failure with disabled PXE or DHCP command when using
sunxi platform.

Signed-off-by: Ondřej Jirman <megous@megous.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agoarm: dts: h6: Add Beelink GS1 initial support
Clément Péron [Fri, 12 Apr 2019 14:15:26 +0000 (16:15 +0200)]
arm: dts: h6: Add Beelink GS1 initial support

Beelink GS1 is an Allwinner H6 based TV box,
which support:
- Allwinner H6 Quad-core 64-bit ARM Cortex-A53
- GPU Mali-T720
- 2GB LPDDR3 RAM
- 16GB eMMC
- AXP805 PMIC
- 1Gbps GMAC via RTL8211E
- USB 2.0 and 3.0 Host
- HDMI port
- S/PDIF port
- 5V/2A DC power supply
- Wi-Fi/BT via Fn-Link 6222B-SRB (RTL8222BS)

Linux commit details about the sun50i-h6-beelink-gs1.dts sync:
"arm64: dts: allwinner: h6: Introduce Beelink GS1 board"
(sha1: 089bee8dd119ba084dee6b17a2e1a53df4f30193)

Signed-off-by: Clément Péron <peron.clem@gmail.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agoMerge tag 'arc-for-2019.07' of git://git.denx.de/u-boot-arc
Tom Rini [Thu, 18 Apr 2019 16:12:16 +0000 (12:12 -0400)]
Merge tag 'arc-for-2019.07' of git://git.denx.de/u-boot-arc

In this small series we migrate ARC boards to DM_MMC
so we're hopefully are good now and our boards will be kept
in U-Boot for some more time :)

5 years agoARC: [plat-axs10x]: migrate to DM_MMC
Eugeniy Paltsev [Thu, 21 Mar 2019 13:37:23 +0000 (16:37 +0300)]
ARC: [plat-axs10x]: migrate to DM_MMC

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
5 years agoARC: [plat-hsdk]: migrate to DM_MMC
Eugeniy Paltsev [Mon, 25 Feb 2019 15:35:29 +0000 (18:35 +0300)]
ARC: [plat-hsdk]: migrate to DM_MMC

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
5 years agoARC: dwmmc: Adding DesignWare MMC driver support for ARC devboards
Eugeniy Paltsev [Mon, 25 Feb 2019 15:35:28 +0000 (18:35 +0300)]
ARC: dwmmc: Adding DesignWare MMC driver support for ARC devboards

Add the DM_MMC-compatible DesignWare MMC driver support for Synopsys
ARC devboards. It is created to switch ARC devboards to use DM_MMC.

It required information such as clocks (Bus Interface Unit clock,
Card Interface Unit clock) and SDIO bus width.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-spi
Tom Rini [Wed, 17 Apr 2019 13:21:32 +0000 (09:21 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-spi

- drop non-DM code from ti_qspi
- support spi-mem for ti_qspi

5 years agoarm: am57xx: cl-som-am57x: remove board support
Uri Mashiach [Sun, 14 Apr 2019 09:17:53 +0000 (12:17 +0300)]
arm: am57xx: cl-som-am57x: remove board support

U-Boot support for the CL-SOM-AM57x module is no longer required.

Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-sunxi
Tom Rini [Wed, 17 Apr 2019 13:19:45 +0000 (09:19 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-sunxi

- Convert DM_MMC and DM_SCSI
- A20, R40, H6 Linux dts(i) sync
- CLK, RESET support for sunxi, sun8_emac net drivers

5 years agoMerge tag 'xilinx-for-v2019.07' of git://git.denx.de/u-boot-microblaze
Tom Rini [Wed, 17 Apr 2019 13:19:13 +0000 (09:19 -0400)]
Merge tag 'xilinx-for-v2019.07' of git://git.denx.de/u-boot-microblaze

Xilinx/FPGA changes for v2019.07

fpga:
- Add support for external data in FIT
- Extend testing for external data case
- Inform user about a need to run post config on Zynq

arm:
- Tune zynq command functions
- Fix internal variable setting

arm64:
- Add support for zc39dr decoding
- Disable WDT for zcu100
- Small changes in reset_reason()
- Some DT changes (spi)
- Tune qspi-mini configuration
- Remove useless eeprom setting
- Fix two sdhci boot case

spi:
- Fix tap delay programming

clk:
- Enable i2c in SPL

net:
- Fix gem phydev handling
- Remove phy detection code from gem driver

general:
- Correct EXT_DTB usage for MULTI_DTB_FIT configuration

5 years agoMerge tag 'uniphier-v2019.07' of git://git.denx.de/u-boot-uniphier
Tom Rini [Wed, 17 Apr 2019 13:16:38 +0000 (09:16 -0400)]
Merge tag 'uniphier-v2019.07' of git://git.denx.de/u-boot-uniphier

UniPhier SoC updates for v2019.07

- Sync DT with Linux 5.1-rc4

- Enable CONFIG_SUPPORT_EMMC_RPMB for uniphier_v8_defconfig

5 years agospi: ti_qspi: Convert to spi-mem ops
Vignesh Raghavendra [Tue, 16 Apr 2019 16:02:00 +0000 (21:32 +0530)]
spi: ti_qspi: Convert to spi-mem ops

Convert driver to use  spi-mem ops in order to support accelerated MMIO
flash interface in generic way and for better performance.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: ti_qspi: Drop non DM code
Vignesh Raghavendra [Tue, 16 Apr 2019 16:01:59 +0000 (21:31 +0530)]
spi: ti_qspi: Drop non DM code

Now that all boards using TI QSPI have moved to DM and DT, drop non DM
code completely.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
[jagan: update MIGRATION.txt, rebase config_whitelist.txt]
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agosunxi: update SATA driver to always use DM_SCSI
Andre Przywara [Fri, 12 Apr 2019 10:58:54 +0000 (16:28 +0530)]
sunxi: update SATA driver to always use DM_SCSI

It seems like the Allwinner SATA driver is already quite capable of
using the driver model, so we can force this on all boards and can
remove support for a non-DM_SCSI build.
This removes the warning about boards with SATA ports not being
DM_SCSI compliant.

It also takes the opportunity to move the driver out of the board/sunxi
directory to join its siblings in drivers/ata, and to make it a proper
Kconfig citizen.

The board defconfigs stay untouched.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagan Teki <jagan@openedev.com>
[jagan: select DM_SCSI separately]
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agoarm: sunxi: Enable DM_MMC and DM_SCSI
Jagan Teki [Fri, 12 Apr 2019 11:18:25 +0000 (16:48 +0530)]
arm: sunxi: Enable DM_MMC and DM_SCSI

- Enable DM_MMC if MMC defined
- Enable DM_SCSI if SCSI defined

globally through Allwinner platform, the effected SoC families
and boards will make use of MMC and SCSI subsystems in driver-model.

Tested DM_MMC in one board from A64, H6, H5, H3, R40, A83T, A20, A10
SoCs.

Tested-by: Pablo Sebastián Greco <pgreco@centosproject.org> # BPI-M2-Ultra
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agoARM: dts: sun8i-r40-bananapi-m2-berry: Enable AHCI
Jagan Teki [Mon, 15 Apr 2019 06:12:32 +0000 (11:42 +0530)]
ARM: dts: sun8i-r40-bananapi-m2-berry: Enable AHCI

Enable ahci node for BPI-M2-Berry, this would require since
we have DM_SCSI enabled on the respective SoC.

Unable to sync the same node from Linux, since the similar change
is still in Linux ML.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agoARM: dts: a20-wits-pro-a20-dkt: Enable AHCI
Jagan Teki [Fri, 12 Apr 2019 12:11:58 +0000 (17:41 +0530)]
ARM: dts: a20-wits-pro-a20-dkt: Enable AHCI

Enable ahci node for a20-wits-pro-a20-dkt, this would require since
we have DM_SCSI enabled on the respective SoC.

Right now, ahci enabled in -u-boot.dtsi and will remove once same
supported by Linux.

Cc: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agoARM: dts: a20-m5: Enable AHCI
Jagan Teki [Fri, 12 Apr 2019 12:05:24 +0000 (17:35 +0530)]
ARM: dts: a20-m5: Enable AHCI

Enable ahci node for sun7i-a20-m5.dts, this would require since
we have DM_SCSI enabled on the respective SoC.

No need to send patch to Linux for this change, since this
dts is U-Boot specific.

Cc: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agoboard: sunxi: Add R40 sata compatible
Jagan Teki [Fri, 12 Apr 2019 11:17:56 +0000 (16:47 +0530)]
board: sunxi: Add R40 sata compatible

Add sata compatible for R40.

Cc: Pablo Sebastián Greco <pgreco@centosproject.org>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agoarm: allwinner: dts: a20: Sync A20 dts(i) files from Linux 5.1-rc2
Jagan Teki [Fri, 12 Apr 2019 10:49:34 +0000 (16:19 +0530)]
arm: allwinner: dts: a20: Sync A20 dts(i) files from Linux 5.1-rc2

Sync sun7i-a20 dts(i) files from Linux 5.1-rc2

Linux commit details about the sun7i-a20* sync:
"ARM: dts: sun7i: bananapi: Add GPIO banks regulators"
(sha1: 09c6572290f018d73ec2e812e28bada34d41815f)

Here are U-Boot specific dts changes.

- s/uart0_pins_a/uart0_pb_pins for
  sun7i-a20-ainol-aw1.dts
  sun7i-a20-m5.dts
  sun7i-a20-primo73.dts
  sun7i-a20-yones-toptech-bd1078.dts
  sunxi-itead-core-common.dtsi
- s/gmac_pins_mii_a/gmac_rgmii_pins for
  sun7i-a20-m5.dts
- drop i2c0, i2c1 pins from
  sunxi-itead-core-common.dtsi
- drop mmc0 pins from
  sun7i-a20-primo73.dts

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agoarm: allwinner: r40: Sync R40 dts(i) files from Linux 5.1-rc2
Jagan Teki [Tue, 9 Apr 2019 09:38:51 +0000 (15:08 +0530)]
arm: allwinner: r40: Sync R40 dts(i) files from Linux 5.1-rc2

Sync sun8i-r40 dts(i) files from Linux 5.1-rc2

Linux commit details about the sun8i-r40* sync:
"ARM: dts: sun8i: r40: bananapi-m2-ultra: Add Bluetooth device node"
(sha1: 1e5f1db4ccd8348a21da55bff82f4263000879ef)

Linux commit details about the sun8i-v40* sync:
"ARM: dts: sunxi: Fix I2C bus warnings"
(sha1: 0729b4af5753b65aa031f58c435da53dbbf56d19)

Cc: Pablo Sebastián Greco <pgreco@centosproject.org>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agoARM: uniphier_v8: enable CONFIG_SUPPORT_EMMC_RPMB
Masahiro Yamada [Fri, 12 Apr 2019 09:55:51 +0000 (18:55 +0900)]
ARM: uniphier_v8: enable CONFIG_SUPPORT_EMMC_RPMB

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoARM: dts: uniphier: sync with Linux 5.1-rc4
Masahiro Yamada [Fri, 12 Apr 2019 09:55:50 +0000 (18:55 +0900)]
ARM: dts: uniphier: sync with Linux 5.1-rc4

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agoboard: sunxi: gmac: Remove Ethernet clock and reset
Jagan Teki [Wed, 27 Feb 2019 18:57:01 +0000 (00:27 +0530)]
board: sunxi: gmac: Remove Ethernet clock and reset

Since Ethernet clock and reset is now handling via
CLK and RESET frameworks via driver API's remove
explicit ccm writes.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agonet: sun8i_emac: Add CLK and RESET support
Jagan Teki [Wed, 27 Feb 2019 18:56:58 +0000 (00:26 +0530)]
net: sun8i_emac: Add CLK and RESET support

Add CLK and RESET support for sun8i_emac driver to
enable TX clock and reset pins via CLK and RESET
framework.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Lothar Felten <lothar.felten@gmail.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agonet: sun8i_emac: Retrieve GMAC clock via 'syscon' phandle
Jagan Teki [Wed, 27 Feb 2019 18:56:51 +0000 (00:26 +0530)]
net: sun8i_emac: Retrieve GMAC clock via 'syscon' phandle

Unlike other Allwinner SoC's R40 GMAC clock control register
is locate in CCU, but rest located via syscon itself. Since
the phandle property for current code look for 'syscon' and
it will grab the respective ccu or syscon base address based
on DT property defined in respective SoC dtsi.

So, use the existing 'syscon' code even for R40 for retrieving
GMAC clock via CCU and update the register directly in
sun8i_emac_set_syscon instead of writing it separately using
ccm base.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Lothar Felten <lothar.felten@gmail.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agonet: sunxi_emac: Add CLK support
Jagan Teki [Wed, 27 Feb 2019 18:56:50 +0000 (00:26 +0530)]
net: sunxi_emac: Add CLK support

Add CLk support for sunxi_emac to enable AHB_EMAC clock
via CLK framework.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agoclk: sunxi: r40: Fix GMAC reset reg offset
Jagan Teki [Mon, 15 Apr 2019 11:12:16 +0000 (16:42 +0530)]
clk: sunxi: r40: Fix GMAC reset reg offset

GMAC reset reg offset added by below commit seems to assume
it as EMAC but R40 indeed using GMAC.
"clk: sunxi: Implement EMAC, GMAC clocks, resets"
(sha1: 68620c9698f109c1f001f80d282138a5c67cabef)

So, fix by updating the reg offset for RST_BUS_GMAC.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agoarm64: zynqmp: fix preprocessor check for SPL_ZYNQMP_TWO_SDHCI
Luca Ceresoli [Mon, 15 Apr 2019 14:18:18 +0000 (16:18 +0200)]
arm64: zynqmp: fix preprocessor check for SPL_ZYNQMP_TWO_SDHCI

A missing CONFIG_ prefix while checking for this Kconfig variable makes the
check always fail. Fix it. While there also switch from the '#if defined'
form to the '#ifdef' form as the other checks in this function.

Fixes: 35e2b92344b1 ("arm64: zynqmp: Fix logic around CONFIG_ZYNQ_SDHCI")

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: zynqmp: Remove eeprom setting
Michal Simek [Mon, 25 Feb 2019 09:01:22 +0000 (10:01 +0100)]
arm64: zynqmp: Remove eeprom setting

By moving to DM_I2C there is no need to specify any eeprom configuration
because it is read from DT.

Reported-by: Sreeja Vadakattu <sreeja.vadakattu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agonet: gem: Remove phy autodetection code
Michal Simek [Fri, 29 Mar 2019 08:25:09 +0000 (09:25 +0100)]
net: gem: Remove phy autodetection code

There is no reason to detect phy when core is doing it for us.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agonet: zynq_gem: Modify phy supported features after max-speed was set
Siva Durga Prasad Paladugu [Wed, 27 Mar 2019 12:09:59 +0000 (17:39 +0530)]
net: zynq_gem: Modify phy supported features after max-speed was set

The phydev supported features were reset in phy_set_supported() so,
move the setting of driver supported features after this so that it
wont lost in phy_set_supported().

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoMakefile: Prioritize external dtb if defined
Michal Simek [Sat, 23 Mar 2019 05:43:00 +0000 (11:13 +0530)]
Makefile: Prioritize external dtb if defined

Prioritize external dtb if its passed via EXT_DTB
than the dtb that was built in the tree. With this
patch it appends the specified external dtb to
the u-boot image.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agoarm: zynq: Add an info message about post config
Siva Durga Prasad Paladugu [Sat, 23 Mar 2019 10:31:36 +0000 (16:01 +0530)]
arm: zynq: Add an info message about post config

Post configuration cant be run at u-boot as u-boot
didn't has any info about the design.So,this patch
adds an info message that post config was not run
and needs to be run manually if needed.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: zynqmp: Add idcode for new RFSoC silicon ZU39DR
Siva Durga Prasad Paladugu [Sat, 23 Mar 2019 09:30:06 +0000 (15:00 +0530)]
arm64: zynqmp: Add idcode for new RFSoC silicon ZU39DR

This patch adds "zu39dr" to the list of zynqmp devices
The zu39DR is the new RFSoC silicon with id value of 0x66.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoARM: zynq: fix environment command syntax
Melin Tomas [Wed, 10 Apr 2019 07:26:07 +0000 (07:26 +0000)]
ARM: zynq: fix environment command syntax

Update EXTRA_ENV_SETTINGS and related commands to use 'setenv'
instead of short name 'set' in commands.

E.g. in case command setexpr is enabled the short form does not work
properly as the name becomes ambigous.

Fixes error messages like:

    U-Boot> set
    Unknown command 'set' - try 'help'

Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoARM: zynq: Add missing i2c get_rate for fixing i2c SPL
Hannes Schmelzer [Thu, 14 Feb 2019 07:54:42 +0000 (08:54 +0100)]
ARM: zynq: Add missing i2c get_rate for fixing i2c SPL

The commit 'f48ef0d81aa837a33020f8d61abb3929ba613774' did break I2C
support because requesting the clock for the I2C ip-block isn't
supported during SPL.

To fixup this we add support requesting clocks for:
- i2c0
- i2c1

Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: xilinx: zynqmp: Remove unneeded configs
Siva Durga Prasad Paladugu [Tue, 19 Mar 2019 06:20:52 +0000 (11:50 +0530)]
arm64: xilinx: zynqmp: Remove unneeded configs

Remove unneeded configs from mini qspi configuration
so that it saves space for this mini configuration.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: zynqmp: Define label for flash node
Siva Durga Prasad Paladugu [Tue, 19 Mar 2019 06:20:50 +0000 (11:50 +0530)]
arm64: zynqmp: Define label for flash node

Define a label for flash node so that it can be
referenced easily as required.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: zynqmp: Add spi-flash compatible string to flash node
Siva Durga Prasad Paladugu [Tue, 19 Mar 2019 06:20:49 +0000 (11:50 +0530)]
arm64: zynqmp: Add spi-flash compatible string to flash node

spi-flash compatible string is needed for reading tx and rx bus
widths, hence add this compatible string to flash node.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: zynqmp: Add debug message about clearing BSS
Michal Simek [Thu, 21 Feb 2019 09:42:40 +0000 (10:42 +0100)]
arm64: zynqmp: Add debug message about clearing BSS

Just have better view on system.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoARM: zynq: Check zynq aes & rsa command parameters count
T Karthik Reddy [Tue, 12 Mar 2019 14:50:21 +0000 (20:20 +0530)]
ARM: zynq: Check zynq aes & rsa command parameters count

This patch checks for zynq aes & rsa commands max parameters count. Also
checks minimum number of parameters count for aes command.

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>
5 years agoarm64: zynqmp: Use zynqmp_mmio_read/write functions
T Karthik Reddy [Wed, 13 Mar 2019 14:54:18 +0000 (20:24 +0530)]
arm64: zynqmp: Use zynqmp_mmio_read/write functions

Changed the return type of reset_reason() to int from u32, because
zynqmp_mmio_read/write() returns signed value on error.
Replaced readl and writel functions with zynqmp_mmio_read &
zynqmp_mmio_write functions to access RESET_REASON(CRL_APB) registers.

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>
5 years agospi: zynqmp_gqspi: Fix tap delay values at 100MHz and 150MHz
Siva Durga Prasad Paladugu [Thu, 7 Mar 2019 10:38:48 +0000 (16:08 +0530)]
spi: zynqmp_gqspi: Fix tap delay values at 100MHz and 150MHz

This patch fixes the tap delay values to be set at 100MHz and 150MHz
as per TRM by fixing the if condition to use <= instead of <.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoarm64: zynqmp: Disable WDT for zcu100
Michal Simek [Thu, 14 Feb 2019 13:22:48 +0000 (14:22 +0100)]
arm64: zynqmp: Disable WDT for zcu100

Do not enable WDT by default on this target because distributions are
not enabling watchdog driver to service it.

Feature has been enabled by:
"arm64: zynqmp: Enable cadence WDT for zcu100"
(sha1: 767afebbcda59f3ccb04f6c94de8cab2fb7905b6)

And WDT is still enabled in rebranded Avnet Ultra 96 board support.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agotest: py: Extend fpga test with fit image with external data
Michal Simek [Mon, 18 Feb 2019 12:22:56 +0000 (13:22 +0100)]
test: py: Extend fpga test with fit image with external data

Images are created
mkimage -f fit.its -E  download-fit-external.ub

and test expects these entries.

env__fpga_under_test = {
    ...
    "mkimage_fit_external": download-fit-external.ub",
    "mkimage_fit_external_size": xxxxx,
    ...
}

Test download file and loads it to fpga.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agofpga: Replace char * with const char * for filename
Tien Fong Chee [Fri, 15 Feb 2019 07:57:07 +0000 (15:57 +0800)]
fpga: Replace char * with const char * for filename

Ensure the string for filename is always constant, otherwise it can be
corrupted by the writing.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agofpga: Add support for getting external data address and length
Tien Fong Chee [Tue, 12 Feb 2019 12:41:34 +0000 (20:41 +0800)]
fpga: Add support for getting external data address and length

This function supports getting both data address and length for
existing FPGA subimage and FPGA external data.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoMerge tag 'u-boot-imx-20190415' of git://git.denx.de/u-boot-imx
Tom Rini [Mon, 15 Apr 2019 11:31:14 +0000 (07:31 -0400)]
Merge tag 'u-boot-imx-20190415' of git://git.denx.de/u-boot-imx

Move to DM
-----------

- DM support in sata
- Toradex Board to DM
- wandboard to DM
- tbs2910 to DM
- GE boards to DM
- VHybrid boards to DM
- DM_VIDEO for i.MX

5 years agoMerge tag 'efi-2019-07-rc1-2' of git://git.denx.de/u-boot-efi
Tom Rini [Mon, 15 Apr 2019 11:30:25 +0000 (07:30 -0400)]
Merge tag 'efi-2019-07-rc1-2' of git://git.denx.de/u-boot-efi

Pull request for UEFI sub-system for v2019.07-rc1 (2)

In the aarch64 crash dump information about the loaded EFI images is added.

In README.uefi the development target is for the UEFI subsystem is
described as "Embedded Base Boot Requirements (EBBR) Specification"
compliance.

Several bug fixes are supplied.

5 years agoMerge tag 'video-for-2019.07-rc1' of git://git.denx.de/u-boot-video
Tom Rini [Mon, 15 Apr 2019 11:30:07 +0000 (07:30 -0400)]
Merge tag 'video-for-2019.07-rc1' of git://git.denx.de/u-boot-video

- optional backlight PWM polarity config via polarity cell
- bug fix for ASCII characters > 127
- ANSI sequence handling extensions (implement clear line,
  reverse video and relative cursor movement commands)
- preparation for doing character set translations
- left/right and up/down arrow keys translation to ANSI
  control sequences for cursor movement to fix selection
  with an USB keyboard in bootmenu
- CONFIG_SYS_WHITE_ON_BLACK font scheme configuration for
  sunxi boards

5 years agoboard: tbs2910: Remove CMD_FDT support in defconfig to reduce u-boot size
Soeren Moch [Sun, 14 Apr 2019 18:41:05 +0000 (20:41 +0200)]
board: tbs2910: Remove CMD_FDT support in defconfig to reduce u-boot size

This fixes the build failure "u-boot.imx exceeds file size limit".

Signed-off-by: Soeren Moch <smoch@web.de>
5 years agoarm64: allwinner: sun50i: Sync H6 dts(i) files from Linux
Jagan Teki [Sun, 14 Apr 2019 16:52:21 +0000 (22:22 +0530)]
arm64: allwinner: sun50i: Sync H6 dts(i) files from Linux

Usually the Linux dts changes were synced in specific tags in Allwinner,
to keep track for whats been synced so-far and plan for future syncs.

But this patch sync sun50i-h6* dts(i) files from Linux w/o any specific
tag since these dts(i) changes are required for new H6 boards support.

Linux commit details about the sun50i-h6* sync:
"arm64: dts: allwinner: h6: move MMC pinctrl to dtsi"
(sha1: 6ba2e45d57afdfd982d12f168edd6a79a65075d8)

Linux commit details about the sun8i-tcon-top.h sync:
"dt-bindings: display: sunxi-drm: Add TCON TOP description"
(sha1: 59a9c39544cd1e5952c2a33028d71aa8180648f8)

Part of the sync initiated by 'Clément Péron'.

Signed-off-by: Clément Péron <peron.clem@gmail.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agosunxi: allow boards to de-select SYS_WHITE_ON_BLACK font scheme
Andre Przywara [Sat, 23 Mar 2019 01:30:02 +0000 (01:30 +0000)]
sunxi: allow boards to de-select SYS_WHITE_ON_BLACK font scheme

In the sunxi-common.h config header we unconditionally define
CONFIG_SYS_WHITE_ON_BLACK, although it's actually a Kconfig option which
could be individually selected by a user.
Remove this #define from the header and let it default to "y" on sunxi
boards (like we do for other platforms).

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agousb: kbd: Properly translate up/down arrow keys
Andre Przywara [Sat, 23 Mar 2019 01:30:01 +0000 (01:30 +0000)]
usb: kbd: Properly translate up/down arrow keys

So far arrows key pressed on an USB keyboard got translated to some
low ASCII control sequences (Ctrl+N, Ctrl+P). Some programs understand
these codes, but the standard for those keys is to use ANSI control
sequences for cursor movement (ESC [ A).
Our own boot menu is a victim of this, currently we cannot change the
selection with an USB keyboard due to this.

Since we already implement a queue for USB key codes, we can just insert
the three character ANSI sequence into the key buffer. This fixes the
bootmenu, and is more universal for other users (UEFI) as well.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agovideo/console: Factor out actual character output
Andre Przywara [Sat, 23 Mar 2019 01:29:59 +0000 (01:29 +0000)]
video/console: Factor out actual character output

In preparation for doing character set translations, factor out the
actual glyph display functionality into a separate function.
This will be used in a subsequent patch.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agovideo/console: Implement ANSI clear line command
Andre Przywara [Sat, 23 Mar 2019 01:29:58 +0000 (01:29 +0000)]
video/console: Implement ANSI clear line command

There is a standard ANSI terminal escape sequence to clear a whole line
of text. So far the DM_VIDEO console was missing this code.

Detect the sequence and use vidconsole_set_row with the background
colour to fix this omission.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agovideo/console: Implement relative cursor movement ANSI handling
Andre Przywara [Sat, 23 Mar 2019 01:29:57 +0000 (01:29 +0000)]
video/console: Implement relative cursor movement ANSI handling

The ANSI terminal escapce sequence standard defines relative cursor
movement commands (ESC [ A-F). So far the DM_VIDEO console code was
ignoring them.

Interpret those sequences and move the cursor by the requested amount of
rows or columns in the right direction. This brings the code on par with
the legacy video console driver (cfb_console).

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agovideo/console: Implement reverse video ANSI sequence for DM_VIDEO
Andre Przywara [Sat, 23 Mar 2019 01:29:56 +0000 (01:29 +0000)]
video/console: Implement reverse video ANSI sequence for DM_VIDEO

The video console for DM_VIDEO compliant drivers only understands a very
small number of ANSI sequences. First and foremost it misses the "reverse
video" command, which is used by our own bootmenu command to highlight
the selected entry.

To avoid forcing people to use their imagination when using the
bootmenu, let's just implement the rather simple reverse effect. We need
to store the background colour index for that, so that we can
recalculate both the foreground and background colour pixel values.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
[agust: merged BG color escape seq change to fix "ut dm video_ansi" test]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
5 years agovideo/console: Fix DM_VIDEO font glyph array indexing
Andre Przywara [Sat, 23 Mar 2019 01:29:55 +0000 (01:29 +0000)]
video/console: Fix DM_VIDEO font glyph array indexing

When the character to be printed on a DM_VIDEO console is from the
"extended ASCII" range (0x80 - 0xff), it will be treated as a negative
number, as it's declared as a signed char. This leads to negative array
indicies into the glyph bitmap array, and random garbled characters.

Cast the character to an unsigned type to make the index always positive
and avoid an out-of-bounds access.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agovideo: backlight: Parse PWM polarity cell
Stefan Mavrodiev [Fri, 12 Apr 2019 05:56:27 +0000 (08:56 +0300)]
video: backlight: Parse PWM polarity cell

This patch enables the reading of the polarity cell from a PWM
phandle and calls pwm_set_invert().

Not all platforms have polarity cell, so skip if it's not pressent.

Signed-off-by: Stefan Mavrodiev <stefan@olimex.com>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-spi
Tom Rini [Sun, 14 Apr 2019 04:03:06 +0000 (00:03 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-spi

Conflicts:
arch/arm/dts/armada-385-amc.dts
arch/arm/dts/armada-xp-theadorable.dts
arch/arm/dts/stm32mp157c-ev1-u-boot.dtsi

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoimx6: wandboard: fix dwc_ahsata build errors when DM enabled
Anatolij Gustschin [Mon, 1 Apr 2019 12:32:08 +0000 (14:32 +0200)]
imx6: wandboard: fix dwc_ahsata build errors when DM enabled

Enable CONFIG_AHCI to fix errors:
drivers/ata/dwc_ahsata.c: In function `ahci_init_one':
drivers/ata/dwc_ahsata.c:868:21: error: `struct blk_desc' has no member named `priv'
sata_dev_desc[pdev].priv = uc_priv;
     ^
drivers/ata/dwc_ahsata.c: In function `init_sata':
drivers/ata/dwc_ahsata.c:891:30: error: `struct blk_desc' has no member named `priv'
uc_priv = sata_dev_desc[dev].priv;
...

Also enable DM_SCSI to fix migration build warning.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
5 years agoimx6: dts: add wandboard dtb target to fix build error
Anatolij Gustschin [Mon, 1 Apr 2019 12:32:07 +0000 (14:32 +0200)]
imx6: dts: add wandboard dtb target to fix build error

Fix broken build:
Device Tree Source is not correctly specified.
Please define 'CONFIG_DEFAULT_DEVICE_TREE'
or build with 'DEVICE_TREE=<device_tree>' argument

Signed-off-by: Anatolij Gustschin <agust@denx.de>
5 years agoimx6: tbs2910: fix dtb build error
Anatolij Gustschin [Mon, 1 Apr 2019 12:45:45 +0000 (14:45 +0200)]
imx6: tbs2910: fix dtb build error

Fix broken build:
Device Tree Source is not correctly specified.
Please define 'CONFIG_DEFAULT_DEVICE_TREE'
or build with 'DEVICE_TREE=<device_tree>' argument

Signed-off-by: Anatolij Gustschin <agust@denx.de>
5 years agoapalis/colibri_imx6: add device trees to makefile
Marcel Ziswiler [Mon, 25 Mar 2019 16:38:02 +0000 (17:38 +0100)]
apalis/colibri_imx6: add device trees to makefile

Add device trees to Makefile to avoid newly introduced error:

Device Tree Source is not correctly specified.
Please define 'CONFIG_DEFAULT_DEVICE_TREE'
or build with 'DEVICE_TREE=<device_tree>' argument

make[1]: *** [dts/Makefile:28: arch/arm/dts/imx6-apalis.dtb] Error 1
make: *** [Makefile:1009: dts/dt.dtb] Error 2

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoimx: aristainetos: fix build breakage
Anatolij Gustschin [Mon, 1 Apr 2019 09:32:07 +0000 (11:32 +0200)]
imx: aristainetos: fix build breakage

ipu.h header is not found since the ipuv3 driver was moved to
the drivers/video/imx subdirectory. Fix it.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
5 years agotdx-cfg-block: fix off by one issue
Marcel Ziswiler [Mon, 25 Mar 2019 16:18:29 +0000 (17:18 +0100)]
tdx-cfg-block: fix off by one issue

Fix toradex_modules array off by one issue potentially leading to
spurious printout during boot e.g.

    Model: Toradex  V1.2A,

instead of

    Model: Toradex UNKNOWN MODULE V1.2A.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agotoradex: common: unify behaviour when config block is missing
Bhuvanchandra DV [Mon, 25 Mar 2019 16:18:28 +0000 (17:18 +0100)]
toradex: common: unify behaviour when config block is missing

If the config block is missing, various things may fail or behave
strangely on certain modules. This patch unifies that behaviour by
using a fake MAC address, until user updates the config block.

Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agotoradex: configblock: add an -y parameter to 'cfgblock create’
Dominik Sliwa [Mon, 25 Mar 2019 16:18:27 +0000 (17:18 +0100)]
toradex: configblock: add an -y parameter to 'cfgblock create’

Add an optional -y parameter to 'cfgblock create’ to simplify
automation.

Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agocolibri_vf: fix sdboot for vybrid modules
Gerard Salvatella [Mon, 25 Mar 2019 16:25:12 +0000 (17:25 +0100)]
colibri_vf: fix sdboot for vybrid modules

Currently, Vybrid's sdboot variable tries to load the kernel from /boot
of the root partition (typically second partition when using the sdcard
image). However, since we moved to flash the kernel in a separate UBI
volume, we no longer deploy the kernel/device tree to /boot, hence
sdboot does not work in its current state.

Load the kernel and device tree from the first (typically FAT) partition
as customary on all Toradex modules.

While at it also change from rw to ro as e.g. systemd will re-mount the
root file system rw anyway after checking it.

Signed-off-by: Gerard Salvatella <gerard.salvatella@toradex.com>
Acked-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agocolibri_vf: use leveling evaluated by DDR validation tools
Stefan Agner [Mon, 25 Mar 2019 16:25:11 +0000 (17:25 +0100)]
colibri_vf: use leveling evaluated by DDR validation tools

The DDR validation tool (which is part of Processor Expert) allows
to evaluate leveling parameters for CR105/CR106/CR110. Several
runs have been made with Colibri VF50 and VF61 and it seems to
evaluate very similar values. Use this values by default.

Note: The newly evaluated parameters seem to require CTLUPD_AREF
to be enabled!

Note 2: The tool also evaluated 6 as a new value for PHY02/18
GATE_CFG (Coarse adjust of gate open time). However, this seems
not to work in practise.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agocolibri_vf: adjust timing according to data sheet
Stefan Agner [Mon, 25 Mar 2019 16:25:10 +0000 (17:25 +0100)]
colibri_vf: adjust timing according to data sheet

Using the DDR Validation tool in Processor Expert uncovered two
timing inconsistencies. Since those timings are related to the
suspend mode they do not affect or change regular memory behaviour.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agoarm: vf610: add uart2 clock/pinmux support
Stefan Agner [Mon, 25 Mar 2019 16:25:09 +0000 (17:25 +0100)]
arm: vf610: add uart2 clock/pinmux support

Add support for Vybrid's UART2 (Colibri UART_B).

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoconfig: colibri_vf: enable mtd partitions via dt
Stefan Agner [Mon, 25 Mar 2019 16:25:08 +0000 (17:25 +0100)]
config: colibri_vf: enable mtd partitions via dt

Use device tree to set MTD partitions of the NAND chip.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agocolibri_vf: disable undefined instruction events in user debug
Stefan Agner [Mon, 25 Mar 2019 16:25:07 +0000 (17:25 +0100)]
colibri_vf: disable undefined instruction events in user debug

It turns out that OpenSSL calls undefined instructions to detect
ARM capabilities at runtime (via SIGILL handler). This leads to
stack traces e.g. when logging in using SSH:
  [  877.464442] sshd (613): undefined instruction: pc=76ee2da8
  ...

Disable undefined instruction events since it is used as an
autodetecion mechanism.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agocolibri_vf: enable user debug by default
Stefan Agner [Mon, 25 Mar 2019 16:25:06 +0000 (17:25 +0100)]
colibri_vf: enable user debug by default

Let the kernel print some debug messages when a user program
crashes due to an exception.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agocolibri_vf: sync the board info message
Bhuvanchandra DV [Mon, 25 Mar 2019 16:25:05 +0000 (17:25 +0100)]
colibri_vf: sync the board info message

Use similar info message as on other modules.

Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agocolibri_vf: set fdtfile for distroboot
Stefan Agner [Mon, 25 Mar 2019 16:25:04 +0000 (17:25 +0100)]
colibri_vf: set fdtfile for distroboot

Set fdtfile to represent the current board. This allows distribution
to load the correct device tree, which in the module case often
deviates from the common fallback ${soc}-${board}${boardver}.dtb...

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agocolibri_vf: add distroboot support
Stefan Agner [Mon, 25 Mar 2019 16:25:03 +0000 (17:25 +0100)]
colibri_vf: add distroboot support

Add support for distro boot. This is especially helpful for external
devices. There is a global boot command which scans a predefined
list of boot targets:
  run distro_bootcmd

As well as direct boot commands such as:
  run bootcmd_mmc0
  run bootcmd_usb
  run bootcmd_dhcp
  ...

Refer to doc/README.distro fo details.

While at it also re-order boot command macros as well as the
CONFIG_EXTRA_ENV_SETTINGS.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agoconfig: colibri_vf: use macros from linux/sizes.h
Marcel Ziswiler [Mon, 25 Mar 2019 16:25:02 +0000 (17:25 +0100)]
config: colibri_vf: use macros from linux/sizes.h

Use SZ_X{MK} macros from linux/sizes.h for include/configs/colibri_vf.h.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agocolibri_vf: migrate fec, esdhc, nfc and usb to driver model
Marcel Ziswiler [Mon, 25 Mar 2019 16:25:01 +0000 (17:25 +0100)]
colibri_vf: migrate fec, esdhc, nfc and usb to driver model

Migrate FEC, ESDHC, NFC and USB to driver model.

While at it also do no longer enable optional I2C clock in board file as
the generic clock code now handles this. Note for space reason and as
it is not required just for booting we do not enable I2C in U-Boot by
default.

While at it also update copyright period.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agocolibri_vf: migrate pinctrl and regulators to dtb/dm
Marcel Ziswiler [Mon, 25 Mar 2019 16:25:00 +0000 (17:25 +0100)]
colibri_vf: migrate pinctrl and regulators to dtb/dm

Migrate pinctrl and regulators to device tree resp. driver model: DDR,
DSPI, ENET, ESDHC, I2C, NFC and UART.

Enable CMD_DM, PINCTRL and DM_REGULATOR.

While at it also update copyright period and sort include files.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agoconfigs: colibri_vf: disable obscure options
Marcel Ziswiler [Mon, 25 Mar 2019 16:24:59 +0000 (17:24 +0100)]
configs: colibri_vf: disable obscure options

Disable more obscure options to save another 26 KB in preparation of
the upcoming driver model migration.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoARM: dts: colibri_vf: update device trees
Marcel Ziswiler [Mon, 25 Mar 2019 16:24:58 +0000 (17:24 +0100)]
ARM: dts: colibri_vf: update device trees

Update device tree in preparation of further driver model migration:
Ethernet FEC, ESDHC aka MMC/SD card, I2C, NFC aka NAND flash controller,
USBH_PEN GPIO regulator.

Add iomux resp. pinctrl entries to be removed from proprietary platform
data: DSPI, ESDHC, FEC, I2C, NFC, UART, USBH_PEN GPIO.

Introduce a U-Boot specific device tree with some required
u-boot,dm-pre-reloc properties: soc, aips0, pinctrl_ddr and uart0 incl.
pinctrl.

While at it also update the MAINTAINERS file.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoconfigs: move CONFIG_MXC_OCOTP to Kconfig
Marcel Ziswiler [Mon, 25 Mar 2019 16:24:57 +0000 (17:24 +0100)]
configs: move CONFIG_MXC_OCOTP to Kconfig

While commit 3e020f03e94f ("driver: misc: add MXC_OCOTP Kconfig entry")
introduced a Kconfig entry it did not actually migrate all
configurations to using it.

As CONFIG_MXC_OCOTP was in mx{6/7}_common.h enable it by default on
those architectures. Additionally, also enable it on ARCH_IMX8M and
ARCH_VF610 where all current members enabled it through their legacy
configuration header files.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
5 years agoconfigs: colibri_vf: limit size of malloc() pool before relocation
Marcel Ziswiler [Mon, 25 Mar 2019 16:24:56 +0000 (17:24 +0100)]
configs: colibri_vf: limit size of malloc() pool before relocation

Limit the size of the malloc() pool before relocation
(SYS_MALLOC_F_LEN).

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agoconfigs: colibri_vf: remove obsolete mmc/sd card environment
Marcel Ziswiler [Mon, 25 Mar 2019 16:24:55 +0000 (17:24 +0100)]
configs: colibri_vf: remove obsolete mmc/sd card environment

Remove obsolete MMC/SD card environment configuration dating back to
un-fused samples times.

While at it also remove meanwhile spurious "USB Storage" comment.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agoconfigs: move CONFIG_USB_EHCI_VF to Kconfig
Marcel Ziswiler [Mon, 25 Mar 2019 16:24:54 +0000 (17:24 +0100)]
configs: move CONFIG_USB_EHCI_VF to Kconfig

Move CONFIG_USB_EHCI_VF to drivers/usb/host/Kconfig and update the one
and only user thereof being colibri_vf.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agoimx: bootaux: add dependency on vf610
Marcel Ziswiler [Mon, 25 Mar 2019 16:24:53 +0000 (17:24 +0100)]
imx: bootaux: add dependency on vf610

Allow using bootaux also on VF610 aka Vybrid.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agovf610: ddrmc: add missing include
Marcel Ziswiler [Mon, 25 Mar 2019 16:24:52 +0000 (17:24 +0100)]
vf610: ddrmc: add missing include

The DDR memory controller include file for the Vybrid uses
iomux_v3_cfg_t without actually including iomux-vf610.h.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agoAdd missing space in comment
Marcel Ziswiler [Mon, 25 Mar 2019 16:24:51 +0000 (17:24 +0100)]
Add missing space in comment

Spotted two missing spaces in comments.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
5 years agoimx6: wandboard: convert to DM_MMC
Anatolij Gustschin [Mon, 18 Mar 2019 22:29:47 +0000 (23:29 +0100)]
imx6: wandboard: convert to DM_MMC

Move SDHC init to SPL code since it is not required with
DM_MMC. Enable DM_MMC support.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
5 years agoimx6: wandboard: convert to DM_I2C
Anatolij Gustschin [Mon, 18 Mar 2019 22:29:46 +0000 (23:29 +0100)]
imx6: wandboard: convert to DM_I2C

Allow building with DM_I2C enabled.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
5 years agoimx6: wandboard: convert to DM_PMIC
Anatolij Gustschin [Mon, 18 Mar 2019 22:29:45 +0000 (23:29 +0100)]
imx6: wandboard: convert to DM_PMIC

Enable DM_PMIC_PFUZE100 driver and add PMIC description to DTS.
Rework power_init_board() code.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
5 years agoimx6: wandboard: convert to DM_VIDEO
Anatolij Gustschin [Mon, 18 Mar 2019 22:29:44 +0000 (23:29 +0100)]
imx6: wandboard: convert to DM_VIDEO

Enable DM_VIDEO in defconfig.

Signed-off-by: Anatolij Gustschin <agust@denx.de>