Skip to contentSkip to conversation

ARM: at91: Add the chip ID for SAMA5D2 LPDDR2 SiP

PATCH New Eugen.Hristev at microchip.com 1 participant 8 messages Aug 8, 2019 – Aug 26, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/7 ARM: at91: Add the chip ID for SAMA5D2 LPDDR2 SiP

From: Nicolas Ferre <[email protected]>

The SAMA5D2 LPDDR2 SiP (System in Package) is added for SoC identification.

---
 arch/arm/mach-at91/armv7/sama5d2_devices.c | 8 ++++++++
 arch/arm/mach-at91/include/mach/sama5d2.h  | 4 ++++
 2 files changed, 12 insertions(+)
arch/arm/mach-at91/armv7/sama5d2_devices.c +8 -0
index 59a0c44..9e9d026 100644
@@ -57,8 +57,16 @@ char *get_cpu_name(void)
 			return "SAMA5D27 512M bits DDR2 SDRAM";
 		case ARCH_EXID_SAMA5D27C_D1G:
 			return "SAMA5D27 1G bits DDR2 SDRAM";
+		case ARCH_EXID_SAMA5D27C_LD1G:
+			return "SAMA5D27 1G bits LPDDR2 SDRAM";
+		case ARCH_EXID_SAMA5D27C_LD2G:
+			return "SAMA5D27 2G bits LPDDR2 SDRAM";
 		case ARCH_EXID_SAMA5D28C_D1G:
 			return "SAMA5D28 1G bits DDR2 SDRAM";
+		case ARCH_EXID_SAMA5D28C_LD1G:
+			return "SAMA5D28 1G bits LPDDR2 SDRAM";
+		case ARCH_EXID_SAMA5D28C_LD2G:
+			return "SAMA5D28 2G bits LPDDR2 SDRAM";
 		}
 	}
 
arch/arm/mach-at91/include/mach/sama5d2.h +4 -0
index c7d9bb5..d1b2e01 100644
@@ -220,7 +220,11 @@
 #define ARCH_EXID_SAMA5D225C_D1M	0x00000053
 #define ARCH_EXID_SAMA5D27C_D5M		0x00000032
 #define ARCH_EXID_SAMA5D27C_D1G		0x00000033
+#define ARCH_EXID_SAMA5D27C_LD1G	0x00000061
+#define ARCH_EXID_SAMA5D27C_LD2G	0x00000062
 #define ARCH_EXID_SAMA5D28C_D1G		0x00000013
+#define ARCH_EXID_SAMA5D28C_LD1G	0x00000071
+#define ARCH_EXID_SAMA5D28C_LD2G	0x00000072
 
 /* Checked if defined in ethernet driver macb */
 #define cpu_is_sama5d2	_cpu_is_sama5d2
Signature · 1 line
2.7.4
#2 lore raw

PATCH 2/7 board: atmel: add sama5d27_wlsom1_ek board

In reply to Eugen.Hristev at microchip.com

From: Nicolas Ferre <[email protected]>

Add support for the SAMA5D27-WLSOM1-EK. It's based on the Microchip WireLess SoM which contains the SAMa5D27 LPDDR2 2Gbits SiP.

[eugen.hristev at microchip.com]: added u-boot specific dtsi and ported to 2019.10

---
 arch/arm/dts/Makefile                              |  3 +
 arch/arm/dts/at91-sama5d27_wlsom1_ek-u-boot.dtsi   | 38 ++++++++++
 arch/arm/dts/at91-sama5d27_wlsom1_ek.dts           | 84 ++++++++++++++++++++++
 arch/arm/dts/sama5d27_wlsom1.dtsi                  | 56 +++++++++++++++
 arch/arm/mach-at91/Kconfig                         | 15 ++++
 board/atmel/sama5d27_wlsom1_ek/Kconfig             | 15 ++++
 board/atmel/sama5d27_wlsom1_ek/MAINTAINERS         |  7 ++
 board/atmel/sama5d27_wlsom1_ek/Makefile            |  7 ++
 .../atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c  | 80 +++++++++++++++++++++
 configs/sama5d27_wlsom1_ek_mmc_defconfig           | 72 +++++++++++++++++++
 include/configs/sama5d27_wlsom1_ek.h               | 34 +++++++++
 11 files changed, 411 insertions(+)
 create mode 100644 arch/arm/dts/at91-sama5d27_wlsom1_ek-u-boot.dtsi
 create mode 100644 arch/arm/dts/at91-sama5d27_wlsom1_ek.dts
 create mode 100644 arch/arm/dts/sama5d27_wlsom1.dtsi
 create mode 040000 board/atmel/sama5d27_wlsom1_ek
 create mode 100644 board/atmel/sama5d27_wlsom1_ek/Kconfig
 create mode 100644 board/atmel/sama5d27_wlsom1_ek/MAINTAINERS
 create mode 100644 board/atmel/sama5d27_wlsom1_ek/Makefile
 create mode 100644 board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c
 create mode 100644 configs/sama5d27_wlsom1_ek_mmc_defconfig
 create mode 100644 include/configs/sama5d27_wlsom1_ek.h
arch/arm/dts/Makefile +3 -0
index b437f75..6ab2366 100644
@@ -717,6 +717,9 @@ dtb-$(CONFIG_TARGET_SAMA5D2_XPLAINED) += \
 dtb-$(CONFIG_TARGET_SAMA5D27_SOM1_EK) += \
 	at91-sama5d27_som1_ek.dtb
 
+dtb-$(CONFIG_TARGET_SAMA5D27_WLSOM1_EK) += \
+	at91-sama5d27_wlsom1_ek.dtb
+
 dtb-$(CONFIG_TARGET_SAMA5D2_ICP) += \
 	at91-sama5d2_icp.dtb
 
arch/arm/dts/at91-sama5d27_wlsom1_ek-u-boot.dtsi new file +38 -0
new file mode 100644
index 0000000..48ab217
@@ -0,0 +1,38 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * at91-sama5d27_wlsom1_ek-u-boot.dts - Device Tree file for SAMA5D27 WLSOM1 EK
+ *
+ * Copyright (C) 2019 Microchip Technology Inc. and its subsidiaries
+ *
+ * Author: Eugen Hristev <[email protected]>
+ */
+
+/ {
+	chosen {
+		u-boot,dm-pre-reloc;
+	};
+};
+
+&sdmmc0 {
+	u-boot,dm-pre-reloc;
+};
+
+&uart0 {
+	u-boot,dm-pre-reloc;
+};
+
+&sfr {
+	u-boot,dm-pre-reloc;
+};
+
+&pinctrl_sdmmc0_cmd_dat_default {
+	u-boot,dm-pre-reloc;
+};
+
+&pinctrl_sdmmc0_ck_cd_default {
+	u-boot,dm-pre-reloc;
+};
+
+&pinctrl_uart0_default {
+	u-boot,dm-pre-reloc;
+};
arch/arm/dts/at91-sama5d27_wlsom1_ek.dts new file +84 -0

84 lines not on this page · raw message

arch/arm/dts/sama5d27_wlsom1.dtsi new file +56 -0

56 lines not on this page · raw message

arch/arm/mach-at91/Kconfig +15 -0
index c3b21b7..24994d4 100644
@@ -180,6 +180,20 @@ config TARGET_SAMA5D27_SOM1_EK
 	  processor-based SAMA5D2 MPU with up to 1 Gbit DDR2-SDRAM
 	  in a single package.
 
+config TARGET_SAMA5D27_WLSOM1_EK
+	bool "SAMA5D27 WLSOM1 EK board"
+	select SAMA5D2
+	select BOARD_EARLY_INIT_F
+	select BOARD_LATE_INIT
+	select CPU_V7A
+	help
+	  The SAMA5D27 WLSOM1 embeds SAMA5D2 SiP (System in Package),
+	  a 64Mbit QSPI flash with Mac-address, KSZ8081 Phy. A wireless
+	  module providing bluetooth and wifi is also embedded.
+	  The SAMA5D2 SiP integrates the ARM Cortex-A5
+	  processor-based SAMA5D2 MPU with 2 Gbit LPDDR2-SDRAM
+	  in a single package.
+
 config TARGET_SAMA5D2_ICP
 	bool "SAMA5D2 Industrial Connectivity Platform (ICP)"
 	select CPU_V7A
@@ -292,6 +306,7 @@ source "board/atmel/at91sam9x5ek/Kconfig"
 source "board/atmel/sama5d2_ptc_ek/Kconfig"
 source "board/atmel/sama5d2_xplained/Kconfig"
 source "board/atmel/sama5d27_som1_ek/Kconfig"
+source "board/atmel/sama5d27_wlsom1_ek/Kconfig"
 source "board/atmel/sama5d2_icp/Kconfig"
 source "board/atmel/sama5d3_xplained/Kconfig"
 source "board/atmel/sama5d3xek/Kconfig"
board/atmel/sama5d27_wlsom1_ek/Kconfig new file +15 -0
new file mode 100644
index 0000000..4b192b0
@@ -0,0 +1,15 @@
+if TARGET_SAMA5D27_WLSOM1_EK
+
+config SYS_BOARD
+	default "sama5d27_wlsom1_ek"
+
+config SYS_VENDOR
+	default "atmel"
+
+config SYS_SOC
+	default "at91"
+
+config SYS_CONFIG_NAME
+	default "sama5d27_wlsom1_ek"
+
+endif
board/atmel/sama5d27_wlsom1_ek/MAINTAINERS new file +7 -0
new file mode 100644
index 0000000..59671ac
@@ -0,0 +1,7 @@
+SAMA5D27 WLSOM1 EK BOARD
+M:	Nicolas Ferre <[email protected]>
+M:	Eugen Hristev <[email protected]>
+S:	Maintained
+F:	board/atmel/sama5d27_wlsom1_ek/
+F:	include/configs/sama5d27_wlsom1_ek.h
+F:	configs/sama5d27_wlsom1_ek_mmc_defconfig
board/atmel/sama5d27_wlsom1_ek/Makefile new file +7 -0
new file mode 100644
index 0000000..cf827ae
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright (C) 2019 Microchip Technology Inc. and its subsidiaries
+#
+# Author: Nicolas Ferre <[email protected]>
+
+obj-y += sama5d27_wlsom1_ek.o
board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c new file +80 -0

80 lines not on this page · raw message

configs/sama5d27_wlsom1_ek_mmc_defconfig new file +72 -0

72 lines not on this page · raw message

include/configs/sama5d27_wlsom1_ek.h new file +34 -0
new file mode 100644
index 0000000..cc41560
@@ -0,0 +1,34 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Configuration file for the SAMA5D27 WLSOM1 EK Board.
+ *
+ * Copyright (C) 2019 Microchip Technology Inc. and its subsidiaries
+ *
+ * Author: Nicolas Ferre <[email protected]>
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+#include "at91-sama5_common.h"
+
+#undef CONFIG_SYS_AT91_MAIN_CLOCK
+#define CONFIG_SYS_AT91_MAIN_CLOCK      24000000 /* from 24 MHz crystal */
+
+/* SDRAM */
+#define CONFIG_SYS_SDRAM_BASE		0x20000000
+#define CONFIG_SYS_SDRAM_SIZE		0x10000000
+
+#define CONFIG_SYS_INIT_SP_ADDR \
+	(CONFIG_SYS_SDRAM_BASE + 16 * 1024 - GENERATED_GBL_DATA_SIZE)
+
+#define CONFIG_SYS_LOAD_ADDR		0x22000000 /* load address */
+
+/* NAND flash */
+#undef CONFIG_CMD_NAND
+
+#ifdef CONFIG_SD_BOOT
+#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION	1
+#endif
+
+#endif
Signature · 1 line
2.7.4
#3 lore raw

PATCH 3/7 ARM: at91: sfr: convert to Kconfig

In reply to Eugen.Hristev at microchip.com

From: Eugen Hristev <[email protected]>

This converts the at91 sfr to Kconfig

---
 arch/arm/mach-at91/Kconfig     | 9 ++++++++-
 arch/arm/mach-at91/Makefile    | 5 +++--
 arch/arm/mach-at91/atmel_sfr.c | 3 +++
 3 files changed, 14 insertions(+), 3 deletions(-)
arch/arm/mach-at91/Kconfig +8 -1
index 24994d4..ad09731 100644
@@ -46,6 +46,7 @@ config AT91SAM9X5
 config SAMA5D2
 	bool
 	select CPU_V7A
+	select ATMEL_SFR
 
 config SAMA5D3
 	bool
@@ -54,6 +55,7 @@ config SAMA5D3
 config SAMA5D4
 	bool
 	select CPU_V7A
+	select ATMEL_SFR
 
 choice
 	prompt "Atmel AT91 board select"
@@ -173,6 +175,7 @@ config TARGET_SAMA5D27_SOM1_EK
 	select BOARD_LATE_INIT
 	select CPU_V7A
 	select SUPPORT_SPL
+	select ATMEL_SFR
 	help
 	  The SAMA5D27 SOM1 embeds SAMA5D2 SiP(System in Package),
 	  a 64Mbit QSPI flash, KSZ8081 Phy and a Mac-address EEPROM
@@ -196,7 +199,7 @@ config TARGET_SAMA5D27_WLSOM1_EK
 
 config TARGET_SAMA5D2_ICP
 	bool "SAMA5D2 Industrial Connectivity Platform (ICP)"
-	select CPU_V7A
+	select SAMA5D2
 	select SUPPORT_SPL
 	select BOARD_EARLY_INIT_F
 	select BOARD_LATE_INIT
@@ -292,6 +295,10 @@ config TARGET_WB50N
 
 endchoice
 
+config ATMEL_SFR
+	bool
+	default n
+
 config SYS_SOC
 	default "at91"
 
arch/arm/mach-at91/Makefile +3 -2
index 045ac88..cbd0ed6 100644
@@ -7,10 +7,11 @@ obj-$(CONFIG_AT91SAM9G20) += sdram.o spl_at91.o
 obj-$(CONFIG_AT91SAM9M10G45) += mpddrc.o spl_at91.o
 obj-$(CONFIG_AT91SAM9N12) += mpddrc.o spl_at91.o
 obj-$(CONFIG_AT91SAM9X5) += mpddrc.o spl_at91.o
-obj-$(CONFIG_SAMA5D2) += bootparams_atmel.o mpddrc.o spl_atmel.o matrix.o atmel_sfr.o
+obj-$(CONFIG_SAMA5D2) += bootparams_atmel.o mpddrc.o spl_atmel.o matrix.o
 obj-$(CONFIG_SAMA5D3) += bootparams_atmel.o mpddrc.o spl_atmel.o
-obj-$(CONFIG_SAMA5D4) += bootparams_atmel.o mpddrc.o spl_atmel.o matrix.o atmel_sfr.o
+obj-$(CONFIG_SAMA5D4) += bootparams_atmel.o mpddrc.o spl_atmel.o matrix.o
 obj-y += spl.o
+obj-$(CONFIG_ATMEL_SFR) += atmel_sfr.o
 endif
 
 obj-y += clock.o
arch/arm/mach-at91/atmel_sfr.c +3 -0
index 2225115..07bd8ab 100644
@@ -9,6 +9,7 @@
 #include <asm/io.h>
 #include <asm/arch/sama5_sfr.h>
 
+#if defined(CONFIG_SAMA5D2) || defined(CONFIG_SAMA5D4)
 void redirect_int_from_saic_to_aic(void)
 {
 	struct atmel_sfr *sfr = (struct atmel_sfr *)ATMEL_BASE_SFR;
@@ -26,3 +27,5 @@ void configure_2nd_sram_as_l2_cache(void)
 
 	writel(1, &sfr->l2cc_hramc);
 }
+#endif
+
Signature · 1 line
2.7.4
#4 lore raw

PATCH 4/7 ARM: at91: sfr: implement DDR input buffers open function

In reply to Eugen.Hristev at microchip.com

From: Eugen Hristev <[email protected]>

Add a function in SFR implementation that will open the DDR input buffers.
This can be called at DRAM initialization time.

---
 arch/arm/mach-at91/atmel_sfr.c                | 11 +++++++++++
 arch/arm/mach-at91/include/mach/at91_common.h |  3 +++
 2 files changed, 14 insertions(+)
arch/arm/mach-at91/atmel_sfr.c +11 -0
index 07bd8ab..13cfba0 100644
@@ -29,3 +29,14 @@ void configure_2nd_sram_as_l2_cache(void)
 }
 #endif
 
+void configure_ddrcfg_input_buffers(bool open)
+{
+	struct atmel_sfr *sfr = (struct atmel_sfr *)ATMEL_BASE_SFR;
+
+	if (open)
+		writel(ATMEL_SFR_DDRCFG_FDQIEN | ATMEL_SFR_DDRCFG_FDQSIEN,
+		       &sfr->ddrcfg);
+	else
+		writel(0, &sfr->ddrcfg);
+}
+
arch/arm/mach-at91/include/mach/at91_common.h +3 -0
index df7d0e7..e929b5e 100644
@@ -35,6 +35,9 @@ void at91_disable_wdt(void);
 void matrix_init(void);
 void redirect_int_from_saic_to_aic(void);
 void configure_2nd_sram_as_l2_cache(void);
+#ifdef CONFIG_ATMEL_SFR
+void configure_ddrcfg_input_buffers(bool open);
+#endif
 
 int at91_set_ethaddr(int offset);
 int at91_video_show_board_info(void);
Signature · 1 line
2.7.4
#5 lore raw

PATCH 5/7 board: laird: wb50n: use configure_ddrcfg_input_buffers

In reply to Eugen.Hristev at microchip.com

From: Eugen Hristev <[email protected]>

Replace code with new function configure_ddrcfg_input_buffers from SFR mach driver.

---
 arch/arm/mach-at91/Kconfig | 1 +
 board/laird/wb50n/wb50n.c  | 4 +---
 2 files changed, 2 insertions(+), 3 deletions(-)
arch/arm/mach-at91/Kconfig +1 -0
index ad09731..ce0b1b4 100644
@@ -292,6 +292,7 @@ config TARGET_WB50N
 	select BOARD_LATE_INIT
 	select CPU_V7A
 	select SUPPORT_SPL
+	select ATMEL_SFR
 
 endchoice
 
board/laird/wb50n/wb50n.c +1 -3
index 89d3795..1598e5c 100644
@@ -172,13 +172,11 @@ static void ddr2_conf(struct atmel_mpddrc_config *ddr2)
 
 void mem_init(void)
 {
-	struct atmel_sfr *sfr = (struct atmel_sfr *)ATMEL_BASE_SFR;
 	struct atmel_mpddrc_config ddr2;
 
 	ddr2_conf(&ddr2);
 
-	writel(ATMEL_SFR_DDRCFG_FDQIEN | ATMEL_SFR_DDRCFG_FDQSIEN,
-	       &sfr->ddrcfg);
+	configure_ddrcfg_input_buffers(true);
 
 	/* enable MPDDR clock */
 	at91_periph_clk_enable(ATMEL_ID_MPDDRC);
Signature · 1 line
2.7.4
#6 lore raw

PATCH 6/7 ARM: at91: mpddrc: add lpddr2 initialization procedure

In reply to Eugen.Hristev at microchip.com

From: Eugen Hristev <[email protected]>

Implement the lpddr2 initialization procedure for at91 mpddrc multi-port ddram controller.

---
 arch/arm/mach-at91/include/mach/atmel_mpddrc.h |  23 ++++
 arch/arm/mach-at91/mpddrc.c                    | 162 +++++++++++++++++++++++++
 2 files changed, 185 insertions(+)
arch/arm/mach-at91/include/mach/atmel_mpddrc.h +23 -0
index 45a76a6..40ec87e 100644
@@ -18,6 +18,9 @@ struct atmel_mpddrc_config {
 	u32 tpr1;
 	u32 tpr2;
 	u32 md;
+	u32 lpddr23_lpr;
+	u32 cal_mr4;
+	u32 tim_cal;
 };
 
 /*
@@ -61,6 +64,10 @@ int ddr2_init(const unsigned int base,
 	      const unsigned int ram_address,
 	      const struct atmel_mpddrc_config *mpddr_value);
 
+int lpddr2_init(const unsigned int base,
+		const unsigned int ram_address,
+		const struct atmel_mpddrc_config *mpddr_value);
+
 int ddr3_init(const unsigned int base,
 	      const unsigned int ram_address,
 	      const struct atmel_mpddrc_config *mpddr_value);
@@ -74,6 +81,11 @@ int ddr3_init(const unsigned int base,
 #define ATMEL_MPDDRC_MR_MODE_EXT_LMR_CMD	0x5
 #define ATMEL_MPDDRC_MR_MODE_DEEP_CMD		0x6
 #define ATMEL_MPDDRC_MR_MODE_LPDDR2_CMD		0x7
+#define ATMEL_MPDDRC_MR_MRS(v)			(((v) & 0xFF) << 0x8)
+
+/* Bit field in refresh timer register */
+#define ATMEL_MPDDRC_RTR_ADJ_REF		(0x1 << 16)
+#define ATMEL_MPDDRC_RTR_MR4VALUE(v)		(((v) & 0x7) << 20)
 
 /* Bit field in configuration register */
 #define ATMEL_MPDDRC_CR_NC_MASK			0x3
@@ -157,6 +169,7 @@ int ddr3_init(const unsigned int base,
 #define ATMEL_MPDDRC_MD_DDR3_SDRAM	0x4
 #define ATMEL_MPDDRC_MD_LPDDR3_SDRAM	0x5
 #define ATMEL_MPDDRC_MD_DDR2_SDRAM	0x6
+#define ATMEL_MPDDRC_MD_LPDDR2_SDRAM	0x7
 #define ATMEL_MPDDRC_MD_DBW_MASK	(0x1 << 4)
 #define ATMEL_MPDDRC_MD_DBW_32_BITS	(0x0 << 4)
 #define ATMEL_MPDDRC_MD_DBW_16_BITS	(0x1 << 4)
@@ -206,4 +219,14 @@ int ddr3_init(const unsigned int base,
 #define ATMEL_MPDDRC_RD_DATA_PATH_SHIFT_TWO_CYCLE	0x2
 #define ATMEL_MPDDRC_RD_DATA_PATH_SHIFT_THREE_CYCLE	0x3
 
+/* Bit field in LPDDR2 - LPDDR3 Low Power Register */
+#define ATMEL_MPDDRC_LPDDR23_LPR_DS(x)			(((x) & 0xf) << 24)
+
+/* Bit field in CAL_MR4 Calibration and MR4 Register */
+#define ATMEL_MPDDRC_CAL_MR4_COUNT_CAL(x)		(((x) & 0xffff) << 0)
+#define ATMEL_MPDDRC_CAL_MR4_MR4R(x)			(((x) & 0xffff) << 16)
+
+/* Bit field in TIM_CAL Timing Calibration Register */
+#define ATMEL_MPDDRC_CALR_ZQCS(x)			(((x) & 0xff) << 0)
+
 #endif
arch/arm/mach-at91/mpddrc.c +162 -0

177 lines not on this page · raw message

Signature · 1 line
2.7.4
#7 lore raw

PATCH 7/7 board: atmel: sama5d2_wlsom1_ek: add SPL support

In reply to Eugen.Hristev at microchip.com

From: Eugen Hristev <[email protected]>

Add support for SPL for this board: DRAM initialization, PMC initialization, MMC boot.

---
 arch/arm/mach-at91/Kconfig                         |   1 +
 .../atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c  | 147 +++++++++++++++++++++
 configs/sama5d27_wlsom1_ek_mmc_defconfig           |  25 +++-
 include/configs/sama5d27_wlsom1_ek.h               |  16 ++-
 4 files changed, 185 insertions(+), 4 deletions(-)
arch/arm/mach-at91/Kconfig +1 -0
index ce0b1b4..1434328 100644
@@ -189,6 +189,7 @@ config TARGET_SAMA5D27_WLSOM1_EK
 	select BOARD_EARLY_INIT_F
 	select BOARD_LATE_INIT
 	select CPU_V7A
+	select SUPPORT_SPL
 	help
 	  The SAMA5D27 WLSOM1 embeds SAMA5D2 SiP (System in Package),
 	  a 64Mbit QSPI flash with Mac-address, KSZ8081 Phy. A wireless
board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c +147 -0

150 lines not on this page · raw message

configs/sama5d27_wlsom1_ek_mmc_defconfig +23 -2
index 6b11fcb..d7329a2 100644
@@ -2,12 +2,20 @@ CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_SYS_TEXT_BASE=0x26f00000
 CONFIG_TARGET_SAMA5D27_WLSOM1_EK=y
+CONFIG_SPL_GPIO_SUPPORT=y
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_SPL_MMC_SUPPORT=y
+CONFIG_SPL_SERIAL_SUPPORT=y
+CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
 CONFIG_ENV_SIZE=0x4000
+CONFIG_SPL=y
 CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_BASE=0xf801c000
 CONFIG_DEBUG_UART_CLOCK=82000000
-CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d27_wlsom1_ek"
+CONFIG_SPL_FS_FAT=y
+CONFIG_SPL_LIBDISK_SUPPORT=y
 CONFIG_DEBUG_UART=y
 CONFIG_ENV_VARS_UBOOT_CONFIG=y
 CONFIG_FIT=y
@@ -15,9 +23,13 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D2"
 CONFIG_SD_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
-CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rw rootwait"
+CONFIG_MISC_INIT_R=y
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
+CONFIG_SPL_TEXT_BASE=0x200000
+CONFIG_SPL_SEPARATE_BSS=y
+CONFIG_SPL_DISPLAY_PRINT=y
+# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_FLASH is not set
@@ -31,9 +43,15 @@ CONFIG_CMD_PING=y
 CONFIG_CMD_EXT4=y
 CONFIG_CMD_FAT=y
 CONFIG_OF_CONTROL=y
+CONFIG_SPL_OF_CONTROL=y
+CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d27_wlsom1_ek"
+CONFIG_OF_SPL_REMOVE_PROPS="interrupts interrupt-parent dmas dma-names"
 CONFIG_ENV_IS_IN_FAT=y
 CONFIG_DM=y
+CONFIG_SPL_DM=y
+CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_CLK=y
+CONFIG_SPL_CLK=y
 CONFIG_CLK_AT91=y
 CONFIG_AT91_UTMI=y
 CONFIG_AT91_H32MX=y
@@ -56,6 +74,7 @@ CONFIG_PHY_MICREL=y
 CONFIG_DM_ETH=y
 CONFIG_MACB=y
 CONFIG_PINCTRL=y
+CONFIG_SPL_PINCTRL=y
 CONFIG_PINCTRL_AT91PIO4=y
 CONFIG_DM_SERIAL=y
 CONFIG_DEBUG_UART_ATMEL=y
@@ -64,9 +83,11 @@ CONFIG_ATMEL_USART=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_TIMER=y
+CONFIG_SPL_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_W1=y
 CONFIG_W1_GPIO=y
 CONFIG_W1_EEPROM=y
 CONFIG_W1_EEPROM_DS24XXX=y
 CONFIG_OF_LIBFDT_OVERLAY=y
+# CONFIG_EFI_LOADER_HII is not set
include/configs/sama5d27_wlsom1_ek.h +14 -2
index cc41560..6bcbc06 100644
@@ -19,16 +19,28 @@
 #define CONFIG_SYS_SDRAM_BASE		0x20000000
 #define CONFIG_SYS_SDRAM_SIZE		0x10000000
 
+#ifdef CONFIG_SPL_BUILD
+#define CONFIG_SYS_INIT_SP_ADDR		0x218000
+#else
 #define CONFIG_SYS_INIT_SP_ADDR \
 	(CONFIG_SYS_SDRAM_BASE + 16 * 1024 - GENERATED_GBL_DATA_SIZE)
+#endif
 
 #define CONFIG_SYS_LOAD_ADDR		0x22000000 /* load address */
 
-/* NAND flash */
-#undef CONFIG_CMD_NAND
+/* SPL */
+#define CONFIG_SPL_TEXT_BASE		0x200000
+#define CONFIG_SPL_MAX_SIZE		0x10000
+#define CONFIG_SPL_BSS_START_ADDR	0x20000000
+#define CONFIG_SPL_BSS_MAX_SIZE		0x80000
+#define CONFIG_SYS_SPL_MALLOC_START	0x20080000
+#define CONFIG_SYS_SPL_MALLOC_SIZE	0x80000
+
+#define CONFIG_SYS_MONITOR_LEN		(512 << 10)
 
 #ifdef CONFIG_SD_BOOT
 #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION	1
+#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME		"u-boot.img"
 #endif
 
 #endif
Signature · 1 line
2.7.4