Loic Devulder [Tue, 27 Nov 2018 16:41:18 +0000 (17:41 +0100)]
ARM: meson: Add regmap support for clock driver
This patch modifies the meson clock driver to use syscon/regmap like
the Linux kernel does, as it is needed if we want to share the same
DTS files.
DTS files are synchronized from Linux 4.19.
Signed-off-by: Loic Devulder <ldevulder@suse.de>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Heinrich Schuchardt [Sat, 1 Dec 2018 22:14:10 +0000 (23:14 +0100)]
drivers: rtc: correctly convert seconds to time structure
Variable 'days' must be defined as signed int. Otherwise the conversion
fails for some dates, e.g. 2004-08-25. Cf function rtc_time64_to_tm() in
the Linux kernel source.
Fixes: 992c1db45591 "drivers: rtc: resolve year 2038 problem in rtc_to_tm"
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Tom Rini [Sat, 1 Dec 2018 19:17:27 +0000 (14:17 -0500)]
Merge tag 'for-master-
20181130' of git://git.denx.de/u-boot-rockchip
Improvements:
- RK3188 USB-UART functionality
- errors triggering a hard-stop in SPL on the RK3399 are reported
- Rockchip RV1108 (SoC) support
- MicroCrystal RV3029 (RTC) DM driver
Fixes:
- RK3188 early UART setup
- limit SD-card frequency to 40MHz on the RK3399-Q7
- MIPI fixes
- RK3399 CPUB clock initialisation
Tom Rini [Fri, 30 Nov 2018 22:09:50 +0000 (17:09 -0500)]
Merge tag 'pull-30nov18' of git://git.denx.de/u-boot-dm
Fix sound on sandbox
Convert TPM fully to DM
Tidy up sandbox I2C emulation
Add a 'make qcheck' target for faster testing
A few other misc things
(dropped the final patch which breaks clang for some reason)
Tom Rini [Fri, 30 Nov 2018 22:09:33 +0000 (17:09 -0500)]
Merge tag 'mips-pull-2018-11-30' of git://git.denx.de/u-boot-mips
- MIPS: MT76xx: minor fixes and updates to gardena-smart-gateway board
Kever Yang [Thu, 29 Nov 2018 02:07:38 +0000 (10:07 +0800)]
rockchip: rk3188: use board_debug_uart_init() for UART io init
Sync with other rockchip SoCs, use board_debug_uart_init() to
init default UART iomux.
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Christoph Muellner [Fri, 30 Nov 2018 19:32:48 +0000 (20:32 +0100)]
rockchip: rk3399: Initialize CPU B clock.
This patch sets the PLL of CPU cluster B (BPLL) to 600 MHz.
This decreases the boot time of Linux 4.19 by about 8%.
The 600 MHz are inspired by the 600 MHz used for LPLL initialization
(came in with commit
9f636a249c1).
Tested on RK3399-Q7 on Haikou base board.
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Philipp Tomsich [Tue, 27 Nov 2018 21:53:58 +0000 (22:53 +0100)]
rtc: rv3029: update to support DM and sync with Linux 4.17
The "Flamingo" carrier-board for the RK3399-Q7 has a RV3029 populated
and the application will use the off-module RV3029 RTC including the
battery backed SRAM.
To support this use case, this commit includes the following changes:
* updates the rv3029 driver to use DM
* implements the read8/write8 operations
This syncs the implementation with the Linux code (based on 4.17),
porting the trickle-charger support from there (with improvements to
avoid unnecessary EEPROM updates) and adheres to the Linux DTS
binding.
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Philipp Tomsich [Tue, 27 Nov 2018 21:53:57 +0000 (22:53 +0100)]
rtc: rv3029: add to Kconfig
The MicroCrystal RV3029 driver didn't have a Kconfig entry and was not used
anywhere. Add it to Kconfig to make it selectable.
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Otavio Salvador [Fri, 30 Nov 2018 13:34:17 +0000 (11:34 -0200)]
ARM: rockchip: rv1108: Add support for default distro_bootcmd
This allow easier integration of RV1108 based boards on generic
distributions and build systems.
To avoid behavior change, we make evb-rv1108 to use the existing
environment as it boots from its SPI NOR.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Otavio Salvador [Fri, 30 Nov 2018 13:34:16 +0000 (11:34 -0200)]
ARM: dts: rockchip: Add rv1108 USB OTG pinctrl
This adds the definitions need to use the USB OTG in rv1108
board. This has been tested using USB Mass Storage to export and
program a eMMC device.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Otavio Salvador [Fri, 30 Nov 2018 13:34:15 +0000 (11:34 -0200)]
ARM: rockchip: rv1108: Add a board_usb_init for USB OTG
Like it is done for other Rockchip SoCs, introduce a board_usb_init()
function so that USB OTG can be functional on rv1108 too.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Otavio Salvador [Fri, 30 Nov 2018 13:34:14 +0000 (11:34 -0200)]
ARM: dts: rockchip: Add rv1108 eMMC pinctrl
This adds the pinctrl handles to enable the use of eMMC on custom
boards (as minievk) and makes it easier for later addition.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Otavio Salvador [Fri, 30 Nov 2018 13:34:13 +0000 (11:34 -0200)]
ARM: rockchip: rv1108: Enable BOUNCE_BUFFER
In order to be able to build the Rockchip eMMC driver on rv1108, the
BOUNCE_BUFFER option needs to be selected. Select it like it is done
on the other Rockchip SoC common files.
Reviewed-by: Andy Yan <andy.yan@rock-chips.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Otavio Salvador [Fri, 30 Nov 2018 13:34:12 +0000 (11:34 -0200)]
ARM: rockchip: rv1108: Sync clock with vendor tree
Make adjustments to the rv1108 clock driver in order to align it
with the internal Rockchip version.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Philipp Tomsich [Fri, 30 Nov 2018 17:58:58 +0000 (18:58 +0100)]
rockchip: rk3399-puma: reduce sd card max-frequency to 40MHz
Some SanDisk Ultra cards trigger intermittent errors on detection
resulting in an -EOPNOTSUPP, when running at 50MHz.
Waveform analysis suggest that the level shifters that are used on the
RK3399-Q7 module (for voltage translation between the on-module
voltages and the 3.3V required on the card-edge) don't handle clock
rates at or above 48MHz properly. This change reduces the maximum
frequency on the external SD-interface to 40MHz (for a safety margin
of 20%).
Reported-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
Kever Yang [Thu, 29 Nov 2018 01:59:41 +0000 (09:59 +0800)]
rockchip: rock: remove TPL_TINY_MEMSET
The RK3188 rock board does not need TPL: remove TPL_TINY_MEMSET from
config.
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
[Fixed up commit message:]
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Philipp Tomsich [Mon, 19 Nov 2018 12:03:51 +0000 (13:03 +0100)]
rockchip: rk3399: spl: always report errors triggering a hard stop
The RK3399 SPL has two cases that may end in a hard-stop: if either
the pinctrl can not be initialised or if the DRAM fails to initialise.
Both have previously not triggered an error message unless DEBUG was
defined (i.e. both used debug() to print the error).
This converts both error messages to be printed using pr_err() to
ensure that some output points to the cause of the hard-stop.
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Richard Röjfors [Wed, 14 Nov 2018 13:13:53 +0000 (14:13 +0100)]
rockchip: video: mipi: Fix phy frequency setting
There was an incorrect check when looping and finding the first
fast enough frequency in the freq_rang table. The code did
actually return the first that was either exactly correct or
too slow.
Signed-off-by: Richard Röjfors <richard@puffinpack.se>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Richard Röjfors [Wed, 7 Nov 2018 10:34:44 +0000 (11:34 +0100)]
rockchip: video: mipi: Do not write to the version register
There was a copy and paste error where the data
enable setting was written to the version register.
Signed-off-by: Richard Röjfors <richard@puffinpack.se>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Heiko Stuebner [Mon, 8 Oct 2018 11:01:57 +0000 (13:01 +0200)]
rockchip: rk3188: fix early uart setup
Commit
7a6d7d3e1279 ("rockchip: pinctrl: rk3188: Move the iomux definitions
into pinctrl-driver") moved the iomux settings out of the grf header
to prevent conflicts with the iomux definitions of other rockchip socs.
This also breaks the early uart setup, as the iomux for uart2 are needed.
To fix that just put the tiny amount of needed iomux definitions next to
the early uart code.
Fixes: 7a6d7d3e1279 ("rockchip: pinctrl: rk3188: Move the iomux definitions into pinctrl-driver")
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Heiko Stuebner [Mon, 8 Oct 2018 11:01:56 +0000 (13:01 +0200)]
rockchip: rk3188: add support for usb-uart functionality
Rockchip socs can route the debug uart pins through the d+ and d- pins
of one specific usbphy per soc. Add a config option and implement the
setting on the rk3188.
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
[Fixed up to mark grf as maybe unused:]
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Stefan Roese [Fri, 30 Nov 2018 06:46:30 +0000 (07:46 +0100)]
mips: mt76xx: gardena-smart-gateway: Add factory data variable handling
Some factory data is stored in the SPI NOR and needs to get extracted
from there into U-Boot environment variables.
This patch also includes a board-specific command "fd_write" to
provide some dummy / default values for this factory-data in the SPI
NOR flash. This should only be necessary for testing purposes though.
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Stefan Roese [Wed, 28 Nov 2018 07:40:49 +0000 (08:40 +0100)]
mips: mt76xx: gardena-smart-gateway: Misc updates to defconfig
The following changes are made:
- Add default bootcmd which can be used for initial start-up
- Setup necessary MTD parts for Linux compatibility
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Stefan Roese [Wed, 28 Nov 2018 07:40:48 +0000 (08:40 +0100)]
mips: mt7628: Change compatible property of the ethernet DT node
As the driver has been changed to be more specific, the DT compatible
property also needs to be adapted.
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Tom Rini [Fri, 30 Nov 2018 16:20:03 +0000 (11:20 -0500)]
Merge git://git.denx.de/u-boot-marvell
- Some Kirkwood boards converted to DM_SPI by Chris
- New Armada-385 SoC revision printed by Chris
- Ethernet enable on mcbin by Baruch
- Support 2 DRAM banks on Armada-8k boards by Baruch
Chris Packham [Tue, 27 Nov 2018 21:32:00 +0000 (10:32 +1300)]
ARM: mvebu: add revision id for Armada-385 B0
Marvell have release a B0 revision of the Armada-385 SoC. This fixes a
hardware errata enabling RGMII to work when the Ethernet voltage is
configured to 3.3V.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
Baruch Siach [Thu, 22 Nov 2018 11:42:12 +0000 (13:42 +0200)]
arm: mvebu: mcbin: configs: enable network driver
Enable the mvpp2 Ethernet driver and the Marvell Ethernet PHY driver.
This makes the Macchiatobin 1Gb Ethernet interface usable.
Cc: Konstantin Porotchkin <kostap@marvell.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
Baruch Siach [Wed, 21 Nov 2018 11:12:16 +0000 (13:12 +0200)]
arm: mvebu: mcbin: dts: enable 1G network interface
Describe the 1Gb network interface with on-board
88E1512 PHY.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
Chris Packham [Wed, 21 Nov 2018 09:22:23 +0000 (22:22 +1300)]
arm: kirkwood: configs: dreamplug: Convert to DM_SPI
Enable CONFIG_DM_SPI=y and CONFIG_DM_SPI_FLASH=y in the defconfig.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
Chris Packham [Wed, 21 Nov 2018 09:22:22 +0000 (22:22 +1300)]
arm: kirkwood: configs: ds109: Convert to DM_SPI
Enable CONFIG_DM_SPI=y and CONFIG_DM_SPI_FLASH=y in the defconfig.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
Chris Packham [Wed, 21 Nov 2018 09:22:21 +0000 (22:22 +1300)]
arm: kirkwood: configs: Convert Allied Telesis boards to DM_SPI
Enable CONFIG_DM_SPI=y and CONFIG_DM_SPI_FLASH=y in the defconfig.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
Baruch Siach [Wed, 21 Nov 2018 07:59:32 +0000 (09:59 +0200)]
arm: mvebu: configs: armada8k: use 2 DRAM banks
Commit
2b4d964718c0 ("arm64: mvebu: a8k: autodetect RAM size") added an
ATF query to get the detected RAM size on Armada 8K platforms. To be
usable we must have 2 DRAM banks. Set Armada 8K configurations to 2
banks.
Cc: Konstantin Porotchkin <kostap@marvell.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
Tom Rini [Thu, 29 Nov 2018 21:36:53 +0000 (16:36 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-socfpga
Tom Rini [Thu, 29 Nov 2018 14:33:33 +0000 (09:33 -0500)]
Merge tag 'u-boot-amlogic-
20181126' of git://git.denx.de/u-boot-amlogic
Cleanup and update towards support for Amlogic Meson AXG SoCs :
- mmc: meson-gx: Add AXG compatible
- net: designware: add meson meson compatibles
- Amlogic Meson cleanup for AXG SoC support
Keerthy [Mon, 19 Nov 2018 06:14:47 +0000 (11:44 +0530)]
core: ofnode: Fix ofnode_get_addr_index function
Currently the else part of ofnode_get_addr_index function
does not fetch addresses based on the index but rather just
returns the base address. Fix that.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Simon Glass [Sun, 18 Nov 2018 21:22:27 +0000 (14:22 -0700)]
tpm: Convert to use a device parameter
At present many TPM calls assume there is only one TPM in the system and
look up this TPM themselves. This is inconsistent with driver model, which
expects all driver methods to have a device parameter. Update the code to
correct this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 18 Nov 2018 21:22:26 +0000 (14:22 -0700)]
tpm: Export the open/close functions
At present these functions are not accessible outside the TPM library, but
in some cases we need to call them. Export them in the header file and add
a define for the SHA1 digest size.
Also adjust tpm_open() to call tpm_close() first so that the TPM is in a
known state before opening (e.g. by a previous phase of U-Boot).
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 18 Nov 2018 21:22:25 +0000 (14:22 -0700)]
tpm: Add a constant for the minimum supported digest size
When SHA1 is used we need 20 bytes for the digest size. Add a constant so
that clients can make use of this, e.g. to allocate local buffers.
Signed-off-by: Simon Glass <sjg@chromium.org>
Baruch Siach [Sun, 18 Nov 2018 12:39:20 +0000 (14:39 +0200)]
ofnode: fix comment typo
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Heiko Schocher [Thu, 15 Nov 2018 05:06:06 +0000 (06:06 +0100)]
cmd, fdt: add subcommand "get" to fdt header
store fdt header member with name <member> in U-Boot
Environment variable with name <var>.
for example to get the total length of the fdt and store
it in filesize, call:
fdt header get filesize totalsize
For membernames look into fdt header definition at
scripts/dtc/libfdt/libfdt.h
Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Simon Glass [Tue, 13 Nov 2018 22:55:20 +0000 (15:55 -0700)]
sandbox: Use memmove() to move overlapping regions
The use of strcpy() to remove characters at the start of a string is safe
in U-Boot, since we know the implementation. But in os.c we are using the
C library's strcpy() function, where this behaviour is not permitted.
Update the code to use memmove() instead.
Reported-by: Coverity (CID: 173279)
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Alexander Graf <agraf@suse.de>
Simon Glass [Fri, 16 Nov 2018 02:56:15 +0000 (19:56 -0700)]
sandbox: Enable sound
Now that the buffer-overflow bug is fixed, we can enable sound on sandbox.
Drop the code which exits early.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 16 Nov 2018 02:56:14 +0000 (19:56 -0700)]
sound: sandbox: Use the correct frequency
At present we request a particular frequency but we may not get the exact
same frequency in response. So use the actual frequency for generation of
the square wave. This ensures that the pitch remains accurate on all host
machines.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 16 Nov 2018 02:56:13 +0000 (19:56 -0700)]
sound: Add sample rate as a parameter for square wave
At present this value is hard-coded in the function that generates a
square wave. Since sample rates vary between different hardware, it makes
more sense to have this as a parameter.
Update the function and its users.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 16 Nov 2018 02:56:12 +0000 (19:56 -0700)]
sound: Correct data output in sound_create_square_wave()
This function currently outputs twice as much data as it should and
overwrites its buffer as a result. Fix it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 18 Nov 2018 15:14:35 +0000 (08:14 -0700)]
rtc: Allow child drivers
Some RTC chips have child drivers, e.g. to provide access to their
non-volatile RAM. Scan for these when binding.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 18 Nov 2018 15:14:34 +0000 (08:14 -0700)]
dm: sandbox: i2c: Use new emulator parent uclass
Update the device tree, sandbox i2c driver and tests to use the new
emulation parent to hold emulators.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 18 Nov 2018 15:14:33 +0000 (08:14 -0700)]
dm: sandbox: i2c: Add a new 'emulation parent' uclass
Sandbox i2c works using emulation drivers which are currently children of
the i2c device:
rtc_0: rtc@43 {
reg = <0x43>;
compatible = "sandbox-rtc";
emul {
compatible = "sandbox,i2c-rtc";
};
};
In this case the emulation device is attached to i2c bus on address 0x43
and provides the Real-Time-Clock (RTC) functionality.
However this is not ideal, since every device on an I2C bus has a child
device. This is only really the case for sandbox, but we want to avoid
special-case code for sandbox.
A better approach seems to be to add a separate node on the bus, an
'emulation parent'. This can be given a bogus address (such as 0xff) and
hides all the emulators away. Then we can use a phandle to point from the
device to the correct emualtor, and only on sandbox. The code to find an
emulator does not interfere with normal i2c operation.
Add a new UCLASS_I2C_EMUL_PARENT uclass which allows finding an emulator
given a bus, and finding a bus given an emulator. This will be used in a
follow-on patch.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 18 Nov 2018 15:14:32 +0000 (08:14 -0700)]
dm: core: Put UCLASS_SIMPLE_BUS in order
This is currently at the top in the space for internal use. But this
uclass is used outside driver model and test code. Move it into the
correct alpha order.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 18 Nov 2018 15:14:31 +0000 (08:14 -0700)]
dm: core: Add a few more specific child-finding functions
Add two functions which can find a child device by uclass or by name.
The first is useful with Multi-Function-Devices (MFDs) to find one of a
particular type. The second is useful when only the name is known.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 18 Nov 2018 15:14:30 +0000 (08:14 -0700)]
dm: core: Export uclass_find_device_by_phandle()
This function may be useful to code outside of the code driver-model
implementation. Export it and add a test.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 18 Nov 2018 15:14:29 +0000 (08:14 -0700)]
test: Add a 'make qcheck' target for quicker testing
At present tests are quite slow to run, over a minute on my machine. This
presents a considerable barrier to bisecting for failures.
The slowest tests are the filesystem ones and the buildman --fetch-arch
test. Add a new 'qcheck' target that skips these tests. This reduces test
time down to about 40 second, still too long, but bearable.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 18 Nov 2018 15:14:28 +0000 (08:14 -0700)]
power: pmic: Correct debug/error output
There is a newline missing from quite a few printf() strings in these pmic
files. Fix them.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Simon Glass [Sun, 18 Nov 2018 15:14:26 +0000 (08:14 -0700)]
malloc_simple: Add logging of allocations
It is sometimes useful to see what memory is being allocated early during
boot. Add logging to support this, using a new LOGC_ALLOC category.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Goldschmidt [Wed, 10 Oct 2018 12:55:23 +0000 (14:55 +0200)]
arm: socfpga: fix SPL booting from fpga OnChip RAM
This patch prevents disabling the FPGA bridges when
SPL or U-Boot is executed from FPGA onchip RAM.
Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Simon Goldschmidt [Mon, 6 Aug 2018 13:05:09 +0000 (15:05 +0200)]
arm: socfpga: make socfpga_socrates_defconfig boot from QSPI
This fixes the board's dts to supply SPL with QSPI info.
The EBV Socrates board has DIP switches to boot from SD card or
QSPI, so let's fix its defconfig to work for both cases.
Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Simon Goldschmidt [Fri, 2 Nov 2018 10:54:52 +0000 (11:54 +0100)]
dts: arm: socfpga: merge gen5 devicetrees from linux
Add -u-boot.dtsi files to keep the current U-Boot behaviour:
- add u-boot,dm-pre-reloc where required
- disable watchdog
- set uart clock frequency
- add gpio bank-name properties
where appropriate:
- make qspi work (add alias for spi0, fix compatible for flash)
- enable usb (status okay, add alias for udc0)
Adapt board dts files that are not in Linux to keep their old
behaviour.
Change licenses to SPDX.
(Patman warnings/errors are in 1:1 copied files from Linux)
Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Simon Goldschmidt [Fri, 2 Nov 2018 10:54:51 +0000 (11:54 +0100)]
spi: cadence_qspi: use "cdns,qspi-nor" as compatible
Linux uses "cdns,qspi-nor" as compatible string for the cadence
qspi driver, so change driver, docs and all device trees.
Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Simon Goldschmidt [Fri, 2 Nov 2018 10:54:50 +0000 (11:54 +0100)]
gpio: dwapb_gpio: fix binding without bank-name property
As a preparation for merging the socfpga gen5 devicetree files
from Linux, this patch makes the dwapb gpio driver work correctly
without the 'bank-name' property on the gpio-controller nodes.
This property is not present in the Linux drivers and thus is not
present in the Linux devicetrees. It is only used to access pins
via bank name.
This fallback is necessary since without it, the driver will
return an error code which will lead to an error in U-Boot
startup.
The bank names will still be added to the default board device
trees in follow-up patch, but other boards using this driver and
not including the bank name should also work with the socfpga.dtsi
without adding the bank-name property.
Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Simon Goldschmidt [Wed, 14 Nov 2018 20:05:12 +0000 (21:05 +0100)]
arm: socfpga: make config structs const
There are two config structs left in wrap_sdram_config.c that can
be made const.
Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Tom Rini [Thu, 29 Nov 2018 04:04:58 +0000 (23:04 -0500)]
Merge branch '2018-11-28-master-imports'
- Add MediaTek support
Ryder Lee [Thu, 15 Nov 2018 02:08:06 +0000 (10:08 +0800)]
MAINTAINERS: add an entry for MediaTek
This patch adds an entry for MediaTek.
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Ryder Lee [Thu, 15 Nov 2018 02:08:05 +0000 (10:08 +0800)]
doc: README.mediatek: Add a simple README for MediaTek
Add a few notes on how to try out the MediaTek support so far.
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Weijie Gao [Thu, 15 Nov 2018 02:08:04 +0000 (10:08 +0800)]
mmc: mtk-sd: add SD/MMC host controller driver for MT7623 SoC
This patch adds MT7623 host controller driver for accessing SD/MMC.
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Tested-by: Matthias Brugger <matthias.bgg@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Ryder Lee [Thu, 15 Nov 2018 02:08:03 +0000 (10:08 +0800)]
ram: MediaTek: add DDR3 driver for MT7629 SoC
This patch adds a DDR3 driver for MT7629 SoC.
Signed-off-by: Wu Zou <wu.zou@mediatek.com>
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Ryder Lee [Thu, 15 Nov 2018 02:08:02 +0000 (10:08 +0800)]
serial: MediaTek: add high-speed uart driver for MediaTek SoCs
Many SoCs from MediaTek have a high-speed uart. This UART is compatible
with the ns16550 in legacy mode. It has extra registers for high-speed
mode which can reach a maximum baudrate at 921600.
However this UART will no longer be compatible if it's in high-speed mode.
Some BootROM of MediaTek's SoCs will change the UART into high-speed mode
and the U-Boot must use this driver to initialize the UART.
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-by: Ryder Lee <ryder.lee@mediatek.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Ryder Lee [Thu, 15 Nov 2018 02:08:01 +0000 (10:08 +0800)]
power domain: MediaTek: add power domain driver for MT7623 SoC
This adds power domain (scpsys) support for MT7623 SoC.
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Ryder Lee [Thu, 15 Nov 2018 02:08:00 +0000 (10:08 +0800)]
power domain: MediaTek: add power domain driver for MT7629 SoC
This adds a power domain driver for the Mediatek SCPSYS unit.
The System Control Processor System (SCPSYS) has several power
management related tasks in the system. The tasks include thermal
measurement, dynamic voltage frequency scaling (DVFS), interrupt
filter and lowlevel sleep control. The System Power Manager (SPM)
inside the SCPSYS is for the MTCMOS power domain control.
For now this driver only adds power domain support.
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Ryder Lee [Thu, 15 Nov 2018 02:07:59 +0000 (10:07 +0800)]
pinctrl: MediaTek: add pinctrl driver for MT7623 SoC
This patch adds pinctrl support for MT7623 SoC. And most of the
structures are used to hold the hardware configuration for each
pin.
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Tested-by: Matthias Brugger <matthias.bgg@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Ryder Lee [Thu, 15 Nov 2018 02:07:58 +0000 (10:07 +0800)]
pinctrl: MediaTek: add pinctrl driver for MT7629 SoC
This patch adds pinctrl support for MT7629 SoC. The IO core found on
the SoC has the registers for pinctrl, pinconf and gpio mixed up in
the same register range. Hence the driver also implements the gpio
functionality through UCLASS_GPIO.
This also creates a common file as there might be other chips that use
the same binding and driver, then being a little more abstract could
help in the long run.
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Ryder Lee [Thu, 15 Nov 2018 02:07:57 +0000 (10:07 +0800)]
watchdog: MediaTek: add watchdog driver for MediaTek SoCs
This patch adds a common driver for the Mediatek SoC integrated
watchdog.
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Tested-by: Matthias Brugger <matthias.bgg@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Ryder Lee [Thu, 15 Nov 2018 02:07:56 +0000 (10:07 +0800)]
timer: MediaTek: add timer driver for MediaTek SoCs
This patch adds clock source and clock event for the timer found
on the Mediatek SoCs.
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Tested-by: Matthias Brugger <matthias.bgg@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Ryder Lee [Thu, 15 Nov 2018 02:07:55 +0000 (10:07 +0800)]
clk: MediaTek: add clock driver for MT7623 SoC.
This patch adds a driver for MT7623 clock blocks.
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Tested-by: Matthias Brugger <matthias.bgg@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Ryder Lee [Thu, 15 Nov 2018 02:07:54 +0000 (10:07 +0800)]
clk: MediaTek: add clock driver for MT7629 SoC.
This patch adds clock modules for MediaTek SoCs:
- Shared part: a common driver which contains the general operations
for plls, muxes, dividers and gates so that we can reuse it in future.
- Specific SoC part: the group of structures used to hold the hardware
configuration for each SoC.
We take MT7629 as an example to demonstrate how to implement driver if
any other MediaTek chips would like to use it.
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Weijie Gao [Thu, 15 Nov 2018 02:07:53 +0000 (10:07 +0800)]
arm: MediaTek: add basic support for MT7623 boards
This adds a general board file based on MT7623 SoCs from MediaTek.
As this u-boot is loaded by MTK proprietary preloader, there is no
low level initializtion codes.
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Tested-by: Matthias Brugger <matthias.bgg@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Ryder Lee [Thu, 15 Nov 2018 02:07:52 +0000 (10:07 +0800)]
arm: MediaTek: add basic support for MT7629 boards
This adds a general board file based on MT7629 SoCs from MediaTek.
Apart from the generic parts (cpu) we add some low level init codes
and initialize the early clocks.
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Ryder Lee [Thu, 15 Nov 2018 02:07:51 +0000 (10:07 +0800)]
arm: dts: MediaTek: add device tree for MT7623
This adds device tree for MT7623 development board - Bananapi R2
Detailed hardware information for BPI-R2 which could be found on
http://wiki.banana-pi.org/Banana_Pi_BPI-R2.
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Tested-by: Matthias Brugger <matthias.bgg@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Ryder Lee [Thu, 15 Nov 2018 02:07:50 +0000 (10:07 +0800)]
arm: dts: MediaTek: add device tree for MT7629
This patch adds MT7629 device tree and the includes it needs.
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Ryder Lee [Thu, 15 Nov 2018 02:07:49 +0000 (10:07 +0800)]
tools: MediaTek: add MTK boot header generation to mkimage
This patch adds support for MTK boot image generation.
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini [Tue, 27 Nov 2018 19:01:45 +0000 (14:01 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-usb
- Introduce CONFIG_SPL_DM_USB
Tom Rini [Tue, 27 Nov 2018 03:52:19 +0000 (22:52 -0500)]
Merge branch '2018-11-26-master-imports'
- chiliboard updates
- misc TI platform updates
Marcin Niestroj [Wed, 21 Nov 2018 19:32:03 +0000 (20:32 +0100)]
ARM: chiliboard: remove dead !CONFIG_DM_SERIAL code
DM_SERIAL is selected by TARGET_CHILIBOARD, so there is no reason to
keep code that will not be built. Remove it.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Marcin Niestroj [Wed, 21 Nov 2018 19:32:02 +0000 (20:32 +0100)]
ARM: chiliboard: move towards driver model and device-tree boot
This patch mostly enables DM drivers in board defconfig and all their
dependencies. Additionally we remove ethernet platform data, as all
details are in device-tree now.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Marcin Niestroj [Wed, 21 Nov 2018 19:32:01 +0000 (20:32 +0100)]
ARM: dts: am335x-chiliboard: add /chosen/stdout-path
Add that node path in u-boot overlay dtsi file for now to keep
am335x-chiliboard.dts in sync with Linux.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Marcin Niestroj [Wed, 21 Nov 2018 19:32:00 +0000 (20:32 +0100)]
ARM: dts: am335x-chili*: add chiliSOM and chiliboard DTS files
Import chiliSOM and chiliboard dts files from Linux v4.19. They will
be used after transition to driver model and device-tree based boot.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Chris Packham [Wed, 21 Nov 2018 07:24:51 +0000 (20:24 +1300)]
configs: Remove CONFIG_MARVELL
This option is defined by a few boards but doesn't guard any code.
Remove it from the boards and config_whitelist.txt.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Otavio Salvador [Tue, 20 Nov 2018 18:47:12 +0000 (16:47 -0200)]
ARM: vexpress_*_defconfig: Enable CMD_UBI support
This allow for convenient use of QEMU machine to test loading of UBI
filesystem. There are a couple of changes made together of this which
are required:
1) The malloc must be at least 512 KiB to allow the use of UBI
filesystem. We are going to enable it in a next patch.
2) MTD_DEVICE must be enabled, otherwise we get missing symbols
during the build
Following configs were change:
- vexpress_aemv8a_dram_defconfig
- vexpress_aemv8a_juno_defconfig
- vexpress_aemv8a_semi_defconfig
- vexpress_ca15_tc2_defconfig
- vexpress_ca5x2_defconfig
- vexpress_ca9x4_defconfig
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Adam Ford [Tue, 20 Nov 2018 14:43:13 +0000 (08:43 -0600)]
board: da8xxevm: Fix Environmental CRC error
When the spi_flash_probe_bus_cs() was previously called, it was
called using 0's for two values where CONFIG_ENV_SPI_MAX_HZ and
CONFIG_ENV_SPI_MODE are now used. When changed this
caused the environment to fail the CRC check and the default
was used. This patch defines both of these values back 0.
Fixes: 25a17652c9c2 ("fix: env: Fix the SPI flash device setup
for DM mode")
Signed-off-by: Adam Ford <aford173@gmail.com>
Andrew F. Davis [Mon, 19 Nov 2018 20:47:53 +0000 (14:47 -0600)]
ARM: armv7: Add early stack for erratum workarounds
Some erratum workarounds call into C code before the stack
is setup, this can lead to values pushed onto the stack
being lost, firewall exceptions, and other undefined behavior.
Setup a temporary stack to allow these functions to work
correctly.
Signed-off-by: Andrew F. Davis <afd@ti.com>
Acked-by: Andreas Dannenberg <dannenberg@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
Jonathan Gray [Sun, 18 Nov 2018 02:03:39 +0000 (13:03 +1100)]
tools/file2include: don't use malloc.h for malloc
stdlib.h is the header for malloc since at least c89/c90.
Previously this would fail to build on OpenBSD and fallback to the wrong
header:
In file included from u-boot/tools/file2include.c:21:
u-boot/include/malloc.h:875:5: error: function-like macro
'CONFIG_IS_ENABLED' is not defined
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Sam Protsenko [Thu, 15 Nov 2018 20:26:17 +0000 (22:26 +0200)]
arm: ti: boot: Fix U-Boot environment partition address
Recent removal of obsolete partition led to shifting of starting address
of "reserved" partition (which reflects U-Boot environment). Fix its
start address to keep it in sync with ENV_OFFSET and DFU environment.
This patch also provides fixed start address for "reserved" partition,
so that we can track when it's shifted next time.
While at it, move it before "misc" partition to keep all Android
partitions together.
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Acked-By: Praneeth Bajjuri <praneeth@ti.com>
Lokesh Vutla [Thu, 15 Nov 2018 05:34:50 +0000 (11:04 +0530)]
armv7r: K3: Allow SPL to run only on core 0
Based on the MCU R5 efuse settings, R5F cores in MCU domain
either work in split mode or in lock step mode.
If efuse settings are in lockstep mode: ROM release R5 cores
and SPL continues to run on the R5 core is lockstep mode.
If efuse settings are in split mode: ROM releases both the R5
cores simultaneously and allow SPL to run on both the cores.
In this case it is bootloader's responsibility to detect core
1 and park it. Else both the core will be running bootloader
independently which might result in an unexpected behaviour.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Frank Wunderlich [Fri, 5 Oct 2018 09:41:59 +0000 (11:41 +0200)]
add default-option to bootmenu
with this patch the selected Entry in bootmenu can be set by
environment-var bootmenu_default=<number>
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
Tom Rini [Mon, 26 Nov 2018 20:52:51 +0000 (15:52 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-video
Tom Rini [Mon, 26 Nov 2018 20:52:47 +0000 (15:52 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-sunxi
Tom Rini [Mon, 26 Nov 2018 18:45:29 +0000 (13:45 -0500)]
Merge git://git.denx.de/u-boot-riscv
Sven Schwermer [Wed, 21 Nov 2018 07:43:57 +0000 (08:43 +0100)]
usb: storage: s/CONFIG_BLK/CONFIG_IS_ENABLED(BLK)/
This fixes link issues when building the SPL without USB driver model
but with USB storage support. CONFIG_BLK can be enabled and disabled
independently for SPL and non-SPL builds. We leverage that existing
functionality here.
Signed-off-by: Sven Schwermer <sven@svenschwermer.de>
Sven Schwermer [Wed, 21 Nov 2018 07:43:56 +0000 (08:43 +0100)]
usb: s/CONFIG_DM_USB/CONFIG_IS_ENABLED(DM_USB)/
This allows to disable the USB driver model in SPL because it checks
the CONFIG_SPL_DM_USB variable for SPL builds. Nothing changes for
regular non-SPL builds.
Signed-off-by: Sven Schwermer <sven@svenschwermer.de>
Sven Schwermer [Wed, 21 Nov 2018 07:43:55 +0000 (08:43 +0100)]
usb: Remove CMD_USB dependency for common code
Common USB code is built whenever USB is enabled (in non-SPL builds).
The USB uclass is built whenever (SPL_)DM_USB is enabled. Both need to
be independent from CMD_USB.
Signed-off-by: Sven Schwermer <sven@svenschwermer.de>