diff options
Diffstat (limited to 'board')
-rw-r--r-- | board/CZ.NIC/turris_mox/MAINTAINERS | 1 | ||||
-rw-r--r-- | board/CZ.NIC/turris_omnia/MAINTAINERS | 1 | ||||
-rw-r--r-- | board/nokia/rx51/Kconfig | 48 | ||||
-rw-r--r-- | board/nokia/rx51/MAINTAINERS | 8 | ||||
-rw-r--r-- | board/nokia/rx51/Makefile | 7 | ||||
-rw-r--r-- | board/nokia/rx51/lowlevel_init.S | 97 | ||||
-rw-r--r-- | board/nokia/rx51/rx51.c | 806 | ||||
-rw-r--r-- | board/nokia/rx51/tag_omap.h | 294 | ||||
-rw-r--r-- | board/raspberrypi/rpi/rpi.env | 77 | ||||
-rw-r--r-- | board/starfive/visionfive2/visionfive2-i2c-eeprom.c | 2 |
10 files changed, 78 insertions, 1263 deletions
diff --git a/board/CZ.NIC/turris_mox/MAINTAINERS b/board/CZ.NIC/turris_mox/MAINTAINERS index b29ce92ccd..5f0551e2e1 100644 --- a/board/CZ.NIC/turris_mox/MAINTAINERS +++ b/board/CZ.NIC/turris_mox/MAINTAINERS @@ -1,6 +1,5 @@ TURRIS MOX BOARD M: Marek Behún <kabel@kernel.org> -M: Pali Rohár <pali@kernel.org> S: Maintained F: arch/arm/dts/armada-3720-turris-mox*.dts* F: board/CZ.NIC/turris_mox/ diff --git a/board/CZ.NIC/turris_omnia/MAINTAINERS b/board/CZ.NIC/turris_omnia/MAINTAINERS index 8bff97cc27..effce8a753 100644 --- a/board/CZ.NIC/turris_omnia/MAINTAINERS +++ b/board/CZ.NIC/turris_omnia/MAINTAINERS @@ -1,6 +1,5 @@ TURRIS OMNIA BOARD M: Marek Behún <kabel@kernel.org> -M: Pali Rohár <pali@kernel.org> S: Maintained F: arch/arm/dts/armada-385-turris-omnia*.dts* F: board/CZ.NIC/turris_atsha_otp.* diff --git a/board/nokia/rx51/Kconfig b/board/nokia/rx51/Kconfig deleted file mode 100644 index c884543a3d..0000000000 --- a/board/nokia/rx51/Kconfig +++ /dev/null @@ -1,48 +0,0 @@ -if TARGET_NOKIA_RX51 - -config USB_DEVICE - def_bool y - help - Legacy UDC device support - -config USB_TTY - def_bool y - help - Legacy tty type of device available to talk to the UDC device - -config USBD_VENDORID - hex - default 0x0421 - -config USBD_PRODUCTID_CDCACM - hex - default 0x01c8 - -config USBD_PRODUCTID_GSERIAL - hex - default 0x01c8 - -config USBD_MANUFACTURER - string - default "Nokia" - -config USBD_PRODUCT_NAME - string - default "N900 (U-Boot)" - -config NR_DRAM_BANKS - default 2 - -config SYS_BOARD - default "rx51" - -config SYS_VENDOR - default "nokia" - -config SYS_CONFIG_NAME - default "nokia_rx51" - -config SYS_PROMPT - default "Nokia RX-51 # " - -endif diff --git a/board/nokia/rx51/MAINTAINERS b/board/nokia/rx51/MAINTAINERS deleted file mode 100644 index 25f8b3c5a9..0000000000 --- a/board/nokia/rx51/MAINTAINERS +++ /dev/null @@ -1,8 +0,0 @@ -RX51 BOARD -M: Pali Rohár <pali@kernel.org> -S: Maintained -F: board/nokia/rx51/ -F: include/configs/nokia_rx51.h -F: configs/nokia_rx51_defconfig -F: doc/board/nokia/rx51.rst -F: test/nokia_rx51_test.sh diff --git a/board/nokia/rx51/Makefile b/board/nokia/rx51/Makefile deleted file mode 100644 index 842f9e6a65..0000000000 --- a/board/nokia/rx51/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0+ -# -# (C) Copyright 2000, 2001, 2002 -# Wolfgang Denk, DENX Software Engineering, wd@denx.de. - -obj-y := rx51.o -obj-y += lowlevel_init.o diff --git a/board/nokia/rx51/lowlevel_init.S b/board/nokia/rx51/lowlevel_init.S deleted file mode 100644 index 44f32f114e..0000000000 --- a/board/nokia/rx51/lowlevel_init.S +++ /dev/null @@ -1,97 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * (C) Copyright 2011-2012 - * Pali Rohár <pali@kernel.org> - */ - -#include <config.h> -#include <linux/linkage.h> - -kernoffs: /* offset of kernel image from this address */ - .word . - CONFIG_TEXT_BASE - KERNEL_OFFSET - -kernaddr: /* address of kernel after copying */ - .word KERNEL_ADDRESS - -kernsize: /* maximal size of kernel image */ - .word KERNEL_MAXSIZE - -imagesize: /* maximal size of image */ - .word IMAGE_MAXSIZE - -ih_magic: /* IH_MAGIC in big endian from include/image.h */ - .word 0x56190527 - -z_magic: /* LINUX_ARM_ZIMAGE_MAGIC */ - .word 0x016f2818 - -/* - * Routine: save_boot_params (called after reset from start.S) - * Description: Copy attached kernel to address KERNEL_ADDRESS - */ - -ENTRY(save_boot_params) - -/* - * Copy valid attached kernel to absolute address KERNEL_ADDRESS - * - * Nokia X-Loader is loading secondary image to address 0x80400000. - * NOLO is loading boot image to random place, so it doesn't really - * matter what is set in CONFIG_TEXT_BASE. We have to detect - * KERNEL_OFFSET from the current execution address and copy it to - * absolute address KERNEL_ADDRESS. - * - * Note that U-Boot has to be compiled with CONFIG_POSITION_INDEPENDENT - * because it is loaded at random address and not to the fixed address - * (CONFIG_TEXT_BASE). - */ - - /* r0 - start of kernel before */ - adr r0, kernoffs /* r0 - current address of kernoffs section */ - ldr r1, kernoffs /* r1 - offset of kernel image from kernoffs section */ - sub r0, r0, r1 - - /* r3 - start of kernel after */ - ldr r3, kernaddr - - /* r2 - end of kernel after */ - ldr r1, kernsize - add r2, r3, r1 - - /* r1 - end of kernel before */ - add r1, r0, r1 - - /* remove header in target kernel */ - mov r5, #0 - str r5, [r3] /* remove 4 bytes header of kernel uImage */ - str r5, [r3, #36] /* remove 4 bytes header of kernel zImage */ - - /* check for valid kernel uImage */ - ldr r4, [r0] /* r4 - 4 bytes header of kernel */ - ldr r5, ih_magic /* r5 - IH_MAGIC */ - cmp r4, r5 - beq copy_kernel_loop - - /* check for valid kernel zImage */ - ldr r4, [r0, #36] /* r4 - 4 bytes header of kernel at offset 36 */ - ldr r5, z_magic /* r5 - LINUX_ARM_ZIMAGE_MAGIC */ - cmp r4, r5 - bne skip_copy /* skip if invalid image */ - -copy_kernel_loop: - ldmdb r1!, {r3 - r10} - stmdb r2!, {r3 - r10} - cmp r1, r0 - bhi copy_kernel_loop - - /* remove header in source kernel image */ - mov r5, #0 - str r5, [r0] /* remove 4 bytes header of kernel uImage */ - str r5, [r0, #36] /* remove 4 bytes header of kernel zImage */ - -skip_copy: - - /* Returns */ - b save_boot_params_ret - -ENDPROC(save_boot_params) diff --git a/board/nokia/rx51/rx51.c b/board/nokia/rx51/rx51.c deleted file mode 100644 index 238b9637ba..0000000000 --- a/board/nokia/rx51/rx51.c +++ /dev/null @@ -1,806 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * (C) Copyright 2012 - * Ивайло Димитров <freemangordon@abv.bg> - * - * (C) Copyright 2011-2012 - * Pali Rohár <pali@kernel.org> - * - * (C) Copyright 2010 - * Alistair Buxton <a.j.buxton@gmail.com> - * - * Derived from Beagle Board and 3430 SDP code: - * (C) Copyright 2004-2008 - * Texas Instruments, <www.ti.com> - * - * Author : - * Sunil Kumar <sunilsaini05@gmail.com> - * Shashi Ranjan <shashiranjanmca05@gmail.com> - * - * Richard Woodruff <r-woodruff2@ti.com> - * Syed Mohammed Khasim <khasim@ti.com> - */ - -#include <common.h> -#include <dm.h> -#include <env.h> -#include <init.h> -#include <watchdog.h> -#include <wdt.h> -#include <malloc.h> -#include <twl4030.h> -#include <i2c.h> -#include <video.h> -#include <keyboard.h> -#include <ns16550.h> -#include <asm/global_data.h> -#include <asm/io.h> -#include <asm/setup.h> -#include <asm/bitops.h> -#include <asm/mach-types.h> -#include <asm/omap_i2c.h> -#include <asm/arch/mux.h> -#include <asm/arch/sys_proto.h> -#include <asm/arch/mmc_host_def.h> - -#include "tag_omap.h" - -/* Needed for ROM SMC call */ -struct emu_hal_params_rx51 { - u32 num_params; - u32 param1; - u32 param2; - u32 param3; - u32 param4; -}; - -#define ONENAND_GPMC_CONFIG1_RX51 0xfb001202 -#define ONENAND_GPMC_CONFIG2_RX51 0x00111100 -#define ONENAND_GPMC_CONFIG3_RX51 0x00020200 -#define ONENAND_GPMC_CONFIG4_RX51 0x11001102 -#define ONENAND_GPMC_CONFIG5_RX51 0x03101616 -#define ONENAND_GPMC_CONFIG6_RX51 0x90060000 - -DECLARE_GLOBAL_DATA_PTR; - -const omap3_sysinfo sysinfo = { - DDR_STACKED, - "Nokia RX-51", - "OneNAND" -}; - -/* This structure contains default omap tags needed for booting Maemo 5 */ -static struct tag_omap omap[] = { - OMAP_TAG_UART_CONFIG(0x04), - OMAP_TAG_SERIAL_CONSOLE_CONFIG(0x03, 0x01C200), - OMAP_TAG_LCD_CONFIG("acx565akm", "internal", 90, 0x18), - OMAP_TAG_GPIO_SWITCH_CONFIG("cam_focus", 0x44, 0x1, 0x2, 0x0), - OMAP_TAG_GPIO_SWITCH_CONFIG("cam_launch", 0x45, 0x1, 0x2, 0x0), - OMAP_TAG_GPIO_SWITCH_CONFIG("cam_shutter", 0x6e, 0x1, 0x0, 0x0), - OMAP_TAG_GPIO_SWITCH_CONFIG("cmt_apeslpx", 0x46, 0x2, 0x2, 0x0), - OMAP_TAG_GPIO_SWITCH_CONFIG("cmt_bsi", 0x9d, 0x2, 0x2, 0x0), - OMAP_TAG_GPIO_SWITCH_CONFIG("cmt_en", 0x4a, 0x2, 0x2, 0x0), - OMAP_TAG_GPIO_SWITCH_CONFIG("cmt_rst", 0x4b, 0x6, 0x2, 0x0), - OMAP_TAG_GPIO_SWITCH_CONFIG("cmt_rst_rq", 0x49, 0x6, 0x2, 0x0), - OMAP_TAG_GPIO_SWITCH_CONFIG("cmt_wddis", 0x0d, 0x2, 0x2, 0x0), - OMAP_TAG_GPIO_SWITCH_CONFIG("headphone", 0xb1, 0x1, 0x1, 0x0), - OMAP_TAG_GPIO_SWITCH_CONFIG("kb_lock", 0x71, 0x1, 0x0, 0x0), - OMAP_TAG_GPIO_SWITCH_CONFIG("proximity", 0x59, 0x0, 0x0, 0x0), - OMAP_TAG_GPIO_SWITCH_CONFIG("sleep_ind", 0xa2, 0x2, 0x2, 0x0), - OMAP_TAG_GPIO_SWITCH_CONFIG("slide", GPIO_SLIDE, 0x0, 0x0, 0x0), - OMAP_TAG_WLAN_CX3110X_CONFIG(0x25, 0xff, 87, 42, -1), - OMAP_TAG_PARTITION_CONFIG("bootloader", 128 * 1024, 0x00000000, 0x00000003), - OMAP_TAG_PARTITION_CONFIG("config", 384 * 1024, 0x00020000, 0x00000000), - OMAP_TAG_PARTITION_CONFIG("log", 256 * 1024, 0x00080000, 0x00000000), - OMAP_TAG_PARTITION_CONFIG("kernel", 2 * 1024*1024, 0x000c0000, 0x00000000), - OMAP_TAG_PARTITION_CONFIG("initfs", 2 * 1024*1024, 0x002c0000, 0x00000000), - OMAP_TAG_PARTITION_CONFIG("rootfs", 257280 * 1024, 0x004c0000, 0x00000000), - OMAP_TAG_BOOT_REASON_CONFIG("pwr_key"), - OMAP_TAG_VERSION_STR_CONFIG("product", "RX-51"), - OMAP_TAG_VERSION_STR_CONFIG("hw-build", "2101"), - OMAP_TAG_VERSION_STR_CONFIG("nolo", "1.4.14"), - OMAP_TAG_VERSION_STR_CONFIG("boot-mode", "normal"), - { } -}; - -static char *boot_reason_ptr; -static char *hw_build_ptr; -static char *nolo_version_ptr; -static char *boot_mode_ptr; -static int serial_was_console_enabled; - -/* - * Routine: init_omap_tags - * Description: Initialize pointers to values in tag_omap - */ -static void init_omap_tags(void) -{ - char *component; - char *version; - int i = 0; - while (omap[i].hdr.tag) { - switch (omap[i].hdr.tag) { - case OMAP_TAG_BOOT_REASON: - boot_reason_ptr = omap[i].u.boot_reason.reason_str; - break; - case OMAP_TAG_VERSION_STR: - component = omap[i].u.version.component; - version = omap[i].u.version.version; - if (strcmp(component, "hw-build") == 0) - hw_build_ptr = version; - else if (strcmp(component, "nolo") == 0) - nolo_version_ptr = version; - else if (strcmp(component, "boot-mode") == 0) - boot_mode_ptr = version; - break; - default: - break; - } - i++; - } -} - -static void reuse_omap_atags(struct tag_omap *t) -{ - char *component; - char *version; - while (t->hdr.tag) { - switch (t->hdr.tag) { - case OMAP_TAG_BOOT_REASON: - memset(boot_reason_ptr, 0, 12); - strcpy(boot_reason_ptr, t->u.boot_reason.reason_str); - break; - case OMAP_TAG_VERSION_STR: - component = t->u.version.component; - version = t->u.version.version; - if (strcmp(component, "hw-build") == 0) { - memset(hw_build_ptr, 0, 12); - strcpy(hw_build_ptr, version); - } else if (strcmp(component, "nolo") == 0) { - memset(nolo_version_ptr, 0, 12); - strcpy(nolo_version_ptr, version); - } else if (strcmp(component, "boot-mode") == 0) { - memset(boot_mode_ptr, 0, 12); - strcpy(boot_mode_ptr, version); - } - break; - case OMAP_TAG_UART: - if (t->u.uart.enabled_uarts) - serial_was_console_enabled = 1; - break; - case OMAP_TAG_SERIAL_CONSOLE: - serial_was_console_enabled = 1; - break; - default: - break; - } - t = tag_omap_next(t); - } -} - -/* - * Routine: reuse_atags - * Description: Reuse atags from previous bootloader. - * Reuse only only HW build, boot reason, boot mode and nolo - */ -static void reuse_atags(void) -{ - struct tag *t = (struct tag *)gd->bd->bi_boot_params; - - /* First tag must be ATAG_CORE */ - if (t->hdr.tag != ATAG_CORE) - return; - - if (!boot_reason_ptr || !hw_build_ptr) - return; - - /* Last tag must be ATAG_NONE */ - while (t->hdr.tag != ATAG_NONE) { - switch (t->hdr.tag) { - case ATAG_REVISION: - memset(hw_build_ptr, 0, 12); - sprintf(hw_build_ptr, "%x", t->u.revision.rev); - break; - case ATAG_BOARD: - reuse_omap_atags((struct tag_omap *)&t->u); - break; - default: - break; - } - t = tag_next(t); - } -} - -/* - * Routine: board_init - * Description: Early hardware init. - */ -int board_init(void) -{ -#if defined(CONFIG_CMD_ONENAND) - const u32 gpmc_regs_onenandrx51[GPMC_MAX_REG] = { - ONENAND_GPMC_CONFIG1_RX51, - ONENAND_GPMC_CONFIG2_RX51, - ONENAND_GPMC_CONFIG3_RX51, - ONENAND_GPMC_CONFIG4_RX51, - ONENAND_GPMC_CONFIG5_RX51, - ONENAND_GPMC_CONFIG6_RX51, - 0 - }; -#endif - /* in SRAM or SDRAM, finish GPMC */ - gpmc_init(); -#if defined(CONFIG_CMD_ONENAND) - enable_gpmc_cs_config(gpmc_regs_onenandrx51, &gpmc_cfg->cs[0], - CFG_SYS_ONENAND_BASE, GPMC_SIZE_256M); -#endif - /* Enable the clks & power */ - per_clocks_enable(); - /* boot param addr */ - gd->bd->bi_boot_params = OMAP34XX_SDRC_CS0 + 0x100; - return 0; -} - -#ifdef CONFIG_REVISION_TAG -/* - * Routine: get_board_revision - * Description: Return board revision. - */ -u32 get_board_rev(void) -{ - return simple_strtol(hw_build_ptr, NULL, 16); -} -#endif - -/* - * Routine: setup_board_tags - * Description: Append board specific boot tags. - */ -void setup_board_tags(struct tag **in_params) -{ - int setup_console_atag; - char *setup_boot_reason_atag; - char *setup_boot_mode_atag; - char *str; - int i; - int size; - int total_size; - struct tag *params; - struct tag_omap *t; - - params = (struct tag *)gd->bd->bi_boot_params; - - params->u.core.flags = 0x0; - params->u.core.pagesize = 0x1000; - params->u.core.rootdev = 0x0; - - /* append omap atag only if env setup_omap_atag is set to 1 */ - str = env_get("setup_omap_atag"); - if (!str || str[0] != '1') - return; - - str = env_get("setup_console_atag"); - if (str && str[0]) { - if (str[0] == '1') - setup_console_atag = 1; - else - setup_console_atag = 0; - } else { - if (serial_was_console_enabled) - setup_console_atag = 1; - else - setup_console_atag = 0; - } - - setup_boot_reason_atag = env_get("setup_boot_reason_atag"); - setup_boot_mode_atag = env_get("setup_boot_mode_atag"); - - params = *in_params; - t = (struct tag_omap *)¶ms->u; - total_size = sizeof(struct tag_header); - - for (i = 0; omap[i].hdr.tag; i++) { - - /* skip serial console tag */ - if (!setup_console_atag && - omap[i].hdr.tag == OMAP_TAG_SERIAL_CONSOLE) - continue; - - size = omap[i].hdr.size + sizeof(struct tag_omap_header); - memcpy(t, &omap[i], size); - - /* set uart tag to 0 - disable serial console */ - if (!setup_console_atag && omap[i].hdr.tag == OMAP_TAG_UART) - t->u.uart.enabled_uarts = 0; - - /* change boot reason */ - if (setup_boot_reason_atag && - omap[i].hdr.tag == OMAP_TAG_BOOT_REASON) { - memset(t->u.boot_reason.reason_str, 0, 12); - strcpy(t->u.boot_reason.reason_str, - setup_boot_reason_atag); - } - - /* change boot mode */ - if (setup_boot_mode_atag && - omap[i].hdr.tag == OMAP_TAG_VERSION_STR && - strcmp(omap[i].u.version.component, "boot-mode") == 0) { - memset(t->u.version.version, 0, 12); - strcpy(t->u.version.version, setup_boot_mode_atag); - } - - total_size += size; - t = tag_omap_next(t); - - } - - params->hdr.tag = ATAG_BOARD; - params->hdr.size = total_size >> 2; - params = tag_next(params); - - *in_params = params; -} - -static int rx51_video_probe(struct udevice *dev) -{ - struct video_uc_plat *uc_plat = dev_get_uclass_plat(dev); - struct video_priv *uc_priv = dev_get_uclass_priv(dev); - - uc_plat->base = 0x8f9c0000; - uc_plat->size = 800 * 480 * sizeof(u16); - uc_priv->xsize = 800; - uc_priv->ysize = 480; - uc_priv->bpix = VIDEO_BPP16; - - video_set_flush_dcache(dev, true); - - return 0; -} - -U_BOOT_DRIVER(rx51_video) = { - .name = "rx51_video", - .id = UCLASS_VIDEO, - .probe = rx51_video_probe, -}; - -/* - * Routine: twl4030_regulator_set_mode - * Description: Set twl4030 regulator mode over i2c powerbus. - */ -static void twl4030_regulator_set_mode(u8 id, u8 mode) -{ - u16 msg = MSG_SINGULAR(DEV_GRP_P1, id, mode); - twl4030_i2c_write_u8(TWL4030_CHIP_PM_MASTER, - TWL4030_PM_MASTER_PB_WORD_MSB, msg >> 8); - twl4030_i2c_write_u8(TWL4030_CHIP_PM_MASTER, - TWL4030_PM_MASTER_PB_WORD_LSB, msg & 0xff); -} - -static void omap3_emu_romcode_call(u32 service_id, u32 *parameters) -{ - u32 i, num_params = *parameters; - u32 *sram_scratch_space = (u32 *)OMAP3_PUBLIC_SRAM_SCRATCH_AREA; - - /* - * copy the parameters to an un-cached area to avoid coherency - * issues - */ - for (i = 0; i < num_params; i++) { - __raw_writel(*parameters, sram_scratch_space); - parameters++; - sram_scratch_space++; - } - - /* Now make the PPA call */ - do_omap3_emu_romcode_call(service_id, OMAP3_PUBLIC_SRAM_SCRATCH_AREA); -} - -void omap3_set_aux_cr_secure(u32 acr) -{ - struct emu_hal_params_rx51 emu_romcode_params = { 0, }; - - emu_romcode_params.num_params = 2; - emu_romcode_params.param1 = acr; - - omap3_emu_romcode_call(OMAP3_EMU_HAL_API_WRITE_ACR, - (u32 *)&emu_romcode_params); -} - -/* - * Routine: omap3_update_aux_cr_secure_rx51 - * Description: Modify the contents Auxiliary Control Register. - * Parameters: - * set_bits - bits to set in ACR - * clr_bits - bits to clear in ACR - */ -static void omap3_update_aux_cr_secure_rx51(u32 set_bits, u32 clear_bits) -{ - u32 acr; - - /* Read ACR */ - asm volatile ("mrc p15, 0, %0, c1, c0, 1" : "=r" (acr)); - acr &= ~clear_bits; - acr |= set_bits; - omap3_set_aux_cr_secure(acr); -} - -/* - * Routine: misc_init_r - * Description: Configure board specific parts. - */ -int misc_init_r(void) -{ - struct udevice *dev; - char buf[12]; - u8 state; - - /* disable lp5523 led */ - if (i2c_get_chip_for_busnum(1, 0x32, 1, &dev) == 0) - dm_i2c_reg_write(dev, 0x00, 0x00); - - /* initialize twl4030 power managment */ - twl4030_power_init(); - twl4030_power_mmc_init(0); - twl4030_power_mmc_init(1); - - /* set VSIM to 1.8V */ - twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VSIM_DEDICATED, - TWL4030_PM_RECEIVER_VSIM_VSEL_18, - TWL4030_PM_RECEIVER_VSIM_DEV_GRP, - TWL4030_PM_RECEIVER_DEV_GRP_P1); - - /* store I2C access state */ - twl4030_i2c_read_u8(TWL4030_CHIP_PM_MASTER, TWL4030_PM_MASTER_PB_CFG, - &state); - - /* enable I2C access to powerbus (needed for twl4030 regulator) */ - twl4030_i2c_write_u8(TWL4030_CHIP_PM_MASTER, TWL4030_PM_MASTER_PB_CFG, - 0x02); - - /* set VAUX3, VSIM and VMMC1 state to active - enable eMMC memory */ - twl4030_regulator_set_mode(RES_VAUX3, RES_STATE_ACTIVE); - twl4030_regulator_set_mode(RES_VSIM, RES_STATE_ACTIVE); - twl4030_regulator_set_mode(RES_VMMC1, RES_STATE_ACTIVE); - - /* restore I2C access state */ - twl4030_i2c_write_u8(TWL4030_CHIP_PM_MASTER, TWL4030_PM_MASTER_PB_CFG, - state); - - /* set env variable attkernaddr for relocated kernel */ - sprintf(buf, "%#x", KERNEL_ADDRESS); - env_set("attkernaddr", buf); - - /* initialize omap tags */ - init_omap_tags(); - - /* reuse atags from previous bootloader */ - reuse_atags(); - - omap_die_id_display(); - print_cpuinfo(); - - /* - * Cortex-A8(r1p0..r1p2) errata 430973 workaround - * Set IBE bit in Auxiliary Control Register - * - * Call this routine only on real secure device - * Qemu does not implement secure PPA and crash - */ - if (get_device_type() == HS_DEVICE) - omap3_update_aux_cr_secure_rx51(1 << 6, 0); - - return 0; -} - -static unsigned long int twl_wd_time; /* last time of watchdog reset */ -static unsigned long int twl_i2c_lock; - -/* - * Routine: rx51_watchdog_reset - * Description: Reset timeout of twl4030 watchdog. - */ -static int rx51_watchdog_reset(struct udevice *dev) -{ - u8 timeout = 0; - - /* do not reset watchdog too often - max every 4s */ - if (get_timer(twl_wd_time) < 4 * CONFIG_SYS_HZ) - return 0; - - /* localy lock twl4030 i2c bus */ - if (test_and_set_bit(0, &twl_i2c_lock)) - return 0; - - /* read actual watchdog timeout */ - twl4030_i2c_read_u8(TWL4030_CHIP_PM_RECEIVER, - TWL4030_PM_RECEIVER_WATCHDOG_CFG, &timeout); - - /* timeout 0 means watchdog is disabled */ - /* reset watchdog timeout to 31s (maximum) */ - if (timeout != 0) - twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, - TWL4030_PM_RECEIVER_WATCHDOG_CFG, 31); - - /* store last watchdog reset time */ - twl_wd_time = get_timer(0); - - /* localy unlock twl4030 i2c bus */ - test_and_clear_bit(0, &twl_i2c_lock); - - return 0; -} - -static int rx51_watchdog_start(struct udevice *dev, u64 timeout_ms, ulong flags) -{ - return 0; -} - -static int rx51_watchdog_probe(struct udevice *dev) -{ - return 0; -} - -static const struct wdt_ops rx51_watchdog_ops = { - .start = rx51_watchdog_start, - .reset = rx51_watchdog_reset, -}; - -U_BOOT_DRIVER(rx51_watchdog) = { - .name = "rx51_watchdog", - .id = UCLASS_WDT, - .ops = &rx51_watchdog_ops, - .probe = rx51_watchdog_probe, -}; - -/* - * TWL4030 keypad handler for cfb_console - */ - -static const char keymap[] = { - /* normal */ - 'q', 'o', 'p', ',', '\b', 0, 'a', 's', - 'w', 'd', 'f', 'g', 'h', 'j', 'k', 'l', - 'e', '.', 0, '\r', 0, 'z', 'x', 'c', - 'r', 'v', 'b', 'n', 'm', ' ', 0, 0, - 't', 0, 0, 0, 0, 0, 0, 0, - 'y', 0, 0, 0, 0, 0, 0, 0, - 'u', 0, 0, 0, 0, 0, 0, 0, - 'i', 5, 6, 0, 0, 0, 0, 0, - /* fn */ - '1', '9', '0', '=', '\b', 0, '*', '+', - '2', '#', '-', '_', '(', ')', '&', '!', - '3', '?', '^', '\r', 0, 156, '$', 238, - '4', '/', '\\', '"', '\'', '@', 0, '<', - '5', '|', '>', 0, 0, 0, 0, 0, - '6', 0, 0, 0, 0, 0, 0, 0, - '7', 0, 0, 0, 0, 0, 0, 0, - '8', 16, 17, 0, 0, 0, 0, 0, -}; - -static u8 keys[8]; -static u8 old_keys[8] = {0, 0, 0, 0, 0, 0, 0, 0}; -#define KEYBUF_SIZE 32 -static u8 keybuf[KEYBUF_SIZE]; -static u8 keybuf_head; -static u8 keybuf_tail; - -/* - * Routine: rx51_kp_start - * Description: Initialize HW keyboard. - */ -static int rx51_kp_start(struct udevice *dev) -{ - int ret = 0; - u8 ctrl; - ret = twl4030_i2c_read_u8(TWL4030_CHIP_KEYPAD, - TWL4030_KEYPAD_KEYP_CTRL_REG, &ctrl); - - if (ret) - return ret; - - /* turn on keyboard and use hardware scanning */ - ctrl |= TWL4030_KEYPAD_CTRL_KBD_ON; - ctrl |= TWL4030_KEYPAD_CTRL_SOFT_NRST; - ctrl |= TWL4030_KEYPAD_CTRL_SOFTMODEN; - ret |= twl4030_i2c_write_u8(TWL4030_CHIP_KEYPAD, - TWL4030_KEYPAD_KEYP_CTRL_REG, ctrl); - /* enable key event status */ - ret |= twl4030_i2c_write_u8(TWL4030_CHIP_KEYPAD, - TWL4030_KEYPAD_KEYP_IMR1, 0xfe); - /* enable interrupt generation on rising and falling */ - /* this is a workaround for qemu twl4030 emulation */ - ret |= twl4030_i2c_write_u8(TWL4030_CHIP_KEYPAD, - TWL4030_KEYPAD_KEYP_EDR, 0x57); - /* enable ISR clear on read */ - ret |= twl4030_i2c_write_u8(TWL4030_CHIP_KEYPAD, - TWL4030_KEYPAD_KEYP_SIH_CTRL, 0x05); - return 0; -} - -static void rx51_kp_fill(u8 k, u8 mods) -{ - /* check if some cursor key without meta fn key was pressed */ - if (!(mods & 2) && (k == 18 || k == 31 || k == 33 || k == 34)) { - keybuf[keybuf_tail++] = '\e'; - keybuf_tail %= KEYBUF_SIZE; - keybuf[keybuf_tail++] = '['; - keybuf_tail %= KEYBUF_SIZE; - if (k == 18) /* up */ - keybuf[keybuf_tail++] = 'A'; - else if (k == 31) /* left */ - keybuf[keybuf_tail++] = 'D'; - else if (k == 33) /* down */ - keybuf[keybuf_tail++] = 'B'; - else if (k == 34) /* right */ - keybuf[keybuf_tail++] = 'C'; - keybuf_tail %= KEYBUF_SIZE; - return; - } - - if (mods & 2) { /* fn meta key was pressed */ - k = keymap[k+64]; - } else { - k = keymap[k]; - if (mods & 1) { /* ctrl key was pressed */ - if (k >= 'a' && k <= 'z') - k -= 'a' - 1; - } - if (mods & 4) { /* shift key was pressed */ - if (k >= 'a' && k <= 'z') - k += 'A' - 'a'; - else if (k == '.') - k = ':'; - else if (k == ',') - k = ';'; - } - } - keybuf[keybuf_tail++] = k; - keybuf_tail %= KEYBUF_SIZE; -} - -/* - * Routine: rx51_kp_tstc - * Description: Test if key was pressed (from buffer). - */ -static int rx51_kp_tstc(struct udevice *dev) -{ - u8 c, r, dk, i; - u8 intr; - u8 mods; - - /* localy lock twl4030 i2c bus */ - if (test_and_set_bit(0, &twl_i2c_lock)) - return 0; - - /* twl4030 remembers up to 2 events */ - for (i = 0; i < 2; i++) { - - /* check interrupt register for events */ - twl4030_i2c_read_u8(TWL4030_CHIP_KEYPAD, - TWL4030_KEYPAD_KEYP_ISR1 + (2 * i), &intr); - - /* no event */ - if (!(intr&1)) - continue; - - /* read the key state */ - twl4030_i2c_read(TWL4030_CHIP_KEYPAD, - TWL4030_KEYPAD_FULL_CODE_7_0, keys, 8); - - /* cut out modifier keys from the keystate */ - mods = keys[4] >> 4; - keys[4] &= 0x0f; - - /* space key is indicated by two different bits */ - keys[3] |= (keys[3] & (1 << 6)) >> 1; - keys[3] &= ~(1 << 6); - - for (c = 0; c < 8; c++) { - - /* get newly pressed keys only */ - dk = ((keys[c] ^ old_keys[c])&keys[c]); - old_keys[c] = keys[c]; - - /* fill the keybuf */ - for (r = 0; r < 8; r++) { - if (dk&1) - rx51_kp_fill((c*8)+r, mods); - dk = dk >> 1; - } - - } - - } - - /* localy unlock twl4030 i2c bus */ - test_and_clear_bit(0, &twl_i2c_lock); - - return (KEYBUF_SIZE + keybuf_tail - keybuf_head)%KEYBUF_SIZE; -} - -/* - * Routine: rx51_kp_getc - * Description: Get last pressed key (from buffer). - */ -static int rx51_kp_getc(struct udevice *dev) -{ - keybuf_head %= KEYBUF_SIZE; - while (!rx51_kp_tstc(dev)) - schedule(); - return keybuf[keybuf_head++]; -} - -static int rx51_kp_probe(struct udevice *dev) -{ - struct keyboard_priv *uc_priv = dev_get_uclass_priv(dev); - struct stdio_dev *sdev = &uc_priv->sdev; - - strcpy(sdev->name, "keyboard"); - return input_stdio_register(sdev); -} - -static const struct keyboard_ops rx51_kp_ops = { - .start = rx51_kp_start, - .tstc = rx51_kp_tstc, - .getc = rx51_kp_getc, -}; - -U_BOOT_DRIVER(rx51_kp) = { - .name = "rx51_kp", - .id = UCLASS_KEYBOARD, - .probe = rx51_kp_probe, - .ops = &rx51_kp_ops, -}; - -static const struct mmc_config rx51_mmc_cfg = { - .host_caps = MMC_MODE_4BIT | MMC_MODE_HS_52MHz | MMC_MODE_HS, - .f_min = 400000, - .f_max = 52000000, - .b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT, - .voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195, -}; - -static const struct omap_hsmmc_plat rx51_mmc[] = { - { rx51_mmc_cfg, (struct hsmmc *)OMAP_HSMMC1_BASE }, - { rx51_mmc_cfg, (struct hsmmc *)OMAP_HSMMC2_BASE }, -}; - -U_BOOT_DRVINFOS(rx51_mmc) = { - { "omap_hsmmc", &rx51_mmc[0] }, - { "omap_hsmmc", &rx51_mmc[1] }, -}; - -static const struct omap_i2c_plat rx51_i2c[] = { - { I2C_BASE1, 100000, OMAP_I2C_REV_V1 }, - { I2C_BASE2, 100000, OMAP_I2C_REV_V1 }, - { I2C_BASE3, 100000, OMAP_I2C_REV_V1 }, -}; - -U_BOOT_DRVINFOS(rx51_i2c) = { - { "i2c_omap", &rx51_i2c[0] }, - { "i2c_omap", &rx51_i2c[1] }, - { "i2c_omap", &rx51_i2c[2] }, -}; - -U_BOOT_DRVINFOS(rx51_watchdog) = { - { "rx51_watchdog" }, -}; - -U_BOOT_DRVINFOS(rx51_video) = { - { "rx51_video" }, -}; - -U_BOOT_DRVINFOS(rx51_kp) = { - { "rx51_kp" }, -}; - -static const struct ns16550_plat rx51_serial = { - .base = CFG_SYS_NS16550_COM3, - .reg_shift = 2, - .clock = CFG_SYS_NS16550_CLK, - .fcr = UART_FCR_DEFVAL, -}; - -U_BOOT_DRVINFOS(rx51_uart) = { - { "omap_serial", &rx51_serial }, -}; diff --git a/board/nokia/rx51/tag_omap.h b/board/nokia/rx51/tag_omap.h deleted file mode 100644 index b99d6b7de1..0000000000 --- a/board/nokia/rx51/tag_omap.h +++ /dev/null @@ -1,294 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * (C) Copyright 2011-2012 - * Pali Rohár <pali@kernel.org> - * - * (C) Copyright 2011 - * marcel@mesa.nl, Mesa Consulting B.V. - * - * (C) Copyright 2004-2005 - * Nokia Corporation - */ - - -/* - * Code copied from maemo kernel 2.6.28 file - * arch/arm/plat-omap/include/mach/board.h - * - * Information structures for board-specific data - * - * Copyright (C) 2004 Nokia Corporation - * Written by Juha Yrjölä <juha.yrjola@nokia.com> - */ - -/* Different peripheral ids */ -#define OMAP_TAG_CLOCK 0x4f01 -#define OMAP_TAG_SERIAL_CONSOLE 0x4f03 -#define OMAP_TAG_USB 0x4f04 -#define OMAP_TAG_LCD 0x4f05 -#define OMAP_TAG_GPIO_SWITCH 0x4f06 -#define OMAP_TAG_UART 0x4f07 -#define OMAP_TAG_FBMEM 0x4f08 -#define OMAP_TAG_STI_CONSOLE 0x4f09 -#define OMAP_TAG_CAMERA_SENSOR 0x4f0a -#define OMAP_TAG_PARTITION 0x4f0b -#define OMAP_TAG_TEA5761 0x4f10 -#define OMAP_TAG_TMP105 0x4f11 - -#define OMAP_TAG_BOOT_REASON 0x4f80 -#define OMAP_TAG_FLASH_PART_STR 0x4f81 -#define OMAP_TAG_VERSION_STR 0x4f82 - -#define OMAP_TAG_NOKIA_BT 0x4e01 -#define OMAP_TAG_WLAN_CX3110X 0x4e02 -#define OMAP_TAG_CBUS 0x4e03 -#define OMAP_TAG_EM_ASIC_BB5 0x4e04 - - -struct omap_clock_config { - /* 0 for 12 MHz, 1 for 13 MHz and 2 for 19.2 MHz */ - u8 system_clock_type; -}; - -struct omap_serial_console_config { - u8 console_uart; - u32 console_speed; -}; - -struct omap_sti_console_config { - unsigned enable:1; - u8 channel; -}; - -struct omap_usb_config { - /* Configure drivers according to the connectors on your board: - * - "A" connector (rectagular) - * ... for host/OHCI use, set "register_host". - * - "B" connector (squarish) or "Mini-B" - * ... for device/gadget use, set "register_dev". - * - "Mini-AB" connector (very similar to Mini-B) - * ... for OTG use as device OR host, initialize "otg" - */ - unsigned register_host:1; - unsigned register_dev:1; - u8 otg; /* port number, 1-based: usb1 == 2 */ - - u8 hmc_mode; - - /* implicitly true if otg: host supports remote wakeup? */ - u8 rwc; - - /* signaling pins used to talk to transceiver on usbN: - * 0 == usbN unused - * 2 == usb0-only, using internal transceiver - * 3 == 3 wire bidirectional - * 4 == 4 wire bidirectional - * 6 == 6 wire unidirectional (or TLL) - */ - u8 pins[3]; -}; - -struct omap_lcd_config { - char panel_name[16]; - char ctrl_name[16]; - s16 nreset_gpio; - u8 data_lines; -}; - -struct omap_fbmem_config { - u32 start; - u32 size; -}; - -struct omap_gpio_switch_config { - char name[12]; - u16 gpio; - u8 flags:4; - u8 type:4; - unsigned int key_code:24; /* Linux key code */ -}; - -struct omap_uart_config { - /* Bit field of UARTs present; bit 0 --> UART1 */ - unsigned int enabled_uarts; -}; - -struct omap_tea5761_config { - u16 enable_gpio; -}; - -struct omap_partition_config { - char name[16]; - unsigned int size; - unsigned int offset; - /* same as in include/linux/mtd/partitions.h */ - unsigned int mask_flags; -}; - -struct omap_flash_part_str_config { - char part_table[0]; -}; - -struct omap_boot_reason_config { - char reason_str[12]; -}; - -struct omap_version_config { - char component[12]; - char version[12]; -}; - -/* - * Code copied from maemo kernel 2.6.28 file - * arch/arm/plat-omap/include/mach/board-nokia.h - * - * Information structures for Nokia-specific board config data - * - * Copyright (C) 2005 Nokia Corporation - */ - -struct omap_bluetooth_config { - u8 chip_type; - u8 bt_wakeup_gpio; - u8 host_wakeup_gpio; - u8 reset_gpio; - u8 bt_uart; - u8 bd_addr[6]; - u8 bt_sysclk; -}; - -struct omap_wlan_cx3110x_config { - u8 chip_type; - u8 reserverd; - s16 power_gpio; - s16 irq_gpio; - s16 spi_cs_gpio; -}; - -struct omap_cbus_config { - s16 clk_gpio; - s16 dat_gpio; - s16 sel_gpio; -}; - -struct omap_em_asic_bb5_config { - s16 retu_irq_gpio; - s16 tahvo_irq_gpio; -}; - -/* - * omap_tag handling - * - * processing omap tag structures - * - * Copyright (C) 2011 marcel@mesa.nl, Mesa Consulting B.V. - * Copyright (C) 2012 Pali Rohár <pali@kernel.org> - */ - -/* TI OMAP specific information */ -#define ATAG_BOARD 0x414f4d50 - -struct tag_omap_header { - u16 tag; - u16 size; -}; - -struct tag_omap { - struct tag_omap_header hdr; - union { - struct omap_clock_config clock; - struct omap_serial_console_config serial_console; - struct omap_sti_console_config sti_console; - struct omap_usb_config usb; - struct omap_lcd_config lcd; - struct omap_fbmem_config fbmem; - struct omap_gpio_switch_config gpio_switch; - struct omap_uart_config uart; - struct omap_tea5761_config tea5761; - struct omap_partition_config partition; - struct omap_flash_part_str_config flash_part_str; - struct omap_boot_reason_config boot_reason; - struct omap_version_config version; - struct omap_bluetooth_config bluetooth; - struct omap_wlan_cx3110x_config wlan_cx3110x; - struct omap_cbus_config cbus; - struct omap_em_asic_bb5_config em_asic_bb5; - } u; -}; - -#define tag_omap_next(t) ((struct tag_omap *)((u8 *)(t) + \ - (t)->hdr.size + sizeof(struct tag_omap_header))) - -#define OMAP_TAG_HEADER_CONFIG(config, type) \ - .hdr.tag = config, \ - .hdr.size = sizeof(struct type) - -#define OMAP_TAG_UART_CONFIG(p1) \ - { \ - OMAP_TAG_HEADER_CONFIG(OMAP_TAG_UART, omap_uart_config), \ - .u.uart.enabled_uarts = p1, \ - } - -#define OMAP_TAG_SERIAL_CONSOLE_CONFIG(p1, p2) \ - { \ - OMAP_TAG_HEADER_CONFIG(OMAP_TAG_SERIAL_CONSOLE, \ - omap_serial_console_config), \ - .u.serial_console.console_uart = p1, \ - .u.serial_console.console_speed = p2, \ - } - -#define OMAP_TAG_LCD_CONFIG(p1, p2, p3, p4) \ - { \ - OMAP_TAG_HEADER_CONFIG(OMAP_TAG_LCD, omap_lcd_config), \ - .u.lcd.panel_name = p1, \ - .u.lcd.ctrl_name = p2, \ - .u.lcd.nreset_gpio = p3, \ - .u.lcd.data_lines = p4, \ - } - -#define OMAP_TAG_GPIO_SWITCH_CONFIG(p1, p2, p3, p4, p5) \ - { \ - OMAP_TAG_HEADER_CONFIG(OMAP_TAG_GPIO_SWITCH, \ - omap_gpio_switch_config), \ - .u.gpio_switch.name = p1, \ - .u.gpio_switch.gpio = p2, \ - .u.gpio_switch.flags = p3, \ - .u.gpio_switch.type = p4, \ - .u.gpio_switch.key_code = p5, \ - } - -#define OMAP_TAG_WLAN_CX3110X_CONFIG(p1, p2, p3, p4, p5) \ - { \ - OMAP_TAG_HEADER_CONFIG(OMAP_TAG_WLAN_CX3110X, \ - omap_wlan_cx3110x_config), \ - .u.wlan_cx3110x.chip_type = p1, \ - .u.wlan_cx3110x.reserverd = p2, \ - .u.wlan_cx3110x.power_gpio = p3, \ - .u.wlan_cx3110x.irq_gpio = p4, \ - .u.wlan_cx3110x.spi_cs_gpio = p5, \ - } - -#define OMAP_TAG_PARTITION_CONFIG(p1, p2, p3, p4) \ - { \ - OMAP_TAG_HEADER_CONFIG(OMAP_TAG_PARTITION, \ - omap_partition_config), \ - .u.partition.name = p1, \ - .u.partition.size = p2, \ - .u.partition.offset = p3, \ - .u.partition.mask_flags = p4, \ - } - -#define OMAP_TAG_BOOT_REASON_CONFIG(p1) \ - { \ - OMAP_TAG_HEADER_CONFIG(OMAP_TAG_BOOT_REASON, \ - omap_boot_reason_config), \ - .u.boot_reason.reason_str = p1, \ - } - -#define OMAP_TAG_VERSION_STR_CONFIG(p1, p2) \ - { \ - OMAP_TAG_HEADER_CONFIG(OMAP_TAG_VERSION_STR, \ - omap_version_config), \ - .u.version.component = p1, \ - .u.version.version = p2, \ - } diff --git a/board/raspberrypi/rpi/rpi.env b/board/raspberrypi/rpi/rpi.env new file mode 100644 index 0000000000..30228285ed --- /dev/null +++ b/board/raspberrypi/rpi/rpi.env @@ -0,0 +1,77 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +/* environment for Raspberry Pi boards */ + +dhcpuboot=usb start; dhcp u-boot.uimg; bootm + +/* Environment */ +stdin=serial,usbkbd +stdout=serial,vidconsole +stderr=serial,vidconsole + +/* DFU over USB/UDC */ +#ifdef CONFIG_CMD_DFU +dfu_alt_info=u-boot.bin fat 0 1;uboot.env fat 0 1; + config.txt fat 0 1; +#ifdef CONFIG_ARM64 +dfu_alt_info+=Image fat 0 1 +#else +dfu_alt_info+=zImage fat 0 1 +#endif +#endif /* CONFIG_CMD_DFU */ + +/* + * Memory layout for where various images get loaded by boot scripts: + * + * I suspect address 0 is used as the SMP pen on the RPi2, so avoid this. + * + * Older versions of the boot firmware place the firmware-loaded DTB at 0x100, + * newer versions place it in high memory. So prevent U-Boot from doing its own + * DTB + initrd relocation so that we won't accidentally relocate the initrd + * over the firmware-loaded DTB and generally try to lay out things starting + * from the bottom of RAM. + * + * kernel_addr_r has different constraints on ARM and Aarch64. For 32-bit ARM, + * it must be within the first 128M of RAM in order for the kernel's + * CONFIG_AUTO_ZRELADDR option to work. The kernel itself will be decompressed + * to 0x8000 but the decompressor clobbers 0x4000-0x8000 as well. The + * decompressor also likes to relocate itself to right past the end of the + * decompressed kernel, so in total the sum of the compressed and + * decompressed kernel needs to be reserved. + * + * For Aarch64, the kernel image is uncompressed and must be loaded at + * text_offset bytes (specified in the header of the Image) into a 2MB + * boundary. The 'booti' command relocates the image if necessary. Linux uses + * a default text_offset of 0x80000. In summary, loading at 0x80000 + * satisfies all these constraints and reserving memory up to 0x02400000 + * permits fairly large (roughly 36M) kernels. + * + * scriptaddr and pxefile_addr_r can be pretty much anywhere that doesn't + * conflict with something else. Reserving 1M for each of them at + * 0x02400000-0x02500000 and 0x02500000-0x02600000 should be plenty. + * + * On ARM, both the DTB and any possible initrd must be loaded such that they + * fit inside the lowmem mapping in Linux. In practice, this usually means not + * more than ~700M away from the start of the kernel image but this number can + * be larger OR smaller depending on e.g. the 'vmalloc=xxxM' command line + * parameter given to the kernel. So reserving memory from low to high + * satisfies this constraint again. Reserving 1M at 0x02600000-0x02700000 for + * the DTB leaves rest of the free RAM to the initrd starting at 0x02700000. + * Even with the smallest possible CPU-GPU memory split of the CPU getting + * only 64M, the remaining 25M starting at 0x02700000 should allow quite + * large initrds before they start colliding with U-Boot. + */ +#ifdef CONFIG_ARM64 +fdt_high=ffffffffffffffff +initrd_high=ffffffffffffffff +#else +fdt_high=ffffffff +initrd_high=ffffffff +#endif +kernel_addr_r=0x00080000 +scriptaddr=0x02400000 +pxefile_addr_r=0x02500000 +fdt_addr_r=0x02600000 +ramdisk_addr_r=0x02700000 + +boot_targets=mmc usb pxe dhcp diff --git a/board/starfive/visionfive2/visionfive2-i2c-eeprom.c b/board/starfive/visionfive2/visionfive2-i2c-eeprom.c index befe7888c4..c334d98cf6 100644 --- a/board/starfive/visionfive2/visionfive2-i2c-eeprom.c +++ b/board/starfive/visionfive2/visionfive2-i2c-eeprom.c @@ -504,7 +504,7 @@ int mac_read_from_eeprom(void) } // 1, setup ethaddr env - eth_env_set_enetaddr("eth0addr", pbuf.eeprom.atom4.data.mac0_addr); + eth_env_set_enetaddr("ethaddr", pbuf.eeprom.atom4.data.mac0_addr); eth_env_set_enetaddr("eth1addr", pbuf.eeprom.atom4.data.mac1_addr); /** |