summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-04-16MAINTAINERS: Add entry for SPI NAND framework and driversFrieder Schrempf
In [1] Michael agreed on taking patches for SPI NAND through the RAW NAND tree. Add a dedicated entry to the MAINTAINERS file which adds Michael and Dario as maintainers and myself as reviewer. [1] https://lists.denx.de/pipermail/u-boot/2023-February/508571.html Signed-off-by: Frieder Schrempf <[email protected]> Cc: Jagan Teki <[email protected]> Cc: Dario Binacchi <[email protected]> Cc: Michael Nazzareno Trimarchi <[email protected]> Cc: Tom Rini <[email protected]> Link: https://lore.kernel.org/all/[email protected]/ Signed-off-by: Dario Binacchi <[email protected]>
2023-04-15travis-ci: Add m68k M5208EVBE machineMarek Vasut
Add m68k M5208EVBE machine configured to test U-Boot m68k support. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2023-04-15CI: Add m68k targetMarek Vasut
Add M5208EVBE board to CI. This does not use default config due to limitations of QEMU emulation, instead the timer is switched from DMA timer to PIT timer and RAMBAR accesses are inhibited. Local QEMU launch command is as follows: $ qemu-system-m68k -nographic -machine mcf5208evb -cpu m5208 -bios u-boot.bin Signed-off-by: Marek Vasut <[email protected]> Acked-by: Angelo Dureghello <[email protected]>
2023-04-15arch: m68k: Add QEMU specific RAMBAR workaroundMarek Vasut
The QEMU emulation of m68k does not support RAMBAR accesses, add Kconfig option which inhibits those accesses, so that U-Boot can be started in m68k QEMU for CI testing purpopses until QEMU emulation improves. Signed-off-by: Marek Vasut <[email protected]>
2023-04-15arch: m68k: Introduce trivial PIT based timerMarek Vasut
The QEMU emulation of m68k does not support DMA timer, the only timer that is supported is the PIT timer. Implement trivial PIT timer support for m68k. Signed-off-by: Marek Vasut <[email protected]>
2023-04-15arch: m68k: Use existing CONFIG_MCFTMR instead of CFG_MCFTMRMarek Vasut
There is an existing CONFIG_MCFTMR Kconfig symbol, use it and drop all other instances of CFG_MCFTMR. This duality is likely a result of bogus conversion to Kconfig. Fixes: 7ff7b46e6ce ("m68k: rename CONFIG_MCFTMR to CFG_MCFTMR") Signed-off-by: Marek Vasut <[email protected]>
2023-04-14Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-marvellTom Rini
- mvebu: Boot support for 4K Native disks (Pali) - a38x: Perform DDR training sequence again for 2nd boot (Tony)
2023-04-14Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxiTom Rini
The biggest change is some refactoring of the H616 DRAM driver, which allows better fine-tuning for each board, and is the base for pending LPDDR3 and LPDDR4 support, needed by new boards. The sun8i-emac Ethernet driver sees some refactoring that enables it for the Allwinner D1 EMAC IP. The sunxi HDMI driver is now using more DT properties. Also the early SPL code now supports some odd H616 SoC variant. There are some more patches pending, that require the final review touches and some testing, I will send a separate PR for them later. The gitlab CI completed successfully, and I boot tested a few boards with different SoCs, via FEL and SD card, into Linux.
2023-04-13ddr: marvell: a38x: Perform DDR training sequence again for 2nd bootTony Dinh
- DDR Training sequence happens very fast. The speedup in boot time is negligible by skipping the training sequence during 2nd boot or after. So remove the check and skip. - This change improves the robustness of DDR training. If u-boot crashed during DDR training, the training could be left in a limbo state, where the BootROM has recorded that it is already in a 2nd boot. The training must be repeated in this scenario to get out of this limbo state, but due to the check it cannot be performed. Signed-off-by: Tony Dinh <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2023-04-13arm: mvebu: spl: Allow to build SATA kwbimage for 4K Native disksPali Rohár
Add a new config option CONFIG_MVEBU_SPL_SATA_BLKSZ for specifying block size of SATA disk. This information is used during building of SATA kwbimage and must be correctly set, otherwise BootROM does not load SPL. For 4K Native disks CONFIG_MVEBU_SPL_SATA_BLKSZ must be set to 4096. Signed-off-by: Pali Rohár <[email protected]> Tested-by: Martin Rowe <[email protected]>
2023-04-13tools: kwboot: Add support for parsing SATA images with non-512 block sizePali Rohár
Currently kwboot expected that sector size for SATA image is always 512 bytes. If SATA image cannot be parsed with sector size of 512 bytes, try larger sector sizes which are power of two and up to the 32 kB. Maximal theoretical value is 32 kB because ATA IDENTIFY command returns sector size as 16-bit number. Signed-off-by: Pali Rohár <[email protected]>
2023-04-13tools: kwbimage: Add support for SATA images with non-512 byte block sizePali Rohár
SATA kwbimage contains offsets in block size unit, not in bytes. Until now kwbimage expected that SATA disk always have block size of 512 bytes. But there are 4K Native SATA disks with block size of 4096 bytes. New SATA_BLKSZ command allows to specify different block size than 512 bytes and therefore allows to generate kwbimage for disks with different block sizes. This change add support for generating SATA images with different block size. Also it add support for verifying and dumping such images. Because block size itself is not stored in SATA kwbimage, image verification is done by checking every possible block size (it is any power of two value between 512 and 32 kB). Signed-off-by: Pali Rohár <[email protected]>
2023-04-13tools: kwbimage: Simplify align codePali Rohár
Replace repeated code patterns by generic code. Signed-off-by: Pali Rohár <[email protected]>
2023-04-13tools: imagetool: Extend print_header() by params argumentPali Rohár
This allows image type print_header() callback to access struct image_tool_params *params. Signed-off-by: Pali Rohár <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-04-13cmd: mvebu/bubt: a38x: Do not hardcode SATA block size to 512Pali Rohár
Find SATA block device by blk_get_devnum_by_uclass_id() function and read from it the real block size of the SATA disk. In case of error, fallback back to 512 bytes. Signed-off-by: Pali Rohár <[email protected]>
2023-04-13arm: mvebu: spl: Do not hardcode SATA block size to 512Pali Rohár
Find SATA block device by blk_get_devnum_by_uclass_id() function and read from it the real block size of the SATA disk. Signed-off-by: Pali Rohár <[email protected]>
2023-04-12sunxi: A64: drop boot0 header reservationAndre Przywara
In the early days of the Allwinner A64 U-Boot support, we relied on a vendor provided "boot0" binary to perform the DRAM initialisation. This replaced the SPL, and required to equip the U-Boot (proper) binary with a vendor specific header to be recognised as a valid boot0 payload. Fortunately these days are long gone (we gained SPL and DRAM support in early 2017!), and we never needed to use that hack on any later 64-bit Allwinner SoC. Since this is highly obsolete by now, remove that option from the defconfigs of all A64 boards. We leave the code still in here for now, since some people expressed their interest in this. Signed-off-by: Andre Przywara <[email protected]> Reviewed-by: Jernej Skrabec <[email protected]>
2023-04-12sunxi: arm64: boot0.h: runtime check for RVBAR addressAndre Przywara
Some SoCs of the H616 family use a die variant, that puts some CPU power and reset control registers at a different address. There are examples of two instances of the same board, using different die revisions of the otherwise same H313 SoC. We need to write to a register in that block *very* early in the SPL boot, to switch the core to AArch64. Since the devices are otherwise indistinguishable, let the SPL code read that die variant and use the respective RVBAR address based on that. That is a bit tricky, since we need to do that in hand-coded AArch32 machine language, shared by all 64-bit SoCs. To avoid build dependencies in this mess, we always provide two addresses to choose from, and just give identical values for all other SoCs. This allows the same code to run on all 64-bit SoCs, and controls this switch behaviour purely from Kconfig. Signed-off-by: Andre Przywara <[email protected]> Reviewed-by: Jernej Skrabec <[email protected]>
2023-04-12sunxi: boot0.h: allow RVBAR MMIO address customisationAndre Przywara
To switch the ARMv8 Allwinner SoCs into the 64-bit AArch64 ISA, we need to program the 64-bit start code address into an MMIO mapped register that shadows the architectural RVBAR register. This address is SoC specific, with just two versions out there so far. Now a third address emerged, on a *variant* of an existing SoC (H616). Change the boot0.h start code to make this address a Kconfig selectable option, to allow easier maintenance. Signed-off-by: Andre Przywara <[email protected]> Reviewed-by: Jernej Skrabec <[email protected]>
2023-04-12sunxi: Add TPR2 parameter for H616 DRAM driverJernej Skrabec
It turns out that some H616 and related SoCs (like H313) need TPR2 parameter for proper working. Add it. Signed-off-by: Jernej Skrabec <[email protected]> Reviewed-by: Andre Przywara <[email protected]> Signed-off-by: Andre Przywara <[email protected]>
2023-04-12sunxi: Parameterize some of H616 DDR3 timingsJernej Skrabec
Currently twr2rd, trd2wr and twtp are constants, but according to vendor driver they are calculated from other values. Do that here too, in preparation for later introduction of new parameter. While at it, introduce constant for t_wr_lat, which was incorrectly calculated from tcl before. Signed-off-by: Jernej Skrabec <[email protected]> Reviewed-by: Andre Przywara <[email protected]> Signed-off-by: Andre Przywara <[email protected]>
2023-04-12sunxi: Parameterize "unknown feature" in H616 DRAM driverJernej Skrabec
Part of the code, previously known as "unknown feature", also doesn't have constant values. They are derived from TPR0 parameter in vendor DRAM code. Let's move that code to separate function and introduce TPR0 parameter here too, to ease adding new boards. Signed-off-by: Jernej Skrabec <[email protected]> Acked-by: Andre Przywara <[email protected]> Signed-off-by: Andre Przywara <[email protected]>
2023-04-12sunxi: Parameterize bit delay code in H616 DRAM driverJernej Skrabec
These values are highly board specific and thus make sense to add parameter for them. To ease adding support for new boards, let's make them same as in vendor DRAM settings. Signed-off-by: Jernej Skrabec <[email protected]> Acked-by: Andre Przywara <[email protected]> Signed-off-by: Andre Przywara <[email protected]>
2023-04-12sunxi: Make bit delay function in H616 DRAM code voidJernej Skrabec
Mentioned function result is always true and result isn't checked anyway. Let's make it void. Reviewed-by: Andre Przywara <[email protected]> Signed-off-by: Jernej Skrabec <[email protected]> Signed-off-by: Andre Przywara <[email protected]>
2023-04-12sunxi: Always configure ODT on H616 DRAMJernej Skrabec
Vendor H616 DRAM code always configure part which we call ODT configuration. Let's reflect that here too. Signed-off-by: Jernej Skrabec <[email protected]> Reviewed-by: Andre Przywara <[email protected]> Signed-off-by: Andre Przywara <[email protected]>
2023-04-12sunxi: Convert H616 DRAM options to single settingJernej Skrabec
Vendor DRAM settings use TPR10 parameter to enable various features. There are many mores features that just those that are currently mentioned. Since new will be added later and most are not known, let's reuse value from vendor DRAM driver as-is. This will also help adding support for new boards. Signed-off-by: Jernej Skrabec <[email protected]> Reviewed-by: Andre Przywara <[email protected]> Signed-off-by: Andre Przywara <[email protected]>
2023-04-12sunxi: parameterize H616 DRAM ODT valuesJernej Skrabec
While ODT values for same memory type are similar, they are not necessary the same. Let's parameterize them and make parameter same as in vendor DRAM settings. That way it will be easy to introduce new board support. Reviewed-by: Andre Przywara <[email protected]> Signed-off-by: Jernej Skrabec <[email protected]> Signed-off-by: Andre Przywara <[email protected]>
2023-04-12sunxi: cosmetic: Fix H616 DRAM driver code styleJernej Skrabec
Fix code style for pointer declaration. This is just cosmetic change to avoid checkpatch errors in later commits. Reviewed-by: Andre Przywara <[email protected]> Signed-off-by: Jernej Skrabec <[email protected]> Signed-off-by: Andre Przywara <[email protected]>
2023-04-12sunxi: Fix write to H616 DRAM CR registerJernej Skrabec
Vendor DRAM code actually writes to whole CR register and not just sets bit 31 in mctl_ctrl_init(). Just to be safe, do that here too. Acked-by: Andre Przywara <[email protected]> Signed-off-by: Jernej Skrabec <[email protected]> Signed-off-by: Andre Przywara <[email protected]>
2023-04-12ARM: dts: sun6i: mixtile-loftq: Add USB1 VBUS regulatorSamuel Holland
This board is configured with CONFIG_USB1_VBUS_PIN="PH24", but no regulator exists in its device tree. Add the regulator, so USB will continue to work when the PHY driver switches to using the regulator uclass instead of a GPIO. Update the device tree here because it does not exist in Linux. Signed-off-by: Samuel Holland <[email protected]> Reviewed-by: Andre Przywara <[email protected]> Signed-off-by: Andre Przywara <[email protected]>
2023-04-12net: sun8i-emac: Remove the SoC variant IDSamuel Holland
Now that all differences in functionality are covered by individual flags, remove the enumeration of SoC variants. Signed-off-by: Samuel Holland <[email protected]> Reviewed-by: Andre Przywara <[email protected]> Reviewed-by: Ramon Fried <[email protected]> Signed-off-by: Andre Przywara <[email protected]>
2023-04-12net: sun8i-emac: Use common syscon setup for R40Samuel Holland
While R40 puts the EMAC syscon register at a different address from other variants, the relevant portion of the register's layout is the same. Factor out the register offset so the same code can be shared by all variants. This matches what the Linux driver does. This change provides two benefits beyond the simplification: - R40 boards now respect the RX delays from the devicetree - This resolves a warning on architectures where readl/writel expect the address to have a pointer type, not phys_addr_t. Signed-off-by: Samuel Holland <[email protected]> Reviewed-by: Andre Przywara <[email protected]> Reviewed-by: Ramon Fried <[email protected]> Signed-off-by: Andre Przywara <[email protected]>
2023-04-12net: sun8i-emac: Add a flag for the internal PHY switchSamuel Holland
Describe this feature instead of using the SoC ID. Signed-off-by: Samuel Holland <[email protected]> Reviewed-by: Andre Przywara <[email protected]> Reviewed-by: Ramon Fried <[email protected]> Signed-off-by: Andre Przywara <[email protected]>
2023-04-12net: sun8i-emac: Add a flag for RMII supportSamuel Holland
Describe this feature instead of using the SoC ID. Signed-off-by: Samuel Holland <[email protected]> Reviewed-by: Andre Przywara <[email protected]> Reviewed-by: Ramon Fried <[email protected]> Signed-off-by: Andre Przywara <[email protected]>
2023-04-12net: sun8i-emac: Add a structure for variant dataSamuel Holland
Currently, EMAC variants are distinguished by their identity, but this gets unwieldy as more overlapping variants are added. Add a structure so we can describe the individual feature differences between the variants. Signed-off-by: Samuel Holland <[email protected]> Reviewed-by: Andre Przywara <[email protected]> Reviewed-by: Ramon Fried <[email protected]> Signed-off-by: Andre Przywara <[email protected]>
2023-04-12video: sunxi: dw-hdmi: Use DM for HVCC regulatorSamuel Holland
The HDMI PHY depends on the HVCC supply being enabled. So far we have relied on it being enabled by an earlier firmware stage (SPL or TF-A). Attempt to enable the regulator here, so we can remove that dependency. Signed-off-by: Samuel Holland <[email protected]> Signed-off-by: Andre Przywara <[email protected]> Reviewed-by: Jernej Skrabec <[email protected]>
2023-04-12video: sunxi: dw-hdmi: Use DM for clock gates and resetsSamuel Holland
This abstracts away the CCU register layout, which is necessary for supporting new SoCs like H6 with a reorganized CCU. One of the resets is referenced from the PHY node instead of the controller node, so it will have to wait until the PHY code is factored out to a separate driver. Signed-off-by: Samuel Holland <[email protected]> Signed-off-by: Andre Przywara <[email protected]> Reviewed-by: Jernej Skrabec <[email protected]>
2023-04-11Merge tag 'for-v2023-07-rc1' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-i2c i2c updates for v2023-07-rc1 - designware_i2c: remove apparently redundant read of 'i2c, speeds' DT property from Rasmus Villemoes - fix: correct I2C deblock logic from Haibo Chen - imx_lpi2c: Fix misuse the IS_ENABLED for DM clock from Ye Li - m68k: convert to DM from Angelo Dureghello
2023-04-11m68k: upgrading all boards to dm i2cAngelo Dureghello
Upgrading all board configs where i2c is involved to DM i2c. Signed-off-by: Angelo Dureghello <[email protected]>
2023-04-11m68k: dts: add i2c nodesAngelo Dureghello
Add all the i2c nodes for each family, and add specific i2c overwrites in the related board-specific dts. Signed-off-by: Angelo Dureghello <[email protected]>
2023-04-11i2c: fsl_i2c: fix m68k transfertsAngelo Dureghello
This driver is actually used for powerpc and m68k/ColdFire. On ColdFire SoC's, interrupt flag get not set if IIEN flag (mbcr bit6, interrupt enabled) is not set appropriately before each transfert. As a result, the transfert hangs forever waiting for IIEN. This patch set IIEN before each transfert, while considering this fix as not harming powerpc arch. Signed-off-by: Angelo Dureghello <[email protected]>
2023-04-11m68k: mcf5441x: fix CONFIG_SYS_FSL_I2C definitionAngelo Dureghello
Fix CONFIG_SYS_FSL_I2C to correct name CONFIG_SYS_I2C_FSL. Signed-off-by: Angelo Dureghello <[email protected]>
2023-04-11board: stmark2: add i2c0 pinmux pad configurationAngelo Dureghello
Add CFG option to enable proper pinmux pad setting for i2c0. Signed-off-by: Angelo Dureghello <[email protected]>
2023-04-11m68k: move CONFIG_SYS_I2C to CFG_ namespaceAngelo Dureghello
Move CONFIG_SYS_I2C_X to CFG_ namespace. This is a preliminary step to move to dm i2c. Signed-off-by: Angelo Dureghello <[email protected]>
2023-04-11i2c: imx_lpi2c: Fix misuse the IS_ENABLED for DM clockYe Li
The IS_ENABLED, which does not consider SPL build, should be replaced by CONFIG_IS_ENABLED. For the case that we only enable DM CLK for u-boot but not in SPL, the IS_ENABLED(CONFIG_CLK) still returns true, then cause clock failure. Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Ye Li <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2023-04-11i2c: correct I2C deblock logicHaibo Chen
Current code use dm_gpio_get_value() to get SDA and SCL value, and the value depends on whether DTS file config the GPIO_ACTIVE_LOW. In ususal case for i2c GPIO, DTS need to set GPIO_ACTIVE_LOW for SCL/SDA pins. So here the logic is not correct. And we must not use GPIOD_ACTIVE_LOW in client code include the dm_gpio_set_dir_flags(), it is DTS's responsibility for this flag. So remove GPIOD_ACTIVE_LOW here. Fixes: aa54192d4a87 ("dm: i2c: implement gpio-based I2C deblock") Signed-off-by: Haibo Chen <[email protected]> Reviewed-by: Alexander Kochetkov <[email protected] <mailto:[email protected]>>
2023-04-11i2c: designware_i2c: remove apparently redundant read of 'i2c, speeds' DT ↵Rasmus Villemoes
property This code first figures out if there is an i2c,speeds property, if so its size in u32s, and then reads the value into the local speeds[] array. Both 'size' and 'speeds' are completely unused thereafter. It's not at all clear what this is supposed to do. Of course, it could be seen as a sanity check that the DT node does have an i2c,speeds property with an appropriate number of elements, but for that one wouldn't actually need to read it into speeds[]. Also, I can't find anywhere else in the U-Boot code which makes use of values from that property (this is is the only C code referencing "i2c,speeds"), so it seems pointless to insist that it's there. Signed-off-by: Rasmus Villemoes <[email protected]>
2023-04-10Merge https://source.denx.de/u-boot/custodians/u-boot-mmcTom Rini
2023-04-10cmd: mmc: Return CMD_RET_* from commandsPali Rohár
Numeric return values may cause strange errors line: exit not allowed from main input shell. Signed-off-by: Pali Rohár <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-04-10mmc: Use EXT_CSD_EXTRACT_BOOT_PART() macro for extracting boot partPali Rohár
Mask macro PART_ACCESS_MASK filter out access bits of emmc register and macro EXT_CSD_EXTRACT_BOOT_PART() extracts boot part bits of emmc register. So use EXT_CSD_EXTRACT_BOOT_PART() when extracting boot partition. Signed-off-by: Pali Rohár <[email protected]> Reviewed-by: Simon Glass <[email protected]>