]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
7 years agoarm: mach-omap2: Factor out common FDT fixup suport
Andrew F. Davis [Mon, 10 Jul 2017 19:45:50 +0000 (14:45 -0500)]
arm: mach-omap2: Factor out common FDT fixup suport

Some of the fixups currently done for OMAP5 class boards are common to
other OMAP family devices, move these to fdt-common.c.

Signed-off-by: Andrew F. Davis <afd@ti.com>
7 years agoarm: mach-omap2: Move omap5/sec-fxns.c into sec-common.c
Andrew F. Davis [Mon, 10 Jul 2017 19:45:49 +0000 (14:45 -0500)]
arm: mach-omap2: Move omap5/sec-fxns.c into sec-common.c

TEE loading and firewall setup are common to all omap2 devices, move
these function out of omap5 and into mach-omap2. This allows us
to use these functions from other omap class devices.

Signed-off-by: Andrew F. Davis <afd@ti.com>
7 years agoMakefile: add dependencies to regenerate u-boot.cfg when lost
Philipp Tomsich [Wed, 5 Jul 2017 15:30:40 +0000 (17:30 +0200)]
Makefile: add dependencies to regenerate u-boot.cfg when lost

When running a 'make clean' or carelessly removing u-boot.cfg, all
future make invocations (until autoconf is regenerated) will print
an error for a missing u-boot.cfg due to missing rules and dependencies.

This commit adds (i) an explicit rule dependency from all (which will
invokes the configuration checker) to cfg, and (b) adds a rule to
invoke scripts/Makefile.autoconf to regenerate u-boot.cfg.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
7 years agodtc: mkimage: Add the possibility to specify DTC
Emmanuel Vadot [Sun, 25 Jun 2017 07:43:33 +0000 (09:43 +0200)]
dtc: mkimage: Add the possibility to specify DTC

FreeBSD recently switch to it's BSDL dtc. While it support most of the
features of the GPL one it still lacks the incbin directive.
Add the possibility to specify which dtc we want to use for compiling dts
and generating fit image.

Signed-off-by: Emmanuel Vadot <manu@bidouilliste.com>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agomeson-gx: reserved memory regions
xypron.glpk@gmx.de [Fri, 9 Jun 2017 20:13:59 +0000 (22:13 +0200)]
meson-gx: reserved memory regions

The Odroid C2 has two GiB of memory with two reserved regions.
reg = <0x0 0x0 0x0 0x1000000>;
reg = <0x0 0x10000000 0x0 0x200000>;

Patch
bfcef28ae4cf (arm: add initial support for Amlogic Meson and
ODROID-C2) provided function dram_init_banksize to reserve the
first 16 MiB of RAM for firmware in function dram_init_banksize
in arch/arm/mach-meson/board.c and defined
CONFIG_NR_DRAM_BANKS = 1.

With this patch dram_init_banksize is changed to additionally
reserve the 2MiB region for the ARM Trusted Firmware (BL31).
CONFIG_NR_DRAM_BANKS is set to 2.

Cc: Andreas Färber <afaerber@suse.de>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
7 years agoenv: Switch env_nand, env_mmc and env_ubi to env_import_redund
Fiach Antaw [Wed, 25 Jan 2017 08:53:12 +0000 (18:53 +1000)]
env: Switch env_nand, env_mmc and env_ubi to env_import_redund

The env_nand, env_mmc and env_ubi implementations all implement
redundancy using an identical serial-number scheme. This commit
migrates them to use the implementation in env_common, which is
functionally identical.

Signed-off-by: Fiach Antaw <fiach.antaw@uqconnect.edu.au>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoenv: Add generic redundant environment implementation
Fiach Antaw [Wed, 25 Jan 2017 08:53:11 +0000 (18:53 +1000)]
env: Add generic redundant environment implementation

All current environments that implement redundancy use almost
identical implementations. This patch implements the env_nand
implementation as a function in env_common, and updates the
env_export function to export an env_nand-style 'flags' field by
default.

Signed-off-by: Fiach Antaw <fiach.antaw@uqconnect.edu.au>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agotests: test_dfu.py: Add example udev rule for host_usb_dev_node
Tom Rini [Mon, 29 Aug 2016 13:57:01 +0000 (09:57 -0400)]
tests: test_dfu.py: Add example udev rule for host_usb_dev_node

If one does not already have a rule to create a custom device node when
a given device enumerates it can be useful to have udev create a
bus path based node to the entry in /dev/bus/usb that was just
enumerated.  Given that DFU itself does not require a /dev entry it is a
good idea to provide a rule that will generate one.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agotools/fw_env: use fsync to ensure that data is physically stored
Michael Heimpold [Mon, 20 May 2013 19:34:42 +0000 (21:34 +0200)]
tools/fw_env: use fsync to ensure that data is physically stored

Closing a file descriptor does not guarantee that the data has been
successfully saved to disk, as the kernel might defer the write.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
7 years agommc: cadence: use fdt32_t for DT property value to fix sparse warning
Masahiro Yamada [Thu, 22 Jun 2017 08:58:09 +0000 (17:58 +0900)]
mmc: cadence: use fdt32_t for DT property value to fix sparse warning

DTB is encoded in big endian.  When we retrieve property values,
we need to use fdt32_to_cpu (aka be32_to_cpu) for endian conversion.
This is a bit error-prone, but sparse is useful to detect endian
mismatch.

We need to use (fdt32_t *) instead of (u32 *) for a pointer of a
property value.  Otherwise sparse warns "cast to restricted __be32".

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
7 years agommc: add static to spl_mmc_get_device_index()
Masahiro Yamada [Thu, 22 Jun 2017 07:52:36 +0000 (16:52 +0900)]
mmc: add static to spl_mmc_get_device_index()

This function is only used in common/spl/spl_mmc.c[

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
7 years agopower: regulator: lp87565: get_enable should return integer
Keerthy [Tue, 13 Jun 2017 04:23:56 +0000 (09:53 +0530)]
power: regulator: lp87565: get_enable should return integer

get_enable should be able to return error values. Hence change
the return type to integer.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agopower: regulator: lp873x: get_enable should return integer
Keerthy [Tue, 13 Jun 2017 04:23:55 +0000 (09:53 +0530)]
power: regulator: lp873x: get_enable should return integer

get_enable should be able to return error values. Hence change
the return type to integer.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agopower: regulator: s5m8767: get_enable should return integer
Keerthy [Tue, 13 Jun 2017 04:23:54 +0000 (09:53 +0530)]
power: regulator: s5m8767: get_enable should return integer

get_enable should be able to return error values. Hence change
the return type to integer.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agopower: sandbox: fixed: get_enable should return integer
Keerthy [Tue, 13 Jun 2017 04:23:53 +0000 (09:53 +0530)]
power: sandbox: fixed: get_enable should return integer

get_enable should be able to return error values. Hence change
the return type to integer.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agopower: regulator: rk8xx: get_enable should return integer
Keerthy [Tue, 13 Jun 2017 04:23:52 +0000 (09:53 +0530)]
power: regulator: rk8xx: get_enable should return integer

get_enable should be able to return error values. Hence change
the return type to integer.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agopower: regulator: tps65090: get_enable should return integer
Keerthy [Tue, 13 Jun 2017 04:23:51 +0000 (09:53 +0530)]
power: regulator: tps65090: get_enable should return integer

get_enable should be able to return error values. Hence change
the return type to integer.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agopower: regulator: pfuze100: get_enable should return integer
Keerthy [Tue, 13 Jun 2017 04:23:50 +0000 (09:53 +0530)]
power: regulator: pfuze100: get_enable should return integer

get_enable should be able to return error values. Hence change
the return type to integer.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agopower: regulator: palmas: get_enable should return integer
Keerthy [Tue, 13 Jun 2017 04:23:49 +0000 (09:53 +0530)]
power: regulator: palmas: get_enable should return integer

get_enable should be able to return error values. Hence change
the return type to integer.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agopower: regulator: max77686: get_enable should return integer
Keerthy [Tue, 13 Jun 2017 04:23:48 +0000 (09:53 +0530)]
power: regulator: max77686: get_enable should return integer

get_enable should be able to return error values. Hence change
the return type to integer.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agopower: regulator: act8846: get_enable should return integer
Keerthy [Tue, 13 Jun 2017 04:23:47 +0000 (09:53 +0530)]
power: regulator: act8846: get_enable should return integer

get_enable should be able to return error values. Hence change
the return type to integer.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agopower: regulator: fixed: get_enable should return integer
Keerthy [Tue, 13 Jun 2017 04:23:46 +0000 (09:53 +0530)]
power: regulator: fixed: get_enable should return integer

get_enable should be able to return error values. Hence change
the return type to integer.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoregulator: Change get_enable return type to integer from bool
Keerthy [Tue, 13 Jun 2017 04:23:45 +0000 (09:53 +0530)]
regulator: Change get_enable return type to integer from bool

Change get_enable return type to int so errors can be returned.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agommc: rpmb: update size format for write_counter
Kever Yang [Thu, 8 Jun 2017 01:20:04 +0000 (09:20 +0800)]
mmc: rpmb: update size format for write_counter

According to MMC spec, the write_counter is 4-byte length,
use 'int' instead of 'long' type for the 'long' is not 4-byte
in 64 bit CPU.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
7 years agommc: use new hwpart API when CONFIG_BLK enabled
Kever Yang [Thu, 8 Jun 2017 01:20:03 +0000 (09:20 +0800)]
mmc: use new hwpart API when CONFIG_BLK enabled

When CONFIG_BLK is enabled, the hwpart id is different with legacy
interface, update it to kame driver work with CONFIG_BLK.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
7 years agoARM: Mark AE boards orphan
Marek Vasut [Tue, 18 Jul 2017 16:05:05 +0000 (18:05 +0200)]
ARM: Mark AE boards orphan

I no longer have any of these boards, mark boards orphan.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@konsulko.com>
7 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-imx
Tom Rini [Tue, 18 Jul 2017 12:42:48 +0000 (08:42 -0400)]
Merge branch 'master' of git://www.denx.de/git/u-boot-imx

7 years agomx6cuboxi: Move CONFIG_CMD_SATA to Kconfig
Fabio Estevam [Thu, 13 Jul 2017 18:22:50 +0000 (15:22 -0300)]
mx6cuboxi: Move CONFIG_CMD_SATA to Kconfig

Move CONFIG_CMD_SATA option to Kconfig to fix the following build
error:

In file included from include/configs/mx6cuboxi.h:137:0,
                 from include/config.h:7,
                 from include/common.h:21,
                 from common/env_common.c:11:
include/config_distro_bootcmd.h:161:2: error: expected '}' before 'BOOT_TARGET_DEVICES_references_SATA_without_CONFIG_SATA'
  BOOT_TARGET_DEVICES_references_SATA_without_CONFIG_SATA

Reported-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
7 years agomx6sabreauto: Make Ethernet functional again
Fabio Estevam [Wed, 12 Jul 2017 21:31:45 +0000 (18:31 -0300)]
mx6sabreauto: Make Ethernet functional again

Since commit ce412b79e7255770 ("drivers: net: phy: atheros: add separate
config for AR8031") Ethernet does not work on mx6sabreauto.

This commit correctly assigns ar8031_config() as the configuration
function for AR8031 in the same way as done in the Linux kernel.

However, on mx6sabreauto design we need some additional configurations,
such as enabling the 125 MHz AR8031 output and setting the TX clock
delay that need to be done in the board file.

This is the equivalent fix from commit 4b6035da482c ("mx6sabresd: Make
Ethernet functional again").

Reported-by: Miquel RAYNAL <miquel.raynal@free-electrons.com>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
7 years agoMerge git://www.denx.de/git/u-boot-marvell
Tom Rini [Wed, 12 Jul 2017 12:16:41 +0000 (08:16 -0400)]
Merge git://www.denx.de/git/u-boot-marvell

7 years agoimx: cx9020: try pxe boot, if no vmlinuz on mmc
Patrick Bruenn [Tue, 11 Jul 2017 09:23:21 +0000 (11:23 +0200)]
imx: cx9020: try pxe boot, if no vmlinuz on mmc

If no vmlinuz is found on mmc, try to boot from pxe.

Signed-off-by: Patrick Bruenn <p.bruenn@beckhoff.com>
7 years agoimx: cx9020: use fdt_addr_r and ramdisk_addr_r
Patrick Bruenn [Tue, 11 Jul 2017 09:23:20 +0000 (11:23 +0200)]
imx: cx9020: use fdt_addr_r and ramdisk_addr_r

Replace fdtaddr and rdaddr variable names with u-boot standard names
fdt_addr_r and ramdisk_addr_r.
This will make the use of pxe boot more easy.

Signed-off-by: Patrick Bruenn <p.bruenn@beckhoff.com>
7 years agomx6sabreauto: Add Falcon mode support
Diego Dorta [Fri, 7 Jul 2017 18:38:34 +0000 (15:38 -0300)]
mx6sabreauto: Add Falcon mode support

Add support for Falcon mode and explain in the README the steps to
boot the kernel directly without loading the full U-Boot.

Signed-off-by: Diego Dorta <diego.dorta@nxp.com>
Acked-by: Fabio Estevam <fabio.estevam@nxp.com>
7 years agowarp: Use PARTUUID to specify the rootfs location
Fabio Estevam [Tue, 11 Jul 2017 17:24:29 +0000 (14:24 -0300)]
warp: Use PARTUUID to specify the rootfs location

warp can run different kernel versions, such as NXP 4.1 or
mainline.

Currently the rootfs location is passed via mmcblk number and the
problem with this approach is that the mmcblk number for the eMMC
changes depending on the kernel version.

In order to avoid such issue, use UUID method to specify the rootfs
location.

Succesfully tested booting a NXP 4.1 and also a mainline 4.12 kernel.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
7 years agoembestmx6boards: Use PARTUUID to specify the rootfs location
Fabio Berton [Mon, 10 Jul 2017 20:04:11 +0000 (17:04 -0300)]
embestmx6boards: Use PARTUUID to specify the rootfs location

Currently the rootfs location is passed via mmcblk number and the
problem with this approach is that the mmcblk number for the eMMC
changes depending on the kernel version.

In order to avoid such issue, use UUID method to specify the rootfs
location.

Also add CONFIG_BOOTCOMMAND to run finduuid function and distro_bootcmd.

This change was made based on U-Boot commit:

  - ca4f338e2efece5196eb2178e5f7d07be828da6e

Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
7 years agomx6cuboxi: Use PARTUUID to specify the rootfs location
Fabio Berton [Mon, 10 Jul 2017 20:04:10 +0000 (17:04 -0300)]
mx6cuboxi: Use PARTUUID to specify the rootfs location

Currently the rootfs location is passed via mmcblk number and the
problem with this approach is that the mmcblk number for the eMMC
changes depending on the kernel version.

In order to avoid such issue, use UUID method to specify the rootfs
location.

This change was made based on U-Boot commit:

  - ca4f338e2efece5196eb2178e5f7d07be828da6e

Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
7 years agowandboard: Use PARTUUID to specify the rootfs location
Fabio Berton [Mon, 10 Jul 2017 20:04:09 +0000 (17:04 -0300)]
wandboard: Use PARTUUID to specify the rootfs location

Currently the rootfs location is passed via mmcblk number and the
problem with this approach is that the mmcblk number for the eMMC
changes depending on the kernel version.

In order to avoid such issue, use UUID method to specify the rootfs
location.

This change was made based on U-Boot commit:

  - ca4f338e2efece5196eb2178e5f7d07be828da6e

Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
7 years agomx6sabre: Use PARTUUID to specify the rootfs location
Fabio Estevam [Mon, 10 Jul 2017 18:59:12 +0000 (15:59 -0300)]
mx6sabre: Use PARTUUID to specify the rootfs location

mx6sabre boards can run different kernel versions, such as NXP 4.1 or
mainline.

Currently the rootfs location is passed via mmcblk number and the
problem with this approach is that the mmcblk number for the eMMC
changes depending on the kernel version.

In order to avoid such issue, use UUID method to specify the rootfs
location.

Succesfully tested booting a NXP 4.1 and also a mainline kernel on a
mx6qsabresd and mx6dlsabreauto.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
7 years agomx6sabreauto: Do not enable WEIM by default
Fabio Estevam [Mon, 10 Jul 2017 18:59:11 +0000 (15:59 -0300)]
mx6sabreauto: Do not enable WEIM by default

WEIM cannot be used when I2C3 is enabled due to pin conflict, so keep
WEIM disabled by default.

I2C3 controls GPIO I2C expander (USB host and OTG have VBUS controlled by
the GPIO I2C expander), magnetometer, accelerometer.

Not disabling WEIM in U-Boot causes I2C3 to behave badly when booting
a NXP 4.1 kernel, which leads to probe failure on several devices,
including the lack of USB:

imx_usb 2184000.usb: Can't register ci_hdrc platform device, err=-517

By keeping WEIM disabled in U-Boot these kernel issues are gone.

Reported-by: Takashi Matsuzawa <tmatsuzawa@xevo.com>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
7 years agoimx: reorganize IMX code as other SOCs
Stefano Babic [Thu, 29 Jun 2017 08:16:06 +0000 (10:16 +0200)]
imx: reorganize IMX code as other SOCs

Change is consistent with other SOCs and it is in preparation
for adding SOMs. SOC's related files are moved from cpu/ to
mach-imx/<SOC>.

This change is also coherent with the structure in kernel.

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Fabio Estevam <fabio.estevam@nxp.com>
CC: Akshay Bhat <akshaybhat@timesys.com>
CC: Ken Lin <Ken.Lin@advantech.com.tw>
CC: Marek Vasut <marek.vasut@gmail.com>
CC: Heiko Schocher <hs@denx.de>
CC: "Sébastien Szymanski" <sebastien.szymanski@armadeus.com>
CC: Christian Gmeiner <christian.gmeiner@gmail.com>
CC: Stefan Roese <sr@denx.de>
CC: Patrick Bruenn <p.bruenn@beckhoff.com>
CC: Troy Kisky <troy.kisky@boundarydevices.com>
CC: Nikita Kiryanov <nikita@compulab.co.il>
CC: Otavio Salvador <otavio@ossystems.com.br>
CC: "Eric Bénard" <eric@eukrea.com>
CC: Jagan Teki <jagan@amarulasolutions.com>
CC: Ye Li <ye.li@nxp.com>
CC: Peng Fan <peng.fan@nxp.com>
CC: Adrian Alonso <adrian.alonso@nxp.com>
CC: Alison Wang <b18965@freescale.com>
CC: Tim Harvey <tharvey@gateworks.com>
CC: Martin Donnelly <martin.donnelly@ge.com>
CC: Marcin Niestroj <m.niestroj@grinn-global.com>
CC: Lukasz Majewski <lukma@denx.de>
CC: Adam Ford <aford173@gmail.com>
CC: "Albert ARIBAUD (3ADEV)" <albert.aribaud@3adev.fr>
CC: Boris Brezillon <boris.brezillon@free-electrons.com>
CC: Soeren Moch <smoch@web.de>
CC: Richard Hu <richard.hu@technexion.com>
CC: Wig Cheng <wig.cheng@technexion.com>
CC: Vanessa Maegima <vanessa.maegima@nxp.com>
CC: Max Krummenacher <max.krummenacher@toradex.com>
CC: Stefan Agner <stefan.agner@toradex.com>
CC: Markus Niebel <Markus.Niebel@tq-group.com>
CC: Breno Lima <breno.lima@nxp.com>
CC: Francesco Montefoschi <francesco.montefoschi@udoo.org>
CC: Jaehoon Chung <jh80.chung@samsung.com>
CC: Scott Wood <oss@buserror.net>
CC: Joe Hershberger <joe.hershberger@ni.com>
CC: Anatolij Gustschin <agust@denx.de>
CC: Simon Glass <sjg@chromium.org>
CC: "Andrew F. Davis" <afd@ti.com>
CC: "Łukasz Majewski" <l.majewski@samsung.com>
CC: Patrice Chotard <patrice.chotard@st.com>
CC: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
CC: Hans de Goede <hdegoede@redhat.com>
CC: Masahiro Yamada <yamada.masahiro@socionext.com>
CC: Stephen Warren <swarren@nvidia.com>
CC: Andre Przywara <andre.przywara@arm.com>
CC: "Álvaro Fernández Rojas" <noltari@gmail.com>
CC: York Sun <york.sun@nxp.com>
CC: Xiaoliang Yang <xiaoliang.yang@nxp.com>
CC: Chen-Yu Tsai <wens@csie.org>
CC: George McCollister <george.mccollister@gmail.com>
CC: Sven Ebenfeld <sven.ebenfeld@gmail.com>
CC: Filip Brozovic <fbrozovic@gmail.com>
CC: Petr Kulhavy <brain@jikos.cz>
CC: Eric Nelson <eric@nelint.com>
CC: Bai Ping <ping.bai@nxp.com>
CC: Anson Huang <Anson.Huang@nxp.com>
CC: Sanchayan Maity <maitysanchayan@gmail.com>
CC: Lokesh Vutla <lokeshvutla@ti.com>
CC: Patrick Delaunay <patrick.delaunay@st.com>
CC: Gary Bisson <gary.bisson@boundarydevices.com>
CC: Alexander Graf <agraf@suse.de>
CC: u-boot@lists.denx.de
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
7 years agommc: fsl_esdhc: drop CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT
Peng Fan [Mon, 12 Jun 2017 09:50:55 +0000 (17:50 +0800)]
mmc: fsl_esdhc: drop CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT

CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT is not the correct method
to set I/O to 1.8. To boards that does not support vqmmc-supply,
use vs18_enable in fsl_esdhc_cfg. If regulator is supported,
use fixed 1.8V regulator for vqmmc-supply.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: York Sun <york.sun@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
7 years agodm: mmc: fsl_esdhc: handle vqmmc supply
Peng Fan [Mon, 12 Jun 2017 09:50:54 +0000 (17:50 +0800)]
dm: mmc: fsl_esdhc: handle vqmmc supply

Handle vqmmc supply. Some boards have a fixed I/O voltage
at 1.8V for emmc, so the usdhc also needs to be configured
as 1.8V by setting VSELECT bit. The vs18_enable is the one
that used to checking whether setting VSELECT or not in
the driver. So if vqmmc supply is 1.8V, set vs18_enable,
the driver will set VSELECT.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: York Sun <york.sun@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
7 years agommc: fsl_esdhc: introduce vs18_enable for 1.8V fix I/O
Peng Fan [Mon, 12 Jun 2017 09:50:53 +0000 (17:50 +0800)]
mmc: fsl_esdhc: introduce vs18_enable for 1.8V fix I/O

When using eMMC with 1.8V I/O, the VSELECT bit need to be set in
the USDHC controller when init.

This patch adds a parameter "vs18_enable" in fsl_esdhc_cfg
structure and priv data, so each controller can have different
settings.

We could not use CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT, it has problem
that it will apply to all USDHC controllers and it only set the 1.8V
at init phase. So if user does not select to the eMMC device,
the voltage on the I/O pins are not correct.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: York Sun <york.sun@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
7 years agommc: fsl_esdhc: correct type of wp_enable
Peng Fan [Mon, 12 Jun 2017 09:50:52 +0000 (17:50 +0800)]
mmc: fsl_esdhc: correct type of wp_enable

The type should be int, not u8. cfg->wp_enable will finally be
assigned to priv->wp_enable whose type is int.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoimx6_spl: Add u-boot-dtb.img for SPL payload
Jagan Teki [Thu, 1 Jun 2017 17:28:34 +0000 (22:58 +0530)]
imx6_spl: Add u-boot-dtb.img for SPL payload

Add u-boot-dtb.img for SPL_FS_LOAD_PAYLOAD_NAME when
OF_CONTROL used.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agomx6sabreauto: Update to SPL only mode
Vanessa Maegima [Thu, 29 Jun 2017 12:33:46 +0000 (09:33 -0300)]
mx6sabreauto: Update to SPL only mode

As mx6sabreauto supports SPL now, all variants can boot using the same
defconfig.

This patch:
- Removes non-SPL targets.
- Renames target to mx6sabreauto_defconfig.
- Renames folder and board files to mx6sabreauto.
- Updates MAINTAINERS, Makefile and Kconfig accordingly.
- Removes .cfg files.
- Adds a README with instructions to build and flash SPL and u-boot.img.

Signed-off-by: Vanessa Maegima <vanessa.maegima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
7 years agomx6qsabreauto: Add SPL support
Vanessa Maegima [Thu, 29 Jun 2017 12:33:45 +0000 (09:33 -0300)]
mx6qsabreauto: Add SPL support

Add support for mx6q, mx6dl and mx6qp sabreauto boards in SPL.

Retrieved the mx6q DCD table from:
board/freescale/mx6qsabreauto/imximage.cfg

Retrieved the mx6dl DCD table from:
board/freescale/mx6qsabreauto/mx6dl.cfg

Retrieved the mx6qp DCD table from:
board/freescale/mx6qsabreauto/mx6qp.cfg

Flashed SPL and u-boot.img to an SD card and could successfully boot it
on mx6q, mx6qp and mx6dl sabreauto boards.

Signed-off-by: Vanessa Maegima <vanessa.maegima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
7 years agomx6cuboxi: Add support for sata
Peter Robinson [Sat, 1 Jul 2017 17:44:03 +0000 (18:44 +0100)]
mx6cuboxi: Add support for sata

The Cubox-i and Hummingboard series of devices have an option of
SATA on board, and depending on how the fuses are blown even the
option to boot SPL from SATA. So enable support for it so it can
be used to boot the OS from if people desire.

Cc: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Acked-by: Fabio Estevam <fabio.estevam@nxp.com>
7 years agomx7dsabresd: Set VLD04 output to 2.8V in PMIC initialization.
Gautam Bhat [Sun, 2 Jul 2017 19:20:32 +0000 (00:50 +0530)]
mx7dsabresd: Set VLD04 output to 2.8V in PMIC initialization.

This change sets the VLDO4 settings output to 2.8V in PMIC
initialization so that the MIPI DSI/CSI input voltage is 2.8V
as per the schematics. The original code provides an output of
3.3V which violates the voltage mentioned in the schematics.

Signed-off-by: Gautam Bhat <mindentropy@gmail.com>
Acked-by: Fabio Estevam <fabio.estevam@nxp.com>
7 years agomx6: soc: Move mxs_dma_init() into the mxs nand driver
Fabio Estevam [Thu, 29 Jun 2017 12:33:44 +0000 (09:33 -0300)]
mx6: soc: Move mxs_dma_init() into the mxs nand driver

Currently the following build error is seen when a board using MMC SPL
is built and the MXS nand driver is also selected:

arch/arm/cpu/armv7/built-in.o: In function `arch_cpu_init':
arch/arm/cpu/armv7/mx6/soc.c:432: undefined reference to 'mxs_dma_init'

On mx6 the only user of mxs_dma_init() is the mxs nand driver, so
move it there.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
7 years agonet: fec_mxc: fix PHY initialization bug with CONFIG_DM_ETH
Lothar Waßmann [Tue, 27 Jun 2017 13:23:16 +0000 (15:23 +0200)]
net: fec_mxc: fix PHY initialization bug with CONFIG_DM_ETH

When CONFIG_DM_ETH is set, the FEC ethernet controller is reset after
the PHY has been set up and initialzed. This breaks the communication
with the PHY and results in an inoperable ethernet interface.

Do the initialization with CONFIG_DM_ETH in the same order as with
legacy ETH support to fix this.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
7 years agoicorem6_rqs: Rename icorem6_rqs config file
Jagan Teki [Tue, 13 Jun 2017 10:00:37 +0000 (15:30 +0530)]
icorem6_rqs: Rename icorem6_rqs config file

imx6qdl_icore_mmc_defconfig => imx6qdl_icore_rqs_defconfig
Since icorem6_rqs support MMC/eMMC boot, so doesn't need
to name it explicitly.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
7 years agodt-bindings: Document the Broadcom STB wake-up timer node
Florian Fainelli [Mon, 26 Jun 2017 21:15:02 +0000 (14:15 -0700)]
dt-bindings: Document the Broadcom STB wake-up timer node

Document the binding for the Broadcom STB SoCs wake-up timer node
allowing the system to generate alarms and exit low power states.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years agoserial: mxc: Add debug uart support
Jagan Teki [Tue, 6 Jun 2017 05:31:51 +0000 (05:31 +0000)]
serial: mxc: Add debug uart support

Add support for the debug UART to assist with early debugging.
Enable it for i.CoreM6 as an example.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoserial: mxc: Code cleanup
Jagan Teki [Tue, 6 Jun 2017 05:31:50 +0000 (05:31 +0000)]
serial: mxc: Code cleanup

- Remove space between #define to macro
- Add tab between macro and value

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoserial: mxc: Move common baud gen into _mxc_serial_setbrg
Jagan Teki [Tue, 6 Jun 2017 05:31:49 +0000 (05:31 +0000)]
serial: mxc: Move common baud gen into _mxc_serial_setbrg

Move the common baud generation code into _mxc_serial_setbrg
so-that dm and non-dm can call this func.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoserial: mxc: Move common init into _mxc_serial_init
Jagan Teki [Tue, 6 Jun 2017 05:31:48 +0000 (05:31 +0000)]
serial: mxc: Move common init into _mxc_serial_init

Move the common initialization code into _mxc_serial_init
so-that dm and non-dm can call this func.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoserial: mxc: Move cr1 and cr2 write to mxc_serial_setbrg
Jagan Teki [Tue, 6 Jun 2017 05:31:47 +0000 (05:31 +0000)]
serial: mxc: Move cr1 and cr2 write to mxc_serial_setbrg

Control reg write should be part of setbrg for better
buadrate generation, so move cr1 and cr2 write to
mxc_serial_setbrg

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoserial: mxc: Use RFDIV in dm-code
Jagan Teki [Tue, 6 Jun 2017 05:31:46 +0000 (05:31 +0000)]
serial: mxc: Use RFDIV in dm-code

Use RFDIV in dm-code instead of numeric value, so-that
it can be common for dm and non-dm.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoserial: mxc: Add common mxc_uart reg space
Jagan Teki [Tue, 6 Jun 2017 05:31:45 +0000 (05:31 +0000)]
serial: mxc: Add common mxc_uart reg space

This patch will add common reg space for non-dm and
dm code and non-dm reg space can be accessed using
mxc_base.

This will
- get rid of __REG volatile assignments
- Make common reg_space by removing unneeded macros

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoimx: mx6ull: fix USB bmode for i.MX 6UL and 6ULL
Stefan Agner [Fri, 9 Jun 2017 20:13:12 +0000 (13:13 -0700)]
imx: mx6ull: fix USB bmode for i.MX 6UL and 6ULL

i.MX 6UL and 6ULL have different boot device capabilities and
use therefor use a different boot device selection table than
other i.MX 6 devices. Particularly, the value which has been
used so far (b0001) is assigned to QSPI boot for these two
devices.

There is no common reserved value for all i.MX 6devices. Use
b0010 for i.MX 6UL and 6ULL via compile time ifdef.

Reported-by: Joël Esponde <joel.esponde@honeywell.com>
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Tested-by: Joël Esponde <joel.esponde@honeywell.com>
7 years agoot1200: enable CONFIG_IMX_THERMAL for detailed thermal information
Christian Gmeiner [Thu, 8 Jun 2017 07:37:26 +0000 (09:37 +0200)]
ot1200: enable CONFIG_IMX_THERMAL for detailed thermal information

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
7 years agomx6sabresd: Fix guard file symbol
Fabio Estevam [Thu, 1 Jun 2017 15:59:52 +0000 (12:59 -0300)]
mx6sabresd: Fix guard file symbol

Remove the "Q" from the file guard symbol, so that it matches
the file name.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
7 years agowandboard: Remove unnecessary delay
Fabio Estevam [Thu, 1 Jun 2017 12:14:32 +0000 (09:14 -0300)]
wandboard: Remove unnecessary delay

There is no need to add a 100us delay after the DDR initialization.

Other imx6 boards do not have such delay either, so simply remove it.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
7 years agocm_fx6: Remove SPL entry from CONFIG_SYS_EXTRA_OPTIONS
Fabio Estevam [Wed, 31 May 2017 16:16:27 +0000 (13:16 -0300)]
cm_fx6: Remove SPL entry from CONFIG_SYS_EXTRA_OPTIONS

SPL is already selected via CONFIG_SPL=y, so there is no need
to pass it inside CONFIG_SYS_EXTRA_OPTIONS.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
7 years agocgtqmx6eval: Remove SPL entry from CONFIG_SYS_EXTRA_OPTIONS
Fabio Estevam [Wed, 31 May 2017 16:16:26 +0000 (13:16 -0300)]
cgtqmx6eval: Remove SPL entry from CONFIG_SYS_EXTRA_OPTIONS

SPL is already selected via CONFIG_SPL=y, so there is no need
to pass it inside CONFIG_SYS_EXTRA_OPTIONS.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
7 years agomx6slevk_spl: Remove SPL entry from CONFIG_SYS_EXTRA_OPTIONS
Fabio Estevam [Wed, 31 May 2017 16:16:25 +0000 (13:16 -0300)]
mx6slevk_spl: Remove SPL entry from CONFIG_SYS_EXTRA_OPTIONS

SPL is already selected via CONFIG_SPL=y, so there is no need
to pass it inside CONFIG_SYS_EXTRA_OPTIONS.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
7 years agomx6sabresd: Remove SPL entry from CONFIG_SYS_EXTRA_OPTIONS
Fabio Estevam [Wed, 31 May 2017 16:16:24 +0000 (13:16 -0300)]
mx6sabresd: Remove SPL entry from CONFIG_SYS_EXTRA_OPTIONS

SPL is already selected via CONFIG_SPL=y, so there is no need
to pass it inside CONFIG_SYS_EXTRA_OPTIONS.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
7 years agoarm: mvebu: clearfog: fix chip name comment
Baruch Siach [Tue, 4 Jul 2017 17:23:41 +0000 (20:23 +0300)]
arm: mvebu: clearfog: fix chip name comment

The clearfog uses Armada 388.

Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Stefan Roese <sr@denx.de>
7 years agotools/kwbimage: fix v1 header verification
Baruch Siach [Tue, 4 Jul 2017 17:23:40 +0000 (20:23 +0300)]
tools/kwbimage: fix v1 header verification

The verify_header callback in kwbimage.c only verifies v0 headers checksum.
Running 'mkimage -l' on a v1 image gives the following misleading output:

GP Header: Size ae000000 LoadAddr 34160600

Implement support for v1 headers. For that, factor out the header checksum code
to a separate main_hdr_checksum_ok() routine. This routine relies on the fact
that the checksum field offset is the same in both v0 and v1 headers. With this
patch applied 'mkimage -l' correctly identifies the image:

Image Type:   MVEBU Boot from sdio Image
Image version:1
Data Size:    398904 Bytes = 389.55 KiB = 0.38 MiB
Load Address: 007fffc0
Entry Point:  00800000

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Stefan Roese <sr@denx.de>
7 years agotools/kwbimage.h: make offset marks style consistent
Baruch Siach [Tue, 4 Jul 2017 17:23:39 +0000 (20:23 +0300)]
tools/kwbimage.h: make offset marks style consistent

The offset marking in kwbimage.h is inconsistent. main_hdr_v0 uses decimals,
main_hdr_v1 uses hex without '0x' prefix, secure_hdr_v1 uses hex with '0x'
prefix. Make all offset marks hex with '0x' prefix.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Stefan Roese <sr@denx.de>
7 years agotools/kwbimage: update the list of SoCs using v1 header
Baruch Siach [Tue, 4 Jul 2017 17:23:38 +0000 (20:23 +0300)]
tools/kwbimage: update the list of SoCs using v1 header

Armada 38x also uses image header v1.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Stefan Roese <sr@denx.de>
7 years agoarm64: mvebu: use single defconfig for Armada8K development boards
Igal Liberman [Tue, 13 Jun 2017 07:35:44 +0000 (10:35 +0300)]
arm64: mvebu: use single defconfig for Armada8K development boards

Currently, Marvell Armada8k development board use 3 different
defconfigs:
        mvebu_db-88f7040-nand_defconfig
        mvebu_db-88f7040_defconfig
        mvebu_db-88f8040_defconfig
Having 3 different defconfigs makes maintenance difficult.

This patch removes the defconfigs mentioned above and introduce
a new defconfig which represents the Armada8k family.

NOTE:
In order not to break automatic tools compilation,
a default device-tree is set in the defconfig (armada-8040-db).
However, when compiling u-boot, the user MUST explicitly export
the DEVICE_TREE for the requested board because using A80x0
device-tree on A70x0 might break the device.

For more information, refer to "doc/README.marvell" (intoduced
in this patch).

Change-Id: I98515b6306498358f3722ecf7ac4c87f236ebbd8
Signed-off-by: Igal Liberman <igall@marvell.com>
Signed-off-by: Stefan Roese <sr@denx.de>
7 years agomarvell: armada385: Add the Turris Omnia board
Marek Behún [Fri, 9 Jun 2017 17:28:45 +0000 (19:28 +0200)]
marvell: armada385: Add the Turris Omnia board

The Turris Omnia is a open-source router created by CZ.NIC.

The code is based on the Marvell/db-88f6820-gp by Stefan Roese
with modifications from Tomas Hlavacek in the CZ.NIC turris-omnia-uboot
repository, which can be found at
https://gitlab.labs.nic.cz/turris/turris-omnia-uboot

By default, the Turris Omnia uses btrfs as the main and only filesystem,
and also loads kernel and device tree from this filesystem. Since U-Boot
does not yet support btrfs, you should not flash your Turris Omnia board
with this unless you know what you are doing.

Signed-off-by: Tomas Hlavacek <tomas.hlavacek@nic.cz>
Signed-off-by: Marek Behun <marek.behun@nic.cz>
 create mode 100644 board/CZ.NIC/turris_omnia/Makefile
 create mode 100644 board/CZ.NIC/turris_omnia/kwbimage.cfg
 create mode 100644 board/CZ.NIC/turris_omnia/turris_omnia.c
 create mode 100644 configs/turris_omnia_defconfig
 create mode 100644 include/configs/turris_omnia.h
Signed-off-by: Stefan Roese <sr@denx.de>
7 years agodrivers/misc: Add basic support for ATSHA204A Crypto module
Marek Behún [Fri, 9 Jun 2017 17:28:44 +0000 (19:28 +0200)]
drivers/misc: Add basic support for ATSHA204A Crypto module

This module can be found on the Turris Omnia board connected
via the I2C interface.

Among some cryptographic functions, the chip has a 512 bit
One Time Programmable memory, 88 byte configuration memory
and 512 byte general purpose memory.

The Turris Omnia stores serial number and device MAC address in
the OTP memory.

This commit adds basic support for reading the EEPROM and also
exposes the chips Random Number Generator.

The driver is based on code by
  Josh Datko, Cryptotronix, jbd@cryptotronix.com
and also
  Tomas Hlavacek, CZ.NIC, tomas.hlavacek@nic.cz

Signed-off-by: Tomas Hlavacek <tomas.hlavacek@nic.cz>
Signed-off-by: Marek Behun <marek.behun@nic.cz>
 create mode 100644 drivers/misc/atsha204a-i2c.c
 create mode 100644 include/atsha204a-i2c.h
Signed-off-by: Stefan Roese <sr@denx.de>
7 years agodrivers/i2c/muxes/pca954x: Add pca9547 I2C mux support
Marek Behún [Fri, 9 Jun 2017 17:28:43 +0000 (19:28 +0200)]
drivers/i2c/muxes/pca954x: Add pca9547 I2C mux support

This I2C mux is found, for example, on the Turris Omnia board.

Signed-off-by: Marek Behun <marek.behun@nic.cz>
Reviewed-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
7 years agoarch/arm/dts: Add Turris Omnia device tree
Marek Behún [Fri, 9 Jun 2017 17:28:42 +0000 (19:28 +0200)]
arch/arm/dts: Add Turris Omnia device tree

This device tree is taken from mainline Linux kernel commit
7b7db5ab. Added is also a -u-boot.dtsi file with these additions:

  - aliases for I2C and SPI devices are added, because i2cmux and
    SPI flash doesn't work otherwise
  - spi_flash node has been added so that the new DM API works
  - the ATSHA204A node is added in the i2c@5 node
  - "u-boot,dm-pre-reloc"s are added in needed nodes for SPL
    build to work correctly

Signed-off-by: Marek Behun <marek.behun@nic.cz>
 create mode 100644 arch/arm/dts/armada-385-turris-omnia-u-boot.dtsi
 create mode 100644 arch/arm/dts/armada-385-turris-omnia.dts
Signed-off-by: Stefan Roese <sr@denx.de>
7 years agoorion_wdt: Support for the Orion Watchdog
Marek Behún [Fri, 9 Jun 2017 17:28:41 +0000 (19:28 +0200)]
orion_wdt: Support for the Orion Watchdog

The Orion watchdog can be found on some Marvell Armada chips.

This driver is based on the code by Tomas Hlavacek in the CZ.NIC
turris-omnia-uboot repository, which can be found at
https://gitlab.labs.nic.cz/turris/turris-omnia-uboot, and that
one is based on code by Sylver Bruneau. His code is already in
mainline Linux kernel.

The code uses the new driver model API.

Signed-off-by: Tomas Hlavacek <tomas.hlavacek@nic.cz>
Signed-off-by: Marek Behun <marek.behun@nic.cz>
 create mode 100644 drivers/watchdog/orion_wdt.c
Signed-off-by: Stefan Roese <sr@denx.de>
7 years agodriver/ddr: Add support for setting timing in hws_topology_map
Marek Behún [Fri, 9 Jun 2017 17:28:40 +0000 (19:28 +0200)]
driver/ddr: Add support for setting timing in hws_topology_map

The DDR3 training code for Marvell A38X currently computes 1t timing
when given board topology map of the Turris Omnia, but Omnia needs 2t.

This patch adds support for enforcing the 2t timing in struct
hws_topology_map, through a new enum hws_timing, which can assume
following values:
  HWS_TIM_DEFAULT - default behaviour, compute whether to enable 2t
                    from the number of CSs
  HWS_TIM_1T      - enforce 1t
  HWS_TIM_2T      - enforce 2t

This patch also sets all the board topology maps (db-88f6820-amc,
db-88f6820-gp, controlcenterdc and clearfog) to have timing set to
HWS_TIM_DEFAULT.

Signed-off-by: Marek Behun <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
7 years agoam33xx: board: Refactor USB initialization into separate function
Alexandru Gagniuc [Tue, 7 Feb 2017 03:17:33 +0000 (19:17 -0800)]
am33xx: board: Refactor USB initialization into separate function

The declaration of otg*_plat and otg*_board_data is guarded by
CONFIG_USB_MUSB_*, but their use in arch_misc_init is not. The
ifdef flow goes something like:

if (CONFIG_USB_MUSB_* && other_conditions)
declare usb_data
if (other_conditions)
use usb_data

Thus when CONFIG_USB_MUSB_* is not declared, we try to use the
data structures, but these structures aren't defined.

To fix this, move the USB initialization code into the same #ifdef
which guards the declaration of the data structures. Since the DM_USB
vs legacy cases are completely different, use two versions of
arch_misc_init(), for readability.

Signed-off-by: Alexandru Gagniuc <alex.g@adaptrum.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoconfigs: am335x_evm: Enable FASTBOOT based on kconfig
Alexandru Gagniuc [Tue, 7 Feb 2017 03:17:32 +0000 (19:17 -0800)]
configs: am335x_evm: Enable FASTBOOT based on kconfig

When CONFIG_CMD_FASTBOOT or CONFIG_USB_FUNCTION_FASTBOOT are defined
in am335x_evm.h, a dependency on g_dnl.c is created. This in turn
creates a dependency on having USB gadget enabled.
As a result we can't create configs with USB gadget disabled.

Since these CONFIG_ variables are now part of kconfig, move them to
the board defconfigs, and out of am335x_evm.h. This both preserves
current defaults, and allows creating configs with USB gadget off.

Signed-off-by: Alexandru Gagniuc <alex.g@adaptrum.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoARM: ti816x: Fix enabling GPIO0, enable GPIO1 as well
Tom Rini [Fri, 7 Jul 2017 19:21:45 +0000 (15:21 -0400)]
ARM: ti816x: Fix enabling GPIO0, enable GPIO1 as well

The TI816x has 2 GPIO banks.  For bank 0 we had been clearing the enable
bit when setting BIT(8).  Correct this by setting it to BIT(1) | BIT(8)
after we set and wait for BIT(1) (aka PRCM_MOD_EN).  Enable GPIO1 as
well so that when CMD_GPIO is enabled it won't crash probing the second
bank.  Enable CMD_GPIO on ti816x_evm.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoti816x: Enable ethernet support
Tom Rini [Wed, 28 Jun 2017 16:12:03 +0000 (12:12 -0400)]
ti816x: Enable ethernet support

The ti816x SoC revision of the ethernet IP block is handled by the
"davinci_emac" driver, rather than the "cpsw" driver as done by later
members of the family.  Enable the relevant plumbing.

Signed-off-by: Sriramakrishnan <srk@ti.com>
Signed-off-by: Vitaly Wool <vitaly.wool@konsulko.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agomtd: nand: make nand_info array static
Grygorii Strashko [Tue, 27 Jun 2017 00:13:08 +0000 (19:13 -0500)]
mtd: nand: make nand_info array static

Make make nand_info array static, since all direct users of nand_info array
have been converted to use get_nand_dev_by_index() API.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
7 years agoarmv8: fsl-layerscape: use get_nand_dev_by_index()
Grygorii Strashko [Tue, 27 Jun 2017 00:13:07 +0000 (19:13 -0500)]
armv8: fsl-layerscape: use get_nand_dev_by_index()

As part of preparation for nand DM conversion the new API has been
introduced to remove direct access to nand_info array. So, use it here
instead of accessing to nand_info array directly.

Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: York Sun <york.sun@nxp.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
7 years agoboard: toradex: use get_nand_dev_by_index()
Grygorii Strashko [Tue, 27 Jun 2017 00:13:06 +0000 (19:13 -0500)]
board: toradex: use get_nand_dev_by_index()

As part of preparation for nand DM conversion the new API has been
introduced to remove direct access to nand_info array. So, use it here
instead of accessing to nand_info array directly.

Reviewed-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
7 years agoboard: BuR: use get_nand_dev_by_index()
Grygorii Strashko [Tue, 27 Jun 2017 00:13:05 +0000 (19:13 -0500)]
board: BuR: use get_nand_dev_by_index()

As part of preparation for nand DM conversion the new API has been
introduced to remove direct access to nand_info array. So, use it here
instead of accessing to nand_info array directly.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Reviewed-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoboard: ronetix: use get_nand_dev_by_index()
Grygorii Strashko [Tue, 27 Jun 2017 00:13:04 +0000 (19:13 -0500)]
board: ronetix: use get_nand_dev_by_index()

As part of preparation for nand DM conversion the new API has been
introduced to remove direct access to nand_info array. So, use it here
instead of accessing to nand_info array directly.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
7 years agoboard: atmel: use get_nand_dev_by_index()
Grygorii Strashko [Tue, 27 Jun 2017 00:13:03 +0000 (19:13 -0500)]
board: atmel: use get_nand_dev_by_index()

As part of preparation for nand DM conversion the new API has been
introduced to remove direct access to nand_info array. So, use it here
instead of accessing to nand_info array directly.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
7 years agocmd: mvebu: bubt: use get_nand_dev_by_index()
Grygorii Strashko [Tue, 27 Jun 2017 00:13:02 +0000 (19:13 -0500)]
cmd: mvebu: bubt: use get_nand_dev_by_index()

As part of preparation for nand DM conversion the new API has been
introduced to remove direct access to nand_info array. So, use it here
instead of accessing to nand_info array directly.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
7 years agomtd: nand: drv: use get_nand_dev_by_index()
Grygorii Strashko [Tue, 27 Jun 2017 00:13:01 +0000 (19:13 -0500)]
mtd: nand: drv: use get_nand_dev_by_index()

As part of preparation for nand DM conversion the new API has been
introduced to remove direct access to nand_info array. So, use it here
instead of accessing to nand_info array directly

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
7 years agonet: fm: use get_nand_dev_by_index()
Grygorii Strashko [Tue, 27 Jun 2017 00:13:00 +0000 (19:13 -0500)]
net: fm: use get_nand_dev_by_index()

As part of preparation for nand DM conversion the new API has been
introduced to remove direct access to nand_info array. So, use it here
instead of accessing to nand_info array directly.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
7 years agonet: phy: cortina: use get_nand_dev_by_index()
Grygorii Strashko [Tue, 27 Jun 2017 00:12:59 +0000 (19:12 -0500)]
net: phy: cortina: use get_nand_dev_by_index()

As part of preparation for nand DM conversion the new API has been
introduced to remove direct access to nand_info array. So, use it here
instead of accessing to nand_info array directly

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
7 years agocmd: nand: remove direct access to struct mtd_info->priv
Grygorii Strashko [Tue, 27 Jun 2017 00:12:58 +0000 (19:12 -0500)]
cmd: nand: remove direct access to struct mtd_info->priv

Replace direct access to struct mtd_info->priv with proper
accessor mtd_to_nand().

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
7 years agofs: use get_nand_dev_by_index()
Grygorii Strashko [Tue, 27 Jun 2017 00:12:57 +0000 (19:12 -0500)]
fs: use get_nand_dev_by_index()

As part of preparation for nand DM conversion the new API has been
introduced to remove direct access to nand_info array. So, use it here
instead of accessing to nand_info array directly.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
7 years agocommon: use get_nand_dev_by_index()
Grygorii Strashko [Tue, 27 Jun 2017 00:12:56 +0000 (19:12 -0500)]
common: use get_nand_dev_by_index()

As part of preparation for nand DM conversion the new API has been
introduced to remove direct access to nand_info array. So, use it here
instead of accessing to nand_info array directly.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
7 years agocmd: jffs2: use get_nand_dev_by_index()
Grygorii Strashko [Tue, 27 Jun 2017 00:12:55 +0000 (19:12 -0500)]
cmd: jffs2: use get_nand_dev_by_index()

As part of preparation for nand DM conversion the new API has been
introduced to remove direct access to nand_info array. So, use it here
instead of accessing to nand_info array directly.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
7 years agocmd: bootm: use get_nand_dev_by_index()
Grygorii Strashko [Tue, 27 Jun 2017 00:12:54 +0000 (19:12 -0500)]
cmd: bootm: use get_nand_dev_by_index()

As part of preparation for nand DM conversion the new API has been
introduced to remove direct access to nand_info array. So, use it here
instead of accessing to nand_info array directly.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
7 years agodfu: dfu_nand: use get_nand_dev_by_index()
Grygorii Strashko [Tue, 27 Jun 2017 00:12:53 +0000 (19:12 -0500)]
dfu: dfu_nand: use get_nand_dev_by_index()

As part of preparation for nand DM conversion the new API has been
introduced to remove direct access to nand_info array. So, use it here
instead of accessing to nand_info array directly.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
7 years agocommon: env_nand: use get_nand_dev_by_index()
Grygorii Strashko [Tue, 27 Jun 2017 00:12:52 +0000 (19:12 -0500)]
common: env_nand: use get_nand_dev_by_index()

As part of preparation for nand DM conversion the new API has been
introduced to remove direct access to nand_info array. So, use it here
instead of accessing to nand_info array directly.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>