Commit graph

27194 commits

Author SHA1 Message Date
Jonas Karlman
cf84730409 rockchip: rk3288-firefly: Include sdmmc regulator in SPL
Add bootph props and enable related Kconfig options to include the sdmmc
regulator in SPL. Also enable SPL_DM_SEQ_ALIAS to ensure aliases is
handled correctly in SPL.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
8baa2d8958 rockchip: rk3288-firefly: Include required DT nodes in xPL
Add bootph- props to emmc, sdmmc, uart and related pinctrl nodes to
ensure devices and pinctrl can be used in xPL and U-Boot pre-reloc.

Remove the explicit bootph-all prop from the pinctrl node, any bootph-
prop will automatically be propagated to the pinctrl node.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
14c13f295a rockchip: rk3288-firefly: Use common bss and stack addresses
Migrate to use common bss, stack and malloc heap size and addresses to
unify memory use in TPL, SPL and pre-reloc.

ENV_OFFSET is using the default value of 0x3f8000 and is also dropped.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
20ff82dc51 rockchip: rk3288-firefly: Sort u-boot.dtsi nodes alphabetically
Sort the nodes in rk3288-firefly-u-boot.dtsi in alphabetical order.

This has no intended change to board DT, this only rearrange nodes in
preparation for future changes.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
1e3e3534a9 rockchip: rk3288-firefly: Drop unused SPL_LED related code
The firefly-rk3288_defconfig build target does not enable the SPL_LED
Kconfig option.

Drop the unused SPL_LED related code and replace it with a default-state
prop to ensure the LED driver enable the LED at U-Boot proper phase.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Paul Kocialkowski
95433be7ac rockchip: rk3399-rockpro64: Hook sysreset gpio to enable full reset
The reset mechanism used by Linux to reset the SoC is known to only
partially reset the logic. A mechanism is implemented in
rk3399_force_power_on_reset to use a GPIO connected to the PMIC's
over-temperature (OTP) reset pin, which fully resets all logic.

Hook the associated GPIO where the function expects it to enable this
reset mechanism and avoid any possible side-effect of partially-reset
units.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
2025-01-10 18:56:15 -06:00
Paul Kocialkowski
d7882f556e rockchip: rk3399-roc-pc: Hook sysreset gpio to enable full reset
The reset mechanism used by Linux to reset the SoC is known to only
partially reset the logic. A mechanism is implemented in
rk3399_force_power_on_reset to use a GPIO connected to the PMIC's
over-temperature (OTP) reset pin, which fully resets all logic.

Hook the associated GPIO where the function expects it to enable this
reset mechanism and avoid any possible side-effect of partially-reset
units.

Without this patch, reading from the micro sd slot fails after a reset.
With this mechanism, U-Boot is able to boot from it reliably.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
2025-01-10 18:56:15 -06:00
Jacobe Zang
c990398674 board: rockchip: add Khadas Edge2 RK3588 board
Khadas Edge2 is a Rockchip RK3588S based SBC (Single Board Computer)
by Khadas.

There are tree variants depending on the DRAM size : 8G and 16G.

Specification:

    Rockchip RK3588S SoC
    4x ARM Cortex-A76, 4x ARM Cortex-A55
    8/16GB memory LPDDR4x
    Mali G610MP4 GPU
    3x MIPI CSI 4x lanes
    2x MIPI-DSI DPHY 4x lanes
    32/64GB eMMC
    1x USB 2.0, 1x USB 3.0, 2x USB-Type-C
    1x HDMI 2.1 output, 1x DP 1.4 output
    USB PD over USB Type-C

Kernel commit:
04d552993522 ("arm64: dts: rockchip: Add Khadas edge2 board")

Signed-off-by: Jacobe Zang <jacobe.zang@wesion.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
61f4e5f9cf rockchip: rk3288-miqi: Fix slow Ethernet initializion
For some reason the Ethernet PHY reset delay is set to 1 second, this
cause an unneccecery long boot delay.

MiQi use RTL8211 Ethernet PHY, datasheet list an initial 10ms delay and
then a 30-76ms delay before accessing registers.

Change to use 80ms delay instead of a full second to speed up Ethernet
initializion in U-Boot.

Also enable PHY_REALTEK, DM_ETH_PHY and PHY_GIGE to improve Ethernet PHY
support in U-Boot.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
c33617d3bb rockchip: rk3288-miqi: Migrate to OF_UPSTREAM
The device tree for mqmaker MiQi in dts/upstream can be used as-is by
U-Boot, migrate board to OF_UPSTREAM.

The change to use DT from dts/upstream will include minor changes and
fixes related to work led and usb otg.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
a9ad8e143f rockchip: rk3288-miqi: Include sdmmc regulator in SPL
Add bootph props and enable related Kconfig options to include the sdmmc
regulator in SPL. Also enable SPL_DM_SEQ_ALIAS to ensure aliases is
handled correctly in SPL.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
7e94567e10 rockchip: rk3288-miqi: Include required DT nodes in xPL
Add bootph- props to emmc, sdmmc, uart and related pinctrl nodes to
ensure devices and pinctrl can be used in xPL and U-Boot pre-reloc.

Remove the explicit bootph-all prop from the pinctrl node, any bootph-
prop will automatically be propagated to the pinctrl node.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
68412a237f rockchip: rk3288-miqi: Use TPL with common bss and stack addresses
Migrate to use TPL, common bss, stack and malloc heap size and addresses
to unify memory use in TPL, SPL and pre-reloc.

ENV_OFFSET is using the default value of 0x3f8000 and is also dropped.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
0bcaa88245 rockchip: rk3288-miqi: Remove unused work led node from xPL
The work led is not used in xPL on rk3288-miqi, remove bootph props from
the work led node to exclude it from xPL control FDT.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
98ba08b6c5 rockchip: rk3288-miqi: Sort u-boot.dtsi nodes alphabetically
Sort the nodes in rk3288-miqi-u-boot.dtsi in alphabetical order.

This has no intended change to board DT, this only rearrange nodes in
preparation for future changes.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
57237c7f41 rockchip: rk3288-tinker: Fix slow Ethernet initializion
For some reason the Ethernet PHY reset delay is set to 1 second, this
cause an unneccecery long boot delay.

Tinker Board use RTL8211E or RTL8211F Ethernet PHY, datasheet list an
initial 10ms delay and then a 30-76ms delay before accessing registers.

Change to use 80ms delay instead of a full second to speed up Ethernet
initializion in U-Boot.

Also enable PHY_REALTEK, DM_ETH_PHY and PHY_GIGE to improve Ethernet PHY
support in U-Boot.

Before:

  1,404,971    960,924  eth_common_init
  2,438,830  1,033,859  eth_initialize
  2,444,449      5,619  main_loop
  2,445,153        704  cli_loop

After:

  1,404,987    960,710  eth_common_init
  1,519,110    114,123  eth_initialize
  1,524,734      5,624  main_loop
  1,525,452        718  cli_loop

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
a0a880942b rockchip: rk3288-tinker: Migrate to OF_UPSTREAM
The device tree for ASUS Tinker Board and S variant in dts/upstream can
be used as-is by U-Boot, migrate board to OF_UPSTREAM.

The change to use DT from dts/upstream will include minor changes and
fixes related to leds and regulators.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
826267d3ea rockchip: rk3288-tinker: Use common bss and stack addresses
Migrate to use common bss, stack and malloc heap size and addresses to
unify memory use in TPL, SPL and pre-reloc.

Ensure SYS_MALLOC_F_LEN and TPL variant stay at 0x2000 and is unaffected
on other boards not changed to use common malloc heap size.

ENV_OFFSET is using the default value of 0x3f8000 and is also dropped.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
5b95daa832 rockchip: rk3288-tinker: Include mmc nodes in pre-reloc for env load
Include mmc related nodes in U-Boot proper pre-reloc phase to ensure
environment can be loaded from mmc devices.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
fcd4949192 rockchip: rk3288-tinker: Drop unused vcc_sd regulator from SPL
The sdmmc power come from vcc33_sd pmic regulator and not from the
vcc_sd fixed regulator, as currently defined in the in-tree DT.

Drop vcc_sd and the related gpio7 and sdmmc_pwr nodes from being
included in SPL along with any related Kconfig option. Also enable
SPL_DM_SEQ_ALIAS to ensure aliases is handled correctly in SPL.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
7f13ffa280 rockchip: rk3288-tinker: Only include required DT nodes in TPL
Drop the unneeded bootph-all prop from dmc node, it is already defined
in soc u-boot.dtsi.

Remove booth-all prop from gpio7 node, this node is not needed in TPL.

Adjust bootph props to include pinctrl related nodes for UART2.

Remove the explicit bootph-all prop from the pinctrl node, any bootph-
prop will automatically be propagated to the pinctrl node.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
cabe2ef766 rockchip: rk3288-tinker: Sort u-boot.dtsi nodes alphabetically
Sort the nodes in rk3288-tinker u-boot.dtsi files in alphabetical order.

This has no intended change to board DTs and only rearrange nodes in
preparation for future changes.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
8b6227c229 rockchip: rk3288: Fix bootph prop for vop nodes
The vop nodes does not need to be included in xPL control FDT, they only
need to be included at U-Boot proper pre-reloc phase.

Change to use bootph-some-ram prop to fix this.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Jonas Karlman
934a2d49f8 rockchip: rk3288: Use rk3288.dtsi from dts/upstream
rk3288.dtsi from arch/arm/dts is almost identical to the rk3288.dtsi
from dts/upstream, it differs only with a minor change in hdmi port
nodes, something that does not affect U-Boot.

Remove arch/arm/dts/rk3288.dtsi to use rk3288.dtsi from dts/upstream.
Also drop gpio aliases from -u-boot.dtsi that has been part of
rk3288.dtsi for some time.

No functional change to board DTs is intended with this removal.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-01-10 18:56:15 -06:00
Tom Rini
abc4a9dbfd Merge patch series "Enable MMC UHS modes"
Judith Mendez <jm@ti.com> says:

This patch series adds config options for Sitara K3 boards
to support MMC UHS modes.

While testing with SD card boot and eMMC boot,
found missing eMMC boot support for am62ax in am62a7_init,
patch 1/7, and missing config option to support eMMC boot.

While we are here, for am62ax, enable config option to
change MMC bus modes and enable r5 SDHCI ADMA for faster boot
time.

Also for all k3 Sitara boards, cleanup MMC ENV configs that
are no longer needed since we no longer load env from MMC
device.

Link: https://lore.kernel.org/r/20241220203704.2076499-1-jm@ti.com
2025-01-08 11:58:54 -06:00
Vignesh Raghavendra
aa14b5ec13 mach-k3: am62a7_init: Add FS and raw mode for eMMC
This adds FS and raw boot mode support for eMMC similar to other K3
platforms.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2025-01-02 11:05:38 -06:00
Tom Rini
43cae09eab Merge patch series "Fix OSPI boot for J722S"
Prasanth Babu Mantena <p-mantena@ti.com> says:

This series fixes OSPI boot for J722S. It contains fixes for DMSC
communication, R5 regmap for ospi and dma specific overrides for ospi.

Test log: https://gist.github.com/PrasanthBabuMantena/ad469dd09ab7263f85f87dadda46c86d

Link: https://lore.kernel.org/r/20241218131341.2073823-1-p-mantena@ti.com
2024-12-31 17:55:03 -06:00
Udit Kumar
d4749f55f2 arm: dts: k3-j721e-beagleboneai: Move to OF_UPSTREAM
Move to using OF_UPSTREAM config and thus using the devicetree
subtree and remove unused device tree files.

Signed-off-by: Udit Kumar <u-kumar1@ti.com>
Acked-by: Sumit Garg <sumit.garg@linaro.org>
2024-12-31 17:55:02 -06:00
Bryan Brattlof
8fa355d822 arm: dts: k3-am62p-sk-binman: add SE security variant builds
The Texas Instruments Foundational Security (TIFS) firmware must match
the security level configured on the SoC. To boot Security Enforced (SE)
variants of the AM62Px, add another tiboot3 build which packages the
Security Enforced (SE) firmware variant for AM62Px SoCs.

Signed-off-by: Bryan Brattlof <bb@ti.com>
2024-12-31 17:55:02 -06:00
Vaishnav Achath
1c4eeff48c arm: dts: k3-j722s*: Add overrides specific to OSPI
OSPI Boot requires overrides specific to R5 and also
to use DMA in R5 SPL stage the DM_TIFS needs to be used.
Add the corresponding overrides for R5 SPL stage.

Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com>
Signed-off-by: Prasanth Babu Mantena <p-mantena@ti.com>
Reviewed-by: Udit Kumar <u-kumar1@ti.com>
2024-12-31 15:24:26 -06:00
Vaishnav Achath
ed89c75771 arm: mach-k3: j722_spl: Add FAST XSPI boot mode
Fast XSPI boot mode is supported by J722S ROM, add that.

Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com>
Signed-off-by: Prasanth Babu Mantena <p-mantena@ti.com>
Reviewed-by: Udit Kumar <u-kumar1@ti.com>
2024-12-31 15:24:26 -06:00
Vaishnav Achath
e259004382 arm: dts: k3-j722s-r5-evm: Fix DM2TIFS secproxy thread ID
Fix the DM2TIFS secureproxy thread ID as per the latest TISCI
documentation for J722S.
https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/j722s/sec_proxy.html

Fixes: fc2da3a3d0 ("arm: dts: Introduce J722S U-Boot dts files")
Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com>
Signed-off-by: Prasanth Babu Mantena <p-mantena@ti.com>
Reviewed-by: Udit Kumar <u-kumar1@ti.com>
2024-12-31 15:24:26 -06:00
Tom Rini
9df4458918 Merge patch series "Cumulative fixes and updates for MediaTek ethernet driver"
Weijie Gao <weijie.gao@mediatek.com> says:

This patch series contains fixes and updates for mtk_eth driver.

Link: https://lore.kernel.org/r/cover.1734406967.git.weijie.gao@mediatek.com
2024-12-31 10:59:06 -06:00
Weijie Gao
ba365c3d23 arm: dts: mt7629: fix sgmii clock selection for ethernet
Setup correct parent of clock CLK_TOP_SGMII_REF_1_SEL to allow
sgmiisys1 work correctly.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2024-12-31 10:58:52 -06:00
Tom Rini
f4e8711965 Merge patch series "Select CONFIG_64BIT for sandbox64 and x86_64"
Andrew Goodbody <andrew.goodbody@linaro.org> says:

Picking up a series from Dan Carpenter and applying requested
changes for v2.

I had previously set CONFIG_64BIT for arm64.  This patchset does the
same thing for sandbox and x86_64.  (Mips and riscv were already
doing it).  This CONFIG option is used in the Makefile to determine
if it's a 32 or 64 bit system for the CHECKER.

Makefile
  1052  # the checker needs the correct machine size
  1053  CHECKFLAGS += $(if $(CONFIG_64BIT),-m64,-m32)

Link: https://lore.kernel.org/r/20241216180736.1933807-1-andrew.goodbody@linaro.org
2024-12-31 10:58:36 -06:00
Andrew Goodbody
99145eec2d x86: select CONFIG_64BIT for X86_64
Select CONFIG_64BIT so that we pass the -m64 option (instead of -m32) to
static analysis tools.
Introduce CONFIG_SPL_64BIT and select it for architectures other than
x86 with 64 bit builds. Do not select it for x86 builds as x86 uses
a 32 bit SPL.
Ensure that when limits are set they use CONFIG_64BIT for U-Boot
proper and CONFIG_SPL_64BIT for SPL. This is to allow for the 32 bit
SPL build used by x86.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
2024-12-31 10:58:30 -06:00
Andrew Goodbody
bcb9b3524a sandbox: select CONFIG_64BIT for sandbox
Select CONFIG_64BIT so that we pass the -m64 option (instead of -m32) to
static analysis tools.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
2024-12-31 10:58:30 -06:00
Andrew Goodbody
99afa58e6d sandbox: Correct guard around readq/writeq
In include/linux/io.h the declarations of ioread64 and iowrite64
which make use of readq/writeq are guarded with CONFIG_64BIT so
guard the sandbox declarations of readq and writeq also with
CONFIG_64BIT.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
2024-12-31 10:58:30 -06:00
Tom Rini
ad09ccf7fe Merge patch series "Misc. PowerPC MPC83xx fixes/cleanups"
J. Neuschäfer <j.ne@posteo.net> says:

This patchset contains a few small fixes/cleanups for the MPC83xx
platform.

Link: https://lore.kernel.org/r/20241220-mpc83xx-misc-v2-0-ff4c17ee5fa4@posteo.net
2024-12-30 15:55:33 -06:00
J. Neuschäfer
ba26b1d0fb powerpc: mpc83xx: Use defined constant for SPCR[TBEN]
To increase readability, use the defined constant instead of specifying
SPCR[TBEN] as a number.

Reviewed-by: Sinan Akman <sinan@writeme.com>
Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
2024-12-30 15:55:27 -06:00
J. Neuschäfer
b3e8c67a91 powerpc: mpc83xx: Allow including initreg.h into multiple files
Globals defined in headers can result in multiple-definition errors
while linking, if they are visible beyond the current translation unit.

This hasn't been a problem for initreg.h so far, but would become a
problem in the next patch, where I use a constant from initreg.h in a
second C file.

Reviewed-by: Sinan Akman <sinan@writeme.com>
Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
2024-12-30 15:55:27 -06:00
Tom Rini
c379590ab7 Merge patch series "powerpc: Fix and enforce distinction between immediates and registers"
J. Neuschäfer <j.ne@posteo.net> says:

This patchset changes the definition r0 etc. to %r0, so that the
assembler can check that registers are only used where expected, and
fixes the fallout.

Link: https://lore.kernel.org/r/20241212-gpr-checks-v1-0-8c084c5fc0b6@posteo.net
2024-12-30 15:55:11 -06:00
J. Neuschäfer
c3e425ead4 powerpc: Introduce and enforce assembler checks on GPR usage
PowerPC general-purpose registers are historically specified as plain
numbers (0-31), which makes them hard to distinguish from immediates.
For this reason, include/ppc_asm.tmpl defines aliases named r0-r31.
This can still lead to uncaught mistakes if a register is used in place
of a number.

Instead of (e.g.) 5 use %r5, which will result in an assembler warning
if used as a number. Turn these warnings into errors by passing
`--fatal-warnings` to the assembler.

I verified with gazerbeam_defconfig (MPC83xx) and qemu-ppce500_defconfig
(MPC85xx) that this patch results in the same machine code.

Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
2024-12-30 15:55:07 -06:00
J. Neuschäfer
fd1c2938c0 powerpc: Fix 0 vs. r0 confusion in X/D-form instructions
Instructions such as dcbi are in the X-form; they have RA and RB fields
and the effective address (EA) is computed as (RA|0)+(RB). In words,
this means that if RA is zero, the left-hand side of the addition is
zero, otherwise the corresponding GPR is used. r0 can never be used on
the left-hand side of a X-form instruction.

For D-form instructions such as addis, the Power ISA illustrates this in
the instruction pseudo-code:

	if RA = 0 then RT <-        EXTS(SI || 0x0000)
	else           RT <- (RA) + EXIS(SI || 0x0000)

In all of these cases, RA=0 indicates the value zero, not register r0.

I verified with gazerbeam_defconfig (MPC83xx) and qemu-ppce500_defconfig
(MPC85xx) that this patch results in the same machine code.

Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
2024-12-30 15:55:07 -06:00
Ilias Apalodimas
900a8951c3 lmb: Remove lmb_reserve_flags()
lmb_reserve() is just calling lmb_reserve_flags() with LMB_NONE.
There's not much we gain from this abstraction.
So let's remove the latter, add the flags argument to lmb_reserve()
and make the code a bit easier to follow.

Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Tested-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-12-30 13:21:55 -06:00
Tom Rini
7f296a9a70 Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-sh into next 2024-12-30 12:55:39 -06:00
Marek Vasut
c8533359f6 arm64: dts: renesas: Add R8A779G0 V4H remoteproc DT node
Describe APMU controller as a remoteproc device capable of starting
the Cortex-R52 cores in Renesas R8A779G0 V4H SoC DT. The APMU IP is
in fact a power management unit capable of additional operations, but
those are not used by U-Boot so far.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-29 16:55:31 +01:00
Marek Vasut
5769328fab remoteproc: renesas: Add Renesas R-Car Gen4 remote processor driver
Add R-Car Gen4 APMU controller remoteproc driver capable of starting
the Cortex-R52 cores in Renesas R8A779G0 V4H/V4M SoC. The APMU IP is
in fact a power management unit capable of additional operations, but
those are not used by U-Boot so far.

This requires slight adjustment to the SPL entry point code, as that
is being executed on the Cortex-R52 #0 and the Cortex-R52 #0 enters an
endless loop once it starts the rest of the SPL on Cortex-A76 core.
The endless loop now checks for content of APMU CRBARP registers and
tests whether valid VLD_BARP and BAREN_VALID bits are set, if so, the
Cortex-R52 core exits the endless loop and jumps to address started
in CRBARP[31:18] register in ARM mode, which is a trampoline code to
jump to the final entry point.

The trampoline code is in place to avoid limitation of CRBARP[31:18]
address field, which limits the core start address to memory addresses
aligned to 0x40000 or 256 kiB . The trampoline is placed at 0x40000
aligned address and jumps to the final entry point, which can be at
an address with arbitrary alignment at instruction granularity.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-29 16:55:31 +01:00
Marek Vasut
eaf2ed4eb4 arm64: dts: renesas: Drop OF_UPSTREAM conversion remnant
This DTC_FLAGS assignment is no longer necessary as all R-Car Gen2/Gen3/Gen4
platforms have been converted to OF_UPSTREAM and matching DTC_FLAGS assignment
is present in dts/upstream/src/arm64/Makefile . Drop the remnant.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-29 16:55:31 +01:00
Marek Vasut
2fd7a04e7c arm64: renesas: Align configuration headers
Align R-Car Gen2/Gen3/Gen4 configuration header file to look
basically the same way across these three SoC generations.
There are subtle difference between the remaining bits in
those files across SoC generations, but the common bits are
now aligned. There is not much left in those headers either,
most of the configuration is now converted to Kconfig.

Specifically for R-Car Gen3, GIC registers have been moved
to architecture specific header file rcar-gen3-base.h , the
rest of the changes here are comment changes and indentation
changes.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-29 16:55:31 +01:00