aboutsummaryrefslogtreecommitdiff
path: root/board/gateworks/venice/spl.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/gateworks/venice/spl.c')
-rw-r--r--board/gateworks/venice/spl.c46
1 files changed, 42 insertions, 4 deletions
diff --git a/board/gateworks/venice/spl.c b/board/gateworks/venice/spl.c
index 4eb7bdfcee..5aa209578b 100644
--- a/board/gateworks/venice/spl.c
+++ b/board/gateworks/venice/spl.c
@@ -71,6 +71,9 @@ static void spl_dram_init(int size)
dram_timing = &dram_timing_2gb_dual_die;
size = 2048;
#elif CONFIG_IMX8MP
+ case 1024:
+ dram_timing = &dram_timing_1gb_single_die;
+ break;
case 4096:
dram_timing = &dram_timing_4gb_dual_die;
break;
@@ -83,9 +86,12 @@ static void spl_dram_init(int size)
printf("DRAM : LPDDR4 ");
if (size > 512)
- printf("%d GiB\n", size / 1024);
+ printf("%d GiB", size / 1024);
else
- printf("%d MiB\n", size);
+ printf("%d MiB", size);
+ printf(" %dMT/s %dMHz\n",
+ dram_timing->fsp_msg[0].drate,
+ dram_timing->fsp_msg[0].drate / 2);
ddr_init(dram_timing);
}
@@ -121,7 +127,8 @@ static int power_init_board(void)
if ((!strncmp(model, "GW71", 4)) ||
(!strncmp(model, "GW72", 4)) ||
- (!strncmp(model, "GW73", 4))) {
+ (!strncmp(model, "GW73", 4)) ||
+ (!strncmp(model, "GW7905", 6))) {
ret = uclass_get_device_by_seq(UCLASS_I2C, 0, &bus);
if (ret) {
printf("PMIC : failed I2C1 probe: %d\n", ret);
@@ -132,11 +139,22 @@ static int power_init_board(void)
printf("PMIC : failed probe: %d\n", ret);
return ret;
}
- puts("PMIC : MP5416\n");
+#ifdef CONFIG_IMX8MM
+ puts("PMIC : MP5416 (IMX8MM)\n");
/* set VDD_ARM SW3 to 0.92V for 1.6GHz */
dm_i2c_reg_write(dev, MP5416_VSET_SW3,
BIT(7) | MP5416_VSET_SW3_SVAL(920000));
+#elif CONFIG_IMX8MP
+ puts("PMIC : MP5416 (IMX8MP)\n");
+
+ /* set VDD_ARM SW3 to 0.95V for 1.6GHz */
+ dm_i2c_reg_write(dev, MP5416_VSET_SW3,
+ BIT(7) | MP5416_VSET_SW3_SVAL(950000));
+ /* set VDD_SOC SW1 to 0.95V for 1.6GHz */
+ dm_i2c_reg_write(dev, MP5416_VSET_SW1,
+ BIT(7) | MP5416_VSET_SW1_SVAL(950000));
+#endif
}
else if (!strncmp(model, "GW74", 4)) {
@@ -327,6 +345,21 @@ int spl_board_boot_device(enum boot_device boot_dev_spl)
}
}
+unsigned long spl_mmc_get_uboot_raw_sector(struct mmc *mmc, unsigned long raw_sect)
+{
+ if (!IS_SD(mmc)) {
+ switch (EXT_CSD_EXTRACT_BOOT_PART(mmc->part_config)) {
+ case 1:
+ case 2:
+ if (IS_ENABLED(CONFIG_IMX8MN) || IS_ENABLED(CONFIG_IMX8MP))
+ raw_sect -= 32 * 2;
+ break;
+ }
+ }
+
+ return raw_sect;
+}
+
const char *spl_board_loader_name(u32 boot_device)
{
switch (boot_device) {
@@ -340,3 +373,8 @@ const char *spl_board_loader_name(u32 boot_device)
return NULL;
}
}
+
+void spl_board_init(void)
+{
+ arch_misc_init();
+}