summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-07-10spi: mxc_spi: fix warnings if CLK_ENABLED not setStefano Babic1-2/+2
Following warnings (unused variables) are raised: drivers/spi/mxc_spi.c: In function 'mxc_spi_probe': drivers/spi/mxc_spi.c:595:14: error: unused variable 'blob' [-Werror=unused-variable] 595 | const void *blob = gd->fdt_blob; | ^~~~ drivers/spi/mxc_spi.c:594:6: error: unused variable 'node' [-Werror=unused-variable] 594 | int node = dev_of_offset(bus); Move the variable declaration inside the code where they are used. Signed-off-by: Stefano Babic <sbabic@denx.de>
2021-07-10mx6sabresd: Make checkboard respect CONFIG_NXP_BOARD_REVISIONCody Gray1-1/+4
The default implementation of checkboard() calls the nxp_board_rev_string() function to retrieve a character representing the revision number of the board. However, this attempt to retrieve the revision number may fail in certain situations or be otherwise undesirable. There is already a configuration option to avoid retrieving the revision number of the board: CONFIG_NXP_BOARD_REVISION. In fact, if this option is enabled, the nxp_board_rev_string() function's definition will be omitted entirely, meaning that the previous implementation of checkboard() would result in a linker error. This changeset makes the default implementation of checkboard() respect the CONFIG_NXP_BOARD_REVISION configuration option, only attempting to retrieve the board revision number if that option is defined. Signed-off-by: Cody Gray <cody@codygray.com>
2021-07-10ARM: imx: Pick correct eMMC boot partition from ROM logMarek Vasut1-0/+61
In case the iMX8M boot from eMMC boot partition and the primary image is corrupted, the BootROM is capable of starting a secondary image in the other eMMC boot partition as a fallback. However, the BootROM leaves the eMMC BOOT_PARTITION_ENABLE setting as it was, i.e. pointing to the boot partition containing the corrupted image, and the BootROM does not provide any indication that this sort of fallback occured. According to AN12853 i.MX ROMs Log Events, Rev. 0, May 2020, it is possible to determine whether fallback event occurred by parsing the ROM event log. In case ROM event ID 0x51 is present, fallback event did occur. This patch implements ROM event log parsing and search for event ID 0x51 for all iMX8M SoCs, and based on that corrects the eMMC boot partition selection. This way, the SPL loads the remaining boot components from the same eMMC boot partition from which it was started, even in case of the fallback. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Faiz Abbas <faiz_abbas@ti.com> Cc: Harald Seiler <hws@denx.de> Cc: Lokesh Vutla <lokeshvutla@ti.com> Cc: Simon Glass <sjg@chromium.org> Cc: Fabio Estevam <festevam@gmail.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Ye Li <ye.li@nxp.com>
2021-07-10spl: mmc: Factor out eMMC boot partition selection codeMarek Vasut2-13/+47
Factor out eMMC boot partition selection code into default_spl_mmc_emmc_boot_partition() function and implement weak spl_mmc_emmc_boot_partition(), so that architecture or board code can override the eMMC boot partition selection. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Faiz Abbas <faiz_abbas@ti.com> Cc: Harald Seiler <hws@denx.de> Cc: Lokesh Vutla <lokeshvutla@ti.com> Cc: Simon Glass <sjg@chromium.org> Cc: Fabio Estevam <festevam@gmail.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Ye Li <ye.li@nxp.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2021-07-10board: gateworks: venice: remove forced enable of GSC thermal protectionTim Harvey1-3/+5
The Gateworks System Controller thermal protection feature will disable the board primary power supply if the on-board temperature sensor reaches 86C. In many cases this could occur before the temperature critical components such as CPU, DRAM, eMMC, and power supplies have reached their max temperature. Remove the forced re-enable of thermal protection so that users can knowingly disable it. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-07-10board: gateworks: venice: add ftd_file env vars on bootTim Harvey1-3/+16
The ftd_file* vars can be used by bootscripts to look for appropriate dtb's Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-07-10board: gateworks: venice: display DTB usedTim Harvey1-1/+5
Display the DTB file used for U-Boot. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-07-10board: gateworks: venice: gsc: fix voltage offsetTim Harvey1-1/+1
The voltage offset property is in microvolts so must be scaled accordingly. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-07-10board: gateworks: venice: gsc: fix typoTim Harvey1-1/+1
Fix typo in error message. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-07-10configs: imx8mm_venice_defconfig: add support for gbe switchTim Harvey1-0/+4
The imx8mm-venice-gw7901 board has an I2C connected KSZ9897S GbE switch with an IMX8MM FEC MAC master connected via RGMII_ID. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-07-10arm: dts: imx8mm-venice-gw7901.dts: fix dsa switch configurationTim Harvey1-1/+36
Fix the dsa switch config: - remove the unnecessary phy-mode from the switch itself - added the necessary fixed-link node to the non-cpu ports required for U-Boot DSA Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-07-10net: add support for KSZ9477/KSZ9897/KSZ9567 GbE switchTim Harvey3-0/+554
The Microchip KSZ9477/KSZ9897/KSZ9567 7-Port Gigabit Ethernet Switches support SGMII/RGMII/MII/RMII with register access via SPI, I2C, or MDIO. This driver currently supports I2C register access but SPI or MDIO register access can be easily added at a later time. Tagging is not implemented and instead the active port is tracked to avoid needing a tag to store port information. This was tested with the imx8mm-venice-gw7901 board which has a KSZ9897S switch with an IMX8MM FEC MAC master connected via RGMII_ID. Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2021-07-10net: dsa: enable master promisc mode if available and neededTim Harvey1-1/+8
If ports have their own unique MAC addrs and master has a set_promisc function, call it so that packets will be received for ports. Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2021-07-10net: fec: add set_promisc functionTim Harvey2-0/+14
Enabling promiscuous mode is necessary if FEC is the master of a DSA switch driver where each port has their own MAC address. Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2021-07-10net: add set_promisc function to enable/disable Promiscuous modeTim Harvey1-0/+2
Enabling promiscuous mode can be useful for DSA switches where each port has its own MAC address. Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2021-07-10net: fec: set phy_of_node properly for fixed-link phyTim Harvey1-1/+5
If the FEC is connected to a fixed-link (upstream switch port for example) the phy_of_node should be set to the fixed-link node so that speed and other properties can be found properly. In addition fix a typo in the debug string. Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2021-07-10net: fec: use device sequence vs index when fetching fecTim Harvey1-1/+1
When using uclass_get_device* to get the FEC device we need to use device sequence instead of index into UCLASS_ETH. In systems where for example a I2C based DSA switch exists it will probe before the FEC master and its ports will be registered first and have the first indexes yet the FEC's sequence comes from the device-tree alias. Take for example the imx8mm-venice-gw7901 board which has an i2c based DSA switch: u-boot=> net list eth1 : lan1 00:0d:8d:aa:00:2f eth2 : lan2 00:0d:8d:aa:00:30 eth3 : lan3 00:0d:8d:aa:00:31 eth4 : lan4 00:0d:8d:aa:00:32 eth0 : ethernet@30be0000 00:0d:8d:aa:00:2e active Thus in this case uclass_get_device(UCLASS_ETH, 0, &dev) returns lan1 which is wrong but uclass_get_device_seq(UCLASS_ETH, 0, &dev) returns ethernet@30be000 which is correct. Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2021-07-10board: gateworks: venice: add imx8mm-gw7901 supportTim Harvey5-2/+1193
The Gateworks GW7901 is an ARM based single board computer (SBC) featuring: - i.MX8M Mini SoC - LPDDR4 DRAM - eMMC FLASH - SPI FRAM - Gateworks System Controller (GSC) - Atmel ATECC Crypto Authentication - USB 2.0 - Microchip GbE Switch - Multiple multi-protocol RS232/RS485/RS422 Serial ports - onboard 802.11ac WiFi / BT - microSD socket - miniPCIe socket with PCIe, USB 2.0 and dual SIM sockets - Wide range DC power input - 802.3at PoE To add support for this board: - add dts from Linux (accepted for v5.14) - add SPL PMIC config Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-07-10spi: fsl_qspi: Build driver only if DM_SPI is availableFrieder Schrempf1-1/+1
The driver depends on DM_SPI and if it's not available (e. g. in SPL), then we should not try to build it as this will fail. Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
2021-07-10arm/mach-imx: Fix macros in mmdc_size.cKacper Kubkowski1-5/+5
Make macros actually use passed parameter instead of local variables that happen to be named the same as symbols in macro expansion. Signed-off-by: Kacper Kubkowski <kkubkowski@fluence.pl>
2021-07-10board: phytec: imx8mp-phycore: Switch to binmanTeresa Remmet3-2/+13
Use now binman for image creation. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Reviewed-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2021-07-10arm: dts: imx8mp-phyboard-pollux-rdk-u-boot: Add wdog pinctrl entryTeresa Remmet1-0/+4
Add missing pinctrl entry in spl. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2021-07-10board: phytec: phycore-imx8mp: Enable DVS1 controlTeresa Remmet1-1/+5
Enable DVS1 control through PMIC_STBY_REQ. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2021-07-10board: phytec: phycore_imx8mp: Set VDD_ARM to 0,95VTeresa Remmet2-1/+11
Increase VDD_ARM to prevent timing issues as VDD_SOC is used in OD mode. Also increase GIC clock. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2021-07-10board: phytec: phycore_imx8mp: Add fec supportTeresa Remmet3-0/+38
Enable support for the fec ethernet on phyCORE-i.MX8MP. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Reviewed-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2021-07-10board: phytec: phycore_imx8mp: Change debug UARTTeresa Remmet4-13/+13
With the first redesign the debug UART had changed from UART2 to UART1. As the first hardware revision is considered as alpha and will not be supported in future. The old setup will not be preserved. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Reviewed-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2021-07-10arm: dts: imx8mp-phyboard-pollux: Sync dts files with kernelTeresa Remmet2-2/+46
This update includes eqos support and some minor changes. Synced with kernel commit 412627f6ffe3 ("arm64: dts: imx8mp-phyboard-pollux-rdk: Add missing pinctrl entry") Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Reviewed-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2021-07-10arm: dts: imx8mp: Add common u-boot dtsiTeresa Remmet3-178/+153
Factor out the common node settings for dm-spl and dm-pre-reloc and move them to imx8mp-u-boot.dtsi Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Reviewed-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2021-07-10arm: dts: imx8mp: Resync imx8mp device tree includeTeresa Remmet1-5/+141
Sync imx8mp include with kernel commit: d1689cd3c0f4 ("arm64: dts: imx8mp: Use the correct name for child node "snps, dwc3"") Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Reviewed-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2021-07-10pci: imx: use reset-gpios if defined by device-treeTim Harvey3-7/+27
If reset-gpio is defined by device-tree use that if CONFIG_PCIE_IMX_PERST_GPIO is not defined. Note that after this the following boards which define CONFIG_PCIE_IMX_PERST_GPIO in their board header file as well as their device-tree should be able to remove CONFIG_PCIE_IMX_PERST_GPIO without consequence: - mx6sabresd - mx6sxsabresd - novena - tbs2910 - vining_2000 Note that the ge_bx50v3 board uses CONFIG_PCIE_IMX_PERST_GPIO and does not have reset-gpios defined it it's pcie node in the dt thus removing CONFIG_PCIE_IMX_PERST_GPIO globally can't be done until that board adds reset-gpios. Cc: Ian Ray <ian.ray@ge.com> (maintainer:GE BX50V3 BOARD) Cc: Sebastian Reichel <sebastian.reichel@collabora.com> (maintainer:GE BX50V3 BOARD) Cc: Fabio Estevam <festevam@gmail.com> (maintainer:MX6SABRESD BOARD) Cc: Marek Vasut <marex@denx.de> (maintainer:NOVENA BOARD) Cc: Soeren Moch <smoch@web.de> (maintainer:TBS2910 BOARD) Cc: Silvio Fricke <open-source@softing.de> (maintainer:VINING_2000 BOARD) Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-07-10smegw01: Select the CMD_UNZIP optionFabio Estevam1-0/+1
Select the CMD_UNZIP option so that the 'gzwrite' command can be used to flash .gz image into the eMMC. Signed-off-by: Fabio Estevam <festevam@denx.de>
2021-07-10smegw01: Allow booting the Yocto image by defaultFabio Estevam1-3/+3
On the Yocto image there is a single partition and the kernel and dtb are present in the 'boot' directory. Change it accordingly so that the board can boot the Yocto image by default. Use the generic 'load' command instead, which is able to read from an ext4 partition. Signed-off-by: Fabio Estevam <festevam@denx.de>
2021-07-10imx: ventana: display 'none' for MMC if board does not have itTim Harvey1-0/+1
print 'None' instead of just a blank line if nothing is detected: MMC: None Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-07-10imx: ventana: add support for DLC0700XDP21LF LCD displayTim Harvey1-0/+21
Add LVDS support for DLC0700XDP21LF 7in 1024x600 display (equivalent to the DLC-700JMGT4 with new touch controller) Signed-off-by: Robert Jones <rjones@gateworks.com> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-07-10imx: ventana: display neteowrk PHYTim Harvey1-0/+2
Add displaying the detected network PHY on boot. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-07-10imx: ventana: add DP83867 PHY LED configurationTim Harvey1-0/+6
Add DP83867 PHY LED configuration. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-07-10imx: ventana: put LTC3676 regulators in continuous modeTim Harvey1-0/+6
In the default pulse-skipping mode regulators that are very lightly loaded can fail to regulate properly. Switching them to always use continuous mode causes only around 10mW of overall system power difference in a lightly loaded system that isn't already operating them in continuous mode. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-07-10imx: ventana: put PFUZ100 regulators in continuous modeTim Harvey1-0/+26
In the default 'auto' mode regulators that are very lightly loaded can be put in PFM mode and fail to regulator properly. Switching them to always use continuous PWM mode has a neglibable affect on system power and garuntees proper regulation under lightly loaded circumstances. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-07-10imx: ventana: add PMIC fix for GW54xx-GTim Harvey1-0/+22
Substitutions in EOL parts changes the VDD_2P5 voltage rail such that the previously unused VGEN6 LDO is needed in place of the lower power VGEN5 for the GW54xx-G. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-07-10imx: ventana: add legacy uboot image supportTim Harvey3-3/+0
Add Legacy U-Boot image support needed to boot a uImage. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-07-10imx: ventana: increase SYS_BOOTM_LENTim Harvey1-0/+3
Increase SYS_BOOM_LEN from the default 16M in imx6_common to 64M. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-07-10imx: ventana: remove unneeded includesTim Harvey1-14/+0
remove unnecessary includes Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-07-10imx: ventana: remove USB_KEYBOARD supportTim Harvey3-3/+0
For some time now having USB_KEYBOARD support has caused usb to be initialized on boot. To allow for a quicker bootup we don't want this for Ventana and don't really need USB keyboard support so remove it. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-07-10imx8m: Restrict usable memory to space below 4G boundaryFrieder Schrempf1-0/+14
Some IPs have their accessible address space restricted by the interconnect. Let's make sure U-Boot only ever uses the space below the 4G address boundary (which is 3GiB big), even when the effective available memory is bigger. We implement board_get_usable_ram_top() for all i.MX8M SoCs, as the whole family is affected by this. Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
2021-07-10clk: imx8mm: Add SPI clocksFrieder Schrempf1-1/+22
Add the clocks for the ECSPI controllers. This is ported from Linux v5.13-rc4. Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
2021-07-10mtd: spi-nor-ids: Add support for Macronix MX25V8035F and MX25R1635FFrieder Schrempf1-0/+2
The MX25V8035F is a 8Mb SPI NOR flash and the MX25R1635F is very similar, but has twice the size (16Mb) and supports a wider supply voltage range. They were tested on the Kontron Electronics i.MX6UL and i.MX8MM SoMs. Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
2021-07-10ARM: imx6: Update dhelectronics/dh_imx6/MAINTAINERS fileChristoph Niedermaier1-1/+2
Adding new DH electronics mailing list and update list of maintainers. Signed-off-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
2021-07-10Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxiTom Rini42-136/+737
Aside from the usual fixes and updates one visible change is the MMC update, which fixes some lingering bugs and gives a decent speed increase on some boards (9->19 MB/s on H6, 21->43 MB/s on A64 eMMC). I am keeping an watchful eye on bug reports here, to spot any correctness regressions. Another change is finally the enablement of the first USB host port on many boards without micro-USB (data) sockets, like the Pine64 family. That doubles the number of usable USB ports from 1 to 2 on those boards. Some smaller fixes, 4GB DRAM support (on the H616) and a new board (ZeroPi) conclude this first round of changes. Compile-tested for all 157 sunxi boards, boot-tested on Pine H64, Pine64-LTS, OrangePi Zero 2 and BananaPi M2 Berry. Summary: - DT update for H3/H5/H6 - Enable first USB port on boards without micro-USB - ZeroPi board support - 4GB DRAM support for H616 boards - MMC fixes and speed improvement - some fixes
2021-07-10mmc: sunxi: Use mmc_of_parse()Andre Przywara1-15/+17
At the moment the Allwinner MMC driver parses the bus-width and non-removable DT properties itself, in the probe() routine. There is actually a generic function provided by the MMC framework doing this job, also it parses more generic properties like broken-cd and advanced transfer modes. Drop our own code and call mmc_of_parse() instead, to get all new features for free. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2021-07-10mmc: sunxi: Increase MMIO FIFO read performanceAndre Przywara2-8/+32
To avoid the complexity of DMA operations (with chained descriptors), we use repeated MMIO reads and writes to the SD_FIFO_REG, which allows us to drain or fill the MMC data buffer FIFO very easily. However those MMIO accesses are somewhat costly, so this limits our MMC performance, to between 17 and 22 MB/s, but down to 9.5 MB/s on the H6 (partly due to the lower AHB1 frequency). As it turns out we read the FIFO status register after *every* word we read or write, which effectively doubles the number of MMIO accesses, thus effectively more than halving our performance. To avoid this overhead, we can make use of the FIFO level bits, which are in the very same FIFO status registers. So for a read request, we now can collect as many words as the FIFO level originally indicated, and only then need to update the status register. We don't know for sure the size of the FIFO (and it seems to differ across SoCs anyway), so writing is more fragile, which is why we still use the old method for that. If we find a minimum FIFO size available on all SoCs, we could use that, in a later optimisation. This patch increases the eMMC read speed on a Pine64-LTS from about 22MB/s to 44 MB/s. SD card reads don't gain that much, but with 23 MB/s we now reach the practical limit for 3.3V SD cards. On the H6 we double our transfer speed, from 9.5 MB/s to 19.7 MB/s. Signed-off-by: Andre Przywara <andre.przywara@arm.com>