Skip to contentSkip to conversation

toradex: tdx-cfg-clock: add new i.mx 8m mini/plus skus

PATCH New Igor Opaniuk 5 participants 30 messages Oct 28, 2020 – Dec 8, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/9 toradex: tdx-cfg-clock: add new i.mx 8m mini/plus skus

From: Marcel Ziswiler <[email protected]>

Add new i.MX 8M Mini/Plus SKUs to ConfigBlock handling:

0058: Verdin iMX8M Plus Quad 4GB Wi-Fi / BT IT

0059: Verdin iMX8M Mini Quad 2GB IT

0060: Verdin iMX8M Mini DualLite 1GB WB IT

0061: Verdin iMX8M Plus Quad 2GB

Rename existing SKU (use correct one):
Verdin iMX8M Nano SoloLite 1GB -> Verdin iMX8M Nano Quad 1GB Wi-Fi

---

 board/toradex/common/tdx-cfg-block.c | 42 ++++++++++++++++++++--------
 board/toradex/common/tdx-cfg-block.h |  8 ++++--
 2 files changed, 36 insertions(+), 14 deletions(-)
board/toradex/common/tdx-cfg-block.c +30 -12
index bf27b2fa66..475abf78a7 100644
@@ -16,7 +16,8 @@
 	defined(CONFIG_TARGET_COLIBRI_IMX6) || \
 	defined(CONFIG_TARGET_COLIBRI_IMX8X) || \
 	defined(CONFIG_TARGET_VERDIN_IMX8MM) || \
-	defined(CONFIG_TARGET_VERDIN_IMX8MN)
+	defined(CONFIG_TARGET_VERDIN_IMX8MN) || \
+	defined(CONFIG_TARGET_VERDIN_IMX8MP)
 #include <asm/arch/sys_proto.h>
 #else
 #define is_cpu_type(cpu) (0)
@@ -137,8 +138,12 @@ const char * const toradex_modules[] = {
 	[53] = "Apalis iMX8 QuadXPlus 2GB ECC IT",
 	[54] = "Apalis iMX8 DualXPlus 1GB",
 	[55] = "Verdin iMX8M Mini Quad 2GB Wi-Fi / BT IT",
-	[56] = "Verdin iMX8M Nano SoloLite 1GB", /* not currently on sale */
+	[56] = "Verdin iMX8M Nano Quad 1GB Wi-Fi / BT", /* not currently on sale */
 	[57] = "Verdin iMX8M Mini DualLite 1GB",
+	[58] = "Verdin iMX8M Plus Quad 4GB Wi-Fi / BT IT",
+	[59] = "Verdin iMX8M Mini Quad 2GB IT",
+	[60] = "Verdin iMX8M Mini DualLite 1GB WB IT",
+	[61] = "Verdin iMX8M Plus Quad 2GB",
 };
 
 const char * const toradex_carrier_boards[] = {
@@ -361,21 +366,15 @@ static int get_cfgblock_interactive(void)
 
 	if (cpu_is_pxa27x())
 		sprintf(message, "Is the module the 312 MHz version? [y/N] ");
-#if !defined(CONFIG_TARGET_VERDIN_IMX8MM) || !defined(CONFIG_TARGET_VERDIN_IMX8MN)
-	else
-		sprintf(message, "Is the module an IT version? [y/N] ");
-
-	len = cli_readline(message);
-	it = console_buffer[0];
-#else
 	else
 		it = 'y';
-#endif
 
 #if defined(CONFIG_TARGET_APALIS_IMX8) || \
 		defined(CONFIG_TARGET_APALIS_IMX8X) || \
 		defined(CONFIG_TARGET_COLIBRI_IMX6ULL) || \
-		defined(CONFIG_TARGET_COLIBRI_IMX8X)
+		defined(CONFIG_TARGET_COLIBRI_IMX8X) || \
+		defined(CONFIG_TARGET_VERDIN_IMX8MM) || \
+		defined(CONFIG_TARGET_VERDIN_IMX8MP)
 	sprintf(message, "Does the module have Wi-Fi / Bluetooth? [y/N] ");
 	len = cli_readline(message);
 	wb = console_buffer[0];
@@ -429,7 +428,7 @@ static int get_cfgblock_interactive(void)
 	else if (is_cpu_type(MXC_CPU_IMX8MMDL))
 		tdx_hw_tag.prodid = VERDIN_IMX8MMDL;
 	else if (is_cpu_type(MXC_CPU_IMX8MN))
-		tdx_hw_tag.prodid = VERDIN_IMX8MNSL;
+		tdx_hw_tag.prodid = VERDIN_IMX8MNQ_WIFI_BT;
 	else if (is_cpu_type(MXC_CPU_IMX8QM)) {
 		if (it == 'y' || it == 'Y') {
 			if (wb == 'y' || wb == 'Y')
@@ -465,6 +464,25 @@ static int get_cfgblock_interactive(void)
 				tdx_hw_tag.prodid = COLIBRI_IMX8DX;
 		}
 #endif
+	} else if (is_cpu_type(MXC_CPU_IMX8MM)) {
+		if (is_cpu_type(MXC_CPU_IMX8MMDL)) {
+			if (wb == 'y' || wb == 'Y')
+				tdx_hw_tag.prodid = VERDIN_IMX8MMDL_WIFI_BT_IT;
+			else
+				tdx_hw_tag.prodid = VERDIN_IMX8MMDL;
+		} else {
+			if (wb == 'y' || wb == 'Y')
+				tdx_hw_tag.prodid = VERDIN_IMX8MMQ_WIFI_BT_IT;
+			else
+				tdx_hw_tag.prodid = VERDIN_IMX8MMQ_IT;
+		}
+	} else if (is_cpu_type(MXC_CPU_IMX8MN)) {
+		tdx_hw_tag.prodid = VERDIN_IMX8MNQ_WIFI_BT;
+	} else if (is_cpu_type(MXC_CPU_IMX8MP)) {
+		if (wb == 'y' || wb == 'Y')
+			tdx_hw_tag.prodid = VERDIN_IMX8MPQ_WIFI_BT_IT;
+		else
+			tdx_hw_tag.prodid = VERDIN_IMX8MPQ;
 	} else if (!strcmp("tegra20", soc)) {
 		if (it == 'y' || it == 'Y')
 			if (gd->ram_size == 0x10000000)
board/toradex/common/tdx-cfg-block.h +6 -2
index 8f91d9aec6..9debd5f046 100644
@@ -75,9 +75,13 @@ enum {
 	COLIBRI_IMX8DX,
 	APALIS_IMX8QXP,
 	APALIS_IMX8DXP,
-	VERDIN_IMX8MMQ_WIFI_BT_IT,
-	VERDIN_IMX8MNSL,
+	VERDIN_IMX8MMQ_WIFI_BT_IT, /* 55 */
+	VERDIN_IMX8MNQ_WIFI_BT,
 	VERDIN_IMX8MMDL,
+	VERDIN_IMX8MPQ_WIFI_BT_IT,
+	VERDIN_IMX8MMQ_IT,
+	VERDIN_IMX8MMDL_WIFI_BT_IT, /* 60 */
+	VERDIN_IMX8MPQ,
 };
 
 enum {
Signature · 1 line
2.17.1
#1 lore raw

PATCH 2/9 pca9450a: fix i2c address

From: Max Krummenacher <[email protected]>

The I2C address is 0x25, not 0x35. This according to the datasheet and tests with a PCA9450A.

---

 drivers/power/pmic/pca9450.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/pmic/pca9450.c +1 -1
index 0c9d9a366e..c7f8b80954 100644
@@ -80,7 +80,7 @@ static struct dm_pmic_ops pca9450_ops = {
 };
 
 static const struct udevice_id pca9450_ids[] = {
-	{ .compatible = "nxp,pca9450a", .data = 0x35, },
+	{ .compatible = "nxp,pca9450a", .data = 0x25, },
 	{ .compatible = "nxp,pca9450b", .data = 0x25, },
 	{ }
 };
Signature · 1 line
2.17.1
#4 lore raw

PATCH 3/9 power: pmic: add SPL_DM_PMIC_PCA9450 symbol to Kconfig

In reply to Igor Opaniuk

From: Igor Opaniuk <[email protected]>

Add SPL_DM_PMIC_PCA9450 symbol to Kconfig.

---

 drivers/power/pmic/Kconfig | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/power/pmic/Kconfig +7 -0
index a62aa38054..7d51510d1b 100644
@@ -98,6 +98,13 @@ config DM_PMIC_PCA9450
 	  This config enables implementation of driver-model pmic uclass features
 	  for PMIC PCA9450. The driver implements read/write operations.
 
+config SPL_DM_PMIC_PCA9450
+	bool "Enable Driver Model for PMIC PCA9450"
+	depends on DM_PMIC
+	help
+	  This config enables implementation of driver-model pmic uclass features
+	  for PMIC PCA9450 in SPL. The driver implements read/write operations.
+
 config DM_PMIC_PFUZE100
 	bool "Enable Driver Model for PMIC PFUZE100"
 	depends on DM_PMIC
Signature · 1 line
2.17.1
#7 lore raw

PATCH 4/9 ARM: dts: imx8mm-verdin: follow changed pmic

In reply to Igor Opaniuk

From: Max Krummenacher <[email protected]>

The used PMIC has been changed from RHOM BD71837 to NXP PCA9450A. Adjust the device tree accordingly.
Remove the old ADC node as the ADC has been changed and has no longer a separate power rail.

---

 arch/arm/dts/imx8mm-verdin-u-boot.dtsi |   5 +-
 arch/arm/dts/imx8mm-verdin.dts         | 154 +++++++++++++------------
 2 files changed, 80 insertions(+), 79 deletions(-)
arch/arm/dts/imx8mm-verdin-u-boot.dtsi +2 -3
index fe6bb9bf03..249b0f8f66 100644
@@ -2,7 +2,6 @@
 /*
  * Copyright 2020 Toradex
  */
-
 / {
 	wdt-reboot {
 		compatible = "wdt-reboot";
@@ -90,11 +89,11 @@
 	u-boot,dm-spl;
 };
 
-&{/soc at 0/bus at 30800000/i2c at 30a20000/pmic at 4b} {
+&{/soc at 0/bus at 30800000/i2c at 30a20000/pmic} {
 	u-boot,dm-spl;
 };
 
-&{/soc at 0/bus at 30800000/i2c at 30a20000/pmic at 4b/regulators} {
+&{/soc at 0/bus at 30800000/i2c at 30a20000/pmic/regulators} {
 	u-boot,dm-spl;
 };
 
arch/arm/dts/imx8mm-verdin.dts +78 -76

205 lines not on this page · raw message

Signature · 1 line
2.17.1
#11 lore raw

PATCH 5/9 verdin-imx8mm: spl: switch to pca9450 pmic

In reply to Igor Opaniuk

From: Max Krummenacher <[email protected]>

V1.1A HW switched the PMIC from BD71837 to PCA9450.

- Disable combined DVS in PCA9450_BUCK123_DVS.
- Increase DDR Voltage to 0.95V as we use a 1.5GHz RAM.
- Configure WDOG_B behaviour.

---

 board/toradex/verdin-imx8mm/spl.c | 42 +++++++++++++++----------------
 configs/verdin-imx8mm_defconfig   |  2 +-
 2 files changed, 21 insertions(+), 23 deletions(-)
board/toradex/verdin-imx8mm/spl.c +20 -22
index cc78c5666b..9562cdeb35 100644
@@ -21,12 +21,16 @@
 #include <dm/uclass.h>
 #include <dm/uclass-internal.h>
 #include <hang.h>
+#include <i2c.h>
 #include <power/bd71837.h>
+#include <power/pca9450.h>
 #include <power/pmic.h>
 #include <spl.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
+#define I2C_PMIC_BUS_ID        1
+
 int spl_board_boot_device(enum boot_device boot_dev_spl)
 {
 	switch (boot_dev_spl) {
@@ -101,33 +105,27 @@ int power_init_board(void)
 	struct udevice *dev;
 	int ret;
 
-	ret = pmic_get("pmic at 4b", &dev);
-	if (ret == -ENODEV) {
-		puts("No pmic\n");
-		return 0;
-	}
-	if (ret != 0)
-		return ret;
+	if (IS_ENABLED(CONFIG_SPL_DM_PMIC_PCA9450)) {
+		ret = pmic_get("pmic", &dev);
+		if (ret == -ENODEV) {
+			puts("No pmic found\n");
+			return ret;
+		}
 
-	/* decrease RESET key long push time from the default 10s to 10ms */
-	pmic_reg_write(dev, BD718XX_PWRONCONFIG1, 0x0);
+		if (ret != 0)
+			return ret;
 
-	/* unlock the PMIC regs */
-	pmic_reg_write(dev, BD718XX_REGLOCK, 0x1);
+		/* BUCKxOUT_DVS0/1 control BUCK123 output, clear PRESET_EN */
+		pmic_reg_write(dev, PCA9450_BUCK123_DVS, 0x29);
 
-	/* increase VDD_SOC to typical value 0.85v before first DRAM access */
-	pmic_reg_write(dev, BD718XX_BUCK1_VOLT_RUN, 0x0f);
+		/* increase VDD_DRAM to 0.975v for 1.5Ghz DDR */
+		pmic_reg_write(dev, PCA9450_BUCK3OUT_DVS0, 0x1c);
 
-	/* increase VDD_DRAM to 0.975v for 3Ghz DDR */
-	pmic_reg_write(dev, BD718XX_1ST_NODVS_BUCK_VOLT, 0x83);
+		/* set WDOG_B_CFG to cold reset */
+		pmic_reg_write(dev, PCA9450_RESET_CTRL, 0xA1);
 
-#ifndef CONFIG_IMX8M_LPDDR4
-	/* increase NVCC_DRAM_1V2 to 1.2v for DDR4 */
-	pmic_reg_write(dev, BD718XX_4TH_NODVS_BUCK_VOLT, 0x28);
-#endif
-
-	/* lock the PMIC regs */
-	pmic_reg_write(dev, BD718XX_REGLOCK, 0x11);
+		return 0;
+	}
 
 	return 0;
 }
configs/verdin-imx8mm_defconfig +1 -1
index 7ebfd6792f..d856e3a318 100644
@@ -91,7 +91,7 @@ CONFIG_PINCTRL=y
 CONFIG_SPL_PINCTRL=y
 CONFIG_PINCTRL_IMX8M=y
 CONFIG_DM_PMIC=y
-CONFIG_SPL_DM_PMIC_BD71837=y
+CONFIG_SPL_DM_PMIC_PCA9450=y
 CONFIG_DM_PMIC_PFUZE100=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
Signature · 1 line
2.17.1
#15 lore raw

PATCH 6/9 verdin-imx8mm: implement hardware version detection

In reply to Igor Opaniuk

From: Max Krummenacher <[email protected]>

And select the correct devicetree accordingly by setting the variant environment variable.

---

 board/toradex/verdin-imx8mm/verdin-imx8mm.c | 71 +++++++++++++++++++++
 1 file changed, 71 insertions(+)
board/toradex/verdin-imx8mm/verdin-imx8mm.c +71 -0
index 66950ed218..9c6f35e778 100644
@@ -8,12 +8,22 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/io.h>
+#include <i2c.h>
 #include <miiphy.h>
 #include <netdev.h>
 #include <micrel.h>
 
+#include "../common/tdx-cfg-block.h"
+
 DECLARE_GLOBAL_DATA_PTR;
 
+#define I2C_PMIC	0
+
+enum pcb_rev_t {
+	PCB_VERSION_1_0,
+	PCB_VERSION_1_1
+};
+
 #if IS_ENABLED(CONFIG_FEC_MXC)
 static int setup_fec(void)
 {
@@ -104,8 +114,69 @@ int board_mmc_get_env_dev(int devno)
 	return devno;
 }
 
+static enum pcb_rev_t get_pcb_revision(void)
+{
+	struct udevice *bus;
+	struct udevice *i2c_dev = NULL;
+	int ret;
+	u8 is_bd71837 = 0;
+
+	ret = uclass_get_device_by_seq(UCLASS_I2C, I2C_PMIC, &bus);
+	if (!ret)
+		ret = dm_i2c_probe(bus, 0x4b, 0, &i2c_dev);
+	if (!ret)
+		ret = dm_i2c_read(i2c_dev, 0x0, &is_bd71837, 1);
+
+	/* BD71837_REV, High Nibble is major version, fix 1010 */
+	is_bd71837 = !ret && ((is_bd71837 & 0xf0) == 0xa0);
+	return is_bd71837 ? PCB_VERSION_1_0 : PCB_VERSION_1_1;
+}
+
+static void select_dt_from_module_version(void)
+{
+	char variant[32];
+	char *env_variant = env_get("variant");
+	int is_wifi = 0;
+
+	if (IS_ENABLED(CONFIG_TDX_CFG_BLOCK)) {
+		/*
+		 * If we have a valid config block and it says we are a
+		 * module with Wi-Fi/Bluetooth make sure we use the -wifi
+		 * device tree.
+		 */
+		is_wifi = (tdx_hw_tag.prodid == VERDIN_IMX8MMQ_WIFI_BT_IT) ||
+			  (tdx_hw_tag.prodid == VERDIN_IMX8MMDL_WIFI_BT_IT);
+	}
+
+	switch (get_pcb_revision()) {
+	case PCB_VERSION_1_0:
+		printf("Detected a V1.0 module\n");
+		if (is_wifi)
+			strncpy(&variant[0], "wifi", sizeof(variant));
+		else
+			strncpy(&variant[0], "nonwifi", sizeof(variant));
+		break;
+	default:
+		if (is_wifi)
+			strncpy(&variant[0], "wifi-v1.1", sizeof(variant));
+		else
+			strncpy(&variant[0], "nonwifi-v1.1", sizeof(variant));
+		break;
+	}
+
+	if (strcmp(variant, env_variant)) {
+		printf("Setting variant to %s\n", variant);
+		env_set("variant", variant);
+
+		if (IS_ENABLED(CONFIG_ENV_IS_NOWHERE))
+			env_save();
+	}
+}
+
 int board_late_init(void)
 {
+	select_dt_from_module_version();
+
 	return 0;
 }
 
Signature · 1 line
2.17.1
#18 lore raw

PATCH 7/9 verdin-imx8mm: spl: enable pca9450 i2c level translator

In reply to Igor Opaniuk

From: Max Krummenacher <[email protected]>

Enable PCA9450 i2c level translator, as this is used for the on module ADC.

---

 board/toradex/verdin-imx8mm/spl.c | 2 ++
 1 file changed, 2 insertions(+)
board/toradex/verdin-imx8mm/spl.c +2 -0
index 9562cdeb35..72e2e09e25 100644
@@ -124,6 +124,8 @@ int power_init_board(void)
 		/* set WDOG_B_CFG to cold reset */
 		pmic_reg_write(dev, PCA9450_RESET_CTRL, 0xA1);
 
+		pmic_reg_write(dev, PCA9450_CONFIG2, 0x1);
+
 		return 0;
 	}
 
Signature · 1 line
2.17.1
#22 lore raw

PATCH 8/9 toradex: tdx-cfg-clock: fix i.mx 8m mini interactive

In reply to Igor Opaniuk

From: Marcel Ziswiler <[email protected]>

Now with them first Verdin iMX8M Mini DualLite modules in for bring-up we got clarity how is_cpu_type() actually behaves.

---

 board/toradex/common/tdx-cfg-block.c | 26 +++++++++-----------------
 1 file changed, 9 insertions(+), 17 deletions(-)
board/toradex/common/tdx-cfg-block.c +9 -17
index 475abf78a7..adab0a0802 100644
@@ -423,12 +423,6 @@ static int get_cfgblock_interactive(void)
 		tdx_hw_tag.prodid = COLIBRI_IMX7D;
 	else if (!strcmp("imx7s", soc))
 		tdx_hw_tag.prodid = COLIBRI_IMX7S;
-	else if (is_cpu_type(MXC_CPU_IMX8MM))
-		tdx_hw_tag.prodid = VERDIN_IMX8MMQ_WIFI_BT_IT;
-	else if (is_cpu_type(MXC_CPU_IMX8MMDL))
-		tdx_hw_tag.prodid = VERDIN_IMX8MMDL;
-	else if (is_cpu_type(MXC_CPU_IMX8MN))
-		tdx_hw_tag.prodid = VERDIN_IMX8MNQ_WIFI_BT;
 	else if (is_cpu_type(MXC_CPU_IMX8QM)) {
 		if (it == 'y' || it == 'Y') {
 			if (wb == 'y' || wb == 'Y')
@@ -464,18 +458,16 @@ static int get_cfgblock_interactive(void)
 				tdx_hw_tag.prodid = COLIBRI_IMX8DX;
 		}
 #endif
+	} else if (is_cpu_type(MXC_CPU_IMX8MMDL)) {
+		if (wb == 'y' || wb == 'Y')
+			tdx_hw_tag.prodid = VERDIN_IMX8MMDL_WIFI_BT_IT;
+		else
+			tdx_hw_tag.prodid = VERDIN_IMX8MMDL;
 	} else if (is_cpu_type(MXC_CPU_IMX8MM)) {
-		if (is_cpu_type(MXC_CPU_IMX8MMDL)) {
-			if (wb == 'y' || wb == 'Y')
-				tdx_hw_tag.prodid = VERDIN_IMX8MMDL_WIFI_BT_IT;
-			else
-				tdx_hw_tag.prodid = VERDIN_IMX8MMDL;
-		} else {
-			if (wb == 'y' || wb == 'Y')
-				tdx_hw_tag.prodid = VERDIN_IMX8MMQ_WIFI_BT_IT;
-			else
-				tdx_hw_tag.prodid = VERDIN_IMX8MMQ_IT;
-		}
+		if (wb == 'y' || wb == 'Y')
+			tdx_hw_tag.prodid = VERDIN_IMX8MMQ_WIFI_BT_IT;
+		else
+			tdx_hw_tag.prodid = VERDIN_IMX8MMQ_IT;
 	} else if (is_cpu_type(MXC_CPU_IMX8MN)) {
 		tdx_hw_tag.prodid = VERDIN_IMX8MNQ_WIFI_BT;
 	} else if (is_cpu_type(MXC_CPU_IMX8MP)) {
Signature · 1 line
2.17.1
#25 lore raw

PATCH 9/9 verdin-imx8mm: automatic ram size detection

In reply to Igor Opaniuk

From: Marcel Ziswiler <[email protected]>

Implement board_phys_sdram_size() to automatically detect Verdin iMX8M Mini DualLite 1GB vs. Verdin iMX8M Mini Quad 2GB.

Note: This only works if we keep using similar RAM chips!

---

 board/toradex/verdin-imx8mm/verdin-imx8mm.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
board/toradex/verdin-imx8mm/verdin-imx8mm.c +10 -0
index 9c6f35e778..7cfae8767c 100644
@@ -180,6 +180,16 @@ int board_late_init(void)
 	return 0;
 }
 
+int board_phys_sdram_size(phys_size_t *size)
+{
+	if (!size)
+		return -EINVAL;
+
+	*size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);
+
+	return 0;
+}
+
 #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
 int ft_board_setup(void *blob, struct bd_info *bd)
 {
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/9 pca9450a: fix i2c address

In reply to Igor Opaniuk
Quoted 6 lines · Igor Opaniuk

From: Max Krummenacher <[email protected]>

The I2C address is 0x25, not 0x35. This according to the datasheet and tests with a PCA9450A.

Best Regards,
Jaehoon Chung

Quoted 19 lines

---

 drivers/power/pmic/pca9450.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/pmic/pca9450.c +1 -1
index 0c9d9a366e..c7f8b80954 100644
@@ -80,7 +80,7 @@ static struct dm_pmic_ops pca9450_ops = {
 };
 
 static const struct udevice_id pca9450_ids[] = {
-	{ .compatible = "nxp,pca9450a", .data = 0x35, },
+	{ .compatible = "nxp,pca9450a", .data = 0x25, },
 	{ .compatible = "nxp,pca9450b", .data = 0x25, },
 	{ }
 };
#5 lore raw

PATCH 3/9 power: pmic: add SPL_DM_PMIC_PCA9450 symbol to Kconfig

In reply to Igor Opaniuk
Quoted 5 lines · Igor Opaniuk

From: Igor Opaniuk <[email protected]>

Add SPL_DM_PMIC_PCA9450 symbol to Kconfig.

Best Regards,
Jaehoon Chung

Quoted 24 lines

---

 drivers/power/pmic/Kconfig | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/power/pmic/Kconfig +7 -0
index a62aa38054..7d51510d1b 100644
@@ -98,6 +98,13 @@ config DM_PMIC_PCA9450
 	  This config enables implementation of driver-model pmic uclass features
 	  for PMIC PCA9450. The driver implements read/write operations.
 
+config SPL_DM_PMIC_PCA9450
+	bool "Enable Driver Model for PMIC PCA9450"
+	depends on DM_PMIC
+	help
+	  This config enables implementation of driver-model pmic uclass features
+	  for PMIC PCA9450 in SPL. The driver implements read/write operations.
+
 config DM_PMIC_PFUZE100
 	bool "Enable Driver Model for PMIC PFUZE100"
 	depends on DM_PMIC
#8 lore raw

PATCH 4/9 ARM: dts: imx8mm-verdin: follow changed pmic

In reply to Igor Opaniuk
Quoted 9 lines · Igor Opaniuk

From: Max Krummenacher <[email protected]>

The used PMIC has been changed from RHOM BD71837 to NXP PCA9450A. Adjust the device tree accordingly.
Remove the old ADC node as the ADC has been changed and has no longer a separate power rail.

Quoted 243 lines

---

?arch/arm/dts/imx8mm-verdin-u-boot.dtsi |?? 5 +- ?arch/arm/dts/imx8mm-verdin.dts???????? | 154 +++++++++++++------------ ?2 files changed, 80 insertions(+), 79 deletions(-)

arch/arm/dts/imx8mm-verdin-u-boot.dtsi +0 -0
index fe6bb9bf03..249b0f8f66 100644
@@ -2,7 +2,6 @@

?/*
? * Copyright 2020 Toradex
? */
-
?/ {
????????wdt-reboot {
????????????????compatible = "wdt-reboot";

arch/arm/dts/imx8mm-verdin-u-boot.dtsi +0 -0
@@ -90,11 +89,11 @@
 ????????u-boot,dm-spl;
 ?};

?
-&{/soc at 0/bus at 30800000/i2c at 30a20000/pmic at 4b} { +&{/soc at 0/bus at 30800000/i2c at 30a20000/pmic} { ????????u-boot,dm-spl;
?};
?
-&{/soc at 0/bus at 30800000/i2c at 30a20000/pmic at 4b/regulators} { +&{/soc at 0/bus at 30800000/i2c at 30a20000/pmic/regulators} { ????????u-boot,dm-spl;
?};
?

arch/arm/dts/imx8mm-verdin.dts +0 -0
index 1c67c08c88..fb0756d6e1 100644
@@ -203,115 +203,123 @@
 ????????pinctrl-0 = <&pinctrl_i2c1>;
 ????????status = "okay";

?
-???????pmic at 4b {
-???????????????compatible = "rohm,bd71840", "rohm,bd71837"; -???????????????bd71837,pmic-buck2-uses-i2c-dvs; -???????????????bd71837,pmic-buck2-dvs-voltage = <1000000>, <900000>, <0>; /* VDD_ARM: Run-Idle */ -???????????????gpio_intr = <&gpio1 3 GPIO_ACTIVE_LOW>;
-???????????????/* PMIC BD71837 PMIC_nINT GPIO1_IO3 */
+???????/* Assembled on V1.1 HW and later */
+???????pmic {
+???????????????reg = <0x25>;
+???????????????u-boot,dm-spl;
+???????????????compatible = "nxp,pca9450a";
+???????????????/* PMIC PCA9450 PMIC_nINT GPIO1_IO3 */
????????????????pinctrl-0 = <&pinctrl_pmic>;
-???????????????reg = <0x4b>;
-
-???????????????gpo {
-???????????????????????rohm,drv = <0x0C>;??????/* 0b0000_1100 all gpos with cmos output mode */ -???????????????};
+???????????????gpio_intr = <&gpio1 3 GPIO_ACTIVE_LOW>;
?
????????????????regulators {
-???????????????????????buck1_reg: BUCK1 { -???????????????????????????????regulator-always-on; -???????????????????????????????regulator-boot-on; +???????????????????????u-boot,dm-spl;
+???????????????????????#address-cells = <1>;
+???????????????????????#size-cells = <0>;

arch/arm/dts/imx8mm-verdin.dts +7 -0
+
+???????????????????????pca9450,pmic-buck2-uses-i2c-dvs;
+???????????????????????/* Run/Standby voltage */
+???????????????????????pca9450,pmic-buck2-dvs-voltage = <950000>, <850000>;
+
+???????????????????????buck1_reg: regulator at 0 {
+???????????????????????????????reg = <0>;

????????????????????????????????regulator-compatible = "buck1"; -???????????????????????????????regulator-max-microvolt = <1300000>; -???????????????????????????????regulator-min-microvolt = <700000>; -???????????????????????????????regulator-ramp-delay = <1250>; +???????????????????????????????regulator-min-microvolt = <600000>; +???????????????????????????????regulator-max-microvolt = <2187500>; +???????????????????????????????regulator-boot-on; +???????????????????????????????regulator-always-on; +???????????????????????????????regulator-ramp-delay = <3125>; ????????????????????????};
?
-???????????????????????buck2_reg: BUCK2 { -???????????????????????????????regulator-always-on; -???????????????????????????????regulator-boot-on; +???????????????????????buck2_reg: regulator at 1 { +???????????????????????????????reg = <1>; ????????????????????????????????regulator-compatible = "buck2"; -???????????????????????????????regulator-max-microvolt = <1300000>; -???????????????????????????????regulator-min-microvolt = <700000>; -???????????????????????????????regulator-ramp-delay = <1250>; +???????????????????????????????regulator-min-microvolt = <600000>; +???????????????????????????????regulator-max-microvolt = <2187500>; +???????????????????????????????regulator-boot-on; +???????????????????????????????regulator-always-on; +???????????????????????????????regulator-ramp-delay = <3125>; ????????????????????????};
?
-???????????????????????buck5_reg: BUCK5 { -???????????????????????????????regulator-always-on; +???????????????????????buck3_reg: regulator at 2 { +???????????????????????????????reg = <2>; +???????????????????????????????regulator-compatible = "buck3"; +???????????????????????????????regulator-min-microvolt = <600000>; +???????????????????????????????regulator-max-microvolt = <2187500>; ????????????????????????????????regulator-boot-on; -???????????????????????????????regulator-compatible = "buck5"; -???????????????????????????????regulator-max-microvolt = <1350000>; -???????????????????????????????regulator-min-microvolt = <700000>; +???????????????????????????????regulator-always-on; ????????????????????????};
?
-???????????????????????buck6_reg: BUCK6 { -???????????????????????????????regulator-always-on; +???????????????????????buck4_reg: regulator at 3 { +???????????????????????????????reg = <3>; +???????????????????????????????regulator-compatible = "buck4"; +???????????????????????????????regulator-min-microvolt = <600000>; +???????????????????????????????regulator-max-microvolt = <3400000>; ????????????????????????????????regulator-boot-on; -???????????????????????????????regulator-compatible = "buck6"; -???????????????????????????????regulator-max-microvolt = <3300000>; -???????????????????????????????regulator-min-microvolt = <3000000>; +???????????????????????????????regulator-always-on; ????????????????????????};
?
-???????????????????????buck7_reg: BUCK7 { -???????????????????????????????regulator-always-on; +???????????????????????buck5_reg: regulator at 4 { +???????????????????????????????reg = <4>; +???????????????????????????????regulator-compatible = "buck5"; +???????????????????????????????regulator-min-microvolt = <600000>; +???????????????????????????????regulator-max-microvolt = <3400000>; ????????????????????????????????regulator-boot-on; -???????????????????????????????regulator-compatible = "buck7"; -???????????????????????????????regulator-max-microvolt = <1995000>; -???????????????????????????????regulator-min-microvolt = <1605000>; +???????????????????????????????regulator-always-on; ????????????????????????};
?
-???????????????????????buck8_reg: BUCK8 { -???????????????????????????????regulator-always-on; +???????????????????????buck6_reg: regulator at 5 { +???????????????????????????????reg = <5>; +???????????????????????????????regulator-compatible = "buck6"; +???????????????????????????????regulator-min-microvolt = <600000>; +???????????????????????????????regulator-max-microvolt = <3400000>; ????????????????????????????????regulator-boot-on; -???????????????????????????????regulator-compatible = "buck8"; -???????????????????????????????regulator-max-microvolt = <1400000>; -???????????????????????????????regulator-min-microvolt = <800000>; +???????????????????????????????regulator-always-on; ????????????????????????};
?
-???????????????????????ldo1_reg: LDO1 { -???????????????????????????????regulator-always-on; -???????????????????????????????regulator-boot-on; +???????????????????????ldo1_reg: regulator at 6 { +???????????????????????????????reg = <6>; ????????????????????????????????regulator-compatible = "ldo1"; +???????????????????????????????regulator-min-microvolt = <1600000>; ????????????????????????????????regulator-max-microvolt = <3300000>; -???????????????????????????????regulator-min-microvolt = <3000000>; +???????????????????????????????regulator-boot-on; +???????????????????????????????regulator-always-on; ????????????????????????};
?
-???????????????????????ldo2_reg: LDO2 { -???????????????????????????????regulator-always-on; -???????????????????????????????regulator-boot-on; +???????????????????????ldo2_reg: regulator at 7 { +???????????????????????????????reg = <7>; ????????????????????????????????regulator-compatible = "ldo2"; -???????????????????????????????regulator-max-microvolt = <900000>; -???????????????????????????????regulator-min-microvolt = <900000>; +???????????????????????????????regulator-min-microvolt = <800000>; +???????????????????????????????regulator-max-microvolt = <1150000>; +???????????????????????????????regulator-boot-on; +???????????????????????????????regulator-always-on; ????????????????????????};
?
-???????????????????????ldo3_reg: LDO3 { -???????????????????????????????regulator-always-on; -???????????????????????????????regulator-boot-on; +???????????????????????ldo3_reg: regulator at 8 { +???????????????????????????????reg = <8>; ????????????????????????????????regulator-compatible = "ldo3"; +???????????????????????????????regulator-min-microvolt = <800000>; ????????????????????????????????regulator-max-microvolt = <3300000>; -???????????????????????????????regulator-min-microvolt = <1800000>; +???????????????????????????????regulator-boot-on; +???????????????????????????????regulator-always-on; ????????????????????????};
?
-???????????????????????ldo4_reg: LDO4 { -???????????????????????????????regulator-always-on; -???????????????????????????????regulator-boot-on; +???????????????????????ldo4_reg: regulator at 9 { +???????????????????????????????reg = <9>; ????????????????????????????????regulator-compatible = "ldo4"; -???????????????????????????????regulator-max-microvolt = <1800000>; -???????????????????????????????regulator-min-microvolt = <900000>; +???????????????????????????????regulator-min-microvolt = <800000>; +???????????????????????????????regulator-max-microvolt = <3300000>; +???????????????????????????????regulator-boot-on; +???????????????????????????????regulator-always-on; ????????????????????????};
?
-???????????????????????ldo5_reg: LDO5 { +???????????????????????ldo5_reg: regulator at 10 { +???????????????????????????????reg = <10>; ????????????????????????????????regulator-compatible = "ldo5"; +???????????????????????????????regulator-min-microvolt = <800000>; ????????????????????????????????regulator-max-microvolt = <3300000>; -???????????????????????????????regulator-min-microvolt = <3300000>; ????????????????????????};
?
-???????????????????????ldo6_reg: LDO6 { -???????????????????????????????regulator-always-on; -???????????????????????????????regulator-boot-on; -???????????????????????????????regulator-compatible = "ldo6"; -???????????????????????????????regulator-max-microvolt = <1800000>; -???????????????????????????????regulator-min-microvolt = <900000>; -???????????????????????};
????????????????};
????????};
?

arch/arm/dts/imx8mm-verdin.dts +0 -0
@@ -321,12 +329,6 @@
 ????????????????reg = <0x32>;
 ????????};

?
-???????adc at 34 {
-???????????????compatible = "maxim,max11607"; -???????????????reg = <0x34>;
-???????????????vcc-supply = <&ldo5_reg>;
-???????};
-
????????eeprom_module: eeprom at 50 { ????????????????compatible = "st,24c02", "atmel,24c02", "i2c-eeprom"; ????????????????pagesize = <16>;

#12 lore raw

PATCH 5/9 verdin-imx8mm: spl: switch to pca9450 pmic

In reply to Igor Opaniuk
Quoted 10 lines · Igor Opaniuk

From: Max Krummenacher <[email protected]>

V1.1A HW switched the PMIC from BD71837 to PCA9450.

- Disable combined DVS in PCA9450_BUCK123_DVS.
- Increase DDR Voltage to 0.95V as we use a 1.5GHz RAM.
- Configure WDOG_B behaviour.

Quoted 90 lines

---

?board/toradex/verdin-imx8mm/spl.c | 42 +++++++++++++++---------------- ?configs/verdin-imx8mm_defconfig?? |? 2 +-
?2 files changed, 21 insertions(+), 23 deletions(-)

board/toradex/verdin-imx8mm/spl.c +0 -0
index cc78c5666b..9562cdeb35 100644
@@ -21,12 +21,16 @@

?#include <dm/uclass.h>
?#include <dm/uclass-internal.h>
?#include <hang.h>
+#include <i2c.h>
?#include <power/bd71837.h>
+#include <power/pca9450.h>
?#include <power/pmic.h>
?#include <spl.h>
?
?DECLARE_GLOBAL_DATA_PTR;
?

board/toradex/verdin-imx8mm/spl.c +2 -0
+#define I2C_PMIC_BUS_ID??????? 1
+

?int spl_board_boot_device(enum boot_device boot_dev_spl) ?{
????????switch (boot_dev_spl) {

board/toradex/verdin-imx8mm/spl.c +0 -0
@@ -101,33 +105,27 @@ int power_init_board(void)
 ????????struct udevice *dev;
 ????????int ret;

?
-???????ret = pmic_get("pmic at 4b", &dev);
-???????if (ret == -ENODEV) {
-???????????????puts("No pmic\n");
-???????????????return 0;
-???????}
-???????if (ret != 0)
-???????????????return ret;
+???????if (IS_ENABLED(CONFIG_SPL_DM_PMIC_PCA9450)) { +???????????????ret = pmic_get("pmic", &dev);
+???????????????if (ret == -ENODEV) { +???????????????????????puts("No pmic found\n"); +???????????????????????return ret;
+???????????????}
?
-???????/* decrease RESET key long push time from the default 10s to 10ms */ -???????pmic_reg_write(dev, BD718XX_PWRONCONFIG1, 0x0); +???????????????if (ret != 0)
+???????????????????????return ret;
?
-???????/* unlock the PMIC regs */
-???????pmic_reg_write(dev, BD718XX_REGLOCK, 0x1); +???????????????/* BUCKxOUT_DVS0/1 control BUCK123 output, clear PRESET_EN */ +???????????????pmic_reg_write(dev, PCA9450_BUCK123_DVS, 0x29);
?
-???????/* increase VDD_SOC to typical value 0.85v before first DRAM access */ -???????pmic_reg_write(dev, BD718XX_BUCK1_VOLT_RUN, 0x0f); +???????????????/* increase VDD_DRAM to 0.975v for 1.5Ghz DDR */ +???????????????pmic_reg_write(dev, PCA9450_BUCK3OUT_DVS0, 0x1c); ?
-???????/* increase VDD_DRAM to 0.975v for 3Ghz DDR */ -???????pmic_reg_write(dev, BD718XX_1ST_NODVS_BUCK_VOLT, 0x83); +???????????????/* set WDOG_B_CFG to cold reset */ +???????????????pmic_reg_write(dev, PCA9450_RESET_CTRL, 0xA1);
?

board/toradex/verdin-imx8mm/spl.c +2 -7
-#ifndef CONFIG_IMX8M_LPDDR4
-???????/* increase NVCC_DRAM_1V2 to 1.2v for DDR4 */
-???????pmic_reg_write(dev, BD718XX_4TH_NODVS_BUCK_VOLT, 0x28);
-#endif
-
-???????/* lock the PMIC regs */
-???????pmic_reg_write(dev, BD718XX_REGLOCK, 0x11);
+???????????????return 0;
+???????}

?
????????return 0;
?}

configs/verdin-imx8mm_defconfig +0 -0
index 7ebfd6792f..d856e3a318 100644
@@ -91,7 +91,7 @@ CONFIG_PINCTRL=y

?CONFIG_SPL_PINCTRL=y
?CONFIG_PINCTRL_IMX8M=y
?CONFIG_DM_PMIC=y

configs/verdin-imx8mm_defconfig +1 -1
-CONFIG_SPL_DM_PMIC_BD71837=y
+CONFIG_SPL_DM_PMIC_PCA9450=y

?CONFIG_DM_PMIC_PFUZE100=y
?CONFIG_DM_REGULATOR=y
?CONFIG_DM_REGULATOR_FIXED=y

#16 lore raw

PATCH 6/9 verdin-imx8mm: implement hardware version detection

In reply to Igor Opaniuk

Besides a monor nitpick further below.

Quoted 7 lines · Igor Opaniuk

From: Max Krummenacher <[email protected]>

And select the correct devicetree accordingly by setting the variant environment variable.

Quoted 10 lines

---

?board/toradex/verdin-imx8mm/verdin-imx8mm.c | 71 +++++++++++++++++++++ ?1 file changed, 71 insertions(+)

board/toradex/verdin-imx8mm/verdin-imx8mm.c +0 -0
index 66950ed218..9c6f35e778 100644
@@ -8,12 +8,22 @@
Quoted 7 lines

?#include <asm/arch/clock.h>
?#include <asm/arch/sys_proto.h>
?#include <asm/io.h>
+#include <i2c.h>
?#include <miiphy.h>
?#include <netdev.h>
?#include <micrel.h>

Above something with the include order seems messed up.

Quoted 83 lines
board/toradex/verdin-imx8mm/verdin-imx8mm.c +2 -0
+#include "../common/tdx-cfg-block.h"
+

?DECLARE_GLOBAL_DATA_PTR;
?

board/toradex/verdin-imx8mm/verdin-imx8mm.c +7 -0
+#define I2C_PMIC???????0
+
+enum pcb_rev_t {
+???????PCB_VERSION_1_0,
+???????PCB_VERSION_1_1
+};
+

?#if IS_ENABLED(CONFIG_FEC_MXC)
?static int setup_fec(void)
?{

board/toradex/verdin-imx8mm/verdin-imx8mm.c +0 -0
@@ -104,8 +114,69 @@ int board_mmc_get_env_dev(int devno)
 ????????return devno;
 ?}

?

board/toradex/verdin-imx8mm/verdin-imx8mm.c +59 -0
+static enum pcb_rev_t get_pcb_revision(void)
+{
+???????struct udevice *bus;
+???????struct udevice *i2c_dev = NULL;
+???????int ret;
+???????u8 is_bd71837 = 0;
+
+???????ret = uclass_get_device_by_seq(UCLASS_I2C, I2C_PMIC, &bus);
+???????if (!ret)
+???????????????ret = dm_i2c_probe(bus, 0x4b, 0, &i2c_dev);
+???????if (!ret)
+???????????????ret = dm_i2c_read(i2c_dev, 0x0, &is_bd71837, 1);
+
+???????/* BD71837_REV, High Nibble is major version, fix 1010 */
+???????is_bd71837 = !ret && ((is_bd71837 & 0xf0) == 0xa0);
+???????return is_bd71837 ? PCB_VERSION_1_0 : PCB_VERSION_1_1;
+}
+
+static void select_dt_from_module_version(void)
+{
+???????char variant[32];
+???????char *env_variant = env_get("variant");
+???????int is_wifi = 0;
+
+???????if (IS_ENABLED(CONFIG_TDX_CFG_BLOCK)) {
+???????????????/*
+??????????????? * If we have a valid config block and it says we are a
+??????????????? * module with Wi-Fi/Bluetooth make sure we use the -wifi
+??????????????? * device tree.
+??????????????? */
+???????????????is_wifi = (tdx_hw_tag.prodid == VERDIN_IMX8MMQ_WIFI_BT_IT) ||
+???????????????????????? (tdx_hw_tag.prodid == VERDIN_IMX8MMDL_WIFI_BT_IT);
+???????}
+
+???????switch (get_pcb_revision()) {
+???????case PCB_VERSION_1_0:
+???????????????printf("Detected a V1.0 module\n");
+???????????????if (is_wifi)
+???????????????????????strncpy(&variant[0], "wifi", sizeof(variant));
+???????????????else
+???????????????????????strncpy(&variant[0], "nonwifi", sizeof(variant));
+???????????????break;
+???????default:
+???????????????if (is_wifi)
+???????????????????????strncpy(&variant[0], "wifi-v1.1", sizeof(variant));
+???????????????else
+???????????????????????strncpy(&variant[0], "nonwifi-v1.1", sizeof(variant));
+???????????????break;
+???????}
+
+???????if (strcmp(variant, env_variant)) {
+???????????????printf("Setting variant to %s\n", variant);
+???????????????env_set("variant", variant);
+
+???????????????if (IS_ENABLED(CONFIG_ENV_IS_NOWHERE))
+???????????????????????env_save();
+???????}
+}
+

?int board_late_init(void)
?{
+???????select_dt_from_module_version();
+
????????return 0;
?}

#19 lore raw

PATCH 7/9 verdin-imx8mm: spl: enable pca9450 i2c level translator

In reply to Igor Opaniuk
Quoted 6 lines · Igor Opaniuk

From: Max Krummenacher <[email protected]>

Enable PCA9450 i2c level translator, as this is used for the on module ADC.

Quoted 17 lines

---

?board/toradex/verdin-imx8mm/spl.c | 2 ++
?1 file changed, 2 insertions(+)

board/toradex/verdin-imx8mm/spl.c +0 -0
index 9562cdeb35..72e2e09e25 100644
@@ -124,6 +124,8 @@ int power_init_board(void)

????????????????/* set WDOG_B_CFG to cold reset */ ????????????????pmic_reg_write(dev, PCA9450_RESET_CTRL, 0xA1); ?
+???????????????pmic_reg_write(dev, PCA9450_CONFIG2, 0x1); +
????????????????return 0;
????????}

#28 lore raw

PATCH 1/9 toradex: tdx-cfg-clock: add new i.mx 8m mini/plus skus

In reply to Igor Opaniuk

And Igor, don't forget to drop:

# CONFIG_CMD_IMPORTENV is not set

And add:

CONFIG_OF_LIBFDT_OVERLAY=y

That way our regular distro boot scripts will work out-of-the-box. Thanks!

BTW: With such series a cover letter aka [PATCH 0/0] might make sense. Good old? patman can do all of that and more...

Quoted 131 lines · Igor Opaniuk

From: Marcel Ziswiler <[email protected]>

Add new i.MX 8M Mini/Plus SKUs to ConfigBlock handling:

0058: Verdin iMX8M Plus Quad 4GB Wi-Fi / BT IT

0059: Verdin iMX8M Mini Quad 2GB IT

0060: Verdin iMX8M Mini DualLite 1GB WB IT

0061: Verdin iMX8M Plus Quad 2GB

Rename existing SKU (use correct one):
Verdin iMX8M Nano SoloLite 1GB -> Verdin iMX8M Nano Quad 1GB Wi-Fi

---

?board/toradex/common/tdx-cfg-block.c | 42 ++++++++++++++++++++-------- ?board/toradex/common/tdx-cfg-block.h |? 8 ++++--
?2 files changed, 36 insertions(+), 14 deletions(-)

board/toradex/common/tdx-cfg-block.c +2 -1
index bf27b2fa66..475abf78a7 100644
@@ -16,7 +16,8 @@
 ????????defined(CONFIG_TARGET_COLIBRI_IMX6) || \
 ????????defined(CONFIG_TARGET_COLIBRI_IMX8X) || \
 ????????defined(CONFIG_TARGET_VERDIN_IMX8MM) || \
-???????defined(CONFIG_TARGET_VERDIN_IMX8MN)
+???????defined(CONFIG_TARGET_VERDIN_IMX8MN) || \
+???????defined(CONFIG_TARGET_VERDIN_IMX8MP)

?#include <asm/arch/sys_proto.h>
?#else
?#define is_cpu_type(cpu) (0)

board/toradex/common/tdx-cfg-block.c +5 -1
@@ -137,8 +138,12 @@ const char * const toradex_modules[] = {
 ????????[53] = "Apalis iMX8 QuadXPlus 2GB ECC IT",
 ????????[54] = "Apalis iMX8 DualXPlus 1GB",
 ????????[55] = "Verdin iMX8M Mini Quad 2GB Wi-Fi / BT IT",
-???????[56] = "Verdin iMX8M Nano SoloLite 1GB", /* not currently on sale */
+???????[56] = "Verdin iMX8M Nano Quad 1GB Wi-Fi / BT", /* not currently on sale */
 ????????[57] = "Verdin iMX8M Mini DualLite 1GB",
+???????[58] = "Verdin iMX8M Plus Quad 4GB Wi-Fi / BT IT",
+???????[59] = "Verdin iMX8M Mini Quad 2GB IT",
+???????[60] = "Verdin iMX8M Mini DualLite 1GB WB IT",
+???????[61] = "Verdin iMX8M Plus Quad 2GB",
 ?};

?
?const char * const toradex_carrier_boards[] = {

board/toradex/common/tdx-cfg-block.c +0 -0
@@ -361,21 +366,15 @@ static int get_cfgblock_interactive(void)

?
????????if (cpu_is_pxa27x())
????????????????sprintf(message, "Is the module the 312 MHz version? [y/N] ");

board/toradex/common/tdx-cfg-block.c +0 -7
-#if !defined(CONFIG_TARGET_VERDIN_IMX8MM) || !defined(CONFIG_TARGET_VERDIN_IMX8MN)
-???????else
-???????????????sprintf(message, "Is the module an IT version? [y/N] ");
-
-???????len = cli_readline(message);
-???????it = console_buffer[0];
-#else

????????else
????????????????it = 'y';
-#endif
?
?#if defined(CONFIG_TARGET_APALIS_IMX8) || \
????????????????defined(CONFIG_TARGET_APALIS_IMX8X) || \
????????????????defined(CONFIG_TARGET_COLIBRI_IMX6ULL) || \
-???????????????defined(CONFIG_TARGET_COLIBRI_IMX8X)

+???????????????defined(CONFIG_TARGET_COLIBRI_IMX8X) || \
+???????????????defined(CONFIG_TARGET_VERDIN_IMX8MM) || \

+???????????????defined(CONFIG_TARGET_VERDIN_IMX8MP) ????????sprintf(message, "Does the module have Wi-Fi / Bluetooth? [y/N] "); ????????len = cli_readline(message);
????????wb = console_buffer[0];

board/toradex/common/tdx-cfg-block.c +1 -1
@@ -429,7 +428,7 @@ static int get_cfgblock_interactive(void)
 ????????else if (is_cpu_type(MXC_CPU_IMX8MMDL))
 ????????????????tdx_hw_tag.prodid = VERDIN_IMX8MMDL;
 ????????else if (is_cpu_type(MXC_CPU_IMX8MN))
-???????????????tdx_hw_tag.prodid = VERDIN_IMX8MNSL;
+???????????????tdx_hw_tag.prodid = VERDIN_IMX8MNQ_WIFI_BT;
 ????????else if (is_cpu_type(MXC_CPU_IMX8QM)) {
 ????????????????if (it == 'y' || it == 'Y') {
 ????????????????????????if (wb == 'y' || wb == 'Y')
@@ -465,6 +464,25 @@ static int get_cfgblock_interactive(void)
 ????????????????????????????????tdx_hw_tag.prodid = COLIBRI_IMX8DX;
 ????????????????}

?#endif
+???????} else if (is_cpu_type(MXC_CPU_IMX8MM)) { +???????????????if (is_cpu_type(MXC_CPU_IMX8MMDL)) { +???????????????????????if (wb == 'y' || wb == 'Y') +???????????????????????????????tdx_hw_tag.prodid = VERDIN_IMX8MMDL_WIFI_BT_IT; +???????????????????????else +???????????????????????????????tdx_hw_tag.prodid = VERDIN_IMX8MMDL; +???????????????} else {
+???????????????????????if (wb == 'y' || wb == 'Y') +???????????????????????????????tdx_hw_tag.prodid = VERDIN_IMX8MMQ_WIFI_BT_IT; +???????????????????????else +???????????????????????????????tdx_hw_tag.prodid = VERDIN_IMX8MMQ_IT; +???????????????}
+???????} else if (is_cpu_type(MXC_CPU_IMX8MN)) { +???????????????tdx_hw_tag.prodid = VERDIN_IMX8MNQ_WIFI_BT; +???????} else if (is_cpu_type(MXC_CPU_IMX8MP)) { +???????????????if (wb == 'y' || wb == 'Y') +???????????????????????tdx_hw_tag.prodid = VERDIN_IMX8MPQ_WIFI_BT_IT; +???????????????else
+???????????????????????tdx_hw_tag.prodid = VERDIN_IMX8MPQ; ????????} else if (!strcmp("tegra20", soc)) {
????????????????if (it == 'y' || it == 'Y') ????????????????????????if (gd->ram_size == 0x10000000)

board/toradex/common/tdx-cfg-block.h +6 -2
index 8f91d9aec6..9debd5f046 100644
@@ -75,9 +75,13 @@ enum {
 ????????COLIBRI_IMX8DX,
 ????????APALIS_IMX8QXP,
 ????????APALIS_IMX8DXP,
-???????VERDIN_IMX8MMQ_WIFI_BT_IT,
-???????VERDIN_IMX8MNSL,
+???????VERDIN_IMX8MMQ_WIFI_BT_IT, /* 55 */
+???????VERDIN_IMX8MNQ_WIFI_BT,
 ????????VERDIN_IMX8MMDL,
+???????VERDIN_IMX8MPQ_WIFI_BT_IT,
+???????VERDIN_IMX8MMQ_IT,
+???????VERDIN_IMX8MMDL_WIFI_BT_IT, /* 60 */
+???????VERDIN_IMX8MPQ,
 ?};

?
?enum {

#26 lore raw

PATCH 9/9 verdin-imx8mm: automatic ram size detection

In reply to Igor Opaniuk
Quoted 9 lines · Igor Opaniuk

From: Marcel Ziswiler <[email protected]>

Implement board_phys_sdram_size() to automatically detect Verdin iMX8M Mini DualLite 1GB vs. Verdin iMX8M Mini Quad 2GB.

Note: This only works if we keep using similar RAM chips!

Quoted 27 lines

---

 board/toradex/verdin-imx8mm/verdin-imx8mm.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
board/toradex/verdin-imx8mm/verdin-imx8mm.c +10 -1
index 9c6f35e778..7cfae8767c 100644
@@ -180,6 +180,16 @@ int board_late_init(void)
        return 0;
 }
 
+int board_phys_sdram_size(phys_size_t *size)
+{
+       if (!size)
+               return -EINVAL;
+
+       *size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);
+
+       return 0;
+}
+
 #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
 int ft_board_setup(void *blob, struct bd_info *bd)
 {
--
Quoted 2 lines

2.17.1

--
Best regards
Oleksandr Suvorov

Toradex AG
Ebenaustrasse 10 | 6048 Horw | Switzerland | T: +41 41 500 48 00

#20 lore raw

PATCH 7/9 verdin-imx8mm: spl: enable pca9450 i2c level translator

In reply to Marcel Ziswiler
Quoted 10 lines · Marcel Ziswiler
Quoted 6 lines · Igor Opaniuk

From: Max Krummenacher <[email protected]>

Enable PCA9450 i2c level translator, as this is used for the on module ADC.

Quoted 18 lines
Quoted 18 lines

---

 board/toradex/verdin-imx8mm/spl.c | 2 ++
 1 file changed, 2 insertions(+)
board/toradex/verdin-imx8mm/spl.c +2 -0
index 9562cdeb35..72e2e09e25 100644
@@ -124,6 +124,8 @@ int power_init_board(void)
                /* set WDOG_B_CFG to cold reset */
                pmic_reg_write(dev, PCA9450_RESET_CTRL, 0xA1);
 
+               pmic_reg_write(dev, PCA9450_CONFIG2, 0x1);
+
                return 0;
        }
Signature · 5 lines
Best regards
Oleksandr Suvorov

Toradex AG
Ebenaustrasse 10 | 6048 Horw | Switzerland | T: +41 41 500 48 00
#9 lore raw

PATCH 4/9 ARM: dts: imx8mm-verdin: follow changed pmic

In reply to Marcel Ziswiler
Quoted 9 lines · Marcel Ziswiler
Quoted 7 lines · Igor Opaniuk

From: Max Krummenacher <[email protected]>

The used PMIC has been changed from RHOM BD71837 to NXP PCA9450A. Adjust the device tree accordingly.
Remove the old ADC node as the ADC has been changed and has no longer a separate power rail.

Quoted 4 lines
Quoted 2 lines
Quoted 244 lines
Quoted 244 lines

---

 arch/arm/dts/imx8mm-verdin-u-boot.dtsi |   5 +-
 arch/arm/dts/imx8mm-verdin.dts         | 154 +++++++++++++------------
 2 files changed, 80 insertions(+), 79 deletions(-)
arch/arm/dts/imx8mm-verdin-u-boot.dtsi +2 -3
index fe6bb9bf03..249b0f8f66 100644
@@ -2,7 +2,6 @@
 /*
  * Copyright 2020 Toradex
  */
-
 / {
        wdt-reboot {
                compatible = "wdt-reboot";
@@ -90,11 +89,11 @@
        u-boot,dm-spl;
 };
 
-&{/soc at 0/bus at 30800000/i2c at 30a20000/pmic at 4b} {
+&{/soc at 0/bus at 30800000/i2c at 30a20000/pmic} {
        u-boot,dm-spl;
 };
 
-&{/soc at 0/bus at 30800000/i2c at 30a20000/pmic at 4b/regulators} {
+&{/soc at 0/bus at 30800000/i2c at 30a20000/pmic/regulators} {
        u-boot,dm-spl;
 };
 
arch/arm/dts/imx8mm-verdin.dts +78 -76
index 1c67c08c88..fb0756d6e1 100644
@@ -203,115 +203,123 @@
        pinctrl-0 = <&pinctrl_i2c1>;
        status = "okay";
 
-       pmic at 4b {
-               compatible = "rohm,bd71840", "rohm,bd71837";
-               bd71837,pmic-buck2-uses-i2c-dvs;
-               bd71837,pmic-buck2-dvs-voltage = <1000000>, <900000>, <0>; /* VDD_ARM: Run-Idle */
-               gpio_intr = <&gpio1 3 GPIO_ACTIVE_LOW>;
-               /* PMIC BD71837 PMIC_nINT GPIO1_IO3 */
+       /* Assembled on V1.1 HW and later */
+       pmic {
+               reg = <0x25>;
+               u-boot,dm-spl;
+               compatible = "nxp,pca9450a";
+               /* PMIC PCA9450 PMIC_nINT GPIO1_IO3 */
                pinctrl-0 = <&pinctrl_pmic>;
-               reg = <0x4b>;
-
-               gpo {
-                       rohm,drv = <0x0C>;      /* 0b0000_1100 all gpos with cmos output mode */
-               };
+               gpio_intr = <&gpio1 3 GPIO_ACTIVE_LOW>;
 
                regulators {
-                       buck1_reg: BUCK1 {
-                               regulator-always-on;
-                               regulator-boot-on;
+                       u-boot,dm-spl;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       pca9450,pmic-buck2-uses-i2c-dvs;
+                       /* Run/Standby voltage */
+                       pca9450,pmic-buck2-dvs-voltage = <950000>, <850000>;
+
+                       buck1_reg: regulator at 0 {
+                               reg = <0>;
                                regulator-compatible = "buck1";
-                               regulator-max-microvolt = <1300000>;
-                               regulator-min-microvolt = <700000>;
-                               regulator-ramp-delay = <1250>;
+                               regulator-min-microvolt = <600000>;
+                               regulator-max-microvolt = <2187500>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                               regulator-ramp-delay = <3125>;
                        };
 
-                       buck2_reg: BUCK2 {
-                               regulator-always-on;
-                               regulator-boot-on;
+                       buck2_reg: regulator at 1 {
+                               reg = <1>;
                                regulator-compatible = "buck2";
-                               regulator-max-microvolt = <1300000>;
-                               regulator-min-microvolt = <700000>;
-                               regulator-ramp-delay = <1250>;
+                               regulator-min-microvolt = <600000>;
+                               regulator-max-microvolt = <2187500>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                               regulator-ramp-delay = <3125>;
                        };
 
-                       buck5_reg: BUCK5 {
-                               regulator-always-on;
+                       buck3_reg: regulator at 2 {
+                               reg = <2>;
+                               regulator-compatible = "buck3";
+                               regulator-min-microvolt = <600000>;
+                               regulator-max-microvolt = <2187500>;
                                regulator-boot-on;
-                               regulator-compatible = "buck5";
-                               regulator-max-microvolt = <1350000>;
-                               regulator-min-microvolt = <700000>;
+                               regulator-always-on;
                        };
 
-                       buck6_reg: BUCK6 {
-                               regulator-always-on;
+                       buck4_reg: regulator at 3 {
+                               reg = <3>;
+                               regulator-compatible = "buck4";
+                               regulator-min-microvolt = <600000>;
+                               regulator-max-microvolt = <3400000>;
                                regulator-boot-on;
-                               regulator-compatible = "buck6";
-                               regulator-max-microvolt = <3300000>;
-                               regulator-min-microvolt = <3000000>;
+                               regulator-always-on;
                        };
 
-                       buck7_reg: BUCK7 {
-                               regulator-always-on;
+                       buck5_reg: regulator at 4 {
+                               reg = <4>;
+                               regulator-compatible = "buck5";
+                               regulator-min-microvolt = <600000>;
+                               regulator-max-microvolt = <3400000>;
                                regulator-boot-on;
-                               regulator-compatible = "buck7";
-                               regulator-max-microvolt = <1995000>;
-                               regulator-min-microvolt = <1605000>;
+                               regulator-always-on;
                        };
 
-                       buck8_reg: BUCK8 {
-                               regulator-always-on;
+                       buck6_reg: regulator at 5 {
+                               reg = <5>;
+                               regulator-compatible = "buck6";
+                               regulator-min-microvolt = <600000>;
+                               regulator-max-microvolt = <3400000>;
                                regulator-boot-on;
-                               regulator-compatible = "buck8";
-                               regulator-max-microvolt = <1400000>;
-                               regulator-min-microvolt = <800000>;
+                               regulator-always-on;
                        };
 
-                       ldo1_reg: LDO1 {
-                               regulator-always-on;
-                               regulator-boot-on;
+                       ldo1_reg: regulator at 6 {
+                               reg = <6>;
                                regulator-compatible = "ldo1";
+                               regulator-min-microvolt = <1600000>;
                                regulator-max-microvolt = <3300000>;
-                               regulator-min-microvolt = <3000000>;
+                               regulator-boot-on;
+                               regulator-always-on;
                        };
 
-                       ldo2_reg: LDO2 {
-                               regulator-always-on;
-                               regulator-boot-on;
+                       ldo2_reg: regulator at 7 {
+                               reg = <7>;
                                regulator-compatible = "ldo2";
-                               regulator-max-microvolt = <900000>;
-                               regulator-min-microvolt = <900000>;
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <1150000>;
+                               regulator-boot-on;
+                               regulator-always-on;
                        };
 
-                       ldo3_reg: LDO3 {
-                               regulator-always-on;
-                               regulator-boot-on;
+                       ldo3_reg: regulator at 8 {
+                               reg = <8>;
                                regulator-compatible = "ldo3";
+                               regulator-min-microvolt = <800000>;
                                regulator-max-microvolt = <3300000>;
-                               regulator-min-microvolt = <1800000>;
+                               regulator-boot-on;
+                               regulator-always-on;
                        };
 
-                       ldo4_reg: LDO4 {
-                               regulator-always-on;
-                               regulator-boot-on;
+                       ldo4_reg: regulator at 9 {
+                               reg = <9>;
                                regulator-compatible = "ldo4";
-                               regulator-max-microvolt = <1800000>;
-                               regulator-min-microvolt = <900000>;
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-boot-on;
+                               regulator-always-on;
                        };
 
-                       ldo5_reg: LDO5 {
+                       ldo5_reg: regulator at 10 {
+                               reg = <10>;
                                regulator-compatible = "ldo5";
+                               regulator-min-microvolt = <800000>;
                                regulator-max-microvolt = <3300000>;
-                               regulator-min-microvolt = <3300000>;
                        };
 
-                       ldo6_reg: LDO6 {
-                               regulator-always-on;
-                               regulator-boot-on;
-                               regulator-compatible = "ldo6";
-                               regulator-max-microvolt = <1800000>;
-                               regulator-min-microvolt = <900000>;
-                       };
                };
        };
 
@@ -321,12 +329,6 @@
                reg = <0x32>;
        };
 
-       adc at 34 {
-               compatible = "maxim,max11607";
-               reg = <0x34>;
-               vcc-supply = <&ldo5_reg>;
-       };
-
        eeprom_module: eeprom at 50 {
                compatible = "st,24c02", "atmel,24c02", "i2c-eeprom";
                pagesize = <16>;
Signature · 5 lines
Best regards
Oleksandr Suvorov

Toradex AG
Ebenaustrasse 10 | 6048 Horw | Switzerland | T: +41 41 500 48 00
#13 lore raw

PATCH 5/9 verdin-imx8mm: spl: switch to pca9450 pmic

In reply to Marcel Ziswiler
Quoted 6 lines · Marcel Ziswiler
Quoted 4 lines · Igor Opaniuk

From: Max Krummenacher <[email protected]>

V1.1A HW switched the PMIC from BD71837 to PCA9450.

Quoted 8 lines
Quoted 6 lines

- Disable combined DVS in PCA9450_BUCK123_DVS.
- Increase DDR Voltage to 0.95V as we use a 1.5GHz RAM.
- Configure WDOG_B behaviour.

Quoted 76 lines
Quoted 76 lines

---

 board/toradex/verdin-imx8mm/spl.c | 42 +++++++++++++++----------------
 configs/verdin-imx8mm_defconfig   |  2 +-
 2 files changed, 21 insertions(+), 23 deletions(-)
board/toradex/verdin-imx8mm/spl.c +20 -22
index cc78c5666b..9562cdeb35 100644
@@ -21,12 +21,16 @@
 #include <dm/uclass.h>
 #include <dm/uclass-internal.h>
 #include <hang.h>
+#include <i2c.h>
 #include <power/bd71837.h>
+#include <power/pca9450.h>
 #include <power/pmic.h>
 #include <spl.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
+#define I2C_PMIC_BUS_ID        1
+
 int spl_board_boot_device(enum boot_device boot_dev_spl)
 {
        switch (boot_dev_spl) {
@@ -101,33 +105,27 @@ int power_init_board(void)
        struct udevice *dev;
        int ret;
 
-       ret = pmic_get("pmic at 4b", &dev);
-       if (ret == -ENODEV) {
-               puts("No pmic\n");
-               return 0;
-       }
-       if (ret != 0)
-               return ret;
+       if (IS_ENABLED(CONFIG_SPL_DM_PMIC_PCA9450)) {
+               ret = pmic_get("pmic", &dev);
+               if (ret == -ENODEV) {
+                       puts("No pmic found\n");
+                       return ret;
+               }
 
-       /* decrease RESET key long push time from the default 10s to 10ms */
-       pmic_reg_write(dev, BD718XX_PWRONCONFIG1, 0x0);
+               if (ret != 0)
+                       return ret;
 
-       /* unlock the PMIC regs */
-       pmic_reg_write(dev, BD718XX_REGLOCK, 0x1);
+               /* BUCKxOUT_DVS0/1 control BUCK123 output, clear PRESET_EN */
+               pmic_reg_write(dev, PCA9450_BUCK123_DVS, 0x29);
 
-       /* increase VDD_SOC to typical value 0.85v before first DRAM access */
-       pmic_reg_write(dev, BD718XX_BUCK1_VOLT_RUN, 0x0f);
+               /* increase VDD_DRAM to 0.975v for 1.5Ghz DDR */
+               pmic_reg_write(dev, PCA9450_BUCK3OUT_DVS0, 0x1c);
 
-       /* increase VDD_DRAM to 0.975v for 3Ghz DDR */
-       pmic_reg_write(dev, BD718XX_1ST_NODVS_BUCK_VOLT, 0x83);
+               /* set WDOG_B_CFG to cold reset */
+               pmic_reg_write(dev, PCA9450_RESET_CTRL, 0xA1);
 
-#ifndef CONFIG_IMX8M_LPDDR4
-       /* increase NVCC_DRAM_1V2 to 1.2v for DDR4 */
-       pmic_reg_write(dev, BD718XX_4TH_NODVS_BUCK_VOLT, 0x28);
-#endif
-
-       /* lock the PMIC regs */
-       pmic_reg_write(dev, BD718XX_REGLOCK, 0x11);
+               return 0;
+       }
 
Quoted 15 lines
Quoted 7 lines
board/toradex/verdin-imx8mm/spl.c +0 -0
        return 0;
 }
configs/verdin-imx8mm_defconfig +0 -0
index 7ebfd6792f..d856e3a318 100644

configs/verdin-imx8mm_defconfig CONFIG_PINCTRL=y · line 97

Quoted 8 lines
configs/verdin-imx8mm_defconfig +1 -1
@@ -91,7 +91,7 @@ CONFIG_PINCTRL=y
 CONFIG_SPL_PINCTRL=y
 CONFIG_PINCTRL_IMX8M=y
 CONFIG_DM_PMIC=y
-CONFIG_SPL_DM_PMIC_BD71837=y
+CONFIG_SPL_DM_PMIC_PCA9450=y
 CONFIG_DM_PMIC_PFUZE100=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y

--
Best regards
Oleksandr Suvorov

Toradex AG
Ebenaustrasse 10 | 6048 Horw | Switzerland | T: +41 41 500 48 00

#23 lore raw

PATCH 8/9 toradex: tdx-cfg-clock: fix i.mx 8m mini interactive

In reply to Igor Opaniuk
Quoted 7 lines · Igor Opaniuk

From: Marcel Ziswiler <[email protected]>

Now with them first Verdin iMX8M Mini DualLite modules in for bring-up we got clarity how is_cpu_type() actually behaves.

with a note: the commit message seems to have a typo s/them/the/, isn't it?

Quoted 53 lines

---

 board/toradex/common/tdx-cfg-block.c | 26 +++++++++-----------------
 1 file changed, 9 insertions(+), 17 deletions(-)
board/toradex/common/tdx-cfg-block.c +9 -18
index 475abf78a7..adab0a0802 100644
@@ -423,12 +423,6 @@ static int get_cfgblock_interactive(void)
                tdx_hw_tag.prodid = COLIBRI_IMX7D;
        else if (!strcmp("imx7s", soc))
                tdx_hw_tag.prodid = COLIBRI_IMX7S;
-       else if (is_cpu_type(MXC_CPU_IMX8MM))
-               tdx_hw_tag.prodid = VERDIN_IMX8MMQ_WIFI_BT_IT;
-       else if (is_cpu_type(MXC_CPU_IMX8MMDL))
-               tdx_hw_tag.prodid = VERDIN_IMX8MMDL;
-       else if (is_cpu_type(MXC_CPU_IMX8MN))
-               tdx_hw_tag.prodid = VERDIN_IMX8MNQ_WIFI_BT;
        else if (is_cpu_type(MXC_CPU_IMX8QM)) {
                if (it == 'y' || it == 'Y') {
                        if (wb == 'y' || wb == 'Y')
@@ -464,18 +458,16 @@ static int get_cfgblock_interactive(void)
                                tdx_hw_tag.prodid = COLIBRI_IMX8DX;
                }
 #endif
+       } else if (is_cpu_type(MXC_CPU_IMX8MMDL)) {
+               if (wb == 'y' || wb == 'Y')
+                       tdx_hw_tag.prodid = VERDIN_IMX8MMDL_WIFI_BT_IT;
+               else
+                       tdx_hw_tag.prodid = VERDIN_IMX8MMDL;
        } else if (is_cpu_type(MXC_CPU_IMX8MM)) {
-               if (is_cpu_type(MXC_CPU_IMX8MMDL)) {
-                       if (wb == 'y' || wb == 'Y')
-                               tdx_hw_tag.prodid = VERDIN_IMX8MMDL_WIFI_BT_IT;
-                       else
-                               tdx_hw_tag.prodid = VERDIN_IMX8MMDL;
-               } else {
-                       if (wb == 'y' || wb == 'Y')
-                               tdx_hw_tag.prodid = VERDIN_IMX8MMQ_WIFI_BT_IT;
-                       else
-                               tdx_hw_tag.prodid = VERDIN_IMX8MMQ_IT;
-               }
+               if (wb == 'y' || wb == 'Y')
+                       tdx_hw_tag.prodid = VERDIN_IMX8MMQ_WIFI_BT_IT;
+               else
+                       tdx_hw_tag.prodid = VERDIN_IMX8MMQ_IT;
        } else if (is_cpu_type(MXC_CPU_IMX8MN)) {
                tdx_hw_tag.prodid = VERDIN_IMX8MNQ_WIFI_BT;
        } else if (is_cpu_type(MXC_CPU_IMX8MP)) {
--

2.17.1

Signature · 5 lines
Best regards
Oleksandr Suvorov

Toradex AG
Ebenaustrasse 10 | 6048 Horw | Switzerland | T: +41 41 500 48 00
#17 lore raw

PATCH 6/9 verdin-imx8mm: implement hardware version detection

In reply to Igor Opaniuk
Quoted 6 lines

From: Max Krummenacher <[email protected]>
And select the correct devicetree accordingly by setting the variant environment variable.

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#27 lore raw

PATCH 9/9 verdin-imx8mm: automatic ram size detection

In reply to Igor Opaniuk
Quoted 6 lines

From: Marcel Ziswiler <[email protected]> Implement board_phys_sdram_size() to automatically detect Verdin iMX8M Mini DualLite 1GB vs. Verdin iMX8M Mini Quad 2GB.
Note: This only works if we keep using similar RAM chips!

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#6 lore raw

PATCH 3/9 power: pmic: add SPL_DM_PMIC_PCA9450 symbol to Kconfig

In reply to Igor Opaniuk
Quoted 4 lines

From: Igor Opaniuk <[email protected]> Add SPL_DM_PMIC_PCA9450 symbol to Kconfig.

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#21 lore raw

PATCH 7/9 verdin-imx8mm: spl: enable pca9450 i2c level translator

In reply to Igor Opaniuk
Quoted 6 lines

From: Max Krummenacher <[email protected]> Enable PCA9450 i2c level translator, as this is used for the on module ADC.

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#14 lore raw

PATCH 5/9 verdin-imx8mm: spl: switch to pca9450 pmic

In reply to Igor Opaniuk
Quoted 9 lines

From: Max Krummenacher <[email protected]> V1.1A HW switched the PMIC from BD71837 to PCA9450.
- Disable combined DVS in PCA9450_BUCK123_DVS.
- Increase DDR Voltage to 0.95V as we use a 1.5GHz RAM.
- Configure WDOG_B behaviour.

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#24 lore raw

PATCH 8/9 toradex: tdx-cfg-clock: fix i.mx 8m mini interactive

In reply to Igor Opaniuk
Quoted 5 lines

From: Marcel Ziswiler <[email protected]>
Now with them first Verdin iMX8M Mini DualLite modules in for bring-up we got clarity how is_cpu_type() actually behaves.

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#10 lore raw

PATCH 4/9 ARM: dts: imx8mm-verdin: follow changed pmic

In reply to Igor Opaniuk
Quoted 9 lines

From: Max Krummenacher <[email protected]>
The used PMIC has been changed from RHOM BD71837 to NXP PCA9450A. Adjust the device tree accordingly.
Remove the old ADC node as the ADC has been changed and has no longer a separate power rail.

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#3 lore raw

PATCH 2/9 pca9450a: fix i2c address

In reply to Igor Opaniuk
Quoted 5 lines

From: Max Krummenacher <[email protected]>
The I2C address is 0x25, not 0x35. This according to the datasheet and tests with a PCA9450A.

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#29 lore raw

PATCH 1/9 toradex: tdx-cfg-clock: add new i.mx 8m mini/plus skus

In reply to Igor Opaniuk
Quoted 10 lines

From: Marcel Ziswiler <[email protected]>
Add new i.MX 8M Mini/Plus SKUs to ConfigBlock handling:
0058: Verdin iMX8M Plus Quad 4GB Wi-Fi / BT IT
0059: Verdin iMX8M Mini Quad 2GB IT
0060: Verdin iMX8M Mini DualLite 1GB WB IT
0061: Verdin iMX8M Plus Quad 2GB
Rename existing SKU (use correct one):
Verdin iMX8M Nano SoloLite 1GB -> Verdin iMX8M Nano Quad 1GB Wi-Fi

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================