700-swconfig_switch_drivers.patch 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. From 36e516290611e613aa92996cb4339561452695b4 Mon Sep 17 00:00:00 2001
  2. From: Felix Fietkau <[email protected]>
  3. Date: Fri, 7 Jul 2017 17:24:23 +0200
  4. Subject: net: swconfig: adds openwrt switch layer
  5. Signed-off-by: Felix Fietkau <[email protected]>
  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. @@ -147,6 +147,89 @@ config MDIO_XGENE
  14. This module provides a driver for the MDIO busses found in the
  15. APM X-Gene SoC's.
  16. +comment "Switch configuration API + drivers"
  17. +
  18. +config SWCONFIG
  19. + tristate "Switch configuration API"
  20. + ---help---
  21. + Switch configuration API using netlink. This allows
  22. + you to configure the VLAN features of certain switches.
  23. +
  24. +config SWCONFIG_LEDS
  25. + bool "Switch LED trigger support"
  26. + depends on (SWCONFIG && LEDS_TRIGGERS)
  27. +
  28. +config ADM6996_PHY
  29. + tristate "Driver for ADM6996 switches"
  30. + select SWCONFIG
  31. + ---help---
  32. + Currently supports the ADM6996FC and ADM6996M switches.
  33. + Support for FC is very limited.
  34. +
  35. +config AR8216_PHY
  36. + tristate "Driver for Atheros AR8216 switches"
  37. + select ETHERNET_PACKET_MANGLE
  38. + select SWCONFIG
  39. +
  40. +config AR8216_PHY_LEDS
  41. + bool "Atheros AR8216 switch LED support"
  42. + depends on (AR8216_PHY && LEDS_CLASS)
  43. +
  44. +source "drivers/net/phy/b53/Kconfig"
  45. +
  46. +config IP17XX_PHY
  47. + tristate "Driver for IC+ IP17xx switches"
  48. + select SWCONFIG
  49. +
  50. +config MVSWITCH_PHY
  51. + tristate "Driver for Marvell 88E6060 switches"
  52. + select ETHERNET_PACKET_MANGLE
  53. +
  54. +config MVSW61XX_PHY
  55. + tristate "Driver for Marvell 88E6171/6172 switches"
  56. + select SWCONFIG
  57. +
  58. +config PSB6970_PHY
  59. + tristate "Lantiq XWAY Tantos (PSB6970) Ethernet switch"
  60. + select SWCONFIG
  61. + select ETHERNET_PACKET_MANGLE
  62. +
  63. +config RTL8306_PHY
  64. + tristate "Driver for Realtek RTL8306S switches"
  65. + select SWCONFIG
  66. +
  67. +config RTL8366_SMI
  68. + tristate "Driver for the RTL8366 SMI interface"
  69. + depends on GPIOLIB
  70. + ---help---
  71. + This module implements the SMI interface protocol which is used
  72. + by some RTL8366 ethernet switch devices via the generic GPIO API.
  73. +
  74. +if RTL8366_SMI
  75. +
  76. +config RTL8366_SMI_DEBUG_FS
  77. + bool "RTL8366 SMI interface debugfs support"
  78. + depends on DEBUG_FS
  79. + default n
  80. +
  81. +config RTL8366S_PHY
  82. + tristate "Driver for the Realtek RTL8366S switch"
  83. + select SWCONFIG
  84. +
  85. +config RTL8366RB_PHY
  86. + tristate "Driver for the Realtek RTL8366RB switch"
  87. + select SWCONFIG
  88. +
  89. +config RTL8367_PHY
  90. + tristate "Driver for the Realtek RTL8367R/M switches"
  91. + select SWCONFIG
  92. +
  93. +config RTL8367B_PHY
  94. + tristate "Driver fot the Realtek RTL8367R-VB switch"
  95. + select SWCONFIG
  96. +
  97. +endif # RTL8366_SMI
  98. +
  99. comment "MII PHY device drivers"
  100. config AMD_PHY
  101. --- a/drivers/net/phy/Makefile
  102. +++ b/drivers/net/phy/Makefile
  103. @@ -5,6 +5,21 @@ libphy-$(CONFIG_SWPHY) += swphy.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
  123. --- a/include/uapi/linux/Kbuild
  124. +++ b/include/uapi/linux/Kbuild
  125. @@ -399,6 +399,7 @@ header-y += stddef.h
  126. header-y += string.h
  127. header-y += suspend_ioctls.h
  128. header-y += swab.h
  129. +header-y += switch.h
  130. header-y += synclink.h
  131. header-y += sync_file.h
  132. header-y += sysctl.h