Skip to contentSkip to conversation

arm: socfpga: Minor coding style fix

PATCH New Marek Vasut 3 participants 21 messages Jan 30, 2015 – Feb 12, 2015 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/10 arm: socfpga: Minor coding style fix

Replace multiple spaces with a single tab.

---
 board/altera/socfpga/iocsr_config.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
board/altera/socfpga/iocsr_config.h +4 -4
index 490f109..4a7ed46 100644
@@ -9,9 +9,9 @@
 #ifndef _PRELOADER_IOCSR_CONFIG_H_
 #define _PRELOADER_IOCSR_CONFIG_H_
 
-#define CONFIG_HPS_IOCSR_SCANCHAIN0_LENGTH        (764)
-#define CONFIG_HPS_IOCSR_SCANCHAIN1_LENGTH        (1719)
-#define CONFIG_HPS_IOCSR_SCANCHAIN2_LENGTH        (955)
-#define CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH        (16766)
+#define CONFIG_HPS_IOCSR_SCANCHAIN0_LENGTH	(764)
+#define CONFIG_HPS_IOCSR_SCANCHAIN1_LENGTH	(1719)
+#define CONFIG_HPS_IOCSR_SCANCHAIN2_LENGTH	(955)
+#define CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH	(16766)
 
 #endif /*_PRELOADER_IOCSR_CONFIG_H_*/
Signature · 1 line
2.1.3
#1 lore raw

PATCH 2/10 arm: socfpga: Sync Cyclone V DK pinmux configuration

Sync SoCFPGA Cyclone V development kit pinmux configuration with Rocketboard U-Boot v2013.01.01-114-g9381569 (ACDS14.1_REL_GSRD_PR).

---
 board/altera/socfpga/pinmux_config.c | 188 +++++++++++++++++------------------
 board/altera/socfpga/pinmux_config.h |  14 +--
 2 files changed, 101 insertions(+), 101 deletions(-)
board/altera/socfpga/pinmux_config.c +94 -94
index 8b09005..b124768 100644
@@ -4,100 +4,100 @@
 
 /* pin mux configuration data */
 unsigned long sys_mgr_init_table[CONFIG_HPS_PINMUX_NUM] = {
-	0, /* EMACIO0 - Unused */
-	2, /* EMACIO1 - USB */
-	2, /* EMACIO2 - USB */
-	2, /* EMACIO3 - USB */
-	2, /* EMACIO4 - USB */
-	2, /* EMACIO5 - USB */
-	2, /* EMACIO6 - USB */
-	2, /* EMACIO7 - USB */
-	2, /* EMACIO8 - USB */
-	0, /* EMACIO9 - Unused */
-	2, /* EMACIO10 - USB */
-	2, /* EMACIO11 - USB */
-	2, /* EMACIO12 - USB */
-	2, /* EMACIO13 - USB */
-	0, /* EMACIO14 - N/A */
-	0, /* EMACIO15 - N/A */
-	0, /* EMACIO16 - N/A */
-	0, /* EMACIO17 - N/A */
-	0, /* EMACIO18 - N/A */
-	0, /* EMACIO19 - N/A */
-	3, /* FLASHIO0 - SDMMC */
-	3, /* FLASHIO1 - SDMMC */
-	3, /* FLASHIO2 - SDMMC */
-	3, /* FLASHIO3 - SDMMC */
-	0, /* FLASHIO4 - SDMMC */
-	0, /* FLASHIO5 - SDMMC */
-	0, /* FLASHIO6 - SDMMC */
-	0, /* FLASHIO7 - SDMMC */
-	0, /* FLASHIO8 - SDMMC */
-	3, /* FLASHIO9 - SDMMC */
-	3, /* FLASHIO10 - SDMMC */
-	3, /* FLASHIO11 - SDMMC */
-	3, /* GENERALIO0 - TRACE */
-	3, /* GENERALIO1 - TRACE */
-	3, /* GENERALIO2 - TRACE */
-	3, /* GENERALIO3 - TRACE  */
-	3, /* GENERALIO4 - TRACE  */
-	3, /* GENERALIO5 - TRACE  */
-	3, /* GENERALIO6 - TRACE  */
-	3, /* GENERALIO7 - TRACE  */
-	3, /* GENERALIO8 - TRACE  */
-	3, /* GENERALIO9 - SPIM0 */
-	3, /* GENERALIO10 - SPIM0 */
-	3, /* GENERALIO11 - SPIM0 */
-	3, /* GENERALIO12 - SPIM0 */
-	2, /* GENERALIO13 - CAN0 */
-	2, /* GENERALIO14 - CAN0 */
-	3, /* GENERALIO15 - I2C0 */
-	3, /* GENERALIO16 - I2C0 */
-	2, /* GENERALIO17 - UART0 */
-	2, /* GENERALIO18 - UART0 */
-	0, /* GENERALIO19 - N/A */
-	0, /* GENERALIO20 - N/A */
-	0, /* GENERALIO21 - N/A */
-	0, /* GENERALIO22 - N/A */
-	0, /* GENERALIO23 - N/A */
-	0, /* GENERALIO24 - N/A */
-	0, /* GENERALIO25 - N/A */
-	0, /* GENERALIO26 - N/A */
-	0, /* GENERALIO27 - N/A */
-	0, /* GENERALIO28 - N/A */
-	0, /* GENERALIO29 - N/A */
-	0, /* GENERALIO30 - N/A */
-	0, /* GENERALIO31 - N/A */
-	2, /* MIXED1IO0 - EMAC */
-	2, /* MIXED1IO1 - EMAC */
-	2, /* MIXED1IO2 - EMAC */
-	2, /* MIXED1IO3 - EMAC */
-	2, /* MIXED1IO4 - EMAC */
-	2, /* MIXED1IO5 - EMAC */
-	2, /* MIXED1IO6 - EMAC */
-	2, /* MIXED1IO7 - EMAC */
-	2, /* MIXED1IO8 - EMAC */
-	2, /* MIXED1IO9 - EMAC */
-	2, /* MIXED1IO10 - EMAC */
-	2, /* MIXED1IO11 - EMAC */
-	2, /* MIXED1IO12 - EMAC */
-	2, /* MIXED1IO13 - EMAC */
-	0, /* MIXED1IO14 - Unused */
-	3, /* MIXED1IO15 - QSPI */
-	3, /* MIXED1IO16 - QSPI */
-	3, /* MIXED1IO17 - QSPI */
-	3, /* MIXED1IO18 - QSPI */
-	3, /* MIXED1IO19 - QSPI */
-	3, /* MIXED1IO20 - QSPI */
-	0, /* MIXED1IO21 - GPIO */
-	0, /* MIXED2IO0 - N/A */
-	0, /* MIXED2IO1 - N/A */
-	0, /* MIXED2IO2 - N/A */
-	0, /* MIXED2IO3 - N/A */
-	0, /* MIXED2IO4 - N/A */
-	0, /* MIXED2IO5 - N/A */
-	0, /* MIXED2IO6 - N/A */
-	0, /* MIXED2IO7 - N/A */
+	3, /* EMACIO0 */
+	3, /* EMACIO1 */
+	3, /* EMACIO2 */
+	3, /* EMACIO3 */
+	3, /* EMACIO4 */
+	3, /* EMACIO5 */
+	3, /* EMACIO6 */
+	3, /* EMACIO7 */
+	3, /* EMACIO8 */
+	3, /* EMACIO9 */
+	3, /* EMACIO10 */
+	3, /* EMACIO11 */
+	3, /* EMACIO12 */
+	3, /* EMACIO13 */
+	0, /* EMACIO14 */
+	0, /* EMACIO15 */
+	0, /* EMACIO16 */
+	0, /* EMACIO17 */
+	0, /* EMACIO18 */
+	0, /* EMACIO19 */
+	3, /* FLASHIO0 */
+	0, /* FLASHIO1 */
+	3, /* FLASHIO2 */
+	3, /* FLASHIO3 */
+	3, /* FLASHIO4 */
+	3, /* FLASHIO5 */
+	3, /* FLASHIO6 */
+	3, /* FLASHIO7 */
+	0, /* FLASHIO8 */
+	3, /* FLASHIO9 */
+	3, /* FLASHIO10 */
+	3, /* FLASHIO11 */
+	0, /* GENERALIO0 */
+	1, /* GENERALIO1 */
+	1, /* GENERALIO2 */
+	0, /* GENERALIO3 */
+	0, /* GENERALIO4 */
+	1, /* GENERALIO5 */
+	1, /* GENERALIO6 */
+	1, /* GENERALIO7 */
+	1, /* GENERALIO8 */
+	0, /* GENERALIO9 */
+	0, /* GENERALIO10 */
+	0, /* GENERALIO11 */
+	0, /* GENERALIO12 */
+	2, /* GENERALIO13 */
+	2, /* GENERALIO14 */
+	0, /* GENERALIO15 */
+	0, /* GENERALIO16 */
+	0, /* GENERALIO17 */
+	0, /* GENERALIO18 */
+	0, /* GENERALIO19 */
+	0, /* GENERALIO20 */
+	0, /* GENERALIO21 */
+	0, /* GENERALIO22 */
+	0, /* GENERALIO23 */
+	0, /* GENERALIO24 */
+	0, /* GENERALIO25 */
+	0, /* GENERALIO26 */
+	0, /* GENERALIO27 */
+	0, /* GENERALIO28 */
+	0, /* GENERALIO29 */
+	0, /* GENERALIO30 */
+	0, /* GENERALIO31 */
+	0, /* MIXED1IO0 */
+	1, /* MIXED1IO1 */
+	1, /* MIXED1IO2 */
+	1, /* MIXED1IO3 */
+	1, /* MIXED1IO4 */
+	0, /* MIXED1IO5 */
+	0, /* MIXED1IO6 */
+	0, /* MIXED1IO7 */
+	1, /* MIXED1IO8 */
+	1, /* MIXED1IO9 */
+	1, /* MIXED1IO10 */
+	1, /* MIXED1IO11 */
+	0, /* MIXED1IO12 */
+	0, /* MIXED1IO13 */
+	0, /* MIXED1IO14 */
+	1, /* MIXED1IO15 */
+	1, /* MIXED1IO16 */
+	1, /* MIXED1IO17 */
+	1, /* MIXED1IO18 */
+	0, /* MIXED1IO19 */
+	0, /* MIXED1IO20 */
+	0, /* MIXED1IO21 */
+	0, /* MIXED2IO0 */
+	0, /* MIXED2IO1 */
+	0, /* MIXED2IO2 */
+	0, /* MIXED2IO3 */
+	0, /* MIXED2IO4 */
+	0, /* MIXED2IO5 */
+	0, /* MIXED2IO6 */
+	0, /* MIXED2IO7 */
 	0, /* GPLINMUX48 */
 	0, /* GPLINMUX49 */
 	0, /* GPLINMUX50 */
board/altera/socfpga/pinmux_config.h +7 -7
index f278f2b..21fabb0 100644
@@ -7,21 +7,21 @@
  * State of enabling for which IP connected out through the muxing.
  * Value 1 mean the IP connection is muxed out
  */
-#define CONFIG_HPS_EMAC0		(0)
-#define CONFIG_HPS_EMAC1		(1)
+#define CONFIG_HPS_EMAC0		(1)
+#define CONFIG_HPS_EMAC1		(0)
 #define CONFIG_HPS_USB0			(0)
 #define CONFIG_HPS_USB1			(1)
 #define CONFIG_HPS_NAND			(0)
 #define CONFIG_HPS_SDMMC		(1)
-#define CONFIG_HPS_QSPI			(1)
+#define CONFIG_HPS_QSPI			(0)
 #define CONFIG_HPS_UART0		(1)
 #define CONFIG_HPS_UART1		(0)
-#define CONFIG_HPS_TRACE		(1)
+#define CONFIG_HPS_TRACE		(0)
 #define CONFIG_HPS_I2C0			(1)
 #define CONFIG_HPS_I2C1			(0)
 #define CONFIG_HPS_I2C2			(0)
 #define CONFIG_HPS_I2C3			(0)
-#define CONFIG_HPS_SPIM0		(1)
+#define CONFIG_HPS_SPIM0		(0)
 #define CONFIG_HPS_SPIM1		(0)
 #define CONFIG_HPS_SPIS0		(0)
 #define CONFIG_HPS_SPIS1		(0)
@@ -29,10 +29,10 @@
 #define CONFIG_HPS_CAN1			(0)
 
 /* IP attribute value (which affected by pin muxing configuration) */
-#define CONFIG_HPS_SDMMC_BUSWIDTH	(4)
+#define CONFIG_HPS_SDMMC_BUSWIDTH	(8)
 
 /* 1 if the pins are connected out */
-#define CONFIG_HPS_QSPI_CS0		(1)
+#define CONFIG_HPS_QSPI_CS0		(0)
 #define CONFIG_HPS_QSPI_CS1		(0)
 #define CONFIG_HPS_QSPI_CS2		(0)
 #define CONFIG_HPS_QSPI_CS3		(0)
Signature · 1 line
2.1.3
#2 lore raw

PATCH 3/10 arm: socfpga: Sync Cyclone V DK PLL configuration

In reply to Marek Vasut

Sync SoCFPGA Cyclone V development kit pinmux configuration with Rocketboard U-Boot v2013.01.01-114-g9381569 (ACDS14.1_REL_GSRD_PR).

NOTE: This change is useless until we get proper SPL support, at
which point this will likely need further rework.

---
 board/altera/socfpga/pll_config.h | 34 +++++++++++-----------------------
 1 file changed, 11 insertions(+), 23 deletions(-)
board/altera/socfpga/pll_config.h +11 -23
index f0f59a9..8130fa4 100644
@@ -16,9 +16,9 @@
 #define CONFIG_HPS_MAINPLLGRP_MPUCLK_CNT		(0)
 #define CONFIG_HPS_MAINPLLGRP_MAINCLK_CNT		(0)
 #define CONFIG_HPS_MAINPLLGRP_DBGATCLK_CNT		(0)
-#define CONFIG_HPS_MAINPLLGRP_MAINQSPICLK_CNT		(3)
-#define CONFIG_HPS_MAINPLLGRP_MAINNANDSDMMCCLK_CNT	(3)
-#define CONFIG_HPS_MAINPLLGRP_CFGS2FUSER0CLK_CNT	(12)
+#define CONFIG_HPS_MAINPLLGRP_MAINQSPICLK_CNT		(511)
+#define CONFIG_HPS_MAINPLLGRP_MAINNANDSDMMCCLK_CNT	(511)
+#define CONFIG_HPS_MAINPLLGRP_CFGS2FUSER0CLK_CNT	(15)
 #define CONFIG_HPS_MAINPLLGRP_MAINDIV_L3MPCLK		(1)
 #define CONFIG_HPS_MAINPLLGRP_MAINDIV_L3SPCLK		(1)
 #define CONFIG_HPS_MAINPLLGRP_MAINDIV_L4MPCLK		(1)
@@ -36,7 +36,7 @@
 
 /* Peripheral PLL */
 #define CONFIG_HPS_PERPLLGRP_VCO_DENOM			(1)
-#define CONFIG_HPS_PERPLLGRP_VCO_NUMER			(79)
+#define CONFIG_HPS_PERPLLGRP_VCO_NUMER			(39)
 /*
  * To tell where is the VCOs source:
  * 0 = EOSC1
@@ -45,13 +45,13 @@
  */
 #define CONFIG_HPS_PERPLLGRP_VCO_PSRC			(0)
 #define CONFIG_HPS_PERPLLGRP_EMAC0CLK_CNT		(3)
-#define CONFIG_HPS_PERPLLGRP_EMAC1CLK_CNT		(3)
-#define CONFIG_HPS_PERPLLGRP_PERQSPICLK_CNT		(1)
+#define CONFIG_HPS_PERPLLGRP_EMAC1CLK_CNT		(511)
+#define CONFIG_HPS_PERPLLGRP_PERQSPICLK_CNT		(511)
 #define CONFIG_HPS_PERPLLGRP_PERNANDSDMMCCLK_CNT	(4)
 #define CONFIG_HPS_PERPLLGRP_PERBASECLK_CNT		(4)
-#define CONFIG_HPS_PERPLLGRP_S2FUSER1CLK_CNT		(9)
+#define CONFIG_HPS_PERPLLGRP_S2FUSER1CLK_CNT		(511)
 #define CONFIG_HPS_PERPLLGRP_DIV_USBCLK			(0)
-#define CONFIG_HPS_PERPLLGRP_DIV_SPIMCLK		(0)
+#define CONFIG_HPS_PERPLLGRP_DIV_SPIMCLK		(4)
 #define CONFIG_HPS_PERPLLGRP_DIV_CAN0CLK		(1)
 #define CONFIG_HPS_PERPLLGRP_DIV_CAN1CLK		(1)
 #define CONFIG_HPS_PERPLLGRP_GPIODIV_GPIODBCLK		(6249)
@@ -66,15 +66,8 @@
 #define CONFIG_HPS_PERPLLGRP_SRC_QSPI			(1)
 
 /* SDRAM PLL */
-#ifdef CONFIG_SOCFPGA_ARRIA5
-/* Arria V SDRAM will run at 533MHz while Cyclone V still at 400MHz
- * This if..else... is not required if generated by tools */
 #define CONFIG_HPS_SDRPLLGRP_VCO_DENOM			(2)
-#define CONFIG_HPS_SDRPLLGRP_VCO_NUMER			(127)
-#else
-#define CONFIG_HPS_SDRPLLGRP_VCO_DENOM			(0)
-#define CONFIG_HPS_SDRPLLGRP_VCO_NUMER			(31)
-#endif /* CONFIG_SOCFPGA_ARRIA5 */
+#define CONFIG_HPS_SDRPLLGRP_VCO_NUMER			(79)
 
 /*
  * To tell where is the VCOs source:
@@ -94,17 +87,12 @@
 
 /* Info for driver */
 #define CONFIG_HPS_CLK_OSC1_HZ			(25000000)
-#define CONFIG_HPS_CLK_OSC2_HZ			0
+#define CONFIG_HPS_CLK_OSC2_HZ			(25000000)
 #define CONFIG_HPS_CLK_F2S_SDR_REF_HZ		0
 #define CONFIG_HPS_CLK_F2S_PER_REF_HZ		0
 #define CONFIG_HPS_CLK_MAINVCO_HZ		(1600000000)
 #define CONFIG_HPS_CLK_PERVCO_HZ		(1000000000)
-#ifdef CONFIG_SOCFPGA_ARRIA5
-/* The if..else... is not required if generated by tools */
-#define CONFIG_HPS_CLK_SDRVCO_HZ		(1066000000)
-#else
-#define CONFIG_HPS_CLK_SDRVCO_HZ		(800000000)
-#endif
+#define CONFIG_HPS_CLK_SDRVCO_HZ		(666666666)
 #define CONFIG_HPS_CLK_EMAC0_HZ			(250000000)
 #define CONFIG_HPS_CLK_EMAC1_HZ			(250000000)
 #define CONFIG_HPS_CLK_USBCLK_HZ		(200000000)
Signature · 1 line
2.1.3
#3 lore raw

PATCH 4/10 arm: socfpga: Add USB and UDC support for Cyclone V DK

In reply to Marek Vasut

Add support for USB host mode and USB device mode for the Cyclone V development kit and enable support for UMS (to export SD card as USB mass storage). The UMS is activated via 'ums 0 mmc 0' command, the system must be connected to a host PC via HPS USB port and SD card must be installed for this to work.

---
 include/configs/socfpga_cyclone5.h | 9 +++++++++
 1 file changed, 9 insertions(+)
include/configs/socfpga_cyclone5.h +9 -0
index c3d958c..676144a 100644
@@ -21,6 +21,7 @@
 #define CONFIG_CMD_ASKENV
 #define CONFIG_CMD_BOOTZ
 #define CONFIG_CMD_CACHE
+#define CONFIG_CMD_DFU
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_EXT4
 #define CONFIG_CMD_EXT4_WRITE
@@ -33,6 +34,8 @@
 #define CONFIG_CMD_NET
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_SETEXPR
+#define CONFIG_CMD_USB
+#define CONFIG_CMD_USB_MASS_STORAGE
 
 #define CONFIG_REGEX			/* Enable regular expression support */
 
@@ -66,6 +69,12 @@
 
 #endif
 
+/* USB */
+#ifdef CONFIG_CMD_USB
+#define CONFIG_USB_DWC2_REG_ADDR	SOCFPGA_USB1_ADDRESS
+#endif
+#define CONFIG_G_DNL_MANUFACTURER      "Altera"
+
 /* Extra Environment */
 #define CONFIG_HOSTNAME		socfpga_cyclone5
 
Signature · 1 line
2.1.3
#4 lore raw

PATCH 5/10 arm: socfpga: Drop cyclone5 suffix from board file name

In reply to Marek Vasut

Drop the _cyclone5 suffix from socfpga_cyclone5.c since this file will contain Arria 5 support as well.

---
 board/altera/socfpga/Makefile           |   2 +-
 board/altera/socfpga/socfpga.c          | 100 ++++++++++++++++++++++++++++++++
 board/altera/socfpga/socfpga_cyclone5.c | 100 --------------------------------
 3 files changed, 101 insertions(+), 101 deletions(-)
 create mode 100644 board/altera/socfpga/socfpga.c
 delete mode 100644 board/altera/socfpga/socfpga_cyclone5.c
board/altera/socfpga/Makefile +1 -1
index 44baa00..c867f73 100644
@@ -6,5 +6,5 @@
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
-obj-y	:= socfpga_cyclone5.o
+obj-y	:= socfpga.o
 obj-$(CONFIG_SPL_BUILD) += pinmux_config.o iocsr_config.o
board/altera/socfpga/socfpga.c new file +100 -0

100 lines not on this page · raw message

board/altera/socfpga/socfpga_cyclone5.c deleted +0 -100

100 lines not on this page · raw message

Signature · 1 line
2.1.3
#5 lore raw

PATCH v2 6/10 arm: socfpga: Zap checkboard()

In reply to Marek Vasut

Since all boards now have a DT, instead of hard-coding the board name into the U-Boot binary, read the board name from DT "model" property.

Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Stefan Roese <[email protected]>
Cc Vince Bridgers <[email protected]>
---
 board/altera/socfpga/socfpga.c   | 9 ---------
 include/configs/socfpga_common.h | 2 +-
 2 files changed, 1 insertion(+), 10 deletions(-)

V2: Place this patch at this point in the series, so the subsequent patches
don't have to tweak checkboard to support distinction between Arria V and Cyclone V.

board/altera/socfpga/socfpga.c +0 -9
index 459d82f..2b2b63d 100644
@@ -19,15 +19,6 @@
 DECLARE_GLOBAL_DATA_PTR;
 
 /*
- * Print Board information
- */
-int checkboard(void)
-{
-	puts("BOARD: Altera SoCFPGA Cyclone5 Board\n");
-	return 0;
-}
-
-/*
  * Initialization function which happen at early stage of c code
  */
 int board_early_init_f(void)
include/configs/socfpga_common.h +1 -1
index 6b1f967..c2a4c72 100644
@@ -19,7 +19,7 @@
  * High level configuration
  */
 #define CONFIG_DISPLAY_CPUINFO
-#define CONFIG_DISPLAY_BOARDINFO
+#define CONFIG_DISPLAY_BOARDINFO_LATE
 #define CONFIG_BOARD_EARLY_INIT_F
 #define CONFIG_ARCH_EARLY_INIT_R
 #define CONFIG_SYS_NO_FLASH
Signature · 1 line
2.1.3
#6 lore raw

PATCH v2 6/10 arm: socfpga: Zap checkboard()

Quoted 10 lines · Marek Vasut

Since all boards now have a DT, instead of hard-coding the board name into the U-Boot binary, read the board name from DT "model" property.

Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Stefan Roese <[email protected]>
Cc Vince Bridgers <[email protected]>

Thanks,
Stefan

#7 lore raw

PATCH v2 6/10 arm: socfpga: Zap checkboard()

In reply to Marek Vasut
Quoted 7 lines · Marek Vasut

Since all boards now have a DT, instead of hard-coding the board name into the U-Boot binary, read the board name from DT "model" property.

Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#9 lore raw

PATCH 7/10 arm: socfpga: Zap board_early_init_f()

In reply to Marek Vasut

Zap this unused empty function, no point in having it.

---
 board/altera/socfpga/socfpga.c   | 8 --------
 include/configs/socfpga_common.h | 1 -
 2 files changed, 9 deletions(-)
board/altera/socfpga/socfpga.c +0 -8
index 2b2b63d..20d2216 100644
@@ -19,14 +19,6 @@
 DECLARE_GLOBAL_DATA_PTR;
 
 /*
- * Initialization function which happen at early stage of c code
- */
-int board_early_init_f(void)
-{
-	return 0;
-}
-
-/*
  * Miscellaneous platform dependent initialisations
  */
 int board_init(void)
include/configs/socfpga_common.h +0 -1
index c2a4c72..5254e9b 100644
@@ -20,7 +20,6 @@
  */
 #define CONFIG_DISPLAY_CPUINFO
 #define CONFIG_DISPLAY_BOARDINFO_LATE
-#define CONFIG_BOARD_EARLY_INIT_F
 #define CONFIG_ARCH_EARLY_INIT_R
 #define CONFIG_SYS_NO_FLASH
 #define CONFIG_CLOCKS
Signature · 1 line
2.1.3
#10 lore raw

PATCH v2 8/10 arm: socfpga: Add Altera Arria V DK support

In reply to Marek Vasut

Add support for the Altera Arria V development kit.

Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Stefan Roese <[email protected]>
Cc Vince Bridgers <[email protected]>
---
 arch/arm/Kconfig                     |   5 +
 board/altera/socfpga/Kconfig         |  16 +
 board/altera/socfpga/iocsr_config.c  | 688 +++++++++++++++++++++++++++++++++++
 board/altera/socfpga/iocsr_config.h  |   9 +
 board/altera/socfpga/pinmux_config.c | 215 +++++++++++
 configs/socfpga_arria5_defconfig     |   3 +
 include/configs/socfpga_arria5.h     | 107 ++++++
 7 files changed, 1043 insertions(+)
 create mode 100644 configs/socfpga_arria5_defconfig
 create mode 100644 include/configs/socfpga_arria5.h

V2: Don't tweak checkboard(), since this function is now missing.

arch/arm/Kconfig +5 -0
index 5eb1d03..0a04cca 100644
@@ -687,6 +687,11 @@ config TARGET_CM_FX6
 	select CPU_V7
 	select SUPPORT_SPL
 
+config TARGET_SOCFPGA_ARRIA5
+	bool "Support socfpga_arria5"
+	select CPU_V7
+	select SUPPORT_SPL
+
 config TARGET_SOCFPGA_CYCLONE5
 	bool "Support socfpga_cyclone5"
 	select CPU_V7
board/altera/socfpga/Kconfig +16 -0
index fc42185..cbed8d6 100644
@@ -13,3 +13,19 @@ config SYS_CONFIG_NAME
 	default "socfpga_cyclone5"
 
 endif
+
+if TARGET_SOCFPGA_ARRIA5
+
+config SYS_BOARD
+	default "socfpga"
+
+config SYS_VENDOR
+	default "altera"
+
+config SYS_SOC
+	default "socfpga"
+
+config SYS_CONFIG_NAME
+	default "socfpga_arria5"
+
+endif
board/altera/socfpga/iocsr_config.c +688 -0

697 lines not on this page · raw message

board/altera/socfpga/iocsr_config.h +9 -0
index 4a7ed46..d1c9b0d 100644
@@ -9,9 +9,18 @@
 #ifndef _PRELOADER_IOCSR_CONFIG_H_
 #define _PRELOADER_IOCSR_CONFIG_H_
 
+#ifdef CONFIG_TARGET_SOCFPGA_CYCLONE5
 #define CONFIG_HPS_IOCSR_SCANCHAIN0_LENGTH	(764)
 #define CONFIG_HPS_IOCSR_SCANCHAIN1_LENGTH	(1719)
 #define CONFIG_HPS_IOCSR_SCANCHAIN2_LENGTH	(955)
 #define CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH	(16766)
+#endif
+
+#ifdef CONFIG_TARGET_SOCFPGA_ARRIA5
+#define CONFIG_HPS_IOCSR_SCANCHAIN0_LENGTH	(1337)
+#define CONFIG_HPS_IOCSR_SCANCHAIN1_LENGTH	(1719)
+#define CONFIG_HPS_IOCSR_SCANCHAIN2_LENGTH	(1528)
+#define CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH	(16766)
+#endif
 
 #endif /*_PRELOADER_IOCSR_CONFIG_H_*/
board/altera/socfpga/pinmux_config.c +215 -0

224 lines not on this page · raw message

configs/socfpga_arria5_defconfig new file +3 -0
new file mode 100644
index 0000000..f290042
@@ -0,0 +1,3 @@
+CONFIG_SPL=y
++S:CONFIG_ARM=y
++S:CONFIG_TARGET_SOCFPGA_ARRIA5=y
include/configs/socfpga_arria5.h new file +107 -0

107 lines not on this page · raw message

Signature · 1 line
2.1.3
#11 lore raw

PATCH v2 8/10 arm: socfpga: Add Altera Arria V DK support

Quoted 19 lines · Marek Vasut

Add support for the Altera Arria V development kit.

Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Stefan Roese <[email protected]>
Cc Vince Bridgers <[email protected]>
---
  arch/arm/Kconfig                     |   5 +
  board/altera/socfpga/Kconfig         |  16 +
  board/altera/socfpga/iocsr_config.c  | 688 +++++++++++++++++++++++++++++++++++
  board/altera/socfpga/iocsr_config.h  |   9 +
  board/altera/socfpga/pinmux_config.c | 215 +++++++++++
  configs/socfpga_arria5_defconfig     |   3 +
  include/configs/socfpga_arria5.h     | 107 ++++++
  7 files changed, 1043 insertions(+)

create mode 100644 configs/socfpga_arria5_defconfig create mode 100644 include/configs/socfpga_arria5.h

<snip>

Quoted 103 lines
include/configs/socfpga_arria5.h new file +97 -0
new file mode 100644
index 0000000..668a91e
@@ -0,0 +1,107 @@
+/*
+ * Copyright (C) 2014 Marek Vasut <[email protected]>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+#ifndef __CONFIG_SOCFPGA_ARRIA5_H__
+#define __CONFIG_SOCFPGA_ARRIA5_H__
+
+#include <asm/arch/socfpga_base_addrs.h>
+#include "../../board/altera/socfpga/pinmux_config.h"
+#include "../../board/altera/socfpga/iocsr_config.h"
+#include "../../board/altera/socfpga/pll_config.h"
+
+/* U-Boot Commands */
+#define CONFIG_SYS_NO_FLASH
+#include <config_cmd_default.h>
+#define CONFIG_DOS_PARTITION
+#define CONFIG_FAT_WRITE
+#define CONFIG_HW_WATCHDOG
+
+#define CONFIG_CMD_ASKENV
+#define CONFIG_CMD_BOOTZ
+#define CONFIG_CMD_CACHE
+#define CONFIG_CMD_DFU
+#define CONFIG_CMD_DHCP
+#define CONFIG_CMD_EXT4
+#define CONFIG_CMD_EXT4_WRITE
+#define CONFIG_CMD_FAT
+#define CONFIG_CMD_FPGA
+#define CONFIG_CMD_FS_GENERIC
+#define CONFIG_CMD_GREPENV
+#define CONFIG_CMD_MII
+#define CONFIG_CMD_MMC
+#define CONFIG_CMD_NET
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_SETEXPR
+#define CONFIG_CMD_USB
+#define CONFIG_CMD_USB_MASS_STORAGE
+
+#define CONFIG_REGEX			/* Enable regular expression support */
+
+/* Memory configurations */
+#define PHYS_SDRAM_1_SIZE		0x40000000	/* 1GiB on SoCDK */
+
+/* Booting Linux */
+#define CONFIG_BOOTDELAY	3
+#define CONFIG_BOOTFILE		"zImage"
+#define CONFIG_BOOTARGS		"console=ttyS0," __stringify(CONFIG_BAUDRATE)
+#ifdef CONFIG_SOCFPGA_VIRTUAL_TARGET
+#define CONFIG_BOOTCOMMAND	"run ramboot"
+#else
+#define CONFIG_BOOTCOMMAND	"run mmcload; run mmcboot"
+#endif
+#define CONFIG_LOADADDR		0x8000
+#define CONFIG_SYS_LOAD_ADDR	CONFIG_LOADADDR
+
+/* Ethernet on SoC (EMAC) */
+#if defined(CONFIG_CMD_NET)
+#define CONFIG_EMAC_BASE		SOCFPGA_EMAC1_ADDRESS
+#define CONFIG_PHY_INTERFACE_MODE	PHY_INTERFACE_MODE_RGMII
+
+/* PHY */
+#define CONFIG_PHY_MICREL
+#define CONFIG_PHY_MICREL_KSZ9021
+#define CONFIG_KSZ9021_CLK_SKEW_ENV	"micrel-ksz9021-clk-skew"
+#define CONFIG_KSZ9021_CLK_SKEW_VAL	0xf0f0
+#define CONFIG_KSZ9021_DATA_SKEW_ENV	"micrel-ksz9021-data-skew"
+#define CONFIG_KSZ9021_DATA_SKEW_VAL	0x0
+
+#endif
+
+/* USB */
+#ifdef CONFIG_CMD_USB
+#define CONFIG_USB_DWC2_REG_ADDR	SOCFPGA_USB1_ADDRESS
+#endif
+#define CONFIG_G_DNL_MANUFACTURER      "Altera"
+
+/* Extra Environment */
+#define CONFIG_HOSTNAME		socfpga_arria5
+
+#define CONFIG_EXTRA_ENV_SETTINGS \
+	"verify=n\0" \
+	"loadaddr= " __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
+	"ramboot=setenv bootargs " CONFIG_BOOTARGS ";" \
+		"bootm ${loadaddr} - ${fdt_addr}\0" \
+	"bootimage=zImage\0" \
+	"fdt_addr=100\0" \
+	"fdtimage=socfpga.dtb\0" \
+		"fsloadcmd=ext2load\0" \
+	"bootm ${loadaddr} - ${fdt_addr}\0" \
+	"mmcroot=/dev/mmcblk0p2\0" \
+	"mmcboot=setenv bootargs " CONFIG_BOOTARGS \
+		" root=${mmcroot} rw rootwait;" \
+		"bootz ${loadaddr} - ${fdt_addr}\0" \
+	"mmcload=mmc rescan;" \
+		"load mmc 0:1 ${loadaddr} ${bootimage};" \
+		"load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \

include/configs/socfpga_arria5.h line 107

Quoted 10 lines
include/configs/socfpga_arria5.h new file +10 -0
+	"qspiroot=/dev/mtdblock0\0" \
+	"qspirootfstype=jffs2\0" \
+	"qspiboot=setenv bootargs " CONFIG_BOOTARGS \
+		" root=${qspiroot} rw rootfstype=${qspirootfstype};"\
+		"bootm ${loadaddr} - ${fdt_addr}\0"
+
+/* The rest of the configuration is shared */
+#include <configs/socfpga_common.h>
+
+#endif	/* __CONFIG_SOCFPGA_ARRIA5_H__ */

Without really diff'ing this file with socfpga_cyclone5.h, I'm pretty sure that they share many lines. Wouldn't it make sense to move those common defines / configs to a common file instead (socfpga_common.h)?

Thanks,
Stefan

#12 lore raw

PATCH v2 8/10 arm: socfpga: Add Altera Arria V DK support

Quoted 10 lines · Stefan Roese
Quoted 9 lines · Marek Vasut

Add support for the Altera Arria V development kit.

Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Stefan Roese <[email protected]>
Cc Vince Bridgers <[email protected]>

---

[...]

Quoted 8 lines

include/configs/socfpga_arria5.h line 107

Quoted 4 lines
include/configs/socfpga_arria5.h new file +4 -0
+/* The rest of the configuration is shared */
+#include <configs/socfpga_common.h>
+
+#endif	/* __CONFIG_SOCFPGA_ARRIA5_H__ */

Without really diff'ing this file with socfpga_cyclone5.h, I'm pretty sure that they share many lines. Wouldn't it make sense to move those common defines / configs to a common file instead (socfpga_common.h)?

Hi!

I agree they share a lot, but I would not recommend moving any of this into socfpga_common.h . Not all boards which include socfpga_common.h will want all that's common between socfpga_cyclone5.h and socfpga_arria5.h as well.

We need to switch to DM really soon, since without DM, we cannot really make any "common" configuration. The socfpga_cyclone5.h file in fact represents a configuration for SoCDK with Cyclone 5, same for Arria 5.

Unless you have any suggestion, I'd just apply this stuff as is for now with the note that these config files must be cleaned up once DM is in place. Or do you have any suggestions please ?

Best regards,
Marek Vasut

#13 lore raw

PATCH v2 8/10 arm: socfpga: Add Altera Arria V DK support

Quoted 30 lines · Marek Vasut
Quoted 10 lines · Stefan Roese
Quoted 9 lines · Marek Vasut

Add support for the Altera Arria V development kit.

Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Stefan Roese <[email protected]>
Cc Vince Bridgers <[email protected]>

---

[...]

Quoted 8 lines

include/configs/socfpga_arria5.h line 107

Quoted 4 lines
include/configs/socfpga_arria5.h new file +4 -0
+/* The rest of the configuration is shared */
+#include <configs/socfpga_common.h>
+
+#endif	/* __CONFIG_SOCFPGA_ARRIA5_H__ */

Without really diff'ing this file with socfpga_cyclone5.h, I'm pretty sure that they share many lines. Wouldn't it make sense to move those common defines / configs to a common file instead (socfpga_common.h)?

Hi!

I agree they share a lot, but I would not recommend moving any of this into socfpga_common.h . Not all boards which include socfpga_common.h will want all that's common between socfpga_cyclone5.h and socfpga_arria5.h as well.

Quoted 7 lines

We need to switch to DM really soon, since without DM, we cannot really make any "common" configuration. The socfpga_cyclone5.h file in fact represents a configuration for SoCDK with Cyclone 5, same for Arria 5.

Unless you have any suggestion, I'd just apply this stuff as is for now with the note that these config files must be cleaned up once DM is in place. Or do you have any suggestions please ?

No. Please go ahead with this series. We can merge stuff later as well. Once we have better view on how this multi-board support for SoCFPGA will really end up.

Thanks,
Stefan

#14 lore raw

PATCH v2 8/10 arm: socfpga: Add Altera Arria V DK support

Quoted 35 lines · Stefan Roese
Quoted 34 lines · Marek Vasut
Quoted 10 lines · Stefan Roese
Quoted 9 lines · Marek Vasut

Add support for the Altera Arria V development kit.

Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Stefan Roese <[email protected]>
Cc Vince Bridgers <[email protected]>

---

[...]

Quoted 8 lines

include/configs/socfpga_arria5.h line 107

Quoted 4 lines
include/configs/socfpga_arria5.h new file +4 -0
+/* The rest of the configuration is shared */
+#include <configs/socfpga_common.h>
+
+#endif	/* __CONFIG_SOCFPGA_ARRIA5_H__ */

Without really diff'ing this file with socfpga_cyclone5.h, I'm pretty sure that they share many lines. Wouldn't it make sense to move those common defines / configs to a common file instead (socfpga_common.h)?

Hi!

I agree they share a lot, but I would not recommend moving any of this into socfpga_common.h . Not all boards which include socfpga_common.h will want all that's common between socfpga_cyclone5.h and socfpga_arria5.h as well.

We need to switch to DM really soon, since without DM, we cannot really make any "common" configuration. The socfpga_cyclone5.h file in fact represents a configuration for SoCDK with Cyclone 5, same for Arria 5.

Quoted 7 lines
Quoted 3 lines

Unless you have any suggestion, I'd just apply this stuff as is for now with the note that these config files must be cleaned up once DM is in place. Or do you have any suggestions please ?

No. Please go ahead with this series. We can merge stuff later as well. Once we have better view on how this multi-board support for SoCFPGA will really end up.

Yeah, I'm kinda tempted to merge it as-is, but I wanted to collect more feedback, since this was a discussed change. Thanks!

Best regards,
Marek Vasut

#15 lore raw

PATCH v2 8/10 arm: socfpga: Add Altera Arria V DK support

In reply to Marek Vasut
Quoted 30 lines · Marek Vasut
Quoted 10 lines · Stefan Roese
Quoted 9 lines · Marek Vasut

Add support for the Altera Arria V development kit.

Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Stefan Roese <[email protected]>
Cc Vince Bridgers <[email protected]>

---

[...]

Quoted 8 lines

include/configs/socfpga_arria5.h line 107

Quoted 4 lines
include/configs/socfpga_arria5.h new file +4 -0
+/* The rest of the configuration is shared */
+#include <configs/socfpga_common.h>
+
+#endif	/* __CONFIG_SOCFPGA_ARRIA5_H__ */

Without really diff'ing this file with socfpga_cyclone5.h, I'm pretty sure that they share many lines. Wouldn't it make sense to move those common defines / configs to a common file instead (socfpga_common.h)?

Hi!

I agree they share a lot, but I would not recommend moving any of this into socfpga_common.h . Not all boards which include socfpga_common.h will want all that's common between socfpga_cyclone5.h and socfpga_arria5.h as well.

Quoted 7 lines

We need to switch to DM really soon, since without DM, we cannot really make any "common" configuration. The socfpga_cyclone5.h file in fact represents a configuration for SoCDK with Cyclone 5, same for Arria 5.

Unless you have any suggestion, I'd just apply this stuff as is for now with the note that these config files must be cleaned up once DM is in place. Or do you have any suggestions please ?

Could we simply have socfpga_common_5.h which stuff that is shared between cyclone and arrira?
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#16 lore raw

PATCH v2 8/10 arm: socfpga: Add Altera Arria V DK support

Quoted 35 lines · Pavel Machek
Quoted 34 lines · Marek Vasut
Quoted 10 lines · Stefan Roese
Quoted 9 lines · Marek Vasut

Add support for the Altera Arria V development kit.

Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Stefan Roese <[email protected]>
Cc Vince Bridgers <[email protected]>

---

[...]

Quoted 8 lines

include/configs/socfpga_arria5.h line 107

Quoted 4 lines
include/configs/socfpga_arria5.h new file +4 -0
+/* The rest of the configuration is shared */
+#include <configs/socfpga_common.h>
+
+#endif	/* __CONFIG_SOCFPGA_ARRIA5_H__ */

Without really diff'ing this file with socfpga_cyclone5.h, I'm pretty sure that they share many lines. Wouldn't it make sense to move those common defines / configs to a common file instead (socfpga_common.h)?

Hi!

I agree they share a lot, but I would not recommend moving any of this into socfpga_common.h . Not all boards which include socfpga_common.h will want all that's common between socfpga_cyclone5.h and socfpga_arria5.h as well.

We need to switch to DM really soon, since without DM, we cannot really make any "common" configuration. The socfpga_cyclone5.h file in fact represents a configuration for SoCDK with Cyclone 5, same for Arria 5.

Quoted 6 lines
Quoted 3 lines

Unless you have any suggestion, I'd just apply this stuff as is for now with the note that these config files must be cleaned up once DM is in place. Or do you have any suggestions please ?

Could we simply have socfpga_common_5.h which stuff that is shared between cyclone and arrira?

Hi!

I think we can improve this later. In the end, the structure should be either the way DTs are structured in kernel OR we should have just one single config for all SoCFPGA boards. The later is of course preferred.

For now, I'm tempted to apply this as-is so we at least have the groundwork in place and can move on from that. What do you say ?

Best regards,
Marek Vasut

#17 lore raw

PATCH v2 8/10 arm: socfpga: Add Altera Arria V DK support

Quoted 8 lines

Hi!

I think we can improve this later. In the end, the structure should be either the way DTs are structured in kernel OR we should have just one single config for all SoCFPGA boards. The later is of course preferred.

For now, I'm tempted to apply this as-is so we at least have the groundwork in place and can move on from that. What do you say ?

We spent enough time arguing, just go ahead.
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#18 lore raw

PATCH v2 8/10 arm: socfpga: Add Altera Arria V DK support

Quoted 10 lines · Pavel Machek
Quoted 8 lines

Hi!

I think we can improve this later. In the end, the structure should be either the way DTs are structured in kernel OR we should have just one single config for all SoCFPGA boards. The later is of course preferred.

For now, I'm tempted to apply this as-is so we at least have the groundwork in place and can move on from that. What do you say ?

We spent enough time arguing, just go ahead.

Roger that !

Best regards,
Marek Vasut

#19 lore raw

PATCH 9/10 dt: socfpga: Import and enable Cyclone V DK DTS

In reply to Marek Vasut

Import DTS for Cyclone V development kit and enable support for DT. The DT is imported from Linux 3.19-rc1 as of commit 97bf6af1f928216fd6c5a66e8a57bfa95a659672 .

---
 arch/arm/dts/Makefile                   |  4 +-
 arch/arm/dts/socfpga_cyclone5_socdk.dts | 79 +++++++++++++++++++++++++++++++++
 configs/socfpga_cyclone5_defconfig      |  2 +
 3 files changed, 84 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/socfpga_cyclone5_socdk.dts
arch/arm/dts/Makefile +3 -1
index fac16cc..22f122f 100644
@@ -49,7 +49,9 @@ dtb-$(CONFIG_ZYNQ) += zynq-zc702.dtb \
 	zynq-zc770-xm013.dtb
 dtb-$(CONFIG_AM33XX) += am335x-boneblack.dtb
 
-dtb-$(CONFIG_SOCFPGA) += socfpga_cyclone5_socrates.dtb
+dtb-$(CONFIG_SOCFPGA) +=				\
+	socfpga_cyclone5_socdk.dtb			\
+	socfpga_cyclone5_socrates.dtb
 
 targets += $(dtb-y)
 
arch/arm/dts/socfpga_cyclone5_socdk.dts new file +79 -0

79 lines not on this page · raw message

configs/socfpga_cyclone5_defconfig +2 -0
index 4b2ede4..2d3dd47 100644
@@ -1,3 +1,5 @@
 CONFIG_SPL=y
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_SOCFPGA_CYCLONE5=y
+CONFIG_OF_CONTROL=y
+CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_socdk"
Signature · 1 line
2.1.3
#20 lore raw

PATCH 10/10 dt: socfpga: Import and enable Arria V DK DTS

In reply to Marek Vasut

Import DTS for Arria V development kit and enable support for DT. The DT is imported from Linux 3.19-rc1 as of commit 97bf6af1f928216fd6c5a66e8a57bfa95a659672 .

---
 arch/arm/dts/Makefile                 |  1 +
 arch/arm/dts/socfpga_arria5.dtsi      | 34 ++++++++++++++++
 arch/arm/dts/socfpga_arria5_socdk.dts | 74 +++++++++++++++++++++++++++++++++++
 configs/socfpga_arria5_defconfig      |  2 +
 4 files changed, 111 insertions(+)
 create mode 100644 arch/arm/dts/socfpga_arria5.dtsi
 create mode 100644 arch/arm/dts/socfpga_arria5_socdk.dts
arch/arm/dts/Makefile +1 -0
index 22f122f..cbe5b86 100644
@@ -50,6 +50,7 @@ dtb-$(CONFIG_ZYNQ) += zynq-zc702.dtb \
 dtb-$(CONFIG_AM33XX) += am335x-boneblack.dtb
 
 dtb-$(CONFIG_SOCFPGA) +=				\
+	socfpga_arria5_socdk.dtb			\
 	socfpga_cyclone5_socdk.dtb			\
 	socfpga_cyclone5_socrates.dtb
 
arch/arm/dts/socfpga_arria5.dtsi new file +34 -0
new file mode 100644
index 0000000..5175f03
@@ -0,0 +1,34 @@
+/*
+ *  Copyright (C) 2013 Altera Corporation <www.altera.com>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+/dts-v1/;
+/* First 4KB has trampoline code for secondary cores. */
+/memreserve/ 0x00000000 0x0001000;
+#include "socfpga.dtsi"
+
+/ {
+	soc {
+		clkmgr at ffd04000 {
+			clocks {
+				osc1 {
+					clock-frequency = <25000000>;
+				};
+			};
+		};
+
+		mmc0: dwmmc0 at ff704000 {
+			num-slots = <1>;
+			broken-cd;
+			bus-width = <4>;
+			cap-mmc-highspeed;
+			cap-sd-highspeed;
+		};
+
+		sysmgr at ffd08000 {
+			cpu1-start-addr = <0xffd080c4>;
+		};
+	};
+};
arch/arm/dts/socfpga_arria5_socdk.dts new file +74 -0

74 lines not on this page · raw message

configs/socfpga_arria5_defconfig +2 -0
index f290042..f152e9d 100644
@@ -1,3 +1,5 @@
 CONFIG_SPL=y
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_SOCFPGA_ARRIA5=y
+CONFIG_OF_CONTROL=y
+CONFIG_DEFAULT_DEVICE_TREE="socfpga_arria5_socdk"
Signature · 1 line
2.1.3