Commit 8f3bf559 authored by Nicolas Pouillon's avatar Nicolas Pouillon

software/library: Add ethernet to brain

parent 89853e07
...@@ -4,6 +4,12 @@ ...@@ -4,6 +4,12 @@
CONFIG_BMAAA CONFIG_BMAAA
CONFIG_BMAAA_BOARD brain CONFIG_BMAAA_BOARD brain
%subsection ethernet
CONFIG_DRIVER_NET_DWC10100
CONFIG_DRIVER_NET_DWC10100_MDIO_MEM
CONFIG_NET_ETHERNET
%end
%section bmaaa-pinky %section bmaaa-pinky
%inherit nrf51-xxac %inherit nrf51-xxac
......
...@@ -77,6 +77,26 @@ DEV_DECLARE_STATIC(timer4_dev, "timer4", 0, stm32_timer_drv, ...@@ -77,6 +77,26 @@ DEV_DECLARE_STATIC(timer4_dev, "timer4", 0, stm32_timer_drv,
DEV_STATIC_RES_IRQ(0, STM32_IRQ_TIM4, DEV_IRQ_SENSE_HIGH_LEVEL, 0, 0x1), DEV_STATIC_RES_IRQ(0, STM32_IRQ_TIM4, DEV_IRQ_SENSE_HIGH_LEVEL, 0, 0x1),
); );
#if defined(CONFIG_DRIVER_NET_DWC10100)
/* UART 4 */
DEV_DECLARE_STATIC(dwc10100_dev, "eth0", 0, dwc10100_drv,
DEV_STATIC_RES_MEM(STM32_ETHERNET_MAC_ADDR, STM32_ETHERNET_MAC_ADDR + STM32_ETHERNET_MAC_SIZE),
DEV_STATIC_RES_MEM(STM32_ETHERNET_MMC_ADDR, STM32_ETHERNET_MMC_ADDR + STM32_ETHERNET_MMC_SIZE),
DEV_STATIC_RES_MEM(STM32_ETHERNET_DMA_ADDR, STM32_ETHERNET_DMA_ADDR + STM32_ETHERNET_DMA_SIZE),
DEV_STATIC_RES_FREQ(72000000, 1),
DEV_STATIC_RES_DEV_PARAM("gpio", "/gpio"),
DEV_STATIC_RES_DEV_IOMUX("/gpio"),
DEV_STATIC_RES_IOMUX("mdc", 0, STM32_PC1, 0, 0),
DEV_STATIC_RES_IOMUX("mdio", 0, STM32_PA2, 0, 0),
DEV_STATIC_RES_GPIO("resetn", STM32_PC7, 1),
DEV_STATIC_RES_DEV_ICU("/cpu"),
DEV_STATIC_RES_IRQ(0, STM32_IRQ_ETH, DEV_IRQ_SENSE_HIGH_LEVEL, 0, 0x1),
);
#endif
#include <hexo/endian.h> #include <hexo/endian.h>
#include <hexo/iospace.h> #include <hexo/iospace.h>
#include <arch/stm32/f1/rcc.h> #include <arch/stm32/f1/rcc.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment