summaryrefslogtreecommitdiff
path: root/arch/arm/mach-uniphier
AgeCommit message (Collapse)Author
2016-02-14ARM: uniphier: add support for PH1-Pro4 Ace and Sanji boardsMasahiro Yamada
Initial commit for PH1-Pro4 Ace and Sanji boards. Note: There are two variants for the Ace board in terms of the amount of DDR memory; 1GB or 2GB. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-02-14ARM: uniphier: adjust DDR clock delay line for ProXstream2Masahiro Yamada
It turned out that DDR channel 2 was not working on ProXstream2 Vodka board. Add the missing ACBLDR0 register setting to adjust the delay between the clock lines and the address/command lines. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-02-14ARM: uniphier: move cmd_ddrmphy.c to fix build errorMasahiro Yamada
If CONFIG_CMD_DDRMPHY_DUMP is enabled, the build fails. Fixes: 93d92d46cd01 ("ARM: uniphier: add dump command for DDR Multi PHY registers") Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-02-14ARM: uniphier: fix makefiles to build cmd_ddr(m)phy.cMasahiro Yamada
The U-Boot proper building needs to descend arch/arm/mach-uniphier/dram to build these commands. Fixes: 93d92d46cd01 ("ARM: uniphier: add dump command for DDR Multi PHY registers") Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-02-14ARM: uniphier: remove unused header mio-regs.hMasahiro Yamada
This header is no longer used. This is the last file in arch/arm/mach-uniphier/include/mach/. At last, I've succeeded in eliminating the mach directory. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-02-14ARM: uniphier: drop unneeded EHCI pin mux settingsMasahiro Yamada
These pin mux settings are cared by the pinctrl drivers. Remove the ad-hoc code. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-02-14ARM: uniphier: switch over to generic EHCI driverMasahiro Yamada
The UniPhier EHCI driver (drivers/usb/host/ehci-uniphier.c) does nothing special but set the base address and handle reset/clock. Since commit 4feefdcfe916 ("usb: add clock support for generic EHCI"), the generic one (drivers/usb/host/ehci-generic.c) can do those, too. We no longer need to stick to the dedicated driver. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-02-14ARM: uniphier: support USB boot mode for ProXstream2 / PH1-LD6b SoCMasahiro Yamada
The USB boot code is too fat and complicated to be included in SPL (at least for now). So, it was implemented as a separate project (what we call USB-loader). The expected boot sequence is as follows: Boot ROM -> USB-loader -> SPL -> U-Boot proper The USB-loader loads the SPL and U-Boot proper from a USB memory onto the locked L2 cache. Then, SPL needs to copy the U-Boot proper to DRAM, so this mode looks like a NOR boot from the view of SPL. However, we want to distinguish between (genuine) NOR boot and USB boot in some places. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-02-14ARM: uniphier: add missing static qualifierMasahiro Yamada
This function is for local use in the file. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-02-14ARM: uniphier: create early page table at run-timeMasahiro Yamada
UniPhier SoCs are not equipped with dedicated on-chip SRAM. Instead, locked outer cache is used as RAM area during the early boot stage where DRAM is not ready yet. This effectively means MMU must be always enabled while we are in SPL. Currently, the SPL image for UniPhier SoCs contains the page table statically defined at compile time. It has been a burden because the 16KB page table occupies a quarter memory footprint of the 64KB SPL image. Finally, there is no more room to implement new features in SPL. Setting aside the NOR boot mode, this issue can be solved by creating the page table onto RAM at run time. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-02-14ARM: uniphier: change stack pointer address for SPLMasahiro Yamada
No special reason for the current stack address 0x0ff08000. Change it to 0x00100000 to simplify the init_page_table. There are two types of SoCs in terms of the load address of SPL. [1] PH1-sLD3, PH1-LD4, PH1-sLD8 SPL is loaded at 0x00040000-0x0004ffff [2] PH1-Pro4, PH1-Pro5, ProXstream2, PH1-LD6b SPL is loaded at 0x00100000-0x0010ffff The new stack area (0x000f8000-0x00100000) should be safe for all the cases. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-02-14ARM: uniphier: support some more DRAM use cases on PH1-Pro4 boardsMasahiro Yamada
Some of PH1-Pro4 boards are equipped with larger amount of DRAM than the reference board. Add UMC settings to support them. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-01-19ARM: uniphier: remove unneeded if conditionalsMasahiro Yamada
The if block does the same as the else block does. The conditional is not necessary at all. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-01-19ARM: uniphier: move UMC register macros to umc-regs.hMasahiro Yamada
The umc-proxstream2.c defiens the same macros as in umc-regs.h. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-01-19ARM: uniphier: set active ways to really enable outer cacheMasahiro Yamada
Each way must be unlocked to make it effective. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-01-19ARM: uniphier: fix range invalidate for outer cacheMasahiro Yamada
If invalidate operation is invoked against a cache-unaliged region, the both ends of the region should be flushed, not invalidated. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-01-19ARM: uniphier: factor out outer cache sync as a helper functionMasahiro Yamada
Avoid repeating the same code. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-01-19ARM: uniphier: refactor outer cache operation slightlyMasahiro Yamada
Improve readability without changing the behavior. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-01-12ARM: uniphier: add dump command for DDR Multi PHY registersMasahiro Yamada
The ProXstream2/PH1-LD6b is integrated with a new IP for DDR PHY which is not register-compatible with the former SoCs. Add a new command to support the register dump of this IP. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-01-12ARM: uniphier: add DRAM init code for ProXstream2/PH1-LD6bMasahiro Yamada
As mentioned in the log of commit 019df879a93e2 (ARM: uniphier: add ProXstream2 and PH1-LD6b support), the DRAM init code was missing for a long time. Finally, here it is. SPL works now. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-01-12ARM: uniphier: move headers out of include/mach directoryMasahiro Yamada
These headers are only included locally in arch/arm/mach-uniphier/. There is no reason to export them by putting in the mach/ directory. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-01-12ARM: uniphier: move cmd_pinmon.c to boot-mode subdirectoryMasahiro Yamada
This command shows the boot mode pins, so it would be more at home in the boot-mode subdirectory. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-01-12ARM: uniphier: move cmd_ddrphy.c to dram subdirectoryMasahiro Yamada
This command shows the register dump of the DDR PHY, so it would be more at home in the dram subdirectory. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-01-12ARM: uniphier: kill bogus header includesMasahiro Yamada
These includes are not necessary. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-12-22ARM: uniphier: set DTB file name to fdt_file environmentMasahiro Yamada
When we want to boot Linux with a DTB file downloaded from a TFTP server or somewhere, we need to know the file name to be downloaded. Assume the U-Boot configuration is shared among some similar boards. If they are similar enough, the difference only appears in device trees. The build procedure would be like this: - Board A: make foo_common_defconfig && make DEVICE_TREE=foo_board_a - Board B: make foo_common_defconfig && make DEVICE_TREE=foo_board_b - Board C: make foo_common_defconfig && make DEVICE_TREE=foo_board_c In this case, the U-Boot image contains nothing about the DTB file name it is running with. (CONFIG_DEFAULT_DEVICE_TREE is not helpful for this purpose because it is painful to change it from "make menuconfig" for each board.) This commit allows to lookup the DTB file name based on the compatible string and set it to "fdt_file" environment. Then "tftpboot $fdt_file" will download the file we want. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-12-22ARM: uniphier: merge umc/ and ddrphy/ into a single directoryMasahiro Yamada
The UMC (Universal Memory Controller) and the DDR PHY block are highly related to each other. It is better to have both code in the same directory. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-12-22ARM: uniphier: display model number all the time on boot upMasahiro Yamada
Both "Model 1" and "Model 2" are supported for ProXstream2 and PH1-LD6b boards. It is useful to show the model number in the boot banner. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-12-22ARM: uniphier: add macros and revision IDs for sLD11 and LD10Masahiro Yamada
These are new SoCs from Socionext Inc. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-12-22ARM: uniphier: compile uniphier_get_board_param() for U-Boot properMasahiro Yamada
Compile this file for U-Boot proper as well as SPL, so that the U-Boot proper can call uniphier_get_board_param(). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-12-22ARM: uniphier: split ProXstream2 board data and change DDR frequencyMasahiro Yamada
The DDR3 memory chips on ProXstream2 boards support up to 2133 MHz, while only up to 1866MHz on PH1-LD6b boards. Split the board data structure and change the DDR frequency of ProXstream2 boards to 2133 MHz. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-12-22ARM: uniphier: call uniphier_get_board_param() without FDT blobMasahiro Yamada
Move "gd->fdt_blob" from the caller to the callee so that this function can be used more easily. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-12-22ARM: uniphier: add functions to get SoC model/revisionMasahiro Yamada
We sometimes have to implement different code depending on the SoC revision. This commit adds functions to get the model/revision number. Note: Model number: incremented on major changes of the SoC Revision number: incremented on minor changes of the SoC The "Model 2" exists for PH1-sLD3, ProXstream2/PH1-LD6b. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-12-22ARM: uniphier: allow DDR function to return more precise error codeMasahiro Yamada
Return different error code depending on the reason so that the caller can know the cause of the failure. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-12-22ARM: uniphier: use BIT() macro for DDR PHY headerMasahiro Yamada
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-12-22ARM: uniphier: rename DTCR_RNKEN_* register bit to DTCR_RANKEN_*Masahiro Yamada
The bit 27-24 of the DTCR register is described as RANKEN in the DDR PHY databook. Follow this abbreviation. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-12-22ARM: uniphier: add const qualifier to constant arrayMasahiro Yamada
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-12-22ARM: uniphier: add static qualifiers to locally used functionsMasahiro Yamada
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-11-11ARM: uniphier: drop UniPhier specific SMP codeMasahiro Yamada
The latest Linux can directly handle SMP operations for UniPhier SoCs without any help of U-boot. Drop the relevant code from U-boot. See commit b1e4006aeda8c8784029de17d47987c21ea75f6d ("ARM: uniphier: rework SMP operations to use trampoline code") in Linux Kernel. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2015-11-10Various Makefiles: Add SPDX-License-Identifier tagsTom Rini
After consulting with some of the SPDX team, the conclusion is that Makefiles are worth adding SPDX-License-Identifier tags too, and most of ours have one. This adds tags to ones that lack them and converts a few that had full (or in one case, very partial) license blobs into the equivalent tag. Cc: Kate Stewart <kstewart@linuxfoundation.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2015-09-24ARM: uniphier: fix init page table for ProXstream2/PH1-LD6b USB bootMasahiro Yamada
Currently, the USB boot mode is supported by an external loader and U-boot proper image is put on the section 0. This commit allows access there. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-09-24ARM: uniphier: add ProXstream2 and PH1-LD6b supportMasahiro Yamada
The DDR SDRAM initialization code has not been mainlined yet, but U-Boot proper should work. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-09-24ARM: uniphier: add PH1-Pro5 supportMasahiro Yamada
The DDR SDRAM initialization code has not been mainlined yet, but U-Boot proper should work. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-09-24ARM: uniphier: allow to enable multiple SoCsMasahiro Yamada
Before this commit, the Kconfig menu in mach-uniphier only allowed us to choose one SoC to be compiled. Each SoC has its own defconfig file for the build-test coverage. Consequently, some defconfig files are duplicated with only the difference in CONFIG_DEFAULT_DEVICE_TREE and CONFIG_{SOC_NAME}=y. Now, most of board-specific parameters have been moved to device trees, so it makes sense to include init code of multiple SoCs into a single image as long as the SoCs have similar architecture. In fact, some SoCs of UniPhier family are very similar: - PH1-LD4 and PH1-sLD8 - PH1-LD6b and ProXstream2 (will be added in the upcoming commit) This commit will be helpful to merge some defconfig files for better maintainability. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-09-24ARM: uniphier: unify low-level debug init codeMasahiro Yamada
Move init code of low-level debug into a single file. This is helpful to create an image that runs on multiple SoCs. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-09-24ARM: uniphier: fix glitch signal problem for low-level debugMasahiro Yamada
Currently, IECTRL is enabled after pin-mux settings for the low-level debugging for PH1-LD4 and PH1-sLD8. While IECTRL is disabled, input signals are pulled-down, i.e. glitch signal (Low to High transition) problem occurs if pin-mux is set up first. As a result, one invalid character is input to the UART block and the auto-boot counting is terminated immediately. The correct initialization procedure is: [1] Enable IECTRL (if IECTRL exists for the pins) [2] Set up pin-muxing [3] Deassert the reset of the hardware block Currently, the low-level debugging is working for PH1-sLD3 and PH1-Pro4, but just in case, follow the sequence for all the SoCs. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-09-24ARM: uniphier: delete unneeded input enable for low-level debugMasahiro Yamada
The UART I/O ports for PH1-Pro4 has no input enable controlling. This code is useless. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-09-24ARM: uniphier: rename CONFIG_MACH_* to CONFIG_ARCH_UNIPHIER_*Masahiro Yamada
I want these prefixed with CONFIG_ARCH_UNIPHIER_ to clarify they belong to UniPhier SoC family. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-09-24ARM: uniphier: allow to disable CONFIG_MICRO_SUPPORT_CARDMasahiro Yamada
Without this, build fails if CONFIG_MICRO_SUPPORT_CARD is disabled. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-09-24ARM: uniphier: move CONFIG_SUPPORT_CARD_* macros to local fileMasahiro Yamada
It is no longer necessary to define CONFIG_SUPPORT_CARD_* globally. Move them to a C file as local macros. Also, rename the C file. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-09-24ARM: uniphier: refactor LED functionMasahiro Yamada
The macro, led_write(), is now only used in C sources. There is no more reason to keep the tricky assembly macro. Replace it with a new C function led_puts(). Also, rename board.h to micro-support-card.h. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>