summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2023-11-10 07:54:52 -0500
committerTom Rini <[email protected]>2023-11-10 10:58:56 -0500
commiteda45ee3cbb2ed15aee79009638b3719fe5cbc1a (patch)
tree927b3dea3d3e4dcc5d090acffde47e6877ab2d07 /board
parente17d174773e9ba9447596708e702b7382e47a6cf (diff)
parent8ffa9ed295909a638932167486b62ff1adcaa7a3 (diff)
Merge tag 'u-boot-rockchip-20231110' of https://source.denx.de/u-boot/custodians/u-boot-rockchip
- Add Board: rk3588 Pine64 QuartzPro64; - Fix rk3066 enter download mode; - Fix for ringneck-px30 board;
Diffstat (limited to 'board')
-rw-r--r--board/pine64/quartzpro64-rk3588/Kconfig15
-rw-r--r--board/pine64/quartzpro64-rk3588/MAINTAINERS8
-rw-r--r--board/pine64/quartzpro64-rk3588/Makefile3
-rw-r--r--board/pine64/quartzpro64-rk3588/quartzpro64-rk3588.c39
-rw-r--r--board/theobroma-systems/ringneck_px30/ringneck-px30.c53
5 files changed, 118 insertions, 0 deletions
diff --git a/board/pine64/quartzpro64-rk3588/Kconfig b/board/pine64/quartzpro64-rk3588/Kconfig
new file mode 100644
index 00000000000..96aa7921d32
--- /dev/null
+++ b/board/pine64/quartzpro64-rk3588/Kconfig
@@ -0,0 +1,15 @@
+if TARGET_QUARTZPRO64_RK3588
+
+config SYS_BOARD
+ default "quartzpro64-rk3588"
+
+config SYS_VENDOR
+ default "pine64"
+
+config SYS_CONFIG_NAME
+ default "quartzpro64-rk3588"
+
+config BOARD_SPECIFIC_OPTIONS # dummy
+ def_bool y
+
+endif
diff --git a/board/pine64/quartzpro64-rk3588/MAINTAINERS b/board/pine64/quartzpro64-rk3588/MAINTAINERS
new file mode 100644
index 00000000000..a7e944b7478
--- /dev/null
+++ b/board/pine64/quartzpro64-rk3588/MAINTAINERS
@@ -0,0 +1,8 @@
+QUARTZPRO64-RK3588
+M: Tom Fitzhenry <[email protected]>
+S: Maintained
+F: board/pine64/quartzpro64-rk3588
+F: include/configs/quartzpro64-rk3588.h
+F: configs/quartzpro64-rk3588_defconfig
+F: arch/arm/dts/rk3588-quartzpro64.dts
+F: arch/arm/dts/rk3588-quartzpro64-u-boot.dtsi
diff --git a/board/pine64/quartzpro64-rk3588/Makefile b/board/pine64/quartzpro64-rk3588/Makefile
new file mode 100644
index 00000000000..47819d9be93
--- /dev/null
+++ b/board/pine64/quartzpro64-rk3588/Makefile
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0+
+
+obj-y += quartzpro64-rk3588.o
diff --git a/board/pine64/quartzpro64-rk3588/quartzpro64-rk3588.c b/board/pine64/quartzpro64-rk3588/quartzpro64-rk3588.c
new file mode 100644
index 00000000000..bda804a89e2
--- /dev/null
+++ b/board/pine64/quartzpro64-rk3588/quartzpro64-rk3588.c
@@ -0,0 +1,39 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2023 Google, Inc
+ */
+
+#include <fdtdec.h>
+#include <fdt_support.h>
+
+#ifdef CONFIG_OF_BOARD_SETUP
+int quartzpro64_add_reserved_memory_fdt_nodes(void *new_blob)
+{
+ struct fdt_memory gap1 = {
+ .start = 0x3fc000000,
+ .end = 0x3fc4fffff,
+ };
+ struct fdt_memory gap2 = {
+ .start = 0x3fff00000,
+ .end = 0x3ffffffff,
+ };
+ unsigned long flags = FDTDEC_RESERVED_MEMORY_NO_MAP;
+ unsigned int ret;
+
+ /*
+ * Inject the reserved-memory nodes into the DTS
+ */
+ ret = fdtdec_add_reserved_memory(new_blob, "gap1", &gap1, NULL, 0,
+ NULL, flags);
+ if (ret)
+ return ret;
+
+ return fdtdec_add_reserved_memory(new_blob, "gap2", &gap2, NULL, 0,
+ NULL, flags);
+}
+
+int ft_board_setup(void *blob, struct bd_info *bd)
+{
+ return quartzpro64_add_reserved_memory_fdt_nodes(blob);
+}
+#endif
diff --git a/board/theobroma-systems/ringneck_px30/ringneck-px30.c b/board/theobroma-systems/ringneck_px30/ringneck-px30.c
index bb1bb4acf5c..537ce0d1d11 100644
--- a/board/theobroma-systems/ringneck_px30/ringneck-px30.c
+++ b/board/theobroma-systems/ringneck_px30/ringneck-px30.c
@@ -16,12 +16,14 @@
#include <usb.h>
#include <dm/pinctrl.h>
#include <dm/uclass-internal.h>
+#include <asm/gpio.h>
#include <asm/io.h>
#include <asm/setup.h>
#include <asm/arch-rockchip/clock.h>
#include <asm/arch-rockchip/hardware.h>
#include <asm/arch-rockchip/periph.h>
#include <asm/arch-rockchip/misc.h>
+#include <linux/delay.h>
#include <power/regulator.h>
#include <u-boot/sha256.h>
@@ -169,3 +171,54 @@ int misc_init_r(void)
return 0;
}
+
+#define STM32_RST 100 /* GPIO3_A4 */
+#define STM32_BOOT 101 /* GPIO3_A5 */
+
+void spl_board_init(void)
+{
+ /*
+ * Glitches on STM32_BOOT and STM32_RST lines during poweroff or power
+ * on may put the STM32 companion microcontroller into DFU mode, let's
+ * always reset it into normal mode instead.
+ * Toggling the STM32_RST line is safe to do with the ATtiny companion
+ * microcontroller variant because it will not trigger an MCU reset
+ * since only a UPDI reset command will. Since a UPDI reset is difficult
+ * to mistakenly trigger, glitches to the lines are theoretically also
+ * incapable of triggering an actual ATtiny reset.
+ */
+ int ret;
+
+ ret = gpio_request(STM32_RST, "STM32_RST");
+ if (ret) {
+ debug("Failed to request STM32_RST\n");
+ return;
+ }
+
+ ret = gpio_request(STM32_BOOT, "STM32_BOOT");
+ if (ret) {
+ debug("Failed to request STM32_BOOT\n");
+ return;
+ }
+
+ /* Rely on HW pull-down for inactive level */
+ ret = gpio_direction_input(STM32_BOOT);
+ if (ret) {
+ debug("Failed to configure STM32_BOOT as input\n");
+ return;
+ }
+
+ ret = gpio_direction_output(STM32_RST, 0);
+ if (ret) {
+ debug("Failed to configure STM32_RST as output low\n");
+ return;
+ }
+
+ mdelay(1);
+
+ ret = gpio_direction_output(STM32_RST, 1);
+ if (ret) {
+ debug("Failed to configure STM32_RST as output high\n");
+ return;
+ }
+}