]> git.sur5r.net Git - u-boot/commitdiff
board: Enable ethernet, tftpboot support to pic32mzdask board.
authorPurna Chandra Mandal <purna.mandal@microchip.com>
Thu, 28 Jan 2016 10:00:22 +0000 (15:30 +0530)
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Mon, 1 Feb 2016 21:14:02 +0000 (22:14 +0100)
This adds ethernet, TFTP support for PIC32MZ[DA] Starter Kit. Also
custom environment variables/scripts are added to help boot from network.

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 f1894ec37cabc0291c6aab9efde59784eebaa20c..7d180d9918cb53fe3e934896ce5f584e82445e75 100644 (file)
                bus-width = <4>;
                status = "disabled";
        };
+
+       ethernet: ethernet@1f882000 {
+               compatible = "microchip,pic32mzda-eth";
+               reg = <0x1f882000 0x1000>;
+               interrupts = <153 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&clock PB5CLK>;
+               status = "disabled";
+               #address-cells = <1>;
+               #size-cells = <0>;
+       };
 };
index f886a0f87f68ce0a9baedf1afd2199c361848dc7..e5ce0bdc2e063ac3bbd328af2c6626b10f63a12e 100644 (file)
 
 &sdhci {
        status = "okay";
+};
+
+&ethernet {
+       reset-gpios = <&gpioJ 15 0>;
+       status = "okay";
+       phy-mode = "rmii";
+       phy-handle = <&ethernet_phy>;
+       ethernet_phy: lan8740_phy@0 {
+               reg = <0>;
+       };
 };
\ No newline at end of file
index 55ba3f87abb18e7b34335cb7f73012739dfcb6d8..169a2ac3dd448388ce7ec4f8a8b90150353ab381 100644 (file)
@@ -16,16 +16,19 @@ CONFIG_CMD_MEMINFO=y
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
 CONFIG_CMD_GPIO=y
-# CONFIG_CMD_NET is not set
-# CONFIG_CMD_NFS is not set
+CONFIG_CMD_RARP=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_PING=y
 CONFIG_CMD_TIME=y
 CONFIG_OF_EMBED=y
+CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_CLK=y
 CONFIG_DM_MMC=y
 CONFIG_PIC32_SDHCI=y
+CONFIG_DM_ETH=y
+CONFIG_PIC32_ETH=y
 CONFIG_PINCTRL=y
 # CONFIG_PINCTRL_FULL is not set
 CONFIG_SYS_VSNPRINTF=y
 CONFIG_USE_TINY_PRINTF=y
-CONFIG_REGEX=y
 CONFIG_CMD_DHRYSTONE=y
index b25803897e6debed35a6d83182911674bb86c2ac..3ea11946b8ab4ce76a879b1509df304ac448ce00 100644 (file)
                (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
 #define CONFIG_CMDLINE_EDITING         1
 
+/*-----------------------------------------------------------------------
+ * Networking Configuration
+ */
+#define CONFIG_MII
+#define CONFIG_PHY_SMSC
+#define CONFIG_SYS_RX_ETH_BUFFER       8
+#define CONFIG_NET_RETRY_COUNT         20
+#define CONFIG_ARP_TIMEOUT             500 /* millisec */
+
+#define CONFIG_CMD_MII
+
+/*
+ * BOOTP options
+ */
+#define CONFIG_BOOTP_BOOTFILESIZE
+#define CONFIG_BOOTP_BOOTPATH
+#define CONFIG_BOOTP_GATEWAY
+#define CONFIG_BOOTP_HOSTNAME
+
 /*
  * Handover flattened device tree (dtb file) to Linux kernel
  */
                "fi; \0"
 
 #define BOOT_TARGET_DEVICES(func)      \
-       func(MMC, mmc, 0)
+       func(MMC, mmc, 0)               \
+       func(DHCP, dhcp, na)
 
 #include <config_distro_bootcmd.h>