aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-meson
AgeCommit message (Collapse)AuthorFilesLines
2024-04-04dts: meson-g12a: Switch to using upstream DTNeil Armstrong1-0/+1
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 <sumit.garg@linaro.org> Acked-by: Viacheslav Bocharov <adeep@lexina.in> Reviewed-by: Sumit Garg <sumit.garg@linaro.org> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # khadas-vim3_android Link: https://lore.kernel.org/r/20240329-u-boot-of-upstream-v2-4-2512ad3eb63d@linaro.org Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2024-04-04dts: meson: Switch GXL, GXM & AXG to using upstream DTNeil Armstrong1-0/+3
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 <sumit.garg@linaro.org> Acked-by: Viacheslav Bocharov <adeep@lexina.in> Reviewed-by: Sumit Garg <sumit.garg@linaro.org> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # khadas-vim3_android Link: https://lore.kernel.org/r/20240329-u-boot-of-upstream-v2-2-2512ad3eb63d@linaro.org Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2024-02-29dts: meson-gxbb: Switch to using upstream DTSumit Garg1-0/+1
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 <neil.armstrong@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2024-02-27Kconfig: Centralize prompting for SYS_CONFIG_NAMETom Rini1-8/+0
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 <trini@konsulko.com>
2024-01-30ARM: meson: stop printing board model after sysinfo updateNeil Armstrong1-10/+0
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/20240124-u-boot-model-print-fix-v1-1-484960069623@linaro.org Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-11-28meson: Use checkboard() instead of show_board_info()Simon Glass1-1/+1
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 <sjg@chromium.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-10-15arch: meson: use secure monitor driverAlexey Romanov2-53/+58
Now we have to use UCLASS_SM driver instead of raw smc_call() function call. Signed-off-by: Alexey Romanov <avromanov@salutedevices.com> Reviewed-by: Simon Glass <sjg@chromium.org> Link: https://lore.kernel.org/r/20230921081346.22157-9-avromanov@salutedevices.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-10-15arch: meson: sm: set correct order of the includesAlexey Romanov1-3/+3
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 <avromanov@salutedevices.com> Reviewed-by: Simon Glass <sjg@chromium.org> Link: https://lore.kernel.org/r/20230921081346.22157-8-avromanov@salutedevices.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-09-24common: Drop linux/printk.h from common headerSimon Glass1-0/+1
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 <sjg@chromium.org>
2023-06-28arch/arm: meson: sm: introduce power domain functionsAlexey Romanov1-0/+14
This commit adds functions to manage secure power domain for Amlogic SoC's using smc functionality. Signed-off-by: Alexey Romanov <avromanov@sberdevices.ru> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20230531093156.29240-2-avromanov@sberdevices.ru Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-06-28board: amlogic: add support for AD401 boardIgor Prusov1-0/+1
The AD401 board is the Amlogic A1 SoC reference board Signed-off-by: Igor Prusov <ivprusov@sberdevices.ru> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20230505125639.3605-6-ivprusov@sberdevices.ru Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-06-28ARM: meson: add A1 supportIgor Prusov3-0/+66
Add support for Amlogic A1 SoC family. Signed-off-by: Igor Prusov <ivprusov@sberdevices.ru> Signed-off-by: Evgeny Bachinin <eabachinin@sberdevices.ru> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20230505125639.3605-4-ivprusov@sberdevices.ru Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-01-20ARM: meson: switch AXG & GX dwc2 otg to DMNeil Armstrong2-266/+0
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/20221024-meson-dm-usb-v1-2-2ab077a503b9@baylibre.com/ Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Link: https://lore.kernel.org/r/20230117-u-boot-usb-gxl-otg-dm-v1-2-2853f6d75b06@linaro.org Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-01-17ARM: meson: g12a: switch dwc2 otg to DMMattijs Korpershoek1-127/+0
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 <mkorpershoek@baylibre.com> Link: https://lore.kernel.org/r/20221024-meson-dm-usb-v1-2-2ab077a503b9@baylibre.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-01-10arm/mach-meson: move smc commands in cmd/mesonAlexey Romanov1-144/+0
It is incorrect to keep commands in the arch/ folder. Signed-off-by: Alexey Romanov <avromanov@sberdevices.ru> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20230110105650.54580-3-avromanov@sberdevices.ru [narmstrong: moved after cmd/sound in index.rst] Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2022-08-08ARM: meson: fixup error on efuse commands returnJerome Brunet1-6/+3
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 <jbrunet@baylibre.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Link: https://lore.kernel.org/r/20220804144138.33809-1-jbrunet@baylibre.com
2022-05-23meson: axg: search dtb for meson-axg-usb-ctrl on board axgSergei Antonov1-2/+2
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 <saproj@gmail.com> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Link: https://lore.kernel.org/r/20220509113618.2891126-1-saproj@gmail.com
2021-10-29ARM: amlogic: add sm efuse write support and cmd for read/write efuseVyacheslav Bocharov1-1/+67
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 <adeep@lexina.in> [narmstrong: fixed indent at end of patch] Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-10-07ARM: meson: Add S905Y2 SOC IDChristian Hewitt1-0/+1
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 <christianshewitt@gmail.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-07-30Revert "ARM: meson: Add support for fastboot_set_reboot_flag()"Mattijs Korpershoek1-34/+0
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 <mkorpershoek@baylibre.com> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-04-06arm: meson: remove static ethernet link setupNeil Armstrong3-100/+0
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 <narmstrong@baylibre.com>
2021-04-06arm: meson: remove static ethernet memory power domain enableNeil Armstrong2-6/+0
The ethernet memory power domain is handled by the meson-ee-pwrc driver, delete the static code. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-04-06arm: meson: remove static MDIO mux handlingNeil Armstrong2-45/+2
The static MDIO mux handling in mach-meson is no more needed, delete it. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-03-02reset: Remove addr parameter from reset_cpu()Harald Seiler1-2/+2
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-19ARM: mach-meson: select MMC_PWRSEQ configJaehoon Chung1-0/+1
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 <jh80.chung@samsung.com>
2021-02-02common: Drop asm/global_data.h from common headerSimon Glass6-0/+6
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-11meson: Add soc_rev to environmentPascal Vizeli1-0/+12
Add SoC revision to environment. This can be useful to select the correct device tree at runtime (N2/N2+). Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch> Signed-off-by: Stefan Agner <stefan@agner.ch> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-01-11ARM: meson: isolate loading of socinfoStefan Agner1-1/+13
Move loading of socinfo into a separate function so the value can be reused later. Signed-off-by: Stefan Agner <stefan@agner.ch> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2020-11-12ARM: mach-meson: update SoC IDsNeil Armstrong1-1/+6
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 <narmstrong@baylibre.com>
2020-10-05arm: meson-axg: add board_usb_init()/cleanup() for USB gadgetNeil Armstrong1-0/+128
Add the board_usb_init()/cleanup() for USB gadget for AXG based on the code for the G12A architecture. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2020-10-05ARM: mach-meson: use new DWC3 glue for GXL & GXMNeil Armstrong1-55/+72
Use the new Amlogic GXL/GXM USB Glue instead of the set of USB3 PHY and Simple DWC3 wrapper. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2020-09-01fastboot: Extend fastboot_set_reboot_flag with reboot reasonRoman Kovalivskyi1-1/+5
Extend fastboot_set_reboot_flag arguments with reboot reason so that it could handle different reboot cases in future. Signed-off-by: Roman Kovalivskyi <roman.kovalivskyi@globallogic.com>
2020-07-17treewide: convert bd_t to struct bd_info by coccinelleMasahiro Yamada1-2/+2
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 <masahiroy@kernel.org>
2020-05-18common: Drop linux/bitops.h from common headerSimon Glass2-0/+2
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18common: Drop asm/ptrace.h from common headerSimon Glass2-0/+2
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-18command: Remove the cmd_tbl_t typedefSimon Glass1-6/+8
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 <sjg@chromium.org>
2020-05-18common: Drop init.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 net.h from common headerSimon Glass5-0/+6
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-05-17efi_loader: round the memory area in efi_add_memory_map()Michael Walle1-5/+2
Virtually all callers of this function do the rounding on their own. Some do it right, some don't. Instead of doing this in each caller, do the rounding in efi_add_memory_map(). Change the size parameter to bytes instead of pages and remove aligning and size calculation in all callers. There is no more need to make the original efi_add_memory_map() (which takes pages as size) available outside the module. Thus rename it to efi_add_memory_map_pg() and make it static to prevent further misuse outside the module. Signed-off-by: Michael Walle <michael@walle.cc> Add missing comma in sunxi_display.c. Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-05-11phy: Use _nodev naming convention if non-device clientsJagan Teki1-1/+2
Clients that are requesting some of uclass API's without a device (with ofnode) usually have _nodev naming convention. - clk_get_by_index_nodev - clk_get_by_name_nodev - reset_get_by_index_nodev - gpio_request_by_name_nodev So, update the same naming convention PHY framework. This doesn't change the existing functionality. Cc: Neil Armstrong <narmstrong@baylibre.com> Cc: Tom Rini <trini@konsulko.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2020-04-20arm: meson-gx: add board_usb_init()/cleanup() for USB gadgetNeil Armstrong1-0/+118
Add arch code to initialize USB Gadget mode using the DWC2 controller, and using the previously added set_mode() phy functions. [narmstrong: fixup board_usb_cleanup call to phy_meson_gxl_usb2_set_mode] Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2020-02-05dm: core: Require users of devres to include the headerSimon Glass2-0/+2
At present devres.h is included in all files that include dm.h but few make use of it. Also this pulls in linux/compat which adds several more headers. Drop the automatic inclusion and require files to include devres themselves. This provides a good indication of which files use devres. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Anatolij Gustschin <agust@denx.de>
2020-01-17common: Move RAM-sizing functions to init.hSimon Glass3-0/+3
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 Glass1-0/+1
Move this function out of common.h and into a relevant header file. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-07board: amlogic: select PWRSEQ for all amlogic platformAnand Moon1-0/+1
commit a10388dc6982 ("mmc: meson-gx: add support for mmc-pwrseq-emmc") introduce CONFIG_PWRSEQ for power sequence for eMMC module on amlogic platform, so enable this to all amlogic boards. Signed-off-by: Anand Moon <linux.amoon@gmail.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2019-12-02common: Move some board functions out of common.hSimon Glass1-0/+1
A number of board function belong in init.h with the others. Move them. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02crc32: Use the crc.h header for crc functionsSimon Glass1-0/+1
Drop inclusion of crc.h in common.h and use the correct header directly instead. With this we can drop the conflicting definition in fw_env.h and rely on the crc.h header, which is already included. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-10-18ARM: meson: add SM1 SoC idNeil Armstrong1-0/+2
Add the missing IDs to detect the SM1 S905X3 SoC. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2019-10-18arm: meson: Recognize A311D SoCAndreas Färber1-0/+1
Values imported from Linux driver, but in correct numeric order. Khadas VIM3 prints: Amlogic Meson G12B (A311D) Revision 29:b (10:2) Cc: Christian Hewitt <christianshewitt@gmail.com> Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>