summaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2013-09-17 10:52:23 -0600
committerGregory Nutt <gnutt@nuttx.org>2013-09-17 10:52:23 -0600
commitd17f2af35dc6b57ef4dc92ccc2a287d927ed7905 (patch)
tree46f292dd092657945ee19eac5e1a411dbf8a0bc9 /nuttx
parent59dcc17a925acf09087678bc6c1d5077336517a4 (diff)
downloadpx4-nuttx-d17f2af35dc6b57ef4dc92ccc2a287d927ed7905.tar.gz
px4-nuttx-d17f2af35dc6b57ef4dc92ccc2a287d927ed7905.tar.bz2
px4-nuttx-d17f2af35dc6b57ef4dc92ccc2a287d927ed7905.zip
Add support for multiple PHY selections for multiple Ethernet MAC drivers
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/drivers/Kconfig15
-rw-r--r--nuttx/drivers/net/Kconfig69
-rw-r--r--nuttx/net/Kconfig22
3 files changed, 81 insertions, 25 deletions
diff --git a/nuttx/drivers/Kconfig b/nuttx/drivers/Kconfig
index 16a9e2d32..9923f1ca7 100644
--- a/nuttx/drivers/Kconfig
+++ b/nuttx/drivers/Kconfig
@@ -318,11 +318,20 @@ source drivers/mtd/Kconfig
endif
menuconfig NETDEVICES
- bool "Network Device Support"
- default n
+ bool "Network Device/PHY Support"
+ default n if !ARCH_HAVE_PHY
+ default y if ARCH_HAVE_PHY
depends on NET
---help---
- Network interface drivers. See also include/nuttx/net/net.h
+ Network interface driver and PHY selections. This options enables
+ selection of drivers for external Ethernet MAC chips. The majority
+ of MCUs, however, have built-in, internal Ethernet MAC peripherals
+ and that Ethernet support is selected in the MCU-specific
+ configuration menus.
+
+ Most Ethernet MAC drivers, whether internal or external, will
+ require configuration of an external PHY device. That external PHY
+ device is also selected via this menu.
if NETDEVICES
source drivers/net/Kconfig
diff --git a/nuttx/drivers/net/Kconfig b/nuttx/drivers/net/Kconfig
index 346a51e60..133a7cc8c 100644
--- a/nuttx/drivers/net/Kconfig
+++ b/nuttx/drivers/net/Kconfig
@@ -2,6 +2,16 @@
# For a description of the syntax of this configuration file,
# see misc/tools/kconfig-language.txt.
#
+
+config NETDEV_MULTINIC
+ bool "Multiple NIC support"
+ default n
+ ---help---
+ Select this option if you board and/or MCU are capable of supporting
+ multiple Ethernet MAC drivers.
+
+comment "External Ethernet MAC Device Support"
+
config NET_DM90x0
bool "Davicom dm9000/dm9010 support"
default n
@@ -149,3 +159,62 @@ config NET_VNET
bool "VNET support"
default n
+if ARCH_HAVE_PHY
+
+comment "External Ethernet PHY Device Support"
+
+choice
+ prompt "Board PHY Selection (ETH0)"
+ default ETH0_PHY_NONE
+ ---help---
+ Identify the PHY on your board. This setting is not used by all Ethernet
+ drivers nor do all Ethernet drivers support all PHYs.
+
+config ETH0_PHY_NONE
+ bool "No PHY support"
+
+config ETH0_PHY_KS8721
+ bool "Micrel KS8721 PHY"
+
+config ETH0_PHY_KSZ8051
+ bool "Micrel KSZ8051 PHY"
+
+config ETH0_PHY_DP83848C
+ bool "National Semiconduction DP83848C PHY"
+
+config ETH0_PHY_LAN8720
+ bool "SMSC LAN8720 PHY"
+
+config ETH0_PHY_DM9161
+ bool "Davicom DM9161 PHY"
+
+endchoice
+
+choice
+ prompt "Board PHY Selection (ETH1)"
+ default ETH1_PHY_NONE
+ depends on NETDEV_MULTINIC
+ ---help---
+ Identify the PHY on your board. This setting is not used by all Ethernet
+ drivers nor do all Ethernet drivers support all PHYs.
+
+config ETH1_PHY_NONE
+ bool "No PHY support"
+
+config ETH1_PHY_KS8721
+ bool "Micrel KS8721 PHY"
+
+config ETH1_PHY_KSZ8051
+ bool "Micrel KSZ8051 PHY"
+
+config ETH1_PHY_DP83848C
+ bool "National Semiconduction DP83848C PHY"
+
+config ETH1_PHY_LAN8720
+ bool "SMSC LAN8720 PHY"
+
+config ETH1_PHY_DM9161
+ bool "Davicom DM9161 PHY"
+
+endchoice
+endif # ARCH_HAVE_PHY
diff --git a/nuttx/net/Kconfig b/nuttx/net/Kconfig
index ccc01a6dc..bddd9d56e 100644
--- a/nuttx/net/Kconfig
+++ b/nuttx/net/Kconfig
@@ -14,28 +14,6 @@ config ARCH_HAVE_PHY
if NET
-choice
- prompt "Board PHY Selection"
- depends on ARCH_HAVE_PHY
- default PHY_KS8721
- ---help---
- Identify the PHY on your board. This setting is not used by all Ethernet
- drivers no do all Ethernet drivers support all PHYs.
-
-config PHY_KS8721
- bool "Micrel KS8721 PHY"
-
-config PHY_DP83848C
- bool "National Semiconduction DP83848C PHY"
-
-config PHY_LAN8720
- bool "SMSC LAN8720 PHY"
-
-config PHY_DM9161
- bool "Davicom DM9161 PHY"
-
-endchoice
-
config NET_NOINTS
bool "Not interrupt driven"
default n