summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-06-14fastboot: Check if partition really exist in getvar_has_slot()Igor Opaniuk
Currently getvar_has_slot() invocation for "boot" and "system" partitions always returns affirmative response regardless the fact of existence of these partitions, which leads to impossibility to flash them on old non-A/B AOSP setups, where _a/_b suffixes aren't used: $ fastboot flash boot boot.img Sending 'boot__a' (11301 KB) OKAY [ 0.451s] Writing 'boot__a' FAILED (remote: 'cannot find partition') fastboot: error: Command failed Although partition layout is: -> part list mmc 0 Partition Map for MMC device 0 -- Partition Type: EFI Part Start LBA End LBA Name Attributes Type GUID Partition GUID 1 0x00000800 0x000107ff "boot" attrs: 0x0000000000000000 type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 guid: ea2e2470-db4a-d646-b828-10167f736d63 2 0x00010800 0x000127ff "environment" attrs: 0x0000000000000000 type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 guid: 10a819d2-6004-3d48-bd87-114e2a796db9 3 0x00012800 0x0001a7ff "recovery" attrs: 0x0000000000000000 type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 guid: 9ea116e4-8a34-0c48-8cf5-2fe9480f56cd 4 0x0001a800 0x0031a7ff "system" attrs: 0x0000000000000000 ...... This patch adds checks of existence for requested partitions on eMMC/NAND. Fixes: f73a7df984a9 ("net: fastboot: Merge AOSP UDP fastboot") Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
2019-06-14fastboot: getvar: Refactor fastboot_*_get_part_info() usageSam Protsenko
Extract fastboot_*_get_part_info() usage for MMC and NAND into getvar_get_part_info() function, as it will be needed further in other functions. This way we can avoid code duplication and mess with preprocessor directives across all points of usage. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2019-06-14fastboot: Use const qualifier for char *part_nameSam Protsenko
In fastboot_*_get_part_info() functions we can use stronger typing by expecting const strings. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2019-06-14fastboot: Fix slot names reported by getvarSam Protsenko
In commit [1] fastboot tool was changed w.r.t. new A/B specification [2], and now we should report slot names in "a" format instead of "_a". Latter is now considered legacy and we shouldn't rely on that anymore. Due to this one can observe next error with recent fastboot tool: $ fastboot flash boot boot.img Sending 'boot__a' (11301 KB) OKAY [ 0.451s] Writing 'boot__a' FAILED (remote: 'cannot find partition') fastboot: error: Command failed Let's use new slot format in order to fix double underscores "__" and to be in sync with AOSP master. [1] https://android.googlesource.com/platform/system/core/+/8091947847d5e5130b09d2ac0a4bdc900f3b77c5 [2] https://source.android.com/devices/tech/ota/ab/ab_implement#partitions Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
2019-06-14usb: gadget: error out if g_dnl registration failsSjoerd Simons
If g_dnl_register fails return an error rather then stubornly continuing onwards. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
2019-06-14spl: dfu: Fix printed variable nameMarek Vasut
The SPL DFU uses dfu_alt_info_N variable name to determine the DFU configuration, where N is the name of the media (e.g. ram). It does not use the plain dfu_alt_info. Print the name of the missing env variable in case of a failure instead of printing dfu_alt_info, which is just the name of the parameter passed to spl_dfu_cmd(). Signed-off-by: Marek Vasut <marex@denx.de> Cc: Tom Rini <trini@konsulko.com>
2019-06-12Merge tag 'efi-2019-07-rc5' of git://git.denx.de/u-boot-efiTom Rini
Pull request for UEFI sub-system for v2019.07-rc5 This pull request provides fixes for event services.
2019-06-11Merge tag 'u-boot-stm32-20190606' of https://github.com/pchotard/u-bootTom Rini
- Add Ethernet support for STM32MP1 - Add saveenv support for STM32MP1 - Add STM32MP1 Avenger96 board support - Add SPI driver suport for STM32MP1 - Add watchdog support for STM32MP1 - Update power supply check via USB TYPE-C for STM32MP1 discovery board
2019-06-11Merge tag 'u-boot-imx-20190612' of git://git.denx.de/u-boot-imxTom Rini
u-boot-imx-20190612 -------------------- - Board fixes: - imx6logic - wandboard - mx6sabre boots again - imx8qm_mek - pico-* boards - Toradex apalis / colibri - engicam imx6 (environment) - KP MX53 - opos6ul - Switch to DM: - vining2000 - dh MX6 - Toradex colibri i.MX7 - Novena - Security : fix CSF size for HAB - Other: - imx: fix building for i.mx8 without spl - pcie and switch to DM mx6sabreauto: Enable SPL SDP support
2019-06-11configs: tinker-rk3288 disable CONFIG_SPL_I2C_SUPPORTHeinrich Schuchardt
The SPL for the Tinker Board has to fit into 32 KiB. Currently this limit is exceeded. CONFIG_SPL_I2C_SUPPORT is not needed to move to main U-Boot. So let's disable it. Suggested-by: David Wu <david.wu@rock-chips.com> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: David Wu <david.wu@rock-chips.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2019-06-11spl: imx6: Provide a SPL_SIZE_LIMIT defaultFabio Estevam
As explained in include/configs/imx6_spl.h. the i.MX6 SPL size limit is 68KB (4KB header + 64KB max size). Provide such limit for all i.MX6 boards that use SPL to detect SPL size overflow in build time. Signed-off-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Lukasz Majewski <lukma@denx.de>
2019-06-11mx6sabreauto: Enable SPL SDP supportSjoerd Simons
To allow loading u-boot over USB enable SDP support in the SPL. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2019-06-11mx6sabreauto: Remove CONFIG_SPL_DM to decrease the SPL sizeSjoerd Simons
The i.mx6 SPL binary cannot be bigger then 68K, while with the current defconfig for sabreauto it's only about 56K as soon as USB support gets added the size will overflows. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2019-06-11arm: dts: imx6qdl-u-boot: Alias usb0 to usbotgSjoerd Simons
All i.mx6 boards seems to have moved to DM_USB, however gadget support for mx6 is still pre-DM as CI_UDC isn't converted yet. To make this work the usb otg controller used for gadgets needs to be usb number 0. Add an alias for this directly in the main u-boot mx6qdl dtsi so it doesn't need to be done for each board separately. This fixes regressions wrt. usb gadget functionality in several boards that have gadget functions enabled in their config, but no usb0 alias in their device-tree. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
2019-06-11mx6sabreauto: set SYS_MALLOC_F for videoSjoerd Simons
Sabre Auto boards currently hang with: ``` U-Boot 2019.07-rc3-00057-gc41940c406 (Jun 03 2019 - 14:42:41 +0200) CPU: Freescale i.MX6QP rev1.0 996 MHz (running at 792 MHz) CPU: Automotive temperature grade (-40C to 125C)Reset cause: WDOG Model: Freescale i.MX6 Quad Plus SABRE Automotive Board Board: MX6Q-Sabreauto revA I2C: ready DRAM: 2 GiB Video device 'ipu@2400000' cannot allocate frame buffer memory -ensure the device is set up before relocation Error binding driver 'ipuv3_video': -28 Video device 'ipu@2800000' cannot allocate frame buffer memory -ensure the device is set up before relocation Error binding driver 'ipuv3_video': -28 Some drivers failed to bind Error binding driver 'generic_simple_bus': -28 Some drivers failed to bind initcall sequence 8ffe00b8 failed at call 1780e93b (err=-28) ``` Set SYS_MALLOC_F_LEN to reserve_video to work. This is similar to the change Peng Fan did for mx6sabresd (9002e735e717) Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2019-06-11mx6sabreauto: Select pinctrl driverSjoerd Simons
With the conversion to DM we should select the pinctrl driver. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2019-06-11imx8mq_evk: Staticize when appropriateFabio Estevam
Staticize 'spl_dram_init' and 'i2c_pad_info1' to fix the following sparse warnings: board/freescale/imx8mq_evk/spl.c:30:6: warning: symbol 'spl_dram_init' was not declared. Should it be static? board/freescale/imx8mq_evk/spl.c:41:22: warning: symbol 'i2c_pad_info1' was not declared. Should it be static? Signed-off-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2019-06-11imx: define ARCH_MXC for i.MX8/8M/7ULPPeng Fan
Without this definition, fsl_esdhc will access reserved registers on i.MX chips, so define ARCH_MXC to fix it. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2019-06-11imx: drop imx-regs.hPeng Fan
imx-regs.h under arch-imx has no user, drop it. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2019-06-11imx8: cpu: get temperature when print cpu descPeng Fan
Read the temperature when print cpu inforation. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-06-11pinctrl: imx: Define imx6_pinctrl_soc_info in .data sectionLukasz Majewski
This commit is necessary to be able to re-use the pinctrl code in early SPL to properly configure pins. The problem is that those "static" structures (without explicit initialization) are placed in the SDRAM area, which corresponds to u-boot proper (not even SPL). Hence, when one wants to configure pins before relocation via DTS/DM, the board hangs (imx6q SoC powered one) as only OCRAM area is available (0x009xxxxx). This commit prevents from this issue by moving the imx6_pinctrl_soc_info structure to data section (from BSS). Signed-off-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2019-06-11net: fec_mxc: not access reserved register on i.MX8Peng Fan
We should not access reserved register on i.MX8, otherwise met SERROR Signed-off-by: Peng Fan <peng.fan@nxp.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-06-11ARM: imx: vining2000: Enable DM SerialMarek Vasut
Enable DM Serial support on iMX6SX VINING|2000. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Silvio Fricke <silvio.fricke@softing.com> Cc: Stefano Babic <sbabic@denx.de>
2019-06-11ARM: imx: vining2000: Enable DM PCIMarek Vasut
Enable DM PCI support on iMX6SX VINING|2000. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Silvio Fricke <silvio.fricke@softing.com> Cc: Stefano Babic <sbabic@denx.de>
2019-06-11ARM: imx: vining2000: Enable DM GPIOMarek Vasut
Enable DM GPIO support on iMX6SX VINING|2000 and fix up board code where applicable. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Silvio Fricke <silvio.fricke@softing.com> Cc: Stefano Babic <sbabic@denx.de>
2019-06-11ARM: imx: vining2000: Enable DM USBMarek Vasut
Enable DM USB support on iMX6SX VINING|2000. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Silvio Fricke <silvio.fricke@softing.com> Cc: Stefano Babic <sbabic@denx.de>
2019-06-11ARM: imx: vining2000: Convert MMC and block to DMMarek Vasut
Enable DM block and DM MMC support on iMX6SX VINING|2000 . Convert board code to match the DM support. This disables USB mass storage support due to missing DM USB, however that will be re-enabled in subsequent patch. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Silvio Fricke <silvio.fricke@softing.com> Cc: Stefano Babic <sbabic@denx.de>
2019-06-11ARM: imx: vining2000: Enable DM pin controlMarek Vasut
Enable DM pin control support on iMX6SX VINING|2000. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Silvio Fricke <silvio.fricke@softing.com> Cc: Stefano Babic <sbabic@denx.de>
2019-06-11ARM: dts: imx: vining2000: Import VINING|2000 DT from LinuxMarek Vasut
Import iMX6SX VINING|2000 device tree from Linux 5.1.1 b724e9356404 . Enable DT control in full U-Boot . Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Silvio Fricke <silvio.fricke@softing.com> Cc: Stefano Babic <sbabic@denx.de>
2019-06-11ARM: imx: Rename VINING|2000Marek Vasut
The company Samtec was merged into Softing, migrate the board over to the new name and update copyright headers. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Silvio Fricke <silvio.fricke@softing.com> Cc: Stefano Babic <sbabic@denx.de>
2019-06-11mx6sx: vining2000: pinmux usdhc4 resetChristoph Fritz
This patch configures pinmux for pin usdhc4 reset. Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
2019-06-11MAINTAINERS: Add imx dts files to i.MX maintainers listFabio Estevam
Add imx dts files to the MAINTAINERS file list, so that i.MX devicetree related patches can be properly sent to the i.MX folks. Reported-by: Adam Ford <aford173@gmail.com> Signed-off-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2019-06-11serial: mxc: Add iMX6SX compatible stringMarek Vasut
Add compatible string for iMX6SX. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Silvio Fricke <silvio.fricke@softing.com> Cc: Stefano Babic <sbabic@denx.de>
2019-06-11ARM: imx: novena: Enable DM PCIMarek Vasut
Enable DM PCI support on iMX6Q Novena. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Vagrant Cascadian <vagrant@debian.org>
2019-06-11pci: imx: Add DM and DT supportMarek Vasut
Add DM support and support for probing the iMX PCI driver from DT. The legacy non-DM support is retained, however shall be removed once DM PCI is the only option remaining. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-06-11pci: imx: Pass driver private data aroundMarek Vasut
Pass the driver private data around the driver as much as possible, instead of having it as a static global variable. This is done in preparation for the DM conversion, no functional change. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-06-11pci: imx: Fix potential 64bit memory access clampingMarek Vasut
The driver limits the config space base to 32bit, however it can be 64bit on 64bit iMX hardware too. Remove that limitation. This patch has no impact on the iMX6, which is the only SoC currently supported by this driver. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-06-11pci: imx: Factor out hard-coded register base addressesMarek Vasut
Pull out hard-coded register base addresses into driver private structure in preparation for DM conversion. No functional change. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-06-11ARM: imx: Call imx_pcie_remove() only for non-DM PCI driverMarek Vasut
The DM iMX PCI driver has DM_FLAG_OS_PREPARE set and will call imx_pcie_remove() from the .remove callback. Do not call it from the architecture code again. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-06-11mx6sabresd: Remove U-Boot proper mmc initializationFabio Estevam
After the conversion to DM there is no need to have mmc initialization code inside U-Boot proper. Remove the unneeded code. Signed-off-by: Fabio Estevam <festevam@gmail.com>
2019-06-11mx6sabresd: Select pinctrl driverFabio Estevam
With the conversion to DM we should select the pinctrl driver. Signed-off-by: Fabio Estevam <festevam@gmail.com>
2019-06-11mx6sabresd: Remove CONFIG_SPL_DM to decrease the SPL sizeFabio Estevam
Currently the mx6qsabresd board does not boot: U-Boot SPL 2019.07-rc2 (May 16 2019 - 14:28:55 -0300) Trying to boot from MMC1 spl: could not find mmc device 0. error: -19 SPL: failed to boot from all boot devices ### ERROR ### Please RESET the board ### The reason for the boot failure is that that the SPL size got greater than the 68KB limit (4KB header + 64KB max size) as explained in include/configs/imx6_spl.h. Remove the CONFIG_SPL_DM option, so that the SPL binary could fit into the allowed size and the board can boot again. Signed-off-by: Fabio Estevam <festevam@gmail.com>
2019-06-11imx8qxp_mek: Remove unneeded config options settingsFabio Estevam
Remove such unneeded custom config options because the provided default values are good enough. Signed-off-by: Fabio Estevam <festevam@gmail.com> Acked-by: Peng Fan <peng.fan@nxp.com>
2019-06-11imx8qm_mek: Remove unneeded config options settingsFabio Estevam
Remove such unneeded custom config options because the provided default values are good enough. Signed-off-by: Fabio Estevam <festevam@gmail.com> Acked-by: Peng Fan <peng.fan@nxp.com>
2019-06-11imx: Extend PCL063 support for phyCORE-i.MX6ULL SOMParthiban Nallathambi
Extend PHYTEC phyBOARD-i.MX6UL for phyCORE-i.MX6UL SoM (PCL063) with eMMC on SoM. CPU: Freescale i.MX6ULL rev1.0 792 MHz (running at 396 MHz) CPU: Industrial temperature grade (-40C to 105C) at 38C Reset cause: POR Model: Phytec phyBOARD-i.MX6ULL-Segin SBC Board: PHYTEC phyCORE-i.MX6ULL DRAM: 256 MiB MMC: FSL_SDHC: 0, FSL_SDHC: 1 In: serial@02020000 Out: serial@02020000 Err: serial@02020000 Net: FEC0 Working: - Eth0 - i2C - MMC/SD - eMMC - UART (1 & 5) - USB (host & otg) Signed-off-by: Parthiban Nallathambi <parthitce@gmail.com>
2019-06-11apalis-tk1: use UUID for rootfsIgor Opaniuk
1. Replace usage of "/dev/mmcblk*p*" with a proper UUID of rootfs partition. This fixes the issue, when MMC controllers are probed in a different order in U-boot and Linux kernel. 2. Fix legacy USB command (both sdboot and usbboot can be used now). Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2019-06-11apalis_imx6: use UUID for rootfsIgor Opaniuk
1. Replace usage of "/dev/mmcblk*p*" with a proper UUID of rootfs partition. This fixes the issue, when MMC controllers are probed in a different order in U-boot and Linux kernel. 2. Fix legacy USB command (both sdboot and usbboot can be used now). Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2019-06-11colibri_vf: use UUID for rootfsIgor Opaniuk
Replace usage of "/dev/mmcblk*p*" with a proper UUID of rootfs partition. This fixes the issue, when MMC controllers are probed in a different order in U-boot and Linux kernel. Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2019-06-11colibri-imx6ull: use UUID for rootfsIgor Opaniuk
Replace usage of "/dev/mmcblk*p*" with a proper UUID of rootfs partition. This fixes the issue, when MMC controllers are probed in a different order in U-boot and Linux kernel. Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2019-06-11colibri_imx7: use UUID for rootfsIgor Opaniuk
Replace usage of "/dev/mmcblk*p*" with a proper UUID of rootfs partition. This fixes the issue, when MMC controllers are probed in a different order in U-boot and Linux kernel. Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>