aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-mediatek
AgeCommit message (Collapse)AuthorFilesLines
2023-08-03arm: mediatek: add support for MediaTek MT7988 SoCWeijie Gao5-1/+110
This patch adds basic support for MediaTek MT7988 SoC. This includes files that will initialize the SoC after boot and its device tree. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2023-08-03arm: mediatek: retrieve ram_base from dts node for armv8 platformWeijie Gao3-8/+28
Now we use fdtdec_setup_mem_size_base() to get DRAM base from fdt ram node and update gd->ram_base. CFG_SYS_SDRAM_BASE is unused and will be removed. Also, since mt7622 always passes fdt to linux kernel, there's no need to assign value to gd->bd->bi_boot_params. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2023-03-22arm: Correct cpu_reset function prototype on some platformsTom Rini2-2/+4
Some platforms were not including <cpu_func.h> which sets the prototype for reset_cpu, and in turn had it set wrong. Correct these cases. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-05global: Move remaining CONFIG_SYS_SDRAM_* to CFG_SYS_SDRAM_*Tom Rini3-4/+4
The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_SDRAM namespace do not easily transition to Kconfig. In many cases they likely should come from the device tree instead. Move these out of CONFIG namespace and in to CFG namespace. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-11-10mediatek: Include <linux/sizes.h> where neededTom Rini3-0/+3
These files reference SZ_ macros without including <linux/sizes.h>, correct this. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-09-23arm: mediatek: add support for MediaTek MT7981 SoCWeijie Gao5-1/+94
This patch adds basic support for MediaTek MT7981 SoC. This include the file that will initialize the SoC after boot and its device tree. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2022-09-23arm: mediatek: add support for MediaTek MT7986 SoCWeijie Gao5-0/+94
This patch adds basic support for MediaTek MT7986 SoC. This include the file that will initialize the SoC after boot and its device tree. Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2021-09-23arm: mediatek: merge board Kconfigs into mach-mediatekGuillaume La Roque1-7/+35
On MediaTek boards we cannot override the SYS_BOARD / SYS_CONFIG_NAME variables from defconfig. This is because in board/mediatek/mtXXXX/Kconfig this value was override by default due to the if CONFIG_TARGET_MTXXXX condition. Merge all the Kconfigs to the mach-medatek/Kconfig. This way: - we only define SYS_{SOC,VENDOR} once - all board definitions are in a single place, simplifying the build logic. Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
2021-09-04spi: Rename SPI_SUPPORT to SPISimon Glass1-1/+1
Rename these options so that CONFIG_IS_ENABLED can be used with them. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-09-04mmc: Rename MMC_SUPPORT to MMCSimon Glass1-1/+1
Rename these options so that CONFIG_IS_ENABLED can be used with them. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> [trini: Fixup some incorrect renames] Signed-off-by: Tom Rini <trini@konsulko.com>
2021-08-31Kconfig: Remove all default n/no optionsMichal Simek1-1/+0
default n/no doesn't need to be specified. It is default option anyway. Signed-off-by: Michal Simek <michal.simek@xilinx.com> [trini: Rework FSP_USE_UPD portion] Signed-off-by: Tom Rini <trini@konsulko.com>
2021-07-28arm: use the correct prototype for reset_cpu functionPatrick Delaunay1-1/+1
Align reset_cpu function with the next prototypes in sysreset.h or in cpu_func.h to solve compilation issue: void reset_cpu(void); This patch solves the prototype conflict when cpu_func.h is included. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2021-03-20board: mt7629: enable compression of u-boot to reduce the size of final imageWeijie Gao1-1/+0
This patch makes use of the decompression mechanism implemented for mt7628 previously to reduce the total image size. Binman will be also removed. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2021-03-20board: Add MT8183 pumpkin board supportFabien Parent1-0/+1
Add the MT8183 pumpkin board support. Signed-off-by: Fabien Parent <fparent@baylibre.com>
2021-03-20ARM: mediatek: Add MT8183 supportFabien Parent4-0/+93
Add the MT8183 SoC support. Signed-off-by: Fabien Parent <fparent@baylibre.com>
2021-03-20board: mediatek: rename pumpkin board into mt8516Fabien Parent1-1/+1
More than one pumpkin board has been made with different MediaTek SoCs. Rename the pumpkin board to follow the naming convention of all other MediaTek boards and also to not be confusing when other pumpkin boards will be added in follow-up commits. Signed-off-by: Fabien Parent <fparent@baylibre.com>
2021-03-02reset: Remove addr parameter from reset_cpu()Harald Seiler4-4/+4
Historically, the reset_cpu() function had an `addr` parameter which was meant to pass in an address of the reset vector location, where the CPU should reset to. This feature is no longer used anywhere in U-Boot as all reset_cpu() implementations now ignore the passed value. Generic code has been added which always calls reset_cpu() with `0` which means this feature can no longer be used easily anyway. Over time, many implementations seem to have "misunderstood" the existence of this parameter as a way to customize/parameterize the reset (e.g. COLD vs WARM resets). As this is not properly supported, the code will almost always not do what it is intended to (because all call-sites just call reset_cpu() with 0). To avoid confusion and to clean up the codebase from unused left-overs of the past, remove the `addr` parameter entirely. Code which intends to support different kinds of resets should be rewritten as a sysreset driver instead. This transformation was done with the following coccinelle patch: @@ expression argvalue; @@ - reset_cpu(argvalue) + reset_cpu() @@ identifier argname; type argtype; @@ - reset_cpu(argtype argname) + reset_cpu(void) { ... } Signed-off-by: Harald Seiler <hws@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-02-02common: Drop asm/global_data.h from common headerSimon Glass5-0/+5
Move this out of the common header and include it only where needed. In a number of cases this requires adding "struct udevice;" to avoid adding another large header or in other cases replacing / adding missing header files that had been pulled in, very indirectly. Finally, we have a few cases where we did not need to include <asm/global_data.h> at all, so remove that include. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2021-01-05dm: Rename DM_GET_DRIVER() to DM_DRIVER_GET()Simon Glass2-3/+3
In the spirit of using the same base name for all of these related macros, rename this to have the operation at the end. This is not widely used so the impact is fairly small. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-09-12ARM: MediaTek: amend IC description for MediaTek MT8512Mingming Lee1-3/+3
The description for MT8512 has some mistake, so correct it. Signed-off-by: Mingming Lee <Mingming.Lee@mediatek.com>
2020-05-18common: Drop linux/bitops.h from common headerSimon Glass1-0/+1
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18common: Drop log.h from common headerSimon Glass2-0/+2
Move this header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18common: Drop init.h from common headerSimon Glass7-0/+7
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18common: Drop net.h from common headerSimon Glass4-0/+4
Move this header out of the common header. Network support is used in quite a few places but it still does not warrant blanket inclusion. Note that this net.h header itself has quite a lot in it. It could be split into the driver-mode support, functions, structures, checksumming, etc. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-03-10arm: mediatek: remove unused binman configSam Shih1-0/+1
The binman-option BINMAN_FDT is introduced by this commit: commit 3c10dc95bdd0 ("binman: Add a library to access binman entries") BINMAN_FDT being selected when BINMAN=y that resulting in mt7623 and mt7622 are unable to boot. The root cause of this issue is commit: commit cbd2fba1eca1 ("arm: MediaTek: add basic support for MT7629 boards") select BINMAN=y in all mediatek SoCs, and others mediatek SoCs not expect to use BINMAN_FDT. This patch remove BINMAN=y option when ARCH_MEDIATEK=y and move this to the specify SoCs part config. Signed-off-by: Sam Shih <sam.shih@mediatek.com> Tested-by: Frank Wunderlich <frank-w@public-files.de>
2020-01-17common: Move hang() to the same header as panic()Simon Glass1-0/+1
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-17common: Move RAM-sizing functions to init.hSimon Glass1-0/+1
These functions relate to memory init so move them into the init header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-17common: Move reset_cpu() to the CPU headerSimon Glass2-0/+2
Move this function out of common.h and into a relevant header file. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-16ARM: MediaTek: Add support for MediaTek MT7622 SoCSam Shih4-0/+64
Add support for MediaTek MT7622 SoC. This include the file that will initialize the SoC after boot and its device tree. Signed-off-by: Sam Shih <sam.shih@mediatek.com> Reviewed-by: Ryder Lee <ryder.lee@mediatek.com>
2020-01-16ARM: MediaTek: Add support for MediaTek MT8512 SoCmingming lee5-0/+130
Add support for MediaTek MT8512 SoC. This include the file that will initialize the SoC after boot and its device tree. Signed-off-by: mingming lee <mingming.lee@mediatek.com>
2019-12-03ARM: MediaTek: add basic support for MT8518 boardsmingming lee1-0/+1
This adds a general board file based on MT8518 SoCs from MediaTek. Apart from the generic parts (cpu) we add some low level init codes and initialize the early clocks. This commit is adding the basic boot support for the MT8518 eMMC board. Signed-off-by: mingming lee <mingming.lee@mediatek.com> [trini: Migrate env location to defconfig, set ENV_IS_IN_MMC] Signeed-off-by: Tom Rini <trini@konsulko.com>
2019-12-03ARM: MediaTek: Add support for MediaTek MT8518 SoCmingming lee5-0/+117
Add support for MediaTek MT8518 SoC. This include the file that will initialize the SoC after boot and its device tree. Signed-off-by: mingming lee <mingming.lee@mediatek.com>
2019-12-02common: Move some cache and MMU functions out of common.hSimon Glass1-0/+1
These functions belong in cpu_func.h. Another option would be cache.h but that code uses driver model and we have not moved these cache functions to use driver model. Since they are CPU-related it seems reasonable to put them here. Move them over. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-07-29board: mediatek: Add pumpkin board supportFabien Parent1-0/+1
The pumpkin board is made by Gossamer Engineering and is using a MediaTek SoC. The board currently comes in two available version: MT8516 SoC and MT8167 SoC. The board provides the following IOs: eMMC, NAND, SD card, USB type-A, Ethernet, Wi-Fi, Bluetooth, Audio (jack out, 2 PDM port, 1 analog in), serial over USB, and an expansion header. Additionally there is a HDMI port, DSI port, and camera port only on the MT8167 version of the board. The board can be powered by battery and/or via a USB Type-C port and is using a PMIC MT6392. The eMMC and NAND are sharing pins and cannot be used together. This commit is adding the basic boot support for the Pumpkin MT8516 board on the eMMC. Signed-off-by: Fabien Parent <fparent@baylibre.com>
2019-07-18arm: mediatek: add missing arch timer configuration for MT7629Weijie Gao1-0/+13
This patch sets CNTVOFF of ARM CP15 timer to zero to make sure the virtual counter is fully usable for linux kernel. Cc: Albert Aribaud <albert.u.boot@aribaud.net> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2019-07-07arm: mediatek: remove arch_misc_initWeijie Gao2-15/+0
The watchdog of mediatek chips is enabled by bootrom before u-boot is running. Previously we choose to enable the wdt driver only to disable the watchdog hardware. Now wdt service is enabled by default. The function arch_misc_init which is only used to disable wdt is no longer needed. Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2019-05-18ARM: mediatek: mt8516: use PSCI to reset the SoCFabien Parent1-8/+1
Instead of using the watchdog, let's use PSCI to perform the reset of the SoC. Signed-off-by: Fabien Parent <fparent@baylibre.com>
2019-04-23ARM: MediaTek: Add support for MT8516 SoCFabien Parent4-0/+134
Add support for MediaTek MT8516 SoC. This include the file that will initialize the SoC after boot and its device tree. Signed-off-by: Fabien Parent <fparent@baylibre.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2018-12-26mt7629: use linux kernel compatible SMP initializationWeijie Gao1-8/+44
This patch changes mt7629 to use the compatible platform SMP initialization method of linux kernel. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2018-11-28arm: MediaTek: add basic support for MT7623 boardsWeijie Gao6-0/+193
This adds a general board file based on MT7623 SoCs from MediaTek. As this u-boot is loaded by MTK proprietary preloader, there is no low level initializtion codes. Signed-off-by: Weijie Gao <weijie.gao@mediatek.com> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Tested-by: Matthias Brugger <matthias.bgg@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-11-28arm: MediaTek: add basic support for MT7629 boardsRyder Lee8-0/+302
This adds a general board file based on MT7629 SoCs from MediaTek. Apart from the generic parts (cpu) we add some low level init codes and initialize the early clocks. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com> Reviewed-by: Simon Glass <sjg@chromium.org>