aboutsummaryrefslogtreecommitdiff
path: root/board/qualcomm
AgeCommit message (Collapse)AuthorFilesLines
2021-09-30WS cleanup: remove trailing white spaceWolfgang Denk1-3/+3
Signed-off-by: Wolfgang Denk <wd@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-07-23board: dragonboard410c: Fix fastbootStephan Gerhold1-2/+1
At the moment pressing the volume down key does not actually launch fastboot. This is because setting "bootdelay" to "-1" actually disables autoboot and drops to the U-Boot console. It does not execute the "bootcmd". The correct value for "bootdelay" here would be "-2", which disables the delay and key checking and would immediately execute the "bootcmd". However, even better in this case is using "preboot" to trigger Fastboot. The advantage is that running "fastboot continue" will actually continue the autoboot process instead of ending up in the U-Boot shell. Also make sure to unset "preboot" again immediately in case the user saves the environment after triggering fastboot. Cc: Ramon Fried <rfried.dev@gmail.com> Fixes: aa043ee91a47 ("db410c: automatically launch fastboot") Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2021-07-23board: dragonboard410c: Load U-Boot directly without LKStephan Gerhold7-261/+6
At the moment the U-Boot port for the DragonBoard 410c is designed to be loaded as an Android boot image after Qualcomm's Little Kernel (LK) bootloader. This is simple to set up but LK is redundant in this case, since everything done by LK can be also done directly by U-Boot. Dropping LK entirely has at least the following advantages: - Easier installation/board code (no need for Android boot images) - (Slightly) faster boot - Boot directly in 64-bit without a round trip to 32-bit for LK So far this was not possible yet because of unsolved problems: 1. Signing tool: The firmware expects a "signed" ELF image with extra (Qualcomm-specific) ELF headers, usually used for secure boot. The DragonBoard 410c does not have secure boot by default but the extra ELF headers are still required. 2. PSCI bug: There seems to be a bug in the PSCI implementation (part of the TrustZone/tz firmware) that causes all other CPU cores to be started in 32-bit mode if LK is missing in the boot chain. This causes Linux to hang early during boot. There is a solution for both problems now: 1. qtestsign (https://github.com/msm8916-mainline/qtestsign) can be used as a "signing" tool for U-Boot and other firmware. 2. A workaround for the "PSCI bug" is to execute the TZ syscall when entering U-Boot. That way PSCI is made aware of the 64-bit switch and starts all other CPU cores in 64-bit mode as well. Simplify the dragonboard410c board by removing all the extra code that is only used to build an Android boot image that can be loaded by LK. This allows dropping the custom linker script, special image magic, as well as most of the special build/installation instructions. CONFIG_REMAKE_ELF is used to build a new ELF image that has both U-Boot and the appended DTB combined. The resulting u-boot.elf can then be passed to the "signing" tool (e.g. qtestsign). The PSCI workaround is placed in the "boot0" hook that is enabled with CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK. The extra check for EL1 allows compatibility with custom firmware that enters U-Boot in EL2 or EL3, e.g. qhypstub (https://github.com/msm8916-mainline/qhypstub). As a first step these changes apply only to DragonBoard410c. Similar changes could likely also work for the DragonBoard 820c. Note that removing LK wouldn't be possible that easily without a lot of work already done three years ago by Ramon Fried. A lot of missing initialization, pinctrl etc was already added back then even though it was not strictly needed yet. Cc: Ramon Fried <rfried.dev@gmail.com> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
2021-03-02reset: Remove addr parameter from reset_cpu()Harald Seiler2-2/+2
Historically, the reset_cpu() function had an `addr` parameter which was meant to pass in an address of the reset vector location, where the CPU should reset to. This feature is no longer used anywhere in U-Boot as all reset_cpu() implementations now ignore the passed value. Generic code has been added which always calls reset_cpu() with `0` which means this feature can no longer be used easily anyway. Over time, many implementations seem to have "misunderstood" the existence of this parameter as a way to customize/parameterize the reset (e.g. COLD vs WARM resets). As this is not properly supported, the code will almost always not do what it is intended to (because all call-sites just call reset_cpu() with 0). To avoid confusion and to clean up the codebase from unused left-overs of the past, remove the `addr` parameter entirely. Code which intends to support different kinds of resets should be rewritten as a sysreset driver instead. This transformation was done with the following coccinelle patch: @@ expression argvalue; @@ - reset_cpu(argvalue) + reset_cpu() @@ identifier argname; type argtype; @@ - reset_cpu(argtype argname) + reset_cpu(void) { ... } Signed-off-by: Harald Seiler <hws@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-02-02common: Drop asm/global_data.h from common headerSimon Glass2-0/+2
Move this out of the common header and include it only where needed. In a number of cases this requires adding "struct udevice;" to avoid adding another large header or in other cases replacing / adding missing header files that had been pulled in, very indirectly. Finally, we have a few cases where we did not need to include <asm/global_data.h> at all, so remove that include. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2020-07-17treewide: convert bd_t to struct bd_info by coccinelleMasahiro Yamada1-1/+1
The Linux coding style guide (Documentation/process/coding-style.rst) clearly says: It's a **mistake** to use typedef for structures and pointers. Besides, using typedef for structures is annoying when you try to make headers self-contained. Let's say you have the following function declaration in a header: void foo(bd_t *bd); This is not self-contained since bd_t is not defined. To tell the compiler what 'bd_t' is, you need to include <asm/u-boot.h> #include <asm/u-boot.h> void foo(bd_t *bd); Then, the include direcective pulls in more bloat needlessly. If you use 'struct bd_info' instead, it is enough to put a forward declaration as follows: struct bd_info; void foo(struct bd_info *bd); Right, typedef'ing bd_t is a mistake. I used coccinelle to generate this commit. The semantic patch that makes this change is as follows: <smpl> @@ typedef bd_t; @@ -bd_t +struct bd_info </smpl> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-05-18common: Drop linux/delay.h from common headerSimon Glass1-0/+1
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18common: Drop init.h from common headerSimon Glass1-0/+1
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18common: Drop net.h from common headerSimon Glass2-0/+3
Move this header out of the common header. Network support is used in quite a few places but it still does not warrant blanket inclusion. Note that this net.h header itself has quite a lot in it. It could be split into the driver-mode support, functions, structures, checksumming, etc. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-30MAINTAINERS: board: qcom: db820c: update emailJorge Ramirez-Ortiz1-1/+1
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
2020-01-17common: Move reset_cpu() to the CPU headerSimon Glass2-0/+2
Move this function out of common.h and into a relevant header file. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-12-02common: Move some board functions out of common.hSimon Glass1-0/+1
A number of board function belong in init.h with the others. Move them. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-08-11env: Drop environment.h header file where not neededSimon Glass1-1/+0
This header file is now only used by files that access internal environment features. Drop it from various places where it is not needed. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2019-08-11env: Move env_set() to env.hSimon Glass2-0/+2
Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2019-06-14MAINTAINERS: change Ramon Fried email addressRamon Fried1-1/+1
Change my email address, too many mails gets to my private mail, created specific email account just for developmement. Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
2018-12-03MAINTAINERS: board: qcom: db820c: update email.Jorge Ramirez-Ortiz1-1/+1
Update email address Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
2018-09-30db410c: automatically launch fastbootRamon Fried1-1/+2
If during boot the key-vol-down press is detected we'll fall back to fastboot. Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
2018-09-30db410c: serial# env using msm board serialRamon Fried1-0/+10
The serial# environment variable needs to be defined so it will be used by fastboot as serial for the endpoint descriptor. Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
2018-09-30ehci: Replace board_prepare_usb with board_usb_initRamon Fried1-2/+2
Use standard board_usb_init() instead of the specific board_prepare_usb. Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
2018-08-13db410: alter WLAN/BT MAC address fixupRamon Fried1-27/+27
Change the way MAC address fixup is done: 1. Stop using LK handed device-tree and calculate the MAC address our own. 2. Allow overriding the generated MACS with environment variables: "wlanaddr" and "btaddr". Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
2018-08-10db410c: Fixup DRAMRamon Fried1-0/+3
Call the MSM DRAM detection and fixup function to support dynamic detection of onboard memory. Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
2018-07-25efi_loader: Rename sections to allow for implicit dataAlexander Graf2-11/+30
Some times gcc may generate data that is then used within code that may be part of an efi runtime section. That data could be jump tables, constants or strings. In order to make sure we catch these, we need to ensure that gcc emits them into a section that we can relocate together with all the other efi runtime bits. This only works if the -ffunction-sections and -fdata-sections flags are passed and the efi runtime functions are in a section that starts with ".text". Up to now we had all efi runtime bits in sections that did not interfere with the normal section naming scheme, but this forces us to do so. Hence we need to move the efi_loader text/data/rodata sections before the global *(.text*) catch-all section. With this patch in place, we should hopefully have an easier time to extend the efi runtime functionality in the future. Signed-off-by: Alexander Graf <agraf@suse.de> [agraf: Fix x86_64 breakage]
2018-06-04MAINTAINERS: Take over DB410c maintainershipRamon Fried1-1/+1
Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini11-26/+11
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-02-04MAINTAINERS: board: qcom: db410c, db820c: update email.Jorge Ramirez-Ortiz2-2/+2
Update email address. Signed-off-by: Jorge Ramirez-Ortiz <jramirez@baylibre.com>
2018-01-15db410c: use the device tree parsed by the lk loader.Jorge Ramirez-Ortiz1-28/+40
We dont need to keep copies of the properties that we are going to fixup since we will be using the dtb provided by the firmware. Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
2018-01-15db410c: replace reset driver with psciJorge Ramirez-Ortiz1-0/+5
this should be the norm for armv8 platforms. Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
2018-01-15db410c: update wlan and bt mac addresses from firmwareJorge Ramirez-Ortiz3-6/+72
The firmware that runs before u-boot modifies u-boot's device tree adding the local-mac-address and local-bd-address properties for the compatibles "qcom,wcnss-bt" and "qcom,wcnss-wlan". This commit reads that firmware, retrieves the properties and fixups the device tree that is passed to the kernel before booting. Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
2018-01-15db820c: stop autoboot when vol- pressedJorge Ramirez-Ortiz1-1/+37
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
2018-01-15db820c: add qualcomm dragonboard 820C supportJorge Ramirez-Ortiz7-0/+755
This commit adds support for 96Boards Dragonboard820C. The board is based on APQ8086 Qualcomm Soc, complying with the 96Boards specification. Features - 4x Kyro CPU (64 bit) up to 2.15GHz - USB2.0 - USB3.0 - ISP - Qualcomm Hexagon DSP - SD 3.0 (UHS-I) - UFS 2.0 - Qualcomm Adreno 530 GPU - GPS - BT 4.2 - Wi-Fi 2.4GHz, 5GHz (802.11ac) - PCIe 2.0 - MIPI-CSI, MIPI-DSI - I2S U-Boot boots chained from LK (LK implements the fastboot protocol) in 64-bit mode. For detailed build instructions see readme.txt in the board directory. Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
2017-09-11MAINTAINERS: board: qcom: db410c: Maintainer changedJorge Ramirez-Ortiz1-1/+1
Replacing original author Mateusz Kulikowski <mateusz.kulikowski@gmail.com> as db410c maintainer Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
2017-08-16env: Rename setenv() to env_set()Simon Glass1-1/+1
We are now using an env_ prefix for environment functions. Rename setenv() for consistency. Also add function comments in common.h. Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-23board/db410c: add missing linker map entries for efiRob Clark1-0/+16
Otherwise the loaded image would miss the efi_runtime sections, and fall over hard when grub (for example) tried to call runtime services located in this section. Signed-off-by: Rob Clark <robdclark@gmail.com>
2017-06-01dm: gpio: Add live tree supportSimon Glass1-6/+6
Add support for requesting GPIOs with a live device tree. This involves adjusting the function signature for the legacy function gpio_request_by_name_nodev(), so fix up all callers. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes to stm32f746-disco.c: Signed-off-by: Tom Rini <trini@konsulko.com>
2017-04-05board_f: Drop setup_dram_config() wrapperSimon Glass1-1/+3
By making dram_init_banksize() return an error code we can drop the wrapper. Adjust this and clean up all implementations. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
2017-02-08dm: core: Replace of_offset with accessorSimon Glass1-3/+6
At present devices use a simple integer offset to record the device tree node associated with the device. In preparation for supporting a live device tree, which uses a node pointer instead, refactor existing code to access this field through an inline function. Signed-off-by: Simon Glass <sjg@chromium.org>
2016-04-01board: Add Qualcomm Dragonboard 410C supportMateusz Kulikowski7-0/+355
This commit add support for 96Boards Dragonboard410C. It is board based on APQ8016 Qualcomm SoC, complying with 96boards specification. Features (present out of the box): - 4x Cortex A53 (ARMv8) - 2x USB Host port - 1x USB Device port - 4x LEDs - 1x HDMI connector - 1x uSD connector - 3x buttons (Power, Vol+, Vol-/Reset) - WIFI, Bluetooth with integrated antenna - 8GiB eMMC U-Boot boots chained with fastboot in 64-bit mode. For detailed build instructions see readme.txt in board directory. Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Tested-by: Simon Glass <sjg@chromium.org>