summaryrefslogtreecommitdiff
path: root/arch/arm/mach-at91
Commit message (Collapse)AuthorAgeFilesLines
* arm: at91: Add gardena-gateway-at91sam supportStefan Roese2019-04-091-0/+8
| | | | | | | | | | | | | The GARDENA smart Gateway boards are equipped with an Atmel / Microchip AT91SAM9G25 SoC and with 128 MiB of RAM and 256 MiB of NAND storage. This patch adds support for this board including SPL support. Therefore the AT91Boostrap is not needed on this platform any more. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Heiko Schocher <hs@denx.de> Cc: Andreas Bießmann <andreas@biessmann.org> Cc: Eugen Hristev <eugen.hristev@microchip.com> Reviewed-by: Heiko Schocher <hs@denx.de>
* arm: at91: arm926ejs/u-boot-spl.lds: Add _image_binary_end to SPL ldsStefan Roese2019-04-091-0/+2
| | | | | | | | | | | | This patch adds _image_binary_end to the SPL linker script. This will be used be the upcoming GARDENA AT91SAM based platform, which uses DT in SPL and configures CONFIGURE_SPL_SEPARATE_BSS. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Heiko Schocher <hs@denx.de> Cc: Andreas Bießmann <andreas@biessmann.org> Cc: Eugen Hristev <eugen.hristev@microchip.com> Reviewed-by: Heiko Schocher <hs@denx.de>
* arm: at91: Enable watchdog supportStefan Roese2019-04-092-0/+58
| | | | | | | | | | | | This patch enables and starts the watchdog on the AT91 platform if configured. The WD timeout value is read in the AT91 WD device driver from the DT, using the "timeout-sec" DT property. If not provided in the DT, the default value of 2 seconds is used. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Heiko Schocher <hs@denx.de> Cc: Andreas Bießmann <andreas@biessmann.org> Cc: Eugen Hristev <eugen.hristev@microchip.com>
* arm: at91: spl_at91.c: Call spl_early_init() if OF_CONTROL is enabledStefan Roese2019-04-091-0/+10
| | | | | | | | | | | | | | | | | | | This patch adds a call to spl_early_init() to board_init_f() which is needed when CONFIG_SPL_OF_CONTROL is configured. This is necessary for the early SPL setup including the DTB setup for later usage. Please note that this call might also be needed for non SPL_OF_CONTROL board, like the smartweb target. But smartweb fails to build with this call because its binary grows too big. So I disabled it for these kind of targets for now. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Heiko Schocher <hs@denx.de> Cc: Andreas Bießmann <andreas@biessmann.org> Cc: Eugen Hristev <eugen.hristev@microchip.com> Reviewed-by: Heiko Schocher <hs@denx.de> Tested on the taurus board: Tested-by: Heiko Schocher <hs@denx.de>
* arm: at91: Makefile: Compile lowlevel_init only when really necessaryStefan Roese2019-04-091-0/+2
| | | | | | | | | | | | | Make sure that lowlevel_init is not compiled when CONFIG_SKIP_LOWLEVEL_INIT_ONLY is configured. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Heiko Schocher <hs@denx.de> Cc: Andreas Bießmann <andreas@biessmann.org> Cc: Eugen Hristev <eugen.hristev@microchip.com> Reviewed-by: Heiko Schocher <hs@denx.de> Tested on the taurus board: Tested-by: Heiko Schocher <hs@denx.de>
* ARM: at91: sama5d2: Wrap cpu detection to fix macb driverAlexander Dahl2019-04-092-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When introducing the SAMA5D27 SoCs, the SAMA5D2 series got an additional chip id. The check if the cpu is sama5d2 was changed from a preprocessor definition (inlining a call to 'get_chip_id()') to a C function, probably to not call get_chip_id twice? That however broke a check in the macb ethernet driver. That driver is more generic and also used for other platforms. I suppose this solution was implemented to use it in 'gem_is_gigabit_capable()', without having to stricly depend on the at91 platform: #ifndef cpu_is_sama5d2 #define cpu_is_sama5d2() 0 #endif That only works as long as cpu_is_sama5d2 is a preprocessor definition. (The same is still true for sama5d4 by the way.) So this is a straight forward fix for the workaround. The not working check on the SAMA5D2 CPU lead to an issue on a custom board with a LAN8720A ethernet phy connected to the SoC: => dhcp ethernet@f8008000: PHY present at 1 ethernet@f8008000: Starting autonegotiation... ethernet@f8008000: Autonegotiation complete ethernet@f8008000: link up, 1000Mbps full-duplex (lpa: 0xffff) BOOTP broadcast 1 BOOTP broadcast 2 BOOTP broadcast 3 BOOTP broadcast 4 BOOTP broadcast 5 BOOTP broadcast 6 BOOTP broadcast 7 BOOTP broadcast 8 BOOTP broadcast 9 BOOTP broadcast 10 BOOTP broadcast 11 BOOTP broadcast 12 BOOTP broadcast 13 BOOTP broadcast 14 BOOTP broadcast 15 BOOTP broadcast 16 BOOTP broadcast 17 Retry time exceeded; starting again Notice the wrong reported link speed, although both SoC and phy only support 100 MBit/s! The real issue on reliably detecting the features of that cadence ethernet mac IP block, is probably more complicated, though. Fixes: 245cbc583d ("ARM: at91: Get the Chip ID of SAMA5D2 SiP") Signed-off-by: Alexander Dahl <ada@thorsis.com>
* linker: Modify linker scripts to be more genericTom Rini2019-01-262-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Make use of "IMAGE_MAX_SIZE" and "IMAGE_TEXT_BASE" rather than CONFIG_SPL_MAX_SIZE and CONFIG_SPL_TEXT_BASE. This lets us re-use the same script for both SPL and TPL. Add logic to scripts/Makefile.spl to pass in the right value when preprocessing the script. Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Jagan Teki <jagan@openedev.com> Cc: Maxime Ripard <maxime.ripard@bootlin.com> Cc: Andreas Bießmann <andreas@biessmann.org> Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Cc: Michal Simek <monstr@monstr.eu> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Cc: York Sun <york.sun@nxp.com> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Heiko Schocher <hs@denx.de> Cc: Adam Ford <aford173@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Tested-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Tested-by: Adam Ford <aford173@gmail.com> #da850evm & omap3_logic_somlv Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
* ARM: at91: lds: add test for SPL binary size and bss sizeEugen.Hristev@microchip.com2018-12-071-0/+10
| | | | | | | | | | Add test for the SPL binary size and the bss section size. This will throw an error at build time if the SPL sections do not fit in the designated RAM area, thus avoiding oversizing the SPL. Based on original work by Wenyou Yang. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
* arm: at91: wdt: Convert watchdog driver to dm/dtPrasanthi Chellakumar2018-11-164-4/+8
| | | | | | | | Convert the Watchdog driver for AT91SAM9x processors to support the driver model and device tree. Changes "CONFIG_AT91SAM9_WATCHDOG" to new "CONFIG_WDT_AT91" Kconfig option. Signed-off-by: Prasanthi Chellakumar <prasanthi.chellakumar@microchip.com>
* arm: remove prototype for get_timer_maskedPatrick Delaunay2018-10-101-6/+6
| | | | | | | | | | | | | | The interruption support had be removed for ARM architecture and the function get_timer_masked() is no more used except in some the timer.c files. This patch clean each timer.c which implement this function and remove the associated prototype in u-boot-arm.h For timer.c, I don't verify if the weak version of get_timer (in lib/time.c) can be used Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
* arm: remove prototype for udelay_maskedPatrick Delaunay2018-10-101-6/+1
| | | | | | | | | | | The interruption support had be removed for ARM architecture and the function udelay_masked() is no more used except in some timer.c files and have the same content than udelay() or __udelay(). This patch update each timer.c implementing this function and remove the associated prototype in u-boot-arm.h. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
* board: sama5d2_ptc_ek: add pda detect call at init timeEugen Hristev2018-09-281-0/+1
| | | | | | | Call the PDA detection mechanism at boot time so we can have the pda environment variable ready for use. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
* board: sama5d3_xplained: add pda detect call at init timeEugen Hristev2018-09-281-0/+1
| | | | | | | Call the PDA detection mechanism at boot time so we can have the pda environment variable ready for use. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
* ARM: CPU: arm926ejs: Consolidate cache routines to common fileAdam Ford2018-09-102-29/+0
| | | | | | | | | | | | | Four different boards had different options for enabling cache that were virtually all the same. This consolidates these common functions into arch/arm/cpu/arm926ejs/cache.c This also has the positive side-effect of enabling cache on the Davinci (da850) boards. Signed-off-by: Adam Ford <aford173@gmail.com> [trini: Add mach-at91 to the list of consolidations] Signed-off-by: Tom Rini <trini@konsulko.com>
* dm: Change CMD_DM enablingMichal Simek2018-07-301-0/+6
| | | | | | | | | | | CMD_DM is used for debug purpose and it shouldn't be enabled by default via Kconfig. Unfortunately this is in the tree for quite a long time that's why solution is to use imply DM for all targets which are enabling DM. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
* Kconfig: Sort bool, default, select and imply optionsMichal Simek2018-07-301-30/+30
| | | | | | | | Fix Kconfig bool, default, select and imply options to be alphabetically sorted. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* board/aries: RemoveTom Rini2018-07-021-9/+0
| | | | | | | The various Aries Embedded boards have been orphaned for a year and no one has come forward to take care of them. Remove. Signed-off-by: Tom Rini <trini@konsulko.com>
* at91: Minor tweaks to SPL logic for space savings on smartwebTom Rini2018-05-223-3/+5
| | | | | | | | | - spl_board_init is empty on smartweb so drop that function - When CONFIG_AT91SAM9_WATCHDOG is set we do not disable the watchdog in SPL and instead let full U-Boot handle it. Instead of an empty function just do not call a function. Signed-off-by: Tom Rini <trini@konsulko.com>
* gpio: atmel_pio4: give a full configuration when muxing pinsLudovic Desroches2018-05-081-8/+8
| | | | | | | | When a pin is muxed to a peripheral or as a GPIO, the only configuration that can be set is the pullup. It is too restrictive so this patch allows to give a full configuration. Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
* gpio: atmel_pio4: add drive strength macrosLudovic Desroches2018-05-081-0/+4
| | | | | | Macros for drive strength configuration were missing. Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
* arm: v7: Kconfig: Rename CPU_V7 as CPU_V7ALokesh Vutla2018-05-073-8/+8
| | | | | | | | | | | | | | | | | Currently CPU_V7 kconfig symbol supports only ARMv7A architectures under armv7 folder. This led to a misconception of creating separate folders for armv7m and armv7r. There is no reason to create separate folder for other armv7 based architectures when it can co-exist with few Kconfig symbols. As a first step towards a common folder, rename CPU_V7 as CPUV7A. Later separate Kconfig symbols can be added for CPU_V7R and CPU_V7M and can co exist in the same folder. Reviewed-by: Tom Rini <trini@konsulko.com> Tested-by: Michal Simek <michal.simek@xilinx.com> Suggested-by: Alexander Graf <agraf@suse.de> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini2018-05-0793-190/+93
| | | | | | | | | | | | | | | | | | | | When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
* Remove unnecessary instances of DECLARE_GLOBAL_DATA_PTRTom Rini2018-04-271-2/+0
| | | | | | | | We have a large number of places where while we historically referenced gd in the code we no longer do, as well as cases where the code added that line "just in case" during development and never dropped it. Signed-off-by: Tom Rini <trini@konsulko.com>
* Convert CONFIG_SPI to KconfigAdam Ford2018-04-271-0/+4
| | | | | | | | | | | | | | This converts the following to Kconfig: CONFIG_SPI This partly involves updating code that assumes that CONFIG_SPI implies things that are specific to the MPC8xx SPI driver. For now, just update the CONFIG tests. This also involves reworking the default for CONFIG_SYS_DEF_EEPROM_ADDR so that we don't set it when we cannot make a reasonable default, as it does not cause any compile failures. Signed-off-by: Adam Ford <aford173@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com>
* at91: ma5d4evk: Enable DM_SPIJagan Teki2018-04-061-0/+1
| | | | | | | | | | | AT91 ma5d4evk board uses atmel spi driver, enable DM_SPI to use dm functionality. Kept few functions related to non-dm and gpio on board files for reference and will be remove once code moved to relevant drivers. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
* at91: ma5d4evk: Enable DMJagan Teki2018-04-061-0/+1
| | | | | | Enable Driver model for AT91 ma5d4evk boards. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
* at91: vinco: Enable DM_SPIJagan Teki2018-04-061-0/+1
| | | | | | | | AT91 Vinco board uses atmel spi driver, enable DM_SPI to use dm functionality. Cc: Gregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
* at91: vinco: Enable DMJagan Teki2018-04-061-0/+1
| | | | | | | Enable Driver model for AT91 Vinco boards. Cc: Gregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
* at91: taurus: Enable DM_SPIJagan Teki2018-04-061-0/+1
| | | | | | | | | | | Enable DM_SPI for atmel SPI driver on taurus board. Kept few functions related to non-dm and gpio on board files for reference and will be remove once code moved to relevant drivers. Cc: Heiko Schocher <hs@denx.de> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
* at91: gurnard: Enable DM_SPIJagan Teki2018-04-061-0/+1
| | | | | | | Enable DM_SPI for atmel SPI driver on gurnard board. Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
* clk: at91: add USB Host clock driverWenyou Yang2018-03-161-0/+6
| | | | | | | | Add USB clock driver to configure the input clock and the divider in the PMC_USB register to generate a 48MHz and a 12MHz signal to the USB Host OHCI. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
* spl: eMMC/SD: Provide one __weak spl_boot_mode() functionLukasz Majewski2018-02-071-15/+0
| | | | | | | | | | | | | | | | | The goal of this patch is to clean up the code related to choosing SPL MMC boot mode. The spl_boot_mode() now is called only in spl_mmc_load_image() function, which is only compiled in if CONFIG_SPL_MMC_SUPPORT is enabled. To achieve the goal, all per mach/arch implementations eligible for unification has been replaced with one __weak implementation. Signed-off-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Stefano Babic <sbabic@denx.de> Acked-by: Michal Simek <michal.simek@xilinx.com> (For ZynqMP) Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
* board: laird: add WB50N CPU moduleBen Whitten2017-11-291-0/+8
| | | | | | | | | | | | This board is based on the Atmel sama5d3 eval boards. Supporting the following features: - Boot from NAND Flash - Ethernet - FIT - SPL Signed-off-by: Ben Whitten <ben.whitten@lairdtech.com> Signed-off-by: Dan Kephart <dan.kephart@lairdtech.com>
* board: laird: add WB45N CPU moduleBen Whitten2017-11-292-0/+8
| | | | | | | | | | | | This board is based on the Atmel 9x5 eval board. Supporting the following features: - Boot from NAND Flash - Ethernet - FIT - SPL Signed-off-by: Ben Whitten <ben.whitten@lairdtech.com> Signed-off-by: Dan Kephart <dan.kephart@lairdtech.com>
* board: atmel: add sama5d2_ptc_ek boardLudovic Desroches2017-11-291-4/+3
| | | | | | | | Add the SAMA5D2 PTC EK board and remove the SAMA5D2 PTC ENGI board which was a prototype. Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com> Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
* ARM: at91: add sama5d2 smc headerLudovic Desroches2017-11-291-0/+76
| | | | | | | | | Add a header for SAMA5D2 SMC since it's not compatible with SAMA5D3 one. Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com> [wenyou: fix the wrong base address of the SMC register] Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
* Drop CONFIG_HAS_DATAFLASHTuomas Tynkkynen2017-10-165-5/+5
| | | | | | | | Last user of this option went away in commit: fdc7718999 ("board: usb_a9263: Update to support DT and DM") Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
* board: at91sam9x5ek: Convert to CONFIG_DM_VIDEOWenyou Yang2017-09-291-0/+1
| | | | | | | | Convert the board to support the video driver model, add the device tree node, and remove the unnecessary code. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* board: sama5d4_xplained: Convert to CONFIG_DM_VIDEOWenyou Yang2017-09-291-0/+1
| | | | | | | | Convert the board to support the video driver model, add the device tree node, and remove the unnecessary code. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* board: sama5d4ek: Convert to CONFIG_DM_VIDEOWenyou Yang2017-09-291-0/+1
| | | | | | | | Convert the board to support the video driver model, add the device tree node, and remove the unnecessary code. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* board: sama5d2_xplained: Convert to CONFIG_DM_VIDEOWenyou Yang2017-09-291-0/+1
| | | | | | | | Convert the board to support the video driver model, add the device tree node, and remove the unnecessary code. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* ARM: at91: spl: Add macro CONFIG_XXXX_BOOT supportWenyou Yang2017-09-141-6/+10
| | | | | | | | Use the CONFIG_XXXX_BOOT to indicate the boot media, instead of the CONFIG_SYS_USE_XXXX option, which is declared by CONFIG_SYS_EXTRA_OPTIONS option. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
* ARM: at91: Remove hardware.h included in configsWenyou Yang2017-09-143-0/+3
| | | | | | | | | | As said in READRE.kconfig, include/configs/*.h will be removed after all options are switched to Kconfig. As the first step, remove the follow line from include/configs/*.h. #include <asm/hardware.h> Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
* ARM: at91: Add the SoC options to KconfigWenyou Yang2017-09-141-27/+79
| | | | | | | | To prepare to remove the SoCs options such as SAMA5D2, SAMA5D3 and SAMA5D4 from the CONFIG_SYS_EXTRA_OPTIONS option which is deprecated, add the SoC options to Kconfig. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
* ARM: at91: Move CONFIG_AT91FAMILY option to KconfigWenyou Yang2017-09-1411-43/+3
| | | | | | | Move the CONFIG_AT91FAMILY option from include/mach/<soc>.h header file to Kconfig. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
* board: atmel: Add SAMA5D27 SOM1 EK boardWenyou Yang2017-09-141-0/+14
| | | | | | | | | | | The SAMA5D27-SiP (System in Package) integrates the SAMA5D2 with 1Gbit DDR2-SDRAM in a single package. The SAMA5D27 SOM1 embeds a 64Mbit QSPI flash, KSZ8081 Phy and Mac-address EEPROM. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* ARM: at91: Get the Chip ID of SAMA5D2 SiPWenyou Yang2017-09-142-3/+30
| | | | | | | | The SAMA5D2 SiP(System in Package) has different Chip IDs in the CHIPID and CHIP_EXID registers. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* ARM: at91: mach: Add missing defines of MPDDRCWenyou Yang2017-09-141-0/+4
| | | | | | | Add missing defines of Multiport DDR-SDRAM Controller (MPDDRC). Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* ARM: at91: spl: Add boot device for boot from QSPIWenyou Yang2017-09-141-0/+2
| | | | | | | Add the boot device for booting from the QSPI flash. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* ARM: at91: spl: Add mck function to lower rate while switchingWenyou Yang2017-09-142-0/+43
| | | | | | | | | | | | | | | Refer to the commit 70f8c8316ad(PMC: add new mck function to lower rate while switching) from AT91Bootstrap. While switching to a lower clock source, we must switch the clock source first instead of last. Otherwise, we could end up with too high frequency on internal bus and peripherals. This happens on SAMA5D2 as exitting from the ROM code. Add a function pmc_mck_init_down() to allow this sequence. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>