- Mar 04, 2024
-
-
Some boards that choose to utilize the OF_UPSTREAM directory for their device tree files will need to specify that directory instead of the traditional arch/$(ARCH)/dts/* path. Include the correct path to the board's dtbs depending on if OF_UPSTREAM is selected or not. Signed-off-by:
Bryan Brattlof <bb@ti.com> Signed-off-by:
Sumit Garg <sumit.garg@linaro.org> Tested-by:
Fabio Estevam <festevam@gmail.com>
-
- Mar 01, 2024
-
-
https://source.denx.de/u-boot/custodians/u-boot-snapdragonTom Rini authored
- Reworks Qualcomm support to be more generic, dropping board specific build targets and relying on DT as the only source of truth - Switches all Qualcomm devices to use upstream devicetree
-
Caleb Connolly authored
When U-Boot as running as the first stage bootloader on MSM8916 devices, early debug UART requires turning on the clocks (for some reason the pre-loader turns them off?!). To simplify developing for this platform, allow the apq8016_clk_init_uart() function to be called externally. Developers can call this from the serial_msm debug uart driver to configure the clocks before the driver model is available. As it is only possible to enable early debug UART in custom builds of U-Boot, this solution at least gives developers the option. Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
Add drivers and DTS files, as well as regex matches for qcom/qualcomm/snapdragon. Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
Drop the U-Boot specific DTS in favour of upstream. We'll only include the -4000 variant as that is what U-Boot already supported. Taken from kernel tag v6.7 Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
Import the headers needed for QCS404-evb. Taken from kernel tag v6.7 Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
Drop the U-Boot specific dragonboard820c.dts file in favour of the upstream apq8096-db820c.dts and an additional -u-boot.dtsi with the U-Boot specific additions. Taken from kernel tag v6.7 Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
Don't use hardcoded clock IDs, use the IDs from the dt-bindings to be compatible with upstream. Taken from kernel tag v6.7 Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
Import PM8994 and PMI8994 DTSI files in preparation for switching MSM8996 boards to upstream DTS. Taken from kernel tag v6.7 Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
Import dt-binding headers for MSM8996/APQ8096 from Linux. Taken from kernel tag v6.7 Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
Drop the U-Boot specific dragonboard410c.dts in favour of the upstream msm8916-sbc.dts. No additional changes are needed to this DTS for U-Boot support. Taken from kernel tag v6.7 Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
Import the supporting pm8916.dtsi and msm8916-pm8916.dtsi files from upstream in preparation for switching boards over. Taken from kernel tag v6.7 Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
Import the dt-bindings headers in preparation for switching to upstream DTS for MSM8916. Taken from kernel tag v6.7 Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
Import sdm845.dtsi from upstream, as well as the upstream DTS files for the db845c and Samsung starqltechn. Delete the old board files. Taken from kernel tag v6.7 Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
Import the PM8998 and PMI8998 PMIC DTSI files from Linux as well as the common audio codec in preperation for replacing board DTS files with upstream. Taken from kernel tag v6.7 Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
Import the DT bindings headers that are used by SDM845 from Linux. Taken from kernel tag v6.7 Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
The MSM8916/APQ8016 Technical Reference Manual is publicly available and contains a lot of useful register maps for many core parts of the SoC. Include an archive.org link to it in the dragonboard410c documentation. Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
Replace the board specific docs with a generic board.rst file which documents the build/boot process for the sdm845 and qcs404 boards now that the only differences are the DTB in use. At the same time, create a debugging page to document some useful snippets and tips for working with Qualcomm platforms. Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
This board is entirely supported by the generic arch code and DTS. The board code used to handle turning on the vbus regulator, however this is now handled via DT. With this, the board specific defconfig is also no longer needed, so drop it as well. Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Tested-by: Sumit Garg <sumit.garg@linaro.org> #qcs404 Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
On Qualcomm platforms, the TZ may already have certain memory regions under protection by the time U-Boot starts. There is a rare case on some platforms where the prefetcher might speculatively access one of these regions resulting in a board crash (TZ traps and then resets the board). We shouldn't be accessing these regions from within U-Boot anyway, so let's mark them all with PTE_TYPE_FAULT to prevent any speculative access and correctly trap in EL1 rather than EL3. Some lower level FDT functions are used here relying on some assumptions about how Qualcomm devicetrees are laid out (#address/size-cells being 2 for reserved-memory), as this is the only way to make this acceptably fast enough with dcache off. The full fat implementation takes 1800ms on SDM845, the implementation in this patch takes <1. Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Tested-by: Sumit Garg <sumit.garg@linaro.org> #qcs404 Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
With just a few basic rules, we can generate the $fdtfile environment variable to match the format used in Linux. This uses the root compatible property inside u-boot, with specific handling for the Dragonboard845c which is a special case, and for the qrb robotics boards. This is known to work on supported platforms, and lets us avoid having a big lookup table. Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Tested-by: Sumit Garg <sumit.garg@linaro.org> #qcs404 Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
Heavily inspired by Apple board code. Use the LMB allocator to configure load addresses at runtime, and implement a lookup table for selecting a devicetree. As some Qualcomm RBx boards have different RAM capacities and base addresses, it isn't possible to hardcode these regions. Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Tested-by: Sumit Garg <sumit.garg@linaro.org> #qcs404 Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
Historically, Qualcomm boards have relied on heavy hardcoding in U-Boot, in many cases to the specific SoC but also to the board itself (e.g. memory map). This has been largely resolved by modernising the Qualcomm drivers in U-Boot, however the board code still largely follows this model. This patch removes the board specific memory maps and duplicated board init code, replacing it with generic init code. The memory map is now built at runtime based on data read from DT, this allows for the memory map to be provided without having to recompile U-Boot. Support is also added for booting with appended DTBs, so that the first-stage bootloader can populate the memory map for us. The sdm845 specific init code is dropped entirely, it set an environment variable depending on if a button was pressed, but this variable wasn't used in U-Boot, and could be written to use the button command instead. The KASLR detection is also dropped as with appended dtb, the kaslr seed can be read directly from the DTB passed to U-Boot. A new qcom_defconfig is added, with the aim of providing a generic U-Boot configuration that will work on as many Qualcomm boards as possible. It replaces the defconfig files for the Dragonboard 845c, Galaxy S9, and QCS404 EVB. For now the db410c and 820c are excluded as they still have some board code left. Similarly, the config headers for db845c, starqltechn, and qcs404-evb are replaced by a single qcom header. The previously db410c-specific board_usb_init() function is made to be generic and is added to mach-snapdragon. While we lack proper modelling for USB configuration, using a well-known named pinctrl state is a reasonably generic middleground, and works using upstream DT. This function will do nothing unless the USB node has a pinctrl state named "device", in which case it will be set when entering USB peripheral mode. Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Tested-by: Sumit Garg <sumit.garg@linaro.org> #qcs404 Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
db820c predated support for prepending the kernel image header automatically, drop it's custom linker script and head.S in favour of this generic support. Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Tested-by: Sumit Garg <sumit.garg@linaro.org> #qcs404 Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
Some of the db410c board support code was written to be generic and placed in mach-snapdragon. However, as the db410c is the only board using this, move the code out of mach-snapdragon. This makes is more obvious what code is relevant for which targets and helps tidy things up a little more. Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Tested-by: Sumit Garg <sumit.garg@linaro.org> #qcs404 Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
Use the root compatible strings from upstream Linux, add missing '#clock-cells' property to the gcc node. Adjust some of the msm8916/apq8016 drivers to use the correct upstream compatible properties and DT bindings. This prepares us to switch to upstream DT in a future patch. Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Tested-by: Sumit Garg <sumit.garg@linaro.org> #qcs404 Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
Add a config fragment for building U-Boot such that it can be chainloaded by aboot/LK rather than being flashed directly to the aboot partition. Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Tested-by: Sumit Garg <sumit.garg@linaro.org> #qcs404 Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
On the DB410c we support running as a first stage bootloader. This requires initialising the GPIOs which are muxed to UART before they can be used. Add DM_FLAG_PRE_RELOC to the apq8016 pinctrl driver to ensure that we do this early enough. This is required to prevent the first few lines of UART log from being dropped. Reported-by:
Sumit Garg <sumit.garg@linaro.org> Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Tested-by: Sumit Garg <sumit.garg@linaro.org> #qcs404 Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
Upstream devicetrees label GPIOs with "gpioX", not "GPIO_X", fix this for SoCs where we're now using upstream DT. Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Tested-by: Sumit Garg <sumit.garg@linaro.org> #qcs404 Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
Most platforms have a handful of "special" GPIOs, like the MMC clock/data lanes, UFS reset, etc. These don't follow the usual naming scheme of "gpioX" and also have unique capabilities and registers. We can get away without supporting them all for now, but DT compatibility is still an issue. Add support for allowing these to be specified after the other pins, and make all pinmux/pinconf calls for them nop. Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Tested-by: Sumit Garg <sumit.garg@linaro.org> #qcs404 Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
Adjust the DT to match upstream bindings. Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
Introduce a basic pinctrl driver for the SPMI PMIC GPIOs. This is necessary to make proper use of upstream DT bindings specifically on the dragonboard410c where they're used to switch between USB host and device modes. Only support for driving the pins as output low or high is enabled for now. To minimise duplicated code and allow for sharing common DT data, the pinctrl driver is initialised as a child of the existing GPIO driver. Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Tested-by: Sumit Garg <sumit.garg@linaro.org> #qcs404 Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
Some platforms hard reset when attempting to configure PMIC GPIOs. Add support for quirks specified in match data with a single quirk to skip this configuration. We rely on the GPIO already be configured correctly, which is always the case for volume up (the only current user of these GPIOs). This is not expected behaviour but appears to be due to a U-Boot specific bug. This quirk at least allows for the volume buttons to be used on platforms where this bug is apparent. Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
Qualcomm PMICs number their GPIOs starting from 1, implement a custom .xlate method to handle this. Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Tested-by: Sumit Garg <sumit.garg@linaro.org> #qcs404 Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
Use the modern helpers to fetch the clock and use the correct property ("clocks" instead of "clock"). Drop the call to pinctrl_select_state() as no boards have a "uart" pinctrl state and this prints confusing errors. Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Tested-by: Sumit Garg <sumit.garg@linaro.org> #qcs404 Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
Introduce support for early debugging. This relies on the previous stage bootloader to initialise the UART clocks, when running with U-Boot as the primary bootloader this feature doesn't work. It will require a way to configure the clocks before the driver model is available. Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
We should be returning the rate that we set the clock to, drivers like MMC rely on this. So fix it. Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Tested-by: Sumit Garg <sumit.garg@linaro.org> #qcs404 Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
Adjust the apq8016 and apq8096 drivers to use the upstream compatible properties, and adjust the associated dts files in U-Boot. Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Tested-by: Sumit Garg <sumit.garg@linaro.org> #qcs404 Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
The upstream DT is supported here, so drop the U-Boot specific binding docs. Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Caleb Connolly authored
Use the clk_* helper functions and the correct property name for clocks. Reviewed-by:
Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by:
Sumit Garg <sumit.garg@linaro.org> Tested-by: Sumit Garg <sumit.garg@linaro.org> #qcs404 Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-