summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-06-08sunxi: add a defconfig for SoPine w/ official baseboardIcenowy Zheng
The SoPine is a SoM by Pine64, with an Allwinner A64 SoC, a LPDDR3 DRAM chip, an AXP803 PMIC, a SPI NOR Flash and a MicroSD slot. The card detect pin of the MicroSD slot is broken, however, it doesn't matter as the design of SoPine didn't allow hot-swapping the MicroSD card (The MicroSD slot is at the back of the SoM, and when the SoM is installed on the baseboard, it's nearly impossible to remove the MicroSD). The official baseboard of it is a board with nearly the same connectors with the original Pine64+, with the MicroUSB power jack replaced, and at the position of MicroSD slot a eMMC module slot is added. Add support for SoPine with the official baseboard by adding its defconfig file. It still uses the device tree of Pine64, however, it will change after a proper device tree of SoPine with baseboard is accepted by Linux mainline. Signed-off-by: Icenowy Zheng <icenowy@aosc.io> [Update board/sunxi/MAINTAINERS] Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com> Tested-by: Jagan Teki <jagan@amarulasolutions.com>
2017-06-08sunxi: add LPDDR3 timing from stock boot0Icenowy Zheng
As we added LPDDR3 support in the former patch, we need a set of timing info to really enable it. Add the timing info used by stock boot0. Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz> Acked-by: Jagan Teki <jagan@amarulasolutions.com> Tested-by: Jagan Teki <jagan@amarulasolutions.com>
2017-06-08sunxi: add LPDDR3 DRAM type support for DesignWare-like DRAM controllerIcenowy Zheng
Some A64 boards (SoPine and Pinebook production batch) use LPDDR3 DRAM chips. Add support for LPDDR3 DRAM in the DesignWare-like DRAM controller code. Real LPDDR3 chips' support is not added yet in this commit. Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com> Tested-by: Jagan Teki <jagan@amarulasolutions.com>
2017-06-08sunxi: enable DRAM initialization and SPL for V3s SoCIcenowy Zheng
As we have already support for the DesignWare DRAM controller and the integrated DDR2 chip of V3s, let's enable the SPL support for V3s. This patch also contains the default DRAM configuration for V3s. Signed-off-by: Icenowy Zheng <icenowy@aosc.io> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com> Tested-by: Jagan Teki <jagan@amarulasolutions.com>
2017-06-08sunxi: add support for V3s DRAM controllerIcenowy Zheng
Allwinner V3s features a DRAM controller like the on in H3, but with a DDR2 DRAM. Add support for it. Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com> Tested-by: Jagan Teki <jagan@amarulasolutions.com>
2017-06-08sunxi: add support for the DDR2 in V3s SoCIcenowy Zheng
Allwinner V3s SoC features a co-packaged DDR2 DRAM chip, which needs its timing param. Add support for it. Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz> Acked-by: Jagan Teki <jagan@amarulasolutions.com> Tested-by: Jagan Teki <jagan@amarulasolutions.com>
2017-06-08sunxi: enable dual rank detection in DesignWare-like DRAM codeIcenowy Zheng
The DesignWare-like DRAM code used to set the controller defaultly to single rank mode, which makes it not able to detect the second rank. Set the default value to dual rank, thus the rank detection code can work and finally the rank setting will be the correct value. Currently we know little about the dual-rank on R40, and the usage of A15 address line seems to be breaking dual-rank support. The only R40 board currently available (Sinovoip Banana Pi M2 Ultra) uses A15 rather than dual-rank, thus we cannot do research for it. So dual rank detection is temporarily disabled on R40. This change is tested on a Orange Pi One (H3, single rank), a Pine64+ 2GiB version (A64, single rank) , a Pinebook early prototype with DDR3 (A64, dual rank) and a SoPine with some LPDDR3 patch (A64, dual CS pins on one chip). Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com> Tested-by: Jagan Teki <jagan@amarulasolutions.com>
2017-06-08sunxi: Add selective DRAM type and timingIcenowy Zheng
DRAM chip varies, and one code cannot satisfy all DRAMs. Add options to select a timing set. Currently only DDR3-1333 (the original set) is added into it. Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com> Tested-by: Jagan Teki <jagan@amarulasolutions.com>
2017-06-08sunxi: add bank detection code to H3 DRAM initialization codeIcenowy Zheng
Some DDR2 DRAM have only four banks, not eight. Add code to detect this situation. Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com> Tested-by: Jagan Teki <jagan@amarulasolutions.com>
2017-06-08sunxi: add option for 16-bit DW DRAM controllerIcenowy Zheng
Some Allwinner SoCs features a DesignWare-like controller with only 16 bit bus width. Add support for them. Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com> Tested-by: Jagan Teki <jagan@amarulasolutions.com>
2017-06-08sunxi: Rename bus-width related macros in H3 DRAM codeIcenowy Zheng
The DesignWare DRAM controller used by H3 and newer SoCs use a bit to identify whether the DRAM is half-width. As H3 itself come with 32-bit DRAM, the two modes of the bit used to be named "MCTL_CR_32BIT" and "MCTL_CR_16BIT", but for SoCs with 16-bit DRAM they're really 8-bit and 16-bit. Rename the bit's macro, and also rename the variable name in dram_sun8i_h3.c. This commit do not add 16-bit DRAM controller support, but the support will be introduced in next commit. Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com> Tested-by: Jagan Teki <jagan@amarulasolutions.com>
2017-06-08sunxi: makes an invisible option for H3-like DRAM controllersIcenowy Zheng
Allwinner SoCs after H3 (e.g. A64, H5, R40, V3s) uses a H3-like DesignWare DRAM controller, which do not have official free DRAM initialization code, but can use modified dram_sun8i_h3.c. Add a invisible option for easier DRAM initialization code reuse. Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com> Tested-by: Jagan Teki <jagan@amarulasolutions.com>
2017-06-08sun8i: h3: Add initial NanoPi M1 Plus supportJagan Teki
NanoPi M1 Plus is designed and developed by FriendlyElec for professionals, enterprise users, makers and hobbyists using the Allwinner H3 SOC. NanoPi M1 Plus key features - Allwinner H3, Quad-core Cortex-A7@1.2GHz - 1GB DDR3 RAM - 8GB eMMC - microSD slot - 10/100/1000M Ethernet - Serial Debug Port - 5V 2A DC power-supply Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Tested-by: Jagan Teki <jagan@amarulasolutions.com>
2017-06-06Merge git://git.denx.de/u-boot-ubiTom Rini
2017-06-06fs: usbifs: Fix warning in ubifsSiva Durga Prasad Paladugu
This patch fixes the below warning by typecasting it properly fs/ubifs/ubifs.c: In function 'ubifs_load': fs/ubifs/ubifs.c:942:29: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] err = ubifs_read(filename, (void *)addr, 0, size, &actread); Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2017-06-06Merge git://git.denx.de/u-boot-usbTom Rini
2017-06-06Prepare v2017.07-rc1Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-06-05armv7m: Fix larger buildsPhil Edworthy
The branch instruction only has an 11-bit relative target address, which is sometimes not enough. Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
2017-06-05arm: Add Kconfig symbols used for Linux asm compatibilityPhil Edworthy
Rather than change asm files that come from Linux, add the symbols to Kconfig. Since one of the symbols is for thumb2 builds, make CPU_V7M always select them. Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
2017-06-05arm64: hikey: Fix instructions in readmeMichal Simek
Fix inaccurate instructions in README. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2017-06-05drivers: ram: stm32: fix compilation issuePatrice Chotard
If CONFIG_CLK flag is not set, compilation raises the following error message: drivers/ram/stm32_sdram.c: In function 'stm32_fmc_probe': drivers/ram/stm32_sdram.c:154:2: error: 'ret' undeclared (first use in this function) ret = stm32_sdram_init(dev); Signed-off-by: Patrice Chotard <patrice.chotard@st.com> cc: Vikas Manocha <vikas.manocha@st.com>
2017-06-05arm64: Add NOLOAD attribute NOLOAD to .bss sectionsMichal Simek
Mark explicitly bss sections to not be loaded at run time. The similar patch was done in past by: "Fix linker scripts: add NOLOAD atribute to .bss/.sbss sections" (sha1: 64134f011254123618798ff77c42ba196b2ec485) The problem is related to latest toolchain added to Xilinx v2017.1 design tools where jtag loader is trying to access ununitialized memory. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2017-06-05ARMv8: Add support for poweroff via PSCIMichal Simek
Add support for calling poweroff in case of psci is wired. Based on the same solution as is used for reset. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org> [trini: Move all logic in to fwcall.c as other ARMs implement poweroff via PMIC] Signed-off-by: Tom Rini <trini@konsulko.com>
2017-06-05cmd/ethsw: Disable implicit enum conversion warningTom Rini
With clang-3.8 we see warnings like: cmd/ethsw.c:304:6: warning: implicit conversion from enumeration type 'enum ethsw_keyword_opt_id' to different enumeration type 'enum ethsw_keyword_id' [-Wenum-conversion] ethsw_id_pvid_no, ^~~~~~~~~~~~~~~~ Because we have one enum for ethsw_keyword_id and a second enum for ethsw_keyword_opt_id. This ends up being safe as ethsw_keyword_opt_id explicitly starts after ethsw_keyword_id enum ends. Disable the warning here rather than collapse these into one enum and rely on comments to denote where optional keywords begin. Cc: Codrin Ciubotariu <codrin.ciubotariu@freescale.com> Cc: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Tom Rini <trini@konsulko.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-06-05malloc: Turn on DEBUG when enabling unit testsPantelis Antoniou
Unit tests require mallinfo which in turn requires DEBUG on dlmalloc to be enabled. The dependancy on CONFIG_SANDBOX is wrong. Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-06-05arm: Always keep the dtb section on objcopyPantelis Antoniou
The dtb blob section must always be present in the resulting image. Either if OF_EMBEDED is used or if unit tests include dtb blobs. Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-06-05board: ti: am571-idx: Add vcores supportKeerthy
Update vcores for am571-idk board. Reported-by: Steve Kipisz <s-kipisz2@ti.com> Signed-off-by: Keerthy <j-keerthy@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-06-05scripts/Makefile.lib: Only apply u-boot.dtsi files in the target directoryTom Rini
We only want to apply files such as 'omap5-u-boot.dtsi', which resides in arch/arm/dts/ to other files in arch/arm/dts/ and not say test/overlay/. Rework the make logic to check for -u-boot.dtsi files in the same directory as their target dts. Cc: Simon Glass <sjg@chromium.org> Reported-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Signed-off-by: Tom Rini <trini@konsulko.com> Tested-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-06-05ARM: ti: Update layout for MMC and eMMC (env and dfu)Jean-Jacques Hiblot
The problems with the current DFU layout are: MMC: The space allocated for u-boot is too small for the latest u-boot (>750KB). We need to increase it. eMMC uses a much bigger area (2MB). eMMC: region "u-boot.img.raw" overlaps the environment area and the region "spl-os-image.raw". both: region "spl-os-image.raw" is quite small and can't handle android kernels Fixing this requires growing some regions and moving others. Care has been taken to leave some room for further growth of "spl-os-args.raw". Also the "env" now appears in the dfu so that it's apparent that the region is not free space that can be used to grow "u-boot.img.raw". The MLO region is 0x100 sectors wide but the 0x100 are unused in case the MLO comes too overflow this areas. The total space allocated for those raw binaries is 16MB, of which 13+MB are reserved for the kernel image. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
2017-06-05common/spl/Kconfig: Use 'if SPL' / 'if TPL' guardsTom Rini
Much of the entries here simply depend on SPL (or TPL). Instead of this redundancy use if SPL / if TPL to guard the rest of the choices and only show them when we have the relevant option enabled. Signed-off-by: Tom Rini <trini@konsulko.com>
2017-06-05bootstage: Record time taken to set up the live device treeSimon Glass
This time is interesting as a comparision with the flat device tree time. Add it to the record. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-05bootstage: Support SPLSimon Glass
At present bootstage only supports U-Boot proper. But SPL can also consume boot time so it is useful to have the record start there. Add bootstage support to SPL. Also support stashing the timing information when SPL finishes so that it can be picked up and reported by U-Boot proper. This provides a full boot time record, excluding only the time taken by the boot ROM. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-05bootstage: Adjust to use const * where possibleSimon Glass
There are a few places that should use const *, such as bootstage_unstash(). Update these to make it clearer when parameters are changed. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-05bootstage: Tidy up error return valuesSimon Glass
We should return a proper error number instead of just -1. This helps the caller to determine what when wrong. Update a few functions to fix this. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-05bootstage: Record the time taken to set up driver modelSimon Glass
Driver model is set up ones before relocation and once after. Record the time taken in each case. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-05bootstage: Init as early as possibleSimon Glass
At present we don't allow use of bootstage before driver model is running. This means we cannot time the init of driver model itself. Now that bootstage requires its own board-specific timer, we can move its init to earlier in the sequence, both before and after relocation. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-05bootstage: Support relocating boostage dataSimon Glass
Some boards cannot access pre-relocation data after relocation. Reserve space for this and copy it during preparation for relocation. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-05bootstage: Use debug() for stashing messagesSimon Glass
We don't normally want to see these messages. Change them to debug-only. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-05bootstage: Show records with a zero timeSimon Glass
We can now use the record count to determine whether a record is valid or not. Drop the test for a zero time. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-05bootstage: Use rec_count as the array indexSimon Glass
At present bootstage has a large array with all possible bootstage IDs recorded. It adds times to the array element indexed by the ID. This is inefficient because many IDs are not used during boot. We can save space by only recording those IDs which actually have timestamps. Update the array to use a record count, which increments with each addition of a new timestamp. This takes longer to record a time, since it may involve an array search. Such a search may be particularly expensive before relocation when the CPU is running slowly or the cache is off. But at that stage there should be very few records. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-05bootstage: Fix up code style and commentsSimon Glass
There are several code style and comment nits. Fix them and also remove the comment about passing bootstage to the kernel being TBD. This is already supported. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-05bootstage: Convert to use malloc()Simon Glass
At present bootstage uses the data section of the image to store its information. There are a few problems with this: - It does not work on all boards (e.g. those which run from flash before relocation) - Allocated strings still point back to the pre-relocation data after relocation Now that U-Boot has a pre-relocation malloc() we can use this instead, with a pointer to the data in global_data. Update bootstage to do this and set up an init routine to allocate the memory. Now that we have a real init function, we can drop the fake 'reset' record and add a normal one instead. Note that part of the problem with allocated strings remains. They are reallocated but this will only work where pre-relocation memory is accessible after relocation. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-05bootstage: Change CONFIG_BOOTSTAGE_USER_COUNT to an intSimon Glass
There is no good read to make this hex, and integer is more natural for this type of setting. Update it. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-05bootstage: Require timer_get_boot_us() to be definedSimon Glass
At present we provide a default version of this function for use by bootstage. However it uses the system timer and therefore likely requires driver model. This makes it impossible to time driver-model init. Drop the function and require boards to provide their own. Add a sandbox version also. There is a default implememtation in lib/time.c for boards which use CONFIG_SYS_TIMER_COUNTER. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-05bootstage: Provide a default timer functionSimon Glass
If CONFIG_SYS_TIMER_COUNTER is used we can provide a default microsecond timer implementation. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-05ARM: k2g: Fix passing main pll info for higher speedsLokesh Vutla
Main pll is marked as arm plls for higher speeds. Fix this. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2017-06-05cmd/elf.c: Support passing arguments with bootelfTom Rini
The bootelf command could, but does not, pass additional arguments along on the command line. Make do_bootelf consume bootelf/flags/address as needed and then pass along anything else to the ELF application we've launched. Reported-by: Thomas Doerfler <thomas.doerfler@embedded-brains.de> Signed-off-by: Tom Rini <trini@konsulko.com>
2017-06-05reset: sti: add deassert counter in reset channel descriptorPatrice Chotard
This deassert counter allow to manage "shared" reset lines encountered in some specific case. On STiH410 SoC, DWC3, EHCI and OHCI are all using a respective PHY, but all of these PHYs shared a "global" reset. Currently, during command "usb stop", all host controller are stopped (XHCI, EHCI and OHCI). XHCI is first shutdowned, which means that PHY global reset is asserted. Then EHCI is shutdowned, but its PHY reset has already been asserted which make handshake() call failed in ehci_shutdown(). This counter allows to really assert a reset lines only when the "last" user is asserting it. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-06-05test: py: hush: Add echo dependencyMichal Simek
Some tests depends on echo command to be present. Reported-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2017-06-05test: py: Use global pytestmark for hush testsMichal Simek
All tests in test_hush_if_test depends on hush parser to be present. This patch simplify test dependencies by using global pytestmark. Reported-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Stephen Warren <swarren@nvidia.com>