Kconfig.projbuild 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. menu "Example Ethernet Configuration"
  2. orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps"
  3. config EXAMPLE_USE_INTERNAL_ETHERNET
  4. depends on SOC_EMAC_SUPPORTED
  5. select ETH_USE_ESP32_EMAC
  6. default y
  7. bool "Internal EMAC"
  8. help
  9. Use internal Ethernet MAC controller.
  10. if EXAMPLE_USE_INTERNAL_ETHERNET
  11. choice EXAMPLE_ETH_PHY_MODEL
  12. prompt "Ethernet PHY Device"
  13. default EXAMPLE_ETH_PHY_IP101
  14. help
  15. Select the Ethernet PHY device to use in the example.
  16. config EXAMPLE_ETH_PHY_IP101
  17. bool "IP101"
  18. help
  19. IP101 is a single port 10/100 MII/RMII/TP/Fiber Fast Ethernet Transceiver.
  20. Goto http://www.icplus.com.tw/pp-IP101G.html for more information about it.
  21. config EXAMPLE_ETH_PHY_RTL8201
  22. bool "RTL8201/SR8201"
  23. help
  24. RTL8201F/SR8201F is a single port 10/100Mb Ethernet Transceiver with auto MDIX.
  25. Goto http://www.corechip-sz.com/productsview.asp?id=22 for more information about it.
  26. config EXAMPLE_ETH_PHY_LAN87XX
  27. bool "LAN87xx"
  28. help
  29. Below chips are supported:
  30. LAN8710A is a small footprint MII/RMII 10/100 Ethernet Transceiver with HP Auto-MDIX and
  31. flexPWR® Technology.
  32. LAN8720A is a small footprint RMII 10/100 Ethernet Transceiver with HP Auto-MDIX Support.
  33. LAN8740A/LAN8741A is a small footprint MII/RMII 10/100 Energy Efficient Ethernet Transceiver
  34. with HP Auto-MDIX and flexPWR® Technology.
  35. LAN8742A is a small footprint RMII 10/100 Ethernet Transceiver with HP Auto-MDIX and
  36. flexPWR® Technology.
  37. Goto https://www.microchip.com for more information about them.
  38. config EXAMPLE_ETH_PHY_DP83848
  39. bool "DP83848"
  40. help
  41. DP83848 is a single port 10/100Mb/s Ethernet Physical Layer Transceiver.
  42. Goto http://www.ti.com/product/DP83848J for more information about it.
  43. config EXAMPLE_ETH_PHY_KSZ80XX
  44. bool "KSZ80xx"
  45. help
  46. With the KSZ80xx series, Microchip offers single-chip 10BASE-T/100BASE-TX
  47. Ethernet Physical Layer Tranceivers (PHY).
  48. The following chips are supported: KSZ8001, KSZ8021, KSZ8031, KSZ8041,
  49. KSZ8051, KSZ8061, KSZ8081, KSZ8091
  50. Goto https://www.microchip.com for more information about them.
  51. endchoice # EXAMPLE_ETH_PHY_MODEL
  52. config EXAMPLE_ETH_MDC_GPIO
  53. int "SMI MDC GPIO number"
  54. range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
  55. default 23
  56. help
  57. Set the GPIO number used by SMI MDC.
  58. config EXAMPLE_ETH_MDIO_GPIO
  59. int "SMI MDIO GPIO number"
  60. range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
  61. default 18
  62. help
  63. Set the GPIO number used by SMI MDIO.
  64. config EXAMPLE_ETH_PHY_RST_GPIO
  65. int "PHY Reset GPIO number"
  66. range -1 ENV_GPIO_OUT_RANGE_MAX
  67. default 5
  68. help
  69. Set the GPIO number used to reset PHY chip.
  70. Set to -1 to disable PHY chip hardware reset.
  71. config EXAMPLE_ETH_PHY_ADDR
  72. int "PHY Address"
  73. range 0 31
  74. default 1
  75. help
  76. Set PHY address according your board schematic.
  77. endif # EXAMPLE_USE_INTERNAL_ETHERNET
  78. config EXAMPLE_USE_SPI_ETHERNET
  79. bool "SPI Ethernet"
  80. default n
  81. select ETH_USE_SPI_ETHERNET
  82. help
  83. Use external SPI-Ethernet module(s).
  84. if EXAMPLE_USE_SPI_ETHERNET
  85. config EXAMPLE_SPI_ETHERNETS_NUM
  86. int "Number of SPI Ethernet modules to use at a time"
  87. range 1 2
  88. default 1
  89. help
  90. Set the number of SPI Ethernet modules you want to use at a time. Multiple SPI modules can be connected
  91. to one SPI interface and can be separately accessed based on state of associated Chip Select (CS).
  92. choice EXAMPLE_ETHERNET_TYPE_SPI
  93. prompt "Ethernet SPI"
  94. default EXAMPLE_USE_W5500
  95. help
  96. Select which kind of Ethernet will be used in the example.
  97. config EXAMPLE_USE_DM9051
  98. bool "DM9051 Module"
  99. select ETH_SPI_ETHERNET_DM9051
  100. help
  101. Select external SPI-Ethernet module (DM9051).
  102. config EXAMPLE_USE_KSZ8851SNL
  103. bool "KSZ8851SNL Module"
  104. select ETH_SPI_ETHERNET_KSZ8851SNL
  105. help
  106. Select external SPI-Ethernet module (KSZ8851SNL).
  107. config EXAMPLE_USE_W5500
  108. bool "W5500 Module"
  109. select ETH_SPI_ETHERNET_W5500
  110. help
  111. Select external SPI-Ethernet module (W5500).
  112. endchoice
  113. config EXAMPLE_ETH_SPI_HOST
  114. int "SPI Host Number"
  115. range 0 2
  116. default 1
  117. help
  118. Set the SPI host used to communicate with the SPI Ethernet Controller.
  119. config EXAMPLE_ETH_SPI_SCLK_GPIO
  120. int "SPI SCLK GPIO number"
  121. range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
  122. default 14 if IDF_TARGET_ESP32
  123. default 12 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
  124. default 6 if IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C2
  125. help
  126. Set the GPIO number used by SPI SCLK.
  127. config EXAMPLE_ETH_SPI_MOSI_GPIO
  128. int "SPI MOSI GPIO number"
  129. range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
  130. default 13 if IDF_TARGET_ESP32
  131. default 11 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
  132. default 7 if IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C2
  133. help
  134. Set the GPIO number used by SPI MOSI.
  135. config EXAMPLE_ETH_SPI_MISO_GPIO
  136. int "SPI MISO GPIO number"
  137. range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX
  138. default 12 if IDF_TARGET_ESP32
  139. default 13 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
  140. default 2 if IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C2
  141. help
  142. Set the GPIO number used by SPI MISO.
  143. config EXAMPLE_ETH_SPI_CLOCK_MHZ
  144. int "SPI clock speed (MHz)"
  145. range 5 80
  146. default 12 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C2
  147. default 36 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
  148. help
  149. Set the clock speed (MHz) of SPI interface.
  150. config EXAMPLE_ETH_SPI_CS0_GPIO
  151. int "SPI CS0 GPIO number for SPI Ethernet module #1"
  152. range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
  153. default 15 if IDF_TARGET_ESP32
  154. default 10 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3 || IDF_TARGET_ESP32C2
  155. help
  156. Set the GPIO number used by SPI CS0, i.e. Chip Select associated with the first SPI Eth module).
  157. config EXAMPLE_ETH_SPI_CS1_GPIO
  158. depends on EXAMPLE_SPI_ETHERNETS_NUM > 1
  159. int "SPI CS1 GPIO number for SPI Ethernet module #2"
  160. range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
  161. default 32 if IDF_TARGET_ESP32
  162. default 7 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
  163. default 8 if IDF_TARGET_ESP32C3
  164. default 3 if IDF_TARGET_ESP32C2
  165. help
  166. Set the GPIO number used by SPI CS1, i.e. Chip Select associated with the second SPI Eth module.
  167. config EXAMPLE_ETH_SPI_INT0_GPIO
  168. int "Interrupt GPIO number SPI Ethernet module #1"
  169. range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX
  170. default 4 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3
  171. default 4 if IDF_TARGET_ESP32C2
  172. help
  173. Set the GPIO number used by the first SPI Ethernet module interrupt line.
  174. config EXAMPLE_ETH_SPI_INT1_GPIO
  175. depends on EXAMPLE_SPI_ETHERNETS_NUM > 1
  176. int "Interrupt GPIO number SPI Ethernet module #2"
  177. range ENV_GPIO_RANGE_MIN ENV_GPIO_IN_RANGE_MAX
  178. default 33 if IDF_TARGET_ESP32
  179. default 5 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3 || IDF_TARGET_ESP32C2
  180. help
  181. Set the GPIO number used by the second SPI Ethernet module interrupt line.
  182. config EXAMPLE_ETH_SPI_PHY_RST0_GPIO
  183. int "PHY Reset GPIO number of SPI Ethernet Module #1"
  184. range -1 ENV_GPIO_OUT_RANGE_MAX
  185. default -1
  186. help
  187. Set the GPIO number used to reset PHY chip on the first SPI Ethernet module.
  188. Set to -1 to disable PHY chip hardware reset.
  189. config EXAMPLE_ETH_SPI_PHY_RST1_GPIO
  190. depends on EXAMPLE_SPI_ETHERNETS_NUM > 1
  191. int "PHY Reset GPIO number of SPI Ethernet Module #2"
  192. range -1 ENV_GPIO_OUT_RANGE_MAX
  193. default -1
  194. help
  195. Set the GPIO number used to reset PHY chip on the second SPI Ethernet module.
  196. Set to -1 to disable PHY chip hardware reset.
  197. config EXAMPLE_ETH_SPI_PHY_ADDR0
  198. int "PHY Address of SPI Ethernet Module #1"
  199. range 0 31
  200. default 1
  201. help
  202. Set the first SPI Ethernet module PHY address according your board schematic.
  203. config EXAMPLE_ETH_SPI_PHY_ADDR1
  204. depends on EXAMPLE_SPI_ETHERNETS_NUM > 1
  205. int "PHY Address of SPI Ethernet Module #2"
  206. range 0 31
  207. default 1
  208. help
  209. Set the second SPI Ethernet module PHY address according your board schematic.
  210. endif # EXAMPLE_USE_SPI_ETHERNET
  211. endmenu