| Age | Commit message (Collapse) | Author |
|
Add the phyCORE-AM62Ax to our common board directory to
enable our SOM detection for this product.
Signed-off-by: Daniel Schultz <[email protected]>
Signed-off-by: Wadim Egorov <[email protected]>
|
|
This function is only used in the board.c file. Make it static.
Signed-off-by: Wadim Egorov <[email protected]>
|
|
Call 'phytec_ft_board_fixup' in the common K3 board code
to expose the product name and part number to Linux.
Signed-off-by: Daniel Schultz <[email protected]>
Reviewed-by: Wadim Egorov <[email protected]>
|
|
ft_board_setup inside the board code allows to alter
device-tree during the boot process.
Introduce a new function for the PHYTEC SOM detection
to read the product name and part number from the EEPROM
content and include both into the device-tree as
* phytec,som-part-number
* phytec,som-product-name
This function can be called from the board code when those
values should be exposed to Linux.
This patch also updates the phytec_print_som_info
function and changes the output.
Signed-off-by: Daniel Schultz <[email protected]>
Reviewed-by: Wadim Egorov <[email protected]>
Tested-by: Wadim Egorov <[email protected]>
|
|
We set the boot source as environment variable 'boot'.
Also include 'uart' and 'usbdfu' as possible boot sources.
Signed-off-by: Daniel Schultz <[email protected]>
Reviewed-by: Wadim Egorov <[email protected]>
|
|
Garrett Giordano <[email protected]> says:
This patch set adds the phyCORE AM62Ax board support and documenation to
u-boot.
The phyCORE-AM62Ax is a SoM (System on Module) featuring TI's AM62Ax SoC. It can
be used in combination with different carrier boards. This module can come
with different sizes and models for DDR, eMMC, SPI NOR Flash and various SoCs
from the AM62x family.
A development Kit, called phyBOARD-Lyra is used as a carrier board reference
design around the AM62x SoM.
This series depends on the following two patches:
- [PATCH v2] arm: mach-k3: am62a7: Provide a way to obtain boot device for non SPL
https://lists.denx.de/pipermail/u-boot/2024-October/570156.html
- [PATCH] board: phytec: common: Introduce CONFIG_PHYTEC_K3_DDR_PATCH
https://lists.denx.de/pipermail/u-boot/2024-November/571543.html
Link: https://lore.kernel.org/r/[email protected]
[trini: Fix warning in board/phytec/common/k3/board.c when
CONFIG_EFI_HAVE_CAPSULE_SUPPORT is not enabled]
Signed-off-by: Tom Rini <[email protected]>
|
|
Wadim Egorov <[email protected]> says:
This implements capsule updates for all our K3 SoMs for
eMMC, OSPI NOR and uSD cards.
We can use capsule updates to update the bootloader on all our
supported flash devices.
Link: https://lore.kernel.org/r/[email protected]
|
|
Implement EFI capsule update functionality for PHYTEC K3-based SoMs.
These SoMs feature various flash device options, including eMMC,
OSPI NOR, and uSD card at the board level.
This update provides the necessary logic to enable EFI capsule updates
across all three flash devices, ensuring flexible and robust firmware
upgrade capabilities.
The GUID is dynamically generated for the board, to get it:
efidebug capsule esrt
========================================
ESRT: fw_resource_count=3
ESRT: fw_resource_count_max=3
ESRT: fw_resource_version=1
[entry 0]==============================
ESRT: fw_class=C7D64D6D-10B2-54BC-A3BF-06A9DC3653D9
ESRT: fw_type=unknown
ESRT: fw_version=0
ESRT: lowest_supported_fw_version=0
ESRT: capsule_flags=0
ESRT: last_attempt_version=0
ESRT: last_attempt_status=success
[entry 1]==============================
ESRT: fw_class=09841C3F-F177-5D57-B1F6-754D92879205
ESRT: fw_type=unknown
ESRT: fw_version=0
ESRT: lowest_supported_fw_version=0
ESRT: capsule_flags=0
ESRT: last_attempt_version=0
ESRT: last_attempt_status=success
[entry 2]==============================
ESRT: fw_class=D11A9016-515E-503A-8872-3FF65384D0C4
ESRT: fw_type=unknown
ESRT: fw_version=0
ESRT: lowest_supported_fw_version=0
ESRT: capsule_flags=0
ESRT: last_attempt_version=0
ESRT: last_attempt_status=success
========================================
On the board (from uSD card containing capsule binaries at boot):
load mmc 1:1 $loadaddr tiboot3-capsule.bin
efidebug capsule update $loadaddr
load mmc 1:1 $loadaddr tispl-capsule.bin
efidebug capsule update $loadaddr
load mmc 1:1 $loadaddr uboot-capsule.bin
efidebug capsule update $loadaddr
The binaries will be flashed to the flash device you are booted from.
Signed-off-by: Wadim Egorov <[email protected]>
|
|
Introduce CONFIG_PHYTEC_K3_DDR_PATCH to make DDR timing patch code
optional for PHYTEC K3 boards. This allows better control over which
boards receive DDR timing patches, rather than compiling the code for
all boards with K3_DDRSS enabled.
Also enable the feature by default for PHYCORE_AM62X_R5.
Signed-off-by: Garrett Giordano <[email protected]>
Reviewed-by: Wadim Egorov <[email protected]>
|
|
The phyCORE-i.MX 93 is available in various variants. Relevant variant
options for the spl/u-boot are:
- with or without HS400 support for the eMMC
- with 1GB ram chip, or 2GB ram chip
The phyCORE's eeprom contains all information about the existing variant
options. Add evaluation of the eeprom data to the spl/u-boot to
enable/disable HS400 and to select the appropriate ram configuration at
startup.
Signed-off-by: Christoph Stoidner <[email protected]>
Reviewed-by: Wadim Egorov <[email protected]>
Reviewed-by: Yannic Moog <[email protected]>
Tested-by: Primoz Fiser <[email protected]>
|
|
Our SoMs are available in multiple configurations, managed via device
tree overlays. To determine the specific variant in use, we read the
EEPROM and apply the appropriate overlays during boot to the device tree
used by the OS.
Signed-off-by: Wadim Egorov <[email protected]>
Acked-by: Neha Malcom Francis <[email protected]>
|
|
Use the new symbol to refer to any 'SPL' build, including TPL and VPL
Signed-off-by: Simon Glass <[email protected]>
|
|
Add and use the correct number of ddr phy registers to update the
corresponding settings.
Fixes: cbf5c99ef317 ("board: phytec: common: Introduce a method to inject DDR timings deltas")
Signed-off-by: Dominik Haller <[email protected]>
Reviewed-by: Wadim Egorov <[email protected]>
|
|
Copy fixed-partitions nodes from U-Boot device tree to OS device tree.
Signed-off-by: Wadim Egorov <[email protected]>
Reviewed-by: Daniel Schultz <[email protected]>
|
|
deltas ***"
Wadim Egorov <[email protected]> says:
Changes in v2:
- Reabse to current next
- Add Tested-by: John Ma <[email protected]>
- Add Kconfig option to select RAM size statically
- Make board/phytec/common/k3 always compile for CONFIG_ARCH_K3
v1: https://lists.denx.de/pipermail/u-boot/2024-May/553057.html
|
|
Use content of EEPROM to detect the actual RAM size and adjust
DDR timings, size and banks accordingly.
Also enable the SoM detection per default in the defconfigs.
Signed-off-by: Wadim Egorov <[email protected]>
Tested-by: John Ma <[email protected]>
|
|
Introduce fdt_apply_ddrss_timings_patch() to allow board code to
override DDR settings in the device tree prior to DDRSS driver probing.
Signed-off-by: Wadim Egorov <[email protected]>
Tested-by: John Ma <[email protected]>
|
|
Functions are declared as phytec_am6* and not phytec_am62*.
Update the definitions to match the declarations.
Fixes: 9d152c23279c ("board: phytec: Add SOM detection for AM6x")
Signed-off-by: Wadim Egorov <[email protected]>
Tested-by: John Ma <[email protected]>
Reviewed-by: Dhruva Gole <[email protected]>
|
|
SoM detection is using I2C driver model functions.
Let's depend on I2C.
Signed-off-by: Wadim Egorov <[email protected]>
Tested-by: John Ma <[email protected]>
Reviewed-by: Dhruva Gole <[email protected]>
|
|
Read the EEPROM API v3 content and set all available
MAC-Addresses to the environment.
Signed-off-by: Daniel Schultz <[email protected]>
Reviewed-by: Wadim Egorov <[email protected]>
Tested-by: Wadim Egorov <[email protected]>
|
|
This API is based on a block structure with a 8 Byte large
API v3 header and various of different blocks following. It extends
our current API v2, which is always 32 Byte large, and is located
directly after v2.
Add the MAC block as first block type. It contains the physical
Ehternet interface number, a MAC address and a CRC checksum over the
MAC payload.
Signed-off-by: Daniel Schultz <[email protected]>
Tested-by: Wadim Egorov <[email protected]>
|
|
Move the entire initialization code for API v2 into a dedicated
function. This rework will allow to easily integrate the API v3
as next step during init.
Signed-off-by: Daniel Schultz <[email protected]>
Tested-by: Wadim Egorov <[email protected]>
|
|
The EEPROM image length for API v2 is fixed to 32 bytes. No need
to use sizeof while this value won't change. This value is
also be required for API v3 to know where the API v3 header starts.
Signed-off-by: Daniel Schultz <[email protected]>
Tested-by: Wadim Egorov <[email protected]>
|
|
We need to read multiple times from different offsets in API v3.
Move the EEPROM read logic into a dedicated function to make it
usable multiple times.
Signed-off-by: Daniel Schultz <[email protected]>
Tested-by: Wadim Egorov <[email protected]>
|
|
As part of bringing the master branch back in to next, we need to allow
for all of these changes to exist here.
Reported-by: Jonas Karlman <[email protected]>
Signed-off-by: Tom Rini <[email protected]>
|
|
When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.
This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.
Reported-by: Jonas Karlman <[email protected]>
Signed-off-by: Tom Rini <[email protected]>
|
|
Wadim Egorov <[email protected]> says:
Factor out code that we can reuse across all our K3 based SoMs.
2nd patch of this series require patch [1] to be applied first.
[1] https://lists.denx.de/pipermail/u-boot/2024-April/552021.html
|
|
Environment handling code can be reused across all our K3 based SoMs.
Instead of adding the same code for every new SoM, move it to a common
board.c file.
Signed-off-by: Wadim Egorov <[email protected]>
|
|
Remove <common.h> from this board vendor directory and when needed
add missing include files directly.
Acked-by: Wadim Egorov <[email protected]>
Acked-by: Teresa Remmet <[email protected]>
Signed-off-by: Tom Rini <[email protected]>
|
|
Add all functions to read each SOM option from the EEPROM
image and detect whether it's the correct product for this
image.
Signed-off-by: Daniel Schultz <[email protected]>
|
|
The ptr variable is currently defined as int and sizeof
returns the size of the eeprom data struct as Byte (32 in total).
In case the eeprom is empty, the check, if the eeprom is empty,
will most likely stop after 8 iterations because it will continue
with the stack which should contain some data. Therefore, the
init function will detect an empty EEPROM as API0 and return with
the valid flag set to True.
Fixes: dc22188cdc8 ("board: phytec: Add common PHYTEC SoM detection")
Signed-off-by: Daniel Schultz <[email protected]>
Reviewed-by: Teresa Remmet <[email protected]>
|
|
For all of the functions that access the eeprom_data, make sure these
data are valid. Use the valid member of the phytec_eeprom_data struct.
This fixes a bug where only the API revision check guarded against
accessing rubbish. But if API revision was e.g. 6, eeprom setup failed
before, but phytec_get_imx8m_eth would still happily access the data.
Fixes: dc22188cdc8 ("board: phytec: Add common PHYTEC SoM detection")
Signed-off-by: Yannic Moog <[email protected]>
Signed-off-by: Daniel Schultz <[email protected]>
Reviewed-by: Teresa Remmet <[email protected]>
|
|
Add a new nember to the eeprom_data that indicates whether the
associated data is valid or not. Make use of this new member in the
phytec_eeprom_data_init function by setting the valid value
appropriately.
Move the eeprom data to a new struct payload that holds
the payload of the eeprom.
Signed-off-by: Yannic Moog <[email protected]>
Signed-off-by: Daniel Schultz <[email protected]>
Reviewed-by: Teresa Remmet <[email protected]>
|
|
Add a generic function to apply overlays in our board code to not
implement the same logic in different PHYTEC products.
Signed-off-by: Daniel Schultz <[email protected]>
Reviewed-by: Teresa Remmet <[email protected]>
|
|
define the phytec_get_som_type function also when the SoM detection is
disabled.
Fixes:
commit 110d321a56c3 ("board: phytec: common: phytec_som_detection: Add phytec_get_som_type")
Signed-off-by: Benjamin Hahn <[email protected]>
|
|
Add a function that gets the som_type from the EEPROM.
Add an enum for the som_type.
Signed-off-by: Benjamin Hahn <[email protected]>
|
|
Commit aa7858fe5e2e ("board: phytec: som_detection: move definitions to
source file") moved function definitions from header to source file.
Makefile however was not updated to unconditionally (from
[..]_SOM_DETECTION) build the imx8 and phytec som detection units.
Also remove unused includes that cause build failures on arm 32bit
boards. SoM detection shall support 32bit boards as well, but arch
specific code should not be included in the generic module.
Fixes: aa7858fe5e2e ("board: phytec: som_detection: move definitions to source file")
Signed-off-by: Yannic Moog <[email protected]>
|
|
When som_type does not match any case, it is uninitialized and the
function still tries to print the SoM info. Rather, this is an error
condition and the function should abort prematurely. Highlight this by
printing an error message and returning early.
Signed-off-by: Yannic Moog <[email protected]>
|
|
Move all function definitions in {phytec|imx8m}_som_detection from the
header to the source file to prevent potential linker error regarding
multiple definitions. Also move the #if blocks with the definitions.
Signed-off-by: Yannic Moog <[email protected]>
|
|
In phytec_eeprom_data_init, after reading eeprom data into buffer, it is
checked whether all bytes are 0x0 by iterating over chunks of the
buffer. The offset, or index of the chunk, was never changed, leading to
repeated comparison of only the first chunk. Use array notation and
access chunk via array index to compare all chunks of the buffer.
Signed-off-by: Yannic Moog <[email protected]>
|
|
Pointer in phytec_imx8m_detect was accessed without checking it first.
Fix this by moving the pointer check in front of any accesses.
Signed-off-by: Yannic Moog <[email protected]>
|
|
phytec_imx8m_detect returns -1 on error, but the return type is u8
leading to 255 return values. Fix this by changing the return type to
int; there is no reason to keep it as u8 .
Signed-off-by: Yannic Moog <[email protected]>
|
|
Add helper function to read out the PCB revision of a PHYTEC SoM.
Signed-off-by: Teresa Remmet <[email protected]>
Reviewed-by: Yannic Moog <[email protected]>
Tested-by: Yannic Moog <[email protected]>
|
|
Add imx8m specific detection part. Which includes checking the
EEPROM data for article number options.
Signed-off-by: Teresa Remmet <[email protected]>
Reviewed-by: Yannic Moog <[email protected]>
Tested-by: Yannic Moog <[email protected]>
|
|
Recent shipped PHYTEC SoMs come with an i2c EEPROM containing
information about the hardware such as board revision and variant.
This can be used for RAM detection and loading device tree overlays
during kernel start.
Signed-off-by: Teresa Remmet <[email protected]>
Reviewed-by: Yannic Moog <[email protected]>
Tested-by: Yannic Moog <[email protected]>
Reviewed-by: Fabio Estevam <[email protected]>
|