aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-01-11Merge https://source.denx.de/u-boot/custodians/u-boot-mmcWIP/11Jan2022Tom Rini4-396/+260
2022-01-12mmc: unconditionally define mmc_deinit()Heinrich Schuchardt1-5/+0
We want to replace '#ifdef' by 'if (IS_ENABLED(CONFIG_...))' in our code. Therefore functions should be defined unconditionally even if they are not implemented. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Acked-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2022-01-12mmc: dwmmc: return a proper error code when busyJohn Keeping1-1/+1
When failing to send a command because the hardware is busy, return EBUSY to indicate the cause instead of just -1. Signed-off-by: John Keeping <john@metanate.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2022-01-12mmc: fsl_esdhc_imx: set sysctl register for clock initializationSean Anderson1-1/+1
[ fsl_esdhc commit 263ddfc3454ead3a988adef39b962479adce2b28 ] The initial clock setting should be through sysctl register only, while the mmc_set_clock() will call mmc_set_ios() introduce other configurations like bus width, mode, and so on. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Signed-off-by: Sean Anderson <sean.anderson@seco.com>
2022-01-12mmc: fsl_esdhc_imx: Replace more #ifdefs by ifSean Anderson1-83/+69
This builds on the previous patch by converting yet more preprocessor macros to C ifs. This is split off so that the changes adapted from Micheal's patch may be clearly distinguished from the ones I have authored myself. MMC_SUPPORTS_TUNING should really get a Kconfig conversion. And DM_GPIO needs some -ENOSYS stubs when it isn't defined. Signed-off-by: Sean Anderson <sean.anderson@seco.com>
2022-01-12mmc: fsl_esdhc_imx: replace most #ifdefs by IS_ENABLED()Sean Anderson2-108/+97
[ fsl_esdhc commit 52faec31827ec1a1837977e29c067424426634c5 ] Make the code cleaner and drop the old-style #ifdef constructs where it is possible. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: Sean Anderson <sean.anderson@seco.com>
2022-01-12mmc: fsl_esdhc_imx: simplify esdhc_setup_data()Sean Anderson1-33/+48
[ fsl_esdhc commit 7e48a028a42c111ba38a90b86e5f57dace980fa0 ] First, we need the waterlevel setting for PIO mode only. Secondy, both DMA setup code is identical for both directions, except for the data pointer. Thus, unify them. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2022-01-12mmc: fsl_esdhc_imx: use dma-mapping APISean Anderson1-35/+15
[ fsl_esdhc commit b1ba1460a445bcc67972a617625d0349e4f22b31 ] Use the dma_{map,unmap}_single() calls. These will take care of the flushing and invalidation of caches. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2022-01-12mmc: fsl_esdhc_imx: simplify 64bit check for SDMA transfersSean Anderson1-27/+6
[ fsl_esdhc commit da86e8cfcb03ed5c1d8e0718bc8bc8583e60ced8 ] SDMA can only do DMA with 32 bit addresses. This is true for all architectures (just doesn't apply to 32 bit ones). Simplify the code and remove unnecessary CONFIG_FSL_LAYERSCAPE. Also make the error message more concise. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2022-01-12mmc: fsl_esdhc_imx: fix mmc->clock with actual clockSean Anderson1-0/+1
[ fsl_esdhc commit 30f6444d024a74ee48aa6969c1531aecd3c59deb ] Fix mmc->clock with actual clock which is divided by the controller, and record it with priv->clock. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2022-01-12mmc: fsl_esdhc_imx: drop redundant code for non-removable featureSean Anderson1-21/+13
[ fsl_esdhc commit commit 08197cb8dff7cd097ab07a325093043c39d19bbd ] Drop redundant code for non-removable feature. "non-removable" property has been read in mmc_of_parse(). Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> [ set MMC_CAP_NONREMOVABLE in plat->cfg.host_caps ] Signed-off-by: Sean Anderson <sean.anderson@seco.com>
2022-01-12mmc: fsl_esdhc_imx: clean up bus width configuration codeSean Anderson1-57/+26
[ fsl_esdhc commit 07bae1de382723b94244096953b05225572728cd ] This patch is to clean up bus width setting code. - For DM_MMC, remove getting "bus-width" from device tree. This has been done in mmc_of_parse(). - For non-DM_MMC, move bus width configuration from fsl_esdhc_init() to fsl_esdhc_initialize() which is non-DM_MMC specific. And fix up bus width configuration to support only 1-bit, 4-bit, or 8-bit. Keep using 8-bit if it's not set because many platforms use driver without providing max bus width. - Remove bus_width member from fsl_esdhc_priv structure. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> [ converted if statement to switch ] Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2022-01-12mmc: fsl_esdhc_imx: fix voltage validationSean Anderson2-28/+19
[ fsl_esdhc commit 5b05fc0310cd933acf76ee661577c6b07a95e684 ] Voltage validation should be done by CMD8. Current comparison between mmc_cfg voltages and host voltage capabilities is meaningless. So drop current comparison and let voltage validation is through CMD8. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2022-01-12mmc: fsl_esdhc_imx: remove redundant DM_MMC checkingSean Anderson1-2/+0
[ fsl_esdhc commit 2913926f3b3dec282f8773e3c02377c9600d8267 ] Remove redundant DM_MMC checking which is already in DM_MMC conditional compile block. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2022-01-12mmc: fsl_esdhc_imx: make BLK as hard requirement of DM_MMCSean Anderson1-32/+1
U-boot prefers DM_MMC + BLK for MMC. Now eSDHC driver has already support it, so let's force to use it. - Drop non-BLK support for DM_MMC introduced by below patch. 66fa035 mmc: fsl_esdhc: fix probe issue without CONFIG_BLK enabled - Support only DM_MMC + BLK (assuming BLK is always enabled for DM_MMC). - Use DM_MMC instead of BLK for conditional compile. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Signed-off-by: Sean Anderson <sean.anderson@seco.com> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2022-01-10Merge branch 'next'WIP/10Jan2022Tom Rini1624-10859/+25229
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-01-10Prepare v2022.01v2022.01Tom Rini1-1/+1
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-01-10.mailmap: add Atish Patra, Anup PatelHeinrich Schuchardt1-0/+2
Both have left Western Digital. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-01-10lib/rsa: avoid -Wdiscarded-qualifiersHeinrich Schuchardt1-1/+1
The return type of EVP_PKEY_get0_RSA() is const struct rsa_st *. Our code drops the const qualifier leading to In file included from tools/lib/rsa/rsa-sign.c:1: ./tools/../lib/rsa/rsa-sign.c: In function ‘rsa_add_verify_data’: ./tools/../lib/rsa/rsa-sign.c:631:13: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 631 | rsa = EVP_PKEY_get0_RSA(pkey); | ^ Add a type conversion. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-01-09Merge tag 'u-boot-amlogic-20220107' of ↵WIP/09Jan2022-nextTom Rini77-414/+1827
https://source.denx.de/u-boot/custodians/u-boot-amlogic into next - disable CONFIG_NET_RANDOM_ETHADDR when unnecessary on amlogic based configs - meson64_android: add board specific env settings, in order to support VIM3/L for android - add changes to support VIM3/L android boot by using meson64_android.h config
2022-01-08Merge branch '2022-01-08-further-important-updates'Tom Rini16-8/+84
- Further udoo_neo fixes, nitrogen6x mmc pinctrl fix - dwc2_udc_otg fix - Make imx8mq be consistent with yesterdays imx8 fixes
2022-01-08imx8mq: Generate a single bootable flash.bin againWIP/2022-01-08-further-important-updatesPatrick Wildt3-3/+19
All i.MX8MQ boards have been converted to binman, which makes it necessary to flash both flash.bin and u-boot.itb to get a bootable system. Prior to the conversion, only flash.bin was needed. Such new requirement breaks existing distro mechanisms to generate the final binary because the extra u-boot.itb is now required. Generate a final flash.bin that can be used again as a single bootable binary to keep the original behavior. After this change the SPL binary is called spl.bin, which is a more descriptive name for its purpose, and can still be used standalone (for example, for secure boot purposes). Also update imx8mq_evk.rst to remove the u-boot.itb copy step. This is a cherry-pick of 028abfd9b157 ("imx8mm-evk: Generate a single bootable flash.bin again") adjusted to apply to i.MX8MQ. Signed-off-by: Patrick Wildt <patrick@blueri.se> Reviewed-by: Fabio Estevam <festevam@denx.de>
2022-01-08nitrogen6x: add missing pinctrl to fix mmcGary Bisson6-0/+12
Since commit f7ac30b042d, the pin muxing for mmc was removed from the board file to be managed by DM_MMC which requires PINCTRL to work. It made the change for sabrelite but nitrogen configs were forgotten. Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com> Reviewed-by: Fabio Estevam <festevam@gmail.com> Acked-by: Troy Kisky <troy.kisky@boundarydevices.com>
2022-01-08usb: gadget: dwc2_udc_otg: set ep's desc during enable/disableGary Bisson1-0/+2
Fastboot support has been broken on platforms using dwc2 controller since the gadget gets its max packet size from it. This patch is the equivalent of 723fd5668ff which fixed the same issue but for the chipidea controller. Fixes: 27c9141b111 ("usb: gadget: fastboot: use correct max packet size") Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2022-01-08udoo: Select CMD_DMFabio Estevam1-0/+1
CMD_DM is useful for showing the whole DM tree. Enable it via "imply CMD_DM". Signed-off-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
2022-01-08udoo: Increase CONFIG_ENV_OFFSETFabio Estevam1-1/+1
Increase CONFIG_ENV_OFFSET to avoid the environment region to overlap with U-Boot proper. Signed-off-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
2022-01-08udoo: Adjust the SD card device numberingFabio Estevam2-2/+3
After the conversion to DM the SD card shows up as 'mmc 2' device. Adjust the 'mmcdev' and the distro command 'func' accordingly. Signed-off-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
2022-01-08udoo: Call gpio_request()Fabio Estevam1-0/+8
Calling gpio_request() prior to its usage is now mandatory. This fixes the following GPIO errors: U-Boot SPL 2022.01-rc3-00067-g7a5be871c0ec (Dec 18 2021 - 17:45:07 -0300) Trying to boot from MMC1 U-Boot 2022.01-rc3-00067-g7a5be871c0ec (Dec 18 2021 - 17:45:07 -0300) CPU: Freescale i.MX6Q rev1.2 at 792 MHz Reset cause: WDOG Model: Udoo i.MX6 Quad Board Board: Udoo Quad DRAM: 1 GiB MMC: FSL_SDHC: 2 Loading Environment from MMC... OK In: serial Out: serial Err: serial gpio@20a0000: set_dir_flags: error: gpio GPIO2_31 not reserved gpio@20a4000: set_dir_flags: error: gpio GPIO3_23 not reserved gpio@20b0000: set_dir_flags: error: gpio GPIO6_24 not reserved gpio@20b0000: set_dir_flags: error: gpio GPIO6_25 not reserved gpio@20b0000: set_dir_flags: error: gpio GPIO6_27 not reserved gpio@20b0000: set_dir_flags: error: gpio GPIO6_28 not reserved gpio@20b0000: set_dir_flags: error: gpio GPIO6_29 not reserved gpio@20a4000: set_value: error: gpio GPIO3_23 not reserved Net: Could not get PHY for FEC0: addr -2 No ethernet found. Signed-off-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
2022-01-08ARM: dts: imx6qdl-udoo: Properly describe the SD card detectFabio Estevam1-2/+3
GPIO7_IO00 is used as SD card detect. Properly describe this in the devicetree. Signed-off-by: Fabio Estevam <festevam@gmail.com>
2022-01-08udoo_spl: Initialize the eSDHC controller in SPLFabio Estevam1-0/+35
Currently, imx6q udoo board fails to boot like this: U-Boot SPL 2022.01-rc3-00061-g95ca715adad3 (Dec 18 2021 - 18:04:40 -0300) Trying to boot from MMC1 The reason is that the eSDHC controller is not initialized in SPL. Initialize the eSDHC controller in SPL via C code as DM is not used in SPL. Signed-off-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
2022-01-07Merge branch '2022-01-07-imx8-and-buildman-updates'WIP/07Jan2022Tom Rini41-887/+670
- A large number of updates for i.MX8 platforms. We update buildman / binman to be able to fake binaries if needed, for CI, and tell the user the binary won't work. Update platforms to build again with these changes.
2022-01-07imx: imx8mm: imx8mm-kontron-n801x-s: Fix binman errorAdam Ford1-146/+0
The binman node is part of the imx8mm-u-boot.dtsi file which is duplicated in imx8mm-kontron-n801x-s-u-boot.dtsi and causes a build error. Remove the duplicate. Fixes: 3cbb31f0e848 ("arm64: dts: imx8mm: use common binman configuration") Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2022-01-07board: phytec: imx8mm-phycore: Remove duplicate binman nodeAdam Ford1-122/+0
The binman node is part of the imx8mm-u-boot.dtsi file which is duplicated in phycore-imx8mm-u-boot.dtsi and causes a build error. Remove the duplicate. Fixes: 3cbb31f0e848 ("arm64: dts: imx8mm: use common binman configuration") Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2022-01-07imx8mm_venice: switch to use binman to pack imagesTim Harvey5-5/+14
Use binman to pack images. Note that imx8mm_venice supports several boards via multiple DTB's thus in the fit node we must use: - fit,fdt-list = "of-list" - fdt-SEQ - config-SEQ Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2022-01-07arm64: dts: imx8mm-u-boot.dtsi: improve odd blob-ext namingMarcel Ziswiler1-9/+18
Rather than using odd implicit blob-ext naming, explicitly specify the type to be of blob-ext and therefore also simplify the node naming. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2022-01-07arm64: dts: imx8mm-u-boot.dtsi: explicitly add spl filenameMarcel Ziswiler1-0/+1
Explicitly add SPL aka u-boot-spl.bin filename. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2022-01-07arm64: dts: imx8mm-u-boot.dtsi: alphabetically re-order propertiesMarcel Ziswiler1-17/+17
Alphabetically re-order properties. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2022-01-07arm64: dts: imx8mm: use common binman configurationMarcel Ziswiler6-582/+147
With the move to using binman to generate SPL aka u-boot-spl-ddr.bin and U-Boot proper aka u-boot.itb every board now covers such configuration in its own U-Boot specific device tree include. Move the comon part of that configuration to the common imx8mm-u-boot.dtsi include file. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2022-01-07arm64: dts: imx8mm-cl-iot-gate-u-boot.dtsi: use common imx8mm-u-boot.dtsiMarcel Ziswiler2-70/+4
Use common imx8mm-u-boot.dtsi. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2022-01-07arm64: dts: imx8mm-cl-iot-gate-u-boot.dtsi: alphabetically re-orderMarcel Ziswiler2-202/+202
Alphabetically re-order nodes and properties. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2022-01-07imx8mm-cl-iot-gate: fix imximage intermediate binary namingMarcel Ziswiler1-1/+1
This fixes the following build time issue: ... BINMAN all binman: Error 1 running 'mkimage -d ./mkimage.spl.mkimage -n spl/u-boot-spl.cfgout -T imx8mimage -e 0x7e1000 ./mkimage-out.spl.mkimage': mkimage.flash.mkimage: Can't open: No such file or directory make: *** [Makefile:1094: all] Error 1 Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2022-01-07doc: imx8mq_evk: update doc after using binmanPeng Fan1-1/+2
Update doc after using binman to pack images Signed-off-by: Peng Fan <peng.fan@nxp.com>
2022-01-07imx: imx8mq use common imximage.cfgPeng Fan7-45/+6
After all these board switch to binman, we could use common imximage.cfg Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Patrick Wildt <patrick@blueri.se>
2022-01-07imx: pico-imx8mq: switch to use binmanPeng Fan5-2/+15
Switch to use binman to pack images Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Patrick Wildt <patrick@blueri.se>
2022-01-07imx: imx8mq_phanbell: switch to binmanPeng Fan5-5/+19
Switch to binman to pack images Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Patrick Wildt <patrick@blueri.se>
2022-01-07imx: imx8mq_evk: switch to binmanPeng Fan6-2/+138
Switch to use binman to pack images Signed-off-by: Peng Fan <peng.fan@nxp.com>
2022-01-07imx8mn_beacon_2g: Switch to binmanAdam Ford1-1/+1
The standard 1GB Nano was converted to binman, but the 2G version was neglected. Convert it to binman as well. Reviewed-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Adam Ford <aford173@gmail.com>
2022-01-07imx8mn_beacon: Fix booting hang and switch to binmanAdam Ford5-3/+148
Somewhere along the line, the board stopped being able to boot. Rather than just fixing the issue, let's fix the issue and migrate to binman to eliminate a warning when using custom imx tools for generating the binary. Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2022-01-07imx8mm_beacon: Switch to binman for generating imageAdam Ford6-5/+137
To eliminate a warning when using custom imx tools for generating a binary, use binman to generate flash.bin. Signed-off-by: Adam Ford <aford173@gmail.com> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-01-07binman: add support for creating dummy files for external blobsHeiko Thiery10-8/+139
While converting to binman for an imx8mq board, it has been found that building in the u-boot CI fails. This is because an imx8mq requires an external binary (signed_hdmi_imx8m.bin). If this file cannot be found mkimage fails. To be able to build this board in the u-boot CI a binman option (--fake-ext-blobs) is introduced that can be switched on via the u-boot makefile option BINMAN_FAKE_EXT_BLOBS. With that the needed dummy files are created. Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>