summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2025-12-18 08:06:10 -0600
committerTom Rini <[email protected]>2025-12-18 08:06:10 -0600
commit930eff5416ea98ebd09cec73f5d06a7033b4d52e (patch)
tree55a54df2e4ee0314b1180d033c7a7bb34726b47a /arch
parenta333d9e59f6675c9541c34643f334dbf50898647 (diff)
parent6f419247baa45917fcdd67062e271b8884d8c7aa (diff)
Merge tag 'u-boot-socfpga-next-20251217' of https://source.denx.de/u-boot/custodians/u-boot-socfpga into next
This pull request brings together a set of fixes and enhancements across the SoCFPGA platform family, with a focus on MMC/SPL robustness, EFI boot enablement, and Agilex5 SD/eMMC support. CI: https://source.denx.de/u-boot/custodians/u-boot-socfpga/-/pipelines/28776 Highlights: * SPL / MMC: o Fix Kconfig handling for SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE o Correct raw sector calculations and respect explicit sector values when loading U-Boot from MMC in SPL o Adjust raw MMC loading logic for SoCFPGA platforms * EFI boot: o Permit EFI booting on SoCFPGA platforms o Disable mkeficapsule tool build for Arria 10 where unsupported * Agilex5: o Upgrade SDHCI controller from SD4HC to SD6HC o Enable MMC and Cadence SDHCI support in defconfig o Add dedicated eMMC device tree and defconfig for Agilex5 SoCDK o Revert incorrect GPIO configuration for SDIO_SEL o Refine U-Boot DT handling for SD and eMMC boot variants * SPI: o Allow disabling the DesignWare SPI driver in SPL via Kconfig * Board / configuration fixes: o Enable random MAC address generation for Cyclone V o Fix DE0-Nano-SoC boot configuration o Remove obsolete or conflicting options from multiple legacy SoCFPGA defconfigs
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/dts/Makefile1
-rw-r--r--arch/arm/dts/rk3588-rock-5b-plus-u-boot.dtsi3
-rw-r--r--arch/arm/dts/rk3588-rock-5b-u-boot.dtsi5
-rw-r--r--arch/arm/dts/rk3588-rock-5t-u-boot.dtsi3
-rw-r--r--arch/arm/dts/rockchip-u-boot.dtsi33
-rw-r--r--arch/arm/dts/socfpga_agilex5-u-boot.dtsi14
-rw-r--r--arch/arm/dts/socfpga_agilex5.dtsi29
-rw-r--r--arch/arm/dts/socfpga_agilex5_socdk-u-boot.dtsi77
-rw-r--r--arch/arm/dts/socfpga_agilex5_socdk_emmc-u-boot.dtsi172
-rw-r--r--arch/arm/dts/socfpga_agilex5_socdk_emmc.dts49
-rw-r--r--arch/arm/include/asm/arch-rockchip/sdram.h3
-rw-r--r--arch/arm/mach-rockchip/Kconfig14
-rw-r--r--arch/arm/mach-rockchip/rk3308/Kconfig3
-rw-r--r--arch/arm/mach-rockchip/rk3568/Kconfig3
-rw-r--r--arch/arm/mach-rockchip/rk3588/Kconfig3
-rw-r--r--arch/arm/mach-rockchip/sdram.c15
-rw-r--r--arch/arm/mach-rockchip/spl-boot-order.c14
-rw-r--r--arch/arm/mach-socfpga/board.c11
-rw-r--r--arch/sandbox/config.mk4
-rw-r--r--arch/x86/config.mk6
20 files changed, 375 insertions, 87 deletions
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 50fd77c8497..6951b2ee2bb 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -451,6 +451,7 @@ dtb-$(CONFIG_TARGET_THUNDERX_88XX) += thunderx-88xx.dtb
dtb-$(CONFIG_ARCH_SOCFPGA) += \
socfpga_agilex5_socdk.dtb \
+ socfpga_agilex5_socdk_emmc.dtb \
socfpga_arria5_secu1.dtb \
socfpga_arria5_socdk.dtb \
socfpga_arria10_chameleonv3_270_2.dtb \
diff --git a/arch/arm/dts/rk3588-rock-5b-plus-u-boot.dtsi b/arch/arm/dts/rk3588-rock-5b-plus-u-boot.dtsi
new file mode 100644
index 00000000000..c07696c8391
--- /dev/null
+++ b/arch/arm/dts/rk3588-rock-5b-plus-u-boot.dtsi
@@ -0,0 +1,3 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+#include "rk3588-rock-5b-u-boot.dtsi"
diff --git a/arch/arm/dts/rk3588-rock-5b-u-boot.dtsi b/arch/arm/dts/rk3588-rock-5b-u-boot.dtsi
index d51fbf51cb8..e07b549c767 100644
--- a/arch/arm/dts/rk3588-rock-5b-u-boot.dtsi
+++ b/arch/arm/dts/rk3588-rock-5b-u-boot.dtsi
@@ -46,6 +46,11 @@
};
};
+&saradc {
+ bootph-pre-ram;
+ vdd-microvolts = <1800000>;
+};
+
&sdhci {
cap-mmc-highspeed;
mmc-hs200-1_8v;
diff --git a/arch/arm/dts/rk3588-rock-5t-u-boot.dtsi b/arch/arm/dts/rk3588-rock-5t-u-boot.dtsi
new file mode 100644
index 00000000000..c07696c8391
--- /dev/null
+++ b/arch/arm/dts/rk3588-rock-5t-u-boot.dtsi
@@ -0,0 +1,3 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+#include "rk3588-rock-5b-u-boot.dtsi"
diff --git a/arch/arm/dts/rockchip-u-boot.dtsi b/arch/arm/dts/rockchip-u-boot.dtsi
index cc2feed6464..71d7623fe2c 100644
--- a/arch/arm/dts/rockchip-u-boot.dtsi
+++ b/arch/arm/dts/rockchip-u-boot.dtsi
@@ -226,5 +226,38 @@
};
};
#endif /* CONFIG_ROCKCHIP_SPI_IMAGE */
+
+#ifdef CONFIG_ROCKCHIP_MASKROM_IMAGE
+ simple-bin-usb471 {
+ filename = "u-boot-rockchip-usb471.bin";
+
+#ifdef CONFIG_ROCKCHIP_EXTERNAL_TPL
+ rockchip-tpl {
+ };
+#elif defined(CONFIG_TPL)
+ u-boot-tpl {
+ no-write-symbols;
+ };
+#endif
+ };
+
+ simple-bin-usb472 {
+ filename = "u-boot-rockchip-usb472.bin";
+ pad-byte = <0x00>;
+
+ u-boot-spl {
+ no-write-symbols;
+ };
+
+#ifdef HAS_FIT
+ fit {
+ insert-template = <&fit_template>;
+#else
+ u-boot-img {
+#endif
+ offset = <(CONFIG_SPL_LOAD_FIT_ADDRESS - CFG_SYS_SDRAM_BASE)>;
+ };
+ };
+#endif /* CONFIG_ROCKCHIP_MASKROM_IMAGE */
};
#endif /* CONFIG_SPL */
diff --git a/arch/arm/dts/socfpga_agilex5-u-boot.dtsi b/arch/arm/dts/socfpga_agilex5-u-boot.dtsi
index d51a9e2ff7f..0f0f457de54 100644
--- a/arch/arm/dts/socfpga_agilex5-u-boot.dtsi
+++ b/arch/arm/dts/socfpga_agilex5-u-boot.dtsi
@@ -681,17 +681,6 @@
bootph-all;
};
-&gpio1 {
- /* Configure GPIO 1 pin 3 as output pin with value 0 during GPIO probe */
- portb: gpio-controller@0{
- sdio_sel {
- gpio-hog;
- gpios = <3 GPIO_ACTIVE_HIGH>;
- output-low;
- };
- };
-};
-
&i2c0 {
reset-names = "i2c";
};
@@ -709,7 +698,8 @@
};
&mmc {
- resets = <&rst SDMMC_RESET>, <&rst SDMMC_OCP_RESET>;
+ resets = <&rst COMBOPHY_RESET>, <&rst SDMMC_OCP_RESET>, <&rst SDMMC_RESET>;
+ reset-names = "combophy", "sdmmc-ocp", "sdhc-reset";
};
&porta {
diff --git a/arch/arm/dts/socfpga_agilex5.dtsi b/arch/arm/dts/socfpga_agilex5.dtsi
index 7f4266dd5f1..769678af31a 100644
--- a/arch/arm/dts/socfpga_agilex5.dtsi
+++ b/arch/arm/dts/socfpga_agilex5.dtsi
@@ -303,30 +303,33 @@
status = "disabled";
};
- combophy0: combophy@0 {
- #phy-cells = <0>;
- phy-type = <1>;
- compatible = "cdns,combophy";
- reg = <0x10808000 0x1000>;
- resets = <&rst COMBOPHY_RESET>;
- reset-names = "reset";
- status = "disabled";
+ sd_emmc_power: regulator-fixed-3p3v {
+ compatible = "regulator-fixed";
+ regulator-name = "card-power";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
+
+ sd_io_1v8_reg: regulator-1p8v {
+ compatible = "regulator-gpio";
+ regulator-name = "sd-bus-io-power";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ states = <1800000 0x1>,
+ <3300000 0x0>;
};
mmc: mmc0@10808000 {
#address-cells = <1>;
#size-cells = <0>;
- compatible = "cdns,sd4hc";
+ compatible = "altr,agilex5-sd6hc", "cdns,sd6hc";
reg = <0x10808000 0x1000>;
interrupts = <0 96 4>;
- phys = <&combophy0>;
- phy-names = "combo-phy";
clocks = <&clkmgr AGILEX5_L4_MP_CLK>,
<&clkmgr AGILEX5_SDMMC_CLK>;
clock-names = "biu", "ciu";
fifo-depth = <0x800>;
- resets = <&rst SDMMC_RESET>;
- reset-names = "reset";
iommus = <&smmu 5>;
status = "disabled";
};
diff --git a/arch/arm/dts/socfpga_agilex5_socdk-u-boot.dtsi b/arch/arm/dts/socfpga_agilex5_socdk-u-boot.dtsi
index 938ddb04c04..5a7aa5841e3 100644
--- a/arch/arm/dts/socfpga_agilex5_socdk-u-boot.dtsi
+++ b/arch/arm/dts/socfpga_agilex5_socdk-u-boot.dtsi
@@ -91,53 +91,46 @@
bootph-all;
};
-&mmc {
- status = "okay";
- bus-width = <4>;
- sd-uhs-sdr50;
- cap-mmc-highspeed;
+&gpio1 {
+ portb: gpio-controller@0 {
+ bootph-all;
+ };
+};
+
+&sd_emmc_power {
bootph-all;
};
-&combophy0 {
+&sd_io_1v8_reg {
+ gpios = <&portb 3 GPIO_ACTIVE_HIGH>;
+ bootph-all;
+};
+
+&mmc {
status = "okay";
+
+ no-mmc;
+ no-1-8-v;
+ disable-wp;
+ cap-sd-highspeed;
+ vmmc-supply = <&sd_emmc_power>;
+ vqmmc-supply = <&sd_io_1v8_reg>;
+ max-frequency = <200000000>;
+
+ /* SD card default speed (DS) and UHS-I SDR12 mode timing configuration */
+ cdns,phy-dqs-timing-delay-sd-ds = <0x00780000>;
+ cdns,phy-gate-lpbk_ctrl-delay-sd-ds = <0x81a40040>;
+ cdns,phy-dll-slave-ctrl-sd-ds = <0x00a000fe>;
+ cdns,phy-dq-timing-delay-sd-ds = <0x28000001>;
+
+ /* SD card high speed and UHS-I SDR25 mode timing configuration */
+ cdns,phy-dqs-timing-delay-sd-hs = <0x780001>;
+ cdns,phy-gate-lpbk_ctrl-delay-sd-hs = <0x81a40040>;
+ cdns,phy-dq-timing-delay-sd-hs = <0x10000001>;
+ cdns,ctrl-hrs16-slave-ctrl-sd-hs = <0x101>;
+ cdns,ctrl-hrs07-timing-delay-sd-hs = <0xA0001>;
+
bootph-all;
- cdns,phy-use-ext-lpbk-dqs = <1>;
- cdns,phy-use-lpbk-dqs = <1>;
- cdns,phy-use-phony-dqs = <1>;
- cdns,phy-use-phony-dqs-cmd = <1>;
- cdns,phy-io-mask-always-on = <0>;
- cdns,phy-io-mask-end = <5>;
- cdns,phy-io-mask-start = <0>;
- cdns,phy-data-select-oe-end = <1>;
- cdns,phy-sync-method = <1>;
- cdns,phy-sw-half-cycle-shift = <0>;
- cdns,phy-rd-del-sel = <52>;
- cdns,phy-underrun-suppress = <1>;
- cdns,phy-gate-cfg-always-on = <1>;
- cdns,phy-param-dll-bypass-mode = <1>;
- cdns,phy-param-phase-detect-sel = <2>;
- cdns,phy-param-dll-start-point = <254>;
- cdns,phy-read-dqs-cmd-delay = <0>;
- cdns,phy-clk-wrdqs-delay = <0>;
- cdns,phy-clk-wr-delay = <0>;
- cdns,phy-read-dqs-delay = <0>;
- cdns,phy-phony-dqs-timing = <0>;
- cdns,hrs09-rddata-en = <1>;
- cdns,hrs09-rdcmd-en = <1>;
- cdns,hrs09-extended-wr-mode = <1>;
- cdns,hrs09-extended-rd-mode = <1>;
- cdns,hrs10-hcsdclkadj = <3>;
- cdns,hrs16-wrdata1-sdclk-dly = <0>;
- cdns,hrs16-wrdata0-sdclk-dly = <0>;
- cdns,hrs16-wrcmd1-sdclk-dly = <0>;
- cdns,hrs16-wrcmd0-sdclk-dly = <0>;
- cdns,hrs16-wrdata1-dly = <0>;
- cdns,hrs16-wrdata0-dly = <0>;
- cdns,hrs16-wrcmd1-dly = <0>;
- cdns,hrs16-wrcmd0-dly = <0>;
- cdns,hrs07-rw-compensate = <10>;
- cdns,hrs07-idelay-val = <0>;
};
&qspi {
diff --git a/arch/arm/dts/socfpga_agilex5_socdk_emmc-u-boot.dtsi b/arch/arm/dts/socfpga_agilex5_socdk_emmc-u-boot.dtsi
new file mode 100644
index 00000000000..3c03b00c0d9
--- /dev/null
+++ b/arch/arm/dts/socfpga_agilex5_socdk_emmc-u-boot.dtsi
@@ -0,0 +1,172 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * U-Boot additions for Agilex5 SocDK eMMC
+ *
+ * Copyright (C) 2025 Altera Corporation <www.altera.com>
+ */
+
+#include "socfpga_agilex5-u-boot.dtsi"
+
+/{
+ aliases {
+ spi0 = &qspi;
+ freeze_br0 = &freeze_controller;
+ };
+
+ soc {
+ freeze_controller: freeze_controller@0x20000450 {
+ compatible = "altr,freeze-bridge-controller";
+ reg = <0x20000450 0x00000010>;
+ status = "disabled";
+ };
+ };
+
+ /*
+ * Both Memory base address and size default info is retrieved from HW setting.
+ * Reconfiguration / Overwrite these info can be done with examples below.
+ *
+ * When LPDDR ECC is enabled, the last 1/8 of the memory region must
+ * be reserved for the Inline ECC buffer.
+ *
+ * Example for memory size with 2GB:
+ * memory {
+ * reg = <0x0 0x80000000 0x0 0x80000000>;
+ * };
+ *
+ * Example for memory size with 8GB:
+ * memory {
+ * reg = <0x0 0x80000000 0x0 0x80000000>,
+ * <0x8 0x80000000 0x1 0x80000000>;
+ * };
+ *
+ * Example for memory size with 32GB:
+ * memory {
+ * reg = <0x0 0x80000000 0x0 0x80000000>,
+ * <0x8 0x80000000 0x7 0x80000000>;
+ * };
+ *
+ * Example for memory size with 512GB:
+ * memory {
+ * reg = <0x0 0x80000000 0x0 0x80000000>,
+ * <0x8 0x80000000 0x7 0x80000000>,
+ * <0x88 0x00000000 0x78 0x00000000>;
+ * };
+ *
+ * Example for memory size with 2GB with LPDDR Inline ECC ON:
+ * memory {
+ * reg = <0x0 0x80000000 0x0 0x70000000>;
+ * };
+ *
+ * Example for memory size with 8GB with LPDDR Inline ECC ON:
+ * memory {
+ * reg = <0x0 0x80000000 0x0 0x80000000>,
+ * <0x8 0x80000000 0x1 0x40000000>;
+ * };
+ */
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ u-boot,spl-boot-order = &mmc,&flash0,&nand,"/memory";
+ };
+};
+
+&flash0 {
+ compatible = "jedec,spi-nor";
+ spi-tx-bus-width = <4>;
+ spi-rx-bus-width = <4>;
+ bootph-all;
+ /delete-property/ cdns,read-delay;
+};
+
+&flash1 {
+ bootph-all;
+};
+
+&i3c0 {
+ bootph-all;
+};
+
+&i3c1 {
+ bootph-all;
+};
+
+&gpio1 {
+ portb: gpio-controller@0 {
+ bootph-all;
+ };
+};
+
+&sd_emmc_power {
+ bootph-all;
+};
+
+&emmc_io_1v8_reg {
+ bootph-all;
+};
+
+&mmc {
+ bootph-all;
+};
+
+&qspi {
+ status = "okay";
+};
+
+&nand {
+ status = "disabled";
+ bootph-all;
+};
+
+&timer0 {
+ bootph-all;
+};
+
+&timer1 {
+ bootph-all;
+};
+
+&timer2 {
+ bootph-all;
+};
+
+&timer3 {
+ bootph-all;
+};
+
+&watchdog0 {
+ bootph-all;
+};
+
+&gmac0 {
+ status = "okay";
+ phy-mode = "rgmii";
+ phy-handle = <&emac0_phy0>;
+
+ max-frame-size = <9000>;
+
+ mdio0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "snps,dwxgmac-mdio";
+ emac0_phy0: ethernet-phy@0 {
+ reg = <0>;
+ };
+ };
+};
+
+&gmac2 {
+ status = "okay";
+ phy-mode = "rgmii";
+ phy-handle = <&emac2_phy0>;
+
+ max-frame-size = <9000>;
+
+ mdio0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "snps,dwxgmac-mdio";
+ emac2_phy0: ethernet-phy@0 {
+ reg = <0>;
+ };
+ };
+};
diff --git a/arch/arm/dts/socfpga_agilex5_socdk_emmc.dts b/arch/arm/dts/socfpga_agilex5_socdk_emmc.dts
new file mode 100644
index 00000000000..f6848c373cd
--- /dev/null
+++ b/arch/arm/dts/socfpga_agilex5_socdk_emmc.dts
@@ -0,0 +1,49 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2025 Altera Corporation <www.altera.com>
+ */
+
+#include "socfpga_agilex5_socdk.dts"
+
+/ {
+ soc {
+ emmc_io_1v8_reg: regulator-fixed-1p8v {
+ compatible = "regulator-fixed";
+ regulator-name = "emmc-io-power";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ };
+ };
+};
+
+&mmc {
+ status = "okay";
+
+ no-sd;
+ no-sdio;
+ disable-wp;
+ non-removable;
+ cap-mmc-highspeed;
+
+ bus-width = <8>;
+ vmmc-supply = <&sd_emmc_power>;
+ vqmmc-supply = <&emmc_io_1v8_reg>;
+ max-frequency = <200000000>;
+
+ /* eMMC legacy mode timing configuration */
+ cdns,phy-dqs-timing-delay-sd-ds = <0x00780000>;
+ cdns,phy-gate-lpbk-ctrl-delay-sd-ds = <0x81a40040>;
+ cdns,phy-dll-slave-ctrl-sd-ds = <0x00a000fe>;
+ cdns,phy-dq-timing-delay-sd-ds = <0x28000001>;
+
+ /* eMMC SDR mode timing configuration */
+ cdns,phy-dqs-timing-delay-emmc-sdr = <0x780001>;
+ cdns,phy-gate-lpbk-ctrl-delay-emmc-sdr = <0x81a40040>;
+ cdns,phy-dll-slave-ctrl-emmc-sdr = <0x00000000>;
+ cdns,phy-dq-timing-delay-emmc-sdr = <0x10000001>;
+ cdns,ctrl-hrs09-timing-delay-emmc-sdr = <0x1800c>;
+ cdns,ctrl-hrs10-lpbk-ctrl-delay-emmc-sdr = <0x30000>;
+ cdns,ctrl-hrs16-slave-ctrl-emmc-sdr = <0x101>;
+ cdns,ctrl-hrs07-timing-delay-emmc-sdr = <0xA0001>;
+};
diff --git a/arch/arm/include/asm/arch-rockchip/sdram.h b/arch/arm/include/asm/arch-rockchip/sdram.h
index 4fb45ac5c76..476fc1c4ee3 100644
--- a/arch/arm/include/asm/arch-rockchip/sdram.h
+++ b/arch/arm/include/asm/arch-rockchip/sdram.h
@@ -87,6 +87,9 @@ enum {
#define SYS_REG_CS1_COL_SHIFT(ch) (0 + (ch) * 2)
#define SYS_REG_CS1_COL_MASK 3
+/* Get sdram type decode from reg */
+u8 rockchip_sdram_type(phys_addr_t reg);
+
/* Get sdram size decode from reg */
size_t rockchip_sdram_size(phys_addr_t reg);
diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig
index f78eaf52c2a..92bb4aa62f1 100644
--- a/arch/arm/mach-rockchip/Kconfig
+++ b/arch/arm/mach-rockchip/Kconfig
@@ -705,6 +705,14 @@ config ROCKCHIP_SPI_IMAGE
option to produce a SPI-flash image containing U-Boot. The image
is built by binman. U-Boot sits near the start of the image.
+config ROCKCHIP_MASKROM_IMAGE
+ bool "Build a maskrom mode image for Rockchip"
+ depends on TPL || ROCKCHIP_EXTERNAL_TPL
+ select SPL_RAM_DEVICE
+ help
+ Rockchip SoCs support maskrom mode boot over USB. Enable this
+ option to produce maskrom mode boot images containing U-Boot.
+
config LNX_KRNL_IMG_TEXT_OFFSET_BASE
default TEXT_BASE
@@ -767,9 +775,9 @@ config TPL_SYS_MALLOC_F_LEN
default 0x4000 if CUSTOM_SYS_INIT_SP_ADDR = 0x03f00000
config TEXT_BASE
- default 0x60200000 if SPL_TEXT_BASE = 0x60000000
- default 0x40200000 if SPL_TEXT_BASE = 0x40000000
- default 0x00200000 if SPL_TEXT_BASE = 0x00000000
+ default 0x60800000 if SPL_TEXT_BASE = 0x60000000
+ default 0x40800000 if SPL_TEXT_BASE = 0x40000000
+ default 0x00800000 if SPL_TEXT_BASE = 0x00000000
config SPL_TEXT_BASE
default 0x60000000 if ROCKCHIP_RK3036 || ROCKCHIP_RK3066 || \
diff --git a/arch/arm/mach-rockchip/rk3308/Kconfig b/arch/arm/mach-rockchip/rk3308/Kconfig
index 06572d545f6..b8d25c52542 100644
--- a/arch/arm/mach-rockchip/rk3308/Kconfig
+++ b/arch/arm/mach-rockchip/rk3308/Kconfig
@@ -17,9 +17,6 @@ config ROCKCHIP_STIMER_BASE
config SYS_SOC
default "rk3308"
-config TEXT_BASE
- default 0x00600000
-
source "board/rockchip/evb_rk3308/Kconfig"
source "board/firefly/firefly-rk3308/Kconfig"
diff --git a/arch/arm/mach-rockchip/rk3568/Kconfig b/arch/arm/mach-rockchip/rk3568/Kconfig
index 01b53a47ddb..2730220a18e 100644
--- a/arch/arm/mach-rockchip/rk3568/Kconfig
+++ b/arch/arm/mach-rockchip/rk3568/Kconfig
@@ -70,9 +70,6 @@ config ROCKCHIP_STIMER_BASE
config SYS_SOC
default "rk3568"
-config TEXT_BASE
- default 0x00a00000
-
source "board/rockchip/evb_rk3568/Kconfig"
source "board/anbernic/rgxx3_rk3566/Kconfig"
source "board/hardkernel/odroid_m1/Kconfig"
diff --git a/arch/arm/mach-rockchip/rk3588/Kconfig b/arch/arm/mach-rockchip/rk3588/Kconfig
index 9fbe3f225aa..60c16d2f32d 100644
--- a/arch/arm/mach-rockchip/rk3588/Kconfig
+++ b/arch/arm/mach-rockchip/rk3588/Kconfig
@@ -417,9 +417,6 @@ config ROCKCHIP_STIMER_BASE
config SYS_SOC
default "rk3588"
-config TEXT_BASE
- default 0x00a00000
-
source "board/armsom/sige7-rk3588/Kconfig"
source "board/coolpi/genbook_cm5_rk3588/Kconfig"
source "board/edgeble/neural-compute-module-6/Kconfig"
diff --git a/arch/arm/mach-rockchip/sdram.c b/arch/arm/mach-rockchip/sdram.c
index 3bc482331c7..d560f90e873 100644
--- a/arch/arm/mach-rockchip/sdram.c
+++ b/arch/arm/mach-rockchip/sdram.c
@@ -345,6 +345,21 @@ int dram_init_banksize(void)
return 0;
}
+u8 rockchip_sdram_type(phys_addr_t reg)
+{
+ u32 dram_type, version;
+ u32 sys_reg2 = readl(reg);
+ u32 sys_reg3 = readl(reg + 4);
+
+ dram_type = (sys_reg2 >> SYS_REG_DDRTYPE_SHIFT) & SYS_REG_DDRTYPE_MASK;
+ version = (sys_reg3 >> SYS_REG_VERSION_SHIFT) & SYS_REG_VERSION_MASK;
+ if (version >= 3)
+ dram_type |= ((sys_reg3 >> SYS_REG_EXTEND_DDRTYPE_SHIFT) &
+ SYS_REG_EXTEND_DDRTYPE_MASK) << 3;
+
+ return dram_type;
+}
+
size_t rockchip_sdram_size(phys_addr_t reg)
{
u32 rank, cs0_col, bk, cs0_row, cs1_row, bw, row_3_4;
diff --git a/arch/arm/mach-rockchip/spl-boot-order.c b/arch/arm/mach-rockchip/spl-boot-order.c
index 1ea1033b5ea..6572dde29f6 100644
--- a/arch/arm/mach-rockchip/spl-boot-order.c
+++ b/arch/arm/mach-rockchip/spl-boot-order.c
@@ -8,6 +8,7 @@
#include <log.h>
#include <mmc.h>
#include <spl.h>
+#include <asm/arch-rockchip/bootrom.h>
#include <asm/global_data.h>
#include <dm/uclass-internal.h>
@@ -98,15 +99,22 @@ __weak const char *board_spl_was_booted_from(void)
void board_boot_order(u32 *spl_boot_list)
{
+ int idx = 0;
+
+ /* Add RAM boot for maskrom mode boot over USB */
+ if (BROM_BOOTSOURCE_ID_ADDR && CONFIG_IS_ENABLED(RAM_DEVICE) &&
+ read_brom_bootsource_id() == BROM_BOOTSOURCE_USB) {
+ spl_boot_list[idx++] = BOOT_DEVICE_RAM;
+ }
+
/* In case of no fdt (or only plat), use spl_boot_device() */
if (!CONFIG_IS_ENABLED(OF_CONTROL) || CONFIG_IS_ENABLED(OF_PLATDATA)) {
- spl_boot_list[0] = spl_boot_device();
+ spl_boot_list[idx++] = spl_boot_device();
return;
}
const void *blob = gd->fdt_blob;
int chosen_node = fdt_path_offset(blob, "/chosen");
- int idx = 0;
int elem;
int boot_device;
int node;
@@ -115,7 +123,7 @@ void board_boot_order(u32 *spl_boot_list)
if (chosen_node < 0) {
debug("%s: /chosen not found, using spl_boot_device()\n",
__func__);
- spl_boot_list[0] = spl_boot_device();
+ spl_boot_list[idx++] = spl_boot_device();
return;
}
diff --git a/arch/arm/mach-socfpga/board.c b/arch/arm/mach-socfpga/board.c
index 28554b7a109..7f65aed4540 100644
--- a/arch/arm/mach-socfpga/board.c
+++ b/arch/arm/mach-socfpga/board.c
@@ -14,6 +14,7 @@
#include <hang.h>
#include <handoff.h>
#include <image.h>
+#include <spl.h>
#include <usb.h>
#include <usb/dwc2_udc.h>
#include <asm/global_data.h>
@@ -209,3 +210,13 @@ void lmb_arch_add_memory(void)
}
}
#endif
+
+#if (defined(CONFIG_TARGET_SOCFPGA_ARRIA10) || \
+ defined(CONFIG_TARGET_SOCFPGA_GEN5)) && defined(CONFIG_XPL_BUILD)
+unsigned long board_spl_mmc_get_uboot_raw_sector(struct mmc *mmc,
+ unsigned long raw_sect)
+{
+ /* offset of u-boot proper inside u-boot-with-spl.sfp image */
+ return (CONFIG_SPL_PAD_TO * 4) / 512 + raw_sect;
+}
+#endif
diff --git a/arch/sandbox/config.mk b/arch/sandbox/config.mk
index 9a61e803a57..275661a1f3a 100644
--- a/arch/sandbox/config.mk
+++ b/arch/sandbox/config.mk
@@ -50,10 +50,10 @@ cmd_u-boot-spl = (cd $(obj) && \
ifeq ($(HOST_ARCH),$(HOST_ARCH_X86_64))
EFI_LDS := ${SRCDIR}/../../../arch/x86/lib/elf_x86_64_efi.lds
-EFI_TARGET := --target=efi-app-x86_64
+EFI_TARGET := --output-target=efi-app-x86_64
else ifeq ($(HOST_ARCH),$(HOST_ARCH_X86))
EFI_LDS := ${SRCDIR}/../../../arch/x86/lib/elf_ia32_efi.lds
-EFI_TARGET := --target=efi-app-ia32
+EFI_TARGET := --output-target=efi-app-ia32
else ifeq ($(HOST_ARCH),$(HOST_ARCH_AARCH64))
EFI_LDS := ${SRCDIR}/../../../arch/arm/lib/elf_aarch64_efi.lds
OBJCOPYFLAGS += -j .text -j .secure_text -j .secure_data -j .rodata -j .data \
diff --git a/arch/x86/config.mk b/arch/x86/config.mk
index 6d4839dfb38..c2bb5549b7c 100644
--- a/arch/x86/config.mk
+++ b/arch/x86/config.mk
@@ -69,7 +69,7 @@ endif
LDSCRIPT_EFI := $(srctree)/arch/x86/lib/elf_$(EFIARCH)_efi.lds
EFISTUB := crt0_$(EFIARCH)_efi.o reloc_$(EFIARCH)_efi.o
-OBJCOPYFLAGS_EFI += --target=efi-app-$(EFIARCH)
+OBJCOPYFLAGS_EFI += --output-target=efi-app-$(EFIARCH)
CPPFLAGS_REMOVE_crt0-efi-$(EFIARCH).o += $(CFLAGS_NON_EFI)
CPPFLAGS_crt0-efi-$(EFIARCH).o += $(CFLAGS_EFI)
@@ -127,7 +127,7 @@ endif
endif
ifdef CONFIG_X86_64
-EFI_TARGET := --target=efi-app-x86_64
+EFI_TARGET := --output-target=efi-app-x86_64
else
-EFI_TARGET := --target=efi-app-ia32
+EFI_TARGET := --output-target=efi-app-ia32
endif