summaryrefslogtreecommitdiff
path: root/board/dhelectronics
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2022-09-26 19:50:00 +0300
committerPatrice Chotard <patrice.chotard@foss.st.com>2022-10-18 09:34:25 +0300
commit0de10e2fe1d6c06e2142f492cce86aad501893b5 (patch)
treec38ffcdc3d57e5450e3c2c3f75732a6fa159dc5b /board/dhelectronics
parentf8edb1e79c7b2470add9c3bb91fdf30260023a61 (diff)
downloadu-boot-0de10e2fe1d6c06e2142f492cce86aad501893b5.tar.xz
ARM: dts: stm32: Add DHCOR based Testbench board
Add DT for DHCOR Testbench board, which is a testbench for testing of DHCOR SoM during manufacturing. This is effectively a trimmed down version of AV96 board with CSI-2 bridge, HDMI bridge, WiFi, Audio and LEDs removed and used as GPIOs instead. Furthermore, the PMIC Buck3 is always configured from PMIC NVM to cater for both 1V8 and 3V3 SoM variant. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Patrice Chotard <patrice.chotard@foss.st.com> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Diffstat (limited to 'board/dhelectronics')
-rw-r--r--board/dhelectronics/dh_stm32mp1/board.c40
-rw-r--r--board/dhelectronics/dh_stm32mp1/u-boot-dhcor.its21
2 files changed, 45 insertions, 16 deletions
diff --git a/board/dhelectronics/dh_stm32mp1/board.c b/board/dhelectronics/dh_stm32mp1/board.c
index 05f884cfbf..8d8104ad4b 100644
--- a/board/dhelectronics/dh_stm32mp1/board.c
+++ b/board/dhelectronics/dh_stm32mp1/board.c
@@ -547,7 +547,7 @@ static int board_get_regulator_buck3_nvm_uv_av96(int *uv)
if (!prop || !len)
return -ENODEV;
- if (!strstr(prop, "avenger96"))
+ if (!strstr(prop, "avenger96") && !strstr(prop, "dhcor-testbench"))
return -EINVAL;
/* Read out STPMIC1 NVM and determine default Buck3 voltage. */
@@ -564,18 +564,32 @@ static int board_get_regulator_buck3_nvm_uv_av96(int *uv)
bucks_vout >>= STPMIC_NVM_BUCKS_VOUT_SHR_BUCK_OFFSET(3);
bucks_vout &= STPMIC_NVM_BUCKS_VOUT_SHR_BUCK_MASK;
- /*
- * Avenger96 board comes in multiple regulator configurations:
- * - rev.100 or rev.200 have Buck3 preconfigured to 3V3 operation on
- * boot and contains extra Enpirion EP53A8LQI DCDC converter which
- * supplies the IO. Reduce Buck3 voltage to 2V9 to not waste power.
- * - rev.200L have Buck3 preconfigured to 1V8 operation and have no
- * Enpirion EP53A8LQI DCDC anymore, the IO is supplied from Buck3.
- */
- if (bucks_vout == STPMIC_NVM_BUCKS_VOUT_SHR_BUCK_3V3)
- *uv = 2900000;
- else
- *uv = 1800000;
+ if (strstr(prop, "avenger96")) {
+ /*
+ * Avenger96 board comes in multiple regulator configurations:
+ * - rev.100 or rev.200 have Buck3 preconfigured to
+ * 3V3 operation on boot and contains extra Enpirion
+ * EP53A8LQI DCDC converter which supplies the IO.
+ * Reduce Buck3 voltage to 2V9 to not waste power.
+ * - rev.200L have Buck3 preconfigured to 1V8 operation
+ * and have no Enpirion EP53A8LQI DCDC anymore, the
+ * IO is supplied from Buck3.
+ */
+ if (bucks_vout == STPMIC_NVM_BUCKS_VOUT_SHR_BUCK_3V3)
+ *uv = 2900000;
+ else
+ *uv = 1800000;
+ } else {
+ /* Testbench always respects Buck3 NVM settings */
+ if (bucks_vout == STPMIC_NVM_BUCKS_VOUT_SHR_BUCK_3V3)
+ *uv = 3300000;
+ else if (bucks_vout == STPMIC_NVM_BUCKS_VOUT_SHR_BUCK_3V0)
+ *uv = 3000000;
+ else if (bucks_vout == STPMIC_NVM_BUCKS_VOUT_SHR_BUCK_1V8)
+ *uv = 1800000;
+ else /* STPMIC_NVM_BUCKS_VOUT_SHR_BUCK_1V2 */
+ *uv = 1200000;
+ }
return 0;
}
diff --git a/board/dhelectronics/dh_stm32mp1/u-boot-dhcor.its b/board/dhelectronics/dh_stm32mp1/u-boot-dhcor.its
index de7dcb317f..f9c1075616 100644
--- a/board/dhelectronics/dh_stm32mp1/u-boot-dhcor.its
+++ b/board/dhelectronics/dh_stm32mp1/u-boot-dhcor.its
@@ -18,7 +18,7 @@
fdt-1 {
description = ".dtb";
- data = /incbin/("arch/arm/dts/stm32mp15xx-dhcor-avenger96.dtb");
+ data = /incbin/("arch/arm/dts/stm32mp15xx-dhcor-testbench.dtb");
type = "flat_dt";
arch = "arm";
compression = "none";
@@ -26,6 +26,14 @@
fdt-2 {
description = ".dtb";
+ data = /incbin/("arch/arm/dts/stm32mp15xx-dhcor-avenger96.dtb");
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ };
+
+ fdt-3 {
+ description = ".dtb";
data = /incbin/("arch/arm/dts/stm32mp15xx-dhcor-drc-compact.dtb");
type = "flat_dt";
arch = "arm";
@@ -38,18 +46,25 @@
config-1 {
/* DT+SoM+board model */
- description = "arrow,stm32mp15xx-avenger96_somrev0_boardrev1";
+ description = "dh,stm32mp15xx-dhcor-testbench_somrev0_boardrev1";
firmware = "uboot";
fdt = "fdt-1";
};
config-2 {
/* DT+SoM+board model */
- description = "dh,stm32mp15xx-dhcor-drc-compact_somrev0_boardrev0";
+ description = "arrow,stm32mp15xx-avenger96_somrev0_boardrev1";
firmware = "uboot";
fdt = "fdt-2";
};
+ config-3 {
+ /* DT+SoM+board model */
+ description = "dh,stm32mp15xx-dhcor-drc-compact_somrev0_boardrev0";
+ firmware = "uboot";
+ fdt = "fdt-3";
+ };
+
/* Add 586-200..586-400 with fdt-2..fdt-4 here */
};
};