Commit 5b5226a8e68eae394aed7ca2d7691ebd7ef8ba4e

Authored by Marek Vasut
1 parent c90ada94fb

arm: socfpga: de0_nano: Probe DWC2 UDC from OF instead of hard-coded data

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@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Lukasz Majewski <l.majewski@majess.pl>
Cc: Lukasz Majewski <l.majewski@samsung.com>

Showing 3 changed files with 7 additions and 3 deletions Side-by-side Diff

arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts
... ... @@ -16,6 +16,7 @@
16 16  
17 17 aliases {
18 18 ethernet0 = &gmac1;
  19 + udc0 = &usb1;
19 20 };
20 21  
21 22 memory {
... ... @@ -58,5 +59,9 @@
58 59 &mmc0 {
59 60 status = "okay";
60 61 u-boot,dm-pre-reloc;
  62 +};
  63 +
  64 +&usb1 {
  65 + status = "okay";
61 66 };
configs/socfpga_de0_nano_soc_defconfig
... ... @@ -19,4 +19,6 @@
19 19 CONFIG_CADENCE_QSPI=y
20 20 CONFIG_DESIGNWARE_SPI=y
21 21 CONFIG_DM_MMC=y
  22 +CONFIG_USB=y
  23 +CONFIG_DM_USB=y
include/configs/socfpga_de0_nano_soc.h
... ... @@ -56,9 +56,6 @@
56 56 #define CONFIG_ENV_OFFSET 512 /* just after the MBR */
57 57  
58 58 /* USB */
59   -#ifdef CONFIG_CMD_USB
60   -#define CONFIG_USB_DWC2_REG_ADDR SOCFPGA_USB1_ADDRESS
61   -#endif
62 59 #define CONFIG_G_DNL_MANUFACTURER "Terasic"
63 60  
64 61 /* Extra Environment */