Jonas Karlman [Tue, 5 Nov 2024 21:51:43 +0000 (21:51 +0000)]
rockchip: rk3288-miqi: Drop use of silent console and late boardinfo
Current use of SILENT_CONSOLE hide valuable information when something
goes wrong during boot, drop this Kconfig option to allow user to see
e.g. from what media U-Boot proper is loaded from.
A second Model line is printed on console due to DISPLAY_BOARDINFO_LATE,
drop this Kconfig option to remove the second redundant line.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Jonas Karlman [Tue, 5 Nov 2024 21:51:42 +0000 (21:51 +0000)]
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>
Jonas Karlman [Tue, 5 Nov 2024 21:51:41 +0000 (21:51 +0000)]
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>
Jonas Karlman [Tue, 5 Nov 2024 21:51:40 +0000 (21:51 +0000)]
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>
Jonas Karlman [Tue, 5 Nov 2024 21:51:39 +0000 (21:51 +0000)]
rockchip: rk3288-miqi: Set ethaddr env based on cpuid
Enable Kconfig options to read cpuid from efuse and set cpuid#, serial#
and ethaddr env vars based on the value read from efuse.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Jonas Karlman [Tue, 5 Nov 2024 21:51:38 +0000 (21:51 +0000)]
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>
Jonas Karlman [Tue, 5 Nov 2024 21:51:37 +0000 (21:51 +0000)]
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>
Jonas Karlman [Tue, 5 Nov 2024 16:00:36 +0000 (16:00 +0000)]
rockchip: rk3288-tinker: Change to use FIT
Change to use FIT and FIT_SIGNATURE when loading U-Boot proper in SPL to
allow checksum validation and fallback loading of FIT from a different
mmc device.
Checksum validation of FIT adds around 140 ms to boot time:
Before:
Mark Elapsed Stage
0 0 reset
13 13 TPL
6,957 6,944 end tpl
25,102 18,145 SPL
131,932 106,830 end phase
132,137 205 board_init_f
444,277 312,140 board_init_r
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
After:
Mark Elapsed Stage
0 0 reset
13 13 TPL
6,957 6,944 end tpl
35,744 28,787 SPL
271,220 235,476 end phase
271,420 200 board_init_f
588,474 317,054 board_init_r
1,548,950 960,476 eth_common_init
1,663,105 114,155 eth_initialize
1,668,734 5,629 main_loop
1,669,417 683 cli_loop
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Jonas Karlman [Tue, 5 Nov 2024 16:00:35 +0000 (16:00 +0000)]
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>
Jonas Karlman [Tue, 5 Nov 2024 16:00:34 +0000 (16:00 +0000)]
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>
Jonas Karlman [Tue, 5 Nov 2024 16:00:33 +0000 (16:00 +0000)]
rockchip: rk3288-tinker: Drop USE_PREBOOT Kconfig option
After the migration to use standard boot, storage media should
automatically be initialized in the order listed in boot_targets env.
Drop USE_PREBOOT to speed up boot with ~12 seconds when booting from
e.g. SD-card or eMMC.
Before:
3,048,599 2,056 main_loop
3,050,717 2,118 usb_start
15,070,499 12,019,782 cli_loop
After:
3,058,244 2,054 main_loop
3,063,260 5,016 cli_loop
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Jonas Karlman [Tue, 5 Nov 2024 16:00:32 +0000 (16:00 +0000)]
rockchip: rk3288-tinker: Drop use of silent console and late boardinfo
Current use of SILENT_CONSOLE hide valuable information when something
goes wrong during boot, drop this Kconfig option to allow user to see
e.g. from what media U-Boot proper is loaded from.
A second Model line is printed on console due to DISPLAY_BOARDINFO_LATE,
drop this Kconfig option to remove the second redundant line.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Jonas Karlman [Tue, 5 Nov 2024 16:00:31 +0000 (16:00 +0000)]
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>
Jonas Karlman [Tue, 5 Nov 2024 16:00:30 +0000 (16:00 +0000)]
rockchip: rk3288-tinker: Sync defconfig options from rk3288-tinker-s
Add missing Kconfig options used by the rk3288-tinker-s variant.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Jonas Karlman [Tue, 5 Nov 2024 16:00:29 +0000 (16:00 +0000)]
rockchip: rk3288-tinker: Set cpuid and serial env var
Enable MISC_INIT_R and ROCKCHIP_EFUSE to read cpuid from efuse and set
the cpuid# and serial# env vars.
Change to read mac address from eeprom in rockchip_early_misc_init_r()
to ensure the ethaddr env var is set before rockchip_setup_macaddr() try
to set ethaddr based on cpuid.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Jonas Karlman [Tue, 5 Nov 2024 16:00:28 +0000 (16:00 +0000)]
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>
Jonas Karlman [Tue, 5 Nov 2024 16:00:27 +0000 (16:00 +0000)]
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>
Jonas Karlman [Tue, 5 Nov 2024 16:00:26 +0000 (16:00 +0000)]
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>
Jonas Karlman [Tue, 5 Nov 2024 16:00:25 +0000 (16:00 +0000)]
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>
Jonas Karlman [Tue, 5 Nov 2024 16:00:24 +0000 (16:00 +0000)]
board: rockchip: rk3288-tinker: Add myself as reviewer to MAINTAINERS
Add myself as a reviewer for Tinker Board and S variant so that I can
help with review and testing of defconfig and device tree changes.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Jonas Karlman [Mon, 4 Nov 2024 20:25:40 +0000 (20:25 +0000)]
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>
Jonas Karlman [Sat, 9 Nov 2024 21:04:12 +0000 (21:04 +0000)]
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>
Jonas Karlman [Sat, 9 Nov 2024 21:04:10 +0000 (21:04 +0000)]
rockchip: clk: rk3288: Drop use of SCLK_MAC_PLL
The SCLK_MAC_PLL id is not exported or referenced upstream. It is also
not referenced in vendor U-Boot or vendor kernel 4.4, 4.19, 5.10 or 6.1.
Relax the check for parent id SCLK_MAC_PLL when using internal clock
source for gmac to allow use of clock/rk3288-cru.h from dts/upstream.
All in-tree and upstream rk3288 DTs use an external clock as parent,
so no functional change to boards is expected with this change.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Jonas Karlman [Sat, 9 Nov 2024 21:04:09 +0000 (21:04 +0000)]
rockchip: rk3288: Use rk3288-power.h from dts/upstream
power/rk3288-power.h in include/dt-bindings is identical to the version
in dts/upstream, remove the copy from include/dt-bindings to only use
the version from dts/upstream.
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>
Tom Rini [Thu, 9 Jan 2025 17:10:18 +0000 (11:10 -0600)]
Merge tag 'tpm-master-
07012025' of https://source.denx.de/u-boot/custodians/u-boot-tpm
A few changes for the TPM subsystem wrt to EventLong creation and measurements.
Generally speaking it's insecure for a TPM to not cap all the active PCRs
when performing measurements.
Up to now we had code querying the active PCR banks on the fly and reason
whether it should perform a measurement or not. Since a TPM requires a reset
to change the active PCR banks, it's easier and faster to store them in an
array in the device private data and check against that.
This relates to an interesting feature some bootloaders have. For example
TF-A can't extend a PCR since it has no TPM drivers, but can produce an
EventLog that U-Boot can replay on the hardware once that comes up.
The supported hash algorithms of the TF-A generated Eventlog are generated
at compile time. When trying to replay an EventLog the TPM active PCR banks
and the created EventLog algorithms must agree. We used to report an error
but that changed in commit
97707f12fdab ("tpm: Support boot measurements").
This PR also brings up the old behavior and an error is reported now while
printing a human readable list of the mismatched algorithms.
Heinrich Schuchardt [Fri, 27 Dec 2024 12:25:41 +0000 (14:25 +0200)]
tpm: update descriptions in tpm headers
* Provide a link to 'TPM 2.0 Library Specification'
* Remove outdated comment for TPM2_NUM_PCR_BANKS.
The value 16 can be found in the current standard
TCG TSS 2.0 Overview and Common Structures Specification 1.0, rev 10
* Describe some of the structures in Sphinx style.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tom Rini [Thu, 9 Jan 2025 00:05:51 +0000 (18:05 -0600)]
Merge tag 'efi-next-
20250105' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request efi-next-
20250105
Documentation:
* doc: develop: Fix typos and wording in binman/binman.rst
* doc: develop: Fix typos and wording in gdb.rst
* doc: sandbox: Fix the "sb" command name
* doc/develop/distro.rst: Better document upstream definition of extlinux.conf
UEFI:
* efi_loader: avoid writing message in Exit() boot service
* efi_loader: update EFI specification version
* cmd: efidebug: update output of memory attributes
* efi_loader: Don't warn if the TCG2 FinalEvents table is not installed
* cmd: bootmenu: add parameter -e for UEFI boot options
* efi_loader: Update startimage_exit self-test to check error
* efi: Correct ECPT table GUID
Others:
Building the API demo application for riscv64 is supported.
* API: unify platform_sys_info() implementations
* examples: implement _start and syscall for RISC-V
* examples: use architecture specific memset() on RISC-V
* examples: use QEMU compatible LOAD_ADDR on RISC-V
* test: fix test_extension.py
* configs: sandbox_deconfig: remove CONFIG_AMIGA_PARTITION
* CI: xilinx_versal_virt: disable USB_DWC3
* net: eth_bootdev_hunt() should not run DHCP
Tom Rini [Wed, 8 Jan 2025 20:19:22 +0000 (14:19 -0600)]
Merge branch 'next'
Tom Rini [Thu, 2 Jan 2025 17:08:00 +0000 (11:08 -0600)]
Merge patch series "cmd: Add support for optee commands."
Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> says:
Add the basic 'hello world ta' command which increments the value passed.
This provides easy test for establishing a session with OP-TEE TA and verify.
It includes following subcommands:
optee hello
optee hello <value>; value to increment via OP-TEE HELLO WORLD TA.
Link: https://lore.kernel.org/r/20241219043918.1646095-1-venkatesh.abbarapu@amd.com
Tom Rini [Thu, 2 Jan 2025 17:07:42 +0000 (11:07 -0600)]
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
Raymond Mao [Tue, 24 Dec 2024 16:01:13 +0000 (08:01 -0800)]
tpm: add kconfig control in tcg2_create_digest()
To allow disabling algorithms for tcg2, in function
tcg2_create_digest(), each hash algorithm operations should under
the hash kconfig control to avoid building errors when the algorithm
is disabled.
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Ilias Apalodimas [Tue, 24 Dec 2024 16:01:12 +0000 (08:01 -0800)]
tpm: Don't replay an EventLog if tcg2_log_parse() fails
We used to stop replaying an EventLog if parsing failed, but that got
lost in commit
97707f12fdab ("tpm: Support boot measurements").
When an EventLog is passed yo us from a previous bootloader, we want to
validate it as much as we can and make sure the defined PCR banks of
the log exist in our TPM and firmware so we can replay it if needed or
use it as-in, in case the PCRs are already extended.
So let's add the checks back and while at it simplify the logic of
rejecting an EventLog.
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Ilias Apalodimas [Tue, 24 Dec 2024 16:01:11 +0000 (08:01 -0800)]
tpm: Simplify tcg2_log_init()
A previous patch is storing the active PCR banks on the TPM private
data. Instead of parsing them on the fly use the stored values.
This allows us to simplify our checks during the log creation and
parsing.
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Ilias Apalodimas [Tue, 24 Dec 2024 16:01:10 +0000 (08:01 -0800)]
tpm: Simplify tcg2_create_digest()
A previous patch is storing the active PCR banks on the TPM private
data. Instead of parsing them on the fly use the stored values.
This allows us to simplify our checks during the log creation and
parsing.
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Ilias Apalodimas [Tue, 24 Dec 2024 16:01:09 +0000 (08:01 -0800)]
tpm: Keep the active PCRs in the chip private data
We have a lot of code trying to reason about the active TPM PCRs
when creating an EventLog. Since changing the active banks can't
be done on the fly and requires a TPM reset, let's store them
in the chip private data instead.
Upcoming patches will use this during the EventLog creation.
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Ilias Apalodimas [Tue, 24 Dec 2024 16:01:08 +0000 (08:01 -0800)]
tpm: Don't create an EventLog if algorithms are misconfigured
We already check the active banks vs what U-Boot was compiled with when
trying to extend a PCR and we refuse to do so if the TPM active ones
don't match the ones U-Boot supports.
Do the same thing for the EventLog creation since extending will fail
anyway and print a message so the user can figure out the missing
algorithms.
Co-developed-by: Raymond Mao <raymond.mao@linaro.org>
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Raymond Mao [Tue, 24 Dec 2024 16:01:07 +0000 (08:01 -0800)]
tpm: add flag in hash_algo_list and API to check if algorithm is supported
Add a bool var into hash_algo_list to indicate whether the algorithm
is supported or not and move the IS_ENABLED to only cover this var.
So that we can have the name, hash, mask and size no matter the
digest kconfigs are enabled or not.
In before, tpm2_algorithm_to_len() and tcg2_algorithm_to_mask() are used to
identify an unsupported algorithm when they return 0.
It is not the case now when hash_algo_list always provides algorithm size
and mask, thus a new API is introduced to check if an algorithm is
supported by U-Boot.
Suggested-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Raymond Mao [Tue, 24 Dec 2024 16:01:06 +0000 (08:01 -0800)]
tpm: refactor tcg2_get_pcr_info()
Rename the arguments of tcg2_get_pcr_info() to clarify
they are bank masks, not PCR mask.
Remove the unused local variable.
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Ilias Apalodimas [Tue, 24 Dec 2024 16:01:05 +0000 (08:01 -0800)]
tpm: Rename tpm2_allow_extend()
When that function was introduced we were only using it to check if
extending a PCR was allowed, so the name made sense. A few patches ago
we used that function to reason about the EventLog creation and general
usage of PCRs , so let's rename it to something more generic that makes
more sense in all contexts.
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Ilias Apalodimas [Tue, 24 Dec 2024 16:01:04 +0000 (08:01 -0800)]
tpm: Rename tpm2_is_active_pcr()
This function is checking for active PCR banks, so rename it
to something that's easier to read and closer to what the function
does.
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tom Rini [Tue, 7 Jan 2025 00:54:44 +0000 (18:54 -0600)]
Prepare v2025.01
Signed-off-by: Tom Rini <trini@konsulko.com>
Yang Gang [Fri, 3 Jan 2025 08:18:42 +0000 (16:18 +0800)]
efi: Correct ECPT table GUID
Refer to UEFI specification 2.10:
#define EFI_CONFORMANCE_PROFILES_TABLE_GUID \
{ 0x36122546, 0xf7e7, 0x4c8f, \
{ 0xbd, 0x9b, 0xeb, 0x85, 0x25, 0xb5, 0x0c, 0x0b }}
Signed-off-by: Yang Gang <yanggang@byosoft.com.cn>
Fixes:
6b92c1735205 ("efi: Create ECPT table")
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tom Rini [Sat, 21 Dec 2024 17:45:29 +0000 (11:45 -0600)]
doc/develop/distro.rst: Better document upstream definition of extlinux.conf
First, the "Boot Loader Specification" link has moved to a new location,
so link to that directly. Second, that link does not document as much of
the extlinux.conf format as I recall the old version doing at least.
However, the Syslinux Project wiki is the current location of the documentation
linked to in doc/README.pxe and also has a reference for SYSLINUX. Link
to both of these.
Signed-off-by: Tom Rini <trini@konsulko.com>
Heinrich Schuchardt [Fri, 13 Dec 2024 09:20:32 +0000 (10:20 +0100)]
cmd: efidebug: update output of memory attributes
* add EFI_MEMORY_CPU_CRYPTO, EFI_MEMORY_HOT_PLUGGABLE
* correct output for EFI_MEMORY_XP
* remove duplicate list entry for EFI_MEMORY_UC
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Fri, 13 Dec 2024 08:58:40 +0000 (09:58 +0100)]
efi_loader: update EFI specification version
UEFI specification 2.11 has been published.
There are no changes relevant for the U-Boot scope.
So let us update the supported specification version.
Change the comment for the constant to Sphinx style.
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Adriano Cordova [Fri, 6 Dec 2024 17:18:34 +0000 (14:18 -0300)]
efi_loader: Expose efi_reinstall_protocol_interface in efi_loader.h
This is done so that the device path protocol interface of the network
device can be changed internally by u-boot when a new bootfile gets
downloaded.
Signed-off-by: Adriano Cordova <adriano.cordova@canonical.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Olivier L'Heureux [Wed, 4 Dec 2024 22:31:00 +0000 (23:31 +0100)]
doc: sandbox: Fix the "sb" command name
The command name was "sbi" instead of "sb" in "doc/usage/cmd/sb.rst",
the file documenting the "sb" command. It is annoying, because the
index in the left panel on the
<https://docs.u-boot.org/en/latest/usage/cmd/sb.html> page shows no
"sb" command, which makes difficult to navigate to the "sb"
documentation.
Fixed the command name: "sbi" -> "sb".
Fixes:
ec6d30649cd5 (doc: sandbox: Add docs for the sb command, 2024-10-28)
Signed-off-by: Olivier L'Heureux <olivier.lheureux@mind.be>
Reviewed-by: Simon Glass <sjg@chromium.org>
Lothar Rubusch [Wed, 4 Dec 2024 18:33:13 +0000 (18:33 +0000)]
doc: develop: Fix typos and wording in gdb.rst
Fix some typos and duplicate words in gdb.rst.
Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com>
Acked-by: Alexander Dahl <ada@thorsis.com>
Lothar Rubusch [Wed, 4 Dec 2024 18:33:12 +0000 (18:33 +0000)]
doc: develop: Fix typos and wording in binman/binman.rst
Fix some typos and duplicate words in binman.rst.
Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 1 Dec 2024 15:24:25 +0000 (08:24 -0700)]
efi_loader: Update startimage_exit self-test to check error
Check for an error returned from the decompress() function, just in
case.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Aleksandar Gerasimovski [Fri, 29 Nov 2024 21:09:44 +0000 (21:09 +0000)]
efi_loader: fix pe reloc pointer overrun
The fix provided by
997fc12ec91 is actually introducing
a buffer overrun, and the overrun is effective if the
memory after the reloc section is not zeroed.
Probably that's why this bug is not always noticeable.
The problem is that 8-bytes 'rel' pointer can be 4-bytes aligned
according to the PE Format, so the actual relocate function can
take values after the reloc section.
One example is the following dump from the reloc section:
bce26000: 3000 0000 000c 0000 0000 0000 0000 0000
bce26010: 7c00 9340 67e0 f900 1c00 0ea1 a400 0f20
This section has two relocations at offset
bce26008 and
bce2600a,
however the given size (rel_size) for this relocation is 16-bytes
and this is coming form the efi image Misc.VirtualSize, so in this
case the 'reloc' pointer ends at affset
bce2600c and is taken as
valid and this is where the overflow is.
In our system we see this problem when we are starting the
Boot Guard efi image.
This patch is fixing the overrun while preserving the fix done
by
997fc12ec91.
Signed-off-by: Aleksandar Gerasimovski <aleksandar.gerasimovski@belden.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Ilias Apalodimas [Thu, 28 Nov 2024 07:11:20 +0000 (09:11 +0200)]
efi_loader: Don't warn if the TCG2 FinalEvents table is not installed
When the TCG2 protocol installation fails, we are trying to remove
all the objects we created in tcg2_uninit().
However, there are cases when this function runs before the config
table was installed. So instead of printing an error unconditionally
check against EFI_NOT_FOUND and don't print anything if the table wasn't
installed to begin with.
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Heinrich Schuchardt [Wed, 27 Nov 2024 07:06:30 +0000 (08:06 +0100)]
cmd: bootmenu: add parameter -e for UEFI boot options
The bootmenu command can display
* menu entries defined by environment variables
* menu entries defined by UEFI boot options
Not in all cases showing the UEFI boot options is desired.
Provide a new parameter '-e' to select the display of UEFI boot options.
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Wed, 27 Nov 2024 07:06:29 +0000 (08:06 +0100)]
net: eth_bootdev_hunt() should not run DHCP
Currently when booting dhcp_run() may be executed multiple times:
once in eth_bootdev_hunt() and once in the network booting bootmeth.
We need to call eth_bootdev_hunt() when setting up the EFI sub-system to
supply the simple network protocol. We don't need an IP address set up.
We can reduce the bootime by not executing dhcp_run() in
eth_bootdev_hunt().
Furthermore eth_bootdev_hunt() with autostart=yes leads on the legacy
network stack leads to downloading a file via TFTP and to booting the
downloaded file.
Instead of running dchp_run() just check that there is a network device
in eth_bootdev_hunt().
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Heinrich Schuchardt [Wed, 27 Nov 2024 07:06:28 +0000 (08:06 +0100)]
CI: xilinx_versal_virt: disable USB_DWC3
The CI uses the following command to launch xilinx_versal_virt_defconfig:
qemu-system-aarch64 -M xlnx-versal-virt \
-display none -m 4G -serial mon:stdio \
-device loader,file=u-boot,cpu-num=0
'usb start' or invoking eth_bootdev_hunt leads to a crash when function
dwc3_core_init() tries to access a register at offset 0xc704 (DWC3_DCTL)
relative to the register start address 0xfe20c100.
Disable CONFIG_USB_DWC3 in the CI until the driver problem is fixed.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Wed, 27 Nov 2024 07:06:27 +0000 (08:06 +0100)]
configs: sandbox_deconfig: remove CONFIG_AMIGA_PARTITION
We do not actually test the code.
Scanning for Amiga partitions of the sandbox is extremely slow,
especially on the partially implemented USB device.
For build testing the other sandbox defconfigs are good enough.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Heinrich Schuchardt [Wed, 27 Nov 2024 07:06:26 +0000 (08:06 +0100)]
test: fix test_extension.py
test_extension.py assumes that no extension is known at test start.
This assumption is wrong because we do not come out of reboot.
A prior test may have already hunted for the extension bootdev.
Remove the invalid assert.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Tue, 26 Nov 2024 23:40:17 +0000 (00:40 +0100)]
efi_loader: avoid writing message in Exit() boot service
We should not write messages in UEFI API functions. This may lead to
incorrect screen layout in UEFI application.
For single statements after if clause we don't need braces.
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Sat, 23 Nov 2024 08:47:54 +0000 (09:47 +0100)]
examples: use QEMU compatible LOAD_ADDR on RISC-V
On some RISC-V including QEMU $loadaddr is 0x80200000.
For bootelf to work choose a different LOAD_ADDR to which the demo ELF
binary is relocated.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Sat, 23 Nov 2024 08:47:53 +0000 (09:47 +0100)]
examples: use architecture specific memset() on RISC-V
Build the architecture specific memset() if configured.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Sat, 23 Nov 2024 08:47:52 +0000 (09:47 +0100)]
examples: implement _start and syscall for RISC-V
To build the API examples on RISC-V we need to
implement _start and syscall for RISC-V.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Sat, 23 Nov 2024 08:47:51 +0000 (09:47 +0100)]
API: unify platform_sys_info() implementations
ARM, MIPS, and RISCV can use the same implementation of
platform_sys_info(). PPC provides some extra information.
So keep it separate.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Venkatesh Yadav Abbarapu [Thu, 19 Dec 2024 04:39:18 +0000 (10:09 +0530)]
doc: man-page for optee commands
Provide a man-page for the optee command.
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Venkatesh Yadav Abbarapu [Thu, 19 Dec 2024 04:39:17 +0000 (10:09 +0530)]
cmd: Add support for optee commands
Add the basic 'hello world ta' command which increment
of the value passed. This provides easy test for
establishing a session with OP-TEE TA and verify.
It includes following "hello world ta" subcommands:
optee hello; default value '0' is passed and gets incremented.
optee hello <value>; value to increment via OP-TEE HELLO
WORLD TA.
To enable the OP-TEE side HELLO WORLD example please refer
https://optee.readthedocs.io/en/latest/building/gits/optee_examples/optee_examples.html
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Judith Mendez [Fri, 20 Dec 2024 20:37:04 +0000 (14:37 -0600)]
configs: am62ax_evm_a53_defconfig: Enable SUPPORT_EMMC_BOOT
Enable SUPPORT_EMMC_BOOT to help support eMMC boot on am62ax
device.
Signed-off-by: Judith Mendez <jm@ti.com>
Judith Mendez [Fri, 20 Dec 2024 20:37:03 +0000 (14:37 -0600)]
configs: am62ax_evm_a53_defconfig: Enable MMC_SPEED_MODE_SET
Enable MMC_SPEED_MODE_SET config option in defconfig to enable
changing MMC bus modes with mmc rescan for am62ax device.
Signed-off-by: Judith Mendez <jm@ti.com>
Judith Mendez [Fri, 20 Dec 2024 20:37:02 +0000 (14:37 -0600)]
configs: am62ax_evm_r5_defconfig: Enable SDHCI ADMA for r5 SPL
Enable SPL_MMC_SDHCI_ADMA config option for r5 SPL
to improve boot time during r5 SPL stage.
Signed-off-by: Judith Mendez <jm@ti.com>
Judith Mendez [Fri, 20 Dec 2024 20:37:01 +0000 (14:37 -0600)]
configs: am62ax_evm_a53_defconfig: Enable MMC UHS modes
Enable configs required to enable MMC UHS modes in A53 SPL
and U-Boot proper.
Signed-off-by: Judith Mendez <jm@ti.com>
Judith Mendez [Fri, 20 Dec 2024 20:37:00 +0000 (14:37 -0600)]
configs: am62x_evm_a53_defconfig: Enable MMC UHS modes
Enable configs required to enable MMC UHS modes in A53 SPL
and U-Boot proper.
Signed-off-by: Judith Mendez <jm@ti.com>
Judith Mendez [Fri, 20 Dec 2024 20:36:59 +0000 (14:36 -0600)]
configs: am6*_evm_r5/a53_defconfig: Cleanup env configs
Since we do not load env from MMC device anymore, remove
any MMC env config options.
Signed-off-by: Judith Mendez <jm@ti.com>
Vignesh Raghavendra [Fri, 20 Dec 2024 20:36:58 +0000 (14:36 -0600)]
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>
Sean Edmond [Mon, 29 Apr 2024 18:51:16 +0000 (11:51 -0700)]
Fix neighbor discovery ethernet address saving
When a successful neighbor advertisement is received, the ethernet
address should be saved for later use to avoid having to redo the
neighbor discovery process.
For example, with TFTP the address should get saved into
"net_server_ethaddr". This is being done correctly with ARP for IPv4,
but not for neighbor discovery with IPv6.
Signed-off-by: Sean Edmond <seanedmond@microsoft.com>
Reviewed-by: Viacheslav Mitrofanov <v.v.mitrofanov@yadro.com>
Jerome Forissier [Fri, 29 Nov 2024 14:47:32 +0000 (15:47 +0100)]
net: tftpput: reset timeout_count when an ACK is received
timeout_count is never reset once a tftpput transfer has started. If for
whatever reason timeouts occur frequently, but the server keeps replying
nonetheless, the transfer may be needlessly aborted.
Reset timer_count on reception of an ACK to avoid this situation.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Frank Sae [Sun, 24 Nov 2024 07:38:44 +0000 (23:38 -0800)]
net: phy: Add driver for Motorcomm YT8521S Gigabit ethernet phy
Add driver for Motorcomm YT8521S Gigabit ethernet phy.
Signed-off-by: Frank Sae <Frank.Sae@motor-comm.com>
Frank Sae [Sun, 24 Nov 2024 07:38:43 +0000 (23:38 -0800)]
net: phy: Add driver for Motorcomm YT8531S Gigabit ethernet phy
Add driver for Motorcomm YT8531S Gigabit ethernet phy.
Signed-off-by: Frank Sae <Frank.Sae@motor-comm.com>
Heinrich Schuchardt [Tue, 19 Nov 2024 10:09:07 +0000 (11:09 +0100)]
net: correct the description of ip_to_string()
The output of ip_to_string() is a string.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Markus Gothe [Tue, 19 Nov 2024 14:26:44 +0000 (08:26 -0600)]
Bitbanging MDIO driver for DM framework.
Linux DTS compatible MDIO bitbanging driver.
Both clause 22 and clause 45 MDIO supported and validated.
Heavily based on the Linux drivers (more or less the same code base).
Signed-off-by: Markus Gothe <markus.gothe@genexis.eu>
Rufus Segar [Wed, 4 Dec 2024 13:34:30 +0000 (13:34 +0000)]
Revert "net: phy: marvell 88e151x: Fix handling of bare RGMII interface type"
This reverts commit
431be621c6cbc72efd1d45fa36686a682cbb470a.
Section 3.3 of Reduced Gigabit Media Independent Interface (RGMII)
Version 2.0 (4/1/2002) details that a PHYs using a ~2ns internal delay
are referred to as RGMII-ID. This internal delay is optional.
Page 147-148 of the Marvell Doc. No. MV-S107146-U0 Rev. F details
timings of the RX/TX delays. We see that with the TX/RX_CLK delay
enabled, our RX/TX_CTL signal is shifted w.r.t CLK to reflect the delay
added.
In 431be62 there is no timing difference between RGMII and RGMII-ID, and
so programmers wanting to explicitly set their PHY to RGMII will find
that delay added anyway. This could throw off timing if that internal
delay is undesired.
We should be handling all 4 possible RGMII cases of PHY_INTERFACE_MODE:
RGMII, RGMII_ID, RGMII_TXID, and RGMII_RXID. Reverting 431be62
implements this.
See also m88e1111_config_init_rgmii_delays in the equivalent driver in
Linux (drivers/net/phy/marvell.c), which does not set these delays in
RGMII mode.
68e6eca was tested out on an 88E1512 PHY in RGMII-ID mode. This
reversion has been tested by myself on an 88E1518 in RGMII-ID mode. This
patch affects boards using this driver in "rgmii" mode, as the internal
delay will no longer be enabled. Namely kikwood-nsa310s.
Signed-off-by: Rufus Segar <rhs@riseup.net>
Mikhail Kshevetskiy [Wed, 1 Jan 2025 03:20:16 +0000 (06:20 +0300)]
net: tftpboot: clear timeout_count on every successful block
We have a some boards that rarely starts networking abnormally, so there are
many timeouts during file transfer. In the same time there is a normal transfer
between timeouts. In this case we can continue transfer (instead of connection
aborting) by just clearing timeout counter on every successful block.
This patch does not affect the case when several timeouts happen one after
another. The transfer will be aborted. Thus the transfer will be
continued in the case of unstable link, but will be aborted in the case
of inaccessible server.
Feature downside: it may greatly slowdown (instead of abort) file transfer
in the case of unstable link.
Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Tom Rini [Wed, 1 Jan 2025 01:00:54 +0000 (19:00 -0600)]
Merge patch series "Add 'trace wipe'"
Jerome Forissier <jerome.forissier@linaro.org> says:
This short series adds the 'trace wipe' command which clears the trace
buffer, allowing to re-start a capture from scratch.
Link: https://lore.kernel.org/r/cover.1734093566.git.jerome.forissier@linaro.org
Jerome Forissier [Fri, 13 Dec 2024 12:45:38 +0000 (13:45 +0100)]
trace: document 'trace wipe'
Add documentation for the 'trace wipe' command.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Jerome Forissier [Fri, 13 Dec 2024 12:45:37 +0000 (13:45 +0100)]
test: test_trace.py: test 'trace wipe'
Test the newly added 'trace wipe' command.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Jerome Forissier [Fri, 13 Dec 2024 12:45:36 +0000 (13:45 +0100)]
trace: add support for 'trace wipe'
Implement a 'trace wipe' command to delete the currently accumulated
trace data. This comes handy when someone needs to trace a particular
command. For example:
=> trace pause; trace wipe
=> trace resume; dhcp; trace pause
=> trace stats
=> trace calls 0x02100000 0x10000000
=> tftpput $profbase $profoffset 192.168.0.16:trace.bin
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Jerome Forissier [Fri, 6 Dec 2024 10:11:31 +0000 (11:11 +0100)]
trace: proftool: dump-ftrace should write funcgraph times in ns not us
When converting a U-Boot trace records file to ftrace function graph
format for use by trace-cmd ('proftool -f funcgraph dump-ftrace'), the
time associated to each function is incorrectly saved in microseconds
instead of nanoseconds. Multuply the value by 1000 to fix the issue.
With this change, the trace-cmd output looks consistent. Here is an
example with udelay(25) added to mem_malloc_init() as a test case:
$ ./tools/proftool -m System.map -t /tmp/trace.bin -f funcgraph \
dump-ftrace -o /tmp/trace.dat
$ trace-cmd report /tmp/trace.dat >/tmp/trace.log
$ vi /tmp/trace.log
[...]
u-boot-1 [000] 6.719659: funcgraph_entry: | mem_malloc_init() {
u-boot-1 [000] 6.719659: funcgraph_entry: | udelay() {
u-boot-1 [000] 6.719660: funcgraph_entry: | schedule() {
u-boot-1 [000] 6.719660: funcgraph_entry: | cyclic_run() {
u-boot-1 [000] 6.719660: funcgraph_entry: 1.000 us | cyclic_get_list();
u-boot-1 [000] 6.719661: funcgraph_exit: 1.000 us | }
u-boot-1 [000] 6.719661: funcgraph_exit: 1.000 us | }
u-boot-1 [000] 6.719661: funcgraph_entry: | __udelay() {
u-boot-1 [000] 6.719662: funcgraph_entry: 0.000 us | usec_to_tick();
u-boot-1 [000] 6.719687: funcgraph_exit: + 26.000 us | }
u-boot-1 [000] 6.719687: funcgraph_exit: + 28.000 us | }
u-boot-1 [000] 6.719687: funcgraph_entry: # 37971.000 us | memset();
u-boot-1 [000] 6.757658: funcgraph_exit: # 37999.000 us | }
u-boot-1 [000] 6.757658: funcgraph_exit: # 38000.000 us | }
In the above dump, the udelay() call is reported as taking 26 us which
is consistent with the timestamps (6.719687 - 6.719659 = 0.000026).
Without this patch we would have "0.026 us" instead of "+ 26.000 us".
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tom Rini [Tue, 31 Dec 2024 21:24:34 +0000 (15:24 -0600)]
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
Udit Kumar [Wed, 18 Dec 2024 05:55:14 +0000 (11:25 +0530)]
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>
Manorit Chawdhry [Tue, 17 Dec 2024 08:54:37 +0000 (14:24 +0530)]
drivers: firmware: ti_sci: Add DM_FLAG_PRE_RELOC to driver
Currently the driver relies on bootph flag to probe it during PRE_RELOC
stage but with the upcoming cleanup of v6.13, we don't have the bootph
property in the parent nodes anymore and ti_sci driver being one of the
parent nodes required during SPL stage would end up hampering the probe
model [0].
Add DM_FLAG_PRE_RELOC to ti_sci driver for mitigating this issue.
[0]: https://source.denx.de/u-boot/custodians/u-boot-dm/-/issues/21
Suggested-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
Bryan Brattlof [Tue, 10 Dec 2024 21:43:30 +0000 (15:43 -0600)]
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>
Vaishnav Achath [Wed, 18 Dec 2024 13:13:41 +0000 (18:43 +0530)]
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>
Vaishnav Achath [Wed, 18 Dec 2024 13:13:40 +0000 (18:43 +0530)]
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>
Vaishnav Achath [Wed, 18 Dec 2024 13:13:39 +0000 (18:43 +0530)]
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:
fc2da3a3d0d3 ("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>
Vaishnav Achath [Wed, 18 Dec 2024 13:13:38 +0000 (18:43 +0530)]
mailbox: k3-sec-proxy: Add DM to DMSC communication thread for J722S
J722S R5 SPL uses sec-proxy threads 28 and 29 for communication with
TIFS. Mark these as valid threads in the driver.
https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/j722s/sec_proxy.html
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>
Tom Rini [Tue, 31 Dec 2024 16:59:06 +0000 (10:59 -0600)]
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
Weijie Gao [Tue, 17 Dec 2024 08:40:03 +0000 (16:40 +0800)]
net: mediatek: fix usability with wget command
The wget command currently cannot work correctly with mtk_eth driver.
This patch fixed this by increase DMA ring size and invalidate ring data
after use.
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Weijie Gao [Tue, 17 Dec 2024 08:39:59 +0000 (16:39 +0800)]
net: mediatek: don't enable GDMA cpu bridge unconditionally for NETSYSv3
Enable GDMA cpu bridge only when 10Gb interface is enabled for GMAC other
than GMAC0, or when MT7988 internal switch is used.
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Weijie Gao [Tue, 17 Dec 2024 08:39:55 +0000 (16:39 +0800)]
net: mediatek: make sgmii/usxgmii optional
Not all platforms supports sgmii and/or usxgmii. So we add Kconfig
options for these features and enable them only for supported
platforms.
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Weijie Gao [Tue, 17 Dec 2024 08:39:50 +0000 (16:39 +0800)]
net: mediatek: add support for 10GBASE-R
This patch adds support for 10GBASE-R interface mode
Signed-off-by: Bo-Cun Chen <bc-bocun.chen@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Weijie Gao [Tue, 17 Dec 2024 08:39:46 +0000 (16:39 +0800)]
net: mediatek: fix gmac2 usability for mt7629
MT7629 need extra setting for gmac2 to work. So additional
capability is added for mt7629 to handle this case.
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Weijie Gao [Tue, 17 Dec 2024 08:39:41 +0000 (16:39 +0800)]
net: mediatek: fix sgmii selection for mt7622
Unlike other platforms, mt7622 has only one SGMII and it can be
attached to either gmac1 or gmac2. So the register field of the
sgmii selection differs from other platforms as newer platforms can
control each sgmii individually.
This patch adds a new capability for mt7622 to handle this case.
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Weijie Gao [Tue, 17 Dec 2024 08:39:27 +0000 (16:39 +0800)]
net: mediatek: correct register name of ethsys syscfg1
The SYSCFG0 should be SYSCFG1 according to the programming guide.
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>