summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-11-18Kbuild: add LDFLAGS_STANDALONEDaniel Schwierzeck7-10/+14
Introduce a new Makefile variable for passing LDFLAGS to standalone programs. Currently the variable CONFIG_STANDALONE_LOAD_ADDR is misued on some archs to pass a specific linker script. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Rick Chen <rick@andestech.com>
2018-11-18mips: mt76xx: linkit-smart-7688: Misc updates to dts/config/defconfigStefan Roese4-16/+31
These misc updates include the following changes: - Change baudrate from 57600 to 115200 - Enable MIPS_BOOT_CMDLINE_LEGACY - Enable FIT support - Enable ethernet support - Enable SPI support - Enable GPIO support - Change max image size from 0x40000 to 0x80000 A note about the baudrate change: The original Mediatek U-Boot version used 57600 baud. Lets move to a more common and faster speed of 115200 baud. And remove the "console=" property from the DT as its not needed. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2018-11-18mips: mt76xx: linkit-smart-7688: Use ioremap_nocache to get addressStefan Roese1-2/+5
Use the correct function to get the uncached address to access the SoC registers. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2018-11-18mips: mt76xx: gardena-smart-gateway: Misc updates to dts/config/defconfigStefan Roese4-19/+58
These misc updates include the following changes: - Change baudrate from 57600 to 115200 - Enable MIPS_BOOT_CMDLINE_LEGACY - Enable FIT support - Enable ethernet support - Enable SPI NOR and NAND support - Change MTD_UBI_BEB_LIMIT to 22 - Enable MTD Support - Enable GPIO support - Enable watchdog support - Enable bootcounter support - Enable version variable - Change max image size from 0x80000 to 0xa0000 - Change SYS_MALLOC_LEN to 16MiB (because of UBI/UBIFS) Signed-off-by: Stefan Roese <sr@denx.de> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2018-11-18mips: mt76xx: gardena-smart-gateway: Add board_late_init() to set LED def stateStefan Roese2-0/+10
This is needed to set the LEDs automatically to a default state, as configured in the dts. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2018-11-18mips: mt76xx: gardena-smart-gateway: Add LEDs to dtsStefan Roese1-0/+59
Add the available LEDs to the DTS file so that they can be used. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2018-11-18mips: mt76xx: gardena-smart-gateway: Configure GPIOs (digital vs analog)Stefan Roese1-6/+9
Configure digital vs analog GPIOs as needed on this board. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2018-11-18mips: mt76xx: Enable watchdog supportStefan Roese3-0/+43
This patch enables and starts the watchdog on the MT7620 platform. Currently the WD timeout is configured to 60 seconds. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> [fixed build error due to missing function prototype arch_misc_init] Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2018-11-18mips: mt76xx: Kconfig: Add ethernet and GPIO supportStefan Roese1-0/+2
Imply DM_ETH and DM_GPIO for ARCH_MT7620, as this platform now supports ethernet and GPIO as well. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2018-11-18mips: mt76xx: Add watchdog DT node to mt7628a.dtsiStefan Roese1-0/+11
Add the watchdog DT node to the DTS file. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2018-11-18mips: mt76xx: Add GPIO DT nodes to mt7628a.dtsiStefan Roese1-0/+32
Add the GPIO DT nodes to the DTS file. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2018-11-18mips: mt76xx: Add ethernet DT node to mt7628a.dtsiStefan Roese1-0/+8
Add the ethernet DT node to the DTS file. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2018-11-18mips: mt76xx: lowlevel_init.S: Add missing memory controller reset in DDR initStefan Roese1-0/+6
This fixes an issue which has been noticed on the Gardena board, with the watchdog enabled, where the watdchdog reset (after a system hang) did result in reporting of 2.9 GiB and a hang after this. With this patch applied the memory controller is correctly reset and initialized again even after a watchdog reset. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2018-11-18gpio: Add MT7621 GPIO supportStefan Roese3-0/+192
This patch adds GPIO support for the Mediatek MT7621 SoC, tested on MT7688 (Gardena smart-gateway). The driver is loosly based on the Linux kernel version. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> [fixed checkpatch.pl warnings: Prefer 'unsigned int' to bare use of 'unsigned'] Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2018-11-18wdt: Add MT7621 watchdog driverStefan Roese3-0/+111
This patch adds watchdog support for the Mediatek MT7621 SoC. The driver is loosly based on the Linux kernel version. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> [fixed merge conflict in drivers/watchdog/Kconfig] Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2018-11-17Merge branch '2018-11-16-master-imports'Tom Rini108-290/+5162
- Initial bcm968580xref, am65x_evm_r5 support - lpc32xx, omap3_logic/am3517_evm updates - pinctrl command - fs_loader available for SPL
2018-11-17sunxi: Update MAINTAINERS file for recent boardsTom Rini1-0/+6
Add entries for the pine64-lts and pinebook configs. Cc: Vasily Khoruzhick <anarsoul@gmail.com> Cc: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2018-11-17fdt_region: Ensure that depth never goes below -1Konrad Beckmann1-0/+3
A specially crafted FIT image makes it possible to overflow the stack with controlled values when using the verified boot feature. Depending on the memory layout, this could be used to overwrite configuration variables on the heap and setting them to 0, e.g. disable signature verification, thus bypassing it. This change fixes a bug in fdt_find_regions where the fdt structure is parsed. A lower value than -1 of depth can lead to a buffer underflow write on the stack. Signed-off-by: Konrad Beckmann <konrad.beckmann@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-11-17image-sig: Ensure that hashed-nodes is null-terminatedKonrad Beckmann1-0/+5
A specially crafted FIT image leads to memory corruption in the stack when using the verified boot feature. The function fit_config_check_sig has a logic error that makes it possible to write past the end of the stack allocated array node_inc. This could potentially be used to bypass the signature check when using verified boot. This change ensures that the number of strings is correct when counted. Signed-off-by: Konrad Beckmann <konrad.beckmann@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-11-17Ability to modify distro boot filenameMartyn Welch1-3/+4
Add in the ability to modify the distro boot filename. Whilst not immediately useful in normal usage, it allows an alternative configuration to be provided when other u-boot functionality is used, such as bootcount limit, to fallback to an alternative boot configuration. In this case we can follow the same boot path as for normal boot, just using an alternatively named configuration file. For example, by providing the following `altbootcmd` when bootcount is in use: altbootcmd=setenv boot_extlinx_conf extlinux-rollback.conf; \ run distro_bootcmd Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-11-17misc: fs_loader: Fix compiler warningKeerthy1-1/+1
Fix compiler warning drivers/misc/fs_loader.c:193:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t {aka long unsigned int}’ [-Wformat=] Signed-off-by: Keerthy <j-keerthy@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-11-17misc: fs_loader: Use device_get_global_by_ofnode to get to nodeKeerthy1-3/+2
Instead of two staged ofnode_to_offset followed by device_get_global_by_of_offset approach, direcly use the device_get_global_by_ofnode to fetch the device. Signed-off-by: Keerthy <j-keerthy@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-11-17fs: Makefile: Add fs.c under SPL for fs_loaderKeerthy1-0/+1
Add fs.c under SPL as well as it is needed for fs_loader Signed-off-by: Keerthy <j-keerthy@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> [trini: Add as obj-$(CONFIG_FS_LOADER) for non-SPL_FRAMEWORK builds] Signed-off-by: Tom Rini <trini@konsulko.com>
2018-11-17serial: ns16550: add setconfig supportSimon Goldschmidt1-2/+41
Add possibility to update the serial parity used. Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
2018-11-17dm: serial: fix comment on dm_serial_ops setconfigSimon Goldschmidt1-3/+1
The comment on this function prototype describes nonexistent parameters. It seems to be copied from 'setparity'. Update it to match its the parameter list. Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-11-17board: ti: am65x: Update README to add R5 build supportLokesh Vutla1-22/+92
Update the README file to add r5 build support and system firmware support. Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
2018-11-17configs: am65x_evm_r5: Add initial supportLokesh Vutla2-0/+88
Add initial defconfig support for AM65x that runs on R5. Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> Signed-off-by: Keerthy <j-keerthy@ti.com>
2018-11-17armv7r: dts: am654: Add initial supportLokesh Vutla4-1/+492
Add R5 specific dts for am654-evm. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> Signed-off-by: Keerthy <j-keerthy@ti.com> Signed-off-by: Schuyler Patton <spatton@ti.com> Signed-off-by: James Doublesin <doublesin@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2018-11-17arm: dts: k3: Sync dts from LinuxLokesh Vutla5-92/+171
Sync the k3-am654 specific dts files from Linux next with tag 20181019. This changes are in queue for Linux v4.20-rc1 Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2018-11-17board: ti: am654: r5: Add initial support for am654Lokesh Vutla3-0/+32
Add initial support for AM654 based EVM running on R5. Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
2018-11-17armv7R: K3: am654: Add support for triggering ddr init from SPLLokesh Vutla1-0/+13
In SPL, DDR should be made available by the end of board_init_f() so that apis in board_init_r() can use ddr. Adding support for triggering DDR initialization from board_init_f(). Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2018-11-17armv7R: K3: am654: Add support to start ATF from R5 SPLLokesh Vutla3-0/+60
Considering the boot time requirements, Cortex-A core should be able to start immediately after SPL on R5. Add support for the same. Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2018-11-17armv7R: K3: am654: Add support for generating build targetsLokesh Vutla3-0/+118
Update Makefiles to generate: - tiboot3.bin: Image format that can be processed by ROM. Below is the tiboot3.bin image format that is required by ROM: _______________________ | X509 | | Certificate | | ____________________ | | | | | | | u-boot-spl.bin | | | | | | | |___________________| | |_______________________| Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
2018-11-17armv7R: K3: am654: Enable MPU regionsLokesh Vutla4-0/+64
Enable MPU regions for AM654 evm: - Region0: 0x00000000 - 0xFFFFFFFF: Device memory, not executable - Region1: 0x41c00000 - 0x42400000: Normal, executable, WB, Write alloc - Region2: 0x80000000 - 0xFFFFFFFF: Normal, executable, WB, Write alloc - region3-15: Disabled With this dcache can be enabled either in SPL or U-Boot. Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2018-11-17ram: Introduce K3 AM654 DDR Sub System driverLokesh Vutla6-0/+2087
K3 based AM654 devices has DDR memory subsystem that comprises Synopys DDR controller, Synopsis DDR phy and wrapper logic to intergrate these blocks into the device. This DDR subsystem provides an interface to external SDRAM devices. Adding support for the initialization of the external SDRAM devices by configuring the DDRSS registers and using the buitin PHY routines. Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> Signed-off-by: Keerthy <j-keerthy@ti.com> Signed-off-by: Schuyler Patton <spatton@ti.com> Signed-off-by: James Doublesin <doublesin@ti.com>
2018-11-17i2c: stm32f7: change setup struct to constPatrick Delaunay1-2/+2
Change static array to const when it is useful to save memory (move stm32f7_setup=0x18 from .data to .rodata section) Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-11-17i2c: stm32f7: cosmetic: clean the driverPatrick Delaunay1-15/+16
Solve alignments issues in the driver to avoid checkpatch error. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-11-17ARM: am3517_evm: Remove SPL_OF_CONTROL and OF_PLATDATAAdam Ford1-2/+0
After the recomendation, some testing shows like these are unnecessary. Suggested-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Signed-off-by: Adam Ford <aford173@gmail.com>
2018-11-17ARM: omap3_logic: Remove SPL_OF_CONTROL and OF_PLATDATAAdam Ford4-8/+0
After the recomendation, some testing shows like these are unnecessary. Suggested-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Signed-off-by: Adam Ford <aford173@gmail.com>
2018-11-17arm: Make arch specific memcpy thumb-safe.Klaus Goger1-3/+5
The current arch implementation of memcpy cannot be called from thumb code, because it does not use bx instructions on return. This patch addresses that. Note, that this patch does not touch the hot loop of memcpy, so performance is not affected. Tested on MXS (arm926ejs) with and without thumb-mode enabled. Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
2018-11-17test/py: test pinmux commandPatrice Chotard2-0/+70
Add pinmux test which test the following commands: - pinmux list - pinmux dev - pinmux status Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org> [trini: Mark some tests as sandbox-centric] Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2018-11-17pinctrl: sandbox: Add get_pin_muxing ops supportPatrice Chotard1-0/+18
Add get_pin_mux ops support to display the pin muxing description of the sandbox_pins[] Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-11-17gpio: stm32f7: Add ops get_functionPatrice Chotard1-0/+20
This patch adds gpio get_function ops support. This function reports the state of a gpio. Signed-off-by: Christophe Kerello <christophe.kerello@st.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2018-11-17pinctrl: stm32: Add get_pin_muxing() opsPatrice Chotard1-0/+71
Add get_pin_muxing() ops to obtain the pin muxing description a given pin index. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-11-17pinctrl: stm32: Add get_pin_name() opsPatrice Chotard1-0/+46
Add get_pin_name ops to obtain a pin name given a pin index of a specified pin-controller. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-11-17pinctrl: stm32: Add get_pins_count() opsPatrice Chotard1-5/+85
Add get_pins_count ops to obtain the number of pins owns by a pin-controller. On STM32 SoCs bindings, each pin-controller owns several gpio banks. Each GPIO bank can own up to 16 pins. To obtain the total pins count, walk through each sub-nodes (ie GPIO banks) and sum each GPIO banks pins number. For that in probe() we build a list with each GPIO device reference found. This list will also be used with future get_pin_muxing and get_pin_name ops to speed up and optimize walk through all GPIO banks. As this code is common to all STM32 SoCs, this code is put under SPL_BUILD compilation flag to avoid to increase SPL code size for STM32F7 which is limited to 32Ko. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-11-17cmd: pinmux: Add pinmux commandPatrice Chotard4-0/+158
pinmux command allows to : - list all pin-controllers available on platforms - select a pin-controller - display the muxing of all pins of the current pin-controller or all pin-controllers depending of given options Signed-off-by: Patrice Chotard <patrice.chotard@st.com> cmd: pinmux: Fix pinmux command if "pinmux status" command is used without having set dev using "pinmux dev", print pinmux usage Reviewed-by: Simon Glass <sjg@chromium.org>
2018-11-17dm: uclass: Add uclass_foreach_dev_probePatrice Chotard1-0/+16
Add uclass_foreach_dev_probe() which iterates through devices of a given uclass. Devices are probed if necessary and are ready to use. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-11-17dm: uclass: Add uclass_next_device_err() to return a valid devicePatrice Chotard2-0/+25
Similarly to uclass_first_device_err(), add uclass_next_device_err() which returns an error if there are no next devices in that uclass. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-11-17dm: pinctrl: Add pinctrl_get_pin_name and pinctrl_get_pins_countPatrice Chotard2-0/+45
Add pinctrl_get_pin_name() and pinctrl_get_pins_count() methods to obtain pin's name and pin's muxing given a pin reference. This will be used by the new pinmux command. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>