* [PATCH v2 00/12] ARM: Layerscape: LS1046a: switch to TF-A
@ 2024-10-22 7:46 Sascha Hauer
2024-10-22 7:46 ` [PATCH v2 01/12] ARM: Layerscape: TQMLS1046a: Update DDR timings Sascha Hauer
` (12 more replies)
0 siblings, 13 replies; 15+ messages in thread
From: Sascha Hauer @ 2024-10-22 7:46 UTC (permalink / raw)
To: open list:BAREBOX; +Cc: Ahmad Fatoum
Our LS1046a support still uses the long deprecated and binary-only PPA
secure monitor firmware. It's time to switch this over to TF-A. We do
not bother to keep the PPA support as it's long outdated and it would
also make the code code and barebox configuration unnecessarily
complicated.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
Changes in v2:
- add missing FORCE in images/Makefile.layerscape
- drop -16 cargo cult when setting up a stack
- use pr_debug rather than printf
- add TF-A firmware to test/generate-dummy-fw.sh
- drop ppA firmware from test/generate-dummy-fw.sh
- update documentation
- disable CAAM JR3 for the kernel, it's used by TF-A
- Link to v1: https://lore.barebox.org/20241021-arm-layerscape-tfa-v1-0-0980697b6f66@pengutronix.de
---
Sascha Hauer (12):
ARM: Layerscape: TQMLS1046a: Update DDR timings
ARM: Layerscape: images: fix variable name
ARM: Layerscape: images: add missing FORCE
ARM: Layerscape: TQMLS1046a: add support for 8GiB variant
ARM: Layerscape: ls1046ardb: remove unused variable
ARM: Layerscape: remove register arguments
ARM: Layerscape: LS1046a: add TF-A support
ARM: Layerscape: LS1046a-rdb: Switch to TF-A support
ARM: Layerscape: TQMLS1046a: Switch to TF-A support
ARM: Layerscape: LS1046a: remove PPA support
ARM: Layerscape: LS1046a: add PSCI node
ARM: Layerscape: Update Documentation for TF-A
Documentation/boards/layerscape.rst | 13 +-
arch/arm/boards/ls1021aiot/lowlevel.c | 6 +-
arch/arm/boards/ls1046ardb/board.c | 6 -
arch/arm/boards/ls1046ardb/lowlevel.c | 29 ++-
arch/arm/boards/ls1046ardb/start.S | 14 +-
arch/arm/boards/tqmls1046a/board.c | 37 +++-
arch/arm/boards/tqmls1046a/lowlevel.c | 327 ++++++++++++++++++++++++++++++----
arch/arm/boards/tqmls1046a/start.S | 19 +-
arch/arm/dts/fsl-ls1046a.dtsi | 5 +
arch/arm/mach-layerscape/Kconfig | 14 +-
arch/arm/mach-layerscape/Makefile | 2 +-
arch/arm/mach-layerscape/ppa-entry.S | 32 ----
arch/arm/mach-layerscape/ppa.c | 147 ---------------
arch/arm/mach-layerscape/soc.c | 32 ++++
arch/arm/mach-layerscape/tfa.c | 32 ++++
arch/arm/mach-layerscape/xload-qspi.c | 19 +-
arch/arm/mach-layerscape/xload.c | 12 +-
drivers/mci/imx-esdhc-pbl.c | 13 +-
firmware/Kconfig | 3 +
firmware/Makefile | 2 +-
images/Makefile.layerscape | 36 ++--
include/mach/layerscape/layerscape.h | 11 +-
include/mach/layerscape/xload.h | 16 +-
test/generate-dummy-fw.sh | 2 +-
24 files changed, 516 insertions(+), 313 deletions(-)
---
base-commit: dda64a15ea026c95ccd8bd8a8b70c7e070af1a15
change-id: 20241021-arm-layerscape-tfa-74bb4fe5713e
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 01/12] ARM: Layerscape: TQMLS1046a: Update DDR timings
2024-10-22 7:46 [PATCH v2 00/12] ARM: Layerscape: LS1046a: switch to TF-A Sascha Hauer
@ 2024-10-22 7:46 ` Sascha Hauer
2024-10-22 7:46 ` [PATCH v2 02/12] ARM: Layerscape: images: fix variable name Sascha Hauer
` (11 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Sascha Hauer @ 2024-10-22 7:46 UTC (permalink / raw)
To: open list:BAREBOX
Update DDR timings from TQ U-Boot.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/tqmls1046a/lowlevel.c | 54 +++++++++++++++++------------------
1 file changed, 27 insertions(+), 27 deletions(-)
diff --git a/arch/arm/boards/tqmls1046a/lowlevel.c b/arch/arm/boards/tqmls1046a/lowlevel.c
index 2551a18ec6..6d25b5cda8 100644
--- a/arch/arm/boards/tqmls1046a/lowlevel.c
+++ b/arch/arm/boards/tqmls1046a/lowlevel.c
@@ -38,43 +38,43 @@ static struct fsl_ddr_controller ddrc[] = {
.cs[3].config = 0x00000000,
.cs[3].config_2 = 0x00000000,
.timing_cfg_3 = 0x020F1100,
- .timing_cfg_0 = 0x77660008,
- .timing_cfg_1 = 0xF1FCC265,
- .timing_cfg_2 = 0x0059415E,
- .ddr_sdram_cfg = 0x65000000,
+ .timing_cfg_0 = 0xF7660008,
+ .timing_cfg_1 = 0xF1FC4178,
+ .timing_cfg_2 = 0x00590160,
+ .ddr_sdram_cfg = 0x65000008,
.ddr_sdram_cfg_2 = 0x00401150,
- .ddr_sdram_cfg_3 = 0x00000000,
- .ddr_sdram_mode = 0x03010625,
+ .ddr_sdram_cfg_3 = 0x40000000,
+ .ddr_sdram_mode = 0x01030631,
.ddr_sdram_mode_2 = 0x00100200,
- .ddr_sdram_mode_3 = 0x00010625,
- .ddr_sdram_mode_4 = 0x00100200,
- .ddr_sdram_mode_5 = 0x00010625,
- .ddr_sdram_mode_6 = 0x00100200,
- .ddr_sdram_mode_7 = 0x00010625,
- .ddr_sdram_mode_8 = 0x00100200,
+ .ddr_sdram_mode_3 = 0x00000000,
+ .ddr_sdram_mode_4 = 0x00000000,
+ .ddr_sdram_mode_5 = 0x00000000,
+ .ddr_sdram_mode_6 = 0x00000000,
+ .ddr_sdram_mode_7 = 0x00000000,
+ .ddr_sdram_mode_8 = 0x00000000,
.ddr_sdram_mode_9 = 0x00000500,
- .ddr_sdram_mode_10 = 0x04400000,
- .ddr_sdram_mode_11 = 0x00000400,
- .ddr_sdram_mode_12 = 0x04400000,
- .ddr_sdram_mode_13 = 0x00000400,
- .ddr_sdram_mode_14 = 0x04400000,
- .ddr_sdram_mode_15 = 0x00000400,
- .ddr_sdram_mode_16 = 0x04400000,
- .ddr_sdram_interval = 0x0F3C0000,
+ .ddr_sdram_mode_10 = 0x08800000,
+ .ddr_sdram_mode_11 = 0x00000000,
+ .ddr_sdram_mode_12 = 0x00000000,
+ .ddr_sdram_mode_13 = 0x00000000,
+ .ddr_sdram_mode_14 = 0x00000000,
+ .ddr_sdram_mode_15 = 0x00000000,
+ .ddr_sdram_mode_16 = 0x00000000,
+ .ddr_sdram_interval = 0x0F3C079E,
.ddr_data_init = 0xDEADBEEF,
- .ddr_sdram_clk_cntl = 0x02000000,
+ .ddr_sdram_clk_cntl = 0x03000000,
.ddr_init_addr = 0x00000000,
.ddr_init_ext_addr = 0x00000000,
- .timing_cfg_4 = 0x00224002,
- .timing_cfg_5 = 0x04401400,
+ .timing_cfg_4 = 0x00220002,
+ .timing_cfg_5 = 0x00000000,
.timing_cfg_6 = 0x00000000,
.timing_cfg_7 = 0x25500000,
- .timing_cfg_8 = 0x03335A00,
+ .timing_cfg_8 = 0x05447A00,
.timing_cfg_9 = 0x00000000,
.ddr_zq_cntl = 0x8A090705,
- .ddr_wrlvl_cntl = 0x86550609,
- .ddr_wrlvl_cntl_2 = 0x09080806,
- .ddr_wrlvl_cntl_3 = 0x06040409,
+ .ddr_wrlvl_cntl = 0x8605070A,
+ .ddr_wrlvl_cntl_2 = 0x0A080807,
+ .ddr_wrlvl_cntl_3 = 0x0706060A,
.ddr_sr_cntr = 0x00000000,
.ddr_sdram_rcw_1 = 0x00000000,
.ddr_sdram_rcw_2 = 0x00000000,
--
2.39.5
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 02/12] ARM: Layerscape: images: fix variable name
2024-10-22 7:46 [PATCH v2 00/12] ARM: Layerscape: LS1046a: switch to TF-A Sascha Hauer
2024-10-22 7:46 ` [PATCH v2 01/12] ARM: Layerscape: TQMLS1046a: Update DDR timings Sascha Hauer
@ 2024-10-22 7:46 ` Sascha Hauer
2024-10-22 7:46 ` [PATCH v2 03/12] ARM: Layerscape: images: add missing FORCE Sascha Hauer
` (10 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Sascha Hauer @ 2024-10-22 7:46 UTC (permalink / raw)
To: open list:BAREBOX
pbl-y doesn't exist as variable and is unused. What was meant here is
pblb-y and it should contain the name of the entry function.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
images/Makefile.layerscape | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/images/Makefile.layerscape b/images/Makefile.layerscape
index 9cb88270d7..fb2dfe67d1 100644
--- a/images/Makefile.layerscape
+++ b/images/Makefile.layerscape
@@ -21,7 +21,7 @@ quiet_cmd_lspbl_spi_image = LSPBL-SPI-IMG $@
$(objtree)/scripts/pblimage -o $@ -r $(lspbl-rcw-tmp) -s \
-c $(2) -m $($(patsubst $(obj)/%.pblb,PBL_CODE_SIZE_%,$<)) -p $(lspbl-pbi-tmp) -i $<
-pbl-$(CONFIG_MACH_LS1028ARDB) += start_ls1028ardb.pbl
+pblb-$(CONFIG_MACH_LS1028ARDB) += start_ls1028ardb
$(obj)/barebox-ls1028ardb-sd.image: $(obj)/start_ls1028ardb.pblb \
$(board)/ls1028ardb/ls1028ardb_rcw_sd.cfg \
@@ -30,7 +30,7 @@ $(obj)/barebox-ls1028ardb-sd.image: $(obj)/start_ls1028ardb.pblb \
image-$(CONFIG_MACH_LS1028ARDB) += barebox-ls1028ardb-sd.image
-pbl-$(CONFIG_MACH_LS1046ARDB) += start_ls1046ardb.pbl
+pblb-$(CONFIG_MACH_LS1046ARDB) += start_ls1046ardb
$(obj)/barebox-ls1046ardb-sd.image: $(obj)/start_ls1046ardb.pblb \
$(board)/ls1046ardb/ls1046ardb_rcw_sd.cfg \
@@ -50,7 +50,7 @@ $(obj)/barebox-ls1046ardb-qspi.image: $(obj)/start_ls1046ardb.pblb \
image-$(CONFIG_MACH_LS1046ARDB) += barebox-ls1046ardb-sd.image barebox-ls1046ardb-qspi.image \
barebox-ls1046ardb-emmc.image
-pbl-$(CONFIG_MACH_TQMLS1046A) += start_tqmls1046a.pbl
+pblb-$(CONFIG_MACH_TQMLS1046A) += start_tqmls1046a
$(obj)/barebox-tqmls1046a-sd.image: $(obj)/start_tqmls1046a.pblb \
$(board)/tqmls1046a/tqmls1046a_rcw_sd_3333_5559.cfg \
@@ -65,7 +65,7 @@ $(obj)/barebox-tqmls1046a-qspi.image: $(obj)/start_tqmls1046a.pblb \
image-$(CONFIG_MACH_TQMLS1046A) += barebox-tqmls1046a-sd.image \
barebox-tqmls1046a-qspi.image
-pbl-$(CONFIG_MACH_LS1021AIOT) += start_ls1021aiot.pbl
+pblb-$(CONFIG_MACH_LS1021AIOT) += start_ls1021aiot
$(obj)/barebox-ls1021aiot-qspi.image: $(obj)/start_ls1021aiot.pblb \
$(board)/ls1021aiot/ls102xa_rcw_sd_qspi.cfg \
--
2.39.5
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 03/12] ARM: Layerscape: images: add missing FORCE
2024-10-22 7:46 [PATCH v2 00/12] ARM: Layerscape: LS1046a: switch to TF-A Sascha Hauer
2024-10-22 7:46 ` [PATCH v2 01/12] ARM: Layerscape: TQMLS1046a: Update DDR timings Sascha Hauer
2024-10-22 7:46 ` [PATCH v2 02/12] ARM: Layerscape: images: fix variable name Sascha Hauer
@ 2024-10-22 7:46 ` Sascha Hauer
2024-10-22 7:46 ` [PATCH v2 04/12] ARM: Layerscape: TQMLS1046a: add support for 8GiB variant Sascha Hauer
` (9 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Sascha Hauer @ 2024-10-22 7:46 UTC (permalink / raw)
To: open list:BAREBOX
if_changed should be used in conjunction with FORCE to make sure the
command is executed when the command line has changed.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
images/Makefile.layerscape | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/images/Makefile.layerscape b/images/Makefile.layerscape
index fb2dfe67d1..4e0c659d51 100644
--- a/images/Makefile.layerscape
+++ b/images/Makefile.layerscape
@@ -25,7 +25,7 @@ pblb-$(CONFIG_MACH_LS1028ARDB) += start_ls1028ardb
$(obj)/barebox-ls1028ardb-sd.image: $(obj)/start_ls1028ardb.pblb \
$(board)/ls1028ardb/ls1028ardb_rcw_sd.cfg \
- $(board)/ls1028ardb/ls1028ardb_pbi.cfg
+ $(board)/ls1028ardb/ls1028ardb_pbi.cfg FORCE
$(call if_changed,lspbl_image,ls1028a)
image-$(CONFIG_MACH_LS1028ARDB) += barebox-ls1028ardb-sd.image
@@ -34,17 +34,17 @@ pblb-$(CONFIG_MACH_LS1046ARDB) += start_ls1046ardb
$(obj)/barebox-ls1046ardb-sd.image: $(obj)/start_ls1046ardb.pblb \
$(board)/ls1046ardb/ls1046ardb_rcw_sd.cfg \
- $(board)/ls1046ardb/ls1046ardb_pbi.cfg
+ $(board)/ls1046ardb/ls1046ardb_pbi.cfg FORCE
$(call if_changed,lspbl_image,ls1046a)
$(obj)/barebox-ls1046ardb-emmc.image: $(obj)/start_ls1046ardb.pblb \
$(board)/ls1046ardb/ls1046ardb_rcw_emmc.cfg \
- $(board)/ls1046ardb/ls1046ardb_pbi.cfg
+ $(board)/ls1046ardb/ls1046ardb_pbi.cfg FORCE
$(call if_changed,lspbl_image,ls1046a)
$(obj)/barebox-ls1046ardb-qspi.image: $(obj)/start_ls1046ardb.pblb \
$(board)/ls1046ardb/ls1046ardb_rcw_qspi.cfg \
- $(board)/ls1046ardb/ls1046ardb_pbi.cfg
+ $(board)/ls1046ardb/ls1046ardb_pbi.cfg FORCE
$(call if_changed,lspbl_spi_image,ls1046a)
image-$(CONFIG_MACH_LS1046ARDB) += barebox-ls1046ardb-sd.image barebox-ls1046ardb-qspi.image \
@@ -54,12 +54,12 @@ pblb-$(CONFIG_MACH_TQMLS1046A) += start_tqmls1046a
$(obj)/barebox-tqmls1046a-sd.image: $(obj)/start_tqmls1046a.pblb \
$(board)/tqmls1046a/tqmls1046a_rcw_sd_3333_5559.cfg \
- $(board)/tqmls1046a/tqmls1046a_pbi.cfg
+ $(board)/tqmls1046a/tqmls1046a_pbi.cfg FORCE
$(call if_changed,lspbl_image,ls1046a)
$(obj)/barebox-tqmls1046a-qspi.image: $(obj)/start_tqmls1046a.pblb \
$(board)/tqmls1046a/tqmls1046a_rcw_qspi_3333_5559.cfg \
- $(board)/tqmls1046a/tqmls1046a_pbi.cfg
+ $(board)/tqmls1046a/tqmls1046a_pbi.cfg FORCE
$(call if_changed,lspbl_spi_image,ls1046a)
image-$(CONFIG_MACH_TQMLS1046A) += barebox-tqmls1046a-sd.image \
@@ -69,7 +69,7 @@ pblb-$(CONFIG_MACH_LS1021AIOT) += start_ls1021aiot
$(obj)/barebox-ls1021aiot-qspi.image: $(obj)/start_ls1021aiot.pblb \
$(board)/ls1021aiot/ls102xa_rcw_sd_qspi.cfg \
- $(board)/ls1021aiot/ls102xa_pbi.cfg
+ $(board)/ls1021aiot/ls102xa_pbi.cfg FORCE
$(call if_changed,lspbl_spi_image,ls1046a)
image-$(CONFIG_MACH_LS1021AIOT) += barebox-ls1021aiot-qspi.image
--
2.39.5
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 04/12] ARM: Layerscape: TQMLS1046a: add support for 8GiB variant
2024-10-22 7:46 [PATCH v2 00/12] ARM: Layerscape: LS1046a: switch to TF-A Sascha Hauer
` (2 preceding siblings ...)
2024-10-22 7:46 ` [PATCH v2 03/12] ARM: Layerscape: images: add missing FORCE Sascha Hauer
@ 2024-10-22 7:46 ` Sascha Hauer
2024-10-22 7:46 ` [PATCH v2 05/12] ARM: Layerscape: ls1046ardb: remove unused variable Sascha Hauer
` (8 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Sascha Hauer @ 2024-10-22 7:46 UTC (permalink / raw)
To: open list:BAREBOX
The tqmls1046a also has a 8GiB DDR variant. This patch adds support for
this variant as an additional image with suffix _8g in the name.
The 8GiB boards use two different types of DDR chips which can be
distinguished by reading the EEPROM. There is one regular version which
has the string "TQMLS1046A-P2.0201" is the EEPROM. The other one is
possibly only used for Arkona and has the string "TQMLS1046A-CA.0202"
in the EEPROM. There might be other possible strings we are currently
not aware of, we fall back to the P2 variant in this case.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/tqmls1046a/board.c | 32 ++++-
arch/arm/boards/tqmls1046a/lowlevel.c | 237 +++++++++++++++++++++++++++++++++-
arch/arm/boards/tqmls1046a/start.S | 5 +
images/Makefile.layerscape | 16 ++-
include/mach/layerscape/layerscape.h | 1 +
5 files changed, 278 insertions(+), 13 deletions(-)
diff --git a/arch/arm/boards/tqmls1046a/board.c b/arch/arm/boards/tqmls1046a/board.c
index 36bcae6bc0..d30cd37747 100644
--- a/arch/arm/boards/tqmls1046a/board.c
+++ b/arch/arm/boards/tqmls1046a/board.c
@@ -13,22 +13,38 @@
#include <mach/layerscape/bbu.h>
#include <mach/layerscape/layerscape.h>
-static int tqmls1046a_mem_init(void)
+static void ls1046a_add_memory(void)
{
+ u32 cs0_bnds;
+ u64 memsize, lower, upper;
int ret;
- if (!of_machine_is_compatible("tq,ls1046a-tqmls1046a"))
- return 0;
+ cs0_bnds = in_be32(LS1046A_DDRC_BASE);
+ switch (cs0_bnds) {
+ case 0x1ff:
+ memsize = SZ_8G;
+ break;
+ case 0x7f:
+ memsize = SZ_2G;
+ break;
+ default:
+ pr_err("Unexpected cs0_bnds: 0x%08x\n", cs0_bnds);
+ memsize = SZ_2G;
+ break;
+ }
+
+ lower = min_t(u64, memsize, SZ_2G);
+ arm_add_mem_device("ram0", 0x80000000, lower);
- arm_add_mem_device("ram0", 0x80000000, SZ_2G);
+ if (memsize > lower) {
+ upper = memsize - lower;
+ arm_add_mem_device("ram1", 0x880000000, upper);
+ }
ret = ls1046a_ppa_init(0x100000000 - SZ_64M, SZ_64M);
if (ret)
pr_err("Failed to initialize PPA firmware: %s\n", strerror(-ret));
-
- return 0;
}
-mem_initcall(tqmls1046a_mem_init);
static int tqmls1046a_postcore_init(void)
{
@@ -39,6 +55,8 @@ static int tqmls1046a_postcore_init(void)
if (!of_machine_is_compatible("tq,ls1046a-tqmls1046a"))
return 0;
+ ls1046a_add_memory();
+
defaultenv_append_directory(defaultenv_tqmls1046a);
/* Configure iomux for i2c4 */
diff --git a/arch/arm/boards/tqmls1046a/lowlevel.c b/arch/arm/boards/tqmls1046a/lowlevel.c
index 6d25b5cda8..9f471d001e 100644
--- a/arch/arm/boards/tqmls1046a/lowlevel.c
+++ b/arch/arm/boards/tqmls1046a/lowlevel.c
@@ -13,7 +13,7 @@
#include <mach/layerscape/xload.h>
#include <mach/layerscape/layerscape.h>
-static struct fsl_ddr_controller ddrc[] = {
+static struct fsl_ddr_controller tqmls1046a_ddrc[] = {
{
.memctl_opts.ddrtype = SDRAM_TYPE_DDR4,
.base = IOMEM(LSCH2_DDR_ADDR),
@@ -90,11 +90,222 @@ static struct fsl_ddr_controller ddrc[] = {
},
};
+static struct fsl_ddr_controller tqmls1046a_ddrc_8g[] = {
+ {
+ .memctl_opts.ddrtype = SDRAM_TYPE_DDR4,
+ .base = IOMEM(LSCH2_DDR_ADDR),
+ .ddr_freq = LS1046A_DDR_FREQ,
+ .erratum_A008511 = 1,
+ .erratum_A009803 = 1,
+ .erratum_A010165 = 1,
+ .erratum_A009801 = 1,
+ .erratum_A009942 = 1,
+ .chip_selects_per_ctrl = 4,
+ .fsl_ddr_config_reg = {
+ .cs[0].bnds = 0x000001FF,
+ .cs[0].config = 0x80010422,
+ .cs[0].config_2 = 0x00000000,
+ .cs[1].bnds = 0x00000000,
+ .cs[1].config = 0x00000000,
+ .cs[1].config_2 = 0x00000000,
+ .cs[2].bnds = 0x00000000,
+ .cs[2].config = 0x00000000,
+ .cs[2].config_2 = 0x00000000,
+ .cs[3].bnds = 0x00000000,
+ .cs[3].config = 0x00000000,
+ .cs[3].config_2 = 0x00000000,
+ .timing_cfg_3 = 0x020F1100,
+ .timing_cfg_0 = 0xF7660008,
+ .timing_cfg_1 = 0xF1FCC178,
+ .timing_cfg_2 = 0x00590160,
+ .ddr_sdram_cfg = 0x65000008,
+ .ddr_sdram_cfg_2 = 0x00401150,
+ .ddr_sdram_cfg_3 = 0x40000000,
+ .ddr_sdram_mode = 0x01030631,
+ .ddr_sdram_mode_2 = 0x00100200,
+ .ddr_sdram_mode_3 = 0x00000000,
+ .ddr_sdram_mode_4 = 0x00000000,
+ .ddr_sdram_mode_5 = 0x00000000,
+ .ddr_sdram_mode_6 = 0x00000000,
+ .ddr_sdram_mode_7 = 0x00000000,
+ .ddr_sdram_mode_8 = 0x00000000,
+ .ddr_sdram_mode_9 = 0x00000500,
+ .ddr_sdram_mode_10 = 0x08800000,
+ .ddr_sdram_mode_11 = 0x00000000,
+ .ddr_sdram_mode_12 = 0x00000000,
+ .ddr_sdram_mode_13 = 0x00000000,
+ .ddr_sdram_mode_14 = 0x00000000,
+ .ddr_sdram_mode_15 = 0x00000000,
+ .ddr_sdram_mode_16 = 0x00000000,
+ .ddr_sdram_interval = 0x0F3C079E,
+ .ddr_data_init = 0xDEADBEEF,
+ .ddr_sdram_clk_cntl = 0x03000000,
+ .ddr_init_addr = 0x00000000,
+ .ddr_init_ext_addr = 0x00000000,
+ .timing_cfg_4 = 0x00220002,
+ .timing_cfg_5 = 0x00000000,
+ .timing_cfg_6 = 0x00000000,
+ .timing_cfg_7 = 0x25500000,
+ .timing_cfg_8 = 0x05447A00,
+ .timing_cfg_9 = 0x00000000,
+ .ddr_zq_cntl = 0x8A090705,
+ .ddr_wrlvl_cntl = 0x8605070A,
+ .ddr_wrlvl_cntl_2 = 0x0A080807,
+ .ddr_wrlvl_cntl_3 = 0x0706060A,
+ .ddr_sr_cntr = 0x00000000,
+ .ddr_sdram_rcw_1 = 0x00000000,
+ .ddr_sdram_rcw_2 = 0x00000000,
+ .ddr_sdram_rcw_3 = 0x00000000,
+ .ddr_cdr1 = 0x80080000,
+ .ddr_cdr2 = 0x000000C0,
+ .dq_map_0 = 0x00000000,
+ .dq_map_1 = 0x00000000,
+ .dq_map_2 = 0x00000000,
+ .dq_map_3 = 0x00000000,
+ .debug[28] = 0x00700046,
+ },
+ },
+};
+
+static struct fsl_ddr_controller tqmls1046a_ddrc_8g_ca[] = {
+ {
+ .memctl_opts.ddrtype = SDRAM_TYPE_DDR4,
+ .base = IOMEM(LSCH2_DDR_ADDR),
+ .ddr_freq = LS1046A_DDR_FREQ,
+ .erratum_A008511 = 1,
+ .erratum_A009803 = 1,
+ .erratum_A010165 = 1,
+ .erratum_A009801 = 1,
+ .erratum_A009942 = 1,
+ .chip_selects_per_ctrl = 4,
+ .fsl_ddr_config_reg = {
+ .cs[0].bnds = 0x000001FF,
+ .cs[0].config = 0x80010422,
+ .cs[0].config = 0x80010512,
+ .cs[0].config_2 = 0x00000000,
+ .cs[1].bnds = 0x00000000,
+ .cs[1].config = 0x00000000,
+ .cs[1].config_2 = 0x00000000,
+ .cs[2].bnds = 0x00000000,
+ .cs[2].config = 0x00000000,
+ .cs[2].config_2 = 0x00000000,
+ .cs[3].bnds = 0x00000000,
+ .cs[3].config = 0x00000000,
+ .cs[3].config_2 = 0x00000000,
+ .timing_cfg_3 = 0x12551100,
+ .timing_cfg_0 = 0xA0660008,
+ .timing_cfg_1 = 0x060E6278,
+ .timing_cfg_2 = 0x0058625E,
+ .ddr_sdram_cfg = 0x65200008,
+ .ddr_sdram_cfg_2 = 0x00401070,
+ .ddr_sdram_cfg_3 = 0x40000000,
+ .ddr_sdram_mode = 0x05030635,
+ .ddr_sdram_mode_2 = 0x00100000,
+ .ddr_sdram_mode_3 = 0x00000000,
+ .ddr_sdram_mode_4 = 0x00000000,
+ .ddr_sdram_mode_5 = 0x00000000,
+ .ddr_sdram_mode_6 = 0x00000000,
+ .ddr_sdram_mode_7 = 0x00000000,
+ .ddr_sdram_mode_8 = 0x00000000,
+ .ddr_sdram_mode_9 = 0x00000701,
+ .ddr_sdram_mode_10 = 0x08800000,
+ .ddr_sdram_mode_11 = 0x00000000,
+ .ddr_sdram_mode_12 = 0x00000000,
+ .ddr_sdram_mode_13 = 0x00000000,
+ .ddr_sdram_mode_14 = 0x00000000,
+ .ddr_sdram_mode_15 = 0x00000000,
+ .ddr_sdram_mode_16 = 0x00000000,
+ .ddr_sdram_interval = 0x0F3C079E,
+ .ddr_data_init = 0xDEADBEEF,
+ .ddr_sdram_clk_cntl = 0x02400000,
+ .ddr_init_addr = 0x00000000,
+ .ddr_init_ext_addr = 0x00000000,
+ .timing_cfg_4 = 0x00224502,
+ .timing_cfg_5 = 0x06401400,
+ .timing_cfg_6 = 0x00000000,
+ .timing_cfg_7 = 0x25540000,
+ .timing_cfg_8 = 0x06445A00,
+ .timing_cfg_9 = 0x00000000,
+ .ddr_zq_cntl = 0x8A090705,
+ .ddr_wrlvl_cntl = 0x86750608,
+ .ddr_wrlvl_cntl_2 = 0x07070605,
+ .ddr_wrlvl_cntl_3 = 0x05040407,
+ .ddr_sr_cntr = 0x00000000,
+ .ddr_sdram_rcw_1 = 0x00000000,
+ .ddr_sdram_rcw_2 = 0x00000000,
+ .ddr_sdram_rcw_3 = 0x00000000,
+ .ddr_cdr1 = 0x80080000,
+ .ddr_cdr2 = 0x00000080,
+ .dq_map_0 = 0x06106104,
+ .dq_map_1 = 0x84184184,
+ .dq_map_2 = 0x06106104,
+ .dq_map_3 = 0x84184000,
+ .debug[28] = 0x00700046,
+ },
+ },
+};
+
+#define TQ_VARIANT_LEN 18
+#define TQ_VARIANT_TQMLS1046A_P2 0
+#define TQ_VARIANT_TQMLS1046A_CA 1
+
+static int tqmls1046a_get_variant(void)
+{
+ struct pbl_i2c *i2c;
+ unsigned char buf[TQ_VARIANT_LEN + 1] = { 0 };
+ uint8_t pos = 0x40;
+ int ret;
+ int variant = TQ_VARIANT_TQMLS1046A_P2;
+ struct i2c_msg msg[] = {
+ {
+ .addr = 0x50,
+ .len = 1,
+ .buf = &pos,
+ }, {
+ .addr = 0x50,
+ .len = TQ_VARIANT_LEN,
+ .flags = I2C_M_RD,
+ .buf = (void *)&buf,
+ }
+ };
+
+ i2c = ls1046_i2c_init(IOMEM(LSCH2_I2C1_BASE_ADDR));
+
+ ret = pbl_i2c_xfer(i2c, msg, ARRAY_SIZE(msg));
+ if (ret != ARRAY_SIZE(msg)) {
+ pr_err("I2C EEPROM read failed: %d\n", ret);
+ goto out;
+ }
+
+ if (buf[0] == 0xff) {
+ pr_err("Erased EEPROM detected\n");
+ goto out;
+ }
+
+ pr_debug("Board Variant: %s\n", buf);
+
+ if (!strcmp(buf, "TQMLS1046A-CA.0202")) {
+ variant = TQ_VARIANT_TQMLS1046A_CA;
+ goto out;
+ }
+
+ if (!strcmp(buf, "TQMLS1046A-P2.0201")) {
+ variant = TQ_VARIANT_TQMLS1046A_P2;
+ goto out;
+ }
+
+ pr_err("Unknown board variant, using default\n");
+
+out:
+ return variant;
+}
+
extern char __dtb_z_fsl_ls1046a_tqmls1046a_mbls10xxa_start[];
-static noinline __noreturn void tqmls1046a_r_entry(void)
+static noinline __noreturn void tqmls1046a_r_entry(bool is_8g)
{
unsigned long membase = LS1046A_DDR_SDRAM_BASE;
+ int board_variant = 0;
if (get_pc() >= membase)
barebox_arm_entry(membase, 0x80000000 - SZ_64M,
@@ -108,7 +319,15 @@ static noinline __noreturn void tqmls1046a_r_entry(void)
udelay(500);
putc_ll('>');
- fsl_ddr_set_memctl_regs(&ddrc[0], 0, false);
+ if (is_8g) {
+ board_variant = tqmls1046a_get_variant();
+ if (board_variant == TQ_VARIANT_TQMLS1046A_CA)
+ fsl_ddr_set_memctl_regs(&tqmls1046a_ddrc_8g_ca[0], 0, false);
+ else
+ fsl_ddr_set_memctl_regs(&tqmls1046a_ddrc_8g[0], 0, false);
+ } else {
+ fsl_ddr_set_memctl_regs(&tqmls1046a_ddrc[0], 0, false);
+ }
ls1046a_errata_post_ddr();
@@ -126,5 +345,15 @@ __noreturn void tqmls1046a_entry(unsigned long r0, unsigned long r1, unsigned lo
relocate_to_current_adr();
setup_c();
- tqmls1046a_r_entry();
+ tqmls1046a_r_entry(false);
+}
+
+void tqmls1046a_8g_entry(unsigned long r0, unsigned long r1, unsigned long r2);
+
+__noreturn void tqmls1046a_8g_entry(unsigned long r0, unsigned long r1, unsigned long r2)
+{
+ relocate_to_current_adr();
+ setup_c();
+
+ tqmls1046a_r_entry(true);
}
diff --git a/arch/arm/boards/tqmls1046a/start.S b/arch/arm/boards/tqmls1046a/start.S
index 12b785af54..84c4626880 100644
--- a/arch/arm/boards/tqmls1046a/start.S
+++ b/arch/arm/boards/tqmls1046a/start.S
@@ -10,3 +10,8 @@ ENTRY_PROC(start_tqmls1046a)
b tqmls1046a_entry
ENTRY_PROC_END(start_tqmls1046a)
+ENTRY_PROC(start_tqmls1046a_8g)
+ mov x3, #STACK_TOP
+ mov sp, x3
+ b tqmls1046a_8g_entry
+ENTRY_PROC_END(start_tqmls1046a_8g)
diff --git a/images/Makefile.layerscape b/images/Makefile.layerscape
index 4e0c659d51..f62d8fe826 100644
--- a/images/Makefile.layerscape
+++ b/images/Makefile.layerscape
@@ -50,7 +50,7 @@ $(obj)/barebox-ls1046ardb-qspi.image: $(obj)/start_ls1046ardb.pblb \
image-$(CONFIG_MACH_LS1046ARDB) += barebox-ls1046ardb-sd.image barebox-ls1046ardb-qspi.image \
barebox-ls1046ardb-emmc.image
-pblb-$(CONFIG_MACH_TQMLS1046A) += start_tqmls1046a
+pblb-$(CONFIG_MACH_TQMLS1046A) += start_tqmls1046a start_tqmls1046a_8g
$(obj)/barebox-tqmls1046a-sd.image: $(obj)/start_tqmls1046a.pblb \
$(board)/tqmls1046a/tqmls1046a_rcw_sd_3333_5559.cfg \
@@ -62,8 +62,20 @@ $(obj)/barebox-tqmls1046a-qspi.image: $(obj)/start_tqmls1046a.pblb \
$(board)/tqmls1046a/tqmls1046a_pbi.cfg FORCE
$(call if_changed,lspbl_spi_image,ls1046a)
+$(obj)/barebox-tqmls1046a-8g-sd.image: $(obj)/start_tqmls1046a_8g.pblb \
+ $(board)/tqmls1046a/tqmls1046a_rcw_sd_3333_5559.cfg \
+ $(board)/tqmls1046a/tqmls1046a_pbi.cfg FORCE
+ $(call if_changed,lspbl_image,ls1046a)
+
+$(obj)/barebox-tqmls1046a-8g-qspi.image: $(obj)/start_tqmls1046a_8g.pblb \
+ $(board)/tqmls1046a/tqmls1046a_rcw_qspi_3333_5559.cfg \
+ $(board)/tqmls1046a/tqmls1046a_pbi.cfg FORCE
+ $(call if_changed,lspbl_spi_image,ls1046a)
+
image-$(CONFIG_MACH_TQMLS1046A) += barebox-tqmls1046a-sd.image \
- barebox-tqmls1046a-qspi.image
+ barebox-tqmls1046a-qspi.image \
+ barebox-tqmls1046a-8g-sd.image \
+ barebox-tqmls1046a-8g-qspi.image
pblb-$(CONFIG_MACH_LS1021AIOT) += start_ls1021aiot
diff --git a/include/mach/layerscape/layerscape.h b/include/mach/layerscape/layerscape.h
index bf4a751b92..7f9dc7d8a1 100644
--- a/include/mach/layerscape/layerscape.h
+++ b/include/mach/layerscape/layerscape.h
@@ -7,6 +7,7 @@
#define LS1046A_DDR_SDRAM_BASE 0x80000000
#define LS1046A_DDR_FREQ 2100000000
+#define LS1046A_DDRC_BASE 0x01080000
#define LS1021A_DDR_SDRAM_BASE 0x80000000
#define LS1021A_DDR_FREQ 1600000000
--
2.39.5
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 05/12] ARM: Layerscape: ls1046ardb: remove unused variable
2024-10-22 7:46 [PATCH v2 00/12] ARM: Layerscape: LS1046a: switch to TF-A Sascha Hauer
` (3 preceding siblings ...)
2024-10-22 7:46 ` [PATCH v2 04/12] ARM: Layerscape: TQMLS1046a: add support for 8GiB variant Sascha Hauer
@ 2024-10-22 7:46 ` Sascha Hauer
2024-10-22 7:46 ` [PATCH v2 06/12] ARM: Layerscape: remove register arguments Sascha Hauer
` (7 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Sascha Hauer @ 2024-10-22 7:46 UTC (permalink / raw)
To: open list:BAREBOX
memsize is set with the value returned from fsl_ddr_sdram(), then passed
through r0 to the full barebox binary where it is then finally unused.
Just remove the variable. The real memory amount is hardcoded in the
board code anyway.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/ls1046ardb/lowlevel.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/arch/arm/boards/ls1046ardb/lowlevel.c b/arch/arm/boards/ls1046ardb/lowlevel.c
index c2d3a526bc..9c3f1a8375 100644
--- a/arch/arm/boards/ls1046ardb/lowlevel.c
+++ b/arch/arm/boards/ls1046ardb/lowlevel.c
@@ -184,16 +184,13 @@ static struct fsl_ddr_info ls1046a_info = {
.c = ddrc,
};
-static noinline __noreturn void ls1046ardb_r_entry(unsigned long memsize)
+static noinline __noreturn void ls1046ardb_r_entry(void)
{
unsigned long membase = LS1046A_DDR_SDRAM_BASE;
struct pbl_i2c *i2c;
int ret;
if (get_pc() >= membase) {
- if (memsize + membase >= 0x100000000)
- memsize = 0x100000000 - membase;
-
barebox_arm_entry(membase, 0x80000000 - SZ_64M,
__dtb_z_fsl_ls1046a_rdb_start);
}
@@ -209,11 +206,11 @@ static noinline __noreturn void ls1046ardb_r_entry(unsigned long memsize)
goto err;
}
- memsize = fsl_ddr_sdram(&ls1046a_info, false);
+ fsl_ddr_sdram(&ls1046a_info, false);
ls1046a_errata_post_ddr();
- ls1046a_esdhc_start_image(memsize, 0, 0);
+ ls1046a_esdhc_start_image(0, 0, 0);
err:
pr_err("Booting failed\n");
@@ -228,5 +225,5 @@ __noreturn void ls1046ardb_entry(unsigned long r0, unsigned long r1, unsigned lo
relocate_to_current_adr();
setup_c();
- ls1046ardb_r_entry(r0);
+ ls1046ardb_r_entry();
}
--
2.39.5
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 06/12] ARM: Layerscape: remove register arguments
2024-10-22 7:46 [PATCH v2 00/12] ARM: Layerscape: LS1046a: switch to TF-A Sascha Hauer
` (4 preceding siblings ...)
2024-10-22 7:46 ` [PATCH v2 05/12] ARM: Layerscape: ls1046ardb: remove unused variable Sascha Hauer
@ 2024-10-22 7:46 ` Sascha Hauer
2024-10-22 7:46 ` [PATCH v2 07/12] ARM: Layerscape: LS1046a: add TF-A support Sascha Hauer
` (6 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Sascha Hauer @ 2024-10-22 7:46 UTC (permalink / raw)
To: open list:BAREBOX
The various Layerscape xload_start_image functions all take r0, r1 and
r2 arguments. These are all unused in the code, so remove them.
The ls1021aiot board passes the memory size in r0 in one case, but this
is never used, so it's safe to remove that as well.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/ls1021aiot/lowlevel.c | 6 +++---
arch/arm/boards/ls1046ardb/lowlevel.c | 6 +++---
arch/arm/boards/tqmls1046a/lowlevel.c | 10 +++++-----
arch/arm/mach-layerscape/xload-qspi.c | 17 +++++++----------
arch/arm/mach-layerscape/xload.c | 12 +++++-------
drivers/mci/imx-esdhc-pbl.c | 10 ++++------
include/mach/layerscape/xload.h | 14 +++++---------
7 files changed, 32 insertions(+), 43 deletions(-)
diff --git a/arch/arm/boards/ls1021aiot/lowlevel.c b/arch/arm/boards/ls1021aiot/lowlevel.c
index d2d4237c3d..887f0e39db 100644
--- a/arch/arm/boards/ls1021aiot/lowlevel.c
+++ b/arch/arm/boards/ls1021aiot/lowlevel.c
@@ -97,7 +97,7 @@ static noinline __noreturn void ls1021aiot_r_entry(void)
ls1021a_errata_post_ddr();
- ls1021a_xload_start_image(SZ_1G, 0, 0);
+ ls1021a_xload_start_image();
pr_err("Booting failed\n");
@@ -105,10 +105,10 @@ static noinline __noreturn void ls1021aiot_r_entry(void)
;
}
-void ls1021aiot_entry(unsigned long r0, unsigned long r1, unsigned long r2);
+void ls1021aiot_entry(void);
__noreturn void
-ls1021aiot_entry(unsigned long r0, unsigned long r1, unsigned long r2)
+ls1021aiot_entry(void)
{
relocate_to_current_adr();
setup_c();
diff --git a/arch/arm/boards/ls1046ardb/lowlevel.c b/arch/arm/boards/ls1046ardb/lowlevel.c
index 9c3f1a8375..753fca3272 100644
--- a/arch/arm/boards/ls1046ardb/lowlevel.c
+++ b/arch/arm/boards/ls1046ardb/lowlevel.c
@@ -210,7 +210,7 @@ static noinline __noreturn void ls1046ardb_r_entry(void)
ls1046a_errata_post_ddr();
- ls1046a_esdhc_start_image(0, 0, 0);
+ ls1046a_esdhc_start_image();
err:
pr_err("Booting failed\n");
@@ -218,9 +218,9 @@ static noinline __noreturn void ls1046ardb_r_entry(void)
while (1);
}
-void ls1046ardb_entry(unsigned long r0, unsigned long r1, unsigned long r2);
+void ls1046ardb_entry(void);
-__noreturn void ls1046ardb_entry(unsigned long r0, unsigned long r1, unsigned long r2)
+__noreturn void ls1046ardb_entry(void)
{
relocate_to_current_adr();
setup_c();
diff --git a/arch/arm/boards/tqmls1046a/lowlevel.c b/arch/arm/boards/tqmls1046a/lowlevel.c
index 9f471d001e..6531b22bd1 100644
--- a/arch/arm/boards/tqmls1046a/lowlevel.c
+++ b/arch/arm/boards/tqmls1046a/lowlevel.c
@@ -331,16 +331,16 @@ static noinline __noreturn void tqmls1046a_r_entry(bool is_8g)
ls1046a_errata_post_ddr();
- ls1046a_xload_start_image(0, 0, 0);
+ ls1046a_xload_start_image();
pr_err("Booting failed\n");
while (1);
}
-void tqmls1046a_entry(unsigned long r0, unsigned long r1, unsigned long r2);
+void tqmls1046a_entry(void);
-__noreturn void tqmls1046a_entry(unsigned long r0, unsigned long r1, unsigned long r2)
+__noreturn void tqmls1046a_entry(void)
{
relocate_to_current_adr();
setup_c();
@@ -348,9 +348,9 @@ __noreturn void tqmls1046a_entry(unsigned long r0, unsigned long r1, unsigned lo
tqmls1046a_r_entry(false);
}
-void tqmls1046a_8g_entry(unsigned long r0, unsigned long r1, unsigned long r2);
+void tqmls1046a_8g_entry(void);
-__noreturn void tqmls1046a_8g_entry(unsigned long r0, unsigned long r1, unsigned long r2)
+__noreturn void tqmls1046a_8g_entry(void)
{
relocate_to_current_adr();
setup_c();
diff --git a/arch/arm/mach-layerscape/xload-qspi.c b/arch/arm/mach-layerscape/xload-qspi.c
index 608434bf1f..11119840c3 100644
--- a/arch/arm/mach-layerscape/xload-qspi.c
+++ b/arch/arm/mach-layerscape/xload-qspi.c
@@ -19,10 +19,9 @@ struct layerscape_base_addr {
void *qspi_mem_base;
};
-static int layerscape_qspi_start_image(struct layerscape_base_addr *base,
- unsigned long r0, unsigned long r1, unsigned long r2)
+static int layerscape_qspi_start_image(struct layerscape_base_addr *base)
{
- void (*barebox)(unsigned long, unsigned long, unsigned long) = base->membase;
+ void (*barebox)(void) = base->membase;
/* Switch controller into little endian mode */
out_be32(base->qspi_reg_base, 0x000f400c);
@@ -33,15 +32,14 @@ static int layerscape_qspi_start_image(struct layerscape_base_addr *base,
printf("Starting barebox\n");
- barebox(r0, r1, r2);
+ barebox();
printf("failed\n");
return -EIO;
}
-int ls1046a_qspi_start_image(unsigned long r0, unsigned long r1,
- unsigned long r2)
+int ls1046a_qspi_start_image(void)
{
struct layerscape_base_addr base;
@@ -49,11 +47,10 @@ int ls1046a_qspi_start_image(unsigned long r0, unsigned long r1,
base.membase = IOMEM(LS1046A_DDR_SDRAM_BASE);
base.qspi_mem_base = IOMEM(0x40000000);
- return layerscape_qspi_start_image(&base, r0, r1, r2);
+ return layerscape_qspi_start_image(&base);
}
-int ls1021a_qspi_start_image(unsigned long r0, unsigned long r1,
- unsigned long r2)
+int ls1021a_qspi_start_image(void)
{
struct layerscape_base_addr base;
@@ -61,5 +58,5 @@ int ls1021a_qspi_start_image(unsigned long r0, unsigned long r1,
base.membase = IOMEM(LS1021A_DDR_SDRAM_BASE);
base.qspi_mem_base = IOMEM(0x40000000);
- return layerscape_qspi_start_image(&base, r0, r1, r2);
+ return layerscape_qspi_start_image(&base);
}
diff --git a/arch/arm/mach-layerscape/xload.c b/arch/arm/mach-layerscape/xload.c
index 32ff158b1b..9103e8b4bc 100644
--- a/arch/arm/mach-layerscape/xload.c
+++ b/arch/arm/mach-layerscape/xload.c
@@ -5,8 +5,7 @@
#include <mach/layerscape/layerscape.h>
#include <mach/layerscape/xload.h>
-int ls1046a_xload_start_image(unsigned long r0, unsigned long r1,
- unsigned long r2)
+int ls1046a_xload_start_image(void)
{
enum bootsource src;
@@ -14,10 +13,10 @@ int ls1046a_xload_start_image(unsigned long r0, unsigned long r1,
switch (src) {
case BOOTSOURCE_SPI_NOR:
- return ls1046a_qspi_start_image(r0, r1, r2);
+ return ls1046a_qspi_start_image();
#if defined(CONFIG_MCI_IMX_ESDHC_PBL)
case BOOTSOURCE_MMC:
- return ls1046a_esdhc_start_image(r0, r1, r2);
+ return ls1046a_esdhc_start_image();
#endif
default:
pr_err("Unknown bootsource\n");
@@ -25,8 +24,7 @@ int ls1046a_xload_start_image(unsigned long r0, unsigned long r1,
}
}
-int ls1021a_xload_start_image(unsigned long r0, unsigned long r1,
- unsigned long r2)
+int ls1021a_xload_start_image(void)
{
enum bootsource src;
@@ -34,7 +32,7 @@ int ls1021a_xload_start_image(unsigned long r0, unsigned long r1,
switch (src) {
case BOOTSOURCE_SPI_NOR:
- return ls1021a_qspi_start_image(r0, r1, r2);
+ return ls1021a_qspi_start_image();
default:
pr_err("Unknown bootsource\n");
return -EINVAL;
diff --git a/drivers/mci/imx-esdhc-pbl.c b/drivers/mci/imx-esdhc-pbl.c
index 5b1d9a3cf4..3bf3a7ace6 100644
--- a/drivers/mci/imx-esdhc-pbl.c
+++ b/drivers/mci/imx-esdhc-pbl.c
@@ -352,7 +352,7 @@ static int layerscape_esdhc_load_image(struct fsl_esdhc_host *host, void *adr, u
* Return: If successful, this function does not return. A negative error
* code is returned when this function fails.
*/
-int ls1046a_esdhc_start_image(unsigned long r0, unsigned long r1, unsigned long r2)
+int ls1046a_esdhc_start_image(void)
{
int ret;
struct esdhc_soc_data data = {
@@ -364,8 +364,7 @@ int ls1046a_esdhc_start_image(unsigned long r0, unsigned long r1, unsigned long
};
void *sdram = (void *)0x80000000;
unsigned long size = ALIGN(barebox_image_size + LS1046A_SD_IMAGE_OFFSET, 512);
- void (*barebox)(unsigned long, unsigned long, unsigned long) =
- (sdram + LS1046A_SD_IMAGE_OFFSET);
+ void (*barebox)(void) = (sdram + LS1046A_SD_IMAGE_OFFSET);
ret = layerscape_esdhc_load_image(&host, sdram, size, (8 << 8) | (3 << 4));
if (ret)
@@ -373,7 +372,7 @@ int ls1046a_esdhc_start_image(unsigned long r0, unsigned long r1, unsigned long
printf("Starting barebox\n");
- barebox(r0, r1, r2);
+ barebox();
return -EINVAL;
}
@@ -393,8 +392,7 @@ static int ls1028a_esdhc_start_image(void __iomem *base, struct dram_regions_inf
void *bl31_image;
struct bl2_to_bl31_params_mem_v2 *params;
unsigned long size = ALIGN(barebox_image_size + LS1046A_SD_IMAGE_OFFSET, 512);
- void (*barebox)(unsigned long, unsigned long, unsigned long) =
- (sdram + LS1046A_SD_IMAGE_OFFSET);
+ void (*barebox)(void) = (sdram + LS1046A_SD_IMAGE_OFFSET);
int ret;
ret = layerscape_esdhc_load_image(&host, sdram, size, 8 << 4);
diff --git a/include/mach/layerscape/xload.h b/include/mach/layerscape/xload.h
index 86327c63e6..64990e2ca1 100644
--- a/include/mach/layerscape/xload.h
+++ b/include/mach/layerscape/xload.h
@@ -5,16 +5,12 @@
struct dram_regions_info;
-int ls1046a_esdhc_start_image(unsigned long r0, unsigned long r1, unsigned long r2);
+int ls1046a_esdhc_start_image(void);
int ls1028a_esdhc1_start_image(struct dram_regions_info *dram_info);
int ls1028a_esdhc2_start_image(struct dram_regions_info *dram_info);
-int ls1046a_qspi_start_image(unsigned long r0, unsigned long r1,
- unsigned long r2);
-int ls1021a_qspi_start_image(unsigned long r0, unsigned long r1,
- unsigned long r2);
-int ls1046a_xload_start_image(unsigned long r0, unsigned long r1,
- unsigned long r2);
-int ls1021a_xload_start_image(unsigned long r0, unsigned long r1,
- unsigned long r2);
+int ls1046a_qspi_start_image(void);
+int ls1021a_qspi_start_image(void);
+int ls1046a_xload_start_image(void);
+int ls1021a_xload_start_image(void);
#endif /* __MACH_LAYERSCAPE_XLOAD_H */
--
2.39.5
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 07/12] ARM: Layerscape: LS1046a: add TF-A support
2024-10-22 7:46 [PATCH v2 00/12] ARM: Layerscape: LS1046a: switch to TF-A Sascha Hauer
` (5 preceding siblings ...)
2024-10-22 7:46 ` [PATCH v2 06/12] ARM: Layerscape: remove register arguments Sascha Hauer
@ 2024-10-22 7:46 ` Sascha Hauer
2024-10-22 7:46 ` [PATCH v2 08/12] ARM: Layerscape: LS1046a-rdb: Switch to " Sascha Hauer
` (5 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Sascha Hauer @ 2024-10-22 7:46 UTC (permalink / raw)
To: open list:BAREBOX
Right now we still use PPA on LS1046a. This has long been deprecated and
replaced with TF-A. Add support for starting the TF-A on LS1046a based
boards as a first step to get rid of PPA.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/ls1046ardb/lowlevel.c | 2 +-
arch/arm/boards/tqmls1046a/lowlevel.c | 2 +-
arch/arm/mach-layerscape/Kconfig | 2 ++
arch/arm/mach-layerscape/Makefile | 1 +
arch/arm/mach-layerscape/soc.c | 32 ++++++++++++++++++++++++++++++++
arch/arm/mach-layerscape/tfa.c | 32 ++++++++++++++++++++++++++++++++
arch/arm/mach-layerscape/xload-qspi.c | 12 ++++++++----
arch/arm/mach-layerscape/xload.c | 6 +++---
drivers/mci/imx-esdhc-pbl.c | 5 ++++-
firmware/Kconfig | 3 +++
firmware/Makefile | 1 +
include/mach/layerscape/xload.h | 8 +++++---
test/generate-dummy-fw.sh | 1 +
13 files changed, 94 insertions(+), 13 deletions(-)
diff --git a/arch/arm/boards/ls1046ardb/lowlevel.c b/arch/arm/boards/ls1046ardb/lowlevel.c
index 753fca3272..bcc95cc59d 100644
--- a/arch/arm/boards/ls1046ardb/lowlevel.c
+++ b/arch/arm/boards/ls1046ardb/lowlevel.c
@@ -210,7 +210,7 @@ static noinline __noreturn void ls1046ardb_r_entry(void)
ls1046a_errata_post_ddr();
- ls1046a_esdhc_start_image();
+ ls1046a_esdhc_start_image(NULL);
err:
pr_err("Booting failed\n");
diff --git a/arch/arm/boards/tqmls1046a/lowlevel.c b/arch/arm/boards/tqmls1046a/lowlevel.c
index 6531b22bd1..5ccafb2d77 100644
--- a/arch/arm/boards/tqmls1046a/lowlevel.c
+++ b/arch/arm/boards/tqmls1046a/lowlevel.c
@@ -331,7 +331,7 @@ static noinline __noreturn void tqmls1046a_r_entry(bool is_8g)
ls1046a_errata_post_ddr();
- ls1046a_xload_start_image();
+ ls1046a_xload_start_image(NULL);
pr_err("Booting failed\n");
diff --git a/arch/arm/mach-layerscape/Kconfig b/arch/arm/mach-layerscape/Kconfig
index 5658a63b33..9d15ba0173 100644
--- a/arch/arm/mach-layerscape/Kconfig
+++ b/arch/arm/mach-layerscape/Kconfig
@@ -24,6 +24,7 @@ config ARCH_LS1028
config ARCH_LS1046
bool
select CPU_V8
+ select ARM_ATF
select SYS_SUPPORTS_64BIT_KERNEL
if 64BIT
@@ -47,6 +48,7 @@ config MACH_TQMLS1046A
select MCI_IMX_ESDHC_PBL
select DDR_FSL
select DDR_FSL_DDR4
+ select FIRMWARE_LS1046A_ATF
endif
diff --git a/arch/arm/mach-layerscape/Makefile b/arch/arm/mach-layerscape/Makefile
index e4bb1b42f2..ee7df5ea19 100644
--- a/arch/arm/mach-layerscape/Makefile
+++ b/arch/arm/mach-layerscape/Makefile
@@ -14,3 +14,4 @@ lwl-$(CONFIG_ARCH_LS1021) += lowlevel-ls102xa.o
obj-$(CONFIG_ARCH_LS1021) += restart.o ls102xa_stream_id.o
lwl-$(CONFIG_ARCH_LS1028) += lowlevel-ls1028a.o
+pbl-$(CONFIG_FIRMWARE_LS1046A_ATF) += tfa.o
diff --git a/arch/arm/mach-layerscape/soc.c b/arch/arm/mach-layerscape/soc.c
index 1742ff58ce..ae24c1ac32 100644
--- a/arch/arm/mach-layerscape/soc.c
+++ b/arch/arm/mach-layerscape/soc.c
@@ -9,6 +9,7 @@
#include <mach/layerscape/layerscape.h>
#include <of.h>
#include <of_address.h>
+#include <asm/system.h>
int __layerscape_soc_type;
@@ -151,6 +152,35 @@ static void layerscape_usb_enable_snooping(void)
}
}
+#define SEC_JR3_OFFSET 0x40000
+
+static int layerscape_of_psci_do_fixup(struct device_node *root, void *unused)
+{
+ struct device_node *np;
+
+ if (current_el() == 3)
+ return 0;
+
+ for_each_compatible_node_from(np, root, NULL, "fsl,sec-v4.0-job-ring") {
+ const void *reg;
+ int na = of_n_addr_cells(np);
+ u64 offset;
+
+ reg = of_get_property(np, "reg", NULL);
+ if (!reg)
+ continue;
+
+ offset = of_read_number(reg, na);
+ if (offset != SEC_JR3_OFFSET)
+ continue;
+
+ of_delete_node(np);
+ break;
+ }
+
+ return 0;
+}
+
static int ls1046a_init(void)
{
if (!cpu_is_ls1046a())
@@ -161,6 +191,8 @@ static int ls1046a_init(void)
layerscape_register_pbl_image_handler();
layerscape_usb_enable_snooping();
+ of_register_fixup(layerscape_of_psci_do_fixup, NULL);
+
return 0;
}
diff --git a/arch/arm/mach-layerscape/tfa.c b/arch/arm/mach-layerscape/tfa.c
new file mode 100644
index 0000000000..d9c4abdd90
--- /dev/null
+++ b/arch/arm/mach-layerscape/tfa.c
@@ -0,0 +1,32 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#define pr_fmt(fmt) "layerscape-tfa: " fmt
+
+#include <firmware.h>
+#include <asm/atf_common.h>
+#include <asm/cache.h>
+#include <mach/layerscape/layerscape.h>
+#include <mach/layerscape/xload.h>
+
+void ls1046_start_tfa(void *barebox, struct dram_regions_info *dram_info)
+{
+ void (*bl31)(void) = (void *)0xfbe00000;
+ size_t bl31_size;
+ void *bl31_image;
+ struct bl2_to_bl31_params_mem_v2 *params;
+
+ get_builtin_firmware_ext(ls1046a_bl31_bin, barebox, &bl31_image, &bl31_size);
+ memcpy(bl31, bl31_image, bl31_size);
+
+ sync_caches_for_execution();
+
+ /* Setup an initial stack for EL2 */
+ asm volatile("msr sp_el2, %0" : : "r" ((unsigned long)barebox) : "cc");
+
+ params = bl2_plat_get_bl31_params_v2(0, (uintptr_t)barebox, 0);
+ params->bl31_ep_info.args.arg3 = (unsigned long)dram_info;
+
+ pr_debug("Starting bl31\n");
+
+ bl31_entry_v2((uintptr_t)bl31, ¶ms->bl_params, NULL);
+}
diff --git a/arch/arm/mach-layerscape/xload-qspi.c b/arch/arm/mach-layerscape/xload-qspi.c
index 11119840c3..fa5b699d4a 100644
--- a/arch/arm/mach-layerscape/xload-qspi.c
+++ b/arch/arm/mach-layerscape/xload-qspi.c
@@ -19,7 +19,8 @@ struct layerscape_base_addr {
void *qspi_mem_base;
};
-static int layerscape_qspi_start_image(struct layerscape_base_addr *base)
+static int layerscape_qspi_start_image(struct layerscape_base_addr *base,
+ struct dram_regions_info *dram_info)
{
void (*barebox)(void) = base->membase;
@@ -28,6 +29,9 @@ static int layerscape_qspi_start_image(struct layerscape_base_addr *base)
memcpy(base->membase, base->qspi_mem_base + BAREBOX_START, barebox_image_size);
+ if (IS_ENABLED(CONFIG_FIRMWARE_LS1046A_ATF))
+ ls1046_start_tfa(base->membase, dram_info);
+
sync_caches_for_execution();
printf("Starting barebox\n");
@@ -39,7 +43,7 @@ static int layerscape_qspi_start_image(struct layerscape_base_addr *base)
return -EIO;
}
-int ls1046a_qspi_start_image(void)
+int ls1046a_qspi_start_image(struct dram_regions_info *dram_info)
{
struct layerscape_base_addr base;
@@ -47,7 +51,7 @@ int ls1046a_qspi_start_image(void)
base.membase = IOMEM(LS1046A_DDR_SDRAM_BASE);
base.qspi_mem_base = IOMEM(0x40000000);
- return layerscape_qspi_start_image(&base);
+ return layerscape_qspi_start_image(&base, dram_info);
}
int ls1021a_qspi_start_image(void)
@@ -58,5 +62,5 @@ int ls1021a_qspi_start_image(void)
base.membase = IOMEM(LS1021A_DDR_SDRAM_BASE);
base.qspi_mem_base = IOMEM(0x40000000);
- return layerscape_qspi_start_image(&base);
+ return layerscape_qspi_start_image(&base, NULL);
}
diff --git a/arch/arm/mach-layerscape/xload.c b/arch/arm/mach-layerscape/xload.c
index 9103e8b4bc..cbdf14344e 100644
--- a/arch/arm/mach-layerscape/xload.c
+++ b/arch/arm/mach-layerscape/xload.c
@@ -5,7 +5,7 @@
#include <mach/layerscape/layerscape.h>
#include <mach/layerscape/xload.h>
-int ls1046a_xload_start_image(void)
+int ls1046a_xload_start_image(struct dram_regions_info *dram_info)
{
enum bootsource src;
@@ -13,10 +13,10 @@ int ls1046a_xload_start_image(void)
switch (src) {
case BOOTSOURCE_SPI_NOR:
- return ls1046a_qspi_start_image();
+ return ls1046a_qspi_start_image(dram_info);
#if defined(CONFIG_MCI_IMX_ESDHC_PBL)
case BOOTSOURCE_MMC:
- return ls1046a_esdhc_start_image();
+ return ls1046a_esdhc_start_image(dram_info);
#endif
default:
pr_err("Unknown bootsource\n");
diff --git a/drivers/mci/imx-esdhc-pbl.c b/drivers/mci/imx-esdhc-pbl.c
index 3bf3a7ace6..0e4b6114fd 100644
--- a/drivers/mci/imx-esdhc-pbl.c
+++ b/drivers/mci/imx-esdhc-pbl.c
@@ -352,7 +352,7 @@ static int layerscape_esdhc_load_image(struct fsl_esdhc_host *host, void *adr, u
* Return: If successful, this function does not return. A negative error
* code is returned when this function fails.
*/
-int ls1046a_esdhc_start_image(void)
+int ls1046a_esdhc_start_image(struct dram_regions_info *dram_info)
{
int ret;
struct esdhc_soc_data data = {
@@ -370,6 +370,9 @@ int ls1046a_esdhc_start_image(void)
if (ret)
return ret;
+ if (IS_ENABLED(CONFIG_FIRMWARE_LS1046A_ATF))
+ ls1046_start_tfa(barebox, dram_info);
+
printf("Starting barebox\n");
barebox();
diff --git a/firmware/Kconfig b/firmware/Kconfig
index ae7bbdc71e..d068e6d983 100644
--- a/firmware/Kconfig
+++ b/firmware/Kconfig
@@ -98,4 +98,7 @@ config FIRMWARE_CCBV2_OPTEE
config FIRMWARE_LS1028A_ATF
bool
+config FIRMWARE_LS1046A_ATF
+ bool
+
endmenu
diff --git a/firmware/Makefile b/firmware/Makefile
index 7265c55c42..9351e24e86 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -33,6 +33,7 @@ firmware-$(CONFIG_DRIVER_NET_FSL_FMAN) += fsl_fman_ucode_ls1046_r1.0_106_4_18.bi
firmware-$(CONFIG_ARCH_LAYERSCAPE_PPA) += ppa-ls1046a.bin
fw-external-$(CONFIG_FIRMWARE_LS1028A_ATF) += ls1028a-bl31.bin
+fw-external-$(CONFIG_FIRMWARE_LS1046A_ATF) += ls1046a-bl31.bin
pbl-firmware-$(CONFIG_FIRMWARE_CCBV2_OPTEE) += ccbv2_optee.bin
pbl-firmware-$(CONFIG_FIRMWARE_TQMA6UL_OPTEE) += mba6ul_optee.bin
diff --git a/include/mach/layerscape/xload.h b/include/mach/layerscape/xload.h
index 64990e2ca1..74f095d789 100644
--- a/include/mach/layerscape/xload.h
+++ b/include/mach/layerscape/xload.h
@@ -5,12 +5,14 @@
struct dram_regions_info;
-int ls1046a_esdhc_start_image(void);
+int ls1046a_esdhc_start_image(struct dram_regions_info *dram_info);
int ls1028a_esdhc1_start_image(struct dram_regions_info *dram_info);
int ls1028a_esdhc2_start_image(struct dram_regions_info *dram_info);
-int ls1046a_qspi_start_image(void);
+int ls1046a_qspi_start_image(struct dram_regions_info *dram_info);
int ls1021a_qspi_start_image(void);
-int ls1046a_xload_start_image(void);
+int ls1046a_xload_start_image(struct dram_regions_info *dram_info);
int ls1021a_xload_start_image(void);
+void ls1046_start_tfa(void *barebox, struct dram_regions_info *dram_info);
+
#endif /* __MACH_LAYERSCAPE_XLOAD_H */
diff --git a/test/generate-dummy-fw.sh b/test/generate-dummy-fw.sh
index 19bc8a9e7c..77d557da21 100755
--- a/test/generate-dummy-fw.sh
+++ b/test/generate-dummy-fw.sh
@@ -48,6 +48,7 @@ FW_MVEBU_BINARY0="
FW_NXP_LAYERSCAPE="
firmware/fsl_fman_ucode_ls1046_r1.0_106_4_18.bin
+ firmware/ls1046a-bl31.bin
firmware/ppa-ls1046a.bin
"
--
2.39.5
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 08/12] ARM: Layerscape: LS1046a-rdb: Switch to TF-A support
2024-10-22 7:46 [PATCH v2 00/12] ARM: Layerscape: LS1046a: switch to TF-A Sascha Hauer
` (6 preceding siblings ...)
2024-10-22 7:46 ` [PATCH v2 07/12] ARM: Layerscape: LS1046a: add TF-A support Sascha Hauer
@ 2024-10-22 7:46 ` Sascha Hauer
2024-10-22 7:46 ` [PATCH v2 09/12] ARM: Layerscape: TQMLS1046a: " Sascha Hauer
` (4 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Sascha Hauer @ 2024-10-22 7:46 UTC (permalink / raw)
To: open list:BAREBOX
Now that we can start TF-A on LS1046a based boards switch the LS1046ardb
over to use this rather than deprecated PPA.
Unlike the PPA the TF-A needs information about the amount of SDRAM
installed on the board. The LS1046a-rdb has a DDR4 DIMM connector, so
the SDRAM configuration must be runtime detected. The board support has
8GiB hardcoded in other places, so hardcode 8GiB for TF-A as well.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/ls1046ardb/board.c | 6 ------
arch/arm/boards/ls1046ardb/lowlevel.c | 16 +++++++++++++++-
arch/arm/boards/ls1046ardb/start.S | 14 +++++++++++++-
3 files changed, 28 insertions(+), 8 deletions(-)
diff --git a/arch/arm/boards/ls1046ardb/board.c b/arch/arm/boards/ls1046ardb/board.c
index ee70171ca3..507fb0bfe1 100644
--- a/arch/arm/boards/ls1046ardb/board.c
+++ b/arch/arm/boards/ls1046ardb/board.c
@@ -133,18 +133,12 @@ late_initcall(rdb_late_init);
static int rdb_mem_init(void)
{
- int ret;
-
if (!of_machine_is_compatible("fsl,ls1046a-rdb"))
return 0;
arm_add_mem_device("ram0", 0x80000000, 0x80000000);
arm_add_mem_device("ram1", 0x880000000, 3ULL * SZ_2G);
- ret = ls1046a_ppa_init(0x100000000 - SZ_64M, SZ_64M);
- if (ret)
- pr_err("Failed to initialize PPA firmware: %s\n", strerror(-ret));
-
return 0;
}
mem_initcall(rdb_mem_init);
diff --git a/arch/arm/boards/ls1046ardb/lowlevel.c b/arch/arm/boards/ls1046ardb/lowlevel.c
index bcc95cc59d..7965e84a34 100644
--- a/arch/arm/boards/ls1046ardb/lowlevel.c
+++ b/arch/arm/boards/ls1046ardb/lowlevel.c
@@ -184,6 +184,20 @@ static struct fsl_ddr_info ls1046a_info = {
.c = ddrc,
};
+static struct dram_regions_info dram_info = {
+ .num_dram_regions = 2,
+ .total_dram_size = SZ_8G,
+ .region = {
+ {
+ .addr = SZ_2G,
+ .size = SZ_2G,
+ }, {
+ .addr = SZ_32G + SZ_2G,
+ .size = SZ_4G + SZ_2G,
+ },
+ },
+};
+
static noinline __noreturn void ls1046ardb_r_entry(void)
{
unsigned long membase = LS1046A_DDR_SDRAM_BASE;
@@ -210,7 +224,7 @@ static noinline __noreturn void ls1046ardb_r_entry(void)
ls1046a_errata_post_ddr();
- ls1046a_esdhc_start_image(NULL);
+ ls1046a_esdhc_start_image(&dram_info);
err:
pr_err("Booting failed\n");
diff --git a/arch/arm/boards/ls1046ardb/start.S b/arch/arm/boards/ls1046ardb/start.S
index 466782b278..571fa78163 100644
--- a/arch/arm/boards/ls1046ardb/start.S
+++ b/arch/arm/boards/ls1046ardb/start.S
@@ -1,11 +1,23 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <linux/linkage.h>
#include <asm/barebox-arm64.h>
+#include <asm/assembler64.h>
-#define STACK_TOP 0x10020000
+/*
+ * OCRAM is occupied by TF-A, so in EL2 and EL1 use a temporary stack in SDRAM
+ */
+#define STACK_TOP 0x10020000
+#define STACK_TOP_TMP_SDRAM 0x90000000
ENTRY_PROC(start_ls1046ardb)
+ switch_el x3, 3f, 2f, 1f
+3:
mov x3, #STACK_TOP
mov sp, x3
b ls1046ardb_entry
+2:
+1:
+ mov x3, STACK_TOP_TMP_SDRAM
+ mov sp, x3
+ b ls1046ardb_entry
ENTRY_PROC_END(start_ls1046ardb)
--
2.39.5
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 09/12] ARM: Layerscape: TQMLS1046a: Switch to TF-A support
2024-10-22 7:46 [PATCH v2 00/12] ARM: Layerscape: LS1046a: switch to TF-A Sascha Hauer
` (7 preceding siblings ...)
2024-10-22 7:46 ` [PATCH v2 08/12] ARM: Layerscape: LS1046a-rdb: Switch to " Sascha Hauer
@ 2024-10-22 7:46 ` Sascha Hauer
2024-10-22 7:46 ` [PATCH v2 10/12] ARM: Layerscape: LS1046a: remove PPA support Sascha Hauer
` (3 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Sascha Hauer @ 2024-10-22 7:46 UTC (permalink / raw)
To: open list:BAREBOX
Now that we can start TF-A on LS1046a based boards switch the TQMLS1046a
over to use this rather than deprecated PPA.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/tqmls1046a/board.c | 7 ++++---
arch/arm/boards/tqmls1046a/lowlevel.c | 32 ++++++++++++++++++++++++++++++--
arch/arm/boards/tqmls1046a/start.S | 14 +++++++++++++-
3 files changed, 47 insertions(+), 6 deletions(-)
diff --git a/arch/arm/boards/tqmls1046a/board.c b/arch/arm/boards/tqmls1046a/board.c
index d30cd37747..c8a7f06d76 100644
--- a/arch/arm/boards/tqmls1046a/board.c
+++ b/arch/arm/boards/tqmls1046a/board.c
@@ -15,6 +15,7 @@
static void ls1046a_add_memory(void)
{
+ struct resource *res;
u32 cs0_bnds;
u64 memsize, lower, upper;
int ret;
@@ -41,9 +42,9 @@ static void ls1046a_add_memory(void)
arm_add_mem_device("ram1", 0x880000000, upper);
}
- ret = ls1046a_ppa_init(0x100000000 - SZ_64M, SZ_64M);
- if (ret)
- pr_err("Failed to initialize PPA firmware: %s\n", strerror(-ret));
+ res = reserve_sdram_region("tfa", 0xfbe00000, 0x4200000);
+
+ of_register_fixup(of_fixup_reserved_memory, res);
}
static int tqmls1046a_postcore_init(void)
diff --git a/arch/arm/boards/tqmls1046a/lowlevel.c b/arch/arm/boards/tqmls1046a/lowlevel.c
index 5ccafb2d77..e139fe19a1 100644
--- a/arch/arm/boards/tqmls1046a/lowlevel.c
+++ b/arch/arm/boards/tqmls1046a/lowlevel.c
@@ -300,15 +300,41 @@ static int tqmls1046a_get_variant(void)
return variant;
}
+static struct dram_regions_info dram_info_2g = {
+ .num_dram_regions = 1,
+ .total_dram_size = SZ_2G,
+ .region = {
+ {
+ .addr = SZ_2G,
+ .size = SZ_2G,
+ },
+ },
+};
+
+static struct dram_regions_info dram_info_8g = {
+ .num_dram_regions = 2,
+ .total_dram_size = SZ_8G,
+ .region = {
+ {
+ .addr = SZ_2G,
+ .size = SZ_2G,
+ }, {
+ .addr = SZ_32G + SZ_2G,
+ .size = SZ_4G + SZ_2G,
+ },
+ },
+};
+
extern char __dtb_z_fsl_ls1046a_tqmls1046a_mbls10xxa_start[];
static noinline __noreturn void tqmls1046a_r_entry(bool is_8g)
{
unsigned long membase = LS1046A_DDR_SDRAM_BASE;
int board_variant = 0;
+ struct dram_regions_info *dram_info;
if (get_pc() >= membase)
- barebox_arm_entry(membase, 0x80000000 - SZ_64M,
+ barebox_arm_entry(membase, 0x80000000 - SZ_128M,
__dtb_z_fsl_ls1046a_tqmls1046a_mbls10xxa_start);
arm_cpu_lowlevel_init();
@@ -321,17 +347,19 @@ static noinline __noreturn void tqmls1046a_r_entry(bool is_8g)
if (is_8g) {
board_variant = tqmls1046a_get_variant();
+ dram_info = &dram_info_8g;
if (board_variant == TQ_VARIANT_TQMLS1046A_CA)
fsl_ddr_set_memctl_regs(&tqmls1046a_ddrc_8g_ca[0], 0, false);
else
fsl_ddr_set_memctl_regs(&tqmls1046a_ddrc_8g[0], 0, false);
} else {
+ dram_info = &dram_info_2g;
fsl_ddr_set_memctl_regs(&tqmls1046a_ddrc[0], 0, false);
}
ls1046a_errata_post_ddr();
- ls1046a_xload_start_image(NULL);
+ ls1046a_xload_start_image(dram_info);
pr_err("Booting failed\n");
diff --git a/arch/arm/boards/tqmls1046a/start.S b/arch/arm/boards/tqmls1046a/start.S
index 84c4626880..c812a35768 100644
--- a/arch/arm/boards/tqmls1046a/start.S
+++ b/arch/arm/boards/tqmls1046a/start.S
@@ -1,8 +1,13 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <linux/linkage.h>
#include <asm/barebox-arm64.h>
+#include <asm/assembler64.h>
-#define STACK_TOP 0x10020000
+/*
+ * OCRAM is occupied by TF-A, so in EL2 and EL1 use a temporary stack in SDRAM
+ */
+#define STACK_TOP 0x10020000
+#define STACK_TOP_TMP_SDRAM 0x90000000
ENTRY_PROC(start_tqmls1046a)
mov x3, #STACK_TOP
@@ -11,7 +16,14 @@ ENTRY_PROC(start_tqmls1046a)
ENTRY_PROC_END(start_tqmls1046a)
ENTRY_PROC(start_tqmls1046a_8g)
+ switch_el x3, 3f, 2f, 1f
+3:
mov x3, #STACK_TOP
mov sp, x3
b tqmls1046a_8g_entry
+2:
+1:
+ mov x3, STACK_TOP_TMP_SDRAM
+ mov sp, x3
+ b tqmls1046a_8g_entry
ENTRY_PROC_END(start_tqmls1046a_8g)
--
2.39.5
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 10/12] ARM: Layerscape: LS1046a: remove PPA support
2024-10-22 7:46 [PATCH v2 00/12] ARM: Layerscape: LS1046a: switch to TF-A Sascha Hauer
` (8 preceding siblings ...)
2024-10-22 7:46 ` [PATCH v2 09/12] ARM: Layerscape: TQMLS1046a: " Sascha Hauer
@ 2024-10-22 7:46 ` Sascha Hauer
2024-10-22 7:46 ` [PATCH v2 11/12] ARM: Layerscape: LS1046a: add PSCI node Sascha Hauer
` (2 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Sascha Hauer @ 2024-10-22 7:46 UTC (permalink / raw)
To: open list:BAREBOX
Both LS1046a boards supported by barebox have been switched to TF-A, so
drop no longer used PPA support.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/mach-layerscape/Kconfig | 12 ---
arch/arm/mach-layerscape/Makefile | 1 -
arch/arm/mach-layerscape/ppa-entry.S | 32 --------
arch/arm/mach-layerscape/ppa.c | 147 -----------------------------------
firmware/Makefile | 1 -
include/mach/layerscape/layerscape.h | 10 ---
test/generate-dummy-fw.sh | 1 -
7 files changed, 204 deletions(-)
diff --git a/arch/arm/mach-layerscape/Kconfig b/arch/arm/mach-layerscape/Kconfig
index 9d15ba0173..415ee93b99 100644
--- a/arch/arm/mach-layerscape/Kconfig
+++ b/arch/arm/mach-layerscape/Kconfig
@@ -2,18 +2,6 @@
if ARCH_LAYERSCAPE
-config ARCH_LAYERSCAPE_PPA
- bool "Include PPA firmware"
- select ARM_PSCI_OF
- select ARM_SMCCC
- select FITIMAGE
- help
- The "Primary Protected Application" (PPA) is a PSCI compliant firmware
- distributed by NXP. It is needed to start the secondary cores on
- Layerscape SoCs. Without it Linux will be started in EL3 and doesn't
- work properly. The precompiled firmware images can be found here:
- https://github.com/NXP/qoriq-ppa-binary
-
config ARCH_LS1028
bool
select CPU_V8
diff --git a/arch/arm/mach-layerscape/Makefile b/arch/arm/mach-layerscape/Makefile
index ee7df5ea19..10e1c031b9 100644
--- a/arch/arm/mach-layerscape/Makefile
+++ b/arch/arm/mach-layerscape/Makefile
@@ -7,7 +7,6 @@ obj-$(CONFIG_ARCH_LS1046) += icid.o
obj-pbl-y += boot.o soc.o
pbl-y += xload-qspi.o xload.o
pbl-$(CONFIG_ARCH_LS1028) += tzc400.o
-obj-$(CONFIG_ARCH_LAYERSCAPE_PPA) += ppa.o ppa-entry.o
obj-$(CONFIG_BOOTM) += pblimage.o
lwl-$(CONFIG_ARCH_LS1021) += lowlevel-ls102xa.o
diff --git a/arch/arm/mach-layerscape/ppa-entry.S b/arch/arm/mach-layerscape/ppa-entry.S
deleted file mode 100644
index f5f30b6719..0000000000
--- a/arch/arm/mach-layerscape/ppa-entry.S
+++ /dev/null
@@ -1,32 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-
-#include <linux/linkage.h>
-
-.section .text.ppa_entry
-ENTRY(ppa_entry)
- /*
- * x0: Secure Firmware entry point
- * x1: Exception return address Low
- * x2: Exception return address High
- */
-
- /* Save stack pointer for EL2 */
- mov x3, sp
- msr sp_el2, x3
-
- /* Set exception return address hold pointer */
- adr x4, 1f
- mov x3, x4
- rev w3, w3
- str w3, [x1]
- lsr x3, x4, #32
- rev w3, w3
- str w3, [x2]
-
- /* Call SEC monitor */
- br x0
-
-1:
- mov x0, #0
- ret
-ENDPROC(ppa_entry)
diff --git a/arch/arm/mach-layerscape/ppa.c b/arch/arm/mach-layerscape/ppa.c
deleted file mode 100644
index 99b76b4c30..0000000000
--- a/arch/arm/mach-layerscape/ppa.c
+++ /dev/null
@@ -1,147 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-
-#define pr_fmt(fmt) "ppa: " fmt
-
-#include <common.h>
-#include <init.h>
-#include <mmu.h>
-#include <firmware.h>
-#include <memory.h>
-#include <linux/sizes.h>
-#include <linux/arm-smccc.h>
-#include <asm/mmu.h>
-#include <soc/fsl/immap_lsch2.h>
-#include <asm/system.h>
-#include <image-fit.h>
-#include <asm/psci.h>
-#include <mach/layerscape/layerscape.h>
-#include <asm/cache.h>
-
-int ppa_entry(const void *, u32 *, u32 *);
-
-#define SEC_JR3_OFFSET 0x40000
-
-static int of_psci_do_fixup(struct device_node *root, void *unused)
-{
- unsigned long psci_version;
- struct device_node *np;
- struct arm_smccc_res res = {};
-
- arm_smccc_smc(ARM_PSCI_0_2_FN_PSCI_VERSION, 0, 0, 0, 0, 0, 0, 0, &res);
- psci_version = res.a0;
-
- for_each_compatible_node_from(np, root, NULL, "fsl,sec-v4.0-job-ring") {
- const void *reg;
- int na = of_n_addr_cells(np);
- u64 offset;
-
- reg = of_get_property(np, "reg", NULL);
- if (!reg)
- continue;
-
- offset = of_read_number(reg, na);
- if (offset != SEC_JR3_OFFSET)
- continue;
-
- of_delete_node(np);
- break;
- }
-
- return of_psci_fixup(root, psci_version, "smc");
-}
-
-static int ppa_init(void *ppa, size_t ppa_size, void *sec_firmware_addr)
-{
- int ret;
- u32 *boot_loc_ptr_l, *boot_loc_ptr_h;
- struct ccsr_scfg __iomem *scfg = (void *)(LSCH2_SCFG_ADDR);
- struct fit_handle *fit;
- void *conf;
- const void *buf;
- unsigned long firmware_size;
-
- boot_loc_ptr_l = &scfg->scratchrw[1];
- boot_loc_ptr_h = &scfg->scratchrw[0];
-
- fit = fit_open_buf(ppa, ppa_size, false, BOOTM_VERIFY_AVAILABLE);
- if (IS_ERR(fit)) {
- pr_err("Cannot open ppa FIT image: %pe\n", fit);
- return PTR_ERR(fit);
- }
-
- conf = fit_open_configuration(fit, NULL);
- if (IS_ERR(conf)) {
- pr_err("Cannot open default config in ppa FIT image: %pe\n", conf);
- ret = PTR_ERR(conf);
- goto err;
- }
-
-
- ret = fit_open_image(fit, conf, "firmware", &buf, &firmware_size);
- if (ret) {
- pr_err("Cannot open firmware image in ppa FIT image: %s\n",
- strerror(-ret));
- goto err;
- }
-
- /* Copy the secure firmware to secure memory */
- memcpy(sec_firmware_addr, buf, firmware_size);
- sync_caches_for_execution();
-
- ret = ppa_entry(sec_firmware_addr, boot_loc_ptr_l, boot_loc_ptr_h);
- if (ret) {
- pr_err("Couldn't install PPA firmware: %s\n", strerror(-ret));
- goto err;
- }
-
- pr_info("PPA firmware installed at 0x%p, now in EL%d\n",
- sec_firmware_addr, current_el());
-
- of_register_fixup(of_psci_do_fixup, NULL);
-err:
- fit_close(fit);
-
- return ret;
-}
-
-int ls1046a_ppa_init(resource_size_t ppa_start, resource_size_t ppa_size)
-{
- resource_size_t ppa_end = ppa_start + ppa_size - 1;
- struct resource *res;
- void *ppa_fw;
- size_t ppa_fw_size;
- int el = current_el();
- int ret;
-
- res = reserve_sdram_region("ppa", ppa_start, ppa_size);
- if (!res) {
- pr_err("Cannot request SDRAM region %pa - %pa\n",
- &ppa_start, &ppa_end);
- return -EINVAL;
- }
-
- get_builtin_firmware(ppa_ls1046a_bin, &ppa_fw, &ppa_fw_size);
- if (!ppa_fw_size) {
- pr_err("PPA Firmware was not included in build\n");
- return -ENOSYS;
- }
-
- if (el == 3) {
- unsigned long cr;
-
- asm volatile("mrs %0, sctlr_el3" : "=r" (cr) : : "cc");
- remap_range((void *)ppa_start, ppa_size, MAP_CACHED);
-
- ret = ppa_init(ppa_fw, ppa_fw_size, (void *)ppa_start);
-
- asm volatile("msr sctlr_el2, %0" : : "r" (cr) : "cc");
- remap_range((void *)ppa_start, ppa_size, MAP_UNCACHED);
-
- if (ret)
- return ret;
- }
-
- of_register_fixup(of_fixup_reserved_memory, res);
-
- return 0;
-}
diff --git a/firmware/Makefile b/firmware/Makefile
index 9351e24e86..fd63de1c55 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -31,7 +31,6 @@ pbl-firmware-$(CONFIG_ARCH_RK3399) += rk3399-bl31.bin
pbl-firmware-$(CONFIG_ARCH_RK3399_OPTEE) += rk3399-op-tee.bin
firmware-$(CONFIG_DRIVER_NET_FSL_FMAN) += fsl_fman_ucode_ls1046_r1.0_106_4_18.bin
-firmware-$(CONFIG_ARCH_LAYERSCAPE_PPA) += ppa-ls1046a.bin
fw-external-$(CONFIG_FIRMWARE_LS1028A_ATF) += ls1028a-bl31.bin
fw-external-$(CONFIG_FIRMWARE_LS1046A_ATF) += ls1046a-bl31.bin
diff --git a/include/mach/layerscape/layerscape.h b/include/mach/layerscape/layerscape.h
index 7f9dc7d8a1..ab8304ede0 100644
--- a/include/mach/layerscape/layerscape.h
+++ b/include/mach/layerscape/layerscape.h
@@ -32,16 +32,6 @@ enum bootsource ls1021a_bootsource_get(void);
#define LAYERSCAPE_SOC_LS1028A 1028
#define LAYERSCAPE_SOC_LS1046A 1046
-#ifdef CONFIG_ARCH_LAYERSCAPE_PPA
-int ls1046a_ppa_init(resource_size_t ppa_start, resource_size_t ppa_size);
-#else
-static inline int ls1046a_ppa_init(resource_size_t ppa_start,
- resource_size_t ppa_size)
-{
- return -ENOSYS;
-}
-#endif
-
struct dram_region_info {
uint64_t addr;
uint64_t size;
diff --git a/test/generate-dummy-fw.sh b/test/generate-dummy-fw.sh
index 77d557da21..67c2cb0eee 100755
--- a/test/generate-dummy-fw.sh
+++ b/test/generate-dummy-fw.sh
@@ -49,7 +49,6 @@ FW_MVEBU_BINARY0="
FW_NXP_LAYERSCAPE="
firmware/fsl_fman_ucode_ls1046_r1.0_106_4_18.bin
firmware/ls1046a-bl31.bin
- firmware/ppa-ls1046a.bin
"
FW="
--
2.39.5
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 11/12] ARM: Layerscape: LS1046a: add PSCI node
2024-10-22 7:46 [PATCH v2 00/12] ARM: Layerscape: LS1046a: switch to TF-A Sascha Hauer
` (9 preceding siblings ...)
2024-10-22 7:46 ` [PATCH v2 10/12] ARM: Layerscape: LS1046a: remove PPA support Sascha Hauer
@ 2024-10-22 7:46 ` Sascha Hauer
2024-10-22 7:46 ` [PATCH v2 12/12] ARM: Layerscape: Update Documentation for TF-A Sascha Hauer
2024-10-23 12:42 ` [PATCH v2 00/12] ARM: Layerscape: LS1046a: switch to TF-A Sascha Hauer
12 siblings, 0 replies; 15+ messages in thread
From: Sascha Hauer @ 2024-10-22 7:46 UTC (permalink / raw)
To: open list:BAREBOX; +Cc: Ahmad Fatoum
Unlike other SoCs the LS1046a upstream dtsi files do not have a PSCI
node. Add one for barebox and Linux to find the PSCI support.
Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/dts/fsl-ls1046a.dtsi | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm/dts/fsl-ls1046a.dtsi b/arch/arm/dts/fsl-ls1046a.dtsi
index a661cb0c89..2dc24ba8c7 100644
--- a/arch/arm/dts/fsl-ls1046a.dtsi
+++ b/arch/arm/dts/fsl-ls1046a.dtsi
@@ -4,4 +4,9 @@ / {
aliases {
mmc0 = &esdhc;
};
+
+ psci {
+ compatible = "arm,psci-1.0";
+ method = "smc";
+ };
};
--
2.39.5
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 12/12] ARM: Layerscape: Update Documentation for TF-A
2024-10-22 7:46 [PATCH v2 00/12] ARM: Layerscape: LS1046a: switch to TF-A Sascha Hauer
` (10 preceding siblings ...)
2024-10-22 7:46 ` [PATCH v2 11/12] ARM: Layerscape: LS1046a: add PSCI node Sascha Hauer
@ 2024-10-22 7:46 ` Sascha Hauer
2024-10-22 8:16 ` Ahmad Fatoum
2024-10-23 12:42 ` [PATCH v2 00/12] ARM: Layerscape: LS1046a: switch to TF-A Sascha Hauer
12 siblings, 1 reply; 15+ messages in thread
From: Sascha Hauer @ 2024-10-22 7:46 UTC (permalink / raw)
To: open list:BAREBOX
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
Documentation/boards/layerscape.rst | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/Documentation/boards/layerscape.rst b/Documentation/boards/layerscape.rst
index ae089539e5..5791b86326 100644
--- a/Documentation/boards/layerscape.rst
+++ b/Documentation/boards/layerscape.rst
@@ -37,13 +37,22 @@ Flashing to the eMMC is possible likewise::
In such a case, using eMMC and SD-Card at the same time is not possible.
Boot from QSPI to flash the eMMC.
+Get and Build the Trusted Firmware A
+------------------------------------
+
+Get TF-A from https://github.com/ARM-software/arm-trusted-firmware.git and build with::
+
+ make PLAT=ls1046ardb
+ cp build/ls1046ardb/release/bl31.bin ${barebox_srctree}/firmware/ls1046a-bl31.bin
+
+Although the binary is for a specific board (LS1046A-RDB) it should work on any other
+board as well.
+
Firmware Blobs
--------------
Network: `fsl_fman_ucode_ls1046_r1.0_106_4_18.bin <https://github.com/NXP/qoriq-fm-ucode/raw/integration/fsl_fman_ucode_ls1046_r1.0_106_4_18.bin>`_.
-PSCI Firmware: `ppa-ls1046a.bin <https://github.com/NXP/qoriq-ppa-binary/raw/integration/soc-ls1046/ppa.itb>`_.
-
Layerscape boards
-----------------
--
2.39.5
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2 12/12] ARM: Layerscape: Update Documentation for TF-A
2024-10-22 7:46 ` [PATCH v2 12/12] ARM: Layerscape: Update Documentation for TF-A Sascha Hauer
@ 2024-10-22 8:16 ` Ahmad Fatoum
0 siblings, 0 replies; 15+ messages in thread
From: Ahmad Fatoum @ 2024-10-22 8:16 UTC (permalink / raw)
To: Sascha Hauer, open list:BAREBOX
On 22.10.24 09:46, Sascha Hauer wrote:
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> Documentation/boards/layerscape.rst | 13 +++++++++++--
> 1 file changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/boards/layerscape.rst b/Documentation/boards/layerscape.rst
> index ae089539e5..5791b86326 100644
> --- a/Documentation/boards/layerscape.rst
> +++ b/Documentation/boards/layerscape.rst
> @@ -37,13 +37,22 @@ Flashing to the eMMC is possible likewise::
> In such a case, using eMMC and SD-Card at the same time is not possible.
> Boot from QSPI to flash the eMMC.
>
> +Get and Build the Trusted Firmware A
> +------------------------------------
> +
> +Get TF-A from https://github.com/ARM-software/arm-trusted-firmware.git and build with::
> +
> + make PLAT=ls1046ardb
> + cp build/ls1046ardb/release/bl31.bin ${barebox_srctree}/firmware/ls1046a-bl31.bin
> +
> +Although the binary is for a specific board (LS1046A-RDB) it should work on any other
> +board as well.
> +
> Firmware Blobs
> --------------
>
> Network: `fsl_fman_ucode_ls1046_r1.0_106_4_18.bin <https://github.com/NXP/qoriq-fm-ucode/raw/integration/fsl_fman_ucode_ls1046_r1.0_106_4_18.bin>`_.
>
> -PSCI Firmware: `ppa-ls1046a.bin <https://github.com/NXP/qoriq-ppa-binary/raw/integration/soc-ls1046/ppa.itb>`_.
> -
> Layerscape boards
> -----------------
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2 00/12] ARM: Layerscape: LS1046a: switch to TF-A
2024-10-22 7:46 [PATCH v2 00/12] ARM: Layerscape: LS1046a: switch to TF-A Sascha Hauer
` (11 preceding siblings ...)
2024-10-22 7:46 ` [PATCH v2 12/12] ARM: Layerscape: Update Documentation for TF-A Sascha Hauer
@ 2024-10-23 12:42 ` Sascha Hauer
12 siblings, 0 replies; 15+ messages in thread
From: Sascha Hauer @ 2024-10-23 12:42 UTC (permalink / raw)
To: open list:BAREBOX, Sascha Hauer; +Cc: Ahmad Fatoum
On Tue, 22 Oct 2024 09:46:24 +0200, Sascha Hauer wrote:
> Our LS1046a support still uses the long deprecated and binary-only PPA
> secure monitor firmware. It's time to switch this over to TF-A. We do
> not bother to keep the PPA support as it's long outdated and it would
> also make the code code and barebox configuration unnecessarily
> complicated.
>
>
> [...]
Applied, thanks!
[01/12] ARM: Layerscape: TQMLS1046a: Update DDR timings
https://git.pengutronix.de/cgit/barebox/commit/?id=4046483418b2 (link may not be stable)
[02/12] ARM: Layerscape: images: fix variable name
https://git.pengutronix.de/cgit/barebox/commit/?id=c5fafdf54dc4 (link may not be stable)
[03/12] ARM: Layerscape: images: add missing FORCE
https://git.pengutronix.de/cgit/barebox/commit/?id=b72e9217f230 (link may not be stable)
[04/12] ARM: Layerscape: TQMLS1046a: add support for 8GiB variant
https://git.pengutronix.de/cgit/barebox/commit/?id=bf758a7ab323 (link may not be stable)
[05/12] ARM: Layerscape: ls1046ardb: remove unused variable
https://git.pengutronix.de/cgit/barebox/commit/?id=06afb0484b95 (link may not be stable)
[06/12] ARM: Layerscape: remove register arguments
https://git.pengutronix.de/cgit/barebox/commit/?id=158ac96107b4 (link may not be stable)
[07/12] ARM: Layerscape: LS1046a: add TF-A support
https://git.pengutronix.de/cgit/barebox/commit/?id=7d34aae4ae50 (link may not be stable)
[08/12] ARM: Layerscape: LS1046a-rdb: Switch to TF-A support
https://git.pengutronix.de/cgit/barebox/commit/?id=ce679af25fcb (link may not be stable)
[09/12] ARM: Layerscape: TQMLS1046a: Switch to TF-A support
https://git.pengutronix.de/cgit/barebox/commit/?id=aa6b6da282de (link may not be stable)
[10/12] ARM: Layerscape: LS1046a: remove PPA support
https://git.pengutronix.de/cgit/barebox/commit/?id=5642ec046e7f (link may not be stable)
[11/12] ARM: Layerscape: LS1046a: add PSCI node
https://git.pengutronix.de/cgit/barebox/commit/?id=beadf36a290f (link may not be stable)
[12/12] ARM: Layerscape: Update Documentation for TF-A
https://git.pengutronix.de/cgit/barebox/commit/?id=36428685938b (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2024-10-23 12:43 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-22 7:46 [PATCH v2 00/12] ARM: Layerscape: LS1046a: switch to TF-A Sascha Hauer
2024-10-22 7:46 ` [PATCH v2 01/12] ARM: Layerscape: TQMLS1046a: Update DDR timings Sascha Hauer
2024-10-22 7:46 ` [PATCH v2 02/12] ARM: Layerscape: images: fix variable name Sascha Hauer
2024-10-22 7:46 ` [PATCH v2 03/12] ARM: Layerscape: images: add missing FORCE Sascha Hauer
2024-10-22 7:46 ` [PATCH v2 04/12] ARM: Layerscape: TQMLS1046a: add support for 8GiB variant Sascha Hauer
2024-10-22 7:46 ` [PATCH v2 05/12] ARM: Layerscape: ls1046ardb: remove unused variable Sascha Hauer
2024-10-22 7:46 ` [PATCH v2 06/12] ARM: Layerscape: remove register arguments Sascha Hauer
2024-10-22 7:46 ` [PATCH v2 07/12] ARM: Layerscape: LS1046a: add TF-A support Sascha Hauer
2024-10-22 7:46 ` [PATCH v2 08/12] ARM: Layerscape: LS1046a-rdb: Switch to " Sascha Hauer
2024-10-22 7:46 ` [PATCH v2 09/12] ARM: Layerscape: TQMLS1046a: " Sascha Hauer
2024-10-22 7:46 ` [PATCH v2 10/12] ARM: Layerscape: LS1046a: remove PPA support Sascha Hauer
2024-10-22 7:46 ` [PATCH v2 11/12] ARM: Layerscape: LS1046a: add PSCI node Sascha Hauer
2024-10-22 7:46 ` [PATCH v2 12/12] ARM: Layerscape: Update Documentation for TF-A Sascha Hauer
2024-10-22 8:16 ` Ahmad Fatoum
2024-10-23 12:42 ` [PATCH v2 00/12] ARM: Layerscape: LS1046a: switch to TF-A Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox