aboutsummaryrefslogtreecommitdiff
path: root/board/st
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-04-09 13:10:59 -0400
committerTom Rini <trini@konsulko.com>2021-04-09 13:10:59 -0400
commit3f2e3c7845df11ca8359a6cc804bfd6eb5ce215b (patch)
tree423c18c94b1e62122f8988b94668bada1b85340b /board/st
parent92c4eb7ae3e8fe2c2b3c5b37f882b42282a08e84 (diff)
parent2c2d7d6a72ba4a4f9323f24b8caa3b1e05546d83 (diff)
downloadu-boot-3f2e3c7845df11ca8359a6cc804bfd6eb5ce215b.zip
u-boot-3f2e3c7845df11ca8359a6cc804bfd6eb5ce215b.tar.gz
u-boot-3f2e3c7845df11ca8359a6cc804bfd6eb5ce215b.tar.bz2
Merge tag 'u-boot-stm32-20210409' of https://source.denx.de/u-boot/custodians/u-boot-stm
Add rt-thread art-pi board support based on STM32H750 SoC Add Engicam i.Core STM32MP1 SoM Add FIP header support for STM32programmer Update uart number when no serial device found for STM32MP1 Remove board_check_usb_power function when ADC flag is not set Update SPL size limitation for STM32MP1 Set soc_type, soc_pkg, soc_rev env variables for STM32MP1
Diffstat (limited to 'board/st')
-rw-r--r--board/st/stm32h750-art-pi/Kconfig19
-rw-r--r--board/st/stm32h750-art-pi/MAINTAINERS7
-rw-r--r--board/st/stm32h750-art-pi/Makefile6
-rw-r--r--board/st/stm32h750-art-pi/stm32h750-art-pi.c58
-rw-r--r--board/st/stm32mp1/stm32mp1.c9
5 files changed, 94 insertions, 5 deletions
diff --git a/board/st/stm32h750-art-pi/Kconfig b/board/st/stm32h750-art-pi/Kconfig
new file mode 100644
index 0000000..c31b984
--- /dev/null
+++ b/board/st/stm32h750-art-pi/Kconfig
@@ -0,0 +1,19 @@
+if TARGET_STM32H750_ART_PI
+
+config SYS_BOARD
+ string
+ default "stm32h750-art-pi"
+
+config SYS_VENDOR
+ string
+ default "st"
+
+config SYS_SOC
+ string
+ default "stm32h7"
+
+config SYS_CONFIG_NAME
+ string
+ default "stm32h750-art-pi"
+
+endif
diff --git a/board/st/stm32h750-art-pi/MAINTAINERS b/board/st/stm32h750-art-pi/MAINTAINERS
new file mode 100644
index 0000000..9578833
--- /dev/null
+++ b/board/st/stm32h750-art-pi/MAINTAINERS
@@ -0,0 +1,7 @@
+STM32H750 ART PI BOARD
+M: Dillon Min <dillon.minfei@gmail.com>
+S: Maintained
+F: board/st/stm32h750-art-pi
+F: include/configs/stm32h750-art-pi.h
+F: configs/stm32h750-art-pi_defconfig
+F: arch/arm/dts/stm32h7*
diff --git a/board/st/stm32h750-art-pi/Makefile b/board/st/stm32h750-art-pi/Makefile
new file mode 100644
index 0000000..a06de87
--- /dev/null
+++ b/board/st/stm32h750-art-pi/Makefile
@@ -0,0 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright (C) 2021, RT-Thread - All Rights Reserved
+# Author(s): Dillon Min, <dillon.minfei@gmail.com> for RT-Thread.
+
+obj-y := stm32h750-art-pi.o
diff --git a/board/st/stm32h750-art-pi/stm32h750-art-pi.c b/board/st/stm32h750-art-pi/stm32h750-art-pi.c
new file mode 100644
index 0000000..5785b2e
--- /dev/null
+++ b/board/st/stm32h750-art-pi/stm32h750-art-pi.c
@@ -0,0 +1,58 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2021, STMicroelectronics - All Rights Reserved
+ * Author(s): Dillon Min <dillon.minfei@gmail.com>
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <init.h>
+#include <log.h>
+#include <asm/global_data.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int dram_init(void)
+{
+ struct udevice *dev;
+ int ret;
+
+ ret = uclass_get_device(UCLASS_RAM, 0, &dev);
+ if (ret) {
+ debug("DRAM init failed: %d\n", ret);
+ return ret;
+ }
+
+ if (fdtdec_setup_mem_size_base() != 0)
+ ret = -EINVAL;
+
+ return ret;
+}
+
+int dram_init_banksize(void)
+{
+ fdtdec_setup_memory_banksize();
+
+ return 0;
+}
+
+int board_early_init_f(void)
+{
+ return 0;
+}
+
+u32 get_board_rev(void)
+{
+ return 0;
+}
+
+int board_late_init(void)
+{
+ return 0;
+}
+
+int board_init(void)
+{
+ gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100;
+ return 0;
+}
diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
index 759181f..261ec15 100644
--- a/board/st/stm32mp1/stm32mp1.c
+++ b/board/st/stm32mp1/stm32mp1.c
@@ -347,6 +347,9 @@ static int board_check_usb_power(void)
u32 nb_blink;
u8 i;
+ if (!IS_ENABLED(CONFIG_ADC))
+ return -ENODEV;
+
node = ofnode_path("/config");
if (!ofnode_valid(node)) {
log_debug("no /config node?\n");
@@ -370,11 +373,7 @@ static int board_check_usb_power(void)
/* perform maximum of 2 ADC measurements to detect power supply current */
for (i = 0; i < 2; i++) {
- if (IS_ENABLED(CONFIG_ADC))
- ret = adc_measurement(node, adc_count, &min_uV, &max_uV);
- else
- ret = -ENODEV;
-
+ ret = adc_measurement(node, adc_count, &min_uV, &max_uV);
if (ret)
return ret;