summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-11-29sound: Add sample rate as a parameter for square waveSimon Glass
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>
2018-11-29sound: Correct data output in sound_create_square_wave()Simon Glass
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>
2018-11-29rtc: Allow child driversSimon Glass
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>
2018-11-29dm: sandbox: i2c: Use new emulator parent uclassSimon Glass
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>
2018-11-29dm: sandbox: i2c: Add a new 'emulation parent' uclassSimon Glass
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>
2018-11-29dm: core: Put UCLASS_SIMPLE_BUS in orderSimon Glass
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>
2018-11-29dm: core: Add a few more specific child-finding functionsSimon Glass
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>
2018-11-29dm: core: Export uclass_find_device_by_phandle()Simon Glass
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>
2018-11-29test: Add a 'make qcheck' target for quicker testingSimon Glass
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>
2018-11-29power: pmic: Correct debug/error outputSimon Glass
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>
2018-11-29malloc_simple: Add logging of allocationsSimon Glass
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>
2018-11-28Merge branch '2018-11-28-master-imports'Tom Rini
- Add MediaTek support
2018-11-28MAINTAINERS: add an entry for MediaTekRyder Lee
This patch adds an entry for MediaTek. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-11-28doc: README.mediatek: Add a simple README for MediaTekRyder Lee
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>
2018-11-28mmc: mtk-sd: add SD/MMC host controller driver for MT7623 SoCWeijie Gao
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>
2018-11-28ram: MediaTek: add DDR3 driver for MT7629 SoCRyder Lee
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>
2018-11-28serial: MediaTek: add high-speed uart driver for MediaTek SoCsRyder Lee
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>
2018-11-28power domain: MediaTek: add power domain driver for MT7623 SoCRyder Lee
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>
2018-11-28power domain: MediaTek: add power domain driver for MT7629 SoCRyder Lee
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>
2018-11-28pinctrl: MediaTek: add pinctrl driver for MT7623 SoCRyder Lee
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>
2018-11-28pinctrl: MediaTek: add pinctrl driver for MT7629 SoCRyder Lee
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>
2018-11-28watchdog: MediaTek: add watchdog driver for MediaTek SoCsRyder Lee
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>
2018-11-28timer: MediaTek: add timer driver for MediaTek SoCsRyder Lee
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>
2018-11-28clk: MediaTek: add clock driver for MT7623 SoC.Ryder Lee
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>
2018-11-28clk: MediaTek: add clock driver for MT7629 SoC.Ryder Lee
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>
2018-11-28arm: MediaTek: add basic support for MT7623 boardsWeijie Gao
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>
2018-11-28arm: MediaTek: add basic support for MT7629 boardsRyder Lee
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>
2018-11-28arm: dts: MediaTek: add device tree for MT7623Ryder Lee
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>
2018-11-28arm: dts: MediaTek: add device tree for MT7629Ryder Lee
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>
2018-11-28tools: MediaTek: add MTK boot header generation to mkimageRyder Lee
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>
2018-11-27Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini
- Introduce CONFIG_SPL_DM_USB
2018-11-26Merge branch '2018-11-26-master-imports'Tom Rini
- chiliboard updates - misc TI platform updates
2018-11-26ARM: chiliboard: remove dead !CONFIG_DM_SERIAL codeMarcin Niestroj
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>
2018-11-26ARM: chiliboard: move towards driver model and device-tree bootMarcin Niestroj
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>
2018-11-26ARM: dts: am335x-chiliboard: add /chosen/stdout-pathMarcin Niestroj
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>
2018-11-26ARM: dts: am335x-chili*: add chiliSOM and chiliboard DTS filesMarcin Niestroj
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>
2018-11-26configs: Remove CONFIG_MARVELLChris Packham
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>
2018-11-26ARM: vexpress_*_defconfig: Enable CMD_UBI supportOtavio Salvador
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>
2018-11-26board: da8xxevm: Fix Environmental CRC errorAdam Ford
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>
2018-11-26ARM: armv7: Add early stack for erratum workaroundsAndrew F. Davis
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>
2018-11-26tools/file2include: don't use malloc.h for mallocJonathan Gray
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>
2018-11-26arm: ti: boot: Fix U-Boot environment partition addressSam Protsenko
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>
2018-11-26armv7r: K3: Allow SPL to run only on core 0Lokesh Vutla
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>
2018-11-26add default-option to bootmenuFrank Wunderlich
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>
2018-11-26Merge branch 'master' of git://git.denx.de/u-boot-videoTom Rini
2018-11-26Merge branch 'master' of git://git.denx.de/u-boot-sunxiTom Rini
2018-11-26Merge git://git.denx.de/u-boot-riscvTom Rini
2018-11-26usb: storage: s/CONFIG_BLK/CONFIG_IS_ENABLED(BLK)/Sven Schwermer
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>
2018-11-26usb: s/CONFIG_DM_USB/CONFIG_IS_ENABLED(DM_USB)/Sven Schwermer
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>
2018-11-26usb: Remove CMD_USB dependency for common codeSven Schwermer
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>