]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: pic32mzda: enable USB-host, USB-storage support.
authorPurna Chandra Mandal <purna.mandal@microchip.com>
Mon, 21 Mar 2016 07:35:43 +0000 (13:05 +0530)
committerMarek Vasut <marex@denx.de>
Sun, 10 Apr 2016 15:18:42 +0000 (17:18 +0200)
Enable MUSB host and USB storage support for Microchip
PIC32MZ[DA] Starter Kit.

Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com>
arch/mips/dts/pic32mzda.dtsi
arch/mips/dts/pic32mzda_sk.dts
configs/pic32mzdask_defconfig
include/configs/pic32mzdask.h

index 7d180d9918cb53fe3e934896ce5f584e82445e75..8a554f996d7f0795efabebc83451564db41526c1 100644 (file)
                #address-cells = <1>;
                #size-cells = <0>;
        };
+
+       usb: musb@1f8e3000 {
+               compatible = "microchip,pic32mzda-usb";
+               reg = <0x1f8e3000 0x1000>,
+                     <0x1f884000 0x1000>;
+               reg-names = "mc", "control";
+               interrupts = <132 IRQ_TYPE_EDGE_RISING>,
+                            <133 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&clock PB5CLK>;
+               clock-names = "usb_clk";
+               status = "disabled";
+       };
 };
index e5ce0bdc2e063ac3bbd328af2c6626b10f63a12e..0a7847e4e7c7e864c607d1348acb9915b4a9dc49 100644 (file)
@@ -52,4 +52,8 @@
        ethernet_phy: lan8740_phy@0 {
                reg = <0>;
        };
+};
+
+&usb {
+       status = "okay";
 };
\ No newline at end of file
index 4017983b008914d914c832069ee817f12e974266..eba6cd5e070d93e2a669ce286c265cff32b7201d 100644 (file)
@@ -14,6 +14,7 @@ CONFIG_LOOPW=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_MEMINFO=y
 # CONFIG_CMD_FLASH is not set
+CONFIG_CMD_USB=y
 # CONFIG_CMD_FPGA is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_RARP=y
@@ -30,5 +31,10 @@ CONFIG_PIC32_ETH=y
 CONFIG_PINCTRL=y
 # CONFIG_PINCTRL_FULL is not set
 CONFIG_USE_PRIVATE_LIBGCC=y
+CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_USB_MUSB_HOST=y
+CONFIG_USB_MUSB_PIC32=y
+CONFIG_USB_STORAGE=y
 CONFIG_USE_TINY_PRINTF=y
 CONFIG_CMD_DHRYSTONE=y
index 3ea11946b8ab4ce76a879b1509df304ac448ce00..78faaec6479ad34b3208431887a6f20fdd74fd3b 100644 (file)
 #define CONFIG_GENERIC_MMC
 #define CONFIG_CMD_MMC
 
+/*--------------------------------------------------
+ * USB Configuration
+ */
+#define CONFIG_USB_MUSB_PIO_ONLY
+#define CONFIG_SYS_CACHELINE_SIZE      16
+
 /*-----------------------------------------------------------------------
  * File System Configuration
  */
 
 #define BOOT_TARGET_DEVICES(func)      \
        func(MMC, mmc, 0)               \
+       func(USB, usb, 0)               \
        func(DHCP, dhcp, na)
 
 #include <config_distro_bootcmd.h>