aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-11-28net: dwc_eth_qos: Add support for bulk RX descriptor cleaningMarek Vasut2-23/+46
Add new desc_per_cacheline property which lets a platform run RX descriptor cleanup after every power-of-2 - 1 received packets instead of every packet. This is useful on platforms where (axi_bus_width EQOS_AXI_WIDTH_n * DMA DSL inter-descriptor word skip count + DMA descriptor size) is less than cache line size, which necessitates packing multiple DMA descriptors into single cache line. In case of TX descriptors, this is not a problem, since the driver always does synchronous TX, i.e. the TX descriptor is always written, flushed and polled for completion in eqos_send(). In case of RX descriptors, it is necessary to update their status in bulk, i.e. after the entire cache line worth of RX descriptors has been used up to receive data. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2022-11-28net: dwc_eth_qos: Split TX and RX DMA ringsMarek Vasut2-12/+24
Separate TX and RX DMA rings to make their handling slightly clearer. This is a preparatory patch for bulk RX descriptor flushing. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2022-11-28liteeth: LiteX Ethernet deviceJoel Stanley4-0/+304
LiteX is a soft system-on-chip that targets FPGAs. LiteETH is a basic network device that is commonly used in LiteX designs. Signed-off-by: Joel Stanley <joel@jms.id.au> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2022-11-28Merge https://source.denx.de/u-boot/custodians/u-boot-usbWIP/28Nov2022Tom Rini4-1/+97
- DWC3 fixes / improvements
2022-11-27usb: dwc3: Drop support for "snps, ref-clock-period-ns" DT propertyMarek Vasut1-4/+0
Drop support for quickly deprecated DT property "snps,ref-clock-period-ns" to prevent its proliferation. Reviewed-by: Sean Anderson <seanga2@gmail.com> Signed-off-by: Marek Vasut <marex@denx.de>
2022-11-27usb: dwc3: Program GFLADJSean Anderson2-0/+44
GUCTL.REFCLKPER can only account for clock frequencies with integer periods. To address this, program REFCLK_FLADJ with the relative error caused by period truncation. The formula given in the register reference has been rearranged to allow calculation based on rate (instead of period), and to allow for fixed-point arithmetic. Additionally, calculate a value for 240MHZDECR. This configures a simulated 240Mhz clock using a counter with one fractional bit (PLS1). This register is programmed only for versions >= 2.50a, since this is the check also used by commit db2be4e9e30c ("usb: dwc3: Add frame length adjustment quirk"). [ marek: Ported from Linux kernel commit 596c87856e08d ("usb: dwc3: Program GFLADJ") ] Reviewed-by: Sean Anderson <seanga2@gmail.com> Signed-off-by: Sean Anderson <sean.anderson@seco.com> Signed-off-by: Marek Vasut <marex@denx.de> # Port from Linux
2022-11-27usb: dwc3: Calculate REFCLKPER based on reference clockSean Anderson1-2/+13
Instead of using a special property to determine the reference clock period, use the rate of the reference clock. When we have a legacy snps,ref-clock-period-ns property and no reference clock, use it instead. Fractional clocks are not currently supported, and will be dealt with in the next commit. [ marek: Ported from Linux kernel commit 5114c3ee24875 ("usb: dwc3: Calculate REFCLKPER based on reference clock") ] Reviewed-by: Sean Anderson <seanga2@gmail.com> Signed-off-by: Sean Anderson <sean.anderson@seco.com> Signed-off-by: Marek Vasut <marex@denx.de> # Port from Linux
2022-11-27usb: dwc3: reference clock period configurationBalaji Prakash J2-0/+33
Set reference clock period when it differs from dwc3 default hardware set. We could calculate clock period based on reference clock frequency. But this information is not always available. This is the case of PCI bus attached USB host. For that reason we use a custom property. Tested (USB2 only) on IPQ6010 SoC based board with 24 MHz reference clock while hardware default is 19.2 MHz. [ baruch: rewrite commit message; drop GFLADJ code; remove 'quirk-' from property name; mention tested hardware ] [ marek: Ported from Linux kernel commit 7bee318838890 ("usb: dwc3: reference clock period configuration") ] Reviewed-by: Sean Anderson <seanga2@gmail.com> Signed-off-by: Balaji Prakash J <bjagadee@codeaurora.org> Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Marek Vasut <marex@denx.de> # Port from Linux
2022-11-27usb: dwc3: Cache ref_clk pointer in struct dwc3Marek Vasut2-0/+12
Cache ref_clk clock pointer in struct dwc3 . This is a preparatory patch for subsequent backports from Linux kernel which configure GFLADJ register content based on the ref_clk rate and therefore need access to the ref_clk pointer. It is possible to extract the clock pointer from existing clk_bulk list of already claimed clock, no need to call clk_get*() again. Reviewed-by: Sean Anderson <seanga2@gmail.com> Signed-off-by: Marek Vasut <marex@denx.de>
2022-11-27usb: Expand buffer size in usb_find_and_bind_driver()Marek Vasut1-1/+1
The "generic_bus_%x_dev_%x" string which is printed into this buffer can be up to 34 characters long ("generic_bus_12345678_dev_12345678"). The buffer would be clipped by snprintf() if both %x were at maximum range. Make sure the buffer is long enough to cover such possibility. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-11-24Merge branch '2022-11-23-assorted-fixes'Tom Rini17-45/+208
- Small ubifs updates, mkenvimage fix, ast2600 ram updates, update CI to make git happier, spelling fix in K3 code and fix dependencies in CMD_CLS
2022-11-24cmd: fix dependency for CMD_CLSJohn Keeping1-1/+1
It seems this symbol was missed when renaming DM_VIDEO -> VIDEO. Update it. Fixes: b86986c7b3 ("video: Rename CONFIG_DM_VIDEO to CONFIG_VIDEO") Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: John Keeping <john@metanate.com>
2022-11-24arm: mach-k3: fix spelling mistake "entended" -> "extended"Bryan Brattlof8-8/+8
the macro for the boot data location from rom is misspelled. fix it Signed-off-by: Bryan Brattlof <bb@ti.com>
2022-11-24CI: Make more use of git safe.directoryTom Rini2-0/+7
We have a number of jobs that will have git complain about needing to set safe.directory and this being untrue as a fatal error, but then complete. Set this flag correctly now as it should be used, and may prevent a future failure. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-11-24ram: ast2600: Align the RL and WL settingDylan Hung2-0/+13
Use macro to represent the RL and WL setting to ensure the PHY and controller setting are aligned. Review-by: Ryan Chen <ryan_chen@aspeedtech.com> Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
2022-11-24ram: ast2600: Improve ddr4 timing and signal qualityDylan Hung1-25/+138
Adjust the following settings to get better timing and signal quality. 1. write DQS/DQ delay - 1e6e2304[0] - 1e6e2304[15:8] 2. read DQS/DQ delay - 0x1e6e0298[0] - 0x1e6e0298[15:8] 3. CLK/CA timing - 0x1e6e01a8[31] 4. Read and write termination - change RTT_ROM from 40 ohm to 48 ohm (MR1[10:8]) - change RTT_PARK from disable to 48 ohm (MR5[8:6]) - change RTT_WR from 120 ohm to disable (MR2[11:9]) - change PHY ODT from 40 ohm to 80 ohm (0x1e6e0130[10:8]) Note1: Both DDR-PHY and DDR controller have their own registers for DDR4 Mode Registers (MR0~MR6). This patch introduces macros to synchronize the MR value on both sides. Note2: the waveform meansurement can be found in item #21 of Aspeed AST26x0 Application note (AP note). Review-by: Ryan Chen <ryan_chen@aspeedtech.com> Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
2022-11-24ram: ast2600: Fix incorrect statement of the register pollingDylan Hung1-6/+1
The condition "~data" in the if-statement is a typo. The original intention is to poll if SDRAM_PHYCTRL0_INIT bit equals to 0. So use "data == 0" for instead. Besides, the bit[1] of "phy_status" register is hardwired to SDRAM_PHYCTRL0_INIT (with inverse logic). Since SDRAM_PHYCTRL0_INIT has already done, remove the unnecessary checking of phy_status[1]. Fixes: fde93143469f ("ram: aspeed: Add AST2600 DRAM control support") Review-by: Ryan Chen <ryan_chen@aspeedtech.com> Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
2022-11-23tools: mkenvimage: Drop duplicate crc header includeMarek Vasut1-1/+0
This header was already included just above version.h, do not include it twice. Fixes: 3db71108575 ("crc32: Use the crc.h header for crc functions") Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-11-23cmd: ubifs: Do not show usage when command failsPali Rohár1-4/+4
Return value -1 cause U-Boot to print usage message. Return value 1 (CMD_RET_FAILURE) indicates failure. So fix return value when ubifs command starts it execution and fails. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Dhruva Gole <d-gole@ti.com>
2022-11-23ubifs: Allow to silence debug dumpsPali Rohár2-0/+36
Debug dump logs are not always required. Add a new config option UBIFS_SILENCE_DEBUG_DUMP to silence all debug dumps. On powerpc/mpc85xx when enabled this will decrease size of U-Boot binary by 11 kB. Signed-off-by: Pali Rohár <pali@kernel.org> Tested-by: Tony Dinh <mibodhi@gmail.com>
2022-11-23Merge tag 'u-boot-amlogic-20221122' of ↵WIP/23Nov2022Tom Rini3-0/+84
https://source.denx.de/u-boot/custodians/u-boot-amlogic - Implement setbrg op to meson serial device - Re-add the old PHY reset binding for nanopi-k2
2022-11-22Merge tag 'dm-pull-22nov22' of ↵WIP/22Nov2022Tom Rini28-1404/+1981
https://source.denx.de/u-boot/custodians/u-boot-dm buildman /binman improvements for handling missing blobs fix for long-standing image.h warning minor fixes
2022-11-22test: Disable part of the setexpr test for nowSimon Glass1-1/+5
This fails in CI for unknown reasons. Disable the last assert for now. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-22test: cmd: fdt: Add fdt get value test caseMarek Vasut1-0/+53
Add test case for 'fdt get value' sub command. The test case can be triggered using: " ./u-boot -d u-boot.dtb -c 'ut fdt' " Acked-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Signed-off-by: Marek Vasut <marex@denx.de>
2022-11-22cmd: fdt: Fix iteration over elements above index 1 in fdt getMarek Vasut1-3/+6
Always increment both the iterator and pointer into the string property value by length of the current element + 1 (to cater for the string delimiter), otherwise the element extracted from the string property value would be extracted from an offset that is multiple of the length of the first element, instead of sum of element lengths until select index. This fixes 'fdt get value' operation for index above 1 (counting from index 0). Acked-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Fixes: 13982ced2cc ("cmd: fdt: Add support for reading stringlist property values") Signed-off-by: Marek Vasut <marex@denx.de>
2022-11-22sandbox: Move the capsule GUID declarations to board fileSughosh Ganu2-13/+13
The sandbox config file is to be removed. Move the GUID declarations needed for capsule update functionality to the board file where they are used. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-11-22sandbox: check lseek return value in handle_ufi_commandHeinrich Schuchardt1-3/+7
Invoking lseek() may result in an error. Handle it. Addresses-Coverity-ID: 376212 ("Error handling issues (CHECKED_RETURN)") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-11-22binman: Add documentation for the command line argsSimon Glass1-1/+299
Add command-line documentation for binman. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-22buildman: Add --allow-missing flag to allow missing blobsTom Rini9-8/+197
Add a new flag to buildman so that we will in turn pass BINMAN_ALLOW_MISSING=1 to 'make'. Make use of this flag in CI. Allow the settings file to control this. Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-22buildman: Reinstate removal of temp output dir in testsSimon Glass1-1/+1
This was dropped my mistake. Reinstate it. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: d829f1217c6 ("bulidman: Add support for a simple build")
2022-11-22buildman: Ensure config_fname is initedSimon Glass1-0/+1
Init this variable at the top level since it is a global. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-22global: Do not default to faking missing binaries for buildmanTom Rini1-2/+2
While it is possible and documented on how to re-run buildman to replace faked required binary files after the fact, this behavior ends up being more confusing than helpful in practice. Switch to requiring BINMAN_ALLOW_MISSING=1 to be passed on the 'make' line to enable this behavior. Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-22binman: Add a separate section about environment variablesSimon Glass1-0/+30
These are documented in various several sections. Add a new section that mentions them all in one place so it is easier to see what environment variables can be used to control U-Boot's use of binman. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2022-11-22buildman: Detect binman reporting missing blobsSimon Glass1-1/+5
Buildman should consider a build as a success (with warnings) if missing blobs have been dealt with by binman, even though buildman itself returns and error code overall. This is how other warnings are dealt with. We cannot easily access the 103 exit code, so detect the problem in the output. With this change, missing blobs result in an exit code of 101, although they still indicate failure. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-22buildman: Drop mention of old architecturesSimon Glass2-19/+1
Support for some architectures has been removed since buildman was first written. Also all toolchains are now available at kernel.org so we don't need the links, except for arc where the kernel.org toolchain fails to build all boards. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-22buildman: Update the default settings fileSimon Glass2-0/+5
The settings file omits a few lines which are useful for getting every board building. Add these and update the documentation tool. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-22buildman: Update the arc toolchainSimon Glass1-1/+4
There is one on kernel.org but it does not build the hsdk_4xd board. Add a link to one which does. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-22buildman: Drop mention of MAKEALLSimon Glass1-110/+0
This script was removed about 6 years ago so most people should be aware that it is not needed anymore. Drop mention of it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-22buildman: Convert documentation to rSTSimon Glass7-1353/+1413
Convert the buildman documentation to rST format and include it in the 'build' section. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Quentin Schulz <foss+uboot@0leil.net>
2022-11-22binman: Use an exit code when blobs are missingSimon Glass4-4/+51
At present binman returns success when told to handle missing/faked blobs or missing bintools. This is confusing since in fact the resulting image cannot work. Use exit code 103 to signal this problem, with a -W option to convert it to a warning. Rename the flag to --ignore-missing since it controls bintools also. Add documentation about exit codes while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-22doc: Correct the path to the Makefile documentationSimon Glass1-1/+1
This is out-of-date now. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-22Makefile: Correct the binman ruleSimon Glass1-7/+4
This currently uses if_changed on a phony target. Use a real file as the target and add FORCE at the end, as required. Drop the 'inputs' phony since it is not needed. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-22image: Correct strncpy() warning with image_set_name()Simon Glass1-1/+7
gcc 12 seems to warn on strncpy() as a matter of course. Rewrite the code a different way to do the same thing, to avoid the warning. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-22Revert "binman: btool: gzip: fix packer name so that binary can be found"Quentin Schulz1-1/+1
This reverts commit daa2da754afe1bac777f6cb0f05233e0de7b325d. This commit is not needed anymore since the btool_ prefix is automatically stripped by bintool. Cc: Quentin Schulz <foss+uboot@0leil.net> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-11-22binman: bintool: remove btool_ prefix from btool namesQuentin Schulz2-2/+3
The binary is looked on the system by the suffix of the packer class. This means binman was looking for btool_gzip on the system and not gzip. Since a btool can have its btool_ prefix missing but its module and binary presence on the system appropriately found, there's no need to actually keep this prefix after listing all possible btools, so let's remove it. This fixes gzip btool by letting Bintool.find_bintool_class handle the missing prefix and still return the correct class which is then init with gzip name instead of btool_gzip. Additionally, there was an issue with the cached module global variable. The variable only stores the module and not the associated class name when calling find_bintool_class. This means that when caching the module on the first call to find_bintool_class, class_name would be set to Bintoolbtool_gzip but the module_name gzip only, adding the module in the gzip key in the module dictionary. When hitting the cache on next calls, the gzip key would be found, so its value (the module) is used. However the default class_name (Bintoolgzip) is used, failing the getattr call. Instead, let's enforce the same class name: Bintool<packer>, whatever the filename it is contained in. Cc: Quentin Schulz <foss+uboot@0leil.net> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-11-22arm64: dts: meson: nanopi-k2: readd PHY reset propertiesChristian Hewitt1-0/+7
The sync of device-tree/bindings in 11a48a5a18c6 ("Linux 5.6-rc2") causes Ethernet to break on some GXBB boards; the PHY seems to need proper reset timing to function in u-boot and Linux. Re-add the old PHY reset binding for dwmac until we support new bindings in the PHY node. This borrows the same fix applied to the Odroid C2 board [0]. [0] https://lists.denx.de/pipermail/u-boot/2021-April/446658.html Fixes: dd5f2351e99a ("arm64: dts: meson: sync dt and bindings from v5.6-rc2") Signed-off-by: Christian Hewitt <christianshewitt@gmail.com> Link: https://lore.kernel.org/r/20221025143205.14470-1-christianshewitt@gmail.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2022-11-22arm: amlogic: add setbrg op to serial deviceEdoardo Tomelleri2-0/+77
Implement setbrg in amlogic/meson serial device with driver model similar to how the meson_uart.c driver does it in Linux. Also configure (probe) the serial device with the new reg5 register. Signed-off-by: Edoardo Tomelleri <e.tomell@gmail.com> Link: https://lore.kernel.org/r/20220918161701.572814-1-e.tomell@gmail.com Acked-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2022-11-22Merge tag 'xilinx-for-v2023.01-rc3' of ↵Tom Rini31-74/+468
https://source.denx.de/u-boot/custodians/u-boot-microblaze Xilinx changes for v2023.01-rc3 microblaze: - Enable 32 bit addressing mode for SPIs zynq: - Minor DT fixes (PL clock enabling) zynqmp: - Disable watchdog by default - Remove unused xlnx,eeprom chosen support - Add missing symlink for vck190 SC revB - Use mdio bus with ethernet-phy-id description versal: - Add mini qspi/ospi configuration versal-net: - Add soc driver - Fix Kconfig entry for SOC - Fix loading address location for MINI configuration - Disable LMB for mini configuration net: - Fix ethernet-phy-id usage in the code pinctrl: - Revert high impedance/output enable support timer: - Fix timer relocation for Microblaze - Fix timer wrap in 32bit Xilinx timer driver
2022-11-22arm64: versal: Add octal spi flash mini u-boot configurationAshok Reddy Soma4-0/+166
Add configuration file for mini u-boot configuration which runs on a smaller footprint from on chip memory(OCM). This configuration has required CONFIG's enabled to support octal spi flash and uses DCC terminal for console output. Add required dts for octal spi flash mini u-boot configuration. Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com> Link: https://lore.kernel.org/r/20221116141155.14788-4-ashok.reddy.soma@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2022-11-22spi: cadence-qspi: Fix compilation error in mini u-boot flash resetAshok Reddy Soma1-2/+2
When cadence_qspi_versal_flash_reset() function is called in mini u-boot where there is no firmware support, it is missing defines for macro's BOOT_MODE_POR_0 & BOOT_MODE_POR_1. Remove them and replace with already define macro's which have same values as these. Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com> Link: https://lore.kernel.org/r/20221116141155.14788-3-ashok.reddy.soma@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>