* [PATCH 0/6] Extend SOM detection
@ 2024-07-08 6:07 Daniel Schultz
2024-07-08 6:07 ` [PATCH 1/6] include: env: phytec: overlays: Add extension command Daniel Schultz
` (6 more replies)
0 siblings, 7 replies; 12+ messages in thread
From: Daniel Schultz @ 2024-07-08 6:07 UTC (permalink / raw)
To: u-boot, trini, joe.hershberger, w.egorov
Cc: d-gole, nm, mkorpershoek, upstream, t.remmet, y.moog, m-chawdhry,
kamlesh, jm, B.Hahn, Daniel Schultz
This patchset extends PHYTEC's SOM detection for the
K3 platforms.
It adds generic support to apply overlays via the
extension framework inside the overlays.env file. Additionally,
the K3 mmc boot environment applies these overlays now.
It also adds the 'extension_board_scan' hook to the K3 board
code and adds all missing configs in the phyCORE-AM62x and
-AM64x A53 defconfigs.
Daniel Schultz (6):
include: env: phytec: overlays: Add extension command
include: env: phytec: k3_mmc: Apply extension overlays
board: phytec: common: k3: Add SOM detection overlays
board: phytec: common: Kconfig: Enable SUPPORT_EXTENSION_SCAN
configs: phytec_am62x_a53_defconfig: Set CONFIG_CMD_EXTENSION
configs: phycore_am64x_a53_defconfig: Enable SOM detection
board/phytec/common/Kconfig | 2 ++
board/phytec/common/k3/board.c | 45 +++++++++++++++++++++++++++++
configs/phycore_am62x_a53_defconfig | 1 +
configs/phycore_am64x_a53_defconfig | 2 ++
include/env/phytec/k3_mmc.env | 1 +
include/env/phytec/overlays.env | 20 +++++++++++++
6 files changed, 71 insertions(+)
--
2.25.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/6] include: env: phytec: overlays: Add extension command
2024-07-08 6:07 [PATCH 0/6] Extend SOM detection Daniel Schultz
@ 2024-07-08 6:07 ` Daniel Schultz
2024-07-09 6:49 ` Yannic Moog
2024-07-08 6:07 ` [PATCH 2/6] include: env: phytec: k3_mmc: Apply extension overlays Daniel Schultz
` (5 subsequent siblings)
6 siblings, 1 reply; 12+ messages in thread
From: Daniel Schultz @ 2024-07-08 6:07 UTC (permalink / raw)
To: u-boot, trini, joe.hershberger, w.egorov
Cc: d-gole, nm, mkorpershoek, upstream, t.remmet, y.moog, m-chawdhry,
kamlesh, jm, B.Hahn, Daniel Schultz
Add a new environment routine to apply extensions. Our SOM detection
adds overlays via the extension framework to alter the kernel
device-tree according to the flashed EEPROM image.
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
---
include/env/phytec/overlays.env | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/include/env/phytec/overlays.env b/include/env/phytec/overlays.env
index 78721cde654..50110e731bd 100644
--- a/include/env/phytec/overlays.env
+++ b/include/env/phytec/overlays.env
@@ -23,6 +23,16 @@ mmc_apply_overlays=
fi;
done;
fi;
+#ifdef CONFIG_CMD_EXTENSION
+mmc_apply_extensions=
+ setenv extension_overlay_addr ${fdtoverlay_addr_r};
+ setenv extension_overlay_cmd 'load mmc ${mmcdev}:${mmcpart}
+ ${fdtoverlay_addr_r} ${extension_overlay_name}';
+ extension scan;
+ extension apply all;
+#else
+mmc_apply_extensions=echo "no extension command"
+#endif
net_load_bootenv=${get_cmd} ${bootenv_addr_r} ${bootenv}
net_load_overlay=${get_cmd} ${fdtoverlay_addr_r} ${overlay}
net_apply_overlays=
@@ -36,3 +46,13 @@ net_apply_overlays=
fi;
done;
fi;
+#ifdef CONFIG_CMD_EXTENSION
+net_apply_extensions=
+ setenv extension_overlay_addr ${fdtoverlay_addr_r};
+ setenv extension_overlay_cmd '${get_cmd} ${fdtoverlay_addr_r}
+ ${extension_overlay_name}';
+ extension scan;
+ extension apply all;
+#else
+net_apply_extensions=echo "no extension command"
+#endif
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/6] include: env: phytec: k3_mmc: Apply extension overlays
2024-07-08 6:07 [PATCH 0/6] Extend SOM detection Daniel Schultz
2024-07-08 6:07 ` [PATCH 1/6] include: env: phytec: overlays: Add extension command Daniel Schultz
@ 2024-07-08 6:07 ` Daniel Schultz
2024-07-08 6:07 ` [PATCH 3/6] board: phytec: common: k3: Add SOM detection overlays Daniel Schultz
` (4 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Daniel Schultz @ 2024-07-08 6:07 UTC (permalink / raw)
To: u-boot, trini, joe.hershberger, w.egorov
Cc: d-gole, nm, mkorpershoek, upstream, t.remmet, y.moog, m-chawdhry,
kamlesh, jm, B.Hahn, Daniel Schultz
Run the mmc_apply_extensions routine to apply overlays
added by the extension framework.
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
---
include/env/phytec/k3_mmc.env | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/env/phytec/k3_mmc.env b/include/env/phytec/k3_mmc.env
index 3d3595ceb7e..3c0b1359dda 100644
--- a/include/env/phytec/k3_mmc.env
+++ b/include/env/phytec/k3_mmc.env
@@ -18,4 +18,5 @@ mmcboot=run mmcargs;
run loadimage;
run loadfdt;
run mmc_apply_overlays;
+ run mmc_apply_extensions;
booti ${loadaddr} - ${fdt_addr_r}
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 3/6] board: phytec: common: k3: Add SOM detection overlays
2024-07-08 6:07 [PATCH 0/6] Extend SOM detection Daniel Schultz
2024-07-08 6:07 ` [PATCH 1/6] include: env: phytec: overlays: Add extension command Daniel Schultz
2024-07-08 6:07 ` [PATCH 2/6] include: env: phytec: k3_mmc: Apply extension overlays Daniel Schultz
@ 2024-07-08 6:07 ` Daniel Schultz
2024-07-08 6:07 ` [PATCH 4/6] board: phytec: common: Kconfig: Enable SUPPORT_EXTENSION_SCAN Daniel Schultz
` (3 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Daniel Schultz @ 2024-07-08 6:07 UTC (permalink / raw)
To: u-boot, trini, joe.hershberger, w.egorov
Cc: d-gole, nm, mkorpershoek, upstream, t.remmet, y.moog, m-chawdhry,
kamlesh, jm, B.Hahn, Daniel Schultz
Add overlays to disable or alter SOM features according
to the EEPROM image content.
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
---
board/phytec/common/k3/board.c | 45 ++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/board/phytec/common/k3/board.c b/board/phytec/common/k3/board.c
index 3d7e090ccaa..867dd880675 100644
--- a/board/phytec/common/k3/board.c
+++ b/board/phytec/common/k3/board.c
@@ -8,6 +8,7 @@
#include <fdt_support.h>
#include <spl.h>
#include <asm/arch/hardware.h>
+#include <extension_board.h>
#include "../am6_som_detection.h"
@@ -104,3 +105,47 @@ int ft_board_setup(void *blob, struct bd_info *bd)
return 0;
}
#endif
+
+#if IS_ENABLED(CONFIG_CMD_EXTENSION)
+int extension_board_scan(struct list_head *extension_list)
+{
+ struct extension *extension = NULL;
+ struct phytec_eeprom_data data;
+ int count = 0;
+ int ret;
+
+ ret = phytec_eeprom_data_setup(&data, 0, EEPROM_ADDR);
+ if (ret)
+ return count;
+
+ if (phytec_get_am6_eth(&data) == 0) {
+ extension = phytec_add_extension("Disable Ethernet phy",
+ "k3-am6xx-phycore-disable-eth-phy.dtbo", "");
+ list_add_tail(&extension->list, extension_list);
+ count++;
+ }
+
+ if (phytec_get_am6_spi(&data) == PHYTEC_EEPROM_VALUE_X) {
+ extension = phytec_add_extension("Disable SPI NOR Flash",
+ "k3-am6xx-phycore-disable-spi-nor.dtbo", "");
+ list_add_tail(&extension->list, extension_list);
+ count++;
+ }
+
+ if (phytec_am6_is_qspi(&data)) {
+ extension = phytec_add_extension("Select QSPI NOR Flash",
+ "k3-am6xx-phycore-qspi-nor.dtbo", "");
+ list_add_tail(&extension->list, extension_list);
+ count++;
+ }
+
+ if (phytec_get_am6_rtc(&data) == 0) {
+ extension = phytec_add_extension("Disable RTC",
+ "k3-am6xx-phycore-disable-rtc.dtbo", "");
+ list_add_tail(&extension->list, extension_list);
+ count++;
+ }
+
+ return count;
+}
+#endif
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 4/6] board: phytec: common: Kconfig: Enable SUPPORT_EXTENSION_SCAN
2024-07-08 6:07 [PATCH 0/6] Extend SOM detection Daniel Schultz
` (2 preceding siblings ...)
2024-07-08 6:07 ` [PATCH 3/6] board: phytec: common: k3: Add SOM detection overlays Daniel Schultz
@ 2024-07-08 6:07 ` Daniel Schultz
2024-07-08 6:07 ` [PATCH 5/6] configs: phytec_am62x_a53_defconfig: Set CONFIG_CMD_EXTENSION Daniel Schultz
` (2 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Daniel Schultz @ 2024-07-08 6:07 UTC (permalink / raw)
To: u-boot, trini, joe.hershberger, w.egorov
Cc: d-gole, nm, mkorpershoek, upstream, t.remmet, y.moog, m-chawdhry,
kamlesh, jm, B.Hahn, Daniel Schultz
Enable SUPPORT_EXTENSION_SCAN for the phyCORE-AM62x and -AM64x
boards.
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
---
board/phytec/common/Kconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/board/phytec/common/Kconfig b/board/phytec/common/Kconfig
index f394ace786a..120f58b6ec6 100644
--- a/board/phytec/common/Kconfig
+++ b/board/phytec/common/Kconfig
@@ -24,6 +24,7 @@ config PHYTEC_AM62_SOM_DETECTION
depends on (TARGET_PHYCORE_AM62X_A53 || TARGET_PHYCORE_AM62X_R5) && \
PHYTEC_SOM_DETECTION
select PHYTEC_SOM_DETECTION_BLOCKS
+ select SUPPORT_EXTENSION_SCAN
depends on SPL_I2C && DM_I2C
default y
help
@@ -35,6 +36,7 @@ config PHYTEC_AM64_SOM_DETECTION
depends on (TARGET_PHYCORE_AM64X_A53 || TARGET_PHYCORE_AM64X_R5) && \
PHYTEC_SOM_DETECTION
select PHYTEC_SOM_DETECTION_BLOCKS
+ select SUPPORT_EXTENSION_SCAN
depends on SPL_I2C && DM_I2C
default y
help
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 5/6] configs: phytec_am62x_a53_defconfig: Set CONFIG_CMD_EXTENSION
2024-07-08 6:07 [PATCH 0/6] Extend SOM detection Daniel Schultz
` (3 preceding siblings ...)
2024-07-08 6:07 ` [PATCH 4/6] board: phytec: common: Kconfig: Enable SUPPORT_EXTENSION_SCAN Daniel Schultz
@ 2024-07-08 6:07 ` Daniel Schultz
2024-07-08 6:07 ` [PATCH 6/6] configs: phycore_am64x_a53_defconfig: Enable SOM detection Daniel Schultz
2024-07-09 7:16 ` [PATCH 0/6] Extend " Daniel Schultz
6 siblings, 0 replies; 12+ messages in thread
From: Daniel Schultz @ 2024-07-08 6:07 UTC (permalink / raw)
To: u-boot, trini, joe.hershberger, w.egorov
Cc: d-gole, nm, mkorpershoek, upstream, t.remmet, y.moog, m-chawdhry,
kamlesh, jm, B.Hahn, Daniel Schultz
CONFIG_CMD_EXTENSION is required to load SOM detection overlays.
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
---
configs/phycore_am62x_a53_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/configs/phycore_am62x_a53_defconfig b/configs/phycore_am62x_a53_defconfig
index 06b8834e074..ec75b1a424d 100644
--- a/configs/phycore_am62x_a53_defconfig
+++ b/configs/phycore_am62x_a53_defconfig
@@ -63,6 +63,7 @@ CONFIG_SPL_SPI_FLASH_SFDP_SUPPORT=y
CONFIG_SPL_SPI_LOAD=y
CONFIG_SYS_SPI_U_BOOT_OFFS=0x280000
CONFIG_SPL_YMODEM_SUPPORT=y
+CONFIG_CMD_EXTENSION=y
CONFIG_CMD_DFU=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 6/6] configs: phycore_am64x_a53_defconfig: Enable SOM detection
2024-07-08 6:07 [PATCH 0/6] Extend SOM detection Daniel Schultz
` (4 preceding siblings ...)
2024-07-08 6:07 ` [PATCH 5/6] configs: phytec_am62x_a53_defconfig: Set CONFIG_CMD_EXTENSION Daniel Schultz
@ 2024-07-08 6:07 ` Daniel Schultz
2024-07-09 7:16 ` [PATCH 0/6] Extend " Daniel Schultz
6 siblings, 0 replies; 12+ messages in thread
From: Daniel Schultz @ 2024-07-08 6:07 UTC (permalink / raw)
To: u-boot, trini, joe.hershberger, w.egorov
Cc: d-gole, nm, mkorpershoek, upstream, t.remmet, y.moog, m-chawdhry,
kamlesh, jm, B.Hahn, Daniel Schultz
Enable SOM detection for the phyCORE-AM64x and also set
CONFIG_CMD_EXTENSION as requirement for this feature.
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
---
configs/phycore_am64x_a53_defconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/configs/phycore_am64x_a53_defconfig b/configs/phycore_am64x_a53_defconfig
index fe09f79796d..c4145e9c10c 100644
--- a/configs/phycore_am64x_a53_defconfig
+++ b/configs/phycore_am64x_a53_defconfig
@@ -10,6 +10,7 @@ CONFIG_NR_DRAM_BANKS=2
CONFIG_SOC_K3_AM642=y
CONFIG_K3_ATF_LOAD_ADDR=0x701c0000
CONFIG_TARGET_PHYCORE_AM64X_A53=y
+CONFIG_PHYTEC_SOM_DETECTION=y
CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80480000
CONFIG_ENV_SIZE=0x20000
@@ -63,6 +64,7 @@ CONFIG_SPL_SPI_FLASH_SFDP_SUPPORT=y
CONFIG_SPL_SPI_LOAD=y
CONFIG_SYS_SPI_U_BOOT_OFFS=0x280000
CONFIG_SPL_YMODEM_SUPPORT=y
+CONFIG_CMD_EXTENSION=y
CONFIG_CMD_ASKENV=y
CONFIG_CMD_DFU=y
CONFIG_CMD_GPT=y
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 1/6] include: env: phytec: overlays: Add extension command
2024-07-08 6:07 ` [PATCH 1/6] include: env: phytec: overlays: Add extension command Daniel Schultz
@ 2024-07-09 6:49 ` Yannic Moog
2024-07-09 13:31 ` Daniel Schultz
0 siblings, 1 reply; 12+ messages in thread
From: Yannic Moog @ 2024-07-09 6:49 UTC (permalink / raw)
To: u-boot@lists.denx.de, Daniel Schultz, joe.hershberger@ni.com,
trini@konsulko.com, Wadim Egorov
Cc: kamlesh@ti.com, d-gole@ti.com, Benjamin Hahn, m-chawdhry@ti.com,
mkorpershoek@baylibre.com, jm@ti.com, PHYTEC Upstream, nm@ti.com,
Teresa Remmet
Hello Daniel,
On Sun, 2024-07-07 at 23:07 -0700, Daniel Schultz wrote:
> Add a new environment routine to apply extensions. Our SOM detection
> adds overlays via the extension framework to alter the kernel
> device-tree according to the flashed EEPROM image.
>
> Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
> ---
> include/env/phytec/overlays.env | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/include/env/phytec/overlays.env b/include/env/phytec/overlays.env
> index 78721cde654..50110e731bd 100644
> --- a/include/env/phytec/overlays.env
> +++ b/include/env/phytec/overlays.env
> @@ -23,6 +23,16 @@ mmc_apply_overlays=
> fi;
> done;
> fi;
> +#ifdef CONFIG_CMD_EXTENSION
> +mmc_apply_extensions=
> + setenv extension_overlay_addr ${fdtoverlay_addr_r};
> + setenv extension_overlay_cmd 'load mmc ${mmcdev}:${mmcpart}
> + ${fdtoverlay_addr_r} ${extension_overlay_name}';
> + extension scan;
> + extension apply all;
> +#else
> +mmc_apply_extensions=echo "no extension command"
Do you think it makes sense to make this fail? I would think "apply_extensions" would be
unsuccessful if extensions are not working.
Yannic
> +#endif
> net_load_bootenv=${get_cmd} ${bootenv_addr_r} ${bootenv}
> net_load_overlay=${get_cmd} ${fdtoverlay_addr_r} ${overlay}
> net_apply_overlays=
> @@ -36,3 +46,13 @@ net_apply_overlays=
> fi;
> done;
> fi;
> +#ifdef CONFIG_CMD_EXTENSION
> +net_apply_extensions=
> + setenv extension_overlay_addr ${fdtoverlay_addr_r};
> + setenv extension_overlay_cmd '${get_cmd} ${fdtoverlay_addr_r}
> + ${extension_overlay_name}';
> + extension scan;
> + extension apply all;
> +#else
> +net_apply_extensions=echo "no extension command"
> +#endif
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/6] Extend SOM detection
2024-07-08 6:07 [PATCH 0/6] Extend SOM detection Daniel Schultz
` (5 preceding siblings ...)
2024-07-08 6:07 ` [PATCH 6/6] configs: phycore_am64x_a53_defconfig: Enable SOM detection Daniel Schultz
@ 2024-07-09 7:16 ` Daniel Schultz
6 siblings, 0 replies; 12+ messages in thread
From: Daniel Schultz @ 2024-07-09 7:16 UTC (permalink / raw)
To: u-boot, trini, joe.hershberger, w.egorov
Cc: d-gole, nm, mkorpershoek, upstream, t.remmet, y.moog, m-chawdhry,
kamlesh, jm, B.Hahn
Hey,
please don't apply these patches. We just found an issue while working
on another task. Sorry!
Best Regards,
Daniel
On 08.07.24 08:07, Daniel Schultz wrote:
> This patchset extends PHYTEC's SOM detection for the
> K3 platforms.
>
> It adds generic support to apply overlays via the
> extension framework inside the overlays.env file. Additionally,
> the K3 mmc boot environment applies these overlays now.
>
> It also adds the 'extension_board_scan' hook to the K3 board
> code and adds all missing configs in the phyCORE-AM62x and
> -AM64x A53 defconfigs.
>
> Daniel Schultz (6):
> include: env: phytec: overlays: Add extension command
> include: env: phytec: k3_mmc: Apply extension overlays
> board: phytec: common: k3: Add SOM detection overlays
> board: phytec: common: Kconfig: Enable SUPPORT_EXTENSION_SCAN
> configs: phytec_am62x_a53_defconfig: Set CONFIG_CMD_EXTENSION
> configs: phycore_am64x_a53_defconfig: Enable SOM detection
>
> board/phytec/common/Kconfig | 2 ++
> board/phytec/common/k3/board.c | 45 +++++++++++++++++++++++++++++
> configs/phycore_am62x_a53_defconfig | 1 +
> configs/phycore_am64x_a53_defconfig | 2 ++
> include/env/phytec/k3_mmc.env | 1 +
> include/env/phytec/overlays.env | 20 +++++++++++++
> 6 files changed, 71 insertions(+)
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/6] include: env: phytec: overlays: Add extension command
2024-07-09 6:49 ` Yannic Moog
@ 2024-07-09 13:31 ` Daniel Schultz
2024-07-09 13:47 ` Wadim Egorov
0 siblings, 1 reply; 12+ messages in thread
From: Daniel Schultz @ 2024-07-09 13:31 UTC (permalink / raw)
To: Yannic Moog, u-boot@lists.denx.de, joe.hershberger@ni.com,
trini@konsulko.com, Wadim Egorov
Cc: kamlesh@ti.com, d-gole@ti.com, Benjamin Hahn, m-chawdhry@ti.com,
mkorpershoek@baylibre.com, jm@ti.com, PHYTEC Upstream, nm@ti.com,
Teresa Remmet
Hi Yannic,
On 09.07.24 08:49, Yannic Moog wrote:
> Hello Daniel,
>
> On Sun, 2024-07-07 at 23:07 -0700, Daniel Schultz wrote:
>> Add a new environment routine to apply extensions. Our SOM detection
>> adds overlays via the extension framework to alter the kernel
>> device-tree according to the flashed EEPROM image.
>>
>> Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
>> ---
>> include/env/phytec/overlays.env | 20 ++++++++++++++++++++
>> 1 file changed, 20 insertions(+)
>>
>> diff --git a/include/env/phytec/overlays.env b/include/env/phytec/overlays.env
>> index 78721cde654..50110e731bd 100644
>> --- a/include/env/phytec/overlays.env
>> +++ b/include/env/phytec/overlays.env
>> @@ -23,6 +23,16 @@ mmc_apply_overlays=
>> fi;
>> done;
>> fi;
>> +#ifdef CONFIG_CMD_EXTENSION
>> +mmc_apply_extensions=
>> + setenv extension_overlay_addr ${fdtoverlay_addr_r};
>> + setenv extension_overlay_cmd 'load mmc ${mmcdev}:${mmcpart}
>> + ${fdtoverlay_addr_r} ${extension_overlay_name}';
>> + extension scan;
>> + extension apply all;
>> +#else
>> +mmc_apply_extensions=echo "no extension command"
> Do you think it makes sense to make this fail? I would think "apply_extensions" would be
> unsuccessful if extensions are not working.
Technically, you don't need our SOM detection overlays. They just make
the boot nicer and you don't have any probe errors or other error
messages. So, in my opinion, it's better not apply them instead of
stopping the entire boot.
Regards,
Daniel
>
> Yannic
>
>> +#endif
>> net_load_bootenv=${get_cmd} ${bootenv_addr_r} ${bootenv}
>> net_load_overlay=${get_cmd} ${fdtoverlay_addr_r} ${overlay}
>> net_apply_overlays=
>> @@ -36,3 +46,13 @@ net_apply_overlays=
>> fi;
>> done;
>> fi;
>> +#ifdef CONFIG_CMD_EXTENSION
>> +net_apply_extensions=
>> + setenv extension_overlay_addr ${fdtoverlay_addr_r};
>> + setenv extension_overlay_cmd '${get_cmd} ${fdtoverlay_addr_r}
>> + ${extension_overlay_name}';
>> + extension scan;
>> + extension apply all;
>> +#else
>> +net_apply_extensions=echo "no extension command"
>> +#endif
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/6] include: env: phytec: overlays: Add extension command
2024-07-09 13:31 ` Daniel Schultz
@ 2024-07-09 13:47 ` Wadim Egorov
2024-07-10 5:38 ` Yannic Moog
0 siblings, 1 reply; 12+ messages in thread
From: Wadim Egorov @ 2024-07-09 13:47 UTC (permalink / raw)
To: Daniel Schultz, Yannic Moog, u-boot@lists.denx.de,
joe.hershberger@ni.com, trini@konsulko.com
Cc: kamlesh@ti.com, d-gole@ti.com, Benjamin Hahn, m-chawdhry@ti.com,
mkorpershoek@baylibre.com, jm@ti.com, PHYTEC Upstream, nm@ti.com,
Teresa Remmet
Am 09.07.24 um 15:31 schrieb Daniel Schultz:
> Hi Yannic,
>
> On 09.07.24 08:49, Yannic Moog wrote:
>> Hello Daniel,
>>
>> On Sun, 2024-07-07 at 23:07 -0700, Daniel Schultz wrote:
>>> Add a new environment routine to apply extensions. Our SOM detection
>>> adds overlays via the extension framework to alter the kernel
>>> device-tree according to the flashed EEPROM image.
>>>
>>> Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
>>> ---
>>> include/env/phytec/overlays.env | 20 ++++++++++++++++++++
>>> 1 file changed, 20 insertions(+)
>>>
>>> diff --git a/include/env/phytec/overlays.env
>>> b/include/env/phytec/overlays.env
>>> index 78721cde654..50110e731bd 100644
>>> --- a/include/env/phytec/overlays.env
>>> +++ b/include/env/phytec/overlays.env
>>> @@ -23,6 +23,16 @@ mmc_apply_overlays=
>>> fi;
>>> done;
>>> fi;
>>> +#ifdef CONFIG_CMD_EXTENSION
>>> +mmc_apply_extensions=
>>> + setenv extension_overlay_addr ${fdtoverlay_addr_r};
>>> + setenv extension_overlay_cmd 'load mmc ${mmcdev}:${mmcpart}
>>> + ${fdtoverlay_addr_r} ${extension_overlay_name}';
>>> + extension scan;
>>> + extension apply all;
>>> +#else
>>> +mmc_apply_extensions=echo "no extension command"
>> Do you think it makes sense to make this fail? I would think
>> "apply_extensions" would be
>> unsuccessful if extensions are not working.
>
> Technically, you don't need our SOM detection overlays. They just make
> the boot nicer and you don't have any probe errors or other error
> messages. So, in my opinion, it's better not apply them instead of
> stopping the entire boot.
My recommendation is to embed all SoM variant related overlays into
u-boot.img's FIT using binman.
This makes the extension command obsolete, and especially the handling
for loading of overlays from different boot sources / storage devices.
Having them available directly in the u-boot binary resolves the issue
of not found overlays.
We do not know how users will proceed after u-boot booted and if the
overlays will be available to the "extension setup". Better to have
everything in place and fixup to the best we know using our SoM data
stored in the EEPROM.
This kind of overlays should be applied regardless of the boot device.
>
> Regards,
> Daniel
>
>>
>> Yannic
>>
>>> +#endif
>>> net_load_bootenv=${get_cmd} ${bootenv_addr_r} ${bootenv}
>>> net_load_overlay=${get_cmd} ${fdtoverlay_addr_r} ${overlay}
>>> net_apply_overlays=
>>> @@ -36,3 +46,13 @@ net_apply_overlays=
>>> fi;
>>> done;
>>> fi;
>>> +#ifdef CONFIG_CMD_EXTENSION
>>> +net_apply_extensions=
>>> + setenv extension_overlay_addr ${fdtoverlay_addr_r};
>>> + setenv extension_overlay_cmd '${get_cmd} ${fdtoverlay_addr_r}
>>> + ${extension_overlay_name}';
>>> + extension scan;
>>> + extension apply all;
>>> +#else
>>> +net_apply_extensions=echo "no extension command"
>>> +#endif
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/6] include: env: phytec: overlays: Add extension command
2024-07-09 13:47 ` Wadim Egorov
@ 2024-07-10 5:38 ` Yannic Moog
0 siblings, 0 replies; 12+ messages in thread
From: Yannic Moog @ 2024-07-10 5:38 UTC (permalink / raw)
To: Wadim Egorov, Daniel Schultz, joe.hershberger@ni.com,
u-boot@lists.denx.de, trini@konsulko.com
Cc: kamlesh@ti.com, d-gole@ti.com, Benjamin Hahn, m-chawdhry@ti.com,
mkorpershoek@baylibre.com, jm@ti.com, PHYTEC Upstream, nm@ti.com,
Teresa Remmet
On Tue, 2024-07-09 at 15:47 +0200, Wadim Egorov wrote:
>
>
> Am 09.07.24 um 15:31 schrieb Daniel Schultz:
> > Hi Yannic,
> >
> > On 09.07.24 08:49, Yannic Moog wrote:
> > > Hello Daniel,
> > >
> > > On Sun, 2024-07-07 at 23:07 -0700, Daniel Schultz wrote:
> > > > Add a new environment routine to apply extensions. Our SOM detection
> > > > adds overlays via the extension framework to alter the kernel
> > > > device-tree according to the flashed EEPROM image.
> > > >
> > > > Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
> > > > ---
> > > > include/env/phytec/overlays.env | 20 ++++++++++++++++++++
> > > > 1 file changed, 20 insertions(+)
> > > >
> > > > diff --git a/include/env/phytec/overlays.env
> > > > b/include/env/phytec/overlays.env
> > > > index 78721cde654..50110e731bd 100644
> > > > --- a/include/env/phytec/overlays.env
> > > > +++ b/include/env/phytec/overlays.env
> > > > @@ -23,6 +23,16 @@ mmc_apply_overlays=
> > > > fi;
> > > > done;
> > > > fi;
> > > > +#ifdef CONFIG_CMD_EXTENSION
> > > > +mmc_apply_extensions=
> > > > + setenv extension_overlay_addr ${fdtoverlay_addr_r};
> > > > + setenv extension_overlay_cmd 'load mmc ${mmcdev}:${mmcpart}
> > > > + ${fdtoverlay_addr_r} ${extension_overlay_name}';
> > > > + extension scan;
> > > > + extension apply all;
> > > > +#else
> > > > +mmc_apply_extensions=echo "no extension command"
> > > Do you think it makes sense to make this fail? I would think
> > > "apply_extensions" would be
> > > unsuccessful if extensions are not working.
> >
> > Technically, you don't need our SOM detection overlays. They just make
> > the boot nicer and you don't have any probe errors or other error
> > messages. So, in my opinion, it's better not apply them instead of
> > stopping the entire boot.
>
> My recommendation is to embed all SoM variant related overlays into
> u-boot.img's FIT using binman.
Didn't think binman would be used for that, but I share your opinion regarding overlay packaging.
Yannic
>
> This makes the extension command obsolete, and especially the handling
> for loading of overlays from different boot sources / storage devices.
>
> Having them available directly in the u-boot binary resolves the issue
> of not found overlays.
>
> We do not know how users will proceed after u-boot booted and if the
> overlays will be available to the "extension setup". Better to have
> everything in place and fixup to the best we know using our SoM data
> stored in the EEPROM.
>
> This kind of overlays should be applied regardless of the boot device.
>
> >
> > Regards,
> > Daniel
> >
> > >
> > > Yannic
> > >
> > > > +#endif
> > > > net_load_bootenv=${get_cmd} ${bootenv_addr_r} ${bootenv}
> > > > net_load_overlay=${get_cmd} ${fdtoverlay_addr_r} ${overlay}
> > > > net_apply_overlays=
> > > > @@ -36,3 +46,13 @@ net_apply_overlays=
> > > > fi;
> > > > done;
> > > > fi;
> > > > +#ifdef CONFIG_CMD_EXTENSION
> > > > +net_apply_extensions=
> > > > + setenv extension_overlay_addr ${fdtoverlay_addr_r};
> > > > + setenv extension_overlay_cmd '${get_cmd} ${fdtoverlay_addr_r}
> > > > + ${extension_overlay_name}';
> > > > + extension scan;
> > > > + extension apply all;
> > > > +#else
> > > > +net_apply_extensions=echo "no extension command"
> > > > +#endif
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2024-07-10 5:38 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-08 6:07 [PATCH 0/6] Extend SOM detection Daniel Schultz
2024-07-08 6:07 ` [PATCH 1/6] include: env: phytec: overlays: Add extension command Daniel Schultz
2024-07-09 6:49 ` Yannic Moog
2024-07-09 13:31 ` Daniel Schultz
2024-07-09 13:47 ` Wadim Egorov
2024-07-10 5:38 ` Yannic Moog
2024-07-08 6:07 ` [PATCH 2/6] include: env: phytec: k3_mmc: Apply extension overlays Daniel Schultz
2024-07-08 6:07 ` [PATCH 3/6] board: phytec: common: k3: Add SOM detection overlays Daniel Schultz
2024-07-08 6:07 ` [PATCH 4/6] board: phytec: common: Kconfig: Enable SUPPORT_EXTENSION_SCAN Daniel Schultz
2024-07-08 6:07 ` [PATCH 5/6] configs: phytec_am62x_a53_defconfig: Set CONFIG_CMD_EXTENSION Daniel Schultz
2024-07-08 6:07 ` [PATCH 6/6] configs: phycore_am64x_a53_defconfig: Enable SOM detection Daniel Schultz
2024-07-09 7:16 ` [PATCH 0/6] Extend " Daniel Schultz
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.