summaryrefslogtreecommitdiff
path: root/arch
AgeCommit message (Collapse)Author
2022-12-07FROMLIST: BACKPORT: rockchip: puma-rk3399: sync DTS with Linux kernel ↵Quentin Schulz
next-20221114 This synchronizes the Device Trees related to Puma RK3399 SoM with Linux kernel next-20221114 to include two important changes pertaining to eMMC and SD card instability. Cc: Quentin Schulz <foss+uboot@0leil.net> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Link: https://lore.kernel.org/r/20221115-puma-dts-sync-v1-0-5699a835bab2@theobroma-systems.com [straightforward conflict resolution due to commit 57156aef3ee7 ("TSD: arm64: dts: rockchip: lower rk3399-puma-haikou SD controller clock frequency")] Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
2022-10-25FROMLIST: rockchip: puma: fix GPT table corruption when saving U-Boot ↵Quentin Schulz
environment The GPT table is taking the first 34 sectors, which amounts to 0x4400 bytes. Saving the environment below this address in storage will corrupt the GPT table. While technically the table ends at 0x4400, some tools (e.g. bmaptool) are rounding everything to the logical block size (0x1000), so it is safer to make it point to 0x5000 so that the environment could still persist when flashing a sparse image with bmaptool or similar tools. Obviously, the default 0x4000 environment size does not work anymore, so let's set it to 0x3000 so it does fill the gap between the GPT table (rounded to 0x1000) and the start of the idbloader.img. Fixes: 56f580d3eb8d ("rockchip: dts: rk3399-puma: put environment (in MMC/SD configurations) before SPL") Cc: Quentin Schulz <foss+uboot@0leil.net> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Link: https://lore.kernel.org/r/20221025-upstream-puma-mmc-env-gpt-v1-0-edde14ec26bc@theobroma-systems.com Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
2022-10-19TSD: arm64: dts: rockchip: lower rk3399-puma-haikou SD controller clock ↵Jakob Unterwurzacher
frequency CRC errors (code -84 EILSEQ) have been observed for some SanDisk Ultra A1 cards when running at 50MHz. Waveform analysis suggest that the level shifters that are used on the RK3399-Q7 module for voltage translation between 3.0 and 3.3V don't handle clock rates at or above 48MHz properly. Back off to 40MHz for some safety margin. [TSD] Sent to Linux kernel first (see link), will be synced by upstream U-Boot once merged. Signed-off-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Link: https://lore.kernel.org/lkml/20221019-upstream-puma-sd-40mhz-v1-0-754a76421518@theobroma-systems.com/ Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
2022-10-19FROMLIST: rockchip: puma-rk3399: migrate to u-boot-rockchip-spi.binQuentin Schulz
Now that a single binary containing TPL/SPL correctly formatted for SPI flashes and U-Boot proper, can be generated by binman, let's do it. Also update the documentation to tell the user to use this newly generated file instead of manually generating and flashing the binaries. Cc: Quentin Schulz <foss+uboot@0leil.net> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Link: https://lore.kernel.org/r/20220915091432.789294-13-foss+uboot@0leil.net Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
2022-10-19FROMLIST: rockchip: puma-rk3399: migrate to u-boot-rockchip.binQuentin Schulz
The offset of the SPL payload on Puma is different than for other Rockchip devices in that it is stored at offset 256K instead of much further away in the MMC. Flashing one binary instead of two at different offsets is much more user friendly so let's migrate to it by modifying the offset in the Puma specific Device Tree. Cc: Quentin Schulz <foss+uboot@0leil.net> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Link: https://lore.kernel.org/r/20220915091432.789294-11-foss+uboot@0leil.net Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
2022-10-19FROMLIST: rockchip: puma-rk3399: migrate to TPLQuentin Schulz
Depending on the toolchain used to compile the SPL for Puma RK3399-Q7 module, the board does not boot because the resulting binary is too big to fit in SRAM. Let's add a TPL so that there's no need to fiddle with or hack the defconfig to have a working bootloader. This follows what's been done for the majority of other RK3399-based boards. See the original commit for the first migrations: bdc00080111f "rockchip: rk3399: update defconfig for TPL" Unfortunately, the offset in SPI-NOR for U-Boot proper needs to be modified, since the move from SPL to TPL+SPL for idbloader.img (and the "only the first 2KB per 4KB blocks are written" "hack" for rkspi format) increased the size above 256KB. Let's move it to 512KB to, hopefully, be safe. Cc: Quentin Schulz <foss+uboot@0leil.net> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Link: https://lore.kernel.org/r/20220915091432.789294-10-foss+uboot@0leil.net Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
2022-10-19FROMLIST: rockchip: puma-rk3399: allow non-SD-Card-loaded SPL to load U-Boot ↵Quentin Schulz
proper from SD-Card Trying to load U-Boot proper from SPL when SPL was not loaded from SD-Card is currently not working because the SDMMC pins aren't muxed correctly. It is assumed the BootROM is doing this for us when booting from SD-Card hence why it's not needed when booting TPL/SPL from SD-Card. The pinctrl properties are removed from the SPL DT property removal list and the pinctrl configuration nodes made available in the SPL DT, in addition to the pull-up configurations to allow loading U-Boot proper from SD-Card as a fallback mechanism for SPI-NOR and eMMC. Cc: Quentin Schulz <foss+uboot@0leil.net> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Link: https://lore.kernel.org/r/20220915091432.789294-4-foss+uboot@0leil.net Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
2022-10-19FROMLIST: rockchip: puma-rk3399: use gpio-hog instead of fixed-regulator for ↵Quentin Schulz
enabling eMMC/SPI-NOR On Haikou devkit, it is possible to disable eMMC and SPI-NOR to force booting from SD card or USB via rkdeveloptool by toggling a switch. This switch needs to be overridden in software to be able to access eMMC and SPI-NOR once the device has booted from SD Card. Puma SoM can override this pin via gpio3_d5. Until now, fixed regulator device was abused to model this, but since there's now support for GPIO hogs, let's use it. Since we want to be able to boot the SPL from SD Card but give it the ability to load U-Boot proper from a fallback medium such as eMMC and SPI-NOR, SPL support for GPIO hogs needs to be enabled too. Support for other kinds of regulators are not needed anymore, so let's disable them. Cc: Quentin Schulz <foss+uboot@0leil.net> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Link: https://lore.kernel.org/r/20220915091432.789294-3-foss+uboot@0leil.net Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
2022-10-03imx8mn-ddr4-evk-u-boot: Fix broken bootFabio Estevam
When the imx8mn.dtsi file was pulled in from Linux, the UARTs were moved into an spba sub-node which wasn't being included in the SPL device tree. This meant the references to the UART weren't being handled properly and when booting the system would constantly reboot. Fix this by adding the spba node to the spl device tree to restore normal booting. Based on the patch from Adam Ford for the imx8mn-beacon-kit-u-boot board. Fixes: 4e5114daf9eb ("imx8mn: synchronise device tree with linux") Signed-off-by: Fabio Estevam <festevam@denx.de>
2022-10-03imx8mn-venice-u-boot: Fix broken bootFabio Estevam
When the imx8mn.dtsi file was pulled in from Linux, the UARTs were moved into an spba sub-node which wasn't being included in the SPL device tree. This meant the references to the UART weren't being handled properly and when booting the system would constantly reboot. Fix this by adding the spba node to the spl device tree to restore normal booting. Based on the patch from Adam Ford for the imx8mn-beacon-kit-u-boot board. Fixes: 4e5114daf9eb ("imx8mn: synchronise device tree with linux") Signed-off-by: Fabio Estevam <festevam@denx.de>
2022-09-20ARM: imx: Deduplicate i.MX8M SNVS LPGPR unlockMarek Vasut
Pull this LPGPR unlock into common code, since it is used in multiple systems already. Signed-off-by: Marek Vasut <marex@denx.de>
2022-09-20arm: dts: imx8mm-venice-gw7901: add dsa phy handles to u-boot dtsiTim Harvey
The upstream Linux DSA drivers do not require phy-handle nodes in the DSA ports yet the U-Boot DSA drivers do. Add a phy-handle and the mdio nodes to the u-boot.dtsi file so that future dts file syncrhonization between Linux and U-Boot don't break networking. Fixes: 24a7a3c1c042 ("imx8mm: synchronise device tree with linux") Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2022-09-20arm: dts: imx8mp-venice-gw74xx: add dsa phy handles to u-boot dtsiTim Harvey
The upstream Linux DSA drivers do not require phy-handle nodes in the DSA ports yet the U-Boot DSA drivers do. Add a phy-handle and the mdio nodes to the u-boot.dtsi file so that future dts file syncrhonization between Linux and U-Boot don't break networking. Fixes: e0caa84ca685 ("imx8mp: synchronise device tree with linux") Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2022-09-19Merge tag 'u-boot-imx-20220919' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-imx u-boot-imx-20220919 ------------------- CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/13500 - Fix imx8mn-beacon-kit-u-boot - Merged Purism - imxrt1170 (already merged in u-boot-imx) - Fixes in crypto FSL - Toradex : fixes Verdin - Serial Driver: fixes when not used as console - DH Boards : fixes + USB - Fix CONFIG_SYS_MALLOC_F_LEN (Kconfig) - Add imx6ulz_smm_m2
2022-09-19powerpc: mpc85xx: Fix incorrect application of patchMarek Behún
I messed up application of patch 5a428e751044 ("mmc: fsl_esdhc_spl: Add support for builds without CONFIG_SYS_MMC_U_BOOT_OFFS"). I took it from a work-in-progress branch where I changed usage of CONFIG_SDCARD to CONFIG_SD_BOOT and refactored SYS_MPC85XX_NO_RESETVEC mess. But these changes aren't in master yet. Fix the wrong usage of these macros. Fixes: 5a428e751044 ("mmc: fsl_esdhc_spl: Add support for builds without CONFIG_SYS_MMC_U_BOOT_OFFS") Signed-off-by: Marek Behún <kabel@kernel.org> Reviewed-by: Pali Rohár <pali@kernel.org>
2022-09-18bsh: imx6ulz_smm_m2: Add imx6ulz BSH SMM M2 boardsMichael Trimarchi
Introduce BSH SystemMaster (SMM) M2 board family, which consists of: imx6ulz SMM M2 and imx6ulz SMM M2 PRO boards. Add support for imx6ulz BSH SMM M2 board: - 128 MiB DDR3 RAM - 256MiB Nand - USBOTG1 peripheral - fastboot. Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Reviewed-by: Fabio Estevam <festevam@denx.de>
2022-09-18board: purism: add the Purism Librem5 phoneAngus Ainslie
Initial commit of Librem5 u-boot and SPL Signed-off-by: Angus Ainslie <angus@akkea.ca> Co-developed-by: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm> Signed-off-by: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm> Reviewed-by: Fabio Estevam <festevam@denx.de>
2022-09-18ARM: dts: imx: Fix I2C5 GPIO assignment on i.MX8M Plus DHCOMMarek Vasut
Fix copy-paste error of the I2C5 bus recovery GPIO assignment, the I2C5 GPIOs are on gpio3 instead of gpio5. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <festevam@denx.de> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: uboot-imx <uboot-imx@nxp.com>
2022-09-18ARM: dts: imx: Adjust ECSPI1 pinmux on i.MX8M Plus DHCOMMarek Vasut
The ECSPI1 is on I2C1/I2C2 pins of the SoC, update the pinmux accordingly. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <festevam@denx.de> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: uboot-imx <uboot-imx@nxp.com>
2022-09-18ARM: dts: imx: Rename imx8mp-dhcom{-pdk2,}-boot.dtsiMarek Vasut
Rename imx8mp-dhcom-pdk2-u-boot.dtsi to imx8mp-dhcom-u-boot.dtsi, since this file is shared by PDK2, PicoITX and DRC02. No functional change. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <festevam@denx.de> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: uboot-imx <uboot-imx@nxp.com>
2022-09-18ARM: dts: imx: Add SoM compatible to i.MX8M Plus DHCOM PDK2Marek Vasut
Add SoM compatible string into i.MX8MP DHCOM PDK2 compatible strings. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <festevam@denx.de> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: uboot-imx <uboot-imx@nxp.com>
2022-09-18ARM: dts: imx: Drop Atheros PHY header from i.MX8M Plus DHCOM PDK2Marek Vasut
This PHY is not used on PDK2, the header was added due to copy-paste error, drop it. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <festevam@denx.de> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: uboot-imx <uboot-imx@nxp.com>
2022-09-18ARM: dts: imx: Add HW variant details to i.MX8M Plus DHCOM PDK2Marek Vasut
Add information about which exact SoM variant is used on which PDK2 variant. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <festevam@denx.de> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: uboot-imx <uboot-imx@nxp.com>
2022-09-18arm: dts: imx8mn-beacon-kit-u-boot: Fix broken bootingAdam Ford
When the imx8mm.dtsi file was pulled in from Linux, the UARTs were moved into an spba sub-node which wasn't being included in the SPL device tree. This meant the references to the UART weren't being handled properly and when booting the system would constantly reboot. Fix this by adding the spba node to the spl device tree to restore normal booting. Fixes: 4e5114daf9eb ("imx8mn: synchronise device tree with linux") Signed-off-by: Adam Ford <aford173@gmail.com>
2022-09-18imx: romapi: fix spurious ampersand in address printMarcel Ziswiler
Fix spurious ampersand in address print e.g. Find img info 0x&480331a0, size 855 Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>"
2022-09-18ARM: dts: imx: add i.MXRT1170-EVK supportJesse Taube
The NXP i.MXRT1170 Evaluation Kit (EVK) provides a platform for rapid evaluation of the i.MXRT, which features NXP's implementation of the Arm Cortex-M7 and Cortex-M4 core. The EVK provides 64 MB SDRAM, Micro SD card socket, USB 2.0 OTG. This patch aims to support the preliminary booting up features as follows: GPIO LPUART SD/MMC SDRAM Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
2022-09-18ARM: dts: imxrt11170-pinfunc: Add pinctrl binding headerJesse Taube
Add binding header for i.MXRT1170 pinctrl device tree. Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
2022-09-18imx: imxrt1170-evk: Add support for the NXP i.MXRT1170-EVKJesse Taube
This commit adds board support for i.MXRT1170-EVK from NXP. This board is an evaluation kit provided by NXP for i.MXRT117x processor family. Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
2022-09-16mmc: fsl_esdhc_spl: Add support for builds without CONFIG_SYS_MMC_U_BOOT_OFFSPali Rohár
When fixed offset via CONFIG_SYS_MMC_U_BOOT_OFFS is not specified then expects that U-Boot proper is placed immediately after SPL without any additional padding. This allows to generate smaller SPL+U-Boot final binary as it is not required to specify fixed offset to U-Boot proper at SPL compile time. In this case offset to U-Boot proper is calculated at SPL compile time in linker script. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Marek Behún <kabel@kernel.org>
2022-09-16powerpc: mpc85xx: Fix loading U-Boot proper from SD card in SPLPali Rohár
Change 8-byte alignment of SPL binary to just 4-byte alignment as objcopy trims trailing zero bytes when converting ELF file to RAW binary. This is same fix for SPL linker script as was done fix for U-Boot linker script in commit e8c0e0064c8a ("powerpc: mpc85xx: Fix CONFIG_OF_SEPARATE support"). It is required for the patch "mmc: fsl_esdhc_spl: Add support for builds without CONFIG_SYS_MMC_U_BOOT_OFFS" which triggered this issue in SPL. Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Marek Behún <kabel@kernel.org>
2022-09-16powerpc: mpc85xx: Fix check for CONFIG_SDCARDMarek Behún
Commit d433c74eecdc ("Convert CONFIG_SDCARD et al to Kconfig") converted SYS_EXTRA_OPTIONS=SDCARD or SPIFLASH to config options CONFIG_SDCARD and CONFIG_SPIFLASH, but left one occurance unchanged. Fix this. Fixes: d433c74eecdc ("Convert CONFIG_SDCARD et al to Kconfig") Signed-off-by: Marek Behún <kabel@kernel.org> Reviewed-by: Pali Rohár <pali@kernel.org>
2022-09-16Makefile: Reduce usage of custom mpc85xx u-boot.bin targetPali Rohár
Building of final u-boot.bin binary for mpc85xx via binman is needed only when inserting DTB binary in the middle of the u-boot ELF binary (before .bootpg and .resetvec ELF sections). These requirements are met when CONFIG_MPC85XX_HAVE_RESET_VECTOR is enabled (= generating .bootpg/.resetvec sections) and CONFIG_OF_SEPARATE is enabled (= inserting DTB binary). So in all other cases use standard build procedure instead of custom mpc85xx u-boot.bin Makefile target via binman. Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Marek Behún <kabel@kernel.org>
2022-09-16Makefile: Build final mpc85xx non-SPL image in standard file u-boot.binPali Rohár
Currently Makefile produces final mpc85xx image when SPL is not used in custom file u-boot-with-dtb.bin. It is quite confusing name as build process produce also intermediate file standard file u-boot-dtb.bin (which is just intermediate and not bootable). Other platforms use u-boot.bin (UBOOT_BIN) as standard name for final bootable raw image. So change Makefile rules and binman to produce final bootable file for mpc85xx also into file u-boot.bin. There is just need for mpc85xx to not define default rule for u-boot.bin then instruct binman (via DTS file) to store final image into u-boot.bin (instead of u-boot-with-dtb.bin) and finally rename target u-boot-with-dtb.bin to u-boot.bin. With this change are also removed custom Makefile hacks for mpc85xx that it produced non-standard output file. And also updated documentation. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Marek Behún <kabel@kernel.org>
2022-09-13arm: mvebu: Fix moving internal registersPali Rohár
Commit 5bb2c550b11e ("arm: mvebu: Move internal registers in arch_very_early_init() function") moved code from file cpu.c to lowlevel.c, which moves Marvell internal registers from address INTREG_BASE_ADDR_REG to SOC_REGS_PHY_BASE. But the steps describing how to do it correctly were documented only in older U-Boot versions and commit cefd764222ee ("arm: mvebu: Fix internal register config on A38x") probably unintentionally removed important details about MMU from code comments around. Commit 5bb2c550b11e ("arm: mvebu: Move internal registers in arch_very_early_init() function") implemented code movement according to (now incomplete) comments which resulted in semi-broken code. The result is that I-cache is currently disabled for all Armada 38x boards and maybe there are some other (unreported / undetected) issues. Reimplement it correctly. First flush all caches, then disable MMU and L2 cache and then move Marvell internal registers. There is no need to explicitly disable I-cache. After this change lzmadec command with lzma image of 0x7000000 bytes is doing decompression just 5 seconds. Before this change it was 30 seconds. To make lowlevel.S code more readable, extend asm/pl310.h header file to be compatible with assembler and use macros from this file. Fixes: 5bb2c550b11e ("arm: mvebu: Move internal registers in arch_very_early_init() function") Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Marek Behún <kabel@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-09-13arm: mvebu: Enable L2 cache also on Armada 38xPali Rohár
For some unknown reason when L2 cache is disabled on Armada 385 then loadb, loadx and loady commands do not work with higher baudrates than 115200 (they just abort transfer) and lzmadec command with lzma image of size 0x7000000 (maybe even smaller, we tested this one) is doing decompression for more than 2 minutes. After enabling L2 cache decompression takes only 30s and loadb, loadx and loady are stable and working fine. git bisect identified problematic commit 3308933d2fe9 ("arm: mvebu: Avoid reading MVEBU_REG_PCIE_DEVID register too many times"). Before this commit above issues were not present. But investigation showed that above issue was possible to reproduce also by reverting that commit and forcing compiler to do inline optimization of mvebu_soc_family() function. Which seems that the root of this issue is in caches and position of instruction of segments. So currently it is unknown what is or was broken, but code movement, code inlining or other compiler optimization triggered it. Commit 3e5ce7ceeb94 ("arm: mvebu: Enable L2 cache on Armada XP") mentioned that enabling L2 cache on Armada XP improved performance and that Armada 38x has L2 disabled (which is default state) and if needed it has to be enabled in separate patch. As enabling L2 cache also improve performance on Armada 38x, enable it. Note that Aurora cache in no outer mode is available only on Armada XP, hence it is not touched for Armada 38x code. Fixes: 3308933d2fe9 ("arm: mvebu: Avoid reading MVEBU_REG_PCIE_DEVID register too many times") Reported-by: Marek Behún <kabel@kernel.org> Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Marek Behún <kabel@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-09-13arm: mvebu: lowlevel.S: Use CR_M from asm/system.hPali Rohár
Replace magic constant 1 when disabling MMU by macro CR_M from include header file asm/system.h. Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Marek Behún <kabel@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-09-13arm: mvebu: Guard non-AXP code by checking for AXPPali Rohár
Commit c86d53fd88df ("arm: mvebu: Don't disable cache at startup on Armada XP at all") introduced branch for non-AXP code which was guarded by A38X condition. Fix this issue by checking for AXP platform, not by A38X. Fixes: c86d53fd88df ("arm: mvebu: Don't disable cache at startup on Armada XP at all") Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Marek Behún <kabel@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-09-13arm: mvebu: Fix function enable_cachesPali Rohár
Commit 3308933d2fe9 ("arm: mvebu: Avoid reading MVEBU_REG_PCIE_DEVID register too many times") broke support for caches on all Armada SoCs. Before that commit there was code: if (mvebu_soc_family() != MVEBU_SOC_A375) { dcache_enable(); } And after that commit there is code: if (IS_ENABLED(CONFIG_ARMADA_375)) { dcache_enable(); } Comment above this code says that d-cache should be disabled on Armada 375. But new code inverted logic and broke Armada 375 and slowed down all other Armada SoCs (including A38x). Fix this issue by changing logic to: if (!IS_ENABLED(CONFIG_ARMADA_375)) { dcache_enable(); } Which matches behavior prior that commit. Fixes: 3308933d2fe9 ("arm: mvebu: Avoid reading MVEBU_REG_PCIE_DEVID register too many times") Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Marek Behún <kabel@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-09-13arm: mvebu: Mark constant data with const keywordPali Rohár
Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-09-08Merge tag 'u-boot-stm32-20220907' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-stm - simplify the STM32MP15x package parsing code - remove test on CONFIG_DM_REGULATOR in stm32mp1 board and enable CONFIG_DM_REGULATOR for stm32f769-disco - handle ck_usbo_48m clock provided by USBPHYC to fix the command 'usb start' after alignment with Linux kernel v5.19 DT (clocks = <&usbphyc>) - Fix SYS_HZ_CLOCK value for stih410-b2260 board - Switch STMM32MP15x DHSOM to FMC2 EBI driver - Remove hwlocks from pinctrl in STM32MP15x to avoid issue with kernel
2022-09-07ARMv8/sec_firmware: Convert to use fit_get_data_conf_propSean Anderson
This reduces sec_firmware_get_data to a single call to fit_get_data_conf_prop. I think sec_firmware_check_copy_loadable could also be converted, but it does not map as straightforwardly, so I have left it for a future cleanup. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2022-09-07ARMv8/sec_firmware: Remove SEC_FIRMWARE_FIT_CNF_NAMESean Anderson
The config to use for FIT images can be better specified by enabling CONFIG_MULTI_DTB_FIT and implementing board_fit_config_name_match. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2022-09-06ARM: dts: stm32mp15: remove hwlocks from pinctrlEtienne Carriere
Removes hwlocks properties from stm32mp151 pinctrl node. These locks could be used for other purpose, depending on board and software configuration hence do not enforce their use to protect pinctrl devices. This patch is an alignment with Linux device tree with v6.0 as the hwsem support wasn’t yet added in pincontrol in kernel. It avoids issues when the Linux kernel is started with the U-Boot device tree. Cc: Patrice Chotard <patrice.chotard@foss.st.com> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-09-06ARM: stm32: Switch DHSOM to FMC2 EBI driverMarek Vasut
Perform long overdue conversion of ad-hoc FMC2 EBI bus initialization to upstream FMC2 EBI driver. No functional change. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Patrice Chotard <patrice.chotard@foss.st.com> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-09-06Merge https://source.denx.de/u-boot/custodians/u-boot-riscvTom Rini
2022-09-06Merge tag 'fsl-qoriq-2022-9-6' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq Reset fixes for p1_p2_rdb_pc Fix use after free issue fix in fsl_enetc.c Fix for fsl ddr: make bank_addr_bits reflect actual bits sl28 board update
2022-09-06ARM: dts: stm32: Fix display-timings settings for stm32f746-discoPatrice Chotard
Since commit ef4ce6df3289 "video: stm32: stm32_ltdc: fix data enable polarity" The panel display output wasn't functional anymore. Device tree display-timings de-active property value must be updated to 1. Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-09-06stm32mp: simplify the STM32MP15x package parsing codePatrick Delaunay
Simplify the package parsing code for STM32MP15X as package can be affected with get_cpu_package() result. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2022-09-06board: freescale: p1_p2_rdb_pc: Turn off watchdog before resetPali Rohár
P1/P2 RDB boards have external max6370 watchdog connected to CPLD and this watchdog is not deactivated on board reset. So if it is active during board reset, it can trigger another reset when CPU is booting U-Boot. To prevent possible infinite reset loop caused by external watchdog, turn it off before reset. Do it via a new board_reset_prepare() callback which is called from do_reset() function before any reset sequence. Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2022-09-06board: freescale: p1_p2_rdb_pc: Avoid usage of CPLD's system reset registerPali Rohár
CPLD's system reset register is buggy and requires workaround in U-Boot. So use this kind of board reset only when there is no other reset option. Introduce a new board_reset_last() callback which is last-stage board-specific reset and implement CPLD's system reset in this new board_reset_last() callback instead of board_reset() callback. Fixes: 20fb58fc5a1c ("board: freescale: p1_p2_rdb_pc: Implement board_reset()") Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Peng Fan <peng.fan@nxp.com>