summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-12-28apalis-imx8x: fix flags properties for usbotg1toradex_imx_v2020.04_5.4.24_2.1.0Oleksandr Suvorov
The driver supports combined flag to disable srp/hnp and doesn't support disabling adp. Fix flag properties. Related-to: ELB-3424 Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-12-28apalis-imx8x: enable on-board USB hub and USBH3/4 portsOleksandr Suvorov
Currently the Cadence,usb3 driver doesn't support a phy vbus regulator. Emulate it keeping the USBH_EN signal high with gpio-hog entry. This enables the on-board USB-Hub with ports USB2[ABCD] and on-board USB ports USBH3/4. Related-to: ELB-3424 Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-12-28apalis-imx8x: request usbh_en signal pinOleksandr Suvorov
Request using the pin of USBH_EN signal that enables on-board USB hub (USBH2[ABCD] ports) and USBH3/4 ports. Related-to: ELB-3424 Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-12-28apalis-imx8x: fix host mode for usbotg1 portOleksandr Suvorov
Trying to use the usbotg1 port in host mode led to the following error: ================= starting USB... Bus usb@5b0d0000: usb dr_mode not found Port not available. ================= Adding the correct dual-role mode fixes this issue and let the usbotg1 port working in both peripheral and host mode. Related-to: ELB-3424 Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-12-22colibri-imx8x: fix gpio reserved error messageIgor Opaniuk
This prevents messages like: gpio@5d0d0000: get_value: error: gpio GPIO5_9 not reserved when CONFIG_DM_GPIO is enabled. Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-12-13verdin imx8mp: change on-carrier phy addressMarcel Ziswiler
Both Verdin Developer Board V1.0A and V1.1A have their PHYs at address 7. Only V1.0B had it at the address 3! Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2020-12-13verdin imx8mp: remove config_fec_mxc_phyaddr/xcv_type, phy_aneg_timeoutMarcel Ziswiler
Remove CONFIG_FEC_MXC_PHYADDR, CONFIG_FEC_XCV_TYPE and PHY_ANEG_TIMEOUT in favour of device tree configuration via DM_ETH_PHY/PHYLIB. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2020-12-13verdin imx8mp: correct wrong comment about eqos/mdioMarcel Ziswiler
Eqos is set to primary as it is the on-module Ethernet interface nothing to do with its MDIO usage which BTW isn't even correct in the i.MX 8M Plus LPDDR4 EVK case! Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2020-12-13verdin imx8mp: remove dwc_net_phyaddrMarcel Ziswiler
Remove DWC_NET_PHYADDR in favour of device tree configuration via DM_ETH_PHY/PHYLIB. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2020-12-13verdin imx8mp: remove defunct regulator-on-bootMarcel Ziswiler
Turns out U-Boot won't do anything with those even if paired with regulator-always-on. I guess this is due to U-Boot's lazy loading. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2020-12-13net: dm: dwc_eth_qos: support the phy-supply bindingMarcel Ziswiler
Configure the PHY regulator if defined by the "phy-supply" device tree phandle. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2020-12-03imx8m/soc.c: deleting phandles pointing to deleted cpusMax Krummenacher
For i.MX8M Mini with less than 4 CPU cores the code patches the device tree to reflect that and deletes the nodes representing the not existing cores. The deleted nodes are referenced by phandles in the following two properties: /thermal-zones/cpu-thermal/cooling-maps/map0/cooling-device /pmu/interrupt-affinity Modify these properties to no longer contain the phandles to no longer existing nodes. Fixes the thermal subsystem which otherwise bails out with: [ 0.102895] OF: /thermal-zones/cpu-thermal/cooling-maps/map0: could not find phandle [ 0.102922] thermal_sys: failed to build thermal zone cpu-thermal: -22 [ 1.377046] i.mx8mm_thermal 30260000.tmu: failed to register thermal zone sensor[0]: 0 [ 3.013718] i.mx8mm_thermal 30260000.tmu: failed to register thermal zone sensor[0]: 0 ... Related-to: ELB-3292 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2020-12-03imx8m/soc.c: drop some printfMax Krummenacher
Each node which gets touched prints two lines. Drop the one that the node is found. I.e. all "Found..." lines in U-Boot output are now suppressed: | Found /vpu_g1@38300000 node | Modify /vpu_g1@38300000:status disabled | Found /vpu_g2@38310000 node | Modify /vpu_g2@38310000:status disabled | Found /vpu_h1@38320000 node | Modify /vpu_h1@38320000:status disabled | Found /cpus/cpu@2 node | Delete node /cpus/cpu@2 | Found /cpus/cpu@3 node | Delete node /cpus/cpu@3 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2020-11-24verdin-imx8mp: fix alloc_simple() alloc space exhaustedMarcel Ziswiler
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2020-11-19board: toradex: add verdin imx8m plus supportMarcel Ziswiler
This adds initial minimal support for the Toradex Verdin iMX8M Plus Quad 4GB WB IT V1.0A and Toradex Verdin iMX8M Plus Quad 2GB V1.0A modules. They are strapped to boot from eFuses which are factory fused to properly boot from their on-module eMMC. U-Boot supports booting from the on-module eMMC or, if the recovery button/pin is asserted, via USB serial download aka SDP support. Functionality wise the following is known to be working: - eMMC, 8-bit and 4-bit MMC/SD card slots - Ethernet (but only 2nd one available on the Verdin Development board) - GPIOs - I2C Boot sequence is: SPL ---> ATF (TF-A) ---> U-boot proper ATF, U-boot proper and u-boot.dtb images are packed into a FIT image, loaded by SPL. Boot: U-Boot SPL 2020.04-00217-gfad48768ba (Nov 18 2020 - 14:22:31 +0100) DDRINFO: start DRAM init DDRINFO: DRAM rate 4000MTS DDRINFO:ddrphy calibration done DDRINFO: ddrmix config done Normal Boot Trying to boot from BOOTROM Find FIT header 0x4803afa0, size 855 Need continue download 1024 Download 833424, total fit 834544 NOTICE: BL31: v2.2(release):imx_5.4.24_er3-6-g0a236bda5 NOTICE: BL31: Built : 13:40:19, Nov 12 2020 U-Boot 2020.04-00217-gfad48768ba (Nov 18 2020 - 14:22:31 +0100) alloc_simple() alloc space exhausted CPU: i.MX8MP[8] rev1.0 1800 MHz (running at 1200 MHz) CPU: Commercial temperature grade (0C to 95C) at 46C Reset cause: POR DRAM: 4 GiB MMC: FSL_SDHC: 1, FSL_SDHC: 2 In: serial Out: serial Err: serial Model: Toradex Verdin iMX8M Plus Quad 4GB Wi-Fi / BT IT V1.0A, Serial# 06775455 MISSING TORADEX CARRIER CONFIG BLOCKS BuildInfo: - ATF 0a236bd - U-Boot 2020.04-00217-gfad48768ba Detect USB boot. Will enter fastboot mode! Net: Warning: ethernet@30bf0000 (eth1) using random MAC address - 56:c0:c6:84:63:a0 eth0: ethernet@30be0000, eth1: ethernet@30bf0000 [PRIME] Fastboot: Normal Boot from USB for mfgtools *** Warning - Use default environment for mfgtools , using default environment Run bootcmd_mfg: fastboot 0 Hit any key to stop autoboot: 0 Verdin iMX8MP # Related-to: ELB-3208 Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2020-11-19verdin-imx8mm: make board_phys_sdram_size() two bank awareMarcel Ziswiler
Make board_phys_sdram_size() function two bank aware. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2020-11-19imx8m: make board_phys_sdram_size() two bank awareMarcel Ziswiler
Make weak board_phys_sdram_size() function two bank aware. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2020-11-19fastboot: fix build warningsMarcel Ziswiler
Fix the following annoying build warnings: drivers/fastboot/fb_fsl/fb_fsl_common.c: In function ‘fastboot_setup’: drivers/fastboot/fb_fsl/fb_fsl_common.c:359:2: warning: ‘serialnr.high’ is used uninitialized in this function [-Wuninitialized] 359 | sprintf(serial, "%08x%08x", serialnr.high, serialnr.low); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/fastboot/fb_fsl/fb_fsl_common.c:359:2: warning: ‘serialnr.low’ is used uninitialized in this function [-Wuninitialized] drivers/fastboot/fb_fsl/fb_fsl_getvar.c:117:13: warning: ‘serial’ defined but not used [-Wunused-variable] 117 | static char serial[IMX_SERIAL_LEN]; | ^~~~~~ Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2020-11-18imx: romapi: fix spurious ampersand in address printMarcel Ziswiler
Fix spurious ampersand in address print e.g. Find FIT header 0x&480331a0, size 855 Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2020-11-18mmc: fsl_esdhc: Gracefully fail on unsupported voltage switchMarek Vasut
Unsupported voltage on voltage switch is not an error, do not print error message in such a case. This happens e.g. if the eMMC is already in 1V8 mode or when testing 1V2 mode operation on systems which only do 3V3/1V8 switching. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Jaehoon Chung <jh80.chung@samsung.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> (cherry picked from commit 50a17a69be076316e4c539b75403acfabf9e4c4c)
2020-11-18mmc: fsl_esdhc: Fix SDR104 and HS200 supportMarek Vasut
The 3V3/1V8 switching could never have worked on any of the iMXes ever since 51313b49f2 ("mmc: fsl_esdhc: support SDR104 and HS200"), because that commit uses priv->vqmmc_dev when switching voltages on mode switch, while local vqmmc_dev in probe to store the regulator pointer. Those are two different variables with the same name. So the priv->vqmmc_dev was always NULL and thus voltage switch between modes never really suceeded. Fix this by assigning priv->vqmmc_dev with value of the vqmmc_dev in probe. Fixes: 51313b49f2 ("mmc: fsl_esdhc: support SDR104 and HS200") Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Jaehoon Chung <jh80.chung@samsung.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> (cherry picked from commit 406df85345f942d9348443983d81a01e013e920b)
2020-11-03verdin-imx8mm.c: enable sleep_moci outputMax Krummenacher
This powers some peripherals on the carrier board e.g. the USB hub. Related-to: ELB-3206 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2020-11-02verdin-imx8mm.c: drop code releated to usbc port managerMax Krummenacher
Drop code ifdefed by CONFIG_USB_TCPC. Currently there are no plans to extend the module HW to include such a chip. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2020-11-02verdin-imx8mm: use preboot for fdtfile evaluationIgor Opaniuk
Enable and set preboot var with fdtfile evaluation. It will be checked and run immediately before starting the CONFIG_BOOTDELAY countdown and/or running the auto-boot command resp. entering interactive mode. This provides possibility to use different boot cmds in interactive mode without manual setting fdtfile value, as it it's already evaluated before entering interactive mode. Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-10-30apalis/colibri-imx8x: disable CONFIG_OF_EMBEDIgor Opaniuk
When CONFIG_OF_EMBED=y, the buildinfo is calculated wrongly: /* Get imx-mkimage commit id. * The imx-mkimage puts the commit hash behind the end of u-boot.bin */ mkimage_commit = (char *)(ulong)(CONFIG_SYS_TEXT_BASE + end_ofs + fdt_totalsize(gd->fdt_blob)); temp = mkimage_commit + 8; *temp = '\0'; With this change BuildInfo is shown correctly: BuildInfo: - SCFW 732e719a, SECO-FW 376e3c15, IMX-MKIMAGE 6745ccdc, ATF 8565561 - U-Boot 2020.04-00209-ga532101923-dirty Related-by: ELB-3188 Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-10-29toradex: imx8: drop legacy nfsboot scriptIgor Opaniuk
Drop legacy nfsboot script in favor of distroboot DHCP boot. Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-10-29toradex: imx8: set default dhcp distroboot scriptnameIgor Opaniuk
Use the same name of DHCP Distroboot script as in regular eMMC case Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-10-29colibri-imx8x: force to use load_cmd instead of hardcoded mmcIgor Opaniuk
Use $load_cmd for hdpload command, which is set by distro_bootcmd. As "run $setup" is invoked only by our distroboot script, this save to do that. Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-10-29apalis-imx8x: force to use load_cmd instead of hardcoded mmcIgor Opaniuk
Use $load_cmd for hdpload command, which is set by distro_bootcmd. As "run $setup" is invoked only by our distroboot script, this save to do that. Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-10-29apalis-imx8: force to use load_cmd instead of hardcoded mmcIgor Opaniuk
Use $load_cmd for hdpload command, which is set by distro_bootcmd. As "run $setup" is invoked only by our distroboot script, this save to do that. Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-10-28distro_bootcmd: set devtype for dhcp bootIgor Opaniuk
Set $devtype for DHCP boot, which can be handy for the boot.scr for detection of devtype used (for example, when the same boot.scr is used for both mmc/dhcp boot). Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-10-27verdin-imx8mm: automatic ram size detectionMarcel Ziswiler
Implement board_phys_sdram_size() to automatically detect Verdin iMX8M Mini DualLite 1GB vs. Verdin iMX8M Mini Quad 2GB. Note: This only works if we keep using similar RAM chips! Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2020-10-27toradex: tdx-cfg-clock: fix i.mx 8m mini interactiveMarcel Ziswiler
Now with them first Verdin iMX8M Mini DualLite modules in for bring-up we got clarity how is_cpu_type() actually behaves. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2020-10-21verdin-imx8mm: spl: enable pca9450 i2c level translatorMax Krummenacher
This is used for the on module ADC. Related-to: ELB-3132 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2020-10-19ARM: dts: fsl-imx8qxp-colibri: sync u-boot dtsi with MEKIgor Opaniuk
Sync U-Boot specific device tree include with NXP MEK platform. Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-10-19ARM: dts: fsl-imx8qxp-colibri: change hierarchy of device treeIgor Opaniuk
As U-Boot specific dtsi (fsl-imx8qxp-colibri-u-boot.dtsi) requires the nodes to be defined already before adding properties to them, move all module nodes that nodes to dtsi, and include both hw and u-boot specific dtsi's in proper order. Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-10-19ARM: dts: fsl-imx8qxp-colibri: drop u-boot properties from generic dtsIgor Opaniuk
Drop u-boot specific from generic device tree. Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-10-15verdin-imx8mm: refine hardware version detectionMax Krummenacher
This adds the new Wi-Fi SKU VERDIN_IMX8MMDL_WIFI_BT_IT and does only set and save the environment if 'variant' is not already set correctly. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2020-10-14verdin-imx8mm: implement hardware version detectionMax Krummenacher
And select the correct devicetree accordingly by setting the variant environment variable. Related-to: ELB-3138 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2020-10-14verdin-imx8mm: spl: add pca9450 pmicMax Krummenacher
V1.1A HW switched the PMIC from BD71837 to PCA9450. - If only one PMIC is configured in include/configs/*.h use that unconditional. - Detect PCA9450 PMIC with a fallback to BD71837 PMIC if not found. - Disable combined DVS in PCA9450_BUCK123_DVS. - Increase DDR Voltage to 0.95V as we use a 1.5GHz RAM. - Configure WDOG_B behaviour. Copied and adapted the PMIC initialization from board/freescale/imx8mm_ab2/spl.c Related-to: ELB-3130 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2020-10-14ARM: dts: imx8mm-verdin: v1.1: follow changed pmicMax Krummenacher
The used PMIC has been changed from RHOM BD71837 to NXP PCA9450A. Adjust the device tree accordingly. Remove the old ADC node as the ADC has been changed and has no longer a separate power rail. Related-to: ELB-3130 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2020-10-14ARM: dts: imx8mm-verdin: v1.1: introduced changed pin usageMax Krummenacher
The eMMC reset is now connected to SD1_RESET_B ball. Add that ball to eMMC pinctrl groups. The following signals are not used in U-Boot code, however they are changed from V1.0 to V1.1 HW. CTRL_FORCE_OFF_MOCI# used to be controlled by SAI5_RXC in V1.0 HW. In V1.1 HW it is no longer under SW control. -> The unused pinmuxing is deleted. Wi-Fi_WKUP_WLAN used to be controlled by SD1_RESET_B in V1.0 HW. In V1.1 HW it is controlled by SAI5_RXC. -> The pincontrol is updated to reflect V1.1 HW. Related-to: ELB-3150 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2020-10-14pca9450a: fix i2c addressMax Krummenacher
The I2C address is 0x25, not 0x35. This according to the datasheet and tests with a PCA9450A. Related-to: ELB-3130 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2020-10-13MLK-17348 xhci: Reset endpoint when endpoint is haltedYe Li
When testing a poor USB disk "Transcend JetFlash XPGMC7W5 ", sometime we will get TRB TX error during getting string descriptors, then the usb process aborts due to the context state changed to halted. Actually when the endpoint context state is halted, we can send reset endpoint command to put it to stopped state, then set TR dequeue pointer for following doorbell ring to re-run it. This patch adds this error recovery mechanism. Signed-off-by: Ye Li <ye.li@nxp.com>
2020-10-13toradex: tdx-cfg-clock: add new i.mx 8m mini/plus skusMarcel Ziswiler
Add new i.MX 8M Mini/Plus SKUs to ConfigBlock handling: 0058: Verdin iMX8M Plus Quad 4GB Wi-Fi / BT IT 0059: Verdin iMX8M Mini Quad 2GB IT 0060: Verdin iMX8M Mini DualLite 1GB WB IT 0061: Verdin iMX8M Plus Quad 2GB Related-to: ELB-3128 Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2020-10-08configs: apalis-imx8x.h: define FEC_ENET_ENABLE_TXC_DELAYPhilippe Schenker
We need a delay on RGMII TXC clock line by 2ns to accomodate to the data-line edges. In the RGMII standard this has to be done by the MAC for TXC and by the PHY for RXC. fsl,rgmii_txc_dly that is used in linux-kernel is not implemented in U-Boot so use the actual implemented define FEC_ENET_ENABLE_TXC_DELAY RXC delay will be done by KSZ9131 PHY. Related-to: ELB-3056 Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2020-10-08ARM: dts: apalis-imx8qxp: remove unnecessary delay flagsPhilippe Schenker
Those flags are not implemented in U-Boot so delete them that they don't continue to confuse people. Related-to: ELB-3056 Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2020-10-05colibri-imx8x: reserve usb cdet gpio pinOleksandr Suvorov
After running a command "ums" u-boot shows the warning: "gpio@5d0d0000: get_value: error: gpio GPIO5_9 not reserved". Reserve the usb_cdet pin (GPIO5_9) for usbotg1 to fix this warning. Related-to: ELB-3077 Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-09-30colibri-imx8x: add board_ci_udc_phy_mode() and drop legacy usb initIgor Opaniuk
1. Drop legacy board_usb_init(), as we use information from device tree now. 2. As U-Boot doesn't have any extcon-usb-gpio framework for generation of USB cable states from the USB ID pin connected to a GPIO pin, provide board_ci_udc_phy_mode() functions which checks gpio line state. Related-to: ELB-3077 Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-09-30usb: gadget: ci_udc: introduce board_ci_udc_phy_modeIgor Opaniuk
Introduce board_ci_udc_phy_mode() weak function which provides opportunity to re-define the logic of OTG role detection, and use board specific way of generation of USB cable states (for example, when USB ID pin is connected to a GPIO pin). Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>