summaryrefslogtreecommitdiffstats
path: root/include/configs/rpi-common.h
Commit message (Collapse)AuthorAgeFilesLines
* rpi: remove redundant board filesStephen Warren2016-04-111-205/+0
| | | | | | | | | | | | | | | | | | | | | Now that rpi_*defconfig and Kconfig (rather than the config header file) provide the identity of the build, we don't need to separate config headers and board directories for each RPi variant. Set CONFIG_SYS_BOARD and CONFIG_SYS_CONFIG_NAME so that we can get rid of the duplication. This requires a tiny number of extra ifdefs in the config header. The only disadvantage of this approach is that the $board/$board_name environment variables aren't as descriptive as they used to be. This isn't really an issue because those only exist to allow scripts to create DTB filenames at runtime. However, the RPi board code already sets $fdtfile to something more accurate based on FW-reported board ID anyway. While at it, unify some Kconfig select options, and add a MAINTAINERS entry for bcm283x too. Partially-suggested-by: Tom Rini <trini@konsulko.com> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* ARM: add Raspberry Pi 3 64-bit configStephen Warren2016-04-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On all Pis so far, the VC FW provides a short stub to set up the ARM CPU before entering the kernel (a/k/a U-Boot for us). This feature is not currently supported by the VC FW when booting in 64-bit mode. However, this feature will likely appear in the near future, and this U-Boot port assumes that such a feature is in place. Without that feature, or a temporary workaround described below, U-Boot will not boot. Once the VC FW does provide the ARM stub, u-boot.bin built for rpi_3 can be used drectly as kernel7.img, in the same way as any other RPi port. The following config.txt is required: # Fix mini UART input frequency, and setup/enable up the UART. # Without this option, U-Boot will not boot, even if you don't care # about the serial console. This option will always be required for # all RPi3 use-cases, unless the PL011 UART is used, which is not # yet supported by rpi_3* builds of U-Boot. enable_uart=1 # Boot in AArch64 (64-bit) mode. # It is possible that a future VC FW will remove the need for this # option, instead auto-setting 32-/64-bit mode based on the "kernel" # filename present on the SD card. arm_control=0x200 Prior to the VC FW providing the ARM boot stub, you can use the following steps to build an equivalent stub into the U-Boot binary: git clone https://github.com/swarren/rpi-3-aarch64-demo.git \ ../rpi-3-aarch64-demo (cd ../rpi-3-aarch64-demo && ./build.sh) Build U-Boot for rpi_3 in the usual way cat ../rpi-3-aarch64-demo/armstub64.bin u-boot.bin > u-boot.bin.stubbed Use u-boot.bin.stubbed as kernel7.img on the Pi SD card. In this case, the following additional entries are required in config.txt: # Tell the FW to load the kernel image at address 0, the reset vector. kernel_old=1 Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* rpi: BCM2837 and Raspberry Pi 3 32-bit supportStephen Warren2016-04-011-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Raspberry Pi 3 contains a BCM2837 SoC. The BCM2837 is a BCM2836 with the CPU complex swapped out for a quad-core ARMv8. This can operate in 32- or 64-bit mode. 32-bit mode is the current default selected by the VideoCore firmware on the Raspberry Pi 3. This patch adds a 32-bit port of U-Boot for the Raspberry Pi 3. >From U-Boot's perspective, the only delta between the RPi 2 and RPi 3 is a change in usage of the SoC UARTs. On all previous Pis, the PL011 was the only UART in use. The Raspberry Pi 3 adds a Bluetooth module which uses a UART to connect to the SoC. By default, the PL011 is used for this purpose since it has larger FIFOs than the other "mini" UART. However, this can be configured via the VideoCore firmware's config.txt file. This patch hard-codes use of the mini UART in the RPi 3 port. If your system uses the PL011 UART for the console even on the RPi 3, please use the RPi 2 U-Boot port instead. A future change might determine which UART to use at run-time, thus allowing the RPi 2 and RPi 3 (32-bit) ports to be squashed together. The mini UART has some limitations. One externally visible issue in the BCM2837 integration is that the UART divides the SoC's "core clock" to generate the baud rate. The core clock is typically variable, and under control of the VideoCore firmware for thermal management reasons. If the VC FW does modify the core clock rate, UART communication will be corrupted since the baud rate will vary from the expected value. This was not an issue for the PL011 UART, since it is fed by a fixed 3MHz clock. To work around this, the VideoCore firmware can be told not to modify the SoC core clock. However, the only way this can happen and be thermally safe is to limit the core clock to a low/minimum frequency. This leaves performance on the table for use-cases that don't care about a UART console. Consequently, use of the mini UART console must be explicitly requested by entering the following line into config.txt: enable_uart=1 A recent version of the VC firmware is required to ensure that the mini UART is fully and correctly initialized by the VC FW; at least firmware.git 046effa13ebc "firmware: arm_loader: emmc clock depends on core clock See: https://github.com/raspberrypi/firmware/issues/572". Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* ARM: bcm283x: don't always define CONFIG_BCM2835Stephen Warren2016-03-271-3/+2
| | | | | | | | | | | | | Currently, CONFIG_BCM2835 is defined for all BCM283x builds and _BCM2836 is defined when building for that SoC. That means there isn't a single define that means "exactly BCM2835". This will complicate future patches where BCM2835-vs-anything-else needs to be determined simply. Modify the code to define one or the other of CONFIG_BCM2835/BCM2836 so future patches are simpler. Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* Kconfig: Move CONFIG_FIT and related options to KconfigSimon Glass2016-03-141-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are already two FIT options in Kconfig but the CONFIG options are still in the header files. We need to do a proper move to fix this. Move these options to Kconfig and tidy up board configuration: CONFIG_FIT CONFIG_OF_BOARD_SETUP CONFIG_OF_SYSTEM_SETUP CONFIG_FIT_SIGNATURE CONFIG_FIT_BEST_MATCH CONFIG_FIT_VERBOSE CONFIG_OF_STDOUT_VIA_ALIAS CONFIG_RSA Unfortunately the first one is a little complicated. We need to make sure this option is not enabled in SPL by this change. Also this option is enabled automatically in the host builds by defining CONFIG_FIT in the image.h file. To solve this, add a new IMAGE_USE_FIT #define which can be used in files that are built on the host but must also build for U-Boot and SPL. Note: Masahiro's moveconfig.py script is amazing. Signed-off-by: Simon Glass <sjg@chromium.org> [trini: Add microblaze change, various configs/ re-applies] Signed-off-by: Tom Rini <trini@konsulko.com>
* ARM: rpi: increase CONFIG_SYS_MAXARGSStephen Warren2016-02-261-1/+1
| | | | | | | | This allows all the hush tests implemented in test/py to pass, under qemu at least. Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* rpi: always scroll by 10 linesLubomir Rintel2016-02-241-0/+1
| | | | | | | | | Scrolling the simple framebuffer is really slow in Raspberry Pi to the point it delays the boot by a second or two and makes longer output inconvenient to follow (printenv, md). Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Acked-by: Stephen Warren <swarren@wwwdotorg.org>
* ARM: rpi: set initrd_highLubomir Rintel2016-02-151-0/+1
| | | | | | | | | | | | | | | | | | | The kernel gets much too sad when the ramdisk is loaded too high into the 1GiB of memory on Raspberry Pi 2: ## Flattened Device Tree blob at 00000100 Booting using the fdt blob at 0x000100 Loading Ramdisk to 39c14000, end 3ab45067 ... OK Using Device Tree in place at 00000100, end 000045ea ... [ 0.599346] Unpacking initramfs... [ 0.602924] Unable to handle kernel paging request at virtual address f9c14000 Placement of the device tree was fixed in 89ca1000 (ARM: rpi: set fdt_high in the default environment). Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Acked-by: Stephen Warren <swarren@wwwdotorg.org>
* ARM: rpi: set fdt_high in the default environmentStephen Warren2016-02-081-0/+1
| | | | | | | | | | | | The ARM Linux kernel requires the DT to be in memory accessible early during the boot process. This always happens naturally on the RPi 1, since the maximum memory size of 512MiB, and additionally some of that is reserved for use by the GPU. The RPi 2 has 1GiB of RAM (minus some GPU usage), and so if the DT is relocated to the top of RAM, Linux cannot access it. Prevent this from happening by setting fdt_high. Cc: Daniel Stone <daniels@collabora.com> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
* ARM: rpi: update memory layout env. var. documentationStephen Warren2016-02-081-5/+11
| | | | | | | | | | | | | Update rpi-common.h's documentation that describes the rationale for choosing various addresses for standardized variables used by boot scripts. This comment was correct when written, but not updated when some of the values were changed. Fixes: 14006a567105 ("rpi: set fdt_addr_r to 0x00000100 to match default ...device_tree_address") Cc: Jonathan Liu <net147@gmail.com> Cc: Daniel Stone <daniels@collabora.com> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
* ARM: rpi: enable USB keyboardStephen Warren2016-01-231-1/+5
| | | | | | | | | | | Now that the DWC2 driver supports split transactions, we can reasonably enable support for USB keyboards. This wasn't terribly useful before since keyboards are usually LS/FS devices, and thus require split transaction support when attached to a USB hub such as the hub built into the RPi model Bs. Cc: Stefan Brüns <stefan.bruens@rwth-aachen.de> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
* common: add CMD_GPIO to KconfigThomas Chou2015-11-181-1/+0
| | | | | | | Add CMD_GPIO to Kconfig and run tools/moveconfig.py . Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Simon Glass <sjg@chromium.org>
* arm, powerpc: select SYS_GENERIC_BOARDMasahiro Yamada2015-10-241-1/+0
| | | | | | | | | | | We have finished Generic Board conversion for ARM and PowerPC, i.e. all the boards have been converted except OpenRISC, SuperH, SPARC, which have not supported Generic Board framework yet. Select SYS_GENERIC_BOARD in arch/Kconfig and delete all the macro defines in include/configs/*.h. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* ARM: rpi: Add CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG supportGuillaume GARDET2015-10-241-0/+1
| | | | | | | | | | | | Add CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG support and enable it to set 'board_rev' and 'board_name' envs. 'board_rev' can be used in scripts to determine what board we are running on and 'board_name' for pretty printing. Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr> Cc: Stephen Warren <swarren@wwwdotorg.org> Acked-by: Stephen Warren <swarren@wwwdotorg.org>
* rpi: set fdt_addr_r to 0x00000100 to match default device_tree_addressJonathan Liu2015-08-281-2/+2
| | | | | | | Raspberry Pi by default loads the FDT to 0x00000100 so set fdt_addr_r to match and move scriptaddr to 0x02000000 to avoid clobbering the FDT. Signed-off-by: Jonathan Liu <net147@gmail.com>
* kconfig: add config option for shell promptNikita Kiryanov2015-08-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add option to set shell prompt string from menuconfig and migrate boards globally. The migration is done as follows: - Boards that explicitly and unconditionally set CONFIG_SYS_PROMPT had the entry moved to their defconfig files. - Boards that defined some kind of #ifdef logic which selects the CONFIG_SYS_PROMPT (for example qemu-mips) got an #undef CONFIG_SYS_PROMPT right before the #ifdef logic and were left alone. - This change forces CONFIG_SYS_PROMPT to be a per board decision, and thus CONFIG_SYS_PROMPT was removed from all <soc>_common.h and <arch>_common.h files. This results in a streamlined default value across platforms, and includes the following files: spear-common, sunxi-common, mv-common, ti_armv7_common, tegra-common, at91-sama5_common, and zynq-common. - Boards that relied on <arch/soc>_common.h values of CONFIG_SYS_PROMPT were not updated in their respective defconfig files under the assumption that since they did not explicitly define a value, they're fine with whatever the default is. - On the other hand, boards that relied on a value defined in some <boards>_common.h file such as woodburn_common, rpi-common, bur_am335x_common, ls2085a_common, siemens_am33x_common, and omap3_evm_common, had their values moved to the respective defconfig files. - The define V_PROMPT was removed, since it is not used anywhere except for assigning a value for CONFIG_SYS_PROMPT. Cc: Tom Rini <trini@konsulko.com> Cc: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> [trini: Add spring, sniper, smartweb to conversion] Signed-off-by: Tom Rini <trini@konsulko.com>
* arm/rpi: Enable dcacheAlexander Stein2015-08-121-1/+0
| | | | | | | | | Now that mailbox driver supports cache flush and invalidation, we can enable dcache. Signed-off-by: Alexander Stein <alexanders83@web.de> Acked-by: Stephen Warren <swarren@wwwdotorg.org> Tested-by: Stephen Warren <swarren@wwwdotorg.org>
* Move defaults from config_cmd_default.h to KconfigJoe Hershberger2015-06-251-4/+0
| | | | | | | | | | This sets the default commands Kconfig to match include/config_cmd_default.h commands in the common/Kconfig and removes them from include/configs. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> [trini: rastaban, am43xx_evm_usbhost_boot, am43xx_evm_ethboot updates] Signed-off-by: Tom Rini <trini@konsulko.com>
* ARM: bcm283x: Switch to generic timerMarek Vasut2015-05-281-0/+6
| | | | | | | | | | | Switch to generic timer implementation from lib/time.c . This also fixes a signed overflow which was in __udelay() implementation. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Stephen Warren <swarren@wwwdotorg.org> Cc: Tyler Baker <tyler.baker@linaro.org> Acked-by: Stephen Warren <swarren@wwwdotorg.org>
* rpi: add support for Raspberry Pi 2 model BStephen Warren2015-02-211-0/+186
USB doesn't seem to work yet; the controller detects the on-board Hub/ Ethernet device but can't read the descriptors from it. I haven't investigated yet. Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
OpenPOWER on IntegriCloud