aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-07-29arm: mvebu: Fix compatible string for nand controllerPali Rohár5-5/+5
Linux kernel uses compatible string "marvell,armada370-nand-controller" for nand controllers on Armada 370/XP/38x. U-Boot currently uses mix of "marvell,armada370-nand" and "marvell,mvebu-pxa3xx-nand". So unify it and use just Linux kernel compatible string. Signed-off-by: Pali Rohár <pali@kernel.org> Acked-by: Michael Trimarchi <michael@amarulasolutions.com> Reviewed-by: Stefan Roese <sr@denx.de>
2022-07-29board: freescale: p1_p2_rdb_pc: Simplify SPL offset macrosPali Rohár1-6/+6
Now when CONFIG_SYS_TEXT_BASE has sane value, use it for calculation of other SPL offset values: CONFIG_SPL_MAX_SIZE, CONFIG_SYS_MMC_U_BOOT_* and CONFIG_SYS_SPI_FLASH_U_BOOT_* macros. No functional change. Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2022-07-29board: freescale: p1_p2_rdb_pc: Fix parsing inverted bits from boot input dataPali Rohár1-2/+4
On some boards upper 4 bits of i2c boot input data (register 0) are inverted. Information which bits are inverted is stored in register 2. So invert read input data back according to register 2 prior processing them. This fixes printing "rom_loc: value" line during booting. Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2022-07-29board: freescale: p1_p2_rdb_pc: Remove I-flag from second L2 SRAM mappingPali Rohár1-2/+2
U-Boot for initial L2 SRAM uses L2 memory-mapping mode and not L2 with locked lines. P2020 reference manual about L2 memory-mapping mode says: Accesses to memory-mapped SRAM are cacheable only in the corresponding e500 L1 caches. So there is no need to set Caching-Inhibit I-bit for second part of initial L2 SRAM mapping in TLB entry. Remove it. First part of initial L2 SRAM mapping already does not have I-bit set. For more details see also: https://lore.kernel.org/u-boot/20220508150844.qqxg452rs4wtf5bs@pali/ Signed-off-by: Pali Rohár <pali@kernel.org>
2022-07-29powerpc: mpc85xx: Add support for generating QorIQ pre-PBL eSDHC boot sectorPali Rohár4-0/+163
QorIQ U-Boot binary for SD card booting compiled during build process (either u-boot.bin or u-boot-with-spl.bin) cannot be directly loaded by QorIQ pre-PBL BootROM. Compiled U-Boot binary first needs to be processed by Freescale boot_format tool as described in doc/README.mpc85xx-sd-spi-boot BootROM requires that image on SD card must contain special boot sector. Implement support for generating this special boot sector directly in U-Boot start code. Boot sector needs to be at the beginning of the image, so when compiling only proper U-Boot without SPL then it needs to be in proper U-Boot. When compiling SPL with proper U-Boot then it needs to be only in SPL. Support can be enabled by a new config option FSL_PREPBL_ESDHC_BOOT_SECTOR. Via other two additional options FSL_PREPBL_ESDHC_BOOT_SECTOR_START and FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA it is possible to tune how final U-Boot image could be stored on the SD card. Signed-off-by: Pali Rohár <pali@kernel.org>
2022-07-29cmd: mvebu/bubt: Fix cmd main return value on errorPali Rohár1-5/+5
Negative return value from cmd main function cause U-Boot to print criplic error message: exit not allowed from main input shell. Set return value on error to 1. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-07-29cmd: mvebu/bubt: Add support for sha512 checksum validation for Armada 3700Pali Rohár2-0/+10
Armada 3700 BootROM supports also images with sha512 checksums and mox-imager tool [1] generates such bootable images. Without sha512 support U-Boot bubt command just prints error message: Error: Unsupported hash_algorithm_id = 64 Error: Image header verification failed This patch adds support for sha512 checksum validation for Armada 3700 images. With it bubt prints: Image checksum...OK! [1] - https://gitlab.nic.cz/turris/mox-boot-builder.git Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-07-29cmd: mvebu/bubt: Correctly propagate failure during tftp transportPali Rohár1-1/+4
net_loop() returns signed int type and negative value represents error. tftp_read_file() returns unsigned size_t type and zero value represents error. Casting signed negative value to unsigned size_t type cause losing information about error and bubt thinks that no error happened, and continue erasing SPI-NOR which cause malfunction device. Fix this issue by correctly propagating failure during tftp transport. With this change when there is no eth link, bubt does not erase SPI-NOR anymore. => bubt Burning U-Boot image "flash-image.bin" from "tftp" to "spi" ethernet@30000 Waiting for PHY auto negotiation to complete......... TIMEOUT ! ethernet@30000: No link. Error: Failed to read file flash-image.bin from tftp Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-07-29cmd: mvebu/bubt: Verify image type for all 32-bit Aramda SoCs and Armada 3700Pali Rohár1-26/+48
Current image type verification code is specific to 32-bit Armada SoCs but used only for Armada 38x. Implement image type verification for Armada 3700 and enable Armada 38x image verification for all 32-bit Armada SoCs. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-07-29arm: mvebu: turris_omnia: Add mcu node with gpio-controllerPali Rohár1-1/+8
This allows U-Boot to register new Turris Omnia MCU driver. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-07-29gpio: Add Turris Omnia MCU driverPali Rohár4-0/+318
This driver registers GPIO controller and allows U-Boot to control GPIO pins on MCU which is connected to Turris Omnia via i2c. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-07-29mvebu: pinctrl: apply SDHCI PHY config for A7KKonstantin Porotchkin1-1/+3
Current pin control driver applies SDHCI PHY MUX selection when board DT calls for eMMC function on MPP wires. However, for CP side eMMC, only the "armada-8k-cpm-pinctrl" compatibility string is taken into account, which causes CP-SDHCI on Armada-7K boards to fail. This patch adds "armada-7k-pinctrl" compatibility string handling for the CP-SDHCI PHY configuration case. Signed-off-by: Konstantin Porotchkin <kostap@marvell.com> Reviewed-by: Igal Liberman <igall@marvell.com> Reviewed-by: Stefan Roese <sr@denx.de>
2022-07-29arm64: a37xx: pinctrl: Implement get_pins_count, get_pin_name and ↵Pali Rohár1-0/+78
get_pin_muxing functions These functions are required for 'pinmux status -a' command to print current configuration of each MPP pin. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-07-29arm64: a37xx: pinctrl: Implement gpio_request_enable for gpio functionalityPali Rohár1-3/+47
To automatically enable GPIO functionality of some MPP pin, it is required to implement .gpio_request_enable and .gpio_disable_free callbacks in pinctrl driver and set .request and .rfree callbacks in GPIO driver to pinctrl_gpio_request / pinctrl_gpio_free functions. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-07-29arm64: a37xx: pinctrl: Add missing pinmuxes into the listPali Rohár1-1/+15
Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-07-29arm64: a37xx: pinctrl: Mark all functions and structures as staticPali Rohár1-4/+4
Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-07-29arm64: a37xx: pinctrl: Remove duplicate info->groups and info->ngroups fieldsPali Rohár1-13/+8
They are available in pin_data structure. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-07-29arm64: a37xx: pinctrl: Remove unused grp->pins fieldsPali Rohár1-15/+1
grp->pins is just filled and never used. Remove it. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-07-29arm: mvebu: turris_omnia: Enable a38x pinctrl and gpio supportPali Rohár1-1/+2
Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-07-28gpio: mvebu_gpio: Set bank name to mvebu%dPali Rohár1-2/+2
Currently bank name is just one alphabetical letter. Change it to mvebu and number. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-07-28gpio: mvebu_gpio: Read number of gpios from DTPali Rohár1-1/+1
Device tree property "ngpios" contains number of gpios. Use it when available. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-07-28gpio: mvebu_gpio: Add .request and .rfree methods for Armada 38xPali Rohár1-0/+5
To use particular pin GPIO, it needs to be first switched to GPIO by pinctrl. Use pinctrl_gpio_request() and pinctrl_gpio_free() for this purpose. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-07-28pinctrl: Add third argument label for pinctrl_gpio_request() functionPali Rohár3-3/+5
This change allows to use pinctrl_gpio_request() function as a direct pointer for dm_gpio_ops's .request callback. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-07-28arm: mvebu: Add gpio-ranges into Armada 38x device tree filePali Rohár1-0/+2
This allows U-Boot mvebu-gpio.c driver to switch particular MPP pin into GPIO mode and enable GPIO support. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-07-28mvebu: pinctrl: Add Armada 38x driverPali Rohár3-0/+597
This new Armada 38x driver is based on Linux kernel driver. It can set any pin to any valid function specified in DT like Linux kernel, it provides support for 'pinmux status -a' command and also for pinctrl_gpio_request(). Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-07-28pinctrl: Add new function pinctrl_generic_set_state_prefix()Pali Rohár2-17/+85
This new function pinctrl_generic_set_state_prefix() behaves like pinctrl_generic_set_state() but it takes third string argument which is used as the prefix for each device tree string property. This is needed for Marvell pinctrl drivers, becase Linux device tree files have pinmux properties prefixed by "marvell," string. This change allows to use generic U-Boot pinctrl functions for Armada 38x pinctrl driver without need to copy+paste of the majority U-Boot pinctrl code. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-07-27Merge https://gitlab.denx.de/u-boot/custodians/u-boot-mmcTom Rini8-3/+177
2022-07-27Merge https://gitlab.denx.de/u-boot/custodians/u-boot-pmicTom Rini1-29/+13
2022-07-27Merge tag 'dm-pull-26jul22' of ↵Tom Rini24-37/+314
https://gitlab.denx.de/u-boot/custodians/u-boot-dm.git minor dm- and fdt-related fixes start of test for fdt command
2022-07-27mmc: pci_mmc.c should build with ACPIGEN=nHeinrich Schuchardt1-0/+3
sandbox_defconfig builds the PCI MMC driver. It should be possible to build the sandbox without ACPI support. ACPI support in the PCI MMC driver is only needed when creating an ACPI table. Fix building with ACPIGEN=n. Fixes: dba7ee419d9d ("acpi: mmc: Generate ACPI info for the PCI SD Card") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2022-07-27cmd: mmc: allow to write protect single boot partitionYing-Chun Liu (PaulLiu)1-3/+15
add arguments for mmc wp to assign which boot partition to protect. Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org> Cc: Peng Fan <peng.fan@nxp.com> Cc: Jaehoon Chung <jh80.chung@samsung.com>
2022-07-27drivers: mmc: write protect single boot areaYing-Chun Liu (PaulLiu)2-0/+43
Add features to write protect single boot area rather than all boot areas. Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org> Cc: Peng Fan <peng.fan@nxp.com> Cc: Jaehoon Chung <jh80.chung@samsung.com>
2022-07-27mmc: nuvoton: Add NPCM7xx mmc driverJim Liu3-0/+99
Add Nuvoton BMC NPCM750 mmc control driver. Signed-off-by: Jim Liu <JJLIU0@nuvoton.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2022-07-27mmc: fsl_esdhc: Fix 'Internal clock never stabilised.' errorPali Rohár1-0/+17
Only newer eSDHC controllers set PRSSTAT_SDSTB flag. So do not wait until flag PRSSTAT_SDSTB is set on old pre-2.2 controllers. Instead sleep for fixed amount of time like it was before commit 6f883e501b65 ("mmc: fsl_esdhc: Add emmc hs200 support"). This change fixes error 'Internal clock never stabilised.' which is printed on P2020 board at every access to SD card. Fixes: 6f883e501b65 ("mmc: fsl_esdhc: Add emmc hs200 support") Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2022-07-27pmic: pca9450: permit config on all bucks and LDOsHeiko Thiery1-29/+13
In order to have the possibility to configure the regulators at system startup through DM support, all LDOs and bucks must be able to be changeable. Currently there is a limitation to change the values when the output is enabled. Since the driver is based on the ROHM BD71837 and a comment that describes a limitation about switching while the output is enabled can also be found there, the limitation probably comes from this type. Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com> Reviewed-by: Fabio Estevam <festevam@denx.de>
2022-07-26ARM: relocate: Fix Thumb code by using proper label typeAndre Przywara1-1/+2
The generic ARM relocate_code function was using its own function entry point as a relocation base, and it was obtaining that address by using the "adr" instruction on that entry point label. However that label is not just an ordinary label, instead we explicitly mark it as a function start address. Normally that doesn't change much (other than for debugging), but when assembled in Thumb mode, newer versions of the GNU assembler prepare everything for this address being used as the argument to a "bx" call, so make sure bit 0 is set in there to mark this function as Thumb code. Of course this doesn't end up very well when we use this address for the ensuing memcpy operation. To avoid this problem, and to solve it in a robust way, add an extra label, which is not marked as a function entry, and use that for the adr instruction. This lets all assemblers generate the right immediate offset in the "adr" instruction. This fixes in particular ARMv7-M ports when using GNU binutils v2.37 or newer (commit d3e52e120b68 seems to trigger the change in behaviour). Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reported-by: Jesse Taube <mr.bossman075@gmail.com>
2022-07-26Merge tag 'u-boot-imx-20220726' of ↵Tom Rini388-8491/+31833
https://gitlab.denx.de/u-boot/custodians/u-boot-imx u-boot-imx-20220726 ------------------- i.MX for 2022.10 - Added i.MX93 architecture CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/12891
2022-07-26Merge tag 'xilinx-for-v2022.10-rc2' of ↵Tom Rini63-389/+836
https://source.denx.de/u-boot/custodians/u-boot-microblaze Xilinx changes for v2022.10-rc2 fpga: - Convert SYS_FPGA_CHECK_CTRLC and SYS_FPGA_PROG_FEEDBACK to Kconfig - Add support for secure bitstream loading spi: - xilinx_spi: Add support for memopers and supports_op - zynq_qspi: Add support for supports_op/child_pre_probe - zynq_qspi: Fix dummy cycle and qspi speed calculations xilinx: - Get rid of #stream-id-cells - Use fixed partitions for SOM - Add support for UUID reading from FRU - Use strlcpy instead of strncpy - Add reset driver support for ZynqMP and Versal - Enable power domain driver in ZynqMP and Versal zynqmp: - Do no place BSS at 0 which have issue with NULL pointer - Enable SLG gpio driver - Disable LMB for mini configurations - Remove duplicate PMIO_NODE_ID_BASE macro versal: - Add xlnx-versal-resets.h header mmc: - zynq_sdhci: Fix macro for MMC HS relocate-rela: - Fix support for BE hosts - Define all macros for e_machine and reloc types misc: - Get rid of guard macros from ARM and RISC-V lmb: - Add support for disabling LMB serial: - zynq: Fix baudrate calculation tests: - Mark bind tests to run only on sandbox - List also dm uclass and devres
2022-07-26imx: imx8mm-icore: migrate to use BINMANPeng Fan4-11/+4
Use BINMAN instead of imx specific packing method. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2022-07-26arm: dts: imx8m: shrink ddr firmware size to actual file sizePeng Fan10-38/+38
After we switch to use BINMAN_SYMBOLS, there is no need to pad the file size to 0x8000 and 0x4000. After we use BINMAN_SYMBOLS, the u-boot-spl-ddr.bin shrink about 36KB with i.MX8MP-EVK. Tested-by: Tim Harvey <tharvey@gateworks.com> #imx8m[m,n,p]-venice Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2022-07-26ddr: imx8m: helper: load ddr firmware according to binman symbolsPeng Fan1-6/+41
By reading binman symbols, we no need hard coded IMEM_LEN/DMEM_LEN after we update the binman dtsi to drop 0x8000/0x4000 length for the firmware. And that could save binary size for many KBs. Tested-by: Tim Harvey <tharvey@gateworks.com> #imx8m[m,n,p]-venice Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> [Alper: Check BINMAN_SYMS_OK instead] Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2022-07-26arm: dts: imx8m: update binman ddr firmware node namePeng Fan10-38/+58
We are migrating to use binman symbols, the current names are inconsistent across different boards, so unify them. Also add `type = "blob-ext";`, since the new names are not valid binman types. Tested-by: Tim Harvey <tharvey@gateworks.com> #imx8m[m,n,p]-venice Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> [Alper: Edit commit message] Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2022-07-26tools: image: support i.MX93Peng Fan2-16/+78
Support build i.MX93 container image with mkimage Signed-off-by: Peng Fan <peng.fan@nxp.com>
2022-07-26board: freescale: imx93_evk: support ethernetPeng Fan3-0/+48
Add ethernet support Signed-off-by: Peng Fan <peng.fan@nxp.com>
2022-07-26net: dwc_eth_qos: introduce eqos hook eqos_get_enetaddrPeng Fan3-4/+18
i.MX has specific hook to get MAC address, so introduce a hook and move i.MX code to its own driver Signed-off-by: Peng Fan <peng.fan@nxp.com>
2022-07-26net: eqos: add function to get phy node and addressYe Li2-3/+21
Since new atheros PHY driver needs to access its PHY node through phy device, we have to assign the phy node in ethernet controller driver. Otherwise the PHY driver will fail to get some nodes and properties. Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2022-07-26net: dwc_eth_qos: move i.MX code outPeng Fan4-92/+124
Move i.MX code to a standalone file to make it easy for adding new platform support Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2022-07-26net: dwc_eth_qos: public some functionsPeng Fan2-273/+287
Move macros and structures to header file and make some functions public, so that could used by other files, this is to prepare split platform specific config to one file. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2022-07-26net: dwc_eth_qos: fix build break when CLK not enabledPeng Fan1-1/+1
When CONFIG_CLK is not enabled, there will be buil break: "error: ‘eqos’ undeclared (first use in this function)" Take eqos definition out the CONFIG_CLK ifdef. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2022-07-26net: fec_mxc: support i.MX93Peng Fan2-2/+4
Support i.MX93 in fec_mxc driver Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>