summaryrefslogtreecommitdiff
path: root/board/renesas
AgeCommit message (Collapse)AuthorFilesLines
2023-06-12Merge tag v2023.07-rc4 into nextTom Rini1-2/+8
Signed-off-by: Tom Rini <trini@konsulko.com>
2023-06-10renesas: rcar: Apply ATF overlay for reserved-memoryDetlev Casanova1-2/+8
The function fdtdec_board_setup() is called early and adds the overlay from ATF to the u-boot device tree. That is necessary so that u-boot doesn't use reserved memory. Linux also needs to know about that reserved memory so the overlay from ATF needs to be aplied on the linux device tree as well. This commit makes sure that the ATF overlay is applied to both device trees. Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Adam Ford <aford173@gmail.com>
2023-06-08ARM: renesas: Add R8A77980 V3HSK board and CPLD codeValentine Barshak3-0/+210
Add board code for the R8A77980 V3HSK board. Add CPLD sysreset driver to the R-Car V3H SK board. Extracted from a larger patch by Valentine Barshak. Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com> Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> Signed-off-by: Tam Nguyen <tam.nguyen.xa@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> [Marek: Sync configs and board code with V3H Condor, squash CPLD driver in]
2023-06-08ARM: renesas: Add R8A77970 V3MSK board and CPLD codeValentine Barshak4-0/+404
Add board code for the R8A77970 V3MSK board. Add CPLD sysreset driver to the R-Car V3M SK board. Extracted from a larger patch by Valentine Barshak. Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com> Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> Signed-off-by: Tam Nguyen <tam.nguyen.xa@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> [Marek: Sync configs and board code with V3M Eagle, squash CPLD driver in]
2023-06-08ARM: rmobile: Introduce weak default board_init()Marek Vasut6-35/+7
Introduce weak default board_init() in rcar-common/common.c , which allows complete removal of ebisu.c and condor.c at the same time . Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-06-08ARM: rmobile: Drop eagle.h config of R8A77970 V3M Eagle boardMarek Vasut1-1/+1
The eagle.h is now empty and only includes rcar-gen3-common.h . Use rcar-gen3-common.h directly instead and drop eagle.h . No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-06-08ARM: rmobile: Factor out common R-Car V3M/V3H board codeMarek Vasut2-26/+2
Pull common board initialization code from V3M Eagle board into rcar-common/v3-common.c so it can be re-used by other V3M/V3H boards. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-06-08ARM: rmobile: Reduce R-Car V3H Condor header usageMarek Vasut1-11/+0
There is no need to pull in all those headers as the board file is basically empty. Drop them all. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-06-08ARM: rmobile: Reduce R-Car E3 Ebisu header usageMarek Vasut1-22/+0
There is no need to pull in all those headers as the board file is basically empty. Drop them all. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-06-08ARM: rmobile: Deduplicate R-Car Gen3/Gen4 reset_cpu()Marek Vasut9-90/+39
The reset_cpu() implementation is basically the same across Gen3 SoCs and identical across Gen4 SoCs. Introduce weak default for reset_cpu(), so that it does not have to be duplicated in every board file again. There is a slight difference for CA53 only systems, like E3 and D3, which now check MIDR for CPU ID first just like the other systems, but this is OK since the MIDR always returns CA53 core type and the correct reset register is written. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-04-07ARM: renesas: Add R8A779G0 V4H White Hawk board codeHai Pham3-0/+96
Add board code for R8A779G0 V4H White Hawk board. Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> [Marek: Synchronize configuration symbols which are now switched to Kconfig Mallocate gd->bd->bi_boot_params, i.e. drop the assignment Sort headers, use clrbits_le32(), use BIT macros where appropriate Use CONFIG_SYS_CLK_FREQ for counter frequency instead of custom macro]
2023-04-07ARM: renesas: Add R8A779F0 S4 Spider board codeHai Pham3-0/+96
Add board code for R8A779F0 S4 Spider board. Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> [Marek: Synchronize configuration symbols which are now switched to Kconfig Mallocate gd->bd->bi_boot_params, i.e. drop the assignment Sort headers, use clrbits_le32(), use BIT macros where appropriate Use CONFIG_SYS_CLK_FREQ for counter frequency instead of custom macro]
2023-04-07ARM: rmobile: Add R-Car Generation 4 supportHai Pham1-1/+1
This adds R-Car Generation 4 (Gen4) support as Renesas ARM64 SoC. In this version, reusing R-Car Gen3 lowlevel initialize routine [1] and R-Car Gen3 memory map tables [2] . [1] arch/arm/mach-rmobile/lowlevel_init_gen3.S [2] arch/arm/mach-rmobile/memmap-gen3.c Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> [Marek: - Enable DTO support by default - Sort the Kconfig lists - Select RCAR_64 Kconfig option to pull in all the shared Kconfig options with Gen3, and use where applicable to deduplicate entries. - Fix reference [2] typo in commit message - Drop config options moved to Kconfig, rename rest to CFG_ accordingly to synchronize with upstream changes. Drop removed CONFIG_VERY_BIG_RAM. - Move board size limit to arch/Kconfig - Move GICR_BASE to headers instead of common config]
2023-03-18ARM: renesas: falcon: Enable RWDT reset for V3U FalconHai Pham1-5/+11
Enable RWDT reset on Reset Controller so that it can be used as reset trigger source for V3U Falcon. Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> # Use one current_el() in board_init
2023-03-18ARM: renesas: falcon: Initialize ARM generic timer and GICv3 if EL3Hai Pham1-2/+5
U-Boot executes at EL3 is required to initalize those settings. In other cases, they will be done by prior-stage firmware instead. This fixes crash when U-Boot is at non-secure exception level. Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-03-18ARM: renesas: Demote overlap memory nodes message to debug on Gen3Hai Pham1-3/+3
The R-Car DTs might contains multiple /memory@* nodes from various sources, i.e. prior firmware, u-boot itself or the OS The duplicates are likely to happen so the messages are not meaningful in the default setting since we have already handled that. Reduce the message to debug level. Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-01-20global: Finish CONFIG -> CFG migrationTom Rini1-1/+1
At this point, the remaining places where we have a symbol that is defined as CONFIG_... are in fairly odd locations. While as much dead code has been removed as possible, some of these locations are simply less obvious at first. In other cases, this code is used, but was defined in such a way as to have been missed by earlier checks. Perform a rename of all such remaining symbols to be CFG_... rather than CONFIG_... Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-06global: Move remaining CONFIG_SYS_SDRAM_* to CFG_SYS_SDRAM_*Tom Rini9-9/+9
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-10-31Rename CONFIG_SYS_TEXT_BASE to CONFIG_TEXT_BASESimon Glass1-1/+1
The current name is inconsistent with SPL which uses CONFIG_SPL_TEXT_BASE and this makes it imposible to use CONFIG_VAL(). Rename it to resolve this problem. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-02ARM: renesas: Propagate RPC-IF enablement to subsequent softwareGeert Uytterhoeven1-2/+44
As the Renesas Reduced Pin Count Interface may be locked by TF-A, it is disabled by default[1]. When unlocked, TF-A passes a DT fragment to enable it, which is applied to the U-Boot DT[2]. Unlike the memory layout, the RPC-IF enablement is not propagated to subsequent software. Hence e.g. Linux cannot know if the RPC-IF is locked or not, and will lock-up when trying to access the RPC-IF when locked. Fix this by checking if the RPC-IF is enabled in the TF-A DT fragment, and setting the status of the RPC-IF device node in the target DT, if present, to "okay". Do this only when a "flash" subnode is found, to avoid errors in subsequent software when the RPC-IF is not intended to be used. Note that this requires the status of the RPC-IF node to be set to "disabled" in the target DT, just like in the U-Boot DT. [1] commit 3d5f45c95c9db73d ("ARM: dts: rmobile: Disable RPC HF by default") [2] commit 361377dbdbc9f0f5 ("ARM: rmobile: Merge prior-stage firmware DT fragment into U-Boot DT on Gen3") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2021-12-28Finish conversion of CONFIG_SYS_CLK_FREQ to KconfigTom Rini6-6/+12
In order to finish moving this symbol to Kconfig for all platforms, we need to do a few more things. First, for all platforms that define this to a function, introduce CONFIG_DYNAMIC_SYS_CLK_FREQ, similar to CONFIG_DYNAMIC_DDR_CLK_FREQ and populate clock_legacy.h. This entails also switching all users from CONFIG_SYS_CLK_FREQ to get_board_sys_clk() and updating a few preprocessor tests. With that done, all platforms that define a value here can be converted to Kconfig, and a fall-back of zero is sufficiently safe to use (and what is used today in cases where code may or may not have this available). Make sure that code which calls this function includes <clock_legacy.h> to get the prototype. Signed-off-by: Tom Rini <trini@konsulko.com>
2021-09-17Remove #include <version.h> from files which do not need itPali Rohár1-1/+0
Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2021-08-30Convert CONFIG_SYS_I2C_LEGACY to Kconfig and add CONFIG_[ST]PL_SYS_I2C_LEGACYTom Rini3-4/+4
First, we convert CONFIG_SYS_I2C_LEGACY to Kconfig. Next, as you cannot have SYS_I2C_LEGACY and DM_I2C at the same time, introduce CONFIG_SPL_SYS_I2C_LEGACY so that we can enable the legacy option only in SPL. Finally, for some PowerPC cases we also need CONFIG_TPL_SYS_I2C_LEGACY support. Convert all of the existing users to one or more symbols. Signed-off-by: Tom Rini <trini@konsulko.com>
2021-08-08ARM: renesas: Mallocate bootparams on Gen3Marek Vasut6-18/+0
The bootparams do not have to be at fixed location, they can be dynamically mallocated instead. Make it so to get rid of another fixed assignment. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Biju Das <biju.das.jz@bp.renesas.com> Cc: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
2021-08-02global: Convert simple_strtoul() with hex to hextoul()Simon Glass2-4/+4
It is a pain to have to specify the value 16 in each call. Add a new hextoul() function and update the code to use it. Add a proper comment to simple_strtoul() while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-07-28i2c: Rename CONFIG_SYS_I2C to CONFIG_SYS_I2C_LEGACYSimon Glass3-4/+4
It is quite confusing that CONFIG_SYS_I2C selects the legacy I2C and CONFIG_DM_I2C selects the current I2C. The deadline to migrate I2C is less than a year away. Also we want to have a CONFIG_I2C for U-Boot proper just like we have CONFIG_SPL_I2C for SPL, so we can simplify the Makefile rules. Rename this symbol so it is clear it is going away. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heiko Schocher <hs@denx.de>
2021-06-24ARM: renesas: Add GICv3 initialization for V3U FalconKoji Matsuoka1-0/+29
Init GICv3 for V3U Falcon in early phase Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com> Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2021-06-24ARM: renesas: Add generic timer initialization for V3U FalconKoji Matsuoka1-0/+25
Init the Generic Timer for V3U Falcon in early phase Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com> Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2021-06-24ARM: renesas: Add R8A779A0 V3U Falcon board codeHai Pham4-0/+81
Add board code for the R8A779A0 V3U Falcon board. Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> -- Marek: - various small rebase fixes and clean ups
2021-05-12ARM: renesas: Scrub duplicate memory nodes from DT on Gen3Marek Vasut1-0/+80
Scrub duplicate /memory@* node entries here. Some R-Car DTs might contain multiple /memory@* nodes, however fdt_fixup_memory_banks() either generates single /memory node or updates the first /memory node. Any remaining memory nodes are thus potential duplicates. However, it is not possible to delete all the memory nodes right away, since some of those might not be DRAM memory nodes, but some sort of other memory. Thus, delete only the memory nodes which are in the R-Car3 DBSC ranges. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2021-03-02reset: Remove addr parameter from reset_cpu()Harald Seiler22-22/+22
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-15Merge branch '2021-02-02-drop-asm_global_data-when-unused'Tom Rini16-0/+16
- Merge the patch to take <asm/global_data.h> out of <common.h>
2021-02-15sh: Remove sh7763rdp boardTom Rini5-342/+0
This board has not been converted to CONFIG_DM by the deadline of v2020.01 and is missing other conversions which depend on this as well. Remove it. Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2021-02-15sh: Remove sh7757lcr boardTom Rini7-1187/+0
This board has not been converted to CONFIG_DM by the deadline of v2020.01 and is missing other conversions which depend on this as well. Remove it. As this is the last SH4A board, remove that support as well. Cc: Marek Vasut <marek.vasut+renesas@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2021-02-15sh: Remove sh7753evb boardTom Rini6-901/+0
This board has not been converted to CONFIG_DM by the deadline of v2020.01 and is missing other conversions which depend on this as well. Remove it. Signed-off-by: Tom Rini <trini@konsulko.com>
2021-02-15sh: Remove sh7752evb boardTom Rini6-899/+0
This board has not been converted to CONFIG_DM by the deadline of v2020.01 and is missing other conversions which depend on this as well. Remove it. Signed-off-by: Tom Rini <trini@konsulko.com>
2021-02-15sh: Remove r7780mp boardTom Rini6-488/+0
This board has not been converted to CONFIG_DM by the deadline of v2020.01 and is missing other conversions which depend on this as well. Remove it. Patch-cc: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com> Patch-cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2021-02-15sh: Remove MigoR boardTom Rini5-267/+0
This board has not been converted to CONFIG_DM by the deadline of v2020.01 and is missing other conversions which depend on this as well. Remove it. Signed-off-by: Tom Rini <trini@konsulko.com>
2021-02-02common: Drop asm/global_data.h from common headerSimon Glass16-0/+16
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 Glass1-1/+1
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-12-13dm: treewide: Rename auto_alloc_size members to be shorterSimon Glass1-1/+1
This construct is quite long-winded. In earlier days it made some sense since auto-allocation was a strange concept. But with driver model now used pretty universally, we can shorten this to 'auto'. This reduces verbosity and makes it easier to read. Coincidentally it also ensures that every declaration is on one line, thus making dtoc's job easier. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-10-05Merge branch 'next'Tom Rini5-44/+1
Bring in the assorted changes that have been staged in the 'next' branch prior to release. Signed-off-by: Tom Rini <trini@konsulko.com>
2020-09-26board: renesas: ebisu: Drop CA57 check in reset_cpu()Lad Prabhakar1-14/+1
Renesas Ebisu board is based on R-Car E3 SoC which has dual CA53 and a CR7. This patch drops check for cputype from reset_cpu() and also drops the corresponding CA57 macros. While at it also dropped RST_RSTOUTCR macro which is unused. Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
2020-09-26board: renesas: draak: Drop CA57 resetBiju Das1-14/+1
Renesas Draak board based on R-Car D3 has single CA53. This patch drops check for cputype from reset_cpu() and also drops the corresponding CA57 macros. While at it also dropped RST_RSTOUTCR macro which is unused. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
2020-09-26board: renesas: remove empty board_early_init_f functionBiju Das2-10/+0
Remove empty board_early_init_f function, since it is disabled in ebisu and condor board configs. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
2020-09-26board: renesas: Remove empty s_init functionBiju Das5-20/+0
Default s_init weak function available, so remove the s_init empty function. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
2020-08-25ARM: renesas: Drop unnecessary function ft_board_setup()Stefan Roese1-47/+0
Marek explained on IRC, that ft_board_setup() is not used / necessary at all. So its best to just drop it completely, as it interferes with the cleanup of CONFIG_MAX_PCI_REGIONS (completely removed). Signed-off-by: Stefan Roese <sr@denx.de> Suggested-by: Marek Vasut <marek.vasut+renesas@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-07-25ARM: rmobile: Switch back to fdtdec_setup_memory/banksize_fdt()Michal Simek1-2/+2
The commit 361377dbdbc9 ("ARM: rmobile: Merge prior-stage firmware DT fragment into U-Boot DT on Gen3") reverted changes introduced by commit 175f5027345c ("ARM: renesas: Configure DRAM size from ATF DT fragment") that's why there is no reason to use functions with _fdt() suffix because parameter is gd->fdt_blob as is already for functions without _fdt() suffix. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-07-24Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"Tom Rini1-2/+2
This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing changes made to 56d37f1c564107e27d873181d838571b7d7860e7. Unfortunately this is causing CI failures: https://travis-ci.org/github/trini/u-boot/jobs/711313649 Signed-off-by: Tom Rini <trini@konsulko.com>
2020-07-20ARM: rmobile: Switch back to fdtdec_setup_memory/banksize_fdt()Michal Simek1-2/+2
The commit 361377dbdbc9 ("ARM: rmobile: Merge prior-stage firmware DT fragment into U-Boot DT on Gen3") reverted changes introduced by commit 175f5027345c ("ARM: renesas: Configure DRAM size from ATF DT fragment") that's why there is no reason to use functions with _fdt() suffix because parameter is gd->fdt_blob as is already for functions without _fdt() suffix. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>