aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-12-23fdt: Make it easier to debug u-boot.dtsi filesSimon Glass
At present one must hack the Makefile to see what is going on with these files. Also it doesn't quite work correctly. Fix this by using an environment variable for debugging. Update the docs also. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-23fdt: Drop CONFIG_BINMAN_STANDALONE_FDTSimon Glass
This was added as a hack to work around not having an in-tree devicetree. Now that this is fixed it is not needed. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-23fdt: Make OF_BOARD a bool optionSimon Glass
This should not be a separate option from OF_SEPARATE. It is a run-time option to override the devicetree, even if present. Move the option out of the choice. Disable BINMAN_FDT for a few boards which don't actually use it. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-23arm: highbank: Add devicetree filesSimon Glass
Add an empty version of this file, so that we can at least build this board when devicetrees are required. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-23arm: qemu-ppce500: Add a devicetree fileSimon Glass
This uses QEMU virt which creates its own devicetree. Add an empty version of this file, so that we can at least build this board when devicetrees are required. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-23arm: bcm7xxx: Add a devicetree fileSimon Glass
Add an empty devicetree file for these boards. It seems to be possible to obtain a real one from another bootloader called 'bolt' but I will leave this to the maintainer. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-23arm: xilinx_versal_virt: Add a devicetree fileSimon Glass
Add an empty file to prevent build errors when building with CONFIG_OF_SEPARATE enabled. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-23arm: octeontx: Add an empty devicetree fileSimon Glass
Add an empty file to prevent build errors when building with CONFIG_OF_SEPARATE enabled. Unfortunately there are no build instructions in the U-Boot tree to enable a real file to be created. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-23arm: xenguest_arm64: Add a empty devicetree fileSimon Glass
Add an empty version of this file, so that we can at least build this board when devicetrees are required. The real devicetree is created by the Xen project on-the-fly. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-23arm: vexpress: Add a devicetree files for junoSimon Glass
Sync these file, obtained from Linux v5.15. Add a note for the maintainer, and SPDX lines where they are missing. The added lines are: SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause Note, this matches the text in those files, but is not the same as the GPL-2.0 of some files. [1] https://releases.linaro.org/android/reference-lcr/juno/7.1-17.05/ Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2021-12-23arm: rpi: Sync rpi dts files from LinuxSimon Glass
Sync these files, obtained from Linux v5.15. This adds a devicetree file for rpi_4 which was not there before. Testing shows no change so far as I can see: - boots to U-Boot prompt on rpi0, rpi2 - boots to distro on rpi3 - boots to distro on rpi4 I am assuming that syncing with Linux is safe, but the maintainer should know for sure. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-23riscv: qemu: Split devicetree files for qemu_riscv32/64Simon Glass
This uses QEMU virt which creates its own devicetree. Copy the existing empty version of this file, so splitting the existing qemu-virt into two, since anyone actually trying to use this will need a different devicetree for 32- and 64-bit machines. Tested-by: Heinrich Schuchardt <heinrich.schuchardt@canaonical.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-23arm: qemu: Add a devicetree file for qemu_arm64 virtSimon Glass
This uses QEMU virt which creates its own devicetree. Add an empty version of this file, so that we can at least build this board when devicetrees are required. Tested-by: Heinrich Schuchardt <heinrich.schuchardt@canaonical.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-23arm: qemu: Add a devicetree file for qemu_armSimon Glass
This uses QEMU virt which creates its own devicetree. Add an empty version of this file, so that we can at least build this board when devicetrees are required. Tested-by: Heinrich Schuchardt <heinrich.schuchardt@canaonical.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-23arm: riscv: qemu: Explain how to extract the generated dtSimon Glass
QEMU currently generates a devicetree for use with U-Boot. Explain how to obtain it. Also explain how to merge it to produce a devicetree with the U-Boot features included. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-23arm: qemu: Mention -nographic in the docsSimon Glass
Without this option QEMU appears to hang. Add it to avoid confusion. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-12-21Merge branch 'next' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-marvell into next - pci_mvebu: Misc improvements and cleanup (Pali) - turris_mox: Remove extra newline after module topology (Marek)
2021-12-21doc: remove duplicate page inclusionHeinrich Schuchardt
doc/usage/index.rst in branch origin/next includes usage/environment twice. Remove the duplicate entry. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-12-21arm: mvebu: turris_mox: Remove extra newline after module topologyMarek Behún
Remove extra newline after module topology is printed. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2021-12-21pci: pci_mvebu: Remove unused DECLARE_GLOBAL_DATA_PTRPali Rohár
The global data pointer is not used in this driver, remove it's declaration. Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2021-12-21pci: pci_mvebu: Replace MBUS_PCI_*_SIZE by resource_size()Pali Rohár
Use more appropriate resource_size() function when working with data in struct resource. Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2021-12-21pci: pci_mvebu: Move setup for BAR[0] where other BARs are setupPali Rohár
Function mvebu_pcie_setup_wins() sets up all other BARs, so move setup of BAR[0] to this function to have common code at one place. In the past, commit 193a1e9f196b ("pci: pci_mvebu: set BAR0 after memory space is set") moved setup of BAR[0] to another location, due to ath10k not working in kernel, but the reason why was unknown, but it seems to work now, and we think the issue then was cause by the PCIe Root Port presenting itself as a Memory Controller and therefore U-Boot's code have overwritten the BAR. Since the driver now ignores any write operations to PCIe Root Port BARs, this should not be an issue anymore. Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2021-12-20Merge tag 'v2022.01-rc4' into nextTom Rini
Prepare v2022.01-rc4
2021-12-20Prepare v2022.01-rc4Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2021-12-20Revert "image: Remove #ifdefs from select_ramdisk()"Tom Rini
This reverts commit f33a2c1bd0fb371511a485cac1f182ba50db51be. This causes a crash on some platforms as seen here: https://lore.kernel.org/r/f153017b-c41a-0d32-67b9-f288e695f900@baylibre.com/ Reported-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2021-12-20fw_setenv: Unbreak fw_setenv caused by buggy MEMISLOCKED useJoakim Tjernlund
Commit "fw_setenv: lock the flash only if it was locked before" checks for Locked status with uninitialized erase data. Address by moving the test for MEMISLOCKED. Fixes: 8a726b852502 ("fw_setenv: lock the flash only if it was locked before") Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
2021-12-20Merge tag '20211220-fixes-for-2022.01' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-i2c i2c changes for 20211220-fixes-for-2022.01 - mvtwsi: Swab the register address if its size is > 1
2021-12-20i2c: mvtwsi: Swab the register address if its size is > 1Stefan Roese
Testing on Armada XP with an EEPROM using register address with size of 2 has shown, that the register address bytes are sent to the I2C EEPROM in the incorrect order. This patch swabs the address bytes so that the correct address is transferred to the I2C device. BTW: This worked without any issues before migrating Armada XP to DM I2C. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Heiko Schocher <hs@denx.de> Cc: Samuel Holland <samuel@sholland.org> Cc: Baruch Siach <baruch@tkos.co.il> Cc: Pali Rohár <pali@kernel.org> Cc: Marek Behún <marek.behun@nic.cz> Tested-by: Marek Behún <marek.behun@nic.cz>
2021-12-19Merge branch 'next' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-marvell into next - Armada XP etc: Move to DM_I2C (Stefan) - Some mvebu comphy + mox + fdt_support changes (Marek & Pali) - mvebu: a38x: improve USB3 serdes configuration (Stefan Eichenberger) - mvebu: Some maintainer updates (Pali) - mvebu: Misc minor cleanup (Pali)
2021-12-19arm: mvebu: Use printf for printing fatal errorsPali Rohár
There is no point to hide/disable fatal errors via debug() macro. Print fatal errors loudly. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2021-12-19arm: mvebu: Remove commented example codePali Rohár
Include file debug_uart.h already contains documentation how to use it. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2021-12-19arm: mvebu: serial: Add me as co-maintainer and author of Marvell serial driversPali Rohár
There is no maintainer entry for serial_mvebu_a3700.c. Add entry with Pali and Stefan as maintainers. Signed-off-by: Pali Rohár <pali@kernel.org> Acked-by: Stefan Roese <sr@denx.de> Reviewed-by: Stefan Roese <sr@denx.de>
2021-12-19arm: mvebu: pci: Add me as co-maintainer and author of Marvell PCIe driversPali Rohár
There is no maintainer entry for pci-aardvark.c. Add entry for pci-aardvark.c and pci_mvebu.c with Pali and Stefan as maintainers. Signed-off-by: Pali Rohár <pali@kernel.org> Acked-by: Stefan Roese <sr@denx.de> Reviewed-by: Stefan Roese <sr@denx.de>
2021-12-19arm: mvebu: a38x: serdes: improve USB3 electrical configurationStefan Eichenberger
This is a backport from Marvell U-Boot: https://github.com/MarvellEmbeddedProcessors/u-boot-marvell commit 381d029e7a ("fix: serdes: a38x, a39x: Improve USB3 electrical configuration") Improves electrical USB3 receiver jitter tolerance test: - De-Emphasize force, in functional mode the transmitter should always have 3.5db de-emphasize, so we are forcing it. - After forcing De-Emphasize, choose 3.5db (After forcing, default is 6dB so need to change it to 3.5dB). - Align90 set to 0x58 - this is the sample point in the receiver, after the clock is recovered this sampler samples at the chosen value, usually it is supposed to be 0x60(which is the center of the eye), but sometimes after adding jitter and ISI the center of the eye can move slightly and the sample point is not necessarily the exact center, and after optimization (searching the middle of the eye manually) it was seen that the center of the eye is actually 0x58 and not 0x60. - FFE Res and FFE Cap set to 0xE & 0xF respectively: improves this settings is adequate according to how the USB3 spec defines the interconnect, thus improves USB3 jitter tolerance settings. - Change the resolution of the DFE to 0x3 which is 6mV(highest resolution) , this avoids the DFE to saturate and cease to work. - HPF set to 0x3 which is 5Khz high pass filter, the function of the HPF is to filter the low frequency patterns(below 5Khz) to make sure that the signal is not a noise, the setting before was 0x1(205Khz), and the change came since the USB3 CP0 pattern, that is used in the USB3 jitter tolerance testing, is similar to PRBS15, which has 2^15=32768bits which is 32768*200ps (200ps is one Unit interval in USB3(5Gbps)) = 6.5us, which is in frequency terms: 152Khz. since the PRBS15 is a random pattern and can theoretically have once in a while a pattern that will be at frequency of 152Khz, hence the previous setting (205khz HPF) can possibly filter this pattern which can cause to an error in the receiver, thus this change to avoid such scenarios. Signed-off-by: Stefan Eichenberger <eichest@gmail.com> Signed-off-by: René Straub <rene.straub@netmodule.com> Reviewed-by: Stefan Roese <sr@denx.de>
2021-12-19arm: mvebu: a38x: serdes: fix serdes config for USB3Stefan Eichenberger
The electrical serdes configuration for USB3 expects an array as data argument. For USB3 the second value is used (see data_arr_idx = USB3 = 1). However, because only one value is inside the array mv_seq_exec is accessing an invalid element and the serdes is configured wrongly. This wrong initialization is leading to an unreliable detection mechanism for some USB3 devices. We were able to reproduce the issue regularly with an LTE modem from Sierra Wireless (SM7455) where it was not detected as USB3 device in 1/3 of all tests. This commit fixes the issue by setting data_arr_idx to 0. This is the same value as the original U-Boot from Marvell is using. There it is called FIRST_CELL which is a define for 0. See: https://github.com/MarvellEmbeddedProcessors/u-boot-marvell commit 56f963ce4c ("fix: serdes: a38x, a39x: Fix USB3 serdes DB initialization") Signed-off-by: Stefan Eichenberger <eichest@gmail.com> Signed-off-by: René Straub <rene.straub@netmodule.com> Reviewed-by: Stefan Roese <sr@denx.de>
2021-12-19fdt_support: Add fdt_delete_disabled_nodes() and use in Turris MOXMarek Behún
Move Turris MOX specific remove_disabled_nodes() to fdt_support with name fdt_delete_disabled_nodes(), so that others can potentially use it. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2021-12-19arm: mvebu: turris_mox: Fix unstable board topology readingMarek Behún
The pre-relocation board topology reading in board_fix_fdt() is unstable: sometimes wrong data are read from the SPI bus. This is due to wrong order of SPI bus configuration instructions: we first need to set the pins to SPI mode, and only after that configure the bus. Also add a 1ms delay before enabling chip-select, so that the clock pin is high for some time before reading the bus. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2021-12-19phy: marvell: a3700: Convert to official DT bindings in COMPHY driverPali Rohár
Convert A3720 common PHY driver to official DT bindings. This puts us closer to be able to synchronize A3720 device-trees with those from Linux. Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Marek Behún <marek.behun@nic.cz> Cc: Konstantin Porotchkin <kostap@marvell.com> Cc: Robert Marko <robert.marko@sartura.hr> Cc: Luka Perkov <luka.perkov@sartura.hr> Cc: Marcin Wojtas <mw@semihalf.com> Cc: Grzegorz Jaszczyk <jaz@semihalf.com> Reviewed-by: Stefan Roese <sr@denx.de>
2021-12-19arm: mvebu: turris_mox: Enable eth1 in U-Boot if a network module is presentPali Rohár
Enable eth1 node in U-Boot's device-tree if a network module (SFP, Topaz or Peridot) is detected. This is required for proper detection of eth1 comphy in a3700 comphy driver by the following patches. Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2021-12-19arm: mvebu: turris_mox: Find DT nodes by compatible or alias instead of pathMarek Behún
It is better to find DT nodes by compatible strings or aliases instead of path. There were issues with Linux some DTBs having different names of some nodes, e.g. internal-regs instead of internal-regs@d0000000 This should be a generic fix for such issues. Also since fdt_support now contains needed functions, we can drop our own implementations. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2021-12-19fdt_support: Add some useful functionsMarek Behún
Add functions fdt_node_offset_by_pathf(), fdt_create_phandle_by_pathf(), fdt_set_status_by_pathf() to get node offset, get/create node phandle and set status for node given by path/alias formatted with sprintf. Add functions fdt_create_phandle_by_compatible(), fdt_set_status_by_compatible() to get/create node phandle and set status for first node given by compatible. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2021-12-19fdt_support: Fix comment for fdt_create_phandle()Marek Behún
This function does not necessarily create a new phandle. If a phandle exists, no new phandle is created. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2021-12-19fdt_support: Remove FDT_STATUS_FAIL_ERROR_CODEMarek Behún
Since no one uses this feature and I am not aware of any parsers of this in Linux, remove it. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Pratyush Yadav <p.yadav@ti.com> Cc: Tim Harvey <tharvey@gateworks.com> Cc: Michael Walle <michael@walle.cc> Cc: Priyanka Jain <priyanka.jain@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-12-19fdt_support: Remove fdt_alloc_phandle() in favor of fdt_generate_phandle()Marek Behún
Commit f0921f5098d ("fdt: Sync up to the latest libfdt") introduced fdt_generate_phandle() in libfdt, making fdt_alloc_phandle() obsolete in fdt_support. Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: "hui.song" <hui.song_1@nxp.com> Cc: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com> Cc: Priyanka Jain <priyanka.jain@nxp.com> Cc: Ioana Ciornei <ioana.ciornei@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-12-19treewide: Use fdt_create_phandle() where appropriateMarek Behún
Replace fdt_alloc_phandle() with subsequent fdt_set_phandle() by fdt_create_phandle(). Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de> Cc: Aaron Williams <awilliams@marvell.com> Cc: Ramon Fried <rfried.dev@gmail.com> Cc: Vladimir Oltean <vladimir.oltean@nxp.com>
2021-12-19include/linux/byteorder: Fix compilation of __constant_cpu_to_be32()Pali Rohár
The macro __constant_cpu_to_be32() uses ___constant_swab32(), which for some reason is not defined and causes the following error during compilation: include/linux/byteorder/little_endian.h:28:52: warning: implicit declaration of function ‘___constant_swab32’; did you mean ‘__builtin_bswap32’? [-Wimplicit-function-declaration] #define __constant_cpu_to_be32(x) ((__force __be32)___constant_swab32((x))) Declare all ___constant_swabXX() macros. Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2021-12-19arm: mvebu: armada-xp-theadorable.dts: Add I2C DT nodesStefan Roese
Now with DM I2C support enabled we need to describe the I2C busses and devices in the DT. Signed-off-by: Stefan Roese <sr@denx.de>
2021-12-19arm: mvebu: axp: ddr: Switch to using DM I2C APIStefan Roese
No functional change intended. This patch switches from the legacy I2C API to the DM I2C API, so that this code can be used with DM I2C enabled. Signed-off-by: Stefan Roese <sr@denx.de>
2021-12-19arm: mvebu: axp: Remove unreferenced ddr3_get_eprom_fabric() functionStefan Roese
This function is not referenced in mainline U-Boot. Let's remove now. Signed-off-by: Stefan Roese <sr@denx.de>
2021-12-19arm: mvebu: axp/high_speed_env_lib: Switch to DM_I2C APIStefan Roese
After all Armada XP boards have been switched over from legacy I2C support to DM I2C, let's now also convert this serdes code to use the DM I2C API. Signed-off-by: Stefan Roese <sr@denx.de>