summaryrefslogtreecommitdiff
path: root/arch
AgeCommit message (Collapse)AuthorFilesLines
2020-01-29Merge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-samsungTom Rini3-2/+4
- Various exynos fixes
2020-01-28arm: exynos: Read default MMC device from XOM[7:5] pinsMarek Szyprowski1-0/+1
XOM pins provide information for iROM bootloader about the boot device. Those pins are mapped to lower bits of OP_MODE register (0x10000008), which is common for all Exynos SoC variants. Set the default MMC device id to reflect the boot device selected by XOM[7:5] pins (2 for the SD or 0 for the eMMC). Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2020-01-27Merge tag 'u-boot-clk-26Jan2020' of ↵Tom Rini1-95/+2
https://gitlab.denx.de/u-boot/custodians/u-boot-clk - Various clock fixes and enhancements
2020-01-26clock_imx8mq: Make frac_pll_init() staticPedro Jardim1-1/+1
Since frac_pll_init() is only used in this file, change it to 'static'. This fixes the following sparse warning: arch/arm/mach-imx/imx8m/clock_imx8mq.c:662:5: warning: no previous prototype for ‘frac_pll_init’ [-Wmissing-prototypes] Signed-off-by: Pedro Jardim <jardim.c.pedro@gmail.com>
2020-01-26clock_imx8mq: Remove the function sscg_pll_init()Pedro Jardim1-71/+0
Function sscg_pll_init() is not used anywhere, so it can simply be deleted. This was found because of the following sparse warning: arch/arm/mach-imx/imx8m/clock_imx8mq.c:702:5: warning: no previous prototype for ‘sscg_pll_init’ [-Wmissing-prototypes] int sscg_pll_init(u32 pll) ^~~~~~~~~~~~~ Signed-off-by: Pedro Jardim <jardim.c.pedro@gmail.com>
2020-01-26clock_imx8mq: Make do_imx8m_showclocks() staticPedro Jardim1-1/+1
Since do_imx8m_showclocks() is only used inside this file, make it 'static'. This fixes the following sparse warning: arch/arm/mach-imx/imx8m/clock_imx8mq.c:836:5: warning: no previous prototype for ‘do_imx8m_showclocks’ [-Wmissing-prototypes] int do_imx8m_showclocks(cmd_tbl_t *cmdtp, int flag, int argc, ^~~~~~~~~~~~~~~~~~~ Signed-off-by: Pedro Jardim <jardim.c.pedro@gmail.com>
2020-01-26clock_imx8mq: Delete not used init_usb_clk()Pedro Jardim1-22/+0
Function init_usb_clk() is not used anywhere, so it can simply be deleted. This was detected by the following sparse warning: arch/arm/mach-imx/imx8m/clock_imx8mq.c:377:6: warning: no previous prototype for ‘init_usb_clk’ [-Wmissing-prototypes] void init_usb_clk(void) ^~~~~~~~~~~~ Signed-off-by: Pedro Jardim <jardim.c.pedro@gmail.com>
2020-01-26Merge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-sunxiTom Rini44-740/+1691
- Libre Computer ALL-H3-IT/ALL-H5-CC board (Chen-Yu Tsai) - Allwinner R40 Ethernet, usb phy enablement (Andre Przywara) - Sunxi auto load from 128KB MMC offset (Andre Przywara) - Orange Pi Win Ethernet phy enablement (Jernej Skrabec)
2020-01-26sunxi: Automate loading from 128KB MMC offsetAndre Przywara1-0/+20
Since commit 067e0b9684d4 ("sunxi: Allow booting from 128KB SD/eMMC offset") we support having the SPL loaded from either the traditional 8KB SD card/eMMC offset, or from the alternative location at 128KB. However the sector to find the U-Boot image was still hard-coded at compile time, and had to be adjusted for one of the two choices. Since we can actually override the function to return the sector offset, we can just check the boot source byte there to select the proper offset based on from where the SPL was loaded. This allows the very same binary image to be loaded from either 128KB or 8KB, with the U-Boot proper image always being located just behind the SPL. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Jagan Teki <jagan@amarulasolutions.com>
2020-01-26sunxi: SPL: Factor out sunxi_get_boot_source()Andre Przywara1-5/+13
The Boot ROM write some boot source ID (SD card, eMMC, SPI, ...) into a certain location in SRAM, so the SPL can easily determine where to load U-Boot proper from. Factor out reading this value, as it will come in handy again shortly. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Jagan Teki <jagan@amarulasolutions.com>
2020-01-25Merge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriqTom Rini9-15/+106
Updates and fixes for ls1028a, lx2160a, ls1012a, ls1021a, ls2080a, ls1088a platforms: - lx2-rev2 pcie support, enetc related updates, layerscape-pcie fixes
2020-01-25asm: dma-mapping.h: Fix dma mapping functionsVignesh Raghavendra4-8/+84
Subsystems such as USB expect dma_map_single() and dma_unmap_single() to do dcache flush/invalidate operations as required. For example, see see drivers/usb/gadget/udc/udc-core.c::usb_gadget_map_request(). Currently drivers do this locally, (see drivers/usb/dwc3/ep0.c, drivers/mtd/nand/raw/denali.c etc..) Update arch specific dma_map_single() and dma_unmap_single() APIs to do cache flush/invalidate operations, so that drivers need not implement them locally. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Rick Chen <rick@andestech.com>
2020-01-25usb: musb-new: mt85xx: add musb-new gadget driver.mingming lee1-0/+13
Using musb-new structure for mt85xx gadget driver. Add gadget driver dts for mt8518 SoCs. Signed-off-by: mingming lee <mingming.lee@mediatek.com>
2020-01-24phy: sun4i-usb: Add Allwinner R40 supportAndre Przywara1-0/+1
Since every Allwinner USB PHY seems to be slightly different from each other, we need to add the compatible string and the respective data structure to make it work on the R40/V40 SoC. Nothing spectacular this time, just one less USB controller than the H3. Copied from the Linux kernel. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2020-01-24sunxi: dts: R40: Update Bananapi M2 Berry .dtsAndre Przywara1-15/+120
Update the .dts file from the kernel, which carries much more nodes, some of them we need to enable USB and Ethernet support for the board. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2020-01-24sunxi: H3/H5 Sync DT files from upstream Linux kernel as of next-20200108Chen-Yu Tsai41-720/+1537
Sync the device tree files and device tree header files from upstream Linux kernel, as of 2020-01-08. The commit synced to in the sunxi repo 98d25b0b266d Merge branch 'sunxi/dt-for-5.6' into sunxi/for-next which is also part of next-20200108. Changes brought in include: - cleanup of pinmux node names - addition of Security ID, MBUS, CSI, crypto engine, video codec, pmu, and thermal sensor device nodes for both SoCs - addition of deinterlacing engine device node on H3 - cleanup of RTC device node and addition of its clocks - various board cleanups and improvements - removal of pinmux node for GPIO lines - cpufreq / DVFS - HDMI output - UART-based Bluetooth - audio codec - USB ports - new boards Most of the changes don't concern U-boot. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2020-01-24common: Move hang() to the same header as panic()Simon Glass57-4/+60
At present panic() is in the vsprintf.h header file. That does not seem like an obvious choice for hang(), even though it relates to panic(). So let's put hang() in its own header. Signed-off-by: Simon Glass <sjg@chromium.org> [trini: Migrate a few more files] Signed-off-by: Tom Rini <trini@konsulko.com>
2020-01-24common: Move RAM-sizing functions to init.hSimon Glass24-0/+24
These functions relate to memory init so move them into the init header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-24common: Move reset_cpu() to the CPU headerSimon Glass39-4/+42
Move this function out of common.h and into a relevant header file. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-24common: Move reset_misc() function to arch headerSimon Glass1-0/+2
This function is only used on ARM devices. Move it out of the common file and to a arch-specific header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-24common: Move get_tbclk() to time.hSimon Glass22-5/+23
This function related to timer and most of the timer functions are in time.h, so move this function there. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-24common: Move clock functions into a new fileSimon Glass33-4/+35
These three clock functions don't use driver model and should be migrated. In the meantime, create a new file to hold them. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-24common: Move upmconfig() to ppc.hSimon Glass1-0/+1
This file is only used by PowerPC so move it to an arch-specific header file. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-24common: Move ll_boot_init() to init.hSimon Glass5-0/+5
This is an init-related function so belongs in that file. Move it. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-24common: arm: Move s_init() to an ARM-specific headerSimon Glass1-0/+2
This function is only used on ARM devices so does not belong in the global common header file. Move it to an ARM header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-24common: Move device-tree setup functions to fdt_support.hSimon Glass1-0/+1
These functions relate to setting up the device tree for booting the OS. The fdt_support.h header file supports similar functions, so move these there. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-24common: Move reset_phy() to net.hSimon Glass1-0/+1
This is a network function so let's move it into that header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-24common: Move relocate_code() to init.hSimon Glass18-16/+18
This is an init function so move it out of the common header. Avoid using the typedef so that we don't have to include the global_data header file. Also tidy up the function style in comments while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-24arm: Add arm handoff header fileMichael Trimarchi1-0/+21
Add an arch-specific handoff header so that we can use the HANDOFF feature on arm devices. Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-01-24arch: armv8: fsl-layerscape: export serdes config to environmentAlex Marginean4-0/+76
Exports the serdes configuration as an environment variable for LS gen 3 SoCs, so it can be used in u-boot command line. It should particularly be useful for applying Linux DT overlays for the given serdes configuration. This code is called from arch_misc_init and not from the existing serdes_init function because it depends on U-Boot environment being set up. Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-01-24board: fsl: ls1028a: free up arch_misc_initAlex Marginean1-1/+0
Currently LS1028A board code uses arch_misc_init to set up the board mux on QDS. Move this code to misc_init_r. This is consistent with LS gen 2 and T series SoCs/boards. Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-01-24board: fsl: ls1088a: remove empty arch_misc_initAlex Marginean1-2/+0
The arch_misc_init function is empty on LS108x SoCs/boards, remove it. Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-01-24board: fsl: ls2080a/ls2081a: remove empty arch_misc_initAlex Marginean1-5/+0
The arch_misc_init function is empty on LS2 SoCs/boards, remove it. Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-01-24board: fsl: lx2160a: free up arch_misc_initAlex Marginean1-2/+0
Currently LX2 board code uses arch_misc_init to set up the board mux on RDB and QDS. Move this code to misc_init_r. This is consistent with LS gen 2 and T series SoCs/boards. Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-01-24armv8: ls1028a_serdes: Add few missing serdes protocolsAlex Marginean1-0/+4
Add serdes protocol 0x7777, 0x9999, 0xb998, 0xbb56 to supported list. These protocols are supported and functional but they trigger a warning in U-Boot console at boot because they are not on this list. Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com> Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-01-24armv8: fsl-layerscape: LS1044A/1048A: enable Only 1x 10GE portPramod Kumar1-2/+21
LS1088A has four personalities, LS1088A, LS1084A, LS1048A and LS1044A. LS1044A, LS1048A are LS1088A personalities, which support only one 1x 10GE port. MAC1 and MAC2 are associated with 1G SGMII, 2.5G SGMII, and XFI. Disable MAC1 to have only one 1x 10GE port for LS1044A, LS1048A. Signed-off-by: Pramod Kumar <pramod.kumar_1@nxp.com> Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-01-24ARM: LS1021A: remove redundant "depends on ARCH_LS1021A"Masahiro Yamada1-3/+0
These config entries are inside the menu block, which already depends on ARCH_LS1021A: menu "LS102xA architecture" depends on ARCH_LS1021A Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-01-24armv8: ls1012a: Make USB masters snoopableRan Wang1-0/+5
Program register bit of SCFG_SNPCNFGCR_USBRDSNP and SCFG_SNPCNFGCR_USBWRSNP to drive USB read/write snoop signal on LS1012A. Signed-off-by: Ran Wang <ran.wang_1@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-01-23bcm968360bg: add initial supportPhilippe Reynes3-0/+172
This add the initial support of the broadcom reference board bcm968360bg with a bcm68360 SoC. This board has 512 MB of RAM, 256 MB of flash (nand), 2 USB port, 1 UART, and 4 ethernet ports. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2020-01-23gpio: do not include <asm/arch/gpio.h> on ARCH_BCM68360Philippe Reynes1-5/+6
As no gpio.h is defined for this architecture, to avoid compilation failure, do not include <asm/arch/gpio.h> for arch bcm68360. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2020-01-23bcm68360: add initial supportPhilippe Reynes2-0/+223
This add the initial support of the broadcom bcm68360 SoC family. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2020-01-23arm: dts: exynos: Use common alias for Odroid U3/X2 MMC2 (SD-card)Marek Szyprowski1-1/+1
Use MMC0 for eMMC and MMC2 for SD-card as other Exynos-based boards do. This allows to use common code to get MMC device id based on the XOM[7:5] pins. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Anand Moon <linux.amoon@gmail.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2020-01-23arm: dts: exynos: Fix card-detect polarity for SD card on Odroid U3/X2Marek Szyprowski1-0/+1
Card detect line for SD-card on Odroid U3/X2 boards are active low, so add cd-inverted property to indicate this, as u-boot's GPIO driver doesn't support specifying line polarity. This restores S5P_SDHCI driver operation on Odroid U3/X2 boards. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Anand Moon <linux.amoon@gmail.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2020-01-23arm: dts: exynos: Extend board descriptionMarek Szyprowski1-1/+1
u-boot uses the same DTS for the all Odroid XU3-based boards, so list them in the model description to let user know that those boards are supported. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Lukasz Majewski <lukma@denx.de> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2020-01-23board: Add new Samsung "stemmy" board based on ST-Ericsson U8500Stephan Gerhold3-0/+43
The ST-Ericsson U8500 SoC has been used in mass-production for some Android smartphones released around 2012. In particular, Samsung has released more than 5 different smartphones based on U8500, e.g. - Samsung Galaxy S III mini (GT-I8190) "golden" - Samsung Galaxy S Advance (GT-I9070) "janice" - Samsung Galaxy Xcover 2 (GT-S7710) "skomer" and a few others. Mainline Linux has great support for the Ux500 SoC, so these smartphones can also run Linux mainline quite well. Unfortunately, the original Samsung bootloader used on these devices has limitations that prevent booting Linux mainline directly. It keeps the L2 cache enabled, which causes Linux to crash very early, shortly after decompressing the kernel. Using U-Boot allows to circumvent these limitations. We can let the Samsung bootloader chain-load U-Boot and U-Boot locks the L2 cache before booting into Linux. U-Boot has several other advantages - it supports device-trees directly and we are no longer limited to flashing Android boot images through Samsung's proprietary download mode. The Samsung "stemmy" board covers all Samsung devices based on U8500. Add minimal support for "stemmy". For now only UART is supported but this will be extended later. Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
2020-01-23arm: Add support for ST-Ericsson U8500 SoCStephan Gerhold8-1/+123
The NovaThor U8500 SoC was released by ST-Ericsson in 2011. It was used for some development boards like the CALAO Systems Snowball SBC, but mass production was primarily for Android smartphones like the Samsung Galaxy S III mini. Previous support for U8500 was removed in commit 68282f55b846 ("arm: Remove unused ST-Ericsson u8500 arch") since none of the boards were converted to generic boards before the deadline. The new code does not have much in common with the previous code. I have completely rewritten everything, embracing the Driver Model and device trees wherever possible. The U8500 support is a bit more minimal for now - my primary use case is to use U-Boot as alternative bootloader for some of the U8500 Samsung smartphones. At the moment U-Boot is chain-loaded from the original Samsung bootloader. A side effect of this is that we can (temporarily) get away without implementing some functionality - e.g. all clocks are already enabled by the original bootloader. More functionality will be added in future patches. Cc: Mathieu Poirier <mathieu.poirier@linaro.org> Cc: John Rigby <john.rigby@linaro.org> Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
2020-01-23arm: dts: Import device tree for ST-Ericsson Ux500Stephan Gerhold3-0/+1747
from https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson.git/ tag "ux500-armsoc-v5.6-2" commit 224bf0fe7292 ("ARM: dts: ux500: samsung-golden: Add Bluetooth") (queued for merge in Linux 5.6) Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
2020-01-22Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvellTom Rini4-0/+27
- Clearfog: Add run-time board detection with TLV EEPROM support (Baruch)
2020-01-21ARM: mvebu: clearfog: run-time selection of DT fileBaruch Siach1-0/+1
Set the kernel device-tree file (fdtfile environment variable) based on run-time detection of the platform. Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
2020-01-21ARM: mvebu: clearfog: add EEPROM devicesBaruch Siach3-0/+26
Add device-tree description for the EEPROM devices on Armada 388 SOM rev 2.1. Another EEPROM is now on Clearfog Pro carrier rev 2.2, and Clearfog Base rev 1.3. Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Baruch Siach <baruch@tkos.co.il>