aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorTom Rini2019-07-11 18:09:38 -0400
committerTom Rini2019-07-11 18:09:38 -0400
commit68deea2308141c26707da44654b273d7b072ab0d (patch)
tree1af260ebb9b053457bd6bf388510fa0475c3be16 /arch
parent79b8d3c285f4f1c2ee4b27367f2ca3ecb76ed9ce (diff)
parentcc66ebdeeca5c4ed095bbd521b748bb009d99728 (diff)
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell
- SPL SATA enhancements to allow booting from RAW SATA device needed for Clearfog (Baruch) - Enable SATA booting on Clearfog (Baruch) - Misc changes to Turris Omnia (Marek) - Enable CMD_BOOTZ and increase SYS_BOOTM_LEN on crs305-1g-4s (Luka) - Enable FIT support for db-xc3-24g4xg (Chris) - Enable DM_SPI on Keymile Kirkwood board with necessary changes for this (Pascal) - Set 38x and 39x AVS on lower frequency (Baruch)
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/dts/armada-388-clearfog-u-boot.dtsi8
-rw-r--r--arch/arm/dts/kirkwood-km_kirkwood.dts22
-rw-r--r--arch/arm/include/asm/arch-mvebu/spi.h11
-rw-r--r--arch/arm/mach-kirkwood/Kconfig9
-rw-r--r--arch/arm/mach-mvebu/Kconfig5
-rw-r--r--arch/arm/mach-mvebu/Makefile3
-rw-r--r--arch/arm/mach-mvebu/cpu.c4
-rw-r--r--arch/arm/mach-mvebu/include/mach/cpu.h7
-rw-r--r--arch/arm/mach-mvebu/include/mach/soc.h2
-rw-r--r--arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.c26
-rw-r--r--arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.h4
-rw-r--r--arch/arm/mach-mvebu/spl.c8
-rw-r--r--arch/powerpc/cpu/mpc83xx/Kconfig44
-rw-r--r--arch/powerpc/cpu/mpc85xx/Kconfig8
14 files changed, 105 insertions, 56 deletions
diff --git a/arch/arm/dts/armada-388-clearfog-u-boot.dtsi b/arch/arm/dts/armada-388-clearfog-u-boot.dtsi
index a12694e1710..cf6c08881b1 100644
--- a/arch/arm/dts/armada-388-clearfog-u-boot.dtsi
+++ b/arch/arm/dts/armada-388-clearfog-u-boot.dtsi
@@ -11,3 +11,11 @@
&sdhci {
u-boot,dm-spl;
};
+
+&ahci0 {
+ u-boot,dm-spl;
+};
+
+&ahci1 {
+ u-boot,dm-spl;
+};
diff --git a/arch/arm/dts/kirkwood-km_kirkwood.dts b/arch/arm/dts/kirkwood-km_kirkwood.dts
index f035eff1c11..b2c0209f5db 100644
--- a/arch/arm/dts/kirkwood-km_kirkwood.dts
+++ b/arch/arm/dts/kirkwood-km_kirkwood.dts
@@ -13,6 +13,10 @@
device_type = "memory";
reg = <0x00000000 0x08000000>;
};
+
+ aliases {
+ spi0 = &spi0;
+ };
};
&mdio {
@@ -29,3 +33,21 @@
phy-handle = <&ethphy0>;
};
};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "st,m25p80", "jedec,spi-nor", "spi-flash";
+ reg = <0>;
+ spi-max-frequency = <33000000>;
+ mode = <3>;
+
+ partition@uboot {
+ reg = <0x000000 0x0c0000>;
+ label = "uboot";
+ };
+ };
+};
diff --git a/arch/arm/include/asm/arch-mvebu/spi.h b/arch/arm/include/asm/arch-mvebu/spi.h
index d6f6d1ac574..58b6c32c4d8 100644
--- a/arch/arm/include/asm/arch-mvebu/spi.h
+++ b/arch/arm/include/asm/arch-mvebu/spi.h
@@ -23,17 +23,6 @@ struct kwspi_registers {
u32 dw_cfg; /* 0x10620 - Direct Write Configuration */
};
-/* They are used to define CONFIG_SYS_KW_SPI_MPP
- * each of the below #defines selects which mpp is
- * configured for each SPI signal in spi_claim_bus
- * bit 0: selects pin for MOSI (MPP1 if 0, MPP6 if 1)
- * bit 1: selects pin for SCK (MPP2 if 0, MPP10 if 1)
- * bit 2: selects pin for MISO (MPP3 if 0, MPP11 if 1)
- */
-#define MOSI_MPP6 (1 << 0)
-#define SCK_MPP10 (1 << 1)
-#define MISO_MPP11 (1 << 2)
-
/* Control Register */
#define KWSPI_CSN_ACT (1 << 0) /* Activates serial memory interface */
#define KWSPI_SMEMRDY (1 << 1) /* SerMem Data xfer ready */
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index 7c4170399af..2f68092f825 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -32,11 +32,8 @@ config TARGET_ICONNECT
bool "iconnect Board"
config TARGET_KM_KIRKWOOD
- bool "KM_KIRKWOOD Board"
- select BOARD_LATE_INIT
- imply CMD_CRAMFS
- imply CMD_DIAG
- imply FS_CRAMFS
+ bool "KM Kirkwood Board"
+ select VENDOR_KM
config TARGET_NET2BIG_V2
bool "LaCie 2Big Network v2 NAS Board"
@@ -82,7 +79,7 @@ source "board/buffalo/lsxl/Kconfig"
source "board/cloudengines/pogo_e02/Kconfig"
source "board/d-link/dns325/Kconfig"
source "board/iomega/iconnect/Kconfig"
-source "board/keymile/km_arm/Kconfig"
+source "board/keymile/Kconfig"
source "board/LaCie/net2big_v2/Kconfig"
source "board/LaCie/netspace_v2/Kconfig"
source "board/raidsonic/ib62x0/Kconfig"
diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
index 495c48e6c74..fdd39685b75 100644
--- a/arch/arm/mach-mvebu/Kconfig
+++ b/arch/arm/mach-mvebu/Kconfig
@@ -239,6 +239,11 @@ config MVEBU_SPL_BOOT_DEVICE_MMC
bool "SDIO/MMC card"
select SPL_LIBDISK_SUPPORT
+config MVEBU_SPL_BOOT_DEVICE_SATA
+ bool "SATA"
+ select SPL_SATA_SUPPORT
+ select SPL_LIBDISK_SUPPORT
+
config MVEBU_SPL_BOOT_DEVICE_UART
bool "UART"
diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile
index 02d3ce27ee7..8228a17972f 100644
--- a/arch/arm/mach-mvebu/Makefile
+++ b/arch/arm/mach-mvebu/Makefile
@@ -37,6 +37,9 @@ endif
ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC),)
KWB_CFG_BOOT_FROM=sdio
endif
+ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_SATA),)
+ KWB_CFG_BOOT_FROM=sata
+endif
ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_UART),)
KWB_CFG_BOOT_FROM=uart
endif
diff --git a/arch/arm/mach-mvebu/cpu.c b/arch/arm/mach-mvebu/cpu.c
index f09e7b10e93..f4b7a4fa801 100644
--- a/arch/arm/mach-mvebu/cpu.c
+++ b/arch/arm/mach-mvebu/cpu.c
@@ -542,6 +542,10 @@ static void ahci_mvebu_mbus_config(void __iomem *base)
const struct mbus_dram_target_info *dram;
int i;
+ /* mbus is not initialized in SPL; keep the ROM settings */
+ if (IS_ENABLED(CONFIG_SPL_BUILD))
+ return;
+
dram = mvebu_mbus_dram_info();
for (i = 0; i < 4; i++) {
diff --git a/arch/arm/mach-mvebu/include/mach/cpu.h b/arch/arm/mach-mvebu/include/mach/cpu.h
index e6140d67293..2e2d72aac89 100644
--- a/arch/arm/mach-mvebu/include/mach/cpu.h
+++ b/arch/arm/mach-mvebu/include/mach/cpu.h
@@ -163,6 +163,13 @@ int serdes_phy_config(void);
*/
int ddr3_init(void);
+/* Auto Voltage Scaling */
+#if defined(CONFIG_ARMADA_38X) || defined(CONFIG_ARMADA_39X)
+void mv_avs_init(void);
+#else
+static inline void mv_avs_init(void) {}
+#endif
+
/*
* get_ref_clk
*
diff --git a/arch/arm/mach-mvebu/include/mach/soc.h b/arch/arm/mach-mvebu/include/mach/soc.h
index f666ee24243..acb9257c90f 100644
--- a/arch/arm/mach-mvebu/include/mach/soc.h
+++ b/arch/arm/mach-mvebu/include/mach/soc.h
@@ -159,7 +159,9 @@
#define BOOT_DEV_SEL_MASK (0x3f << BOOT_DEV_SEL_OFFS)
#define BOOT_FROM_NAND 0x0A
+#define BOOT_FROM_SATA 0x22
#define BOOT_FROM_UART 0x28
+#define BOOT_FROM_SATA_ALT 0x2A
#define BOOT_FROM_UART_ALT 0x3f
#define BOOT_FROM_SPI 0x32
#define BOOT_FROM_MMC 0x30
diff --git a/arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.c b/arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.c
index d387893af37..e9dd096ad0f 100644
--- a/arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.c
+++ b/arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.c
@@ -256,3 +256,29 @@ u8 sys_env_device_rev_get(void)
value = reg_read(DEV_VERSION_ID_REG);
return (value & (REVISON_ID_MASK)) >> REVISON_ID_OFFS;
}
+
+void mv_avs_init(void)
+{
+ u32 sar_freq;
+
+ if (!(IS_ENABLED(CONFIG_ARMADA_38X) || IS_ENABLED(CONFIG_ARMADA_39X)))
+ return;
+
+ reg_write(AVS_DEBUG_CNTR_REG, AVS_DEBUG_CNTR_DEFAULT_VALUE);
+ reg_write(AVS_DEBUG_CNTR_REG, AVS_DEBUG_CNTR_DEFAULT_VALUE);
+
+ sar_freq = reg_read(DEVICE_SAMPLE_AT_RESET1_REG);
+ sar_freq = sar_freq >> SAR_FREQ_OFFSET & SAR_FREQ_MASK;
+
+ /* Set AVS value only for core frequency of 1600MHz or less.
+ * For higher frequency leave the default value.
+ */
+ if (sar_freq <= 0xd) {
+ u32 avs_reg_data = reg_read(AVS_ENABLED_CONTROL);
+
+ avs_reg_data &= ~(AVS_LOW_VDD_LIMIT_MASK
+ | AVS_HIGH_VDD_LIMIT_MASK);
+ avs_reg_data |= AVS_LOW_VDD_SLOW_VAL | AVS_HIGH_VDD_SLOW_VAL;
+ reg_write(AVS_ENABLED_CONTROL, avs_reg_data);
+ }
+}
diff --git a/arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.h b/arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.h
index 365332d2b04..1774a5b780c 100644
--- a/arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.h
+++ b/arch/arm/mach-mvebu/serdes/a38x/sys_env_lib.h
@@ -33,6 +33,8 @@
#define DEV_ID_REG_DEVICE_ID_OFFS 16
#define DEV_ID_REG_DEVICE_ID_MASK 0xffff0000
+#define SAR_FREQ_OFFSET 10
+#define SAR_FREQ_MASK 0x1f
#define SAR_DEV_ID_OFFS 27
#define SAR_DEV_ID_MASK 0x7
@@ -155,10 +157,12 @@
#define AVS_LOW_VDD_LIMIT_OFFS 4
#define AVS_LOW_VDD_LIMIT_MASK (0xff << AVS_LOW_VDD_LIMIT_OFFS)
#define AVS_LOW_VDD_LIMIT_VAL (0x27 << AVS_LOW_VDD_LIMIT_OFFS)
+#define AVS_LOW_VDD_SLOW_VAL (0x23 << AVS_LOW_VDD_LIMIT_OFFS)
#define AVS_HIGH_VDD_LIMIT_OFFS 12
#define AVS_HIGH_VDD_LIMIT_MASK (0xff << AVS_HIGH_VDD_LIMIT_OFFS)
#define AVS_HIGH_VDD_LIMIT_VAL (0x27 << AVS_HIGH_VDD_LIMIT_OFFS)
+#define AVS_HIGH_VDD_SLOW_VAL (0x23 << AVS_HIGH_VDD_LIMIT_OFFS)
/* Board ID numbers */
#define MARVELL_BOARD_ID_MASK 0x10
diff --git a/arch/arm/mach-mvebu/spl.c b/arch/arm/mach-mvebu/spl.c
index 530b98c1aa3..3cb27b7f4b2 100644
--- a/arch/arm/mach-mvebu/spl.c
+++ b/arch/arm/mach-mvebu/spl.c
@@ -59,6 +59,11 @@ static u32 get_boot_device(void)
case BOOT_FROM_UART_ALT:
#endif
return BOOT_DEVICE_UART;
+#ifdef BOOT_FROM_SATA
+ case BOOT_FROM_SATA:
+ case BOOT_FROM_SATA_ALT:
+ return BOOT_DEVICE_SATA;
+#endif
case BOOT_FROM_SPI:
default:
return BOOT_DEVICE_SPI;
@@ -121,6 +126,9 @@ void board_init_f(ulong dummy)
ddr3_init();
#endif
+ /* Initialize Auto Voltage Scaling */
+ mv_avs_init();
+
/*
* Return to the BootROM to continue the Marvell xmodem
* UART boot protocol. As initiated by the kwboot tool.
diff --git a/arch/powerpc/cpu/mpc83xx/Kconfig b/arch/powerpc/cpu/mpc83xx/Kconfig
index b99288aa836..3f68b6f6456 100644
--- a/arch/powerpc/cpu/mpc83xx/Kconfig
+++ b/arch/powerpc/cpu/mpc83xx/Kconfig
@@ -100,65 +100,43 @@ config TARGET_IDS8313
config TARGET_KMETER1
bool "Support kmeter1"
- select ARCH_MPC8360
- imply CMD_CRAMFS
- imply CMD_DIAG
- imply FS_CRAMFS
+ select VENDOR_KM
config TARGET_KMCOGE5NE
bool "Support kmcoge5ne"
- select ARCH_MPC8360
- imply CMD_CRAMFS
- imply CMD_DIAG
- imply FS_CRAMFS
+ select VENDOR_KM
config TARGET_SUVD3
bool "Support suvd3"
- select ARCH_MPC832X
- imply CMD_CRAMFS
- imply FS_CRAMFS
+ select VENDOR_KM
config TARGET_KMVECT1
bool "Support kmvect1"
- select ARCH_MPC8309
- imply CMD_CRAMFS
- imply FS_CRAMFS
+ select VENDOR_KM
config TARGET_KMTEGR1
bool "Support kmtegr1"
- select ARCH_MPC8309
- imply CMD_CRAMFS
- imply FS_CRAMFS
+ select VENDOR_KM
config TARGET_TUXX1
bool "Support tuxx1"
- select ARCH_MPC832X
- imply CMD_CRAMFS
- imply FS_CRAMFS
+ select VENDOR_KM
config TARGET_KMSUPX5
bool "Support kmsupx5"
- select ARCH_MPC832X
- imply CMD_CRAMFS
- imply FS_CRAMFS
+ select VENDOR_KM
config TARGET_TUGE1
bool "Support tuge1"
- select ARCH_MPC832X
- imply CMD_CRAMFS
- imply FS_CRAMFS
+ select VENDOR_KM
config TARGET_KMOPTI2
bool "Support kmopti2"
- select ARCH_MPC832X
- imply CMD_CRAMFS
- imply FS_CRAMFS
+ select VENDOR_KM
config TARGET_KMTEPR2
bool "Support kmtepr2"
- select ARCH_MPC832X
- imply CMD_CRAMFS
- imply FS_CRAMFS
+ select VENDOR_KM
config TARGET_TQM834X
bool "Support TQM834x"
@@ -354,7 +332,7 @@ source "board/freescale/mpc8349itx/Kconfig"
source "board/freescale/mpc837xemds/Kconfig"
source "board/freescale/mpc837xerdb/Kconfig"
source "board/ids/ids8313/Kconfig"
-source "board/keymile/km83xx/Kconfig"
+source "board/keymile/Kconfig"
source "board/mpc8308_p1m/Kconfig"
source "board/sbc8349/Kconfig"
source "board/tqc/tqm834x/Kconfig"
diff --git a/arch/powerpc/cpu/mpc85xx/Kconfig b/arch/powerpc/cpu/mpc85xx/Kconfig
index 7572404625f..c038a6ddb0f 100644
--- a/arch/powerpc/cpu/mpc85xx/Kconfig
+++ b/arch/powerpc/cpu/mpc85xx/Kconfig
@@ -412,11 +412,7 @@ config TARGET_CONTROLCENTERD
config TARGET_KMP204X
bool "Support kmp204x"
- select ARCH_P2041
- select PHYS_64BIT
- select FSL_DDR_INTERACTIVE
- imply CMD_CRAMFS
- imply FS_CRAMFS
+ select VENDOR_KM
config TARGET_XPEDITE520X
bool "Support xpedite520x"
@@ -1620,7 +1616,7 @@ source "board/freescale/t208xrdb/Kconfig"
source "board/freescale/t4qds/Kconfig"
source "board/freescale/t4rdb/Kconfig"
source "board/gdsys/p1022/Kconfig"
-source "board/keymile/kmp204x/Kconfig"
+source "board/keymile/Kconfig"
source "board/sbc8548/Kconfig"
source "board/socrates/Kconfig"
source "board/varisys/cyrus/Kconfig"