mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-08-14 11:16:58 +02:00
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-riscv
CI: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/25940 - riscv: lib: Simplify FDT retrieving process - board: k1: pinctrl: Add pinctrl support for bananapi-f3 - binman: riscv: Fix binman_sym functionality - board: starfive: visionfive2: Reorder board detection logic - board: starfive: Add DeepComputing FML13V01 support
This commit is contained in:
commit
5a0a93a768
@ -16,6 +16,7 @@ ENTRY(_start)
|
|||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
__image_copy_start = ADDR(.text);
|
||||||
.text : {
|
.text : {
|
||||||
arch/riscv/cpu/start.o (.text)
|
arch/riscv/cpu/start.o (.text)
|
||||||
*(.text*)
|
*(.text*)
|
||||||
@ -46,6 +47,7 @@ SECTIONS
|
|||||||
|
|
||||||
_end = .;
|
_end = .;
|
||||||
_image_binary_end = .;
|
_image_binary_end = .;
|
||||||
|
__image_copy_end = .;
|
||||||
|
|
||||||
.bss : {
|
.bss : {
|
||||||
__bss_start = .;
|
__bss_start = .;
|
||||||
|
@ -10,6 +10,7 @@ ENTRY(_start)
|
|||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
__image_copy_start = ADDR(.text);
|
||||||
.text : {
|
.text : {
|
||||||
arch/riscv/cpu/start.o (.text)
|
arch/riscv/cpu/start.o (.text)
|
||||||
}
|
}
|
||||||
@ -57,6 +58,8 @@ SECTIONS
|
|||||||
__efi_runtime_rel_stop = .;
|
__efi_runtime_rel_stop = .;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__image_copy_end = .;
|
||||||
|
|
||||||
/DISCARD/ : { *(.rela.plt*) }
|
/DISCARD/ : { *(.rela.plt*) }
|
||||||
.rela.dyn : {
|
.rela.dyn : {
|
||||||
__rel_dyn_start = .;
|
__rel_dyn_start = .;
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
compression = "none";
|
compression = "none";
|
||||||
load = /bits/ 64 <CONFIG_TEXT_BASE>;
|
load = /bits/ 64 <CONFIG_TEXT_BASE>;
|
||||||
|
|
||||||
uboot_blob: blob-ext {
|
uboot_blob: u-boot-nodtb {
|
||||||
filename = "u-boot-nodtb.bin";
|
filename = "u-boot-nodtb.bin";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
#include "k1.dtsi"
|
#include "k1.dtsi"
|
||||||
#include "binman.dtsi"
|
#include "binman.dtsi"
|
||||||
|
#include "k1-pinctrl.dtsi"
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
model = "Banana Pi BPI-F3";
|
model = "Banana Pi BPI-F3";
|
||||||
@ -21,5 +22,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
&uart0 {
|
&uart0 {
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&uart0_2_cfg>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
19
arch/riscv/dts/k1-pinctrl.dtsi
Normal file
19
arch/riscv/dts/k1-pinctrl.dtsi
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2022 Spacemit Inc.
|
||||||
|
* Copyright (C) 2025 Yixun Lan <dlan@gentoo.org>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define K1_PADCONF(pin, func) (((pin) << 16) | (func))
|
||||||
|
|
||||||
|
&pinctrl {
|
||||||
|
uart0_2_cfg: uart0-2-cfg {
|
||||||
|
uart0-2-pins {
|
||||||
|
pinmux = <K1_PADCONF(68, 2)>,
|
||||||
|
<K1_PADCONF(69, 2)>;
|
||||||
|
|
||||||
|
bias-pull-up = <0>;
|
||||||
|
drive-strength = <32>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
@ -470,5 +470,11 @@
|
|||||||
#reset-cells = <1>;
|
#reset-cells = <1>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pinctrl: pinctrl@d401e000 {
|
||||||
|
compatible = "spacemit,k1-pinctrl", "pinctrl-single";
|
||||||
|
reg = <0x0 0xd401e000 0x0 0x400>;
|
||||||
|
pinctrl-single,register-width = <32>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
args = "-T sfspl";
|
args = "-T sfspl";
|
||||||
|
|
||||||
u-boot-spl {
|
u-boot-spl {
|
||||||
|
no-write-symbols;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -27,6 +27,7 @@ obj-$(CONFIG_$(PHASE_)SMP) += smp.o
|
|||||||
obj-$(CONFIG_XPL_BUILD) += spl.o
|
obj-$(CONFIG_XPL_BUILD) += spl.o
|
||||||
obj-y += fdt_fixup.o
|
obj-y += fdt_fixup.o
|
||||||
obj-$(CONFIG_$(SPL)CMD_BDI) += bdinfo.o
|
obj-$(CONFIG_$(SPL)CMD_BDI) += bdinfo.o
|
||||||
|
obj-$(CONFIG_OF_BOARD) += board.o
|
||||||
|
|
||||||
# For building EFI apps
|
# For building EFI apps
|
||||||
CFLAGS_NON_EFI := -fstack-protector-strong
|
CFLAGS_NON_EFI := -fstack-protector-strong
|
||||||
|
19
arch/riscv/lib/board.c
Normal file
19
arch/riscv/lib/board.c
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
/*
|
||||||
|
* RISC-V-specific handling of firmware FDT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <asm/global_data.h>
|
||||||
|
#include <linux/errno.h>
|
||||||
|
|
||||||
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
|
__weak int board_fdt_blob_setup(void **fdtp)
|
||||||
|
{
|
||||||
|
if (!gd->arch.firmware_fdt_addr)
|
||||||
|
return -EEXIST;
|
||||||
|
|
||||||
|
*fdtp = (ulong *)(uintptr_t)gd->arch.firmware_fdt_addr;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
@ -63,11 +63,3 @@ int board_fit_config_name_match(const char *name)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int board_fdt_blob_setup(void **fdtp)
|
|
||||||
{
|
|
||||||
/* Stored the DTB address there during our init */
|
|
||||||
*fdtp = (void *)(ulong)gd->arch.firmware_fdt_addr;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
@ -114,17 +114,6 @@ int misc_init_r(void)
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int board_fdt_blob_setup(void **fdtp)
|
|
||||||
{
|
|
||||||
if (gd->arch.firmware_fdt_addr) {
|
|
||||||
*fdtp = (ulong *)(uintptr_t)gd->arch.firmware_fdt_addr;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return -EEXIST;
|
|
||||||
}
|
|
||||||
|
|
||||||
int board_init(void)
|
int board_init(void)
|
||||||
{
|
{
|
||||||
/* enable all cache ways */
|
/* enable all cache ways */
|
||||||
|
@ -10,16 +10,6 @@
|
|||||||
#include <dm.h>
|
#include <dm.h>
|
||||||
#include <asm/sections.h>
|
#include <asm/sections.h>
|
||||||
|
|
||||||
int board_fdt_blob_setup(void **fdtp)
|
|
||||||
{
|
|
||||||
if (gd->arch.firmware_fdt_addr) {
|
|
||||||
*fdtp = (ulong *)(uintptr_t)gd->arch.firmware_fdt_addr;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return -EEXIST;
|
|
||||||
}
|
|
||||||
|
|
||||||
int board_init(void)
|
int board_init(void)
|
||||||
{
|
{
|
||||||
/* enable all cache ways */
|
/* enable all cache ways */
|
||||||
|
@ -2,6 +2,6 @@ STARFIVE JH7110 VISIONFIVE2 BOARD
|
|||||||
M: Minda Chen <minda.chen@starfivetech.com>
|
M: Minda Chen <minda.chen@starfivetech.com>
|
||||||
M: Hal Feng <hal.feng@starfivetech.com>
|
M: Hal Feng <hal.feng@starfivetech.com>
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: drivers/ram/starfive/
|
N: starfive
|
||||||
N: jh7110
|
N: jh7110
|
||||||
N: visionfive2
|
N: visionfive2
|
||||||
|
@ -140,9 +140,26 @@ int board_fit_config_name_match(const char *name)
|
|||||||
} else if (!strncmp(product_id, "MARS", 4) &&
|
} else if (!strncmp(product_id, "MARS", 4) &&
|
||||||
!strcmp(name, "jh7110-milkv-mars")) {
|
!strcmp(name, "jh7110-milkv-mars")) {
|
||||||
return 0;
|
return 0;
|
||||||
} else if (!strncmp(product_id, "STAR64", 6) &&
|
} else if (!strcmp(name, "starfive/jh7110-milkv-mars") &&
|
||||||
!strcmp(name, "jh7110-pine64-star64")) {
|
!strncmp(get_product_id_from_eeprom(), "MARS", 4)) {
|
||||||
return 0;
|
return 0;
|
||||||
|
} else if ((!strcmp(name, "starfive/jh7110-pine64-star64")) &&
|
||||||
|
!strncmp(get_product_id_from_eeprom(), "STAR64", 6)) {
|
||||||
|
return 0;
|
||||||
|
} else if ((!strcmp(name, "starfive/jh7110-starfive-visionfive-2-v1.2a")) &&
|
||||||
|
!strncmp(get_product_id_from_eeprom(), "VF7110", 6)) {
|
||||||
|
switch (get_pcb_revision_from_eeprom()) {
|
||||||
|
case 'a':
|
||||||
|
case 'A':
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
} else if ((!strcmp(name, "starfive/jh7110-starfive-visionfive-2-v1.2b")) &&
|
||||||
|
!strncmp(get_product_id_from_eeprom(), "VF7110", 6)) {
|
||||||
|
switch (get_pcb_revision_from_eeprom()) {
|
||||||
|
case 'b':
|
||||||
|
case 'B':
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -110,16 +110,6 @@ int board_late_init(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int board_fdt_blob_setup(void **fdtp)
|
|
||||||
{
|
|
||||||
if (gd->arch.firmware_fdt_addr) {
|
|
||||||
*fdtp = (ulong *)(uintptr_t)gd->arch.firmware_fdt_addr;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return -EEXIST;
|
|
||||||
}
|
|
||||||
|
|
||||||
int ft_board_setup(void *blob, struct bd_info *bd)
|
int ft_board_setup(void *blob, struct bd_info *bd)
|
||||||
{
|
{
|
||||||
return fdt_fixup_memory(blob, 0x40000000, gd->ram_size);
|
return fdt_fixup_memory(blob, 0x40000000, gd->ram_size);
|
||||||
|
@ -19,3 +19,5 @@ CONFIG_ENV_OVERWRITE=y
|
|||||||
CONFIG_SYS_NS16550=y
|
CONFIG_SYS_NS16550=y
|
||||||
CONFIG_SYS_NS16550_MEM32=y
|
CONFIG_SYS_NS16550_MEM32=y
|
||||||
CONFIG_RESET_SPACEMIT_K1=y
|
CONFIG_RESET_SPACEMIT_K1=y
|
||||||
|
CONFIG_PINCTRL=y
|
||||||
|
CONFIG_PINCTRL_SINGLE=y
|
||||||
|
@ -116,6 +116,7 @@ Format the SD card (make sure the disk has GPT, otherwise use gdisk to switch)
|
|||||||
--new=2:8192:16383 --change-name=2:uboot --typecode=2:BC13C2FF-59E6-4262-A352-B275FD6F7172 \
|
--new=2:8192:16383 --change-name=2:uboot --typecode=2:BC13C2FF-59E6-4262-A352-B275FD6F7172 \
|
||||||
--new=3:16384:1654784 --change-name=3:system --typecode=3:EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 \
|
--new=3:16384:1654784 --change-name=3:system --typecode=3:EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 \
|
||||||
/dev/sdb
|
/dev/sdb
|
||||||
|
sudo mkfs.vfat -F32 /dev/sdb3
|
||||||
|
|
||||||
Program the SD card
|
Program the SD card
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user