summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
...
| * mailbox: Rename free() to rfree()Simon Glass2020-02-051-2/+2
| | | | | | | | | | | | | | | | This function name conflicts with our desire to #define free() to something else on sandbox. Since it deals with resources, rename it to rfree(). Signed-off-by: Simon Glass <sjg@chromium.org>
| * cmd: Add command to dump drivers and compatible stringsSean Anderson2020-02-051-0/+3
| | | | | | | | | | | | | | | | | | This adds a subcommand to dm to dump out what drivers are installed, and their compatible strings. I have found this useful in ensuring that I have the correct drivers compiled, and that I have put in the correct compatible strings. Signed-off-by Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * tpm: add a helper to iterate on all tpm devicesPhilippe Reynes2020-02-051-0/+3
| | | | | | | | | | | | | | | | This add a helper for_each_tpm_device that run through all the tpm (1.x and 2.0) devices. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
| * test: Add a way to check each line of console outputSimon Glass2020-02-052-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | When writing tests to check the output from commands it is useful to be able to check the output line by line using an assertion. Add helper macros to support this and to check that there is no unexpected trailing data. Also some commands produce a dump using print_buffer(). Add a way to check that the correct number of bytes are dumped (ignoring the actual contents). Signed-off-by: Simon Glass <sjg@chromium.org>
| * console: Add a function to read a line of the output / eofSimon Glass2020-02-051-0/+19
| | | | | | | | | | | | | | | | | | | | | | When recording the console output for testing it is useful to be able to read the output a line at a time to check that the output is correct. Also we need to check that we get to the end of the output. Add a console function to return the next line and another to see how must data is left. Signed-off-by: Simon Glass <sjg@chromium.org>
| * bloblist: Tidy up a few comments and code-style nitsSimon Glass2020-02-051-1/+2
| | | | | | | | | | | | | | Add a messing error code to bloblist_new() and tidy up the line length in bloblist_addrec(). Signed-off-by: Simon Glass <sjg@chromium.org>
| * bloblist: Add a new function to add or check sizeSimon Glass2020-02-051-0/+13
| | | | | | | | | | | | | | A common check is to see if a blob is present, create it if not and make sure that the size is large enough. Add a function to handle this. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: core: Add a way to iterate through children, probing eachSimon Glass2020-02-051-0/+39
| | | | | | | | | | | | | | | | It is sometimes useful to process all children, making sure they are probed first. Add functions to help with this and a macro to make it more convenient. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: core: Add a way to read platdata for all child devicesSimon Glass2020-02-052-1/+44
| | | | | | | | | | | | | | | | | | When generating ACPI tables we need to make sure that all devices have read their platform data, so that they can generate the tables correctly. Rather than adding this code in ACPI, create a core function to handle it. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: core: Add ofnode_get_chosen_prop()Simon Glass2020-02-051-0/+12
| | | | | | | | | | | | | | Add a function to read a property from the chosen node, providing access to its length. Update ofnode_get_chosen_string() to make use of it. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: core: Add ofnode_read_prop()Simon Glass2020-02-051-1/+12
| | | | | | | | | | | | | | | | | | Add a new function to read a property that supports reading the length as well. Reimplement ofnode_read_string() using it and fix its comment. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: core: Rename ofnode_get_chosen_prop()Simon Glass2020-02-051-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | This function is actually intended to read a string rather than a property. All of its current callers use it that way. Also there is no way to return the length of the property from this function. Rename it to better indicate its purpose, using ofnode_read as the prefix since this matches most other functions. Also add some tests which are missing for these functions. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: core: Update comment for ofnode_get_chosen_node()Simon Glass2020-02-051-3/+6
| | | | | | | | | | | | | | The current comment is a big vague and misleading. Rewrite it to state precisely what the function does. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Add underscore prefix to macro parametersSimon Glass2020-02-051-22/+22
| | | | | | | | | | | | | | If a test happens to use the same variable as the macro parameter the macro does not work as intended. Add an underscore to guard against this. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: core: Use const device for the dev_read_...() interfaceSimon Glass2020-02-051-97/+108
| | | | | | | | | | | | | | These functions do not modify the device so should use a const pointer to it. Update the code accordingly. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: core: Use const device for the devfdt...() interfaceSimon Glass2020-02-051-13/+13
| | | | | | | | | | | | | | These functions do not modify the device so should use a const pointer to it. Update the code accordingly. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: pci: Update a few more interfaces for const udevice *Simon Glass2020-02-052-9/+9
| | | | | | | | | | | | Tidy up a few places where const * should be used. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: pci: Update the PCI read_config() method to const dev *Simon Glass2020-02-051-10/+12
| | | | | | | | | | | | | | At present this method uses a non-const udevice pointer, but the call should not modify the device. Use a const pointer. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: core: Use const where possible in device.hSimon Glass2020-02-052-16/+18
| | | | | | | | | | | | | | Update this header file to use const devices where possible, to permit callers to also use const. Signed-off-by: Simon Glass <sjg@chromium.org>
* | Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86Tom Rini2020-02-105-0/+217
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | - Move P2SB from Apollo Lake to a more generic location - Add a function to find a device by drvdata in DM core - Enhancement of DM IRQ uclass driver - Add a clock driver for Intel devices - Add support for ACPI general-purpose events - Add a TPM driver for H1/Cr50 - Enable TPM on Google Chromebook Coral
| * | tpm: Add more TPM2 definitionsSimon Glass2020-02-071-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add definitions for access and status. Need to drop the mixed case. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | dm: irq: Add support for requesting interruptsSimon Glass2020-02-071-0/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present driver model supports the IRQ uclass but there is no way to request a particular interrupt for a driver. Add a mechanism, similar to clock and reset, to read the interrupts required by a device from the device tree and to request those interrupts. U-Boot itself does not have interrupt-driven handlers, so just provide a means to read and clear an interrupt. This can be useful to handle peripherals which must use an interrupt to determine when data is available, for example. Bring over the basic binding file as well, from Linux v5.4. Note that the older binding is not supported in U-Boot; the newer 'special form' must be used. Add a simple test of the new functionality. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | dm: irq: Add support for interrupt controller typesSimon Glass2020-02-071-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There can be different types of interrupt controllers in a system and some drivers may need to distinguish between these. In general this can be handled using the device tree by adding the interrupt information to device nodes. However on x86 devices we have interrupt controllers which are not tied to any particular device and not really used in U-Boot. These still need to be inited, so a convenient method is to give each controller a type and allow a particular controller type to be probed. Add support for this in sandbox along with a test. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: remove the new bland line at EOF of test/dm/irq.c] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
| * | x86: Add a clock driver for Intel devicesSimon Glass2020-02-071-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far we have avoided adding a clock driver for Intel devices. But the Designware I2C driver needs a different clock (133MHz) on Intel devices than on others (166MHz). Add a simple driver that provides this information. This driver can be expanded later as needed. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | dm: core: Add a function to find a device by drvdataSimon Glass2020-02-072-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is sometimes useful to find a device in a uclass using only its driver data. The driver data often indicates the 'subtype' of the device, e,g, via its compatible string. Add a function to handle this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | dm: core: Allow iterating devices without uclass_get()Simon Glass2020-02-071-0/+17
| |/ | | | | | | | | | | | | | | | | | | | | | | At present we have uclass_foreach_dev() which requires that uclass_get() be called beforehand to find the uclass. This is good if we suspect that that function might fail, but often we know that the uclass is available. Add a new helper which does this uclass_get() automatically, so that only the uclass ID is needed. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* | board: ge: bx50v3, imx53ppd: configure CONFIG_SYS_BOOTMAPSZIan Ray2020-02-092-2/+4
| | | | | | | | | | | | Configure `CONFIG_SYS_BOOTMAPSZ' per guidance on u-boot@lists.denx.de. Signed-off-by: Ian Ray <ian.ray@ge.com>
* | board: ge: bx50v3, mx53ppd: fix firstboot detectionRobert Beckett2020-02-092-4/+3
| | | | | | | | | | | | | | | | | | Use `test' command to test for file existence instead of relying on the old functionality of the `ext2load' command (which now reports an error when attempting to load a zero length file). Signed-off-by: Robert Beckett <bob.beckett@collabora.com> Signed-off-by: Ian Ray <ian.ray@ge.com>
* | board: ge: mx53ppd: use DM for uartIan Ray2020-02-091-8/+1
| | | | | | | | | | | | | | | | Drop PPD_UART_PAD_CTRL since it matches defaults. Enable DM serial and MXC uart. Signed-off-by: Ian Ray <ian.ray@ge.com> Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
* | board: ge: bx50v3: use DM for uartRobert Beckett2020-02-091-8/+2
| | | | | | | | | | | | | | Remove legacy uart pad and iomux code Enable DM serial and mxc uart Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
* | board: ge: mx53ppd: Use DM for ethernetRobert Beckett2020-02-091-8/+0
| | | | | | | | | | | | | | | | Remove legacy iomux setup for fec. Enable phylib and DM fec. Use Kconfig for enabling fec. Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
* | board: ge: bx50v3: Enable DM PWM for backlightRobert Beckett2020-02-091-1/+1
| | | | | | | | | | | | | | | | | | | | Add backlight and panel devicetree definitions Use UCLASS_PANEL to enable backlight via display enable handler Remove old explicit gpio code for handling backlight Use cls command to initiate display in HW agnostic manner Enable DM regulator and pwm Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
* | board: ge: mx53ppd: enable DM_VIDEOIan Ray2020-02-091-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Enable DM_VIDEO for mx53ppd. Enable DM_REGULATOR_FIXED and DM_PWM for the backlight. Remove unused MX53PPD_LCD_POWER. Remove old (incorrect) setup_iomux_lcd. Enable backlight via display enable handler. Use cls command to initiate display in HW agnostic manner. Modify `failbootcmd' to use lcdputs. Signed-off-by: Ian Ray <ian.ray@ge.com> Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
* | board: ge: mx53ppd: add i2c eeprom bootcount storageRobert Beckett2020-02-091-3/+1
| | | | | | | | | | | | | | | | | | Add bootcount node, linking to i2c eeprom "bootcount" partitions for storage. Enable i2c eeprom bootcount backend storage. Enable bootcount command and use it for failbootcmd. Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
* | board: ge: bx50v3: add i2c eeprom bootcount storageRobert Beckett2020-02-091-3/+1
| | | | | | | | | | | | | | | | | | Add bootcount node, linking to i2c eeprom "bootcount" partitions for storage. Enable i2c eeprom bootcount backend storage. Enable bootcount command and use it for failbootcmd. Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
* | board: ge: bx50v3, imx53ppd: use DM I2CRobert Beckett2020-02-092-62/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove old (pre-DM) i2c setup code. Enable DM i2c. Convert common code to use DM rtc. Convert common code to read VPD from eeprom partition. Convert the generic i2c PMIC init code to use the new da9063 driver. mx53ppd only: Correct RTC compatible in device tree. Enable MXC DM i2c driver. Define CONFIG_SYS_MALLOC_F_LEN so that DM is available in pre-reloc. Make GPIO banks available during preloc, since initialisation is done in board_early_init_f(). Add gpio_request() calls to satisfy the DM_GPIO compatibility API. Remove unused power configuration. Signed-off-by: Robert Beckett <bob.beckett@collabora.com> Signed-off-by: Ian Ray <ian.ray@ge.com>
* | mx6sabre_common: Remove FEC related settingsFabio Estevam2020-02-093-8/+17
| | | | | | | | | | | | | | | | | | In preparation for converting to DM_ETH and moving the FEC symbols to Kconfig we need to move the FEC definitions to mx6sabreauto.h and mx6sabresd.h to avoid build breakage during the conversion. Signed-off-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Alifer Moraes <alifer.wsdm@gmail.com>
* | ARM: imx: novena: Enable DM ethernetMarek Vasut2020-02-091-7/+2
| | | | | | | | | | | | | | | | | | Convert to DM ethernet to prevent board removal. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Vagrant Cascadian <vagrant@debian.org>
* | warp7: remove unused usb configsJoris Offouga2020-02-091-4/+0
| | | | | | | | | | | | | | | | With commit 6b503f9e6549("warp7: Switch to DM USB"). These configs are not necessary Signed-off-by: Joris Offouga <offougajoris@gmail.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
* | mx7ulp_com: Remove unneeded SoC definitionsFabio Estevam2020-02-091-4/+0
| | | | | | | | | | | | | | | | | | Since commit 9c27310ac23c ("mx7ulp: Move SoC base address to a common file") we no longer need to have these SoC definitions in the board file, so remove them. Signed-off-by: Fabio Estevam <festevam@gmail.com> Acked-by: Peng Fan <peng.fan@nxp.com>
* | mx6ul_14x14_evk: Move CONFIG_DM_74X164 to defconfigFabio Estevam2020-02-091-5/+0
| | | | | | | | | | | | | | | | The CONFIG_DM_74X164 symbols should be moved to the defconfig file, as indicated in the comments. Signed-off-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* | board: toradex: Add Verdin iMX8M Mini supportIgor Opaniuk2020-02-091-0/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds initial minimal support for the Toradex Verdin iMX8M Mini Quad 2GB WB IT V1.0A module. They are now strapped to boot from eFuses which are factory fused to properly boot from their on-module eMMC. U-Boot supports booting from the on-module eMMC only, SDP support is disabled for now due to missing i.MX 8M Mini USB support. Functionality wise the following is known to be working: - eMMC, 8-bit and 4-bit MMC/SD card slots - Ethernet - GPIOs - I2C Boot sequence is: SPL ---> ATF (TF-A) ---> U-boot proper ATF, U-boot proper and u-boot.dtb images are packed into a FIT image, loaded by SPL. Boot: U-Boot SPL 2020.01-00187-gd411d164e5 (Jan 26 2020 - 04:47:26 +0100) Normal Boot Trying to boot from MMC1 NOTICE: Configuring TZASC380 NOTICE: RDC off NOTICE: BL31: v2.0(release):rel_imx_4.14.98_2.3.0-0-g09c5cc994-dirty NOTICE: BL31: Built : 01:11:41, Jan 25 2020 NOTICE: sip svc init U-Boot 2020.01-00187-gd411d164e5 (Jan 26 2020 - 04:47:26 +0100) CPU: Freescale i.MX8MMQ rev1.0 at 0 MHz Reset cause: POR DRAM: 2 GiB MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2 Loading Environment from MMC... OK In: serial Out: serial Err: serial Model: Toradex Verdin iMX8M Mini Quad 2GB Wi-Fi / BT IT V1.0A, Serial# 06535149 Net: eth0: ethernet@30be0000 Hit any key to stop autoboot: 0 Verdin iMX8MM # Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
* | board: presidio-asic: Add basic G3 engr. development board supportAlex Nemirovsky2020-02-071-0/+75
| | | | | | | | | | | | Add basic Presidio G3 engineering board support Signed-off-by: Alex Nemirovsky <alex.nemirovsky@cortina-access.com>
* | Merge branch 'master' of git://git.denx.de/u-boot-socfpgaTom Rini2020-02-062-7/+4
|\ \ | |/ |/| | | - Gen 5 and Watchdog fixes
| * watchdog: designware: Convert to DM and DT probingMarek Vasut2020-02-051-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert the designware watchdog timer driver to DM and add DT probing support. Perform minor coding style clean up, like drop superfluous braces. These ought to be no functional change. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Chin Liang See <chin.liang.see@intel.com> Cc: Dalon Westergreen <dwesterg@gmail.com> Cc: Dinh Nguyen <dinguyen@kernel.org> Cc: Jagan Teki <jagan@amarulasolutions.com> Cc: Ley Foon Tan <ley.foon.tan@intel.com> Cc: Philipp Tomisch <philipp.tomisch@theobroma-systems.com> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Cc: Tien Fong Chee <tien.fong.chee@intel.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com> Tested-by: Jagan Teki <jagan@amarulasolutions.com> # roc-rk3399-pc
| * watchdog: designware: Migrate CONFIG_DESIGNWARE_WATCHDOG to KconfigMarek Vasut2020-02-032-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Migrate CONFIG_DESIGNWARE_WATCHDOG to Kconfig and update the headers accordingly, no functional change. The S10 enables the WDT only in SPL, but does not enable it in U-Boot itself, hence disable it in the config again. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Chin Liang See <chin.liang.see@intel.com> Cc: Dalon Westergreen <dwesterg@gmail.com> Cc: Dinh Nguyen <dinguyen@kernel.org> Cc: Jagan Teki <jagan@amarulasolutions.com> Cc: Ley Foon Tan <ley.foon.tan@intel.com> Cc: Philipp Tomisch <philipp.tomisch@theobroma-systems.com> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Cc: Tien Fong Chee <tien.fong.chee@intel.com>
* | Merge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriqTom Rini2020-02-0514-81/+120
|\ \ | | | | | | | | | | | | - Bug fixes on ls1012a, ls1021a, ls1028ardb platforms Integrate fspi for ls1028a, add DM-I2C support, update secure boot header offset
| * | armv8: ls2088a: Updates secure boot headers offsetPriyanka Singh2020-02-042-32/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | Updates the secure boot headers offsets of Kernel and other firmware images for SD and NOR boot sources used by esbc_validate command. Signed-off-by: Priyanka Singh <priyanka.singh@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
| * | armv8: ls1088a: Updates secure boot headers offsetPriyanka Singh2020-02-042-33/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | Updates the secure boot headers offsets of Kernel and other firmware images for SD and QSPI boot sources used by esbc_validate command. Signed-off-by: Priyanka Singh <priyanka.singh@nxp.com> Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
| * | armv8: lx2160a: Updates secure boot headers offsetPriyanka Singh2020-02-041-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Updates the secure boot headers offsets of Kernel and other firmware images for SD and XSPI boot sources used by esbc_validate command. Signed-off-by: Priyanka Singh <priyanka.singh@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>