summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-01-12board: ti: k2g: Add support for K2G ICE with 1GHz SiliconLokesh Vutla6-6/+19
Add board detection support for K2G ICE with FlagChip 1GHz silicon. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2021-01-12arm: dts: k3-j721e: ddr: Update to 0.5.0 version of DDR config toolPraneeth Bajjuri2-219/+219
Update the ddr settings to use the DDR reg config tool rev 0.5.0. This enables 4266MTs DDR configuration. Signed-off-by: Praneeth Bajjuri <praneeth@ti.com> Signed-off-by: Kevin Scholz <k-scholz@ti.com>
2021-01-12spi: omap3_spi: Fix speed and mode selectionVignesh Raghavendra1-3/+14
McSPI IP provides per CS specific speed and mode selection. Therefore it is possible to apply these settings only after CS is known. But set_speed and set_mode can be called without bus being claimed, this would lead driver to set up wrong CS (or previously used CS). Fix this by apply set_speed and set_mode only if bus is already claimed. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Tested-by: Miquel Raynal <miquel.raynal@bootlin.com>
2021-01-12spi: ti_qspi: Fix "spi-max-frequency" error path in ti_qspi_ofdata_to_platdataOvidiu Panait1-2/+2
struct ti_qspi_priv->max_hz is declared as unsigned int, so the following error path check will always be false, even when "spi-max-frequency" property is invalid/missing: priv->max_hz = fdtdec_get_int(blob, node, "spi-max-frequency", -1); if (priv->max_hz < 0) { ... } Replace the fdtdec call with dev_read_u32_default() and use 0 as the default value. Error out if max_hz is zero. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
2021-01-12gpio: tca642x: fix input subcommand for gpio banks > 0Tomas Novotny1-14/+35
The value of input pin for bank > 0 is always 0 for input subcommand. The reason is that gpio_bank variable is computed only for invert and output subcommands (it depends on number of arguments). The default value of zero causes to shift the mask away for banks > 0. Please note that info subcommand works as expected, because the input pin values are accessed differently. Fixes: 61c1775f16ed ("gpio: tca642x: Add the tca642x gpio expander driver") Cc: Dan Murphy <dmurphy@ti.com> Signed-off-by: Tomas Novotny <tomas@novotny.cz>
2021-01-12configs: am65x_evm: Define the maximum file size for DFUAswath Govindraju1-0/+6
In include/dfu.h, if CONFIG_SYS_DFU_MAX_FILE_SIZE is not defined then it is defined as CONFIG_SYS_DFU_DATA_BUF_SIZE. This is 128 KiB for a53 core and 20 KiB for r5 core. If a larger file is transferred using dfu then it fails. CONFIG_SYS_DFU_DATA_BUF_SIZE can not be increased as there is not enough heap memory to be allocated for the buffer in case of R5 spl. Fix this by defining CONFIG_SYS_DFU_MAX_FILE_SIZE as the default CONFIG_SYS_DFU_DATA_BUF_SIZE value. Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2021-01-12arm: dts: am654-base-board-uboot: Add aliases for USB subsystemsAswath Govindraju1-0/+2
The sequence number assigned for USB subsystem in a uclass is dependent on the order of occurrence in the device tree. If the dr_mode of USB3SS0 controller is varied then the sequence number of USB3SS1 controller also changes. If aliases are added then sequence numbers are assigned using the alias number. This makes the sequence number of USB3SS1 controller independent of USB3SS0 controller's dr_mode. Therefore, add aliases to fix the sequence number assigned to the USB subsystems. Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2021-01-12arm: dts: am654-base-board-uboot: Set USB0 dr_mode to hostAswath Govindraju1-1/+1
USB3SS0 controller is to be used as a host in U-boot. Fix it by changing the dr_mode to host. Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2021-01-12board: ti: am65x: Set SERDES0 mux to PCIe to use USB 2.0 interfaceAswath Govindraju1-0/+16
It has been observed that setting SERDES0 lane mux to USB prevents USB 2.0 operation on USB0. Setting SERDES0 lane mux to non-USB when USB0 is used in USB 2.0 only mode solves this issue. However, for USB3.0+2.0 operation this issue is not present. Implement this workaround by writing 1 to LANE_FUNC_SEL field in CTRLMMR_SERDES0_CTRL register. Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2021-01-11Merge branch 'next'Tom Rini1517-8689/+16853
Signed-off-by: Tom Rini <trini@konsulko.com>
2021-01-11Prepare v2021.01Tom Rini1-1/+1
Signed-off-by: Tom Rini <trini@konsulko.com>
2021-01-08xea: config: Disable CONFIG_SPL_OF_PLATDATA_PARENT on XEA (imx28)Lukasz Majewski1-0/+1
On the XEA board (imx28) one needs in the SPL support for GPIO, MMC and SPI. Two last ones are necessary for booting the device. The GPIO support allows deciding which medium will be used. For example the GPIO DTS node (gpio@0 at imx28.dtsi) has pinctrl parent (pinctrl@80018000) for which we don't need driver asigned for correct operation. In the spl/dts/dt-platdata.c the gpio@0 has index 4 and its parent - pinctrl@80018000 has index 5. In the bind_drivers_pass() function (at drivers/core/lists.c) call to device_bind_by_name() for `fsl_imx23_pinctrl` returns -2, which is expected. With current setup - when the SPL_OF_PLATDATA_PARENT=y The gpio@0 node with index 4 is skipped as its parent with 5 is not yet bound. It cannot be as we don't need and provide the driver for it. As a result the gpio@0 is never bound and we end up with bricked board in the SPL stage. When CONFIG_SPL_OF_PLATDATA_PARENT is NOT set, all entries from spl/dts/dt-platdata.c are scanned in ascending index order, so gpio@0 is properly initialized. For `fsl_imx_pinctrl` we simply check 10 times if the driver for is available (which is not) and exit. As a result the GPIOs are initialized and can be used in early SPL stage. This commit fixes XEA regression introduced with e41651fffda7da55f6. Signed-off-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-01-08xea: config: Use CONFIG_PREBOOT from KconfigLukasz Majewski2-1/+2
The usage of the preboot feature is now controlled via a separate Kconfig option - namely CONFIG_USE_PREBOOT. It must be enabled for preboot code executing commands now defined in CONFIG_PREBOOT (also moved to the Kconfig). After defining both CONFIG_USE_PREBOOT and CONFIG_PREBOOT in imx28_xea_defconfig the define of CONFIG_PREBOOT shall be removed from xea.h as it is redundant. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2021-01-08xea: spl: Disable pull UP for GPIO0_2{35}Lukasz Majewski1-1/+1
On the imx287 pin GPMI_WRN (GPIO0_25) no PullUP is available that can be enabled. To get the same behavior for both boot select pins (i.e. GPIO0_2{35}) disable pull UPs on both. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2021-01-08rockchip: pinebook-pro: default to SPI bus 1 for SPI-flashHugh Cole-Baker2-4/+2
SPI flash on this machine is located on bus 1, default to using bus 1 for SPI flash and stop aliasing it to bus 0. Signed-off-by: Hugh Cole-Baker <sigmaris@gmail.com> Suggested-by: Simon Glass <sjg@chromium.org> Fixes: c4cea2bb ("rockchip: Enable building a SPI ROM image on bob")
2021-01-06Merge tag 'xilinx-for-v2021.04' of ↵Tom Rini25-80/+540
https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze into next Xilinx changes for v2021.04 arm64: - DT updates microblaze: - Add support for NOR device support spi: - Fix unaligned data write issue nand: - Minor code change xilinx: - Fru fix in limit calculation - Fill git repo link for all Xilinx boards video: - Add support for seps525 spi display tools: - Minor Vitis file support cmd/common - Minor code indentation fixes serial: - Uartlite debug uart initialization fix
2021-01-06Merge tag 'u-boot-stm32-20210106' of ↵Tom Rini2-3/+3
https://gitlab.denx.de/u-boot/custodians/u-boot-stm - Fix GPIO hog flags on DHCOM boards
2021-01-06ARM: dts: stm32: Fix GPIO hog flags on DHCOM DRC02Marek Vasut1-2/+2
The GPIO hog flags are ignored by gpiolib-of.c now, set the flags to 0. Since GPIO_ACTIVE_HIGH is defined as 0, this change only increases the correctness of the DT. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Patrice Chotard <patrice.chotard@st.com> Cc: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2021-01-06ARM: dts: stm32: Fix GPIO hog flags on DHCOM PicoITXMarek Vasut1-1/+1
The GPIO hog flags are ignored by gpiolib-of.c now, set the flags to 0. Due to a change in gpiolib-of.c, setting flags to GPIO_ACTIVE_LOW and using output-low DT property leads to the GPIO being set high instead. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Patrice Chotard <patrice.chotard@st.com> Cc: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2021-01-06Merge tag 'dm-pull-5jan21' of git://git.denx.de/u-boot-dm into nextTom Rini410-1956/+2799
Driver model: make some udevice fields private Driver model: Rename U_BOOT_DEVICE et al. dtoc: Tidy up and add more tests ns16550 code clean-up x86 and sandbox minor fixes for of-platdata dtoc prepration for adding build-time instantiation
2021-01-06Merge tag 'v2021.01-rc5' into nextTom Rini445-4539/+8238
Prepare v2021.01-rc5 Signed-off-by: Tom Rini <trini@konsulko.com>
2021-01-06Merge tag 'ti-v2021.01-rc5' of ↵Tom Rini1-2/+2
https://gitlab.denx.de/u-boot/custodians/u-boot-ti - Fix I2C speed for Nokia RX51
2021-01-05dtoc: Tidy up src_scan testsSimon Glass1-6/+22
Some of these tests don't actually check anything. Add a few more checks to complete the tests. Also add a simple scan test that does the basics. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-05dtoc: Move src_scan tests to a separate fileSimon Glass5-78/+97
Move the tests related to scanning into their own class, updating them to avoid using dtb_platdata as a pass-through. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-05dtoc: Split source-code scanning to a separate fileSimon Glass3-169/+204
Before expanding the scanning features any more, move this into a separate file. This will make it easier to maintain in the future. In particular, it reduces the size of dtb_platdata.py and allows us to add tests specifically for scanning, without going through that file. The pieces moved are the Driver class, the scanning code and the various naming functions, since they mostly depend on the scanning results. So far there is are no separate tests for src_scan. These will be added as new functionality appears. This introduces no functional change. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-05dtoc: Drop dm_populate_phandle_data()Simon Glass5-49/+13
This has not been needed since parent information was added and we started using indicies for references to other drivers instead of pointers. It was kept around in the expectation that it might be needed later. However with the latest updates, it doesn't seem likely that we'll need this in the foreseeable future. Drop dm_populate_phandle_data() from dtoc and driver model. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-05dtoc: Output nodes in orderSimon Glass2-43/+34
Previously we had to worry about nodes being output before those that they depended on, thus causing build errors. So the current algorithm is careful to output nodes in the right order. We now use a different method for outputting phandles that does not involve pointers. Also we plan to add a 'declarations' header file to declare all drivers as 'extern'. Update the code to drop the dependency checking and output in a simple loop. This makes the output easier to follow since drivers are in order of thier indices (0, 1, ...), which is also the order it appears in in the linker list. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-05dtoc: Allow specifying the base directory for testsSimon Glass2-6/+46
The base directory of U-Boot, where the source is, it currently calculated from the directory of the dtb_platdata.py script. If this is installed elsewhere that will not work. Also it is inconvenient for tests. Add a parameter to allow specifying this base directory. To test this, pass a temporary directory with some files in it and check that they are passed to scan_driver(). Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-05dtoc: Add the method for each command to OutputFileSimon Glass1-26/+16
Rather than the if/else construct, update OutputFile with the method to call to process each command. This is easier to maintain as the number of commands increases. Rename generate_tables to generate_plat since it better describes what is being generated ('plat' is the U-Boot name for platform data). With this, each output method needs to have the same signature. Store the output structures in a member variable instead of using parameters, to accomplish this. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-05dtoc: Rename dt-platdata.c to dt-plat.cSimon Glass5-7/+7
Use this new name to be consistent with the rest of U-Boot, which talks about 'plat' for the platform data, which is what this file holds. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-05dtoc: Add a header comment to each generated fileSimon Glass2-12/+24
It is currently fairly obvious what the two generated files are for, but this will change as more are added. It is helpful for readers to describe the purpose of each file. Add a header commment field to OutputFile and use it to generate a comment at the top of each file. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-05dtoc: Run tests using test_utilSimon Glass1-21/+10
Use the standard function for running tests and reported results. This allows the tests to run in parallel, which is a significant speed-up on most machines (e.g. 4.5 seconds -> 1.5s on mine). Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-05concurrencytest: Fix Python3 warningSimon Glass1-2/+2
This gives a warning in some situations: File "tools/dtoc/../concurrencytest/concurrencytest.py", line 95, in do_fork stream = os.fdopen(c2pread, 'rb', 1) File "/usr/lib/python3.8/os.py", line 1023, in fdopen return io.open(fd, *args, **kwargs) RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used Fix this by dropping the line-buffer parameter. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-05dm: Rename U_BOOT_DRIVER_ALIAS to DM_DRIVER_ALIASSimon Glass19-26/+26
We use the U_BOOT_ prefix (i.e. U_BOOT_DRIVER) to declare a driver but in every other case we just use DM_. Update the alias macros to use the DM_ prefix. We could perhaps rename U_BOOT_DRIVER() to DM_DRIVER(), but this macro is widely used and there is at least some benefit to indicating it us a U-Boot driver, particularly for code ported from Linux. So for now, let's keep that name. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-05dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()Simon Glass73-110/+110
In the spirit of using the same base name for all of these related macros, rename this to have the operation at the end. This is not widely used so the impact is fairly small. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-05dm: Rename DM_GET_DEVICE() to DM_DRVINFO_GET()Simon Glass3-10/+6
This does not get a device (struct udevice *) but a struct driver_info * so the name is confusing. Rename it accordingly. Since we plan to have several various of these macros, put GET at the end instead of the middle, so it is easier to spot the related macros. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-05dm: Rename U_BOOT_DEVICE() to U_BOOT_DRVINFO()Simon Glass64-148/+148
The current macro is a misnomer since it does not declare a device directly. Instead, it declares driver_info record which U-Boot uses at runtime to create a device. The distinction seems somewhat minor most of the time, but is becomes quite confusing when we actually want to declare a device, with of-platdata. We are left trying to distinguish between a device which isn't actually device, and a device that is (perhaps an 'instance'?) It seems better to rename this macro to describe what it actually is. The macros is not widely used, since boards should use devicetree to declare devices. Rename it to U_BOOT_DRVINFO(), which indicates clearly that this is declaring a new driver_info record, not a device. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-05Makefile: Invoke dtoc only onceSimon Glass1-12/+9
Update the Makefile to run dtoc only once, generating all required files. This saves time since there is a lot of processing in each invocation of dtoc. We already have a variable for the object files to build, so use that instead of repeating the same filenames. Add a C version of this also, for the same reason. This makes it easier to add new C files (generated by dtoc) to the build later, as needed. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-05dtoc: Add an 'all' commandSimon Glass4-10/+51
With upcoming changes, dtoc will output several files for different of-platdata components. Add a way to output all ava!ilable files at once ('all'), to the appropriate directories, without needing to specify each one invidually. This puts the commands in alphabetical order, so update the tests accordingly. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-05dtoc: Allow outputing to multiple filesSimon Glass2-10/+94
Implement the 'output directory' feature, allowing dtoc to write the output files separately to the supplied directories. This allows us to handle the struct and platdata output in one run of dtoc. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-05dtoc: Allow providing a directory to write files toSimon Glass3-10/+19
At present dtoc writes only a single file on each invocation. U-Boot writes the two files it needs by separate invocations of dtoc. Since dtoc now scans all U-Boot driver source, this is fairly slow (about 1 second per file). It would be better if dtoc could write all the files at once. In preparation for this, add a way to specify an output directory for the files. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-05dtoc: Test the stdout outputSimon Glass1-15/+22
Normally dtoc outputs to a file but it also offers a way to write output to stdout. At present the test for that does not actually check that the output is correct. Add this to the test. This uses a member variable to hold the expected text, so it can be used in muitiple places. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-05dtoc: Use None to mean stdoutSimon Glass3-7/+7
At present dtoc uses '-' internally to mean that output should go to stdout. This is not necessary and None is more convenient. Update it. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-05dtoc: Tidy up pylint warnings in testSimon Glass1-71/+85
Tidy up this file to reduce the number of pylint warnings. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-05dm: core: Add logging when lists_bind_fdt() failsSimon Glass1-1/+1
It is useful to see the error code when this fails. Add logging for this function. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-05dm: core: Allow the uclass list to moveSimon Glass6-11/+19
At present the uclass list head is in global_data. This is convenient but with the new of-platdata we need the list head to be declared by the generated code. Change this over to be a pointer. Provide a 'static' version in global_data to retain the current behaviour. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-05dm: core: Split out scanning code to dm_scan()Simon Glass1-14/+35
Move the code related to scanning for devices to bind, into a new function. This will make it easier to skip this step with the new of-platdata improvements. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-05dm: core: Rename device node to indicate it is privateSimon Glass1-4/+7
To avoid having people accidentally access this member, add a trailing underscore. Also remove it when of-platdata is enabled, since it is not used. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-05dm: core: Access device ofnode through functionsSimon Glass50-82/+113
At present ofnode is present in the device even if it is never used. With of-platdata this field is not used, so can be removed. In preparation for this, change the access to go through inline functions. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-05dm: core: Use dev_has_ofnode() instead of dev_of_valid()Simon Glass15-35/+30
We have two functions which do the same thing. Standardise on dev_has_ofnode() since there is no such thing as an 'invalid' ofnode in normal operation: it is either null or missing. Also move the functions into one place. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>