summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-09-23tools: mtk_image: split gfh header verification into a new functionWeijie Gao
The verification code of gfh header for NAND and non-NAND are identical. It's better to define a individual function to reduce redundancy. Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2022-09-23cpu: add basic cpu driver for MediaTek ARM chipsWeijie Gao
Add basic CPU driver used to retrieve CPU model information. Tested-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-09-23clk: mediatek: add clock driver support for MediaTek MT7981 SoCWeijie Gao
This patch adds clock driver support for MediaTek MT7981 SoC Reviewed-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2022-09-23clk: mediatek: add clock driver support for MediaTek MT7986 SoCWeijie Gao
This patch adds clock driver support for MediaTek MT7986 SoC Reviewed-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2022-09-23clk: mediatek: add CLK_XTAL support for clock driverWeijie Gao
This adds the CLK_XTAL macro/flag to allow modeling clocks which are directly connected to the xtal clock. Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2022-09-23clk: mediatek: add infrasys clock mux supportWeijie Gao
This patch adds infrasys clock mux support for mediatek clock drivers. Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2022-09-23clk: mediatek: add support to configure clock driver parentWeijie Gao
This patch adds support for a clock node to configure its parent clock where possible. Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2022-09-23clk: mediatek: add CLK_BYPASS_XTAL flag to allow bypassing searching clock ↵Weijie Gao
parent of xtal clock The mtk clock framework in u-boot uses array index for searching clock parent (kernel uses strings for search), so we need to specify a special clock with ID=0 for CLK_XTAL in u-boot. In the mt7622/mt7629 clock tree, the clocks with ID=0 never call mtk_topckgen_get_mux_rate, adn return xtal clock directly. This what we expected. However for newer chips, they may have some clocks with ID=0 not representing the xtal clock and still needs mtk_topckgen_get_mux_rate be called. Current logic will make entire clock driver not working. This patch adds a flag to indicate that whether a clock driver needs clocks with ID=0 to call mtk_topckgen_get_mux_rate. Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2022-09-23pinctrl: mediatek: add pinctrl driver for MT7986 SoCWeijie Gao
This patch adds pinctrl and gpio support for MT7986 SoC Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2022-09-23pinctrl: mediatek: add pinctrl driver for MT7981 SoCWeijie Gao
This patch adds pinctrl and gpio support for MT7981 SoC Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2022-09-23dt-bindings: pinctrl: mediatek: add a header for common pinconf parametersWeijie Gao
This patch adds a pinctrl header for common pinconf parameters such as pull-up/pull-down resistors and drive strengths. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2022-09-23arm: dts: mt7622: add i2c supportWeijie Gao
Add both hardware and software i2c support for mt7622. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2022-09-23i2c: add support for MediaTek I2C interfaceWeijie Gao
This patch adds support for MediaTek I2C interface Reviewed-by: Heiko Schocher <hs@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2022-09-23spi: add support for MediaTek spi-mem controllerWeijie Gao
This patch adds support for spi-mem controller found on newer MediaTek SoCs This controller supports Single/Dual/Quad SPI mode. Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
2022-09-23watchdog: mediatek: add support for MediaTek MT7986 SoCWeijie Gao
Add watchdog support for MediaTek MT7986 SoC Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2022-09-23timer: mtk: add support for MediaTek MT7981/MT7986 SoCsWeijie Gao
This patch add general-purpose timer support for MediaTek MT7981/MT7986. These two SoCs uses a newer version of timer with its register definition slightly changed. Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2022-09-23pwm: mtk: add support for MediaTek MT7981 SoCWeijie Gao
This patch adds PWM support for MediaTek MT7981 SoC. MT7981 uses a different register offset so we have to add a version field to indicate the IP core version. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2022-09-23pwm: mtk: add support for MediaTek MT7986 SoCWeijie Gao
This patch adds PWM support for MediaTek MT7986 SoC. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2022-09-23arm: dts: mt7622: force high-speed mode for uartWeijie Gao
The input clock for uart is too slow (25MHz) which introduces frequent data error on both receiving and transmitting even if the baudrate is 115200. Using high-speed can significantly solve this issue. Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2022-09-23serial: mtk: add support for using dynamic baud clock souceWeijie Gao
The baud clock on some platform may change due to assigned-clock-parent set in DT. In current flow the baud clock is only retrieved during probe stage. If the parent of the source clock changes after probe stage, the setbrg will set wrong baudrate. To get the right clock rate, this patch records the baud clk struct to the driver's priv, and changes the driver's flow to get the clock rate before calling _mtk_serial_setbrg(). Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2022-09-23net: mediatek: add support for MediaTek MT7981/MT7986Weijie Gao
This patch adds support for MediaTek MT7981 and MT7986. Both chips uses PDMA v2. Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Tested-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2022-09-23net: mediatek: add support for PDMA v2Weijie Gao
This patch adds support for PDMA v2 hardware. The PDMA v2 has extended the DMA descriptor to 8-words, and some of its fields have changed comparing to the v1 hardware. Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2022-09-23net: mediatek: stop using bitfileds for DMA descriptorsWeijie Gao
This patch is a preparation for adding a new version of PDMA of which the DMA descriptor fields has changed. Using bitfields will result in a complex modification. Convert bitfields to u32 units can solve this problem easily. Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2022-09-23net: mediatek: use a struct to cover variations of all SoCsWeijie Gao
Using a single soc id to control different initialization and TX/RX flow for all SoCs is not extensible if more hardware variations are added in the future. This patch introduces a struct to replace the original mtk_soc to allow the driver be able handle newer hardwares. Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2022-09-23mmc: mediatek: add support for MediaTek MT7891/MT7986 SoCsWeijie Gao
Add eMMC and SDXC support for MediaTek MT7981/MT7986 SoCs Both chips support SDXC and eMMC 4.5. MT7986A supports eMMC 5.1. Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2022-09-23board: mediatek: add MT7981 reference boardsWeijie Gao
This patch adds general board files based on MT7981 SoCs. MT7981 uses one mmc controller for booting from both SD and eMMC, and the pins of mmc controller are also shared with spi controller. So three configs are need for these boot types: 1. mt7981_rfb_defconfig - SPI-NOR and SPI-NAND 2. mt7981_emmc_rfb_defconfig - eMMC only 3. mt7981_sd_rfb_defconfig - SD only Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2022-09-23board: mediatek: add MT7986 reference boardsWeijie Gao
Add general board files based on MT7986 SoCs. MT7986 uses one mmc controller for booting from both SD and eMMC. Both MT7986A and MT7986B use the same pins for spi controller. Configs for various boot types: 1. mt7986_rfb_defconfig - SPI-NOR and SPI-NAND for MT7986A/B 2. mt7986a_bpir3_emmc_defconfig - eMMC for MT7986A only 3. mt7986a_bpir3_sd_defconfig - SD for MT7986A only Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2022-09-23arm: mediatek: add support for MediaTek MT7981 SoCWeijie Gao
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 Gao
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>
2022-09-20Merge branch 'next' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-marvell into next - Enable CONFIG_TIMER for all Kirkwood / MVEBU boards (Stefan) - u-boot-spl.kwb/SPL: Add / improve size limit setup / detection (Pali) - mvebu: theadorable: Misc updates in defconfig und dts (Stefan)
2022-09-20Merge tag 'u-boot-at91-2023.01-a' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-at91 into next First set of u-boot-at91 features for the 2023.01 cycle: This feature set includes the important update on PIO4 pinctrl driver that solves a long time mismatch between Linux and U-boot, related on the unification of pinctrl and gpio driver support, now respecting the pinctrl bindings ABI; and also support for pinctrl subnodes. The feature set also adds support for PDA screen detection for sam9x60_curiosity board , one fix for SD-Card reinsertion and one fix for sam9x60 clocks.
2022-09-20kirkwood: lsxl: Sync defconfigsStefan Roese
With the recent changes in the Orion timer driver Kconfig setup, the board specific enabling is not needed any more. This patch sync's these 2 boards with their current defconfig version. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Michael Walle <michael@walle.cc> Tested-by: Tony Dinh <mibodhi@gmail.com>
2022-09-20arm: mvebu: dts: mvebu-u-boot.dtsi: Add "u-boot, dm-pre-reloc" to timer DT nodeStefan Roese
Adding the "u-boot,dm-pre-reloc" DT property to the timer node is necesssary to support the timer in the early boot phases (e.g. SPL & pre-reloc). Signed-off-by: Stefan Roese <sr@denx.de> Tested-by: Tony Dinh <mibodhi@gmail.com>
2022-09-20arm: mvebu: dts: armada-375.dtsi: Add timer0 & timer1Stefan Roese
Add the DT bindings / descriptions for timer0 & timer1, exactly as done in mainline Linux. Signed-off-by: Stefan Roese <sr@denx.de> Tested-by: Tony Dinh <mibodhi@gmail.com>
2022-09-20arm: mvebu: dts: Makefile: Compile Armada 375 dtb in a separate stepStefan Roese
This patch changes the compilation, so that the Armada 375 board(s) are compiled in a separate step. This is necessary for the timer dts conversion, as A375 has a different / timer description in the dts. Signed-off-by: Stefan Roese <sr@denx.de> Tested-by: Tony Dinh <mibodhi@gmail.com>
2022-09-20arm: mvebu: Use CONFIG_TIMER on all MVEBU & KIRKWOOD platformsStefan Roese
Now that the new timer support is available for these platforms, let's select this IF for all these platforms. This way it's not necessary that each board changes it's config header. Signed-off-by: Stefan Roese <sr@denx.de> Tested-by: Tony Dinh <mibodhi@gmail.com>
2022-09-20timer: orion-timer: Add timer_get_boot_us() for BOOTSTAGE supportStefan Roese
Add timer_get_boot_us() to support boards, that have CONFIG_BOOTSTAGE enabled, like pogo_v4. Signed-off-by: Stefan Roese <sr@denx.de> Tested-by: Tony Dinh <mibodhi@gmail.com>
2022-09-20timer: orion-timer: Add support for other Armada SoC'sStefan Roese
This patch adds support for other Marvell Armada SoC's, supporting the 25MHz fixed clock operation, like the Armada XP etc. Signed-off-by: Stefan Roese <sr@denx.de> Tested-by: Tony Dinh <mibodhi@gmail.com>
2022-09-20arm: mvebu: theadorable: Update eth & mdio DT nodesStefan Roese
With the recent changes in the Marvel mvneta network driver, the MDIO bus is not connected any more. This patch updates the DT nodes to use the nodes from the dtsi files instead of creating ad-hoc nodes. Signed-off-by: Stefan Roese <sr@denx.de>
2022-09-20arm: mvebu: theadorable: Misc defconfig changesStefan Roese
- Remove EFI support as it's not used on this board - Disable CONFIG_FIT_PRINT to reduce the serial output (minimal speedup) Signed-off-by: Stefan Roese <sr@denx.de>
2022-09-20arm: mvebu: Add default SPL_SIZE_LIMIT for 32-bit SoCsPali Rohár
32-bit Marvell Armada BootROMs limit maximal size of SPL image to 192 kB. So define 192 kB (= 0x30000) limit as default value for SPL_SIZE_LIMIT. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Marek Behún <kabel@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-09-20arm: mvebu: turris_omnia: Add CONFIG_BOARD_SIZE_LIMITPali Rohár
Maximal size of u-boot kwb image binary is $CONFIG_ENV_OFFSET which is 0xF0000 = 983040 bytes. So add missing CONFIG_BOARD_SIZE_LIMIT definition to ensure that u-boot binary does not overflow to the u-boot env storage. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Marek Behún <kabel@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-09-20Makefile: Add missing CONFIG_BOARD_SIZE_LIMIT check for u-boot-spl.kwbPali Rohár
Currently CONFIG_BOARD_SIZE_LIMIT check is ignored for u-boot-spl.kwb target. Fix it by adding missing $(BOARD_SIZE_CHECK) macro. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Marek Behún <kabel@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-09-19Merge branch 'master' into nextTom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-09-19Prepare v2022.10-rc5v2022.10-rc5Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-09-19configs: Resync with savedefconfigTom Rini
Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2022-09-19imx8m*_venice_defconfig: fix default bootcmdTim Harvey
commit 970bf8603b87 ("Convert CONFIG_USE_BOOTCOMMAND et al to Kconfig") had an unintended side effect of resulting in a bootcmd env var change for boards like venice that did not have CONFIG_USE_BOOTCOMMAND defined and relied on it being defaulted in include/config_distro_bootcmd.h. Following that patch it instead got defaulted in tools/env/fw_env_private.h Fix this by enabling CONFIG_USE_BOOTCOMMAND for venice. Fixes: commit 970bf8603b87 ("Convert CONFIG_USE_BOOTCOMMAND et al to Kconfig") Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2022-09-19Merge tag 'u-boot-imx-20220919' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-imx u-boot-imx-20220919 ------------------- CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/13500 - Fix imx8mn-beacon-kit-u-boot - Merged Purism - imxrt1170 (already merged in u-boot-imx) - Fixes in crypto FSL - Toradex : fixes Verdin - Serial Driver: fixes when not used as console - DH Boards : fixes + USB - Fix CONFIG_SYS_MALLOC_F_LEN (Kconfig) - Add imx6ulz_smm_m2
2022-09-19powerpc: mpc85xx: Fix incorrect application of patchMarek Behún
I messed up application of patch 5a428e751044 ("mmc: fsl_esdhc_spl: Add support for builds without CONFIG_SYS_MMC_U_BOOT_OFFS"). I took it from a work-in-progress branch where I changed usage of CONFIG_SDCARD to CONFIG_SD_BOOT and refactored SYS_MPC85XX_NO_RESETVEC mess. But these changes aren't in master yet. Fix the wrong usage of these macros. Fixes: 5a428e751044 ("mmc: fsl_esdhc_spl: Add support for builds without CONFIG_SYS_MMC_U_BOOT_OFFS") Signed-off-by: Marek Behún <kabel@kernel.org> Reviewed-by: Pali Rohár <pali@kernel.org>
2022-09-19pinctrl: at91-pio4: Add support for pinctrl config subnodesSergiu Moga
Previously, in order for the `pinctrl-*` DT node properties to be properly processed, the pinctrl's subnodes were limited to only having the `pinmux` property as well as other additional properties (slew-rate, bias-disable, etc.). Now, with this patch the pinctrl driver is made to work similarly to the one from Linux. It can now distinguish between one subnode and a subnode with multiple subnodes. Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>