summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2023-03-27 15:19:57 -0400
committerTom Rini <[email protected]>2023-03-27 15:19:57 -0400
commit605bc145f91d2a28ba2e517cae4e53e255e34b6f (patch)
treea8df36d6569d441bc013399ff7dafff07cd36657 /board
parentfde439219ff53a46bdd5dff69e049ccd4be57310 (diff)
parent41a88ad529b3943b1e465846eb24fe2c29203e35 (diff)
Merge branch 'master' into next
Diffstat (limited to 'board')
-rw-r--r--board/amlogic/odroid-go-ultra/MAINTAINERS7
-rw-r--r--board/amlogic/odroid-go-ultra/Makefile5
-rw-r--r--board/amlogic/odroid-go-ultra/odroid-go-ultra.c22
-rw-r--r--board/freescale/m5253demo/flash.c20
-rw-r--r--board/freescale/m53017evb/README2
-rw-r--r--board/freescale/m5373evb/README2
-rw-r--r--board/raspberrypi/rpi/rpi.c53
-rw-r--r--board/sysam/stmark2/Kconfig2
8 files changed, 91 insertions, 22 deletions
diff --git a/board/amlogic/odroid-go-ultra/MAINTAINERS b/board/amlogic/odroid-go-ultra/MAINTAINERS
new file mode 100644
index 00000000000..c22951b4e71
--- /dev/null
+++ b/board/amlogic/odroid-go-ultra/MAINTAINERS
@@ -0,0 +1,7 @@
+ODROID-GO-ULTRA
+M: Neil Armstrong <[email protected]>
+S: Maintained
+F: board/amlogic/odroid-go-ultra
+F: configs/odroid-go-ultra_defconfig
+F: doc/board/amlogic/odroid-go-ultra.rst
diff --git a/board/amlogic/odroid-go-ultra/Makefile b/board/amlogic/odroid-go-ultra/Makefile
new file mode 100644
index 00000000000..8ebaa0c215a
--- /dev/null
+++ b/board/amlogic/odroid-go-ultra/Makefile
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# (C) Copyright 2023 Neil Armstrong <[email protected]>
+
+obj-y := odroid-go-ultra.o
diff --git a/board/amlogic/odroid-go-ultra/odroid-go-ultra.c b/board/amlogic/odroid-go-ultra/odroid-go-ultra.c
new file mode 100644
index 00000000000..bbd23e20fcd
--- /dev/null
+++ b/board/amlogic/odroid-go-ultra/odroid-go-ultra.c
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2023 Neil Armstrong <[email protected]>
+ */
+
+#include <common.h>
+#include <asm/arch/boot.h>
+#include <power/regulator.h>
+
+int mmc_get_env_dev(void)
+{
+ if (meson_get_boot_device() == BOOT_DEVICE_EMMC)
+ return 1;
+ return 0;
+}
+
+int board_init(void)
+{
+ regulators_enable_boot_on(_DEBUG);
+
+ return 0;
+}
diff --git a/board/freescale/m5253demo/flash.c b/board/freescale/m5253demo/flash.c
index fbd48354160..eeb9cfd3125 100644
--- a/board/freescale/m5253demo/flash.c
+++ b/board/freescale/m5253demo/flash.c
@@ -96,24 +96,8 @@ void flash_print_info(flash_info_t * info)
return;
}
- if (info->size > 0x100000) {
- int remainder;
-
- printf(" Size: %ld", info->size >> 20);
-
- remainder = (info->size % 0x100000);
- if (remainder) {
- remainder >>= 10;
- remainder = (int)((float)
- (((float)remainder / (float)1024) *
- 10000));
- printf(".%d ", remainder);
- }
-
- printf("MB in %d Sectors\n", info->sector_count);
- } else
- printf(" Size: %ld KB in %d Sectors\n",
- info->size >> 10, info->sector_count);
+ printf(" Size: %ld KB in %d Sectors\n",
+ info->size >> 10, info->sector_count);
printf(" Sector Start Addresses:");
for (i = 0; i < info->sector_count; ++i) {
diff --git a/board/freescale/m53017evb/README b/board/freescale/m53017evb/README
index 34f05f3fdc7..5d5c5e7adf9 100644
--- a/board/freescale/m53017evb/README
+++ b/board/freescale/m53017evb/README
@@ -87,7 +87,7 @@ CONFIG_SYS_FEC0_PINMUX -- Set FEC0 Pin configuration
CONFIG_SYS_FEC0_MIIBASE -- Set FEC0 MII base register
MCFFEC_TOUT_LOOP -- set FEC timeout loop
-CONFIG_MCFTMR -- define to use DMA timer
+CFG_MCFTMR -- define to use DMA timer
CONFIG_SYS_I2C_FSL -- define to use FSL common I2C driver
CONFIG_SYS_I2C_SOFT -- define for I2C bit-banged
diff --git a/board/freescale/m5373evb/README b/board/freescale/m5373evb/README
index 7240648796b..e8bf75f4fb9 100644
--- a/board/freescale/m5373evb/README
+++ b/board/freescale/m5373evb/README
@@ -86,7 +86,7 @@ CONFIG_SYS_FEC0_PINMUX -- Set FEC0 Pin configuration
CONFIG_SYS_FEC0_MIIBASE -- Set FEC0 MII base register
MCFFEC_TOUT_LOOP -- set FEC timeout loop
-CONFIG_MCFTMR -- define to use DMA timer
+CFG_MCFTMR -- define to use DMA timer
CONFIG_SYS_I2C_FSL -- define to use FSL common I2C driver
CONFIG_SYS_I2C_SOFT -- define for I2C bit-banged
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
index 8603c93de77..1057ebb9948 100644
--- a/board/raspberrypi/rpi/rpi.c
+++ b/board/raspberrypi/rpi/rpi.c
@@ -158,7 +158,7 @@ static const struct rpi_model rpi_models_new_scheme[] = {
},
[0x12] = {
"Zero 2 W",
- DTB_DIR "bcm2837-rpi-zero-2.dtb",
+ DTB_DIR "bcm2837-rpi-zero-2-w.dtb",
false,
},
[0x13] = {
@@ -503,10 +503,61 @@ void *board_fdt_blob_setup(int *err)
return (void *)fw_dtb_pointer;
}
+int copy_property(void *dst, void *src, char *path, char *property)
+{
+ int dst_offset, src_offset;
+ const fdt32_t *prop;
+ int len;
+
+ src_offset = fdt_path_offset(src, path);
+ dst_offset = fdt_path_offset(dst, path);
+
+ if (src_offset < 0 || dst_offset < 0)
+ return -1;
+
+ prop = fdt_getprop(src, src_offset, property, &len);
+ if (!prop)
+ return -1;
+
+ return fdt_setprop(dst, dst_offset, property, prop, len);
+}
+
+/* Copy tweaks from the firmware dtb to the loaded dtb */
+void update_fdt_from_fw(void *fdt, void *fw_fdt)
+{
+ /* Using dtb from firmware directly; leave it alone */
+ if (fdt == fw_fdt)
+ return;
+
+ /* The firmware provides a more precie model; so copy that */
+ copy_property(fdt, fw_fdt, "/", "model");
+
+ /* memory reserve as suggested by the firmware */
+ copy_property(fdt, fw_fdt, "/", "memreserve");
+
+ /* Adjust dma-ranges for the SD card and PCI bus as they can depend on
+ * the SoC revision
+ */
+ copy_property(fdt, fw_fdt, "emmc2bus", "dma-ranges");
+ copy_property(fdt, fw_fdt, "pcie0", "dma-ranges");
+
+ /* Bootloader configuration template exposes as nvmem */
+ if (copy_property(fdt, fw_fdt, "blconfig", "reg") == 0)
+ copy_property(fdt, fw_fdt, "blconfig", "status");
+
+ /* kernel address randomisation seed as provided by the firmware */
+ copy_property(fdt, fw_fdt, "/chosen", "kaslr-seed");
+
+ /* address of the PHY device as provided by the firmware */
+ copy_property(fdt, fw_fdt, "ethernet0/mdio@e14/ethernet-phy@1", "reg");
+}
+
int ft_board_setup(void *blob, struct bd_info *bd)
{
int node;
+ update_fdt_from_fw(blob, (void *)fw_dtb_pointer);
+
node = fdt_node_offset_by_compatible(blob, -1, "simple-framebuffer");
if (node < 0)
fdt_simplefb_add_node(blob);
diff --git a/board/sysam/stmark2/Kconfig b/board/sysam/stmark2/Kconfig
index b2595059c68..94f5049c94d 100644
--- a/board/sysam/stmark2/Kconfig
+++ b/board/sysam/stmark2/Kconfig
@@ -11,7 +11,7 @@ config SERIAL_BOOT
depends on CF_SBF
config SYS_INPUT_CLKSRC
- hex
+ int "External crystal clock"
default 30000000
config SYS_CPU