* [PATCH 1/2] ARM: imx8mm-evk: Switch to deep-probe
@ 2022-10-24 6:36 Sascha Hauer
2022-10-24 6:36 ` [PATCH 2/2] ARM: imx8mm-evk: Add missing fsp_table Sascha Hauer
2022-10-24 7:58 ` [PATCH 1/2] ARM: imx8mm-evk: Switch to deep-probe Marco Felsch
0 siblings, 2 replies; 3+ messages in thread
From: Sascha Hauer @ 2022-10-24 6:36 UTC (permalink / raw)
To: Barebox List
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/nxp-imx8mm-evk/board.c | 24 +++++++++++++++++++-----
1 file changed, 19 insertions(+), 5 deletions(-)
diff --git a/arch/arm/boards/nxp-imx8mm-evk/board.c b/arch/arm/boards/nxp-imx8mm-evk/board.c
index 6e4df60065..3f14c05da1 100644
--- a/arch/arm/boards/nxp-imx8mm-evk/board.c
+++ b/arch/arm/boards/nxp-imx8mm-evk/board.c
@@ -8,6 +8,7 @@
#include <linux/phy.h>
#include <linux/sizes.h>
#include <mach/bbu.h>
+#include <deep-probe.h>
#include <envfs.h>
@@ -30,14 +31,11 @@ static int ar8031_phy_fixup(struct phy_device *phydev)
return 0;
}
-static int nxp_imx8mm_evk_init(void)
+static int imx8mm_evk_probe(struct device_d *dev)
{
int emmc_bbu_flag = 0;
int sd_bbu_flag = 0;
- if (!of_machine_is_compatible("fsl,imx8mm-evk"))
- return 0;
-
barebox_set_hostname("imx8mm-evk");
if (bootsource_get() == BOOTSOURCE_MMC) {
@@ -60,4 +58,20 @@ static int nxp_imx8mm_evk_init(void)
ar8031_phy_fixup);
return 0;
}
-device_initcall(nxp_imx8mm_evk_init);
+
+static const struct of_device_id imx8mm_evk_of_match[] = {
+ {
+ .compatible = "fsl,imx8mm-evk",
+ },
+ { /* sentinel */ },
+};
+
+
+static struct driver_d imx8mm_evk_board_driver = {
+ .name = "board-imx8mm-evk",
+ .probe = imx8mm_evk_probe,
+ .of_compatible = imx8mm_evk_of_match,
+};
+coredevice_platform_driver(imx8mm_evk_board_driver);
+
+BAREBOX_DEEP_PROBE_ENABLE(imx8mm_evk_of_match);
--
2.30.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/2] ARM: imx8mm-evk: Add missing fsp_table
2022-10-24 6:36 [PATCH 1/2] ARM: imx8mm-evk: Switch to deep-probe Sascha Hauer
@ 2022-10-24 6:36 ` Sascha Hauer
2022-10-24 7:58 ` [PATCH 1/2] ARM: imx8mm-evk: Switch to deep-probe Marco Felsch
1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2022-10-24 6:36 UTC (permalink / raw)
To: Barebox List
The fsp_table is needed for TF-A binaries that support DDR frequency
changing. On upstream TF-A this was introduced for i.MX8MM with:
| commit 9c336f6118a94970f4045641a971fd1e24dba462
| Author: Jacky Bai <ping.bai@nxp.com>
| Date: Mon Nov 25 13:19:37 2019 +0800
|
| feat(imx8m): add the ddr frequency change support for imx8m family
|
| Add the DDR frequency change support.
|
| Signed-off-by: Jacky Bai <ping.bai@nxp.com>
| Change-Id: If1167785796b8678c351569b83d2922c66f6e530
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/nxp-imx8mm-evk/lpddr4-timing.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/boards/nxp-imx8mm-evk/lpddr4-timing.c b/arch/arm/boards/nxp-imx8mm-evk/lpddr4-timing.c
index e7c01f9cc9..4b31d2803c 100644
--- a/arch/arm/boards/nxp-imx8mm-evk/lpddr4-timing.c
+++ b/arch/arm/boards/nxp-imx8mm-evk/lpddr4-timing.c
@@ -1975,4 +1975,5 @@ struct dram_timing_info imx8mm_evk_dram_timing = {
.ddrphy_trained_csr_num = ARRAY_SIZE(lpddr4_ddrphy_trained_csr),
.ddrphy_pie = lpddr4_phy_pie,
.ddrphy_pie_num = ARRAY_SIZE(lpddr4_phy_pie),
+ .fsp_table = { 4000, 400, 100, },
};
--
2.30.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] ARM: imx8mm-evk: Switch to deep-probe
2022-10-24 6:36 [PATCH 1/2] ARM: imx8mm-evk: Switch to deep-probe Sascha Hauer
2022-10-24 6:36 ` [PATCH 2/2] ARM: imx8mm-evk: Add missing fsp_table Sascha Hauer
@ 2022-10-24 7:58 ` Marco Felsch
1 sibling, 0 replies; 3+ messages in thread
From: Marco Felsch @ 2022-10-24 7:58 UTC (permalink / raw)
To: Sascha Hauer; +Cc: Barebox List
Hi Sascha,
On 22-10-24, Sascha Hauer wrote:
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> arch/arm/boards/nxp-imx8mm-evk/board.c | 24 +++++++++++++++++++-----
> 1 file changed, 19 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/boards/nxp-imx8mm-evk/board.c b/arch/arm/boards/nxp-imx8mm-evk/board.c
> index 6e4df60065..3f14c05da1 100644
> --- a/arch/arm/boards/nxp-imx8mm-evk/board.c
> +++ b/arch/arm/boards/nxp-imx8mm-evk/board.c
> @@ -8,6 +8,7 @@
> #include <linux/phy.h>
> #include <linux/sizes.h>
> #include <mach/bbu.h>
> +#include <deep-probe.h>
>
> #include <envfs.h>
>
> @@ -30,14 +31,11 @@ static int ar8031_phy_fixup(struct phy_device *phydev)
> return 0;
> }
>
> -static int nxp_imx8mm_evk_init(void)
> +static int imx8mm_evk_probe(struct device_d *dev)
> {
> int emmc_bbu_flag = 0;
> int sd_bbu_flag = 0;
>
> - if (!of_machine_is_compatible("fsl,imx8mm-evk"))
> - return 0;
> -
> barebox_set_hostname("imx8mm-evk");
>
> if (bootsource_get() == BOOTSOURCE_MMC) {
> @@ -60,4 +58,20 @@ static int nxp_imx8mm_evk_init(void)
> ar8031_phy_fixup);
> return 0;
> }
> -device_initcall(nxp_imx8mm_evk_init);
> +
> +static const struct of_device_id imx8mm_evk_of_match[] = {
> + {
> + .compatible = "fsl,imx8mm-evk",
> + },
> + { /* sentinel */ },
Nit: No comma needed after this entry.
> +};
> +
> +
One to much.
> +static struct driver_d imx8mm_evk_board_driver = {
> + .name = "board-imx8mm-evk",
> + .probe = imx8mm_evk_probe,
> + .of_compatible = imx8mm_evk_of_match,
> +};
> +coredevice_platform_driver(imx8mm_evk_board_driver);
> +
> +BAREBOX_DEEP_PROBE_ENABLE(imx8mm_evk_of_match);
> --
> 2.30.2
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-10-24 7:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-24 6:36 [PATCH 1/2] ARM: imx8mm-evk: Switch to deep-probe Sascha Hauer
2022-10-24 6:36 ` [PATCH 2/2] ARM: imx8mm-evk: Add missing fsp_table Sascha Hauer
2022-10-24 7:58 ` [PATCH 1/2] ARM: imx8mm-evk: Switch to deep-probe Marco Felsch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox