summaryrefslogtreecommitdiff
path: root/arch/arm/mach-meson
AgeCommit message (Collapse)Author
2026-04-22arm: meson: enable SYSRESET_PSCIFerass El Hafidi
Previously, Amlogic SoCs defined their own reset_cpu() implementation that essentially just did what the sysreset PSCI driver already supports. To reduce duplication (and allow for EFI Capsule on Disk support), make use of it instead of a board-specific reset_cpu. This does not affect SPL, as in that stage we do not actually have PSCI (BL31 is not loaded yet at that point). Also, boards that don't select PSCI support in their config will not have it enabled. Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Ferass El Hafidi <[email protected]> Link: https://patch.msgid.link/20260422-b4-amlogic-sysreset-capsules-v3-2-07b5ccc8f552@postmarketos.org Signed-off-by: Neil Armstrong <[email protected]>
2026-04-22arm: mach-meson: provide reset_cpu only when SYSRESET is disabledFerass El Hafidi
This is in preparation of enabling SYSRESET across all Amlogic boards by default. SYSRESET brings its own reset_cpu implementation which will conflict with the one defined in board-common.c. SPL however will not have SYSRESET enabled (due to overhead in the final image, as we have very little space to work with), and thus will still need that reset_cpu to be defined. Furthermore, some boards do not enable PSCI support in U-Boot, so they may still need this implementation. Guard reset_cpu inside #ifdef to only compile it in when SYSRESET is not enabled. Signed-off-by: Ferass El Hafidi <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Link: https://patch.msgid.link/20260422-b4-amlogic-sysreset-capsules-v3-1-07b5ccc8f552@postmarketos.org Signed-off-by: Neil Armstrong <[email protected]>
2026-02-17treewide: Clean up DECLARE_GLOBAL_DATA_PTR usagePeng Fan
Remove DECLARE_GLOBAL_DATA_PTR from files where gd is not used, and drop the unnecessary inclusion of asm/global_data.h. Headers should be included directly by the files that need them, rather than indirectly via global_data.h. Reviewed-by: Patrice Chotard <[email protected]> #STMicroelectronics boards and STM32MP1 ram test driver Tested-by: Anshul Dalal <[email protected]> #TI boards Acked-by: Yao Zi <[email protected]> #TH1520 Signed-off-by: Peng Fan <[email protected]>
2025-12-11arm: meson: add support for EFI capsule updatesFerass El Hafidi
Previously, few Amlogic devices supported EFI capsule updates. Generally only the Libre Computer ones with SPI flash supported it, thanks to board-specific code. This commit commonises capsule update support across supported Amlogic boards. Similar to Qualcomm's support for it, the dfu string and firmware name is automatically generated at runtime depending on which device we are booted from. Right now this supports flashing to the eMMC/SD and SPI flash. As usual, the capsule UUID is automatically generated. You can get it by enabling CONFIG_CMD_EFIDEBUG and running: => efidebug capsule esrt ======================================== ESRT: fw_resource_count=1 ESRT: fw_resource_count_max=1 ESRT: fw_resource_version=1 [entry 0]============================== ESRT: fw_class=796180D4-AAB2-50F1-B16A-53DFF9CA89B2 ESRT: fw_type=unknown ESRT: fw_version=0 ESRT: lowest_supported_fw_version=0 ESRT: capsule_flags=0 ESRT: last_attempt_version=0 ESRT: last_attempt_status=success ======================================== Reviewed-by: Evgeny Bachinin <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Ferass El Hafidi <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2025-12-11arm: meson: spl: add support for SPL DRAM initFerass El Hafidi
Supports both GXBB and GXL SoCs. Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Ferass El Hafidi <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2025-12-11arm: meson: initial u-boot SPL support for GX SoCsFerass El Hafidi
Add initial boilerplate for U-Boot SPL support on Amlogic. Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Ferass El Hafidi <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2025-03-18arch: arm: meson: support Amlogic chip_id v1 and v2Evgeny Bachinin
Patch introduces: * chip_id API - useful for various things, but used now for device_id (did) generation as mentioned in [1] on our private board code. Our device_id is calculated by means of permutations of chip_id value. * new SoCs (a1, s4, etc) are usually coming with the support of chip_id v2 right away, whereas secure monitors on old SoCs (like axg, g12b, g12a, etc) may support only chip_id v1. Chip_id API handles both cases * meson_sm_get_serial() is described via chip_id API. Links: [1] https://lore.kernel.org/linux-arm-kernel/[email protected]/T/#m630fbeea6a6e7d531290b5c0af205af4fb979757 Signed-off-by: Viacheslav Bocharov <[email protected]> Co-developed-by: Arseniy Krasnov <[email protected]> Signed-off-by: Arseniy Krasnov <[email protected]> Signed-off-by: Evgeny Bachinin <[email protected]> Link: https://lore.kernel.org/r/20250210-meson_chip_id_all_vers-v1-3-b98f8b6880b8@salutedevices.com Signed-off-by: Neil Armstrong <[email protected]>
2025-03-18arm: meson: sm: get rid of SM_CHIP_ID_SIZEEvgeny Bachinin
SM_CHIP_ID_SIZE is used nowhere. Moreover, it specifies wrong chip_id size: Amlogic chip_id v1 and v2 is always 16 bytes long. Signed-off-by: Evgeny Bachinin <[email protected]> Link: https://lore.kernel.org/r/20250210-meson_chip_id_all_vers-v1-2-b98f8b6880b8@salutedevices.com Signed-off-by: Neil Armstrong <[email protected]>
2025-03-18arm: meson: unify type being used for socinfoEvgeny Bachinin
socinfo_ API uses u32 type, hence let's use it everywhere for consistency. Signed-off-by: Evgeny Bachinin <[email protected]> Link: https://lore.kernel.org/r/20250210-meson_chip_id_all_vers-v1-1-b98f8b6880b8@salutedevices.com Signed-off-by: Neil Armstrong <[email protected]>
2024-05-20Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"Tom Rini
As part of bringing the master branch back in to next, we need to allow for all of these changes to exist here. Reported-by: Jonas Karlman <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2024-05-19Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""Tom Rini
When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"' I failed to notice that b4 noticed it was based on next and so took that as the base commit and merged that part of next to master. This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35. Reported-by: Jonas Karlman <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2024-05-06arm: meson: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from all mach-meson files and when needed add missing include files directly. Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2024-04-04dts: meson-g12a: Switch to using upstream DTNeil Armstrong
Enable OF_UPSTREAM to use upstream DT and add amlogic/ prefix to the DEFAULT_DEVICE_TREE. And thereby directly build DTB from dts/upstream/src/ including *-u-boot.dtsi files from arch/$(ARCH)/dts/ directory. Cc: Sumit Garg <[email protected]> Acked-by: Viacheslav Bocharov <[email protected]> Reviewed-by: Sumit Garg <[email protected]> Tested-by: Mattijs Korpershoek <[email protected]> # khadas-vim3_android Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2024-04-04dts: meson: Switch GXL, GXM & AXG to using upstream DTNeil Armstrong
Enable OF_UPSTREAM to use upstream DT and add amlogic/ prefix to the DEFAULT_DEVICE_TREE. And thereby directly build DTB from dts/upstream/src/ including *-u-boot.dtsi files from arch/$(ARCH)/dts/ directory. Cc: Sumit Garg <[email protected]> Acked-by: Viacheslav Bocharov <[email protected]> Reviewed-by: Sumit Garg <[email protected]> Tested-by: Mattijs Korpershoek <[email protected]> # khadas-vim3_android Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2024-02-29dts: meson-gxbb: Switch to using upstream DTSumit Garg
Although there were still some variations in board DTS files based on meson-gxbb SoC but I think those were minor differences from upstream and shouldn't impact boot on these devices. So enable OF_UPSTREAM to use upstream DT and add amlogic/ prefix to the DEFAULT_DEVICE_TREE. And thereby directly build DTB from dts/upstream/src/ including *-u-boot.dtsi files from arch/$(ARCH)/dts/ directory. Reviewed-by: Neil Armstrong <[email protected]> Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Sumit Garg <[email protected]>
2024-02-27Kconfig: Centralize prompting for SYS_CONFIG_NAMETom Rini
Generally speaking, we do not prompt for this value and define it in the board specific Kconfig file. There are some valid use cases however today where we do prompt for this value, so instead of having this be done in a number of locations, do this at the top-level location only. This removes the question from a number of other locations and makes it consistent that when we do set the value directly, we always do it the same way. We don't need to specify the type, it's always string. Signed-off-by: Tom Rini <[email protected]>
2024-01-30ARM: meson: stop printing board model after sysinfo updateNeil Armstrong
After the sysinfo update, Model is printed twice, remove the now duplicate Model print from mach-meson/board-info. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2023-11-28meson: Use checkboard() instead of show_board_info()Simon Glass
Boards can use a sysinfo driver if a particular model name is needed. Update this board to use checkboard() directly, rather than having a weak function laid on top of a weak function. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Neil Armstrong <[email protected]>
2023-10-15arch: meson: use secure monitor driverAlexey Romanov
Now we have to use UCLASS_SM driver instead of raw smc_call() function call. Signed-off-by: Alexey Romanov <[email protected]> Reviewed-by: Simon Glass <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2023-10-15arch: meson: sm: set correct order of the includesAlexey Romanov
The common.h header should always be first, followed by other headers in order, then headers with directories, then local files. Signed-off-by: Alexey Romanov <[email protected]> Reviewed-by: Simon Glass <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2023-09-24common: Drop linux/printk.h from common headerSimon Glass
This old patch was marked as deferred. Bring it back to life, to continue towards the removal of common.h Move this out of the common header and include it only where needed. Signed-off-by: Simon Glass <[email protected]>
2023-06-28arch/arm: meson: sm: introduce power domain functionsAlexey Romanov
This commit adds functions to manage secure power domain for Amlogic SoC's using smc functionality. Signed-off-by: Alexey Romanov <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2023-06-28board: amlogic: add support for AD401 boardIgor Prusov
The AD401 board is the Amlogic A1 SoC reference board Signed-off-by: Igor Prusov <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2023-06-28ARM: meson: add A1 supportIgor Prusov
Add support for Amlogic A1 SoC family. Signed-off-by: Igor Prusov <[email protected]> Signed-off-by: Evgeny Bachinin <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2023-01-20ARM: meson: switch AXG & GX dwc2 otg to DMNeil Armstrong
With CONFIG_DM_USB_GADGET=y, we no longer need any board_usb_*() logic because: * the dwc2 driver is DM compatible, and handles its own clock enabling * the dwc3-meson-gxl glue drivers handles "force mode switching" Remove all mach-meson gx & axg usb code and enable CONFIG_DM_USB_GADGET. Note: Only configs having both CONFIG_USB_DWC3_MESON_GXL=y *and* USB_GADGET_DWC2_OTG=y have been updated. Thanks for the original work from Mattijs at [1] [1] https://lore.kernel.org/all/[email protected]/ Reviewed-by: Mattijs Korpershoek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2023-01-17ARM: meson: g12a: switch dwc2 otg to DMMattijs Korpershoek
With CONFIG_DM_USB_GADGET=y, we no longer need any board_usb_*() logic because: * the dwc2 driver is DM compatible, and handles its own clock enabling * the dwc3-meson-g12a glue drivers handles "force mode switching" Remove all mach-meson/g12a usb code and enable CONFIG_DM_USB_GADGET. Note: Only configs having both CONFIG_USB_DWC3_MESON_G12A=y *and* USB_GADGET_DWC2_OTG=y have been updated. Signed-off-by: Mattijs Korpershoek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2023-01-10arm/mach-meson: move smc commands in cmd/mesonAlexey Romanov
It is incorrect to keep commands in the arch/ folder. Signed-off-by: Alexey Romanov <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Link: https://lore.kernel.org/r/[email protected] [narmstrong: moved after cmd/sound in index.rst] Signed-off-by: Neil Armstrong <[email protected]>
2022-08-08ARM: meson: fixup error on efuse commands returnJerome Brunet
All `sm efuseread/efusewrite` commands exit with an error, even if the fuse have actually been dealt with correctly. This is because the smc call return the size it actually processed but this result is checked against 0. Return failure in do_efuse_read/write if the return value of meson_sm_read/write_efuse() is not the requested size. Fixes: 52195ba5f579 ("ARM: amlogic: add sm efuse write support and cmd for read/write efuse") Signed-off-by: Jerome Brunet <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-05-23meson: axg: search dtb for meson-axg-usb-ctrl on board axgSergei Antonov
USB controller for AXG is described as meson-axg-usb-ctrl, see arch/arm/dts/meson-axg.dtsi Look for that name instead of meson-gxl-usb-ctrl. Signed-off-by: Sergei Antonov <[email protected]> Acked-by: Neil Armstrong <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-10-29ARM: amlogic: add sm efuse write support and cmd for read/write efuseVyacheslav Bocharov
This adds support for amlogic efuse write and provides two subcommands of "sm" command: "efuseread" and "efusewrite" to read/write bytes between memory and efuse. Signed-off-by: Vyacheslav Bocharov <[email protected]> [narmstrong: fixed indent at end of patch] Signed-off-by: Neil Armstrong <[email protected]>
2021-10-07ARM: meson: Add S905Y2 SOC IDChristian Hewitt
Add the SOC ID for the S905Y2 to board info, see below for before/after tested with a Radxa Zero board: SoC: Amlogic Meson G12A (Unknown) Revision 28:b (30:2) SoC: Amlogic Meson G12A (S905Y2) Revision 28:b (30:2) Signed-off-by: Christian Hewitt <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Neil Armstrong <[email protected]>
2021-07-30Revert "ARM: meson: Add support for fastboot_set_reboot_flag()"Mattijs Korpershoek
With the introduction of a generic reboot flag implemented in commit a362ce214f ("fastboot: Implement generic fastboot_set_reboot_flag"), we no longer need the custom PSCI implementation to handle the reboot reason. This reverts commit 9a34dedfae0ebb031a45324c2fed8c39b2c6fcf2. Signed-off-by: Mattijs Korpershoek <[email protected]> Acked-by: Neil Armstrong <[email protected]> Signed-off-by: Neil Armstrong <[email protected]>
2021-04-06arm: meson: remove static ethernet link setupNeil Armstrong
The static ethernet link type config code is no more needed because now handled by the meson8b glue driver, delete it. Signed-off-by: Neil Armstrong <[email protected]>
2021-04-06arm: meson: remove static ethernet memory power domain enableNeil Armstrong
The ethernet memory power domain is handled by the meson-ee-pwrc driver, delete the static code. Signed-off-by: Neil Armstrong <[email protected]>
2021-04-06arm: meson: remove static MDIO mux handlingNeil Armstrong
The static MDIO mux handling in mach-meson is no more needed, delete it. Signed-off-by: Neil Armstrong <[email protected]>
2021-03-02reset: Remove addr parameter from reset_cpu()Harald Seiler
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 <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2021-02-19ARM: mach-meson: select MMC_PWRSEQ configJaehoon Chung
Before time, PWRSEQ is selected since below commit. commit 262d34363373 ("board: amlogic: select PWRSEQ for all amlogic platform") Select MMC_PWRSEQ config because of introducing CONFIG_MMC_PWRSEQ for only eMMC module. Signed-off-by: Jaehoon Chung <[email protected]>
2021-02-02common: Drop asm/global_data.h from common headerSimon Glass
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 <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2021-01-11meson: Add soc_rev to environmentPascal Vizeli
Add SoC revision to environment. This can be useful to select the correct device tree at runtime (N2/N2+). Signed-off-by: Pascal Vizeli <[email protected]> Signed-off-by: Stefan Agner <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Neil Armstrong <[email protected]>
2021-01-11ARM: meson: isolate loading of socinfoStefan Agner
Move loading of socinfo into a separate function so the value can be reused later. Signed-off-by: Stefan Agner <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Neil Armstrong <[email protected]>
2020-11-12ARM: mach-meson: update SoC IDsNeil Armstrong
Update From Linux commits - 240051cb833b ("soc: amlogic: meson-gx-socinfo: Add A1 and A113L IDs") - 1d7c541b8a5b ("soc: amlogic: meson-gx-socinfo: Add S905X3 ID for VIM3L") - fdfc6997bd08 ("soc: amlogic: meson-gx-socinfo: Fix S905D3 ID for VIM3L") - d16d0481e6ba ("soc: amlogic: meson-gx-socinfo: Fix S905X3 and S905D3 ID's") Signed-off-by: Neil Armstrong <[email protected]>
2020-10-05arm: meson-axg: add board_usb_init()/cleanup() for USB gadgetNeil Armstrong
Add the board_usb_init()/cleanup() for USB gadget for AXG based on the code for the G12A architecture. Signed-off-by: Neil Armstrong <[email protected]>
2020-10-05ARM: mach-meson: use new DWC3 glue for GXL & GXMNeil Armstrong
Use the new Amlogic GXL/GXM USB Glue instead of the set of USB3 PHY and Simple DWC3 wrapper. Signed-off-by: Neil Armstrong <[email protected]>
2020-09-01fastboot: Extend fastboot_set_reboot_flag with reboot reasonRoman Kovalivskyi
Extend fastboot_set_reboot_flag arguments with reboot reason so that it could handle different reboot cases in future. Signed-off-by: Roman Kovalivskyi <[email protected]>
2020-07-17treewide: convert bd_t to struct bd_info by coccinelleMasahiro Yamada
The Linux coding style guide (Documentation/process/coding-style.rst) clearly says: It's a **mistake** to use typedef for structures and pointers. Besides, using typedef for structures is annoying when you try to make headers self-contained. Let's say you have the following function declaration in a header: void foo(bd_t *bd); This is not self-contained since bd_t is not defined. To tell the compiler what 'bd_t' is, you need to include <asm/u-boot.h> #include <asm/u-boot.h> void foo(bd_t *bd); Then, the include direcective pulls in more bloat needlessly. If you use 'struct bd_info' instead, it is enough to put a forward declaration as follows: struct bd_info; void foo(struct bd_info *bd); Right, typedef'ing bd_t is a mistake. I used coccinelle to generate this commit. The semantic patch that makes this change is as follows: <smpl> @@ typedef bd_t; @@ -bd_t +struct bd_info </smpl> Signed-off-by: Masahiro Yamada <[email protected]>
2020-05-18common: Drop linux/bitops.h from common headerSimon Glass
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <[email protected]>
2020-05-18common: Drop asm/ptrace.h from common headerSimon Glass
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <[email protected]>
2020-05-18common: Drop log.h from common headerSimon Glass
Move this header out of the common header. Signed-off-by: Simon Glass <[email protected]>
2020-05-18command: Remove the cmd_tbl_t typedefSimon Glass
We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <[email protected]>
2020-05-18common: Drop init.h from common headerSimon Glass
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <[email protected]>