summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-09-13usb: dwc3: Use generic_phy_valid() helperJonas Karlman
The documentation for struct phy state that "The content of the structure is managed solely by the PHY API and PHY drivers". Change to use the generic_phy_valid() helper to check if phy is valid. Also remove setting phy->dev to NULL now that generic_phy_get_by_name() properly initialize phy->dev to NULL. Fixes: 142d50fbce7c ("usb: dwc3: Add support for usb3-phy PHY configuration") Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
2023-09-13phy: Set phy->dev to NULL when generic_phy_get_by_index_nodev() failsJonas Karlman
Generic phy helpers typically use generic_phy_valid() to determine if the helper should perform its function on a passed struct phy. generic_phy_valid() treat any struct phy having phy->dev set as valid. With generic_phy_get_by_index_nodev() setting phy->dev to a valid struct udevice early, there can be situations where the struct phy is returned as valid when initialization in fact failed and returned an error. Fix this by setting phy->dev back to NULL when any of the calls to of_xlate ops, device_get_supply_regulator or phy_alloc_counts fail. Also extend the dm_test_phy_base test with a test where of_xlate ops fail. Fixes: 72e5016f878d ("drivers: phy: add generic PHY framework") Fixes: b9688df3cbf4 ("drivers: phy: Set phy->dev to NULL when generic_phy_get_by_index() fails") Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
2023-09-13phy: Set phy->dev to NULL when generic_phy_get_by_name() failsJonas Karlman
generic_phy_get_by_name() does not initialize phy->dev to NULL before returning when dev_read_stringlist_search() fails. This can lead to an uninitialized or reused struct phy erroneously be report as valid by generic_phy_valid(). Fix this issue by initializing phy->dev to NULL, also extend the dm_test_phy_base test with calls to generic_phy_valid(). Fixes: b9688df3cbf4 ("drivers: phy: Set phy->dev to NULL when generic_phy_get_by_index() fails") Fixes: 868d58f69c7c ("usb: dwc3: Fix non-usb3 configurations") Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
2023-09-13net: phy: broadcom: add support for BCM54210EMarek Vasut
It's Broadcom PHY simply described as single-port RGMII 10/100/1000BASE-T PHY. It requires disabling delay skew and GTXCLK bits. BCM54210E support ported from Linux kernel commit 0fc9ae1076697 ("net: phy: broadcom: add support for BCM54210E") AUX/SHD/bcm54xx_config_clock_delay update ported from Linux 6.5-rc4 commit 28e219aea0b9e ("net: phy: broadcom: drop brcm_phy_setbits() and use phy_set_bits() instead") Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Rafał Miłecki <rafal@milecki.pl>
2023-09-13net: phy: motorcomm: Add support for YT8511 PHYNicolas Frattaroli
The YT8511 ethernet PHYs can be found on e.g. the SOQuartz or the Quartz64. Add rudimentary support for them. Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
2023-09-12Merge branch '2023-09-12-gpt-improvements' into nextTom Rini
Bring in two series to improve GPT support. For the first series from Joshua: Adds several improvements and additions to the gpt command processing, specifically (although not exclusively) for the purpose of supporting "ping-pong" booting when doing A/B boot partitions with u-boot itself. In this mechanism, u-boot must boot up, and then check if the correct boot partition is active, and if not switch the GPT partition table to the other boot partition and reboot to activate the other u-boot. In order to facilitate this, the gpt command needs to be better at preserving entry attributes when manipulating the partition table. It also learns two new commands, one which can swap the order of partitions in the table, and another that lets it change which partitions have the bootable flag. For the second series from Heinrich: To partition a block device the partition type GUIDs are needed but 'gpt read' does not provide these. Add the missing parts. There is some overlap in these two series but I believe I have merged things correctly.
2023-09-11cmd: gpt: fix gpt readHeinrich Schuchardt
To partition a block device the partition type GUIDs are needed but 'gpt read' does not provide these. Add the missing parts. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-09-11cmd: gpt: fix calc_parts_list_len()Heinrich Schuchardt
* Avoid incrementing by moving comma into strlen("uuid_disk=,") and considering NUL byte. * Appending a UUID only adds UUID_STR_LEN bytes. Don't count the terminating NUL. * The length of the hexadecimal representation of lba_int is 2 * sizeof(lba_int). * We don't use a 'MiB' postfix but a '0x' prefix. * The uuid field is only needed if configured. Fixes: 2fcaa413b3f6 ("gpt: harden set_gpt_info() against non NULL-terminated strings") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-09-11cmd: gpt: use UUID accessor more consistentlyHeinrich Schuchardt
disk_partition_uuid() and disk_partition_set_uuid() were introduced to let us avoid the usage of #ifdef when dealing with the field uuid of struct disk_partition. In allocate_disk_part() commit c5f1d005f517 ("part: Add accessors for struct disk_partition uuid") missed to use the setter. print_gpt_info() and create_gpt_partitions_list() are further functions where we should use the getter. Fixes: c5f1d005f517 ("part: Add accessors for struct disk_partition uuid") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-09-11part: rename disk_partition_type_uuid()Heinrich Schuchardt
Rename disk_partition_type_uuid to disk_partition_type_guid. Provide function descriptions for the getter and setter. Fixes: bcd645428c34 ("part: Add accessors for struct disk_partition type_uuid") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-09-11cmd: gpt: Add command to swap partition orderJoshua Watt
Adds a command called "gpt transpose" which will swap the order two partition table entries in the GPT partition table (but leaves them pointing to the same locations on disk). This can be useful for swapping bootloaders in systems that use an A/B partitioning scheme where the bootrom is hard coded to look for the bootloader in a specific index in the GPT partition table. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
2023-09-11cmd: gpt: Preserve bootable flagJoshua Watt
Sets the bootable flag when constructing the partition string from the current partition configuration. This ensures that when the partitions are written back (for example, when renaming a partition), the flag is preserved. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
2023-09-11cmd: gpt: Preserve type GUID if enabledJoshua Watt
If CONFIG_PARTITION_TYPE_GUID is enabled, the type GUID will be preserved when writing out the partition string. It was already respected when writing out partitions; this ensures that if you capture the current partition layout and write it back (such as when renaming), the type GUIDs are preserved. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
2023-09-11cmd: gpt: Add command to set bootable flagsJoshua Watt
Adds a command that can be used to modify the GPT partition table to indicate which partitions should have the bootable flag set Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
2023-09-11cmd: gpt: Add gpt_partition_bootable variableJoshua Watt
Adds an additional variable called gpt_partition_bootable that indicates if the given partition is bootable or not. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
2023-09-11tests: gpt: Remove test order dependencyJoshua Watt
Re-create a clean disk image for each test to prevent modifications from one test affecting another Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
2023-09-09Merge branch 'next_ufs' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-sh into next - UFS support and GPIO clock driver
2023-09-09ufs: ufs-renesas: Drop include common.hMarek Vasut
The "#include <common.h>" is being phased out in favor of more fine grained header management, i.e. ideally include a subset of headers that are really needed. Remove it from this driver. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-09ARM: renesas: Enable UFS on R8A779F0 S4 SpiderMarek Vasut
Enable UFS controller driver and matching UFS and SCSI commands. The former is used to initialize the device, the later is used to perform low level access to the SCSI interface of the UFS device. Enable R8A779F0 S4 Spider specific dependencies, the PCA953x driver and GPIO clock gate driver. This setup is used to toggle 38.4 MHz clock for the UFS controller. Enable support for 48bit LBA in block layer to address disks larger than 512*2^32 ~= 144 PiB. Enable use of 64bit LBA variables in the rest of U-Boot, instead of the default 32bit ones. Increase FAT cluster size to 128k as that is what is used by the filesystem that is populated on the UFS device. Use 'ufs init && scsi scan' to start the UFS device from U-Boot prompt. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-09-09ufs: ufs-renesas: Add support for Renesas R-Car UFS controllerMarek Vasut
Add support for Renesas R-Car UFS controller which needs vendor-specific initialization. Ported from Linux kernel as of commit c2ab666072bc ("scsi: ufs: Explicitly include correct DT includes") Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-09clk: Add GPIO-controlled clock gate driverMarek Vasut
Add driver which implements GPIO-controlled clock. The GPIO is used as a gate to enable/disable the clock. This matches linux clk-gpio.c driver, however this does not implement the GPIO mux part, which in U-Boot DM would be better fit in separate driver. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Sean Anderson <seanga2@gmail.com>
2023-09-08Merge branch '2023-09-08-assorted-TI-platform-updates' into nextTom Rini
- Add TI BeaglePlay support, verdin-am62 cleanups, K3-J7 DDR timing updates, IOT2050 DTS update for watchdog
2023-09-08Watchdog: Support WDIOF_CARDRESET on TI AM65x platformLi Hua Qian
To have the WDIOF_CARDRESET support for the TI AM65x platform watchdog, this patch reserves some memories, which indicate if the current boot due to a watchdog reset. Signed-off-by: Li Hua Qian <huaqian.li@siemens.com>
2023-09-08include: configs: verdin-am62: drop unused sdram addressMarcel Ziswiler
Drop unused macro. This was copied straight from the AM62x EVM but while meant for a second region of DDR this is not even needed for the AM62x EVM configurations and has meanwhile also been dropped there. Note that on the Verdin AM62, we do auto-detect the amount of SDRAM. While at it also update the comment noting that CFG_SYS_SDRAM_SIZE is the maximum which is only used for such auto-detection. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2023-09-08arm: dts: k3-j7*: ddr: Update to 0.10 version of DDR config toolNeha Malcom Francis
Update the DDR settings to those generated using 0.10 version of Jacinto 7 DDRSS Register Configuration tool. Signed-off-by: Neha Malcom Francis <n-francis@ti.com> Reviewed-by: Bryan Brattlof <bb@ti.com>
2023-09-08doc: board: ti: Add BeaglePlay documentationNishanth Menon
Add base documentation for BeaglePlay Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Nishanth Menon <nm@ti.com>
2023-09-08board: ti: am62x: Add am62x_beagleplay_* defconfigs and env fileNishanth Menon
Add defconfig fragments for am625 based beagleplay and corresponding customized environment file for beagleplay. Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-09-08arm: dts: Add k3-am625-beagleplayRobert Nelson
BeagleBoard.org BeaglePlay is an easy to use, affordable open source hardware single board computer based on the Texas Instruments AM625 SoC that allows you to create connected devices that work even at long distances using IEEE 802.15.4g LR-WPAN and IEEE 802.3cg 10Base-T1L. Expansion is provided over open standards based mikroBUS, Grove and QWIIC headers among other interfaces. This board family can be identified by the 24c32 eeprom: [aa 55 33 ee 01 37 00 10 2e 00 42 45 41 47 4c 45 |.U3..7....BEAGLE|] [50 4c 41 59 2d 41 30 2d 00 00 30 32 30 30 37 38 |PLAY-A0-..020078|] https://beagleplay.org/ https://git.beagleboard.org/beagleplay/beagleplay baseline of base device tree is v6.5-rc1. Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Robert Nelson <robertcnelson@gmail.com> Co-developed-by: Nishanth Menon <nm@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com>
2023-09-08arm: dts: k3-am625-sk-binman: Add labels for unsigned binaryNishanth Menon
Add labels for unsigned binary to permit over-ride. Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Nishanth Menon <nm@ti.com>
2023-09-08configs: am62x_evm_a53_defconfig: Disable semi-functional PSCI reset supportJan Kiszka
At this point, system shutdown is not supported by the DM firmware that TF-A calls. As we can't de-select only this feature[1], declare complete PSCI reset support as non-functional so that we don't signal incomplete support to the OS via EFI runtime services. This makes power-off under Linux work again when booting via EFI. [1] https://uefi.org/specs/UEFI/2.9_A/08_Services_Runtime_Services.html?highlight=efiresetshutdown#resetsystem Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2023-09-08arm: mach-k3: am625: Add support for UDA FSNishanth Menon
While boot partition support with EMMC boot is useful, it is constrained by the size of boot hardware partition itself. In the case of K3 devices, tispl images can contain OP-TEE images that can substantially vary in size and the u-boot image itself can vary over time as we enable various features. So use the CSD information in the case of EMMC_BOOT configuration being enabled to pick boot partition or UDA FS mode operation to pick. If EMMC_BOOT is disabled, then depend on filesystem configuration to pick data from UDA. While at this, drop the extraneous whitespace. Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Nishanth Menon <nm@ti.com>
2023-09-08configs: am62x_evm*: Enable EMMC_BOOT configurationNishanth Menon
Enable EMMC boot support for AM62x evm base configuration. Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Nishanth Menon <nm@ti.com>
2023-09-08arm: mach-k3: am625_init: Convert rtc_erratumi2327_init to staticNishanth Menon
The erratum is called locally, make it static, drop the #ifdeffery since it will only be called in R5 build and mark it potentially unused to stop compiler screaming at us. While at this, drop the redundant return for a void function. Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Nishanth Menon <nm@ti.com>
2023-09-08arm: mach-k3: am625_init: Use IS_ENABLED()Nishanth Menon
Drop the #ifdeffery and use IS_ENABLED() inline check and let the compiler do it's thing. Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Nishanth Menon <nm@ti.com>
2023-09-08board: ti: am62x: am62x.env: Use default findfdtNishanth Menon
Use the default findfdt using CONFIG_DEFAULT_DEVICE_TREE Reviewed-by: Tom Rini <trini@konsulko.com> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2023-09-08include: env: ti: Add a generic default_findfdt.envNishanth Menon
ti_mmc bootmethod uses a findfdt routine that is expected to be implemented by all platforms. Define a default findfdt based on configured DEFAULT_DEVICE_TREE option for u-boot. This saves duplication across multiple boards and handles architecture folder location changes centrally. TI ARMV7 platforms will need to override default_device_tree_subarch in the env file to point to the appropriate platform. Note: default "omap" is used to cater to "most common" default. Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2023-09-08include: env: ti: ti_armv7_common.env: Rename to ti_common.envNishanth Menon
ti_armv7_common does not make any more sense as it is used by armv7 and armv8 TI based platforms. Reported-by: Tom Rini <trini@konsulko.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Reviewed-by: Tom Rini <trini@konsulko.com> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Nishanth Menon <nm@ti.com>
2023-09-08include: configs: am62x_evm: Drop distro_bootcmd usageNishanth Menon
Now that BOOTSTD is used by default, drop un-used header file inclusion. Reviewed-by: Tom Rini <trini@konsulko.com> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2023-09-08configs: am62x_evm_a53_defconfig: Switch to bootstdNishanth Menon
Switch to using bootstd. Note with this change, we will stop using distro_bootcmd and instead depend entirely on bootflow method of starting the system up. Suggested-by: Tom Rini <trini@konsulko.com> Suggested-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2023-09-08board: ti: am62x: am62x.env: Add explicit boot_targetsNishanth Menon
Add explicit boot_targets to indicate the specific boot sequence to follow. NOTE: The non-standard ti_mmc emulates what is done for distro_boot. With bootstd, this will eventually need to be replaced by equivalent class. Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2023-09-08include: configs: am62x_evm: Wrap distroboot with CONFIG_DISTRO_DEFAULTSNishanth Menon
Wrap the distro_boot options with CONFIG_DISTRO_DEFAULTS. This is an intermediate step for us to switch over to CONFIG_BOOTSTD_DEFAULTS and drop this section in follow on patches. Reviewed-by: Tom Rini <trini@konsulko.com> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2023-09-08include: configs: am62x_evm: Drop unused SDRAM addressNishanth Menon
Drop unused macro. This was meant for a second region of DDR which we do not need for AM62x evm configurations. Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2023-09-08include: configs: ti_armv7_common: Add documentation for protected sectionNishanth Menon
Make the section protected by CONFIG_DISTRO_DEFAULTS macro clear. Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Nishanth Menon <nm@ti.com>
2023-09-08include: env: ti: mmc: envboot: Only attempt boot.scr if BOOTSTD is not enabledNishanth Menon
'script' bootmethod that should be used with CONFIG_BOOTSTD. Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2023-09-08include: env: ti: mmc: envboot/mmcboot: Check result of mmc dev before ↵Nishanth Menon
proceeding If mmc dev reports that the device is not present, there is no point in proceeding further to attempt to load the files. Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2023-09-08board: verdin-am62: fix check for minimum memory sizeEmanuele Ghidoli
verdin am62 SKUs comes in multiple memory configuration, check that the detected memory is at least 512MB since we have some reserved memory just before this threshold and therefore the module cannot work with less memory. Fixes: 7d1a10659f5b ("board: toradex: add verdin am62 support") Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com> Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2023-09-08verdin-am62: add u-boot update wrappersEmanuele Ghidoli
Add update_tiboot3, update_tispl and update_uboot wrappers to update R5 SPL, A53 SPL and A53 U-boot respectively. Usage example: > tftpboot ${loadaddr} tiboot3-am62x-gp-verdin.bin > run update_tiboot3 > tftpboot ${loadaddr} tispl.bin > run update_tispl > tftpboot ${loadaddr} u-boot.img > run update_uboot Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com> Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2023-09-06Merge branch '2023-09-06-assorted-CI-updates' into nextTom Rini
- Merge in a number of changes for CI. The biggest ones of note are that we now support sandbox64 in CI, and Azure has been reworked to generally have more consistent overall runtime for the pipeline.
2023-09-06Azure: Add sandbox64 to CITom Rini
Now that sandbox64 can run and pass the regular test.py suite, add it here as well. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-09-06.gitlab-ci: Test sandbox64 board in addition to sandboxMarek Vasut
Test both 32bit and 64bit sandbox boards in CI. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Tom Rini <trini@konsulko.com>