aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-11-30arm: kirkwood: configs: ds109: Convert to DM_SPIChris Packham2-1/+2
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>
2018-11-30arm: kirkwood: configs: Convert Allied Telesis boards to DM_SPIChris Packham2-0/+4
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>
2018-11-30arm: mvebu: configs: armada8k: use 2 DRAM banksBaruch Siach3-3/+3
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>
2018-11-29Merge branch 'master' of git://git.denx.de/u-boot-socfpgaTom Rini31-341/+1264
2018-11-29Merge tag 'u-boot-amlogic-20181126' of git://git.denx.de/u-boot-amlogicTom Rini86-754/+5172
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
2018-11-29core: ofnode: Fix ofnode_get_addr_index functionKeerthy1-7/+10
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>
2018-11-29tpm: Convert to use a device parameterSimon Glass17-431/+731
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>
2018-11-29tpm: Export the open/close functionsSimon Glass3-38/+45
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>
2018-11-29tpm: Add a constant for the minimum supported digest sizeSimon Glass1-0/+2
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>
2018-11-29ofnode: fix comment typoBaruch Siach1-1/+1
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
2018-11-29cmd, fdt: add subcommand "get" to fdt headerHeiko Schocher1-1/+39
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>
2018-11-29sandbox: Use memmove() to move overlapping regionsSimon Glass1-2/+3
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>
2018-11-29sandbox: Enable soundSimon Glass1-19/+0
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>
2018-11-29sound: sandbox: Use the correct frequencySimon Glass1-2/+9
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>
2018-11-29sound: Add sample rate as a parameter for square waveSimon Glass4-6/+9
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 Glass1-2/+0
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 Glass1-0/+1
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 Glass8-85/+93
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 Glass3-0/+99
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 Glass1-1/+1
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 Glass3-0/+86
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 Glass3-4/+39
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 Glass7-4/+22
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 Glass18-55/+56
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 Glass3-22/+39
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-29arm: socfpga: fix SPL booting from fpga OnChip RAMSimon Goldschmidt4-4/+25
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>
2018-11-29arm: socfpga: make socfpga_socrates_defconfig boot from QSPISimon Goldschmidt1-0/+2
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>
2018-11-29dts: arm: socfpga: merge gen5 devicetrees from linuxSimon Goldschmidt20-329/+1222
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>
2018-11-29spi: cadence_qspi: use "cdns,qspi-nor" as compatibleSimon Goldschmidt6-6/+6
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>
2018-11-29gpio: dwapb_gpio: fix binding without bank-name propertySimon Goldschmidt1-0/+7
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>
2018-11-29arm: socfpga: make config structs constSimon Goldschmidt1-2/+2
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>
2018-11-28Merge branch '2018-11-28-master-imports'Tom Rini79-0/+11388
- Add MediaTek support
2018-11-28MAINTAINERS: add an entry for MediaTekRyder Lee1-0/+20
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 Lee1-0/+221
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 Gao3-0/+1406
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 Lee3-0/+774
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 Lee3-0/+289
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 Lee1-0/+80
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 Lee3-0/+334
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 Lee4-0/+1291
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 Lee8-0/+1172
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 Lee3-0/+144
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 Lee3-0/+93
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 Lee2-0/+871
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 Lee5-0/+1403
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 Gao12-0/+342
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 Lee17-0/+509
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 Lee5-0/+895
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 Lee6-0/+560
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 Lee7-0/+984
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>