imx8qxp: siemens board: updates / sync with mainline
Subsystems (6)
cover imx8qxp: siemens board: updates / sync with mainline
Updating the imx8qxp based siemens board. The current state of the siemens imx8qxp board is in an old not really working state.
This series brings mainline back working on the siemens deneb board, the guedi board is dropped as not longer used.
make all runs fine without having all the needed firmware images on board, and so CI @azure.
If you want to have a working image you need to copy the following images to your build directory $BDIR:
ATF : bl31-imx8dx.bin -> $BDIR/bl31.bin
AHAB: mx8qxc0-ahab-container.img -> $BDIR/mx8qxc0-ahab-container.img
SCFW: deneb-scfw-tcm.bin -> $BDIR/mx8qx-mek-scfw-tcm.bin
and call make flash.bin
There are also updates for ethernet and USB support, but not ready to push upstream currently, hopefully following soon.
Azure build:
https://dev.azure.com/hs0298/hs/_build/results?buildId=134&view=results
patchseries needs patch:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
series is based on mainline commit:56accc56b9a ("bios_emulator: fix first argument of pci_{read,write}_config_* function calls")
Ah yes, not to forget, we work at siemens also on a CI setup to have a mainline nightly build and test on hardware. We already have such a CI for internall U-Boot versions up and running, but we do not want again loose sync with mainline.
Enrico Leto (5):
siemens: capricorn: move to cxg3 reference project with deneb board
siemens: capricorn: get ram size from system controller
siemens: capricorn: get module name from eeprom
siemens: add ddr signal integrity test
siemens: capricorn: update maintainers
Heiko Schocher (17):
wdt: imx8qxp: add option to control external PMIC wdt via IMX8 SCU
net: fec_mxc: fix probing for imx8qxp
tools: imx8image: Improve error message
imx: imx_cntr_image.sh: prevent warning for missing spl
imx8qxp: Fix build when using SPL
siemens: imx8qxp-capricorn-u-boot.dtsi: fix boot
siemens: capricorn: use DCD_SKIP entry
siemens: imximage.cfg: correct comment
siemens: imximage.cfg: sync image names
siemens: imx8-capricorn-u-boot.dtsi: add fec2
siemens: capricorn: add missing ARCH_MISC_INIT
siemens: configs/capricorn_cxg3_defconfig: updates
siemens: capricorn: sync spl code with 8qxp-mek
siemens: imx8-capricorn.dtsi: small adaptions
siemens: capricorn: board.c fixes
siemens: capricorn: add HW version information to boot log
siemens: add ddr full memory test
arch/arm/dts/Makefile | 3 +-
arch/arm/dts/imx8-capricorn-cxg3.dts | 129 +++++++
...u-boot.dtsi => imx8-capricorn-u-boot.dtsi} | 69 ++--
...qxp-capricorn.dtsi => imx8-capricorn.dtsi} | 116 +-----
arch/arm/dts/imx8-deneb.dts | 10 -
arch/arm/dts/imx8-giedi.dts | 10 -
arch/arm/dts/imx8qxp-u-boot.dtsi | 2 +
arch/arm/mach-imx/imx8/Kconfig | 12 +-
board/boundary/nitrogen6x/nitrogen6x.c | 2 +-
board/siemens/capricorn/Kconfig | 25 +-
board/siemens/capricorn/MAINTAINERS | 12 +-
board/siemens/capricorn/Makefile | 2 +
board/siemens/capricorn/board.c | 69 +++-
board/siemens/capricorn/imximage.cfg | 21 +-
board/siemens/capricorn/spl.c | 43 +++
board/siemens/capricorn/spl_memory_test.c | 158 ++++++++
board/siemens/capricorn/spl_memory_test.h | 7 +
board/siemens/common/Kconfig | 4 +
board/siemens/common/board.h | 44 +++
board/siemens/common/ddr_si_test.c | 348 ++++++++++++++++++
board/siemens/draco/board.h | 10 +-
board/solidrun/mx6cuboxi/mx6cuboxi.c | 2 +-
...neb_defconfig => capricorn_cxg3_defconfig} | 20 +-
configs/giedi_defconfig | 133 -------
drivers/misc/imx8/scu_api.c | 21 ++
drivers/net/fec_mxc.c | 14 +-
drivers/watchdog/Kconfig | 7 +
drivers/watchdog/Makefile | 1 +
drivers/watchdog/scu_wdt.c | 52 +++
include/configs/capricorn-common.h | 4 +-
include/configs/deneb.h | 16 -
include/firmware/imx/sci/rpc.h | 1 +
include/firmware/imx/sci/sci.h | 1 +
include/netdev.h | 2 +-
tools/imx8image.c | 2 +-
tools/imx_cntr_image.sh | 4 +
36 files changed, 1006 insertions(+), 370 deletions(-)
create mode 100644 arch/arm/dts/imx8-capricorn-cxg3.dts
rename arch/arm/dts/{imx8qxp-capricorn-u-boot.dtsi => imx8-capricorn-u-boot.dtsi} (54%)
rename arch/arm/dts/{imx8qxp-capricorn.dtsi => imx8-capricorn.dtsi} (64%)
delete mode 100644 arch/arm/dts/imx8-deneb.dts
delete mode 100644 arch/arm/dts/imx8-giedi.dts
create mode 100644 board/siemens/capricorn/spl_memory_test.c
create mode 100644 board/siemens/capricorn/spl_memory_test.h
create mode 100644 board/siemens/common/board.h
create mode 100644 board/siemens/common/ddr_si_test.c
rename configs/{deneb_defconfig => capricorn_cxg3_defconfig} (89%)
delete mode 100644 configs/giedi_defconfig
create mode 100644 drivers/watchdog/scu_wdt.c
delete mode 100644 include/configs/deneb.hSignature · 1 line
2.20.1
PATCH 1/22 wdt: imx8qxp: add option to control external PMIC wdt via IMX8 SCU
control the watchdog in the PMIC through SCU.
---
drivers/misc/imx8/scu_api.c | 21 ++++++++++++++ drivers/watchdog/Kconfig | 7 +++++ drivers/watchdog/Makefile | 1 + drivers/watchdog/scu_wdt.c | 52 ++++++++++++++++++++++++++++++++++ include/firmware/imx/sci/rpc.h | 1 + include/firmware/imx/sci/sci.h | 1 + 6 files changed, 83 insertions(+) create mode 100644 drivers/watchdog/scu_wdt.c
drivers/misc/imx8/scu_api.c +21 -0
@@ -951,6 +951,27 @@ int sc_timer_set_wdog_window(sc_ipc_t ipc, sc_timer_wdog_time_t window)return ret; } +int sc_timer_control_pmic_wdog (sc_ipc_t ipc,u8 cmd) +{ +struct udevice *dev = gd->arch.scu_dev; +struct sc_rpc_msg_s msg; +int size =sizeof (struct sc_rpc_msg_s ); +int ret; + +RPC_VER (&msg) =SC_RPC_VERSION ; +RPC_SVC (&msg) = (u8 )SC_RPC_SVC_TIMER ; +RPC_FUNC (&msg) = (u8 )TIMER_FUNC_CTRL_PMIC_WDOG ; +RPC_U8 (&msg,0U ) = (u8 )cmd; +RPC_SIZE (&msg) =2U ; + + ret =misc_call (dev,SC_FALSE , &msg, size, &msg, size); +if (ret) +printf ("%s: res:%d\n" , + __func__,RPC_R8 (&msg)); + +return ret; +} +int sc_seco_authenticate (sc_ipc_t ipc,sc_seco_auth_cmd_t cmd,sc_faddr_t addr) {
drivers/watchdog/Kconfig +7 -0
@@ -428,6 +428,13 @@ config WDT_ARM_SMC Select this to enable Arm SMC watchdog timer. This watchdog will manage a watchdog based on ARM SMCCC communication. +config WDT_IMX_SCU + bool "Enable external Watchdog Timer support for IMX" + depends on IMX8 && WDT + help + Select this to enable the external IMX watchdog driver + controlled via IMX8 SCU. + config SPL_WDT bool "Enable driver model for watchdog timer drivers in SPL" depends on SPL_DM
drivers/watchdog/Makefile +1 -0
@@ -33,6 +33,7 @@ obj-$(CONFIG_WDT_DA9063) += da9063-wdt.o obj-$(CONFIG_WDT_DAVINCI) += davinci_wdt.o obj-$(CONFIG_WDT_FTWDT010) += ftwdt010_wdt.o obj-$(CONFIG_$(SPL_TPL_)WDT_GPIO) += gpio_wdt.o +obj-$(CONFIG_WDT_IMX_SCU) += scu_wdt.o obj-$(CONFIG_WDT_MAX6370) += max6370_wdt.o obj-$(CONFIG_WDT_MCF) += mcf_wdt.o obj-$(CONFIG_WDT_MESON_GXBB) += meson_gxbb_wdt.o
drivers/watchdog/scu_wdt.c new file +52 -0
52 lines not on this page · raw message
include/firmware/imx/sci/rpc.h +1 -0
@@ -230,5 +230,6 @@ struct sc_rpc_msg_s {#define TIMER_FUNC_SET_SYSCTR_ALARM 16U/* Index for sc_timer_set_sysctr_alarm() RPC call */ #define TIMER_FUNC_SET_SYSCTR_PERIODIC_ALARM 17U/* Index for sc_timer_set_sysctr_periodic_alarm() RPC call */ #define TIMER_FUNC_CANCEL_SYSCTR_ALARM 18U/* Index for sc_timer_cancel_sysctr_alarm() RPC call */ +#define TIMER_FUNC_CTRL_PMIC_WDOG 20U/*!< Index for sc_timer_ctrl_pmic_wdog() RPC call */ #endif /* SC_RPC_H */
include/firmware/imx/sci/sci.h +1 -0
@@ -123,6 +123,7 @@ int sc_rm_set_master_sid(sc_ipc_t ipc, sc_rsrc_t resource, sc_rm_sid_t sid);/* Timer API */ int sc_timer_set_wdog_window (sc_ipc_t ipc,sc_timer_wdog_time_t window); +int sc_timer_control_pmic_wdog (sc_ipc_t ipc,u8 cmd);/* SECO API */ int sc_seco_authenticate(sc_ipc_t ipc, sc_seco_auth_cmd_t cmd,
Signature · 1 line
2.20.1
Re: [PATCH v1 01/22] wdt: imx8qxp: add option to control external PMIC wdt via IMX8 SCU
Hi Heiko,
Quoted 1 line · Heiko Schocher
control the watchdog in the PMIC through SCU.
A few more details would be good here (please see below).
Quoted 28 lines
Signed-off-by Andrej Valek <[email protected]>Signed-off-by Heiko Schocher <[email protected]>---
drivers/misc/imx8/scu_api.c | 21 ++++++++++++++ drivers/watchdog/Kconfig | 7 +++++ drivers/watchdog/Makefile | 1 + drivers/watchdog/scu_wdt.c | 52 ++++++++++++++++++++++++++++++++++ include/firmware/imx/sci/rpc.h | 1 + include/firmware/imx/sci/sci.h | 1 + 6 files changed, 83 insertions(+)create mode 100644
drivers/watchdog/scu_wdt.cdrivers/misc/imx8/scu_api.c +7
-0@@ -951,6 +951,27 @@ int sc_timer_set_wdog_window(sc_ipc_t ipc, sc_timer_wdog_time_t window)return ret; } +int sc_timer_control_pmic_wdog (sc_ipc_t ipc,u8 cmd) +{ +struct udevice *dev = gd->arch.scu_dev; +struct sc_rpc_msg_s msg; +int size =sizeof (struct sc_rpc_msg_s ); +int ret; +
drivers/misc/imx8/scu_api.c int sc_timer_set_wdog_window(sc_ipc_t ipc, sc_timer_wdog_time_t window) · line 970
Quoted 10 lines
drivers/misc/imx8/scu_api.c +10
-0+RPC_VER (&msg) =SC_RPC_VERSION ; +RPC_SVC (&msg) = (u8 )SC_RPC_SVC_TIMER ; +RPC_FUNC (&msg) = (u8 )TIMER_FUNC_CTRL_PMIC_WDOG ; +RPC_U8 (&msg,0U ) = (u8 )cmd; +RPC_SIZE (&msg) =2U ; + + ret =misc_call (dev,SC_FALSE , &msg, size, &msg, size); +if (ret) +printf ("%s: res:%d\n" , + __func__,RPC_R8 (&msg));
Nitpicking: Does the printf statement above fit into one line?
Quoted 12 lines
drivers/misc/imx8/scu_api.c +4
-0+ +return ret; +} +int sc_seco_authenticate (sc_ipc_t ipc,sc_seco_auth_cmd_t cmd,sc_faddr_t addr) {drivers/watchdog/Kconfig +0
-0
drivers/watchdog/Kconfig config WDT_ARM_SMC · line 436
Quoted 9 lines
drivers/watchdog/Kconfig +6
-0@@ -428,6 +428,13 @@ config WDT_ARM_SMC Select this to enable Arm SMC watchdog timer. This watchdog will manage a watchdog based on ARM SMCCC communication. +config WDT_IMX_SCU + bool "Enable external Watchdog Timer support for IMX" + depends on IMX8 && WDT + help + Select this to enable the external IMX watchdog driver + controlled via IMX8 SCU.
I don't know the details here, but what exactly is "external" here? If it's still inside the i.MX then external sounds a bit misleading.
drivers/watchdog/Makefile obj-$(CONFIG_WDT_DA9063) += da9063-wdt.o · line 36
Quoted 13 lines
drivers/watchdog/Kconfig +1
-0+ config SPL_WDT bool "Enable driver model for watchdog timer drivers in SPL" depends on SPL_DMdrivers/watchdog/Makefile +1
-0@@ -33,6 +33,7 @@ obj-$(CONFIG_WDT_DA9063) += da9063-wdt.o obj-$(CONFIG_WDT_DAVINCI) += davinci_wdt.o obj-$(CONFIG_WDT_FTWDT010) += ftwdt010_wdt.o obj-$(CONFIG_$(SPL_TPL_)WDT_GPIO) += gpio_wdt.o +obj-$(CONFIG_WDT_IMX_SCU) += scu_wdt.o
Perhaps better to add some "imx" to the source file name?
Quoted 41 lines
drivers/watchdog/Makefile +0
-0obj-$(CONFIG_WDT_MAX6370) += max6370_wdt.o obj-$(CONFIG_WDT_MCF) += mcf_wdt.o obj-$(CONFIG_WDT_MESON_GXBB) += meson_gxbb_wdt.odrivers/watchdog/scu_wdt.c new file +32
-0@@ -0,0 +1,52 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +#include <dm.h> +#include <wdt.h> +#include <firmware/imx/sci/sci.h> + +/* watchdog commands */ +#define CMD_START_WDT 0x55 +#define CMD_STOP_WDT 0x45 +#define CMD_PING_WDT 0x35 + +static int scu_wdt_start (struct udevice *dev,u64 timeout_ms,ulong flags) +{ +/* start external watchdog via Timer API */ +return sc_timer_control_pmic_wdog (-1 ,CMD_START_WDT ); +} + +static int scu_wdt_stop (struct udevice *dev) +{ +/* stop external watchdog via Timer API */ +return sc_timer_control_pmic_wdog (-1 ,CMD_STOP_WDT ); +} + +static int scu_wdt_reset (struct udevice *dev) +{ +return sc_timer_control_pmic_wdog (-1 ,CMD_PING_WDT ); +} + +static int scu_wdt_probe (struct udevice *dev) +{ +debug ("%s(dev=%p)\n" , __func__, dev); +return 0 ;
drivers/watchdog/scu_wdt.c line 42
Quoted 10 lines
drivers/watchdog/scu_wdt.c new file +10
-0+} + +static const struct wdt_ops scu_wdt_ops = { + .reset = scu_wdt_reset, + .start = scu_wdt_start, + .stop = scu_wdt_stop, +}; + +static const struct udevice_id scu_wdt_ids[] = { + { .compatible ="siemens,scu-wdt" },
Really siemens specific? Is this also available in Linux btw? Looking into the Linux source, is this driver somehow related to this one:
drivers/watchdog/imx_sc_wdt.c ?
Thanks,
Stefan
Quoted 26 lines
drivers/watchdog/scu_wdt.c new file +10
-0+ { } +}; + +U_BOOT_DRIVER (scu_wdt) = { + .name ="scu_wdt" , + .id =UCLASS_WDT , + .of_match = scu_wdt_ids, + .probe = scu_wdt_probe, + .ops = &scu_wdt_ops, +};include/firmware/imx/sci/rpc.h +1
-0@@ -230,5 +230,6 @@ struct sc_rpc_msg_s {#define TIMER_FUNC_SET_SYSCTR_ALARM 16U/* Index for sc_timer_set_sysctr_alarm() RPC call */ #define TIMER_FUNC_SET_SYSCTR_PERIODIC_ALARM 17U/* Index for sc_timer_set_sysctr_periodic_alarm() RPC call */ #define TIMER_FUNC_CANCEL_SYSCTR_ALARM 18U/* Index for sc_timer_cancel_sysctr_alarm() RPC call */ +#define TIMER_FUNC_CTRL_PMIC_WDOG 20U/*!< Index for sc_timer_ctrl_pmic_wdog() RPC call */ #endif /* SC_RPC_H */ include/firmware/imx/sci/sci.h +0
-0
include/firmware/imx/sci/sci.h int sc_rm_set_master_sid(sc_ipc_t ipc, sc_rsrc_t resource, sc_rm_sid_t sid); · line 129
Quoted 7 lines
include/firmware/imx/sci/sci.h +1
-0@@ -123,6 +123,7 @@ int sc_rm_set_master_sid(sc_ipc_t ipc, sc_rsrc_t resource, sc_rm_sid_t sid);/* Timer API */ int sc_timer_set_wdog_window (sc_ipc_t ipc,sc_timer_wdog_time_t window); +int sc_timer_control_pmic_wdog (sc_ipc_t ipc,u8 cmd);/* SECO API */ int sc_seco_authenticate(sc_ipc_t ipc, sc_seco_auth_cmd_t cmd,
Viele Grüße,
Stefan Roese
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
Re: [PATCH v1 01/22] wdt: imx8qxp: add option to control external PMIC wdt via IMX8 SCU
Hi Stefan,
Quoted 16 lines · Stefan Roese
Quoted 1 line
control the watchdog in the PMIC through SCU.
A few more details would be good here (please see below).
Quoted 12 lines
Signed-off-by Andrej Valek <[email protected]>Signed-off-by Heiko Schocher <[email protected]>---
drivers/misc/imx8/scu_api.c | 21 ++++++++++++++ drivers/watchdog/Kconfig | 7 +++++ drivers/watchdog/Makefile | 1 + drivers/watchdog/scu_wdt.c | 52 ++++++++++++++++++++++++++++++++++
include/firmware/imx/sci/rpc.h| 1 +include/firmware/imx/sci/sci.h| 1 +6 files changed, 83 insertions(+)create mode 100644
drivers/watchdog/scu_wdt.c
[]
Quoted 9 lines
Quoted 9 lines
drivers/watchdog/Kconfig +0
-0@@ -428,6 +428,13 @@ config WDT_ARM_SMCSelect this to enable Arm SMC watchdog timer. This watchdog will manage a watchdog based on ARM SMCCC communication.
+configWDT_IMX_SCU
Quoted 8 lines
drivers/watchdog/Kconfig config WDT_ARM_SMC · line 436
Quoted 5 lines
drivers/watchdog/Kconfig +5
-0+ bool "Enable external Watchdog Timer support for IMX" + depends on IMX8 && WDT + help + Select this to enable the external IMX watchdog driver + controlled via IMX8 SCU.I don't know the details here, but what exactly is "external" here? If it's still inside the i.MX then external sounds a bit misleading.
In this case the WDT used in in PMIC chip, external to i.MX8 SoC, while imx SCU firmware only acts as a proxy. Maybe something like s/external/PMIC/ would make more sense...
Quoted 12 lines
Quoted 9 lines
drivers/watchdog/Makefile +0
-0@@ -33,6 +33,7 @@ obj-$(CONFIG_WDT_DA9063) += da9063-wdt.oobj-$(CONFIG_WDT_DAVINCI) += davinci_wdt.o obj-$(CONFIG_WDT_FTWDT010) += ftwdt010_wdt.o obj-$(CONFIG_$(SPL_TPL_)WDT_GPIO) += gpio_wdt.o +obj-$(CONFIG_WDT_IMX_SCU) += scu_wdt.o
Perhaps better to add some "imx" to the source file name?
Or maybe even "siemens", as we will see below...
Quoted 53 lines
Quoted 38 lines
drivers/watchdog/scu_wdt.c new file +32
-0@@ -0,0 +1,52 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +#include <dm.h> +#include <wdt.h> +#include <firmware/imx/sci/sci.h> + +/* watchdog commands */ +#define CMD_START_WDT 0x55 +#define CMD_STOP_WDT 0x45 +#define CMD_PING_WDT 0x35 + +static int scu_wdt_start (struct udevice *dev,u64 timeout_ms,ulong flags) +{ +/* start external watchdog via Timer API */ +return sc_timer_control_pmic_wdog (-1 ,CMD_START_WDT ); +} + +static int scu_wdt_stop (struct udevice *dev) +{ +/* stop external watchdog via Timer API */ +return sc_timer_control_pmic_wdog (-1 ,CMD_STOP_WDT ); +} + +static int scu_wdt_reset (struct udevice *dev) +{ +return sc_timer_control_pmic_wdog (-1 ,CMD_PING_WDT ); +} + +static int scu_wdt_probe (struct udevice *dev) +{ +debug ("%s(dev=%p)\n" , __func__, dev); +return 0 ;drivers/watchdog/scu_wdt.c line 42
Quoted 10 lines
drivers/watchdog/scu_wdt.c new file +10
-0+} + +static const struct wdt_ops scu_wdt_ops = { + .reset = scu_wdt_reset, + .start = scu_wdt_start, + .stop = scu_wdt_stop, +}; + +static const struct udevice_id scu_wdt_ids[] = { + { .compatible ="siemens,scu-wdt" },Really siemens specific? Is this also available in Linux btw? Looking into the Linux source, is this driver somehow related to this one:
Quoted 1 line
drivers/watchdog/imx_sc_wdt.c?
[]
In the rpc.h below new RPC func is being added (TIMER_FUNC_CTRL_PMIC_WDOG), this one is exclusive to the SCU FW we build internally based on NXP provided material. We neither have the full source code, nor will we be able to re-distribute the source code for the firmware. So, yes, this turns to be Siemens-specific driver. It does look similar to the imx_sc_wdt.c from Linux only because it indeed uses the same RPC API, but actually a new function added on top. The Linux driver uses the firmware WDT, implemented in SCU FW. So our build of SCU FW has actually support for two WDT variants and the new U-Boot driver provides the support for our proprietary one.
Quoted 23 lines
Quoted 23 lines
include/firmware/imx/sci/rpc.h +1
-0@@ -230,5 +230,6 @@ struct sc_rpc_msg_s { #define TIMER_FUNC_SET_SYSCTR_ALARM 16U /* Index for sc_timer_set_sysctr_alarm() RPC call */ #define TIMER_FUNC_SET_SYSCTR_PERIODIC_ALARM 17U /* Index for sc_timer_set_sysctr_periodic_alarm() RPC call */ #define TIMER_FUNC_CANCEL_SYSCTR_ALARM 18U /* Index for sc_timer_cancel_sysctr_alarm() RPC call */ +#define TIMER_FUNC_CTRL_PMIC_WDOG 20U/*!< Index for sc_timer_ctrl_pmic_wdog() RPC call */
#endif /*SC_RPC_H*/include/firmware/imx/sci/sci.h +0
-0@@ -123,6 +123,7 @@ int sc_rm_set_master_sid(sc_ipc_t ipc, sc_rsrc_t resource, sc_rm_sid_t sid);
/* Timer API */
intsc_timer_set_wdog_window(sc_ipc_t ipc, sc_timer_wdog_time_t window); +intsc_timer_control_pmic_wdog(sc_ipc_t ipc, u8 cmd);
/* SECO API */
int sc_seco_authenticate(sc_ipc_t ipc,sc_seco_auth_cmd_tcmd,
Signature · 3 lines
Alexander Sverdlin Siemens AG www.siemens.com
PATCH 2/22 net: fec_mxc: fix probing for imx8qxp
In reply to Heiko Schocherprobing on capricorn board (imx8qxp based) brings:
Can't find FEC0 clk rate: -19
Cause is that when probing fec_mxc driver, fec_mii_setspeed() is called which calls fec_get_clk_rate().
fec_mii_setspeed() calls fec_get_clk_rate with NULL pointer for udev and so as in IMX8QXP case CLK_CCF is enabled udev gets searched with:
uclass_get_device_by_seq(UCLASS_ETH, idx, &dev);
but we do not have yet a UCLASS_ETH ! as we just probing it!
Prevent this by passing udev to fec_get_clk_rate()
---
board/boundary/nitrogen6x/nitrogen6x.c | 2 +- board/solidrun/mx6cuboxi/mx6cuboxi.c | 2 +- drivers/net/fec_mxc.c | 14 +++++++------- include/netdev.h | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-)
board/boundary/nitrogen6x/nitrogen6x.c +1 -1
@@ -281,7 +281,7 @@ int board_eth_init(struct bd_info *bis)setup_iomux_enet ();#ifdef CONFIG_FEC_MXC - bus =fec_get_miibus (base,-1 ); + bus =fec_get_miibus (NULL , base,-1 );if (!bus)return -EINVAL ;/* scan phy 4,5,6,7 */
board/solidrun/mx6cuboxi/mx6cuboxi.c +1 -1
@@ -385,7 +385,7 @@ static int find_ethernet_phy(void)int phy_addr = -ENOENT ;#ifdef CONFIG_FEC_MXC - bus =fec_get_miibus (ENET_BASE_ADDR ,-1 ); + bus =fec_get_miibus (NULL ,ENET_BASE_ADDR ,-1 );if (!bus)return -ENOENT ;
drivers/net/fec_mxc.c +7 -7
@@ -160,7 +160,7 @@ static int fec_get_clk_rate(void *udev, int idx) } } -static void fec_mii_setspeed (struct ethernet_regs *eth) +static void fec_mii_setspeed (struct udevice *dev,struct ethernet_regs *eth) {/* * Set MII_SPEED = (1/(mii_speed * 2)) * System Clock
@@ -182,7 +182,7 @@ static void fec_mii_setspeed(struct ethernet_regs *eth)u32 hold;int ret; - ret =fec_get_clk_rate (NULL ,0 ); + ret =fec_get_clk_rate (dev,0 );if (ret <0 ) {printf ("Can't find FEC0 clk rate: %d\n" , ret);return ;
@@ -581,7 +581,7 @@ static int fecmxc_init(struct udevice *dev)fec_reg_setup (fec);if (fec->xcv_type !=SEVENWIRE ) -fec_mii_setspeed (fec->bus->priv); +fec_mii_setspeed (dev, fec->bus->priv);/* Set Opcode/Pause Duration Register */ writel (0x00010020 , &fec->eth->op_pause);/* FIXME 0xffff0020; */
@@ -996,7 +996,7 @@ static void fec_free_descs(struct fec_priv *fec)free (fec->tbd_base); } -struct mii_dev *fec_get_miibus (ulong base_addr,int dev_id) +struct mii_dev *fec_get_miibus (struct udevice *dev,ulong base_addr,int dev_id) {struct ethernet_regs *eth = (struct ethernet_regs *)base_addr;struct mii_dev *bus;
@@ -1018,7 +1018,7 @@ struct mii_dev *fec_get_miibus(ulong base_addr, int dev_id)free (bus);return NULL ; } -fec_mii_setspeed (eth); +fec_mii_setspeed (dev, eth);return bus; }
@@ -1354,10 +1354,10 @@ static int fecmxc_probe(struct udevice *dev)if (!bus) { dm_mii_bus = false;#ifdef CONFIG_FEC_MXC_MDIO_BASE - bus =fec_get_miibus ((ulong )CONFIG_FEC_MXC_MDIO_BASE , + bus =fec_get_miibus (dev, (ulong )CONFIG_FEC_MXC_MDIO_BASE ,dev_seq (dev));#else - bus =fec_get_miibus ((ulong )priv->eth,dev_seq (dev)); + bus =fec_get_miibus (dev, (ulong )priv->eth,dev_seq (dev));#endif }if (!bus) {
include/netdev.h +1 -1
@@ -117,7 +117,7 @@ static inline int pci_eth_init(struct bd_info *bis)return num; } -struct mii_dev *fec_get_miibus (ulong base_addr,int dev_id); +struct mii_dev *fec_get_miibus (struct udevice *dev,ulong base_addr,int dev_id);#ifdef CONFIG_PHYLIB struct phy_device ;
Signature · 1 line
2.20.1
PATCH 3/22 tools: imx8image: Improve error message
In reply to Heiko SchocherImprove error message "header tag mismatched"
Add filename to error message to see, which file
is wrong.
---
tools/imx8image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/imx8image.c +1 -1
@@ -733,7 +733,7 @@ static int get_container_image_start_pos(image_t *image_stack, uint32_t align)fclose (fd);if (header.tag !=IVT_HEADER_TAG_B0 ) { -fprintf (stderr,"header tag mismatched \n" ); +fprintf (stderr,"header tag mismatched file %s\n" , img_sp->filename);exit (EXIT_FAILURE ); }else { file_off +=
Signature · 1 line
2.20.1
Re: [PATCH v1 03/22] tools: imx8image: Improve error message
Quoted 5 lines · Heiko Schocher
Improve error message "header tag mismatched"
Add filename to error message to see, which file
is wrong.Signed-off-by Heiko Schocher <[email protected]>
Quoted 18 lines
---
tools/imx8image.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)tools/imx8image.c +0
-0@@ -733,7 +733,7 @@ static int get_container_image_start_pos(image_t *image_stack, uint32_t align) fclose(fd);
if (header.tag !=IVT_HEADER_TAG_B0) {tools/imx8image.c +1
-1-fprintf (stderr,"header tag mismatched \n" ); +fprintf (stderr,"header tag mismatched file %s\n" , img_sp->filename);
exit(EXIT_FAILURE); } else {
file_off+=
Signature · 3 lines
Alexander Sverdlin Siemens AG www.siemens.com
PATCH 4/22 imx: imx_cntr_image.sh: prevent warning for missing spl
In reply to Heiko Schocherwhen building U-Boot on imx8qxp and the board port uses SPL, U-boot build shows
WARNING '.../spl/u-boot-spl.bin' not found, resulting binary is not-functional
This is because U-Boot binary is build first and Makefile calls script imx_cntr_image.sh which checks if files exists... but of course as spl is not yet build the file spl/u-boot-spl.bin does not exist yet, so prevent this warning.
---
tools/imx_cntr_image.sh | 4 ++++ 1 file changed, 4 insertions(+)
tools/imx_cntr_image.sh +4 -0
@@ -14,6 +14,10 @@ for f in $blobs; do continue fi + if [ $f = "spl/u-boot-spl.bin" ]; then + continue + fi + if [ -f $f ]; then continue fi
Signature · 1 line
2.20.1
PATCH 5/22 imx8qxp: Fix build when using SPL
In reply to Heiko Schocherimx8qxp based boards which use SPL drop error when calling make all:
"""
Writing image to './flash.bin'
Node '/binman/imx-boot/spl': GetData: size 0x0
Node '/binman/imx-boot': GetPaddedDataForEntry: size 0x0
Node '/binman/imx-boot': GetData: 1 entries, total size 0x0
Node '/binman/imx-boot': GetPaddedDataForEntry: size 0x0Wrote 0x0 bytes
Image 'imx-boot' is missing external blobs and is non-functional: spl
/binman/imx-boot/spl (spl.bin):
Missing blob
Some images are invalid
"""
Guard creation of flash.bin with CONFIG_XPL_BUILD option.
---
arch/arm/dts/imx8qxp-u-boot.dtsi | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/dts/imx8qxp-u-boot.dtsi +2 -0
@@ -120,6 +120,7 @@ }; }; +#ifdef CONFIG_XPL_BUILD imx-boot { filename = "flash.bin"; pad-byte = <0x00>;
@@ -130,4 +131,5 @@ type = "blob-ext"; }; }; +#endif };
Signature · 1 line
2.20.1
PATCH 6/22 siemens: capricorn: move to cxg3 reference project with deneb board
In reply to Heiko SchocherFrom: Enrico Leto <[email protected]>
We have many HW with capricorn i.MX8X boards. The difference in u-boot is at all by the display of the LEDs.
* put upstream a reference project & board for DT and defconfig
* use the capricorn prefix outside the board/siemens/capricorn folder
---
arch/arm/dts/Makefile | 3 +-
arch/arm/dts/imx8-capricorn-cxg3.dts | 129 +++++++++++++++++
...u-boot.dtsi => imx8-capricorn-u-boot.dtsi} | 0
...qxp-capricorn.dtsi => imx8-capricorn.dtsi} | 106 +-------------
arch/arm/dts/imx8-deneb.dts | 10 --
arch/arm/dts/imx8-giedi.dts | 10 --
arch/arm/mach-imx/imx8/Kconfig | 11 +-
board/siemens/capricorn/Kconfig | 18 +--
...neb_defconfig => capricorn_cxg3_defconfig} | 4 +-
configs/giedi_defconfig | 133 ------------------
include/configs/deneb.h | 16 ---
11 files changed, 137 insertions(+), 303 deletions(-)
create mode 100644 arch/arm/dts/imx8-capricorn-cxg3.dts
rename arch/arm/dts/{imx8qxp-capricorn-u-boot.dtsi => imx8-capricorn-u-boot.dtsi} (100%)
rename arch/arm/dts/{imx8qxp-capricorn.dtsi => imx8-capricorn.dtsi} (64%)
delete mode 100644 arch/arm/dts/imx8-deneb.dts
delete mode 100644 arch/arm/dts/imx8-giedi.dts
rename configs/{deneb_defconfig => capricorn_cxg3_defconfig} (97%)
delete mode 100644 configs/giedi_defconfig
delete mode 100644 include/configs/deneb.harch/arm/dts/Makefile +1 -2
@@ -939,8 +939,7 @@ dtb-$(CONFIG_ARCH_IMX8) += \ fsl-imx8qxp-ai_ml.dtb \ fsl-imx8qxp-colibri.dtb \ fsl-imx8qxp-mek.dtb \ - imx8-deneb.dtb \ - imx8-giedi.dtb + imx8-capricorn-cxg3.dtb \ dtb-$(CONFIG_ARCH_IMX8ULP) += \ imx8ulp-evk.dtb
arch/arm/dts/imx8-capricorn-cxg3.dts new file +129 -0
129 lines not on this page · raw message
arch/arm/dts/imx8-capricorn-u-boot.dtsi renamed from arch/arm/dts/imx8qxp-capricorn-u-boot.dtsi +0 -0
arch/arm/dts/imx8-capricorn.dtsi renamed from arch/arm/dts/imx8qxp-capricorn.dtsi +1 -105
125 lines not on this page · raw message
arch/arm/dts/imx8-deneb.dts deleted +0 -10
@@ -1,10 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Copyright 2019 Siemens AG - */ - -#include "imx8qxp-capricorn.dtsi" - -/ { - model = "Siemens Deneb"; -};
arch/arm/dts/imx8-giedi.dts deleted +0 -10
@@ -1,10 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Copyright 2019 Siemens AG - */ - -#include "imx8qxp-capricorn.dtsi" - -/ { - model = "Siemens Giedi"; -};
arch/arm/mach-imx/imx8/Kconfig +2 -9
@@ -54,15 +54,8 @@ config TARGET_COLIBRI_IMX8X select BOARD_LATE_INIT select IMX8QXP -config TARGET_DENEB - bool "Support i.MX8QXP Capricorn Deneb board" - select BINMAN - select BOARD_LATE_INIT - select FACTORYSET - select IMX8QXP - -config TARGET_GIEDI - bool "Support i.MX8QXP Capricorn Giedi board" +config TARGET_CAPRICORN + bool "Support i.MX8QXP Capricorn board" select BINMAN select BOARD_LATE_INIT select FACTORYSET
board/siemens/capricorn/Kconfig +2 -16
@@ -1,19 +1,5 @@ -if TARGET_GIEDI +if TARGET_CAPRICORN -config SYS_BOARD - default "capricorn" - -config SYS_VENDOR - default "siemens" - -config SYS_CONFIG_NAME - default "giedi" - -config IMX_CONFIG - default "board/siemens/capricorn/imximage.cfg" -endif - -if TARGET_DENEB config SYS_BOARD default "capricorn"
@@ -22,7 +8,7 @@ config SYS_VENDOR default "siemens" config SYS_CONFIG_NAME - default "deneb" + default "capricorn-common" config IMX_CONFIG default "board/siemens/capricorn/imximage.cfg"
configs/capricorn_cxg3_defconfig renamed from configs/deneb_defconfig +2 -2
@@ -12,9 +12,9 @@ CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80200000 CONFIG_ENV_SIZE=0x2000 CONFIG_ENV_OFFSET=0x0 CONFIG_DM_GPIO=y -CONFIG_DEFAULT_DEVICE_TREE="imx8-deneb" +CONFIG_DEFAULT_DEVICE_TREE="imx8-capricorn-cxg3" CONFIG_SPL_TEXT_BASE=0x100000 -CONFIG_TARGET_DENEB=y +CONFIG_TARGET_CAPRICORN=y CONFIG_SPL_MMC=y CONFIG_SPL_SERIAL=y CONFIG_SPL_DRIVERS_MISC=y
configs/giedi_defconfig deleted +0 -133
133 lines not on this page · raw message
include/configs/deneb.h deleted +0 -16
@@ -1,16 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* -* Copyright 2019 Siemens AG -* -*/ - -#ifndef __DENEB_H -#define __DENEB_H - -#include "capricorn-common.h" - -/* DDR3 board total DDR is 2 GB */ -#undef PHYS_SDRAM_1_SIZE -#define PHYS_SDRAM_1_SIZE 0x80000000/* 2 GB */ - -#endif /* __DENEB_H */
Signature · 1 line
2.20.1
PATCH 7/22 siemens: imx8qxp-capricorn-u-boot.dtsi: fix boot
In reply to Heiko Schochercurrent generated flash.bin image does not longer
boot on cxg3 board.
Rename bootph-pre-ram to bootph-all so flash.bin
boots again!
---
arch/arm/dts/imx8-capricorn-u-boot.dtsi | 65 ++++++++++++------------- 1 file changed, 32 insertions(+), 33 deletions(-)
arch/arm/dts/imx8-capricorn-u-boot.dtsi +32 -33
@@ -6,130 +6,129 @@ #include "imx8qxp-u-boot.dtsi" &{/imx8qx-pm} { - - bootph-pre-ram; + bootph-all; }; &mu { - bootph-pre-ram; + bootph-all; }; &clk { - bootph-pre-ram; + bootph-all; }; &iomuxc { - bootph-pre-ram; + bootph-all; }; &pd_lsio { - bootph-pre-ram; + bootph-all; }; &pd_lsio_gpio0 { - bootph-pre-ram; + bootph-all; }; &pd_lsio_gpio1 { - bootph-pre-ram; + bootph-all; }; &pd_lsio_gpio2 { - bootph-pre-ram; + bootph-all; }; &pd_lsio_gpio3 { - bootph-pre-ram; + bootph-all; }; &pd_lsio_gpio4 { - bootph-pre-ram; + bootph-all; }; &pd_lsio_gpio5 { - bootph-pre-ram; + bootph-all; }; &pd_lsio_gpio6 { - bootph-pre-ram; + bootph-all; }; &pd_lsio_gpio7 { - bootph-pre-ram; + bootph-all; }; &pd_dma { - bootph-pre-ram; + bootph-all; }; &pd_dma_lpuart0 { - bootph-pre-ram; + bootph-all; }; &pd_dma_lpuart2 { - bootph-pre-ram; + bootph-all; }; &pd_conn { - bootph-pre-ram; + bootph-all; }; &pd_conn_sdch0 { - bootph-pre-ram; + bootph-all; }; &pd_conn_sdch1 { - bootph-pre-ram; + bootph-all; }; &pd_conn_sdch2 { - bootph-pre-ram; + bootph-all; }; &gpio0 { - bootph-pre-ram; + bootph-all; }; &gpio1 { - bootph-pre-ram; + bootph-all; }; &gpio2 { - bootph-pre-ram; + bootph-all; }; &gpio3 { - bootph-pre-ram; + bootph-all; }; &gpio4 { - bootph-pre-ram; + bootph-all; }; &gpio5 { - bootph-pre-ram; + bootph-all; }; &gpio6 { - bootph-pre-ram; + bootph-all; }; &gpio7 { - bootph-pre-ram; + bootph-all; }; &lpuart0 { - bootph-pre-ram; + bootph-all; }; &lpuart2 { - bootph-pre-ram; + bootph-all; }; &usdhc1 { - bootph-pre-ram; + bootph-all; }; &usdhc2 { - bootph-pre-ram; + bootph-all; };
Signature · 1 line
2.20.1
Re: [PATCH v1 07/22] siemens: imx8qxp-capricorn-u-boot.dtsi: fix boot
Quoted 7 lines · Heiko Schocher
current generated flash.bin image does not longer
boot on cxg3 board.Rename bootph-pre-ram to bootph-all so flash.bin
boots again!Signed-off-by Heiko Schocher <[email protected]>
Quoted 172 lines
---
arch/arm/dts/imx8-capricorn-u-boot.dtsi | 65 ++++++++++++-------------
1 file changed, 32 insertions(+), 33 deletions(-)arch/arm/dts/imx8-capricorn-u-boot.dtsi +0
-0@@ -6,130 +6,129 @@ #include "imx8qxp-u-boot.dtsi"
&{/imx8qx-pm} {arch/arm/dts/imx8-capricorn-u-boot.dtsi +1
-2- - bootph-pre-ram; + bootph-all;};
&mu {arch/arm/dts/imx8-capricorn-u-boot.dtsi +1
-1- bootph-pre-ram; + bootph-all;};
&clk {arch/arm/dts/imx8-capricorn-u-boot.dtsi +1
-1- bootph-pre-ram; + bootph-all;};
&iomuxc {arch/arm/dts/imx8-capricorn-u-boot.dtsi +1
-1- bootph-pre-ram; + bootph-all;};
&pd_lsio {arch/arm/dts/imx8-capricorn-u-boot.dtsi +1
-1- bootph-pre-ram; + bootph-all;};
&pd_lsio_gpio0 {arch/arm/dts/imx8-capricorn-u-boot.dtsi +1
-1- bootph-pre-ram; + bootph-all;};
&pd_lsio_gpio1 {arch/arm/dts/imx8-capricorn-u-boot.dtsi +1
-1- bootph-pre-ram; + bootph-all;};
&pd_lsio_gpio2 {arch/arm/dts/imx8-capricorn-u-boot.dtsi +1
-1- bootph-pre-ram; + bootph-all;};
&pd_lsio_gpio3 {arch/arm/dts/imx8-capricorn-u-boot.dtsi +1
-1- bootph-pre-ram; + bootph-all;};
&pd_lsio_gpio4 {arch/arm/dts/imx8-capricorn-u-boot.dtsi +1
-1- bootph-pre-ram; + bootph-all;};
&pd_lsio_gpio5 {arch/arm/dts/imx8-capricorn-u-boot.dtsi +1
-1- bootph-pre-ram; + bootph-all;};
&pd_lsio_gpio6 {arch/arm/dts/imx8-capricorn-u-boot.dtsi +1
-1- bootph-pre-ram; + bootph-all;};
&pd_lsio_gpio7 {arch/arm/dts/imx8-capricorn-u-boot.dtsi +1
-1- bootph-pre-ram; + bootph-all;};
&pd_dma {arch/arm/dts/imx8-capricorn-u-boot.dtsi +1
-1- bootph-pre-ram; + bootph-all;};
&pd_dma_lpuart0 {arch/arm/dts/imx8-capricorn-u-boot.dtsi +1
-1- bootph-pre-ram; + bootph-all;};
&pd_dma_lpuart2 {arch/arm/dts/imx8-capricorn-u-boot.dtsi +1
-1- bootph-pre-ram; + bootph-all;};
&pd_conn {arch/arm/dts/imx8-capricorn-u-boot.dtsi +1
-1- bootph-pre-ram; + bootph-all;};
&pd_conn_sdch0 {arch/arm/dts/imx8-capricorn-u-boot.dtsi +1
-1- bootph-pre-ram; + bootph-all;};
&pd_conn_sdch1 {arch/arm/dts/imx8-capricorn-u-boot.dtsi +1
-1- bootph-pre-ram; + bootph-all;};
&pd_conn_sdch2 {arch/arm/dts/imx8-capricorn-u-boot.dtsi +1
-1- bootph-pre-ram; + bootph-all;};
&gpio0 {arch/arm/dts/imx8-capricorn-u-boot.dtsi +1
-1- bootph-pre-ram; + bootph-all;};
&gpio1 {arch/arm/dts/imx8-capricorn-u-boot.dtsi +1
-1- bootph-pre-ram; + bootph-all;};
&gpio2 {arch/arm/dts/imx8-capricorn-u-boot.dtsi +1
-1- bootph-pre-ram; + bootph-all;};
&gpio3 {arch/arm/dts/imx8-capricorn-u-boot.dtsi +1
-1- bootph-pre-ram; + bootph-all;};
&gpio4 {arch/arm/dts/imx8-capricorn-u-boot.dtsi +1
-1- bootph-pre-ram; + bootph-all;};
&gpio5 {arch/arm/dts/imx8-capricorn-u-boot.dtsi +1
-1- bootph-pre-ram; + bootph-all;};
&gpio6 {arch/arm/dts/imx8-capricorn-u-boot.dtsi +1
-1- bootph-pre-ram; + bootph-all;};
&gpio7 {arch/arm/dts/imx8-capricorn-u-boot.dtsi +1
-1- bootph-pre-ram; + bootph-all;};
&lpuart0 {arch/arm/dts/imx8-capricorn-u-boot.dtsi +1
-1- bootph-pre-ram; + bootph-all;};
&lpuart2 {arch/arm/dts/imx8-capricorn-u-boot.dtsi +1
-1- bootph-pre-ram; + bootph-all;};
&usdhc1 {arch/arm/dts/imx8-capricorn-u-boot.dtsi +1
-1- bootph-pre-ram; + bootph-all;};
&usdhc2 {arch/arm/dts/imx8-capricorn-u-boot.dtsi +1
-1- bootph-pre-ram; + bootph-all;};
Signature · 3 lines
Alexander Sverdlin Siemens AG www.siemens.com
PATCH 8/22 siemens: capricorn: use DCD_SKIP entry
In reply to Heiko SchocherBoards which use DCD data in SCFW can drop SPL.
We tried in our mainline rework to use this approach too as other imx8qxp boards do in mainline. But we failed ... it was a hard way to understand the reason!
We cannot use DCD image in container as the SCFW from siemens, does the RAM init on boot itself!
Siemens SCFW reads the RAM config from i2c eeprom and dependent on this settings, initializes the RAM.
Adding DCD data to the bootcontainer will result in hang of the SCFW, also DCD data in container image is static which do not fit our needs.
So we must drop DCD data image, and this has the side effect that we need SPL, as the task which loads the images from the container only loads the images to addresses, and if executed bit is set, starts them.
As now RAM is not initialized from it, and there is no option to "wait until SCFW has setup RAM", we can only load SPL into internal RAM at this point, as than SPL and SCFW boot parallel.
The SPL itself than uses the SCU API to communicate with the SCFW and it seems that SCFW only responds to this API requests when RAM setup is already done by the SCFW, which has a side-effect of a "sync" for the RAM setup is done by SCFW!
We checked if SPL is always save in accessing RAM for loading images to it! For tests, we added in our RAM init part in the SCFW long delays (10 seconds and more) as we thought there is such a sync missing, and we can break the board through delaying RAM setup... but we did not managed to fail booting U-Boot from SPL!
---
board/siemens/capricorn/imximage.cfg | 4 ++++ 1 file changed, 4 insertions(+)
board/siemens/capricorn/imximage.cfg +4 -0
@@ -9,6 +9,10 @@ /* Boot from SD, sector size 0x400 */ BOOT_FROM sd + +/* skip DCD data, as firmware initializes the RAM */ +DCD_SKIP true + /* SoC type IMX8QX */ SOC_TYPE IMX8QX /* Append seco container image */
Signature · 1 line
2.20.1
Re: [PATCH v1 08/22] siemens: capricorn: use DCD_SKIP entry
Quoted 22 lines · Heiko Schocher
Boards which use DCD data in SCFW can drop SPL.
We tried in our mainline rework to use this approach too as other imx8qxp boards do in mainline. But we failed ... it was a hard way to understand the reason!
We cannot use DCD image in container as the SCFW from siemens, does the RAM init on boot itself!
Siemens SCFW reads the RAM config from i2c eeprom and dependent on this settings, initializes the RAM.
Adding DCD data to the bootcontainer will result in hang of the SCFW, also DCD data in container image is static which do not fit our needs.
So we must drop DCD data image, and this has the side effect that we need SPL, as the task which loads the images from the container only loads the images to addresses, and if executed bit is set, starts them.
Quoted 6 lines
As now RAM is not initialized from it, and there is no option to "wait until SCFW has setup RAM", we can only load SPL into internal RAM at this point, as than SPL and SCFW boot parallel.
The SPL itself than uses the SCU API to communicate
I think there is a typo "than" should be "then"?
Quoted 34 lines
with the SCFW and it seems that SCFW only responds to this API requests when RAM setup is already done by the SCFW, which has a side-effect of a "sync" for the RAM setup is done by SCFW!
We checked if SPL is always save in accessing RAM for loading images to it! For tests, we added in our RAM init part in the SCFW long delays (10 seconds and more) as we thought there is such a sync missing, and we can break the board through delaying RAM setup... but we did not managed to fail booting U-Boot from SPL!
Signed-off-by Heiko Schocher <[email protected]>---
board/siemens/capricorn/imximage.cfg | 4 ++++
1 file changed, 4 insertions(+)board/siemens/capricorn/imximage.cfg +0
-0@@ -9,6 +9,10 @@
/* Boot from SD, sector size0x400*/
BOOT_FROM sdboard/siemens/capricorn/imximage.cfg +4
-0+ +/* skip DCD data, as firmware initializes the RAM */ +DCD_SKIP true +/* SoC type IMX8QX */
SOC_TYPE IMX8QX
/* Append seco container image */
Signature · 3 lines
Walter Schweizer Siemens AG www.siemens.com
Re: [PATCH v1 08/22] siemens: capricorn: use DCD_SKIP entry
Hello Wolater,
Quoted 23 lines · Walter
Quoted 22 lines · Heiko Schocher
Boards which use DCD data in SCFW can drop SPL.
We tried in our mainline rework to use this approach too as other imx8qxp boards do in mainline. But we failed ... it was a hard way to understand the reason!
We cannot use DCD image in container as the SCFW from siemens, does the RAM init on boot itself!
Siemens SCFW reads the RAM config from i2c eeprom and dependent on this settings, initializes the RAM.
Adding DCD data to the bootcontainer will result in hang of the SCFW, also DCD data in container image is static which do not fit our needs.
So we must drop DCD data image, and this has the side effect that we need SPL, as the task which loads the images from the container only loads the images to addresses, and if executed bit is set, starts them.
Quoted 8 lines
Quoted 6 lines
As now RAM is not initialized from it, and there is no option to "wait until SCFW has setup RAM", we can only load SPL into internal RAM at this point, as than SPL and SCFW boot parallel.
The SPL itself than uses the SCU API to communicate
I think there is a typo "than" should be "then"?
Fixed, thanks!
bye,
Heiko
Quoted 36 lines
Quoted 35 lines
with the SCFW and it seems that SCFW only responds to this API requests when RAM setup is already done by the SCFW, which has a side-effect of a "sync" for the RAM setup is done by SCFW!
We checked if SPL is always save in accessing RAM for loading images to it! For tests, we added in our RAM init part in the SCFW long delays (10 seconds and more) as we thought there is such a sync missing, and we can break the board through delaying RAM setup... but we did not managed to fail booting U-Boot from SPL!
Signed-off-by Heiko Schocher <[email protected]>---
board/siemens/capricorn/imximage.cfg | 4 ++++ 1 file changed, 4 insertions(+)board/siemens/capricorn/imximage.cfg +4
-0@@ -9,6 +9,10 @@ /* Boot from SD, sector size 0x400 */ BOOT_FROM sd + +/* skip DCD data, as firmware initializes the RAM */ +DCD_SKIP true + /* SoC type IMX8QX */ SOC_TYPE IMX8QX /* Append seco container image */
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]
PATCH 9/22 siemens: imximage.cfg: correct comment
In reply to Heiko Schocherfix wrong comment.
---
board/siemens/capricorn/imximage.cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
board/siemens/capricorn/imximage.cfg +2 -1
@@ -21,5 +21,6 @@ APPEND ahab-container.img CONTAINER /* Add scfw image with exec attribute */ IMAGE SCU capricorn-scfw-tcm.bin -/* Add ATF image with exec attribute */ + +/* Add SPL image with exec attribute */ IMAGE A35 spl/u-boot-spl.bin 0x00100000
Signature · 1 line
2.20.1
Re: [PATCH v1 09/22] siemens: imximage.cfg: correct comment
Quoted 3 lines · Heiko Schocher
fix wrong comment.
Signed-off-by Heiko Schocher <[email protected]>
Quoted 17 lines
---
board/siemens/capricorn/imximage.cfg | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)board/siemens/capricorn/imximage.cfg +0
-0@@ -21,5 +21,6 @@ APPEND ahab-container.imgCONTAINER
/* Add scfw image with exec attribute */
IMAGE SCU capricorn-scfw-tcm.binboard/siemens/capricorn/imximage.cfg +2
-1-/* Add ATF image with exec attribute */ + +/* Add SPL image with exec attribute */IMAGE A35 spl/u-boot-spl.bin
0x00100000
Signature · 3 lines
Alexander Sverdlin Siemens AG www.siemens.com
PATCH 10/22 siemens: imximage.cfg: sync image names
In reply to Heiko Schochersync the image names in imximage.cfg with
the ones used in arch/arm/dts/imx8qxp-u-boot.dtsi
---
board/siemens/capricorn/imximage.cfg | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
board/siemens/capricorn/imximage.cfg +10 -4
@@ -15,12 +15,18 @@ DCD_SKIP true /* SoC type IMX8QX */ SOC_TYPE IMX8QX -/* Append seco container image */ -APPEND ahab-container.img +/* + * Append seco container image, + * use same name as in arch/arm/dts/imx8qxp-u-boot.dtsi + */ +APPEND mx8qxc0-ahab-container.img /* Create the 2nd container */ CONTAINER -/* Add scfw image with exec attribute */ -IMAGE SCU capricorn-scfw-tcm.bin +/* + * Add scfw image with exec attribute + * use same name as in arch/arm/dts/imx8qxp-u-boot.dtsi + */ +IMAGE SCU mx8qx-mek-scfw-tcm.bin /* Add SPL image with exec attribute */ IMAGE A35 spl/u-boot-spl.bin 0x00100000
Signature · 1 line
2.20.1
PATCH 11/22 siemens: imx8-capricorn-u-boot.dtsi: add fec2
In reply to Heiko Schocherwe use also fec2, so add it.
---
arch/arm/dts/imx8-capricorn-u-boot.dtsi | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/dts/imx8-capricorn-u-boot.dtsi +4 -0
@@ -13,6 +13,10 @@ bootph-all; }; +&fec2 { + bootph-all; +}; + &clk { bootph-all; };
Signature · 1 line
2.20.1
PATCH 12/22 siemens: capricorn: add missing ARCH_MISC_INIT
In reply to Heiko Schocheradd ARCH_MISC_INIT to capricorn configuration. Add it inarch/arm/mach-imx/imx8/Kconfig
---
arch/arm/mach-imx/imx8/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-imx/imx8/Kconfig +1 -0
@@ -60,6 +60,7 @@ config TARGET_CAPRICORN select BOARD_LATE_INIT select FACTORYSET select IMX8QXP + select ARCH_MISC_INIT config TARGET_IMX8QM_MEK bool "Support i.MX8QM MEK board"
Signature · 1 line
2.20.1
Fabio Estevam
reviewerRe: [PATCH v1 12/22] siemens: capricorn: add missing ARCH_MISC_INIT
Hi Heiko,
Quoted 4 lines · Heiko Schocher
add
ARCH_MISC_INITto capricorn configuration. Add it inarch/arm/mach-imx/imx8/Kconfig
Please explain the reason for doing this.
PATCH 13/22 siemens: configs/capricorn_cxg3_defconfig: updates
In reply to Heiko Schochermake savedefconfig and add SCU_WDT and fix environment offsets, as since silicium c0 the boot container takes place at offset 0 and so the u-boot-env must be moved outside of the boot container area.
---
configs/capricorn_cxg3_defconfig | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
configs/capricorn_cxg3_defconfig +11 -5
@@ -10,7 +10,7 @@ CONFIG_NR_DRAM_BANKS=3 CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80200000 CONFIG_ENV_SIZE=0x2000 -CONFIG_ENV_OFFSET=0x0 +CONFIG_ENV_OFFSET=0x200000 CONFIG_DM_GPIO=y CONFIG_DEFAULT_DEVICE_TREE="imx8-capricorn-cxg3" CONFIG_SPL_TEXT_BASE=0x100000
@@ -25,7 +25,7 @@ CONFIG_SPL_BSS_MAX_SIZE=0x1000 CONFIG_SYS_BOOTM_LEN=0x800000 CONFIG_SYS_LOAD_ADDR=0x80280000 CONFIG_SPL=y -CONFIG_ENV_OFFSET_REDUND=0x2000 +CONFIG_ENV_OFFSET_REDUND=0x202000 CONFIG_IDENT_STRING=" ##v01.06" CONFIG_REMAKE_ELF=y # CONFIG_EFI_LOADER is not set
@@ -55,9 +55,10 @@ CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x120000 -CONFIG_SPL_SYS_MALLOC_SIZE=0x3000 +CONFIG_SPL_SYS_MALLOC_SIZE=0x4000 CONFIG_SPL_SYS_MMCSD_RAW_MODE=y -CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x800 +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1040 CONFIG_SPL_POWER_DOMAIN=y CONFIG_SPL_WATCHDOG=y CONFIG_HUSH_PARSER=y
@@ -112,10 +113,13 @@ CONFIG_PHYLIB=y CONFIG_MV88E61XX_SWITCH=y CONFIG_MV88E61XX_CPU_PORT=5 CONFIG_MV88E61XX_PHY_PORTS=0x7 +CONFIG_DM_ETH_PHY=y CONFIG_FEC_MXC_SHARE_MDIO=y CONFIG_FEC_MXC_MDIO_BASE=0x5B050000 CONFIG_FEC_MXC=y CONFIG_MII=y +CONFIG_PHY=y +CONFIG_NOP_PHY=y CONFIG_PINCTRL=y CONFIG_SPL_PINCTRL=y CONFIG_PINCTRL_IMX8=y
@@ -129,5 +133,7 @@ CONFIG_DM_SERIAL=y CONFIG_FSL_LPUART=y CONFIG_DM_THERMAL=y CONFIG_IMX_SCU_THERMAL=y -# CONFIG_SPL_WDT is not set +# CONFIG_WATCHDOG is not set +CONFIG_WDT=y +CONFIG_WDT_IMX_SCU=y CONFIG_SPL_TINY_MEMSET=y
Signature · 1 line
2.20.1
Fabio Estevam
reviewerRe: [PATCH v1 13/22] siemens: configs/capricorn_cxg3_defconfig: updates
Quoted 3 lines · Heiko Schocher
make savedefconfig and add
SCU_WDTand fix environment offsets, as since silicium c0 the boot container takes place
s/silicium/silicon
Re: [PATCH v1 13/22] siemens: configs/capricorn_cxg3_defconfig: updates
In reply to Heiko SchocherQuoted 6 lines · Heiko Schocher
make savedefconfig and add
SCU_WDTand fix environment offsets, as since silicium c0 the boot container takes place at offset 0 and so the u-boot-env must be moved outside of the boot container area.Signed-off-by Heiko Schocher <[email protected]>
Quoted 63 lines
---
configs/capricorn_cxg3_defconfig | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)configs/capricorn_cxg3_defconfig +0
-0@@ -10,7 +10,7 @@ CONFIG_NR_DRAM_BANKS=3CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80200000
CONFIG_ENV_SIZE=0x2000configs/capricorn_cxg3_defconfig +1
-1-CONFIG_ENV_OFFSET=0x0 +CONFIG_ENV_OFFSET=0x200000CONFIG_DM_GPIO=y
CONFIG_DEFAULT_DEVICE_TREE="imx8-capricorn-cxg3"CONFIG_SPL_TEXT_BASE=0x100000configs/capricorn_cxg3_defconfig +0
-0@@ -25,7 +25,7 @@ CONFIG_SPL_BSS_MAX_SIZE=0x1000CONFIG_SYS_BOOTM_LEN=0x800000
CONFIG_SYS_LOAD_ADDR=0x80280000
CONFIG_SPL=yconfigs/capricorn_cxg3_defconfig +1
-1-CONFIG_ENV_OFFSET_REDUND=0x2000 +CONFIG_ENV_OFFSET_REDUND=0x202000CONFIG_IDENT_STRING=" ##v01.06"
CONFIG_REMAKE_ELF=y
#CONFIG_EFI_LOADERis not setconfigs/capricorn_cxg3_defconfig +0
-0@@ -55,9 +55,10 @@ CONFIG_SPL_SYS_MALLOC_SIMPLE=yCONFIG_SPL_SYS_MALLOC=y
CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y
CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x120000configs/capricorn_cxg3_defconfig +1
-1-CONFIG_SPL_SYS_MALLOC_SIZE=0x3000 +CONFIG_SPL_SYS_MALLOC_SIZE=0x4000CONFIG_SPL_SYS_MMCSD_RAW_MODE=y
configs/capricorn_cxg3_defconfig +2
-1-CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x800 +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1040CONFIG_SPL_POWER_DOMAIN=y
CONFIG_SPL_WATCHDOG=y
CONFIG_HUSH_PARSER=yconfigs/capricorn_cxg3_defconfig +0
-0@@ -112,10 +113,13 @@ CONFIG_PHYLIB=yCONFIG_MV88E61XX_SWITCH=y
CONFIG_MV88E61XX_CPU_PORT=5
CONFIG_MV88E61XX_PHY_PORTS=0x7
+CONFIG_DM_ETH_PHY=y
CONFIG_FEC_MXC_SHARE_MDIO=y
CONFIG_FEC_MXC_MDIO_BASE=0x5B050000
CONFIG_FEC_MXC=y
CONFIG_MII=yconfigs/capricorn_cxg3_defconfig +2
-0+CONFIG_PHY=y +CONFIG_NOP_PHY=yCONFIG_PINCTRL=y
CONFIG_SPL_PINCTRL=y
CONFIG_PINCTRL_IMX8=yconfigs/capricorn_cxg3_defconfig +0
-0@@ -129,5 +133,7 @@ CONFIG_DM_SERIAL=yCONFIG_FSL_LPUART=y
CONFIG_DM_THERMAL=y
CONFIG_IMX_SCU_THERMAL=yconfigs/capricorn_cxg3_defconfig +3
-1-# CONFIG_SPL_WDT is not set +# CONFIG_WATCHDOG is not set +CONFIG_WDT=y +CONFIG_WDT_IMX_SCU=yCONFIG_SPL_TINY_MEMSET=y
Signature · 3 lines
Alexander Sverdlin Siemens AG www.siemens.com
PATCH 14/22 siemens: capricorn: sync spl code with 8qxp-mek
In reply to Heiko Schochersync spl code with 8qxp-mek board.
---
board/siemens/capricorn/spl.c | 38 +++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+)
board/siemens/capricorn/spl.c +38 -0
@@ -15,12 +15,30 @@#include <dm/uclass-internal.h> #include <dm/device-internal.h> +#include <firmware/imx/sci/sci.h> +#include <asm/arch/imx8-pins.h> +#include <asm/arch/iomux.h> +#include <asm/gpio.h> +#include <asm/arch/sys_proto.h> +DECLARE_GLOBAL_DATA_PTR ; +#define GPIO_PAD_CTRL ((SC_PAD_CONFIG_NORMAL << PADRING_CONFIG_SHIFT) | \ + (SC_PAD_ISO_OFF << PADRING_LPCONFIG_SHIFT) | \ + (SC_PAD_28FDSOI_DSE_DV_HIGH << PADRING_DSE_SHIFT) | \ + (SC_PAD_28FDSOI_PS_PU << PADRING_PULL_SHIFT)) + +#define USDHC2_SD_PWR IMX_GPIO_NR(4, 19) +static iomux_cfg_t usdhc2_sd_pwr[] = { +SC_P_USDHC1_RESET_B |MUX_PAD_CTRL (GPIO_PAD_CTRL ), +}; +void spl_board_init (void ) {struct udevice *dev; +uclass_get_device_by_driver (UCLASS_MISC ,DM_DRIVER_GET (imx8_scu), &dev); +uclass_find_first_device (UCLASS_MISC , &dev);for (; dev;uclass_find_next_device (&dev)) {
@@ -34,8 +52,28 @@ void spl_board_init(void)timer_init (); +imx8_iomux_setup_multiple_pads (usdhc2_sd_pwr,ARRAY_SIZE (usdhc2_sd_pwr)); +gpio_direction_output (USDHC2_SD_PWR ,0 ); +preloader_console_init (); + +puts ("Normal Boot\n" ); +} + +void spl_board_prepare_for_boot (void ) +{ +imx8_power_off_pd_devices (NULL ,0 ); +} + +#ifdef CONFIG_SPL_LOAD_FIT +int board_fit_config_name_match (const char *name) +{ +/* Just empty function now - can't decide what to choose */ +debug ("%s: %s\n" , __func__, name); + +return 0 ; } +#endif void board_init_f (ulong dummy) {
Signature · 1 line
2.20.1
PATCH 15/22 siemens: imx8-capricorn.dtsi: small adaptions
In reply to Heiko Schocher- remove DMA for console
- add wdt device
---
arch/arm/dts/imx8-capricorn.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
arch/arm/dts/imx8-capricorn.dtsi +16 -0
@@ -17,6 +17,22 @@ stdout-path = &lpuart2; }; + /* remove DMA for console */ + lpuart2: serial@5a080000 { + power-domains = <&pd_dma_lpuart2>; + dma-names = ""; + dmas = <0>; + }; + + /* create device for u-boot wdt command */ + scu-wdt { + compatible = "siemens,scu-wdt"; + }; + +}; + +&A35_0 { + bootph-all; }; &iomuxc {
Signature · 1 line
2.20.1
Fabio Estevam
reviewerRe: [PATCH v1 15/22] siemens: imx8-capricorn.dtsi: small adaptions
Hi Heiko,
Quoted 2 lines · Heiko Schocher
- remove DMA for console
Why? Does it cause problems in U-Boot?
Quoted 6 lines
- add wdt device
Signed-off-by Heiko Schocher <[email protected]>---
arch/arm/dts/imx8-capricorn.dtsi | 16 ++++++++++++++++
Are there any plans to upstream this dtsi and switch to OF_UPSTREAM?
Re: [PATCH v1 15/22] siemens: imx8-capricorn.dtsi: small adaptions
Hello Fabio,
Quoted 7 lines · Fabio Estevam
Hi Heiko,
Quoted 2 lines · Heiko Schocher
- remove DMA for console
Why? Does it cause problems in U-Boot?
Forward this question to Enrico.
Quoted 8 lines
Quoted 6 lines
- add wdt device
Signed-off-by Heiko Schocher <[email protected]>---
arch/arm/dts/imx8-capricorn.dtsi | 16 ++++++++++++++++Are there any plans to upstream this dtsi and switch to
OF_UPSTREAM?
Hmm... good question! Currently we work on U-Boot to get mainline ready for use in production, so we get rid from NXP code.
I do not know, if we can reach this with mainline linux too...
May the siemens guys can answer this...
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]
RE: [PATCH v1 15/22] siemens: imx8-capricorn.dtsi: small adaptions
Hello Heiko, Fabio
Quoted 18 lines
-----Original Message-----
From: Heiko Schocher <[email protected]>
Sent: Monday, November 11, 2024 6:53 AM
To: Fabio Estevam <[email protected]>
Cc: U-Boot Mailing List <[email protected]>; Leto, Enrico (SI B PRO TI EAC CCP) <[email protected]>; Schweizer, Walter (SI B PRO TI EAC CCP) <[email protected]>; Sverdlin, Alexander (SI B PRO TI EAC CCP) <[email protected]>; Anatolij Gustschin <[email protected]>; NXP i.MX U-Boot Team <[email protected]>; Babic, Stefano (EXT) (DENX Software Engineering GmbH) <[email protected]>; Tom Rini <[email protected]>
Subject: Re: [PATCH v1 15/22] siemens:imx8-capricorn.dtsi: small adaptionsHello Fabio,
Quoted 2 lines · Fabio Estevam
Hi Heiko,
Quoted 7 lines
Quoted 5 lines · Heiko Schocher
Quoted 2 lines
- remove DMA for console
Why? Does it cause problems in U-Boot?
Forward this question to Enrico.
The reference implementation of the imx8qxp/imx8dx (mek board) uses lpuart0 for the console. We have the console on lpuart2.
Getting a look on NXP u-boot that is today the base of our code, DMA is defined for lpuart1-2-3, not for lpuart0. NXP doesn't use DMA for the console anywhere for imx8. It seems it doesn't work properly with their driver. For this reason, we disabled the DMA here.
Getting now a look to u-boot upstream I see that the DMA is not configured anywhere. Moving to upstream we don't have to disable anymore.
@Heiko: I propose to remove.
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
- add wdt device
Signed-off-by Heiko Schocher <[email protected]>---
arch/arm/dts/imx8-capricorn.dtsi | 16 ++++++++++++++++
Quoted 8 lines
Quoted 1 line
Are there any plans to upstream this dtsi and switch to
OF_UPSTREAM?Hmm... good question! Currently we work on U-Boot to get mainline ready for use in production, so we get rid from NXP code.
I do not know, if we can reach this with mainline linux too...
May the siemens guys can answer this...
Here the commit "feat(scu_wdt): add option to control external wdt via IMX8 SCU" https://code.siemens.com/ccp/u-boot/-/commit/a5b99d1c406fdf92cd1d7d50d566a4e1e66c447b
@Heiko: Check if we have a chance to put the whole commit upstream.
Quoted 7 lines
bye,
Heiko
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]
Thanks,
Enrico
Re: [PATCH v1 15/22] siemens: imx8-capricorn.dtsi: small adaptions
Hello Enrico,
Quoted 28 lines · Enrico
Hello Heiko, Fabio
Quoted 18 lines
-----Original Message-----
From: Heiko Schocher <[email protected]>
Sent: Monday, November 11, 2024 6:53 AM
To: Fabio Estevam <[email protected]>
Cc: U-Boot Mailing List <[email protected]>; Leto, Enrico (SI B PRO TI EAC CCP) <[email protected]>; Schweizer, Walter (SI B PRO TI EAC CCP) <[email protected]>; Sverdlin, Alexander (SI B PRO TI EAC CCP) <[email protected]>; Anatolij Gustschin <[email protected]>; NXP i.MX U-Boot Team <[email protected]>; Babic, Stefano (EXT) (DENX Software Engineering GmbH) <[email protected]>; Tom Rini <[email protected]>
Subject: Re: [PATCH v1 15/22] siemens:imx8-capricorn.dtsi: small adaptionsHello Fabio,
Quoted 2 lines · Fabio Estevam
Hi Heiko,
Quoted 7 lines
Quoted 5 lines · Heiko Schocher
Quoted 2 lines
- remove DMA for console
Why? Does it cause problems in U-Boot?
Forward this question to Enrico.
Quoted 8 lines
The reference implementation of the imx8qxp/imx8dx (mek board) uses lpuart0 for the console. We have the console on lpuart2.
Getting a look on NXP u-boot that is today the base of our code, DMA is defined for lpuart1-2-3, not for lpuart0. NXP doesn't use DMA for the console anywhere for imx8. It seems it doesn't work properly with their driver. For this reason, we disabled the DMA here.
Getting now a look to u-boot upstream I see that the DMA is not configured anywhere. Moving to upstream we don't have to disable anymore.
@Heiko: I propose to remove.
Okay, i remove it and test, thanks!
Quoted 12 lines
Quoted 12 lines
Quoted 8 lines
Quoted 6 lines
- add wdt device
Signed-off-by Heiko Schocher <[email protected]>---
arch/arm/dts/imx8-capricorn.dtsi | 16 ++++++++++++++++Are there any plans to upstream this dtsi and switch to
OF_UPSTREAM?Hmm... good question! Currently we work on U-Boot to get mainline ready for use in production, so we get rid from NXP code.
Quoted 7 lines
Quoted 3 lines
I do not know, if we can reach this with mainline linux too...
May the siemens guys can answer this...
Here the commit "
feat(scu_wdt): add option to control external wdt via IMX8 SCU" https://code.siemens.com/ccp/u-boot/-/commit/a5b99d1c406fdf92cd1d7d50d566a4e1e66c447b@Heiko: Check if we have a chance to put the whole commit upstream.
Aehm... this is the "reworked for mainline patch" we currently talk about!
:-P
The question is, if we can get the siemens linux port also to mainline linux! But we should discuss first internally...
bye,
Heiko
Quoted 12 lines
Quoted 8 lines
bye,
Heiko
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]Thanks,
Enrico
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]
RE: [PATCH v1 15/22] siemens: imx8-capricorn.dtsi: small adaptions
Hi Heiko
Quoted 84 lines
-----Original Message-----
From: Heiko Schocher <[email protected]>
Sent: Monday, November 11, 2024 9:48 AM
To: Leto, Enrico (SI B PRO TI EAC CCP) <[email protected]>; Fabio Estevam <[email protected]>
Cc: U-Boot Mailing List <[email protected]>; Schweizer, Walter (SI B PRO TI EAC CCP) <[email protected]>; Sverdlin, Alexander (SI B PRO TI EAC CCP) <[email protected]>; Anatolij Gustschin <[email protected]>; NXP i.MX U-Boot Team <[email protected]>; Babic, Stefano (EXT) (DENX Software Engineering GmbH) <[email protected]>; Tom Rini <[email protected]>
Subject: Re: [PATCH v1 15/22] siemens:imx8-capricorn.dtsi: small adaptionsHello Enrico,
Quoted 24 lines · Enrico
Hello Heiko, Fabio
Quoted 22 lines
-----Original Message-----
From: Heiko Schocher <[email protected]>
Sent: Monday, November 11, 2024 6:53 AM
To: Fabio Estevam <[email protected]>
Cc: U-Boot Mailing List <[email protected]>; Leto, Enrico (SI B PRO TI EAC
CCP) <[email protected]>; Schweizer, Walter (SI B PRO TI EAC CCP) <[email protected]>; Sverdlin, Alexander (SI B PRO TI EAC CCP) <[email protected]>; Anatolij Gustschin <[email protected]>; NXP i.MX U-Boot Team <[email protected]>; Babic, Stefano (EXT) (DENX Software Engineering GmbH) <[email protected]>; Tom Rini <[email protected]>
Subject: Re: [PATCH v1 15/22] siemens:imx8-capricorn.dtsi: small adaptionsHello Fabio,
Quoted 4 lines · Fabio Estevam
Hi Heiko,
Quoted 1 line · Heiko Schocher
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
- remove DMA for console
Why? Does it cause problems in U-Boot?
Forward this question to Enrico.
The reference implementation of the imx8qxp/imx8dx (mek board) uses
lpuart0 for the console. We have the console on lpuart2.
Quoted 2 lines
Getting a look on NXP u-boot that is today the base of our code, DMA is
defined for lpuart1-2-3, not for lpuart0. NXP doesn't use DMA for the console anywhere for imx8. It seems it doesn't work properly with their driver. For this reason, we disabled the DMA here.
Quoted 2 lines
Getting now a look to u-boot upstream I see that the DMA is not configured
anywhere.
Quoted 3 lines
Moving to upstream we don't have to disable anymore.
@Heiko: I propose to remove.
Okay, i remove it and test, thanks!
Quoted 12 lines
Quoted 12 lines
Quoted 8 lines
Quoted 6 lines
- add wdt device
Signed-off-by Heiko Schocher <[email protected]>---
arch/arm/dts/imx8-capricorn.dtsi | 16 ++++++++++++++++Are there any plans to upstream this dtsi and switch to
OF_UPSTREAM?Hmm... good question! Currently we work on U-Boot to get mainline ready for use in production, so we get rid from NXP code.
Quoted 7 lines
Quoted 3 lines
I do not know, if we can reach this with mainline linux too...
May the siemens guys can answer this...
Here the commit "
feat(scu_wdt): add option to control external wdt via IMX8 SCU"
https://code.siemens.com/ccp/u-boot/-/commit/a5b99d1c406fdf92cd1d7d50d
Quoted 2 lines
566a4e1e66c447b
Quoted 9 lines
Quoted 1 line
@Heiko: Check if we have a chance to put the whole commit upstream.
Aehm... this is the "reworked for mainline patch" we currently talk about!
:-P
The question is, if we can get the siemens linux port also to mainline linux! But we should discuss first internally...
Overseen. The patch mentioned above is now shared in 01/22 and here.
I would update the commit text like "siemens: imx8-capricorn.dtsi: enable scu-wdt".
Quoted 19 lines
bye,
HeikoQuoted 9 lines
Quoted 8 lines
bye,
Heiko
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]Quoted 3 lines
Thanks,
Enrico--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]
Re: [PATCH v1 15/22] siemens: imx8-capricorn.dtsi: small adaptions
In reply to Heiko SchocherHi Heiko!
Quoted 10 lines · Heiko Schocher
Quoted 3 lines
Here the commit "
feat(scu_wdt): add option to control external wdt via IMX8 SCU" https://code.siemens.com/ccp/u-boot/-/commit/a5b99d1c406fdf92cd1d7d50d566a4e1e66c447b@Heiko: Check if we have a chance to put the whole commit upstream.
Aehm... this is the "reworked for mainline patch" we currently talk about!
:-P
The question is, if we can get the siemens linux port also to mainline linux! But we should discuss first internally...
There is no Linux-counterpart for the SCU WDT story, Linux WDT driver only uses standard API of SCU FW. The U-Boot extensions will talk to firmware extensions, as I've described previously:
https://lists.denx.de/pipermail/u-boot/2024-November/571091.html
Signature · 3 lines
Alexander Sverdlin Siemens AG www.siemens.com
Re: [PATCH v1 15/22] siemens: imx8-capricorn.dtsi: small adaptions
In reply to Heiko SchocherHello Heiko, Fabio,
Quoted 10 lines · Heiko Schocher
Quoted 3 lines
Quoted 1 line
arch/arm/dts/imx8-capricorn.dtsi| 16 ++++++++++++++++Are there any plans to upstream this dtsi and switch to
OF_UPSTREAM?Hmm... good question! Currently we work on U-Boot to get mainline ready for use in production, so we get rid from NXP code.
I do not know, if we can reach this with mainline linux too...
May the siemens guys can answer this...
speaking about the concrete file, or Siemens DTs in general, currently we don't have plans to upstream them. We are currently in fact quite far from being able to do this. Currently it's only me working in this direction, but... We have about 1k patches in total, where roughly a half of them are NXP BSP patches. Another half are our configs, our DTs and our (and DENX ;-) fixes to, say, drivers. So I try at least to reduce the diff on the drivers, both Siemens and DENX patches.
But I don't feel that we would be able to clean up this legacy platform to the extent that we could enable OF_UPSTREAM.
Signature · 3 lines
Alexander Sverdlin Siemens AG www.siemens.com
PATCH 16/22 siemens: capricorn: board.c fixes
In reply to Heiko Schochershow build_info and only init uart2.
---
board/siemens/capricorn/board.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
board/siemens/capricorn/board.c +2 -3
@@ -63,8 +63,7 @@ int board_early_init_f(void)sc_pm_clock_rate_t rate =SC_80MHZ ;int ret; - ret =sc_pm_setup_uart (SC_R_UART_0 , rate); - ret |=sc_pm_setup_uart (SC_R_UART_2 , rate); + ret =sc_pm_setup_uart (SC_R_UART_2 , rate);if (ret)return ret;
@@ -275,7 +274,7 @@ int checkboard(void)* Running build_info() doesn't work with current SCFW blob. * Uncomment below call when new blob is available. */ -/*build_info();*/ +build_info ();print_bootinfo ();return 0 ;
Signature · 1 line
2.20.1
Fabio Estevam
reviewerRe: [PATCH v1 16/22] siemens: capricorn: board.c fixes
Hi Heiko,
Please use a more descriptive Subject line.
"board.c fixes" is not meaningful.
Re: [PATCH v1 16/22] siemens: capricorn: board.c fixes
Hello Fabio,
Quoted 6 lines · Fabio Estevam
Hi Heiko,
Please use a more descriptive Subject line.
"
board.cfixes" is not meaningful.
Heh, indeed!
Thanks!
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]
PATCH 17/22 siemens: capricorn: add HW version information to boot log
In reply to Heiko SchocherAdd the HW version read directly from EEPROM.
EEPROM chip data structure is now in a .h file common to draco and capricorn.
Therefore move out the definitions in drace board to siemens common place.
---
board/siemens/capricorn/board.c | 24 ++++++++++++++++++ board/siemens/common/board.h | 44 +++++++++++++++++++++++++++++++++ board/siemens/draco/board.h | 10 ++------ 3 files changed, 70 insertions(+), 8 deletions(-) create mode 100644 board/siemens/common/board.h
board/siemens/capricorn/board.c +24 -0
@@ -26,6 +26,7 @@#include <asm/arch-imx8/clock.h> #endif #include <linux/delay.h> +#include "../common/board.h" #include "../common/eeprom.h" #include "../common/factoryset.h"
@@ -282,6 +283,29 @@ int checkboard(void)int board_init (void ) { +#ifndef CONFIG_XPL_BUILD +struct chip_data eeprom_data = {}; +int ret; + + ret =siemens_ee_setup (); +if (ret) { +printf ("'siemens_ee_setup' failed, ret: %d\n" , ret); + goto skip; + } + + ret =siemens_ee_read_data (SIEMENS_EE_ADDR_CHIP , + (uchar *)&eeprom_data, +sizeof (eeprom_data)); +if (ret) { +printf ("'siemens_ee_read_data' failed, ret: %d\n" , ret); + goto skip; + } + +printf ("HW Version: %s\n" , eeprom_data.shwver); + +skip: +#endif +setup_fec ();return 0 ; }
board/siemens/common/board.h new file +44 -0
44 lines not on this page · raw message
board/siemens/draco/board.h +2 -8
@@ -11,6 +11,8 @@#ifndef _BOARD_DRACO_H_#define _BOARD_DRACO_H_ +#include "../common/board.h" +#define PARGS (x) #x ,/* Parameter Name */ \ settings.ddr3.x,/* EEPROM Value */ \ ddr3_default.x, /* Default Value */ \
@@ -18,8 +20,6 @@#define PRINTARGS (y) printf("%-20s, %8x, %8x, %4d\n", PARGS(y)) -#define MAGIC_CHIP 0x50494843 -/* Automatic generated definition */ /* Wed, 16 Apr 2014 16:50:41 +0200 */ /* From file: draco/[email protected] */
@@ -43,12 +43,6 @@ struct ddr3_data {char manu_marking[32 ];/* "default \0" */ }; -struct chip_data { -unsigned int magic; -char sdevname[16 ]; -char shwver[7 ]; -}; -struct draco_baseboard_id {struct ddr3_data ddr3;struct chip_data chip;
Signature · 1 line
2.20.1
Fabio Estevam
reviewerRe: [PATCH v1 17/22] siemens: capricorn: add HW version information to boot log
Quoted 7 lines · Heiko Schocher
Add the HW version read directly from EEPROM.
EEPROM chip data structure is now in a .h file common to draco and capricorn.
Therefore move out the definitions in drace board to siemens
s/drace/draco
Quoted 4 lines
common place.
Signed-off-by Alessandro Zini <[email protected]>Signed-off-by Heiko Schocher <[email protected]>
It's not clear to me who the author of this patch is. If it is Alessandro, then a From line with his name is missing.
Please clarify.
Re: [PATCH v1 17/22] siemens: capricorn: add HW version information to boot log
Hello Fabio,
Quoted 13 lines · Fabio Estevam
Quoted 7 lines · Heiko Schocher
Add the HW version read directly from EEPROM.
EEPROM chip data structure is now in a .h file common to draco and capricorn.
Therefore move out the definitions in drace board to siemens
s/drace/draco
Quoted 2 lines
common place.
Quoted 7 lines
Quoted 2 lines
Signed-off-by Alessandro Zini <[email protected]>Signed-off-by Heiko Schocher <[email protected]>It's not clear to me who the author of this patch is. If it is Alessandro, then a From line with his name is missing.
Please clarify.
It is from Alessandro, I will add it in next version, thanks!
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]
PATCH 18/22 siemens: capricorn: get ram size from system controller
In reply to Heiko SchocherFrom: Enrico Leto <[email protected]>
Get the memory region information from system controller to reduce the number of platform specific headers. We were aligned on NXP mek board implementation. This need at least 1 header per memory configuration.
---
board/siemens/capricorn/board.c | 34 ++++++++++++++++++++++++++++++ include/configs/capricorn-common.h | 4 +++- 2 files changed, 37 insertions(+), 1 deletion(-)
board/siemens/capricorn/board.c +34 -0
@@ -73,6 +73,40 @@ int board_early_init_f(void)return 0 ; } +#ifndef CONFIG_XPL_BUILD +void board_mem_get_layout (u64 *phys_sdram_1_start, +u64 *phys_sdram_1_size, +u64 *phys_sdram_2_start, +u64 *phys_sdram_2_size) +{ +sc_faddr_t addr_start, addr_end; +sc_faddr_t sdram_1_size, sdram_2_size; +sc_err_t sc_err; + + sc_err =sc_rm_get_memreg_info (-1 ,6 , &addr_start, &addr_end); +if (sc_err ==SC_ERR_NONE ) { +if (addr_end <0x100000000 ) { +/* only lower RAM available */ + sdram_1_size = (addr_end +1 ) -PHYS_SDRAM_1 ; + sdram_2_size =0 ; + }else { +/* lower RAM (2 GB) und upper RAM available */ + sdram_1_size =SZ_2G ; + sdram_2_size = (addr_end +1 ) -PHYS_SDRAM_2 ; + } + }else { +/* Get default in case it would fail */ + sdram_1_size =PHYS_SDRAM_1_SIZE ; + sdram_2_size =PHYS_SDRAM_2_SIZE ; + } + + *phys_sdram_1_start =PHYS_SDRAM_1 ; + *phys_sdram_1_size = sdram_1_size; + *phys_sdram_2_start =PHYS_SDRAM_2 ; + *phys_sdram_2_size = sdram_2_size; +} +#endif /* ! CONFIG_XPL_BUILD */ +#define ENET_PHY_RESET IMX_GPIO_NR(0, 3)#define ENET_TEST_1 IMX_GPIO_NR(0, 8)#define ENET_TEST_2 IMX_GPIO_NR(0, 9)
include/configs/capricorn-common.h +3 -1
@@ -95,7 +95,9 @@#define CFG_SYS_SDRAM_BASE 0x80000000#define PHYS_SDRAM_1 0x80000000#define PHYS_SDRAM_2 0x880000000 -/* DDR3 board total DDR is 1 GB */ +/* Set default values to the smallest DDR we have in capricorn modules +* Use it in case the system controller would return an error +*/ #define PHYS_SDRAM_1_SIZE 0x40000000/* 1 GB */ #define PHYS_SDRAM_2_SIZE 0x00000000/* 0 GB */
Signature · 1 line
2.20.1
PATCH 19/22 siemens: capricorn: get module name from eeprom
In reply to Heiko SchocherFrom: Enrico Leto <[email protected]>
The eeprom contains the information on which module we are running, so read it from the eeprom and print it on the console.
---
board/siemens/capricorn/board.c | 6 ++++++ 1 file changed, 6 insertions(+)
board/siemens/capricorn/board.c +6 -0
@@ -319,6 +319,7 @@ int board_init(void) {#ifndef CONFIG_XPL_BUILD struct chip_data eeprom_data = {}; +char module_name[16 ];int ret; ret =siemens_ee_setup ();
@@ -327,6 +328,11 @@ int board_init(void) goto skip; } +/* Get module name from EEPROM */ +siemens_ee_read_data (SIEMENS_EE_ADDR_DDR3 , module_name, +sizeof (module_name)); +printf ("CPU module: %s\n" , module_name); + ret =siemens_ee_read_data (SIEMENS_EE_ADDR_CHIP , (uchar *)&eeprom_data,sizeof (eeprom_data));
Signature · 1 line
2.20.1
PATCH 20/22 siemens: add ddr full memory test
In reply to Heiko SchocherAdd siemens specific memory test. Enable it through Kconfig option SPL_CMT.
The test is required from our HW team. It runs over temperature during many days:
* must run indefinitively through the whole DDR area
* must write/read/check all values
---
board/siemens/capricorn/Kconfig | 7 + board/siemens/capricorn/Makefile | 1 + board/siemens/capricorn/spl.c | 5 + board/siemens/capricorn/spl_memory_test.c | 158 ++++++++++++++++++++++ board/siemens/capricorn/spl_memory_test.h | 7 + 5 files changed, 178 insertions(+) create mode 100644 board/siemens/capricorn/spl_memory_test.c create mode 100644 board/siemens/capricorn/spl_memory_test.h
board/siemens/capricorn/Kconfig +7 -0
@@ -14,3 +14,10 @@ config IMX_CONFIG default "board/siemens/capricorn/imximage.cfg" endif + + +config SPL_CMT + bool "Enable Siemens SPL RAM test" + depends on SPL + help + Enable SIemens SPL RAM test.
board/siemens/capricorn/Makefile +1 -0
@@ -8,6 +8,7 @@ obj-y += ../common/eeprom.o ifdef CONFIG_XPL_BUILD obj-y += spl.o +obj-$(CONFIG_SPL_CMT) += spl_memory_test.o else obj-y += ../common/factoryset.o endif
board/siemens/capricorn/spl.c +5 -0
@@ -20,6 +20,7 @@#include <asm/arch/iomux.h> #include <asm/gpio.h> #include <asm/arch/sys_proto.h> +#include "spl_memory_test.h" DECLARE_GLOBAL_DATA_PTR ;
@@ -58,6 +59,10 @@ void spl_board_init(void)preloader_console_init ();puts ("Normal Boot\n" ); + +#if IS_ENABLED (CONFIG_SPL_CMT ) +spl_siemens_memory_full_test (); +#endif }void spl_board_prepare_for_boot (void )
board/siemens/capricorn/spl_memory_test.c new file +158 -0
158 lines not on this page · raw message
board/siemens/capricorn/spl_memory_test.h new file +7 -0
@@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Copyright Siemens AG 2020 +* +*/ + +void spl_siemens_memory_full_test (void );
Signature · 1 line
2.20.1
Fabio Estevam
reviewerRe: [PATCH v1 20/22] siemens: add ddr full memory test
Hi Heiko,
Quoted 7 lines · Heiko Schocher
Add siemens specific memory test. Enable it through
KconfigoptionSPL_CMT.
The test is required from our HW team. It runs over temperature during many days:
* must run indefinitively through the whole DDR area
* must write/read/check all values
Isn't it better to run a utility in Linux like memtester for this purpose?
Re: [PATCH v1 20/22] siemens: add ddr full memory test
Hello Fabio,
Quoted 4 lines · Fabio Estevam
Hi Heiko,
Quoted 1 line · Heiko Schocher
Quoted 8 lines
Quoted 6 lines
Add siemens specific memory test. Enable it through
KconfigoptionSPL_CMT.
The test is required from our HW team. It runs over temperature during many days:
* must run indefinitively through the whole DDR area
* must write/read/check all valuesIsn't it better to run a utility in Linux like memtester for this purpose?
@Enrico: Could you answer?
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]
RE: [PATCH v1 20/22] siemens: add ddr full memory test
Hi Heiko, Fabio,
Quoted 25 lines
-----Original Message-----
From: Heiko Schocher <[email protected]>
Sent: Monday, November 11, 2024 6:56 AM
To: Fabio Estevam <[email protected]>
Cc: U-Boot Mailing List <[email protected]>; Leto, Enrico (SI B PRO TI EAC CCP) <[email protected]>; Schweizer, Walter (SI B PRO TI EAC CCP) <[email protected]>; Sverdlin, Alexander (SI B PRO TI EAC CCP) <[email protected]>; Anatolij Gustschin <[email protected]>; Simon Glass <[email protected]>; Tom Rini <[email protected]>
Subject: Re: [PATCH v1 20/22] siemens: add ddr full memory testHello Fabio,
Quoted 11 lines · Fabio Estevam
Hi Heiko,
Quoted 7 lines · Heiko Schocher
Add siemens specific memory test. Enable it through
KconfigoptionSPL_CMT.
The test is required from our HW team. It runs over temperature during many days:
* must run indefinitively through the whole DDR area
* must write/read/check all values
Quoted 4 lines
Quoted 1 line
Isn't it better to run a utility in Linux like memtester for this purpose?
@Enrico: Could you answer?
The test is a request from our management and defined from our HW team to make an internal certification of the DDR component we use. The test must run over the whole DDR area. It cannot be placed and run from DDR itself but from internal RAM. u-boot and linux are too large to take place in the internal RAM. Alternative like to run the test on 99% of the DDR area was not accepted.
Quoted 6 lines
bye,
Heiko
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]
PATCH 21/22 siemens: add ddr signal integrity test
In reply to Heiko SchocherFrom: Enrico Leto <[email protected]>
The signal integrity test generates pattern on DDR lines for certification. The signals must be as fast as possible and unidirectional.
The test is required from our HW team. The available u-boot memory test doesn't full fill the our requirements.
The test is planed to be used in all new siemens boards.
---
board/siemens/capricorn/Kconfig | 2 + board/siemens/capricorn/Makefile | 1 + board/siemens/common/Kconfig | 4 + board/siemens/common/ddr_si_test.c | 348 +++++++++++++++++++++++++++++ 4 files changed, 355 insertions(+) create mode 100644 board/siemens/common/ddr_si_test.c
board/siemens/capricorn/Kconfig +2 -0
@@ -21,3 +21,5 @@ config SPL_CMT depends on SPL help Enable SIemens SPL RAM test. + +source "board/siemens/common/Kconfig"
board/siemens/capricorn/Makefile +1 -0
@@ -11,4 +11,5 @@ obj-y += spl.o obj-$(CONFIG_SPL_CMT) += spl_memory_test.o else obj-y += ../common/factoryset.o +obj-$(CONFIG_DDR_SI_TEST) += ../common/ddr_si_test.o endif
board/siemens/common/Kconfig +4 -0
@@ -1,2 +1,6 @@ config FACTORYSET bool + +config DDR_SI_TEST + bool "DDR signal integrity test implementations" + default y
board/siemens/common/ddr_si_test.c new file +348 -0
348 lines not on this page · raw message
Signature · 1 line
2.20.1
PATCH 22/22 siemens: capricorn: update maintainers
In reply to Heiko SchocherFrom: Enrico Leto <[email protected]>
update MAINTAINERS file, add some more board maintainers.
---
board/siemens/capricorn/MAINTAINERS | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
board/siemens/capricorn/MAINTAINERS +7 -5
@@ -1,10 +1,12 @@ CAPRICORN BOARD +M: Alexander Sverdlin <[email protected]> M: Anatolij Gustschin <[email protected]> +M: Heiko Schocher <[email protected]> +M: Walter Schweizer <[email protected]> S: Maintained +F: arch/arm/dts/imx8-capricorn-cxg3.dts +F: arch/arm/dts/imx8-capricorn-u-boot.dtsi +F: arch/arm/dts/imx8-capricorn.dtsi F: board/siemens/capricorn/ +F: configs/capricorn_cxg3_defconfig F: include/configs/capricorn-common.h -F: include/configs/deneb.h -F: include/configs/giedi.h -F: include/configs/siemens-env-common.h -F: configs/deneb_defconfig -F: configs/giedi_defconfig
Signature · 1 line
2.20.1
Re: [PATCH v1 22/22] siemens: capricorn: update maintainers
Quoted 6 lines · Heiko Schocher
From: Enrico Leto <[email protected]>
update
MAINTAINERSfile, add some more board maintainers.Signed-off-by Enrico Leto <[email protected]>Signed-off-by Heiko Schocher <[email protected]>
Quoted 27 lines
---
board/siemens/capricorn/MAINTAINERS | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)board/siemens/capricorn/MAINTAINERS +0
-0@@ -1,10 +1,12 @@CAPRICORN BOARD
+M: Alexander Sverdlin <[email protected]>
M: Anatolij Gustschin <[email protected]>board/siemens/capricorn/MAINTAINERS +2
-0+M: Heiko Schocher <[email protected]> +M: Walter Schweizer <[email protected]>S: Maintained
board/siemens/capricorn/MAINTAINERS +3
-0+F: arch/arm/dts/imx8-capricorn-cxg3.dts +F: arch/arm/dts/imx8-capricorn-u-boot.dtsi +F: arch/arm/dts/imx8-capricorn.dtsiF: board/siemens/capricorn/
+F: configs/capricorn_cxg3_defconfig
F:include/configs/capricorn-common.hboard/siemens/capricorn/MAINTAINERS +0
-5-F: include/configs/deneb.h -F: include/configs/giedi.h -F: include/configs/siemens-env-common.h -F: configs/deneb_defconfig -F: configs/giedi_defconfig
Signature · 3 lines
Alexander Sverdlin Siemens AG www.siemens.com