oweals/u-boot.git
5 years agopinctrl: at91: add slewrate support for SAM9X60
Claudiu Beznea [Mon, 25 Mar 2019 10:34:00 +0000 (10:34 +0000)]
pinctrl: at91: add slewrate support for SAM9X60

Add slew rate support for SAM9X60 pin controller.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
5 years agopinctrl: at91: add compatibles for SAM9X60 pin controller
Claudiu Beznea [Mon, 25 Mar 2019 10:33:59 +0000 (10:33 +0000)]
pinctrl: at91: add compatibles for SAM9X60 pin controller

Add compatibles for SAM9X60 pin controller.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
5 years agopinctrl: at91: add drive strength support for SAM9X60
Claudiu Beznea [Mon, 25 Mar 2019 10:33:57 +0000 (10:33 +0000)]
pinctrl: at91: add drive strength support for SAM9X60

Add drive strength support for SAM9X60 pin controller.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
5 years agopinctrl: at91: add option to use drive strength bits
Claudiu Beznea [Mon, 25 Mar 2019 10:33:56 +0000 (10:33 +0000)]
pinctrl: at91: add option to use drive strength bits

SAM9X60 uses high and low drive strengths. To implement this, in
at91_pinctrl_mux_ops::set_drivestrength we need bit numbers of
drive strengths (1 for low, 2 for high), thus change the code to
allow the usage of drive strength bit numbers.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
5 years agoarm: at91: Add gardena-gateway-at91sam support
Stefan Roese [Tue, 2 Apr 2019 08:57:27 +0000 (10:57 +0200)]
arm: at91: Add gardena-gateway-at91sam support

The GARDENA smart Gateway boards are equipped with an Atmel / Microchip
AT91SAM9G25 SoC and with 128 MiB of RAM and 256 MiB of NAND storage.
This patch adds support for this board including SPL support. Therefore
the AT91Boostrap is not needed on this platform any more.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Andreas Bießmann <andreas@biessmann.org>
Cc: Eugen Hristev <eugen.hristev@microchip.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
5 years agoarm: at91: at91sam9x5.dtsi: Add watchdog handle
Stefan Roese [Tue, 2 Apr 2019 08:57:26 +0000 (10:57 +0200)]
arm: at91: at91sam9x5.dtsi: Add watchdog handle

This makes it possible to reference the watchdog DT node via "&watchdog"
from board dts files.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Andreas Bießmann <andreas@biessmann.org>
Cc: Eugen Hristev <eugen.hristev@microchip.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
5 years agoarm: at91: siemens: Add support to generate combined SPL+U-Boot image
Stefan Roese [Tue, 2 Apr 2019 08:57:25 +0000 (10:57 +0200)]
arm: at91: siemens: Add support to generate combined SPL+U-Boot image

This patch adds the necessary defines to the Siemens AT91SAM based
boards (smartweb, corvus and taurus) to generate the combined binary
image with SPL and main U-Boot image combined (u-boot-with-spl.bin).

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Andreas Bießmann <andreas@biessmann.org>
Cc: Eugen Hristev <eugen.hristev@microchip.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Tested on the taurus board:
Tested-by: Heiko Schocher <hs@denx.de>
5 years agoMakefile: Add Kconfig option CONFIG_SPL_IMAGE to select the SPL binary
Stefan Roese [Wed, 3 Apr 2019 13:24:50 +0000 (15:24 +0200)]
Makefile: Add Kconfig option CONFIG_SPL_IMAGE to select the SPL binary

This patch adds the CONFIG_SPL_IMAGE option to select the SPL image that
shall be used to generate the combined SPL + U-Boot image. The default
value is the current value "spl/u-boot-spl.bin".

This patch also sets CONFIG_SPL_IMAGE to "spl/boot.bin" for AT91 targets
which use SPL NAND support (boot from NAND). For these build targets the
combined image "u-boot-with-spl.bin" is now automatically generated and
can be programmed into NAND as one single image (vs. SPL image and U-Boot
as 2 separate images).

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Andreas Bießmann <andreas@biessmann.org>
Cc: Eugen Hristev <eugen.hristev@microchip.com>
5 years agoMakefile.spl: Move generated AT91SAM NAND image boot.bin to spl directory
Stefan Roese [Tue, 2 Apr 2019 08:57:23 +0000 (10:57 +0200)]
Makefile.spl: Move generated AT91SAM NAND image boot.bin to spl directory

This patch moves the AT91SAM NAND booting SPL image "boot.bin" which
includes the ECC values from the root directory into the spl directory,
where all SPL related images are located.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Andreas Bießmann <andreas@biessmann.org>
Cc: Eugen Hristev <eugen.hristev@microchip.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Tested on the taurus board:
Tested-by: Heiko Schocher <hs@denx.de>
5 years agoarm: at91: arm926ejs/u-boot-spl.lds: Add _image_binary_end to SPL lds
Stefan Roese [Tue, 2 Apr 2019 08:57:22 +0000 (10:57 +0200)]
arm: at91: arm926ejs/u-boot-spl.lds: Add _image_binary_end to SPL lds

This patch adds _image_binary_end to the SPL linker script. This will be
used be the upcoming GARDENA AT91SAM based platform, which uses DT in
SPL and configures CONFIGURE_SPL_SEPARATE_BSS.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Andreas Bießmann <andreas@biessmann.org>
Cc: Eugen Hristev <eugen.hristev@microchip.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
5 years agoarm: at91: Enable watchdog support
Stefan Roese [Wed, 3 Apr 2019 05:37:40 +0000 (07:37 +0200)]
arm: at91: Enable watchdog support

This patch enables and starts the watchdog on the AT91 platform if
configured. The WD timeout value is read in the AT91 WD device driver
from the DT, using the "timeout-sec" DT property. If not provided in
the DT, the default value of 2 seconds is used.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Andreas Bießmann <andreas@biessmann.org>
Cc: Eugen Hristev <eugen.hristev@microchip.com>
5 years agoarm: at91: Remove CONFIG_AT91_HW_WDT_TIMEOUT
Stefan Roese [Wed, 3 Apr 2019 05:37:05 +0000 (07:37 +0200)]
arm: at91: Remove CONFIG_AT91_HW_WDT_TIMEOUT

This patch removes the CONFIG_AT91_HW_WDT_TIMEOUT as its not needed any
more. The WD timeout value can be provided via the "timeout-sec" DT
property. If not provided this way, the default value of 2 seconds will
be used.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Andreas Bießmann <andreas@biessmann.org>
Cc: Eugen Hristev <eugen.hristev@microchip.com>
5 years agowatchdog: at91sam9_wdt: Fix WDT setup in at91_wdt_start()
Stefan Roese [Tue, 2 Apr 2019 08:57:19 +0000 (10:57 +0200)]
watchdog: at91sam9_wdt: Fix WDT setup in at91_wdt_start()

This patch fixes the timer register setup in at91_wdt_start() to
correctly configure the register again. The input timeout value is
now in milli-seconds instead of seconds with the new watchdog API.
Make sure to take this into account and only use a max timeout
value of 16 seconds as appropriate for this SoC.

Also the check against a lower timeout value than 0 is removed. This
check makes no sense, as the timeout value is unsigned.

Signed-off-by: Stefan Roese <sr@denx.de>
Reported-by: Heiko Schocher <hs@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Andreas Bießmann <andreas@biessmann.org>
Cc: Eugen Hristev <eugen.hristev@microchip.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Tested on the taurus board:
Tested-by: Heiko Schocher <hs@denx.de>
5 years agowatchdog: Handle SPL build with watchdog disabled
Stefan Roese [Tue, 2 Apr 2019 08:57:18 +0000 (10:57 +0200)]
watchdog: Handle SPL build with watchdog disabled

This patch adds some checks, so that the watchdog can be enabled in main
U-Boot proper but can be disabled in SPL.

This will be used by some AT91SAM based boards, which might enable the
watchdog in the main U-Boot proper and not in SPL. It will be enabled in
SPL by default there, so no need to configure it there. This approach
saves some space in SPL.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Andreas Bießmann <andreas@biessmann.org>
Cc: Eugen Hristev <eugen.hristev@microchip.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Tested on the taurus board:
Tested-by: Heiko Schocher <hs@denx.de>
5 years agoserial: atmel_usart: Use fixed clock value in SPL version with DM_SERIAL
Stefan Roese [Wed, 3 Apr 2019 13:24:19 +0000 (15:24 +0200)]
serial: atmel_usart: Use fixed clock value in SPL version with DM_SERIAL

This patch adds an alterative SPL version of atmel_serial_enable_clk().
This enables the usage of this driver without full clock support (in
drivers and DT nodes). This saves some space in the SPL image.

Please note that this fixed clock support is only added to the SPL code
in the DM_SERIAL part of this file. All boards not using SPL & DM_SERIAL
should not be affected.

This patch also introduces CONFIG_SPL_UART_CLOCK for the fixed UART
input clock. It defaults to 132096000 for ARCH_AT91 but can be set to
a different value if needed.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Andreas Bießmann <andreas@biessmann.org>
Cc: Eugen Hristev <eugen.hristev@microchip.com>
5 years agoarm: at91: spl_at91.c: Call spl_early_init() if OF_CONTROL is enabled
Stefan Roese [Tue, 2 Apr 2019 08:57:16 +0000 (10:57 +0200)]
arm: at91: spl_at91.c: Call spl_early_init() if OF_CONTROL is enabled

This patch adds a call to spl_early_init() to board_init_f() which is
needed when CONFIG_SPL_OF_CONTROL is configured. This is necessary for
the early SPL setup including the DTB setup for later usage.

Please note that this call might also be needed for non SPL_OF_CONTROL
board, like the smartweb target. But smartweb fails to build with this
call because its binary grows too big. So I disabled it for these kind
of targets for now.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Andreas Bießmann <andreas@biessmann.org>
Cc: Eugen Hristev <eugen.hristev@microchip.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Tested on the taurus board:
Tested-by: Heiko Schocher <hs@denx.de>
5 years agoarm: at91: Makefile: Compile lowlevel_init only when really necessary
Stefan Roese [Tue, 2 Apr 2019 08:57:15 +0000 (10:57 +0200)]
arm: at91: Makefile: Compile lowlevel_init only when really necessary

Make sure that lowlevel_init is not compiled when
CONFIG_SKIP_LOWLEVEL_INIT_ONLY is configured.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Andreas Bießmann <andreas@biessmann.org>
Cc: Eugen Hristev <eugen.hristev@microchip.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Tested on the taurus board:
Tested-by: Heiko Schocher <hs@denx.de>
5 years agoboard: pm9g45: Migrate to CONFIG_DM
Ilko Iliev [Wed, 3 Apr 2019 14:50:30 +0000 (16:50 +0200)]
board: pm9g45: Migrate to CONFIG_DM

Migrate the following options to CONFIG_DM:
  CONFIG_DM_GPIO
  CONFIG_DM_MMC
  CONFIG_DM_ETH
  CONFIG_DM_SERIAL
  CONFIG_DM_USB

Signed-off-by: Ilko Iliev <iliev@ronetix.at>
5 years agoARM: at91: sama5d2: Wrap cpu detection to fix macb driver
Alexander Dahl [Fri, 22 Mar 2019 13:25:54 +0000 (14:25 +0100)]
ARM: at91: sama5d2: Wrap cpu detection to fix macb driver

When introducing the SAMA5D27 SoCs, the SAMA5D2 series got an additional
chip id. The check if the cpu is sama5d2 was changed from a preprocessor
definition (inlining a call to 'get_chip_id()') to a C function,
probably to not call get_chip_id twice?

That however broke a check in the macb ethernet driver. That driver is
more generic and also used for other platforms. I suppose this solution
was implemented to use it in 'gem_is_gigabit_capable()', without having
to stricly depend on the at91 platform:

#ifndef cpu_is_sama5d2
#define cpu_is_sama5d2() 0
#endif

That only works as long as cpu_is_sama5d2 is a preprocessor definition.
(The same is still true for sama5d4 by the way.) So this is a straight
forward fix for the workaround.

The not working check on the SAMA5D2 CPU lead to an issue on a custom
board with a LAN8720A ethernet phy connected to the SoC:

=> dhcp
ethernet@f8008000: PHY present at 1
ethernet@f8008000: Starting autonegotiation...
ethernet@f8008000: Autonegotiation complete
ethernet@f8008000: link up, 1000Mbps full-duplex (lpa: 0xffff)
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
BOOTP broadcast 5
BOOTP broadcast 6
BOOTP broadcast 7
BOOTP broadcast 8
BOOTP broadcast 9
BOOTP broadcast 10
BOOTP broadcast 11
BOOTP broadcast 12
BOOTP broadcast 13
BOOTP broadcast 14
BOOTP broadcast 15
BOOTP broadcast 16
BOOTP broadcast 17

Retry time exceeded; starting again

Notice the wrong reported link speed, although both SoC and phy only
support 100 MBit/s!

The real issue on reliably detecting the features of that cadence
ethernet mac IP block, is probably more complicated, though.

Fixes: 245cbc583d ("ARM: at91: Get the Chip ID of SAMA5D2 SiP")
Signed-off-by: Alexander Dahl <ada@thorsis.com>
5 years agoPrepare v2019.04 v2019.04
Tom Rini [Tue, 9 Apr 2019 01:40:40 +0000 (21:40 -0400)]
Prepare v2019.04

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoarm: sunxi: Enable DM_MMC on required SoCs
Jagan Teki [Mon, 8 Apr 2019 20:27:54 +0000 (01:57 +0530)]
arm: sunxi: Enable DM_MMC on required SoCs

Enabling DM_MMC is forcing CONFIG_BLK=y so if any board which uses
SCSI must need to enable DM_SCSI otherwise SCSI reads on that particular
target making invalid reading to the disk drive.

Allwinner platform do support SCSI on A10, A20 and R40 SoC's out of
these only A10 have DM_SCSI enabled. So enabling DM_MMC on A20, R40
would eventually end-up with scsi disk read failures like [1]

So, enable DM_MMC in all places of respective SoC's instead of enabling
them globally to Allwinner platform.

Now, DM_MMC is enabled in Allwinner SoC's except A20 and R40.

[1] https://lists.denx.de/pipermail/u-boot/2019-April/364057.html

Reported-by: Pablo Sebastián Greco <pgreco@centosproject.org>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agoMerge tag 'fixes-for-2019.04-rc4' of git://git.denx.de/u-boot-staging
Tom Rini [Mon, 8 Apr 2019 14:11:29 +0000 (10:11 -0400)]
Merge tag 'fixes-for-2019.04-rc4' of git://git.denx.de/u-boot-staging

- i.MX8QXP-MEK ethernet fix

5 years agodts: imx8qxp-mek: Add PHY post reset delay
Andrejs Cainikovs [Fri, 1 Mar 2019 13:28:00 +0000 (13:28 +0000)]
dts: imx8qxp-mek: Add PHY post reset delay

PHY cannot be detected unless we wait about 150 ms.

Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@netmodule.com>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
Reviewed-by: Stefano Babic <sbabic@denx.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agonet: dm: fec: Support phy-reset-post-delay property
Andrejs Cainikovs [Fri, 1 Mar 2019 13:27:59 +0000 (13:27 +0000)]
net: dm: fec: Support phy-reset-post-delay property

As per Linux kernel DT binding doc:
- phy-reset-post-delay : Post reset delay in milliseconds. If present then
  a delay of phy-reset-post-delay milliseconds will be observed after the
  phy-reset-gpios has been toggled. Can be omitted thus no delay is
  observed. Delay is in range of 1ms to 1000ms. Other delays are invalid.

Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@netmodule.com>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
Reviewed-by: Stefano Babic <sbabic@denx.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Lukasz Majewski <lukma@denx.de>
5 years agowatchdog: Move watchdog_dev to data section (BSS may not be cleared)
Stefan Roese [Wed, 3 Apr 2019 07:12:48 +0000 (09:12 +0200)]
watchdog: Move watchdog_dev to data section (BSS may not be cleared)

This patch moves all instances of static "watchdog_dev" declarations to
the "data" section. This may be needed, as the BSS may not be cleared
in the early U-Boot phase, where watchdog_reset() is already beeing
called. This may result in incorrect pointer access, as the check to
"!watchdog_dev" in watchdog_reset() may not be true and the function
may continue to run.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: "Marek Behún" <marek.behun@nic.cz>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Tested-by: Michal Simek <michal.simek@xilinx.com> (on zcu100)
Reviewed-by: Michal Simek <michal.simek@xilinx.com>
5 years agonet: phy: implement fallback mechanism for negative phy adresses
Hannes Schmelzer [Fri, 29 Mar 2019 08:54:05 +0000 (09:54 +0100)]
net: phy: implement fallback mechanism for negative phy adresses

Negative phy-addresses can occour if the caller function was not able to
determine a valid phy address (from device-tree for example). In this
case we catch this here and search for ANY phy device on the given mdio-
bus.

Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Tested-by: Lukasz Majewski <lukma@denx.de>
5 years agoMerge tag 'u-boot-imx-20190405' of git://git.denx.de/u-boot-imx
Tom Rini [Fri, 5 Apr 2019 13:09:56 +0000 (09:09 -0400)]
Merge tag 'u-boot-imx-20190405' of git://git.denx.de/u-boot-imx

Fixes for 2019.04

- fix bashism for MX8
- fix ethernet for MX53
- fix docs for i.MX8

5 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Tom Rini [Wed, 3 Apr 2019 14:28:10 +0000 (10:28 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

- Documentation fix

5 years agoMerge branch '2019-04-03-master-imports'
Tom Rini [Wed, 3 Apr 2019 14:26:57 +0000 (10:26 -0400)]
Merge branch '2019-04-03-master-imports'

- Important Khadas VIM2 fix
- Build fix for macOS Mojave
- Build fix for gcc-4.7 for host tools.

5 years agotools/Makefile: build host tools with -std=gnu99
Thomas Petazzoni [Sat, 30 Mar 2019 14:29:23 +0000 (15:29 +0100)]
tools/Makefile: build host tools with -std=gnu99

Parts of the code are using C99 constructs (such as variables declared
inside loops), but also GNU extensions (such as typeof), so using
-std=gnu99 is necessary to build with older versions of gcc that don't
default to building with gnu99.

It fixes the following build failure:

./tools/../lib/crc16.c: In function "crc16_ccitt":
./tools/../lib/crc16.c:70:2: error: "for" loop initial declarations are only allowed in C99 mode
  for (int i = 0;  i < len;  i++)
  ^
./tools/../lib/crc16.c:70:2: note: use option -std=c99 or -std=gnu99 to compile your code

when building the host tools with gcc 4.7.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
5 years agofix compile error on macOS Mojave
默默 [Sun, 31 Mar 2019 08:07:03 +0000 (16:07 +0800)]
fix compile error on macOS Mojave

5 years agoconfigs: khadas_vim2: Fix defconfig
Neil Armstrong [Wed, 3 Apr 2019 11:46:37 +0000 (13:46 +0200)]
configs: khadas_vim2: Fix defconfig

The Khadas VIM2 defconfig was missing the USB PHY config and
two other misc configs to setup dram banks and call misc_init_r.
Align it on the other Amlogic SoC based boards defconfig.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
5 years agophy: Also allow MESON_GXM for MESON_GXL_USB_PHY
Neil Armstrong [Wed, 3 Apr 2019 11:46:36 +0000 (13:46 +0200)]
phy: Also allow MESON_GXM for MESON_GXL_USB_PHY

The MESON_GXL_USB_PHY is also used on the Amlogic Meson GXM SoCs.

Fixes: 2960e27e38 ("phy: Add Amlogic Meson USB2 & USB3 Generic PHY drivers")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
5 years agotravis-ci: fix at91 missing boards
Eugen Hristev [Mon, 1 Apr 2019 11:04:03 +0000 (11:04 +0000)]
travis-ci: fix at91 missing boards

Fix missing at91 boards and split the at91 in two categories:
at91 arm v7
at91 arm926esj
which are the two main cores for the at91 architecture.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
5 years agoDTS: Fix ETH PHY reset on HSC|DDC boards (imx53)
Lukasz Majewski [Mon, 1 Apr 2019 14:00:05 +0000 (16:00 +0200)]
DTS: Fix ETH PHY reset on HSC|DDC boards (imx53)

After the commit: "eth: dm: fec: Add gpio phy reset binding"
SHA1: efd0b791069af93e9d439a70d1fe2ae8994dbbfa

The FEC ETH driver switched to PHY GPIO reset performed with data defined
in DTS.
For the HSC|DDC boards the GPIO reset signal is active low and hence the
wrong DTS description must be changed (otherwise the reset for ETH is not
properly setup).

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agocosmetic: Remove not needed string from kp_imx53.h config
Lukasz Majewski [Mon, 1 Apr 2019 14:00:04 +0000 (16:00 +0200)]
cosmetic: Remove not needed string from kp_imx53.h config

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agocosmetic: config: Remove empty #ifdefs
Lukasz Majewski [Mon, 1 Apr 2019 14:00:03 +0000 (16:00 +0200)]
cosmetic: config: Remove empty #ifdefs

After running tools/moveconfig.py it turned out that for various boards
there are an empty #ifdef statements.

Remove them to clean u-boot source code.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agodoc: Fix outdated ohci board hook documentation
Krzysztof Kozlowski [Tue, 2 Apr 2019 07:32:12 +0000 (09:32 +0200)]
doc: Fix outdated ohci board hook documentation

The ohci driver calls board_usb_init(), not usb_board_init().

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
5 years agoimx8mq_evk: README: Make the underline marker fill the whole sentence
Fabio Estevam [Wed, 13 Mar 2019 18:02:58 +0000 (15:02 -0300)]
imx8mq_evk: README: Make the underline marker fill the whole sentence

Let the underline marker "=" fill the whole sentence for better
readability.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
5 years agoimx8mq_evk: README: Fix a typo in the destination path
Fabio Estevam [Wed, 13 Mar 2019 18:02:57 +0000 (15:02 -0300)]
imx8mq_evk: README: Fix a typo in the destination path

The DDR firmware binaries should be copied to '$(srctree)', so fix
a typo.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
5 years agoimx8mq_evk: README: Need to copy bl31.bin to U-Boot source tree
Fabio Estevam [Wed, 13 Mar 2019 18:02:56 +0000 (15:02 -0300)]
imx8mq_evk: README: Need to copy bl31.bin to U-Boot source tree

After building ATF it is needed to copy the generated bl31.bin file to
the U-Boot source tree.

Make this step explicit in the instructions.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-sh
Tom Rini [Tue, 2 Apr 2019 03:30:00 +0000 (23:30 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-sh

Minor fixes for the Alt board and PHY use on Gen2.

5 years agoMerge branch 'master' of git://git.denx.de/u-boot-sunxi
Tom Rini [Mon, 1 Apr 2019 16:31:22 +0000 (12:31 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-sunxi

- clk: sunxi: a10: Add CLK_AHB_GMAC

5 years agoclk: sunxi: a10: Add CLK_AHB_GMAC
Jagan Teki [Thu, 28 Mar 2019 08:16:11 +0000 (13:46 +0530)]
clk: sunxi: a10: Add CLK_AHB_GMAC

CLK_AHB_GMAC was suppose to be part of previous commit
"clk: sunxi: Implement A10 EMAC clocks" add it so-that
we can get rid of sunxi_set_gate warning on boot message.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agotools/imx8m_image.sh: remove bashism
Baruch Siach [Wed, 2 Jan 2019 06:58:28 +0000 (08:58 +0200)]
tools/imx8m_image.sh: remove bashism

Use a single '=' to test string equality for compatibility with non-bash
shells. Otherwise, if /bin/sh is dash, build fails:

./tools/imx8m_image.sh: 15: [: signed_hdmi_imx8m.bin: unexpected operator
./tools/imx8m_image.sh: 15: [: signed_hdmi_imx8m.bin: unexpected operator
./tools/imx8m_image.sh: 15: [: spl/u-boot-spl-ddr.bin: unexpected operator
./tools/imx8m_image.sh: 15: [: spl/u-boot-spl-ddr.bin: unexpected operator
WARNING './spl/u-boot-spl-ddr.bin' not found, resulting binary is not-functional

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Tested-by: Chris Spencer <christopher.spencer@sea.co.uk>
5 years agoMerge tag 'u-boot-imx-20190401' of git://git.denx.de/u-boot-imx
Tom Rini [Mon, 1 Apr 2019 13:39:38 +0000 (09:39 -0400)]
Merge tag 'u-boot-imx-20190401' of git://git.denx.de/u-boot-imx

Fixes for 2019.01

- pico-imx6ul: fix after conversion
- engicam boards
- pico-imx7d _ README due to hang with imx-usb-loader

5 years agopico-imx7d: README: Recommend the usage of a USB hub
Fabio Estevam [Wed, 27 Mar 2019 23:03:39 +0000 (20:03 -0300)]
pico-imx7d: README: Recommend the usage of a USB hub

Since commit 9e3c0174da842 ("pico-imx7d: Add LCD support") we started to
notice some hangs in U-Boot.

There is not an issue on such commit per se, but due to the LCD support
the current drawn is increased and this may cause issues when powering
pico-imx7d-pi from USB.

Some computers may be a bit strict with USB current draw and will
shut down their ports if the draw is too high.

The solution for that is to use an externally powered USB hub between the
board and the host computer.

Add such recommendation to the README file.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
5 years agoconfigs: icorem6: Use imx6 cratch register for bootcount
Jagan Teki [Thu, 21 Mar 2019 08:35:53 +0000 (14:05 +0530)]
configs: icorem6: Use imx6 cratch register for bootcount

SRAM address used for bootcount on exiting code is erasing
previous count value when system reset from Linux. So use
the dedicated imx6 scratch register, GPR2 to preserve the
contents even if the system reset from Linux.

Fixes: 4eb9aa39350e ("configs: imx6qdl_icore_mmc: Enable watchdog and bootcounter")
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Shyam Saini <shyam.saini@amarulasolutions.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
5 years agoconfigs: icore: Fix U-Boot proper loading from nand
Michael Trimarchi [Fri, 8 Mar 2019 07:35:03 +0000 (13:05 +0530)]
configs: icore: Fix U-Boot proper loading from nand

SPL on Engicam i.Core M6 boards enabled DM, so it would require some
malloc() pool before relocation in order to load U-Boot proper properly.

So, enable SPL malloc() pool of 0x2000 size similarly like what we have
used for icore mmc defconfigs.

Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Shyam Saini <shyam.saini@amarulasolutions.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
5 years agoARM: imx6q_logic: Enable UUID support
Adam Ford [Sun, 3 Mar 2019 22:22:45 +0000 (16:22 -0600)]
ARM: imx6q_logic: Enable UUID support

With UUID support, the root can now point to UUID.  This makes
swiching between mmc 0 and mmc 1 easier by simplying changing
mmcdev between 0 and 1.  From there, the scripts handle the rest.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agopico-imx6ul: Fix eMMC boot after DM_MMC conversion
Fabio Estevam [Thu, 21 Mar 2019 13:59:06 +0000 (10:59 -0300)]
pico-imx6ul: Fix eMMC boot after DM_MMC conversion

After the DM_MMC conversion the following eMMC boot error is observed:

U-Boot SPL 2019.04-rc4 (Mar 20 2019 - 18:53:28 +0000)
Trying to boot from MMC1
MMC Device 0 not found
spl: could not find mmc device 0. error: -19
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

This happens because the SPL code does not initialize the SDHC pins
and clock.

Fix it by moving the original eMMC initialization from U-Boot proper
to SPL.

Reported-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Tested-by: Fabio Berton <fabio.berton@ossystems.com.br>
Reviewed-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot
Stefano Babic [Sun, 31 Mar 2019 17:54:10 +0000 (19:54 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot

Signed-off-by: Stefano Babic <sbabic@denx.de>
5 years agoMerge tag 'video-fixes-for-2019.04-rc4' of git://git.denx.de/u-boot-video
Tom Rini [Sun, 31 Mar 2019 11:25:11 +0000 (07:25 -0400)]
Merge tag 'video-fixes-for-2019.04-rc4' of git://git.denx.de/u-boot-video

sunxi HDMI clock fix

5 years agoMerge tag 'rockchip-fixes-for-2019.04' of git://git.denx.de/u-boot-rockchip
Tom Rini [Sun, 31 Mar 2019 11:25:00 +0000 (07:25 -0400)]
Merge tag 'rockchip-fixes-for-2019.04' of git://git.denx.de/u-boot-rockchip

Last-minute fixes for Rockchip for 2019.04:
- reverts the deprecation of the 'download-key' detection
  (with a full solution pending for the next release)
- applies a temporary fix for the 32bit pinctrl registers on the RK3288

5 years agodfu: usb: Update MAINTAINERS file regarding DFU/USB gadget support
Lukasz Majewski [Sat, 30 Mar 2019 15:22:21 +0000 (16:22 +0100)]
dfu: usb: Update MAINTAINERS file regarding DFU/USB gadget support

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agoARM: rmobile: alt: Fix I2C bus number
Marek Vasut [Sat, 30 Mar 2019 07:24:19 +0000 (08:24 +0100)]
ARM: rmobile: alt: Fix I2C bus number

The I2C bus number to access the PMIC is I2C 7, fix this.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 years agoARM: dts: rmobile: Activate I2C7 on Alt
Marek Vasut [Sat, 30 Mar 2019 07:23:20 +0000 (08:23 +0100)]
ARM: dts: rmobile: Activate I2C7 on Alt

Activate I2C7 on Alt to allow access to the PMIC.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 years agoARM: rmobile: rcar-gen2: Activate bootm_size
Marek Vasut [Sat, 30 Mar 2019 06:43:55 +0000 (07:43 +0100)]
ARM: rmobile: rcar-gen2: Activate bootm_size

Commit d245059ff797 ("ARM: rmobile: rcar-gen3: Activate bootm_size")
only fixed the superfluous CONFIG_SYS_BOOTMAPSZ for R-Car Gen3, even
though it listed all affected boards. Apply the same fix to Gen2.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Fixes: d245059ff797 ("ARM: rmobile: rcar-gen3: Activate bootm_size")
Cc: Eugeniu Rosca <erosca@de.adit-jv.com>
5 years agoARM: rmobile: Fix PHY LED mode register mask
Marek Vasut [Sat, 30 Mar 2019 06:05:09 +0000 (07:05 +0100)]
ARM: rmobile: Fix PHY LED mode register mask

The PHY LED mode register mask should be 0xc000 , not 0xc0000.
Correct the mask to operate on the right bits.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 years agoARM: rmobile: alt: Synchronize defconfig
Marek Vasut [Sat, 30 Mar 2019 05:20:01 +0000 (06:20 +0100)]
ARM: rmobile: alt: Synchronize defconfig

Synchronize the R8A7794 Alt defconfig, enable DM SPI, DM SPI FLASH
and I2C driver support.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 years agoARM: rmobile: alt: Remove CLK2MHZ macro
Marek Vasut [Sat, 30 Mar 2019 05:14:42 +0000 (06:14 +0100)]
ARM: rmobile: alt: Remove CLK2MHZ macro

The CLK2MHZ macro is unused, remove it.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 years agoARM: rmobile: alt: Remove R8A7794_ETHERNET_B
Marek Vasut [Sat, 30 Mar 2019 05:10:49 +0000 (06:10 +0100)]
ARM: rmobile: alt: Remove R8A7794_ETHERNET_B

The R8A7794_ETHERNET_B config option is unused and based on the
description, this is a setting which should be fully done on a
DT level instead. Remove this config option.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 years agoMerge branch '2019-03-29-master-imports'
Tom Rini [Fri, 29 Mar 2019 14:53:28 +0000 (10:53 -0400)]
Merge branch '2019-03-29-master-imports'

- Bugfixes:
  - mmc: correct the HS400 initialization process
  - configs: ti: Move FIT image load address to avoid overwrite
  - lib: time: update module enable MACRO
  - Add mbrugger as RPi board maintainer, correct agraf's email address.

5 years agolib: time: update module enable MACRO
Kever Yang [Fri, 29 Mar 2019 14:17:33 +0000 (22:17 +0800)]
lib: time: update module enable MACRO

We'd better use correct way to check if module has enabled.
for we have 3 timer MACRO:
- CONFIG_TIMER
- CONFIG_SPL_TIMER
- CONFIG_TPL_TIMER

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
5 years agodoc/git-mailrc: correct entry 'agraf'
Heinrich Schuchardt [Thu, 28 Mar 2019 21:51:35 +0000 (22:51 +0100)]
doc/git-mailrc: correct entry 'agraf'

Correct Alex's email address.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Alexander Graf <agraf@csgraf.de>
5 years agoRPi: Add mbrugger as board maintainer
Matthias Brugger [Thu, 28 Mar 2019 13:47:39 +0000 (14:47 +0100)]
RPi: Add mbrugger as board maintainer

I took over maintainership from Alex Graf with commit
3157bbfa18 ("rpi: Make Matthias maintainer")
But I forgot to update the board maintainer file.
This patch adds myself to the game.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Alexander Graf <agraf@csgraf.de>
5 years agoconfigs: ti: Move FIT image load address to avoid overwrite
Andrew F. Davis [Tue, 26 Mar 2019 15:12:01 +0000 (10:12 -0500)]
configs: ti: Move FIT image load address to avoid overwrite

The FIT image is loaded to 0x8700_0000 followed by extracting from that
several large images also into the 0x8x00_0000 range. Large images
can end up overwriting the FIT image as it is being extracted from.
Move the FIT load address clear out to 0x9000_0000, this will require
a board to have at least 256MB of DRAM, if less then more careful
planning will be required for that platform.

Signed-off-by: Andrew F. Davis <afd@ti.com>
5 years agommc: correct the HS400 initialization process
BOUGH CHEN [Tue, 26 Mar 2019 06:24:17 +0000 (06:24 +0000)]
mmc: correct the HS400 initialization process

After the commit b9a2a0e2e9c0 ("mmc: Add support for downgrading
HS200/HS400 to HS mode"), it add a parameter in mmc_set_card_speed()
which indicates that the HS200/HS400 to HS downgrade is happening.

During the HS400 initialization, first select to HS200, and config
the related clock rate, then downgrade to HS mode. So here also need
to config the downgrade value to be true for two reasons. First,
make sure in the function mmc_set_card_speed(), after switch to HS
mode, first config the clock rate, then read the EXT_CSD, avoid
receiving data of EXT_CSD in HS mode at 200MHz. Second, after issue
the MMC_CMD_SWITCH command, it need to wait a bit then switch bus
properties.

Test on i.MX8QM MEK board, some Micron eMMC will stuck in transfer
mode in this case, and USDHC will never get data transfer complete
status, cause the uboot hang.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
5 years agoMerge tag 'efi-2019-04-rc5-2' of git://git.denx.de/u-boot-efi
Tom Rini [Fri, 29 Mar 2019 13:21:30 +0000 (09:21 -0400)]
Merge tag 'efi-2019-04-rc5-2' of git://git.denx.de/u-boot-efi

Pull request for UEFI system for v2019.04-rc5-2

This patch series contains a bug fix for a double free in a UEFI unit
test. The other patches are documentation only (except for the definition
of two additional constants).

5 years agopinctrl: rockchip: Add 32bit writing function for rk3288 gpio0 pinctrl
David Wu [Tue, 12 Feb 2019 11:51:51 +0000 (19:51 +0800)]
pinctrl: rockchip: Add 32bit writing function for rk3288 gpio0 pinctrl

There are no higher 16 writing corresponding bits for pmu_gpio0's
iomux/drive/pull at rk3288, need to read the value from register
firstly. Add the flag to distinguish it from normal registers.

Signed-off-by: David Wu <david.wu@rock-chips.com>
5 years agoRevert "rockchip: Drop call to rockchip_dnl_mode_check() for now"
Philipp Tomsich [Fri, 29 Mar 2019 08:21:13 +0000 (09:21 +0100)]
Revert "rockchip: Drop call to rockchip_dnl_mode_check() for now"

Due to a final resolution not coming up in time for 2019.04 and
following the consensus on the discussion, we'll keep this around
for 2019.04 after all.

This reverts commit 0d968ceb1ff63b0d220a571f438f0d5fe6350e88.

5 years agoMerge tag 'arc-last-minute-for-2019.04' of git://git.denx.de/u-boot-arc
Tom Rini [Fri, 29 Mar 2019 01:44:49 +0000 (21:44 -0400)]
Merge tag 'arc-last-minute-for-2019.04' of git://git.denx.de/u-boot-arc

This is last minute change which fixes problems in runtime on
AXS10x board caused by some changes in NAND framework and
tiny documentation improvement.

Anyways NAND flash storage was never really used on the board for various
reasons and now we decided to drop it for good.

Note this change only touches 1 ARC board so that should be safe for others.
As usual - build tested in TravisCI, see
https://travis-ci.org/abrodkin/u-boot/builds/512041342

5 years agosunxi: video: HDMI: Fix clock setup
Jernej Skrabec [Sun, 24 Mar 2019 18:26:40 +0000 (19:26 +0100)]
sunxi: video: HDMI: Fix clock setup

Currently, HDMI driver doesn't consider minimum and maximum allowed rate
of pll3 (video PLL). It works most of the time, but not always.

Consider monitor with resolution 1920x1200, which has pixel clock rate
of 154 MHz. Current code would determine that pll3 rate has to be set to
154 MHz. However, minimum supported rate is 192 MHz. In this case video
output just won't work.

The reason why the driver is written in the way it is, is that at the
time HDMI PHY and clock configuration wasn't fully understood. But now
we have needed knowledge, so the issue can be fixed.

With this fix, clock configuration routine uses full range (1-16) for
clock divider instead of limited one (1, 2, 4, 11). It also considers
minimum and maximum allowed rate for pll3.

Fixes: 56009451d843 ("sunxi: video: Add A64/H3/H5 HDMI driver")
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
5 years agohsdk: readme: Suggest getting pyelftools with pip
Alexey Brodkin [Mon, 18 Feb 2019 12:03:34 +0000 (15:03 +0300)]
hsdk: readme: Suggest getting pyelftools with pip

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Suggested-by: Yunir Salimzyanov <yunir@synopsys.com>
5 years agoARC: AXS10x: drop NAND support
Eugeniy Paltsev [Wed, 27 Mar 2019 13:53:43 +0000 (16:53 +0300)]
ARC: AXS10x: drop NAND support

On AXS10x boards we have non-standard NAND controller
which was never really used a lot as there're other much more
convenient [as they are standard & removable] persistent media
like SD-card and USB mass storage.

Moreover after recent changes we face with some NAND controller
runtime issues. So instead of keeping support of yet another
non-standard peripheral we're dropping its support for good.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
5 years agoefi_loader: define development target in README.uefi
Heinrich Schuchardt [Thu, 28 Mar 2019 07:09:16 +0000 (08:09 +0100)]
efi_loader: define development target in README.uefi

Describe the target scope of the UEFI implementation in U-Boot.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: update TODOs in doc/README.uefi
Heinrich Schuchardt [Wed, 27 Mar 2019 21:02:30 +0000 (22:02 +0100)]
efi_loader: update TODOs in doc/README.uefi

The following TODOs are closed:

- GetNextVariableName is not implemented
- event groups
- manage events in a linked list

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoMAINTAINERS: adjust git repository for EFI PAYLOAD
Heinrich Schuchardt [Wed, 20 Mar 2019 17:47:07 +0000 (18:47 +0100)]
MAINTAINERS: adjust git repository for EFI PAYLOAD

The EFI PAYLOAD will use git://git.denx.de/u-boot-efi.git in future.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: TODO for the EFI file protocol
Heinrich Schuchardt [Wed, 27 Mar 2019 20:41:04 +0000 (21:41 +0100)]
efi_loader: TODO for the EFI file protocol

We currently only support EFI_FILE_PROTOCOL_REVISION while
UEFI specs 2.4 - 2.7 prescribe EFI_FILE_PROTOCOL_REVISION2.
Add a todo.

Add missing constants for the EFI file protocol revision.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_selftest: avoid double free in dp utilities test
Heinrich Schuchardt [Tue, 26 Mar 2019 04:56:31 +0000 (05:56 +0100)]
efi_selftest: avoid double free in dp utilities test

Avoid duplicate FreePool() in unit test for the device patch utilities
protocol.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-socfpga
Tom Rini [Wed, 27 Mar 2019 03:19:31 +0000 (23:19 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-socfpga

- configs: Stratix10: Remove CONFIG_USE_TINY_PRINTF

5 years agoMerge branch 'master' of git://git.denx.de/u-boot-sh
Tom Rini [Wed, 27 Mar 2019 03:19:11 +0000 (23:19 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-sh

- Various fixes for bugs found by u-boot test.py

5 years agoMerge branch '2019-03-25-master-imports'
Tom Rini [Wed, 27 Mar 2019 03:17:21 +0000 (23:17 -0400)]
Merge branch '2019-03-25-master-imports'

- Convert various SPI related options to Kconfig

5 years agoConvert CONFIG_ENV_SPI_* to Kconfig
Patrick Delaunay [Wed, 27 Feb 2019 14:20:38 +0000 (15:20 +0100)]
Convert CONFIG_ENV_SPI_* to Kconfig

This converts the following to Kconfig:
  CONFIG_ENV_SPI_BUS
  CONFIG_ENV_SPI_CS
  CONFIG_ENV_SPI_MAX_HZ
  CONFIG_ENV_SPI_MODE

Most of time these value are not needed, CONFIG_SF_DEFAULT
with same value is used, so I introduced CONFIG_USE_ENV_SPI_*
to force the associated value for the environment.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoConvert CONFIG_DEFAULT_SPI_* to Kconfig
Patrick Delaunay [Wed, 27 Feb 2019 14:20:37 +0000 (15:20 +0100)]
Convert CONFIG_DEFAULT_SPI_* to Kconfig

This converts the following to Kconfig:
   CONFIG_DEFAULT_SPI_BUS
   CONFIG_DEFAULT_SPI_MODE

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoConvert CONFIG_SF_DEFAULT_* to Kconfig
Patrick Delaunay [Wed, 27 Feb 2019 14:20:36 +0000 (15:20 +0100)]
Convert CONFIG_SF_DEFAULT_* to Kconfig

This converts the following to Kconfig:
  CONFIG_SF_DEFAULT_BUS
  CONFIG_SF_DEFAULT_CS
  CONFIG_SF_DEFAULT_MODE
  CONFIG_SF_DEFAULT_SPEED

I use moveconfig script and then manual check on generated u-boot.cfg
to solve the remaining issue.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agotqma6s_wru4_mmc: manage board_spi_cs_gpio correctly
Patrick Delaunay [Wed, 27 Feb 2019 14:20:35 +0000 (15:20 +0100)]
tqma6s_wru4_mmc: manage board_spi_cs_gpio correctly

Define the function board_spi_cs_gpio only when needed,
only called in drivers/spi/mxc_spi.c.
That avoid compilation issue for tqma6s_wru4_mmc_defconfig
when CONFIG_SF_DEFAULT_BUS and CONFIG_SF_DEFAULT_CS are not
defined (CMD_SF not defined) after migration in KConfig.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoexynos: replace CONFIG_ENV_SPI_BASE by CONFIG_SYS_SPI_BASE
Patrick Delaunay [Wed, 27 Feb 2019 14:20:34 +0000 (15:20 +0100)]
exynos: replace CONFIG_ENV_SPI_BASE by CONFIG_SYS_SPI_BASE

Replace CONFIG_ENV_SPI_BASE by the better CONFIG_SYS_SPI_BASE
(it is not the location for environment but the location for U-Boot)
and, as it is the only platform with use this define, remove
it from whitelist.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agocontrolcenterdc: move some configuration in defconfig file
Patrick Delaunay [Wed, 27 Feb 2019 14:20:33 +0000 (15:20 +0100)]
controlcenterdc: move some configuration in defconfig file

Move some configurations in defconfig file
- CONFIG_CMD_I2C
- CONFIG_CMD_SPI

This allow correct dependency handling in Kconfig.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agobcm7445: move some configuration in defconfig file
Patrick Delaunay [Wed, 27 Feb 2019 14:20:32 +0000 (15:20 +0100)]
bcm7445: move some configuration in defconfig file

Move some configurations in defconfig file
- CONFIG_DM_SPI (removed by syncing defconfigs )
- CONFIG_CMD_SF
- CONFIG_CMD_SPI
- CONFIG_CMD_SF_TEST

This allow correct dependency handling in Kconfig.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoMerge branch '2019-03-25-master-imports'
Tom Rini [Mon, 25 Mar 2019 21:26:38 +0000 (17:26 -0400)]
Merge branch '2019-03-25-master-imports'

- 3 bugfixes:
  - mmc: Align MMC_TRACE with tiny printf
  - scripts/Makefile.extrawarn: Silence more DTC warnings
  - rsa: check that pointer checksum isn't NULL before using it

5 years agommc: tmio: Clamp SD_SECCNT to 16bit values on 16bit IP
Marek Vasut [Mon, 18 Mar 2019 22:43:10 +0000 (23:43 +0100)]
mmc: tmio: Clamp SD_SECCNT to 16bit values on 16bit IP

On 16bit variants of the TMIO SD IP, the SECCNT register can only be
programmed to 16bit values, while on the 32bit and 64bit variants it
can be programmed to 32bit values. The SECCNT register indicates the
maximum number of blocks in a continuous transfer. Hence, limit the
maximum continuous transfer block count to 65535 blocks on 16bit
variants of the TMIO IP and to BIT(32)-1 blocks on 32bit and 64bit
variants.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agommc: sh_mmcif: Set default MMCIF clock rate
Marek Vasut [Mon, 18 Mar 2019 05:04:17 +0000 (06:04 +0100)]
mmc: sh_mmcif: Set default MMCIF clock rate

Set MMCIF clock rate to 97.5 MHz, which is the default according
to Gen2 datasheet.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoclk: renesas: Add support for setting MMCIF clock divider on Gen2
Marek Vasut [Mon, 18 Mar 2019 05:04:02 +0000 (06:04 +0100)]
clk: renesas: Add support for setting MMCIF clock divider on Gen2

Add code for configuring the MMC0CKCR/MMC1CKCR on Gen2 platforms.
This allows the MMCIF driver to set higher clock rate if desired.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 years agoclk: renesas: Fix swapped div and mul in debug output on Gen2
Marek Vasut [Mon, 18 Mar 2019 04:38:08 +0000 (05:38 +0100)]
clk: renesas: Fix swapped div and mul in debug output on Gen2

The $div and $mul values were swapped in the debug output,
fix this.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 years agoclk: renesas: Fix SDH clock divider decoding on Gen2
Marek Vasut [Mon, 18 Mar 2019 04:11:42 +0000 (05:11 +0100)]
clk: renesas: Fix SDH clock divider decoding on Gen2

The gen2_clk_get_sdh_div() function is supposed to look up the
$val value read out of the SDCKCR register in the supplied table
and return the matching divider value. The current implementation
was matching the value from SDCKCR on the divider value in the
table, which is wrong. Fix this and rework the function a bit
to make it more readable.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 years agoARM: dts: rmobile: Increase off-on delay on the SD Vcc regulator
Marek Vasut [Mon, 18 Mar 2019 02:20:31 +0000 (03:20 +0100)]
ARM: dts: rmobile: Increase off-on delay on the SD Vcc regulator

An ADATA 16GB Industrial MLC card has so much capacitance on the Vcc
pin that the usual toggling of regulator to power the card off and on
is insufficient. When the card is calibrated into UHS SDR104 mode, it
will remain in that mode across the power cycle and subsequent attempt
to communicate with the card will fail.

The test with this card is to insert it into an SDHI slot and perform
"mmc dev 0 ; mmc dev 0", where the second "mmc dev 0" will fail.

Fix this problem by increasing the off-on delay from 0 to 20 mS.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 years agoconfigs: Stratix10: Remove CONFIG_USE_TINY_PRINTF
Ley Foon Tan [Fri, 22 Mar 2019 09:21:40 +0000 (17:21 +0800)]
configs: Stratix10: Remove CONFIG_USE_TINY_PRINTF

Use full printf instead of tiny printf in SPL.

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
5 years agommc: Align MMC_TRACE with tiny printf
Marek Vasut [Sat, 23 Mar 2019 17:54:45 +0000 (18:54 +0100)]
mmc: Align MMC_TRACE with tiny printf

The tiny printf implementation only supports %x format specifier,
it does not support %X . Since it makes little difference whether
the debug output prints hex numbers in capitals or not, change it
to %x and make the MMC_TRACE output work with tiny printf too.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Simon Glass <sjg@chromium.org>
5 years agoscripts/Makefile.extrawarn: Silence more DTC warnings
Tom Rini [Fri, 22 Mar 2019 13:47:39 +0000 (09:47 -0400)]
scripts/Makefile.extrawarn: Silence more DTC warnings

While our "extrawarns" logic has gotten out of sync with upstream
Kbuild, for now lets start by bringing in the latest set of DTC_FLAGS
from the Linux Kernel 5.0 to match their behavior in silencing warnings
from dtc.

Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Tom Rini <trini@konsulko.com>