aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-02-04x86: itss: Add a Kconfig option to enable/disable ITSS driverWolfgang Wallner
Add a Kconfig option to support enabling/disabling the inclusion of the ITSS driver depending on the platform. Atuomatically select the ITSS driver when building for Apollo Lake. Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: squashed in http://patchwork.ozlabs.org/patch/1232761/] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-04x86: Move itss.c from Apollo Lake to a more generic locationWolfgang Wallner
The Interrupt Timer Subsystem (ITSS) is not specific to Apollo Lake, so move it to a common location within arch/x86. Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: conditionally build itss.c] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-04watchdog: omap_wdt: Fix WDT coding styleMarek Vasut
Fix obvious coding style problems, no functional change. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Grygorii Strashko <grygorii.strashko@ti.com> Cc: Sam Protsenko <semen.protsenko@linaro.org> Cc: Suniel Mahesh <sunil.m@techveda.org> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04watchdog: omap_wdt: Fix WDT reloadingMarek Vasut
The watchdog timer value was never updated in the hardware by this driver, so the watchdog triggered on some random stale value that was left in the hardware. The TI SPRUH37C says, quote: 20.4.3.9 Modifying Timer Count/Load Values and Prescaler Setting ... After a write access, the load register value and prescaler ratio registers are updated immediately, but new values are considered only after the next consecutive counter overflow or after a new trigger command (the WDT_WTGR register). This means at least one trigger must happen. The driver probably depended on someone calling it's .reset() callback, however that is not guaranteed e.g. if the WDT operates without servicing. Add this missing trigger. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Grygorii Strashko <grygorii.strashko@ti.com> Cc: Sam Protsenko <semen.protsenko@linaro.org> Cc: Suniel Mahesh <sunil.m@techveda.org> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04watchdog: omap_wdt: Fix WDT timeout configurationMarek Vasut
The timeout parameter of omap3_wdt_start() is in miliseconds, while GET_WLDR_VAL() expects parameter in seconds. Fix this so the WDT driver is actually usable. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Grygorii Strashko <grygorii.strashko@ti.com> Cc: Sam Protsenko <semen.protsenko@linaro.org> Cc: Suniel Mahesh <sunil.m@techveda.org> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04configs: j721e_evm_a72: Add GPIO supportFaiz Abbas
Enable CONFIG_DA8XX_GPIO to enable GPIO support. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04arm: dts: k3-j721e-main: Add Support for gpio0Faiz Abbas
Add the main_gpio0 node. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04gpio: da8xx_gpio: Add "ti,keystone-gpio" compatibleVignesh Raghavendra
Add "ti,keystone-gpio" compatible so as be able to use Linux DT files as is. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by: Faiz Abbas <faiz_abbas@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04gpio: da8xx_gpio: Fix compiler warningVignesh Raghavendra
Fix below compiler warning for 64bit builds drivers/gpio/da8xx_gpio.c: In function ‘davinci_get_gpio_bank’: drivers/gpio/da8xx_gpio.c:446:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] return (struct davinci_gpio *)addr; Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by: Faiz Abbas <faiz_abbas@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04configs: j721e_evm_defconfig: Enable PCA953x IO expanderVignesh Raghavendra
Enable PCA953x IO expander to control MMC/SD power lines. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04arm: dts: k3-j721e-common-proc-board: Enable I2C expander for SPLVignesh Raghavendra
IO expanders are required to power cycle SD card. So enable the same Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04arm: dts: k3-j721e-common-proc-board: Add I2C GPIO expanderVignesh Raghavendra
Add I2C GPIO expander required to power cycle MMC/SD Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04arm: dts: k3-j721e: Add I2C nodesVignesh Raghavendra
J721e SoC has 2 I2C instances in MCU domain and 7 I2C instances in main domain. Add DT nodes for the same Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04gpio: pca953x_gpio: Add support for 24 bit IO expanderVignesh Raghavendra
J721e EVM has a TCA6424 IO expander that has 24 GPIOs. Add support for the same Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04configs: j721e_evm_r5/a72_defconfig: Enable DFU related configsVignesh Raghavendra
Enable DFU, Fastboot and USB mass storage gadget related configs Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04configs: j721e_evm_r5/a72_defconfig: Enable USB Gadget related configsVignesh Raghavendra
Enable USB Gadget for R5 SPL, A72 SPL and A72 U-Boot to support DFU boot Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04configs: j721e_evm_r5_defconfig: Increase early malloc sizeVignesh Raghavendra
Increase R5 SPL early malloc memory pool by ~7K to accommodate SPL USB DFU boot requirements Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04configs: j721e_evm: Add DFU related variablesVignesh Raghavendra
Add configs to download varies stages of bootloader images to RAM during DFU boot. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04arm: dts: k3-j721e-common-proc-board: Enable USB0 in peripheral modeVignesh Raghavendra
Enable USB0 in peripheral mode so that it be used for DFU Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04arm: mach-k3: sysfw-loader: Add support to download SYSFW via DFUVignesh Raghavendra
Add support to download SYSFW into internal RAM via DFU in DFU boot mode. Prepare a DFU config entity entry dynamically using buffer address allocated for SYSFW and start DFU gadget to get SYSFW. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04arm: mach-k3: j721e: Rename BOOT_DEVICE_USB to BOOT_DEVICE_DFUVignesh Raghavendra
J721e does not support USB Host MSC boot, but only supports DFU boot. Since BOOT_DEVICE_USB is often used for host boot mode and BOOT_DEVICE_DFU is used for DFU boot, rename BOOT_DEVICE_USB macro to BOOT_DEVICE_DFU Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04configs: j721e_evm_a72: Fix redundant environment offsetFaiz Abbas
The current environment offset overlaps with the sysfw area and whenever environment is saved in the redundant slot, it overwrites sysfw.itb. Fix the offset to prevent this. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04arm: ti: boot: Use correct dtb and dtbo on Android bootSam Protsenko
Read correct dtb blob from boot.img/recovery.img and apply correct dtbo blobs from dtbo partition. Signed-off-by: Sam Protsenko <joe.skb7@gmail.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04env: ti: boot: Boot Android with dynamic partitionsSam Protsenko
Changes: - use boot.img instead of boot_fit.img - use .dtb from boot.img v2 - implement recovery boot - always boot ramdisk from boot.img, we can't mount system as root now, as system is a logical partition inside of super partition - don't add "skip_initramfs" to cmdline anymore - to boot into recovery, use boot image from recovery partition - prepare partition table: - A/B scheme - use 'super' partition instead of 'system' and 'vendor' - add dtbo partitions - introduce metadata partition Not implemented: reading and applying dtbo blobs from dtbo partition. Signed-off-by: Sam Protsenko <joe.skb7@gmail.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04env: ti: boot: Respect slot_suffix in AVB commandsSam Protsenko
Signed-off-by: Sam Protsenko <joe.skb7@gmail.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04configs: am57xx_evm: Enable Android commandsSam Protsenko
Enable Android commands that will be needed for Android 10 boot flow implementation, for all AM57x variants. Commands enabled: 1. 'abootimg': - CONFIG_CMD_ABOOTIMG=y 2. 'ab_select': - CONFIG_ANDROID_AB=y - CONFIG_CMD_AB_SELECT=y 3. 'avb': - CONFIG_LIBAVB=y - CONFIG_AVB_VERIFY=y - CONFIG_CMD_AVB=y While at it, resync defconfig files with "make savedefconfig". Signed-off-by: Sam Protsenko <joe.skb7@gmail.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04test/py: android: Add test for abootimgSam Protsenko
Unit test for 'abootimg' command. Right now it covers dtb/dtbo functionality in Android Boot Image v2, which was added recently. Running test: $ ./test/py/test.py --bd sandbox --build -k test_abootimg shows that 1/1 tests passes successfully. Signed-off-by: Sam Protsenko <joe.skb7@gmail.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04doc: android: Convert to Sphinx formatSam Protsenko
Convert Android documentation from regular txt format to Sphinx (RST). Also add Android index.rst file and reference it in root index.rst, so that Android documentation is visible. Test: $ make htmldocs $ xdg-open doc/output/index.html Signed-off-by: Sam Protsenko <joe.skb7@gmail.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04doc: android: Add documentation for Android Boot ImageSam Protsenko
Describe Android Boot Image format, how its support is implemented in U-Boot and associated commands usage. Signed-off-by: Sam Protsenko <joe.skb7@gmail.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04cmd: abootimg: Add abootimg commandSam Protsenko
This command can be used to extract fields and image payloads from Android Boot Image. It can be used for example to implement boot flow where dtb is taken from boot.img (as v2 incorporated dtb inside of boot.img). Using this command, one can obtain needed dtb blob from boot.img in scripting manner, and then apply needed dtbo's (from "dtbo" partition) on top of that, providing then the resulting image to bootm command in order to boot the Android. Also right now this command has the sub-command to get an address and size of recovery dtbo from recovery image (for non-A/B devices only, see [1,2] for details). It can be tested like this: => mmc dev 1 => part start mmc 1 boot_a boot_start => part size mmc 1 boot_a boot_size => mmc read $loadaddr $boot_start $boot_size => abootimg get ver => abootimg dump dtb [1] https://source.android.com/devices/bootloader/boot-image-header [2] https://source.android.com/devices/architecture/dto/partitions Signed-off-by: Sam Protsenko <joe.skb7@gmail.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04image: android: Add routine to get dtbo paramsSam Protsenko
Android Boot Image v1 adds "Recovery DTB" field in image header and associate payload in boot image itself [1]. Payload should be in Android DTB/DTBO format [2]. That "Recovery DTB" area should be only populated for non-A/B devices, and only in recovery image. Add function to get an address and size of that payload. That function can be further used e.g. in 'abootimg' command to provide the user a way to get the address of recovery dtbo from U-Boot shell, which can be further parsed using 'adtimg' command. [1] https://source.android.com/devices/bootloader/boot-image-header [2] https://source.android.com/devices/architecture/dto/partitions Signed-off-by: Sam Protsenko <joe.skb7@gmail.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04image: android: Add functions for handling dtb fieldSam Protsenko
Android Boot Image v2 adds "DTB" payload (and corresponding field in the image header). Provide functions for its handling: - android_image_get_dtb_by_index(): Obtain DTB blob from "DTB" part of boot image, by blob's index - android_image_print_dtb_contents(): Iterate over all DTB blobs in "DTB" part of boot image and print those blobs info "DTB" payload might be in one of the following formats: 1. concatenated DTB blobs 2. Android DTBO format The latter requires "android-image-dt.c" functionality, so this commit selects that file for building for CONFIG_ANDROID_BOOT_IMAGE option. Right now this new functionality isn't used, but it can be used further. As it's required to apply some specific dtbo blob(s) from "dtbo" partition, we can't automate this process inside of "bootm" command. But we can do next: - come up with some new command like "abootimg" to extract dtb blob from boot image (using functions from this patch) - extract desired dtbo blobs from "dtbo" partition using "adtimg" command - merge dtbo blobs into dtb blob using "fdt apply" command - pass resulting dtb blob into bootm command in order to boot the Android kernel with Android ramdisk from boot image Signed-off-by: Sam Protsenko <joe.skb7@gmail.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04x86: Move itss.h from Apollo Lake to the generic x86 include directoryWolfgang Wallner
The code in this file is not specific to Apollo Lake. According to coreboot sources (where this code comes from), it is common to at least: * Apollo Lake * Cannon Lake * Ice Lake * Skylake Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-04x86: apl: Add the term "Interrupt Timer Subsystem" to ITSS filesWolfgang Wallner
ITSS stands for "Interrupt Timer Subsystem", so add that term to the description of the relevant files. Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-04spi: ich: Drop while loop in hardware sequencing erase caseWolfgang Wallner
When ich_spi_exec_op_hwseq() is called to erase a 4k block (opcode = SPINOR_OP_BE_4K), it expects to find a length value in op->data.nbytes, but that value is always 0. As a result, the while loop is never executed and no erase is carried out. Fix this by dropping the loop code entirely, only keeping the relevant parts of the loop body. See http://patchwork.ozlabs.org/patch/1222779/ for more detailed background information and discussion. Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-04x86: edison: Switch to ACPI modeAndy Shevchenko
SFI is quite poor and useless resource provider. Moreover it makes hard to develop and extend functionality in the Linux kernel. Enable a necessary minimum to use ACPI on Intel Edison. Linux kernel have been prepared for this change since v5.4, where the last crucial driver, i.e. for Basin Cove PMIC, has been submitted. Note, that stock image won't suffer by this change since it doesn't have ACPI enabled on the kernel level. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-04x86: edison: Enable command line editingMarek Vasut
Enable command line editing, because it is extremely convenient. Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-04doc: Chromebook Coral: fix build warningsHeinrich Schuchardt
Use valid restructured text to avoid warnings like WARNING: Title underline too short. WARNING: Block quote ends without a blank line; unexpected unindent. when building with `make htmldocs`. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-04x86: limit the fs segment to the pointer sizeMasahiro Yamada
The fs segment is only used to get the global data pointer. If it is accessed beyond sizeof(new_gd->arch.gd_addr), it is a bug. To specify the byte-granule limit size, drop the G bit, so the flag field is 0x8093 instead of 0xc093, and set the limit field to sizeof(new_gd->arch.gd_addr) - 1. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: fixed the comments about FS segement] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-04x86: use invd instead of wbinvd in real mode start codeMasahiro Yamada
I do not know why the boot code immediately after the system reset should write-back the cache content. I think the cache invalidation should be enough. I tested this commit with qemu-x86_defconfig, and it worked for me. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-04doc: intel: Update serial driver changes in slimbootloader.rstPark, Aiden
Now, Slim Bootloader uses NS16550_DYNAMIC to support serial port configuration at runtime, so no more code change is required. Therefore, remove unnecessary steps and fix minor typo. Signed-off-by: Aiden Park <aiden.park@intel.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-04x86: serial: Use NS16550_DYNAMIC in Slim BootloaderPark, Aiden
Slim Bootloader provides serial port info in its HOB to support both IO or MMIO serial ports, but it's controlled by SYS_NS16550_MEM32 or SYS_NS16550_PORT_MAPPED in U-Boot. To support both serial port configurations dynamically at runtime, Slim Bootloader serial driver leverages NS16550_DYNAMIC. Signed-off-by: Aiden Park <aiden.park@intel.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: remove the obsolete comments for data->type] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-04x86: Move coreboot over to use the coreboot UARTSimon Glass
Use this UART to improve the compatibility of U-Boot when used as a coreboot payload. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-04x86: serial: Add a coreboot serial driverSimon Glass
Coreboot can provide information about the serial device in use on a platform. Add a driver that uses this information to produce a working UART. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-04x86: Update coreboot serial table structSimon Glass
Since mid 2016, coreboot has additional fields in the serial struct that it passes down to U-Boot. Add these so we are in sync. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-04serial: ns16550: Support run-time configurationSimon Glass
At present this driver uses an assortment of CONFIG options to control how it accesses the hardware. This is painful for platforms that are supposed to be controlled by a device tree or a previous-stage bootloader. Add a new CONFIG option to enable fully dynamic configuration. This controls register spacing, size, offset and endianness. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Aiden Park <aiden.park@intel.com> Tested-by: Aiden Park <aiden.park@intel.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: squashed in http://patchwork.ozlabs.org/patch/1232929/] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-02Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini
- DFU and Cadence USB 3 fixes
2020-02-02dfu: Add option to skip empty pages when flashing UBI images to NANDGuillermo Rodríguez
Add a new option to enable the DROP_FFS flag when flashing UBI images to NAND in order to drop trailing all-0xff pages. This is similar to the existing FASTBOOT_FLASH_NAND_TRIMFFS option. Signed-off-by: Guillermo Rodriguez <guille.rodriguez@gmail.com> Cc: Lukasz Majewski <lukma@denx.de>
2020-02-02usb: cdns3: ep0: Invalidate cache before reading Setup PacketVignesh Raghavendra
Invalidate dcache line before accessing Setup Packet contents. Otherwise driver will see stale content on non coherent architecture. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2020-02-01Merge tag 'u-boot-rockchip-20200130' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip - Support redundant boot for rk3399 - Support binman for rockchip platform - Update ram driver and add ddr4 support for rk3328