[U-Boot] [PATCH 4/7] arm: socfpga: de0_nano: Probe DWC2 UDC from OF instead of hard-coded data

Marek Vasut marex at denx.de
Sat Dec 5 21:43:17 CET 2015


This patch adds the necessary OF alias for the UDC node, which let's
the code locate the DWC2 UDC base address in OF instead of hard-coding
it into the U-Boot binary. The code is adjusted to use the address from
OF instead of the hard-coded one. Finally, the hard-coded address is
removed and USB DM support is enabled.

Signed-off-by: Marek Vasut <marex at denx.de>
Cc: Chin Liang See <clsee at altera.com>
Cc: Dinh Nguyen <dinguyen at opensource.altera.com>
Cc: Lukasz Majewski <l.majewski at majess.pl>
Cc: Lukasz Majewski <l.majewski at samsung.com>
---
 arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts | 5 +++++
 configs/socfpga_de0_nano_soc_defconfig         | 2 ++
 include/configs/socfpga_de0_nano_soc.h         | 3 ---
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts b/arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts
index b649c9a..dc09bed 100644
--- a/arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts
+++ b/arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts
@@ -16,6 +16,7 @@
 
 	aliases {
 		ethernet0 = &gmac1;
+		udc0 = &usb1;
 	};
 
 	memory {
@@ -59,3 +60,7 @@
 	status = "okay";
 	u-boot,dm-pre-reloc;
 };
+
+&usb1 {
+	status = "okay";
+};
diff --git a/configs/socfpga_de0_nano_soc_defconfig b/configs/socfpga_de0_nano_soc_defconfig
index a4f75e6..65c1197 100644
--- a/configs/socfpga_de0_nano_soc_defconfig
+++ b/configs/socfpga_de0_nano_soc_defconfig
@@ -19,3 +19,5 @@ CONFIG_SYS_NS16550=y
 CONFIG_CADENCE_QSPI=y
 CONFIG_DESIGNWARE_SPI=y
 CONFIG_DM_MMC=y
+CONFIG_USB=y
+CONFIG_DM_USB=y
diff --git a/include/configs/socfpga_de0_nano_soc.h b/include/configs/socfpga_de0_nano_soc.h
index 870192d..d27aa9b 100644
--- a/include/configs/socfpga_de0_nano_soc.h
+++ b/include/configs/socfpga_de0_nano_soc.h
@@ -56,9 +56,6 @@
 #define CONFIG_ENV_OFFSET		512	/* just after the MBR */
 
 /* USB */
-#ifdef CONFIG_CMD_USB
-#define CONFIG_USB_DWC2_REG_ADDR	SOCFPGA_USB1_ADDRESS
-#endif
 #define CONFIG_G_DNL_MANUFACTURER      "Terasic"
 
 /* Extra Environment */
-- 
2.1.4



More information about the U-Boot mailing list