700-swconfig_switch_drivers.patch 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. From 36e516290611e613aa92996cb4339561452695b4 Mon Sep 17 00:00:00 2001
  2. From: Felix Fietkau <nbd@nbd.name>
  3. Date: Fri, 7 Jul 2017 17:24:23 +0200
  4. Subject: net: swconfig: adds openwrt switch layer
  5. Signed-off-by: Felix Fietkau <nbd@nbd.name>
  6. ---
  7. drivers/net/phy/Kconfig | 83 +++++++++++++++++++++++++++++++++++++++++++++++
  8. drivers/net/phy/Makefile | 15 +++++++++
  9. include/uapi/linux/Kbuild | 1 +
  10. 3 files changed, 99 insertions(+)
  11. --- a/drivers/net/phy/Kconfig
  12. +++ b/drivers/net/phy/Kconfig
  13. @@ -198,6 +198,89 @@ config LED_TRIGGER_PHY
  14. <Speed in megabits>Mbps or <Speed in gigabits>Gbps
  15. +comment "Switch configuration API + drivers"
  16. +
  17. +config SWCONFIG
  18. + tristate "Switch configuration API"
  19. + ---help---
  20. + Switch configuration API using netlink. This allows
  21. + you to configure the VLAN features of certain switches.
  22. +
  23. +config SWCONFIG_LEDS
  24. + bool "Switch LED trigger support"
  25. + depends on (SWCONFIG && LEDS_TRIGGERS)
  26. +
  27. +config ADM6996_PHY
  28. + tristate "Driver for ADM6996 switches"
  29. + select SWCONFIG
  30. + ---help---
  31. + Currently supports the ADM6996FC and ADM6996M switches.
  32. + Support for FC is very limited.
  33. +
  34. +config AR8216_PHY
  35. + tristate "Driver for Atheros AR8216 switches"
  36. + select ETHERNET_PACKET_MANGLE
  37. + select SWCONFIG
  38. +
  39. +config AR8216_PHY_LEDS
  40. + bool "Atheros AR8216 switch LED support"
  41. + depends on (AR8216_PHY && LEDS_CLASS)
  42. +
  43. +source "drivers/net/phy/b53/Kconfig"
  44. +
  45. +config IP17XX_PHY
  46. + tristate "Driver for IC+ IP17xx switches"
  47. + select SWCONFIG
  48. +
  49. +config MVSWITCH_PHY
  50. + tristate "Driver for Marvell 88E6060 switches"
  51. + select ETHERNET_PACKET_MANGLE
  52. +
  53. +config MVSW61XX_PHY
  54. + tristate "Driver for Marvell 88E6171/6172 switches"
  55. + select SWCONFIG
  56. +
  57. +config PSB6970_PHY
  58. + tristate "Lantiq XWAY Tantos (PSB6970) Ethernet switch"
  59. + select SWCONFIG
  60. + select ETHERNET_PACKET_MANGLE
  61. +
  62. +config RTL8306_PHY
  63. + tristate "Driver for Realtek RTL8306S switches"
  64. + select SWCONFIG
  65. +
  66. +config RTL8366_SMI
  67. + tristate "Driver for the RTL8366 SMI interface"
  68. + depends on GPIOLIB
  69. + ---help---
  70. + This module implements the SMI interface protocol which is used
  71. + by some RTL8366 ethernet switch devices via the generic GPIO API.
  72. +
  73. +if RTL8366_SMI
  74. +
  75. +config RTL8366_SMI_DEBUG_FS
  76. + bool "RTL8366 SMI interface debugfs support"
  77. + depends on DEBUG_FS
  78. + default n
  79. +
  80. +config RTL8366S_PHY
  81. + tristate "Driver for the Realtek RTL8366S switch"
  82. + select SWCONFIG
  83. +
  84. +config RTL8366RB_PHY
  85. + tristate "Driver for the Realtek RTL8366RB switch"
  86. + select SWCONFIG
  87. +
  88. +config RTL8367_PHY
  89. + tristate "Driver for the Realtek RTL8367R/M switches"
  90. + select SWCONFIG
  91. +
  92. +config RTL8367B_PHY
  93. + tristate "Driver fot the Realtek RTL8367R-VB switch"
  94. + select SWCONFIG
  95. +
  96. +endif # RTL8366_SMI
  97. +
  98. comment "MII PHY device drivers"
  99. config SFP
  100. --- a/drivers/net/phy/Makefile
  101. +++ b/drivers/net/phy/Makefile
  102. @@ -22,6 +22,21 @@ libphy-$(CONFIG_LED_TRIGGER_PHY) += phy_
  103. obj-$(CONFIG_PHYLINK) += phylink.o
  104. obj-$(CONFIG_PHYLIB) += libphy.o
  105. +obj-$(CONFIG_SWCONFIG) += swconfig.o
  106. +obj-$(CONFIG_ADM6996_PHY) += adm6996.o
  107. +obj-$(CONFIG_AR8216_PHY) += ar8216.o ar8327.o
  108. +obj-$(CONFIG_SWCONFIG_B53) += b53/
  109. +obj-$(CONFIG_IP17XX_PHY) += ip17xx.o
  110. +obj-$(CONFIG_MVSWITCH_PHY) += mvswitch.o
  111. +obj-$(CONFIG_MVSW61XX_PHY) += mvsw61xx.o
  112. +obj-$(CONFIG_PSB6970_PHY) += psb6970.o
  113. +obj-$(CONFIG_RTL8306_PHY) += rtl8306.o
  114. +obj-$(CONFIG_RTL8366_SMI) += rtl8366_smi.o
  115. +obj-$(CONFIG_RTL8366S_PHY) += rtl8366s.o
  116. +obj-$(CONFIG_RTL8366RB_PHY) += rtl8366rb.o
  117. +obj-$(CONFIG_RTL8367_PHY) += rtl8367.o
  118. +obj-$(CONFIG_RTL8367B_PHY) += rtl8367b.o
  119. +
  120. obj-$(CONFIG_MDIO_BCM_IPROC) += mdio-bcm-iproc.o
  121. obj-$(CONFIG_MDIO_BCM_UNIMAC) += mdio-bcm-unimac.o
  122. obj-$(CONFIG_MDIO_BITBANG) += mdio-bitbang.o