Kconfig.projbuild 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. menu "Example Configuration"
  2. config EXAMPLE_USE_SPI_ETHERNET
  3. bool
  4. choice EXAMPLE_ETHERNET_TYPE
  5. prompt "Ethernet Type"
  6. default EXAMPLE_USE_INTERNAL_ETHERNET if IDF_TARGET_ESP32
  7. default EXAMPLE_USE_W5500
  8. help
  9. Select which kind of Ethernet will be used in the example.
  10. config EXAMPLE_USE_INTERNAL_ETHERNET
  11. depends on IDF_TARGET_ESP32
  12. select ETH_USE_ESP32_EMAC
  13. bool "Internal EMAC"
  14. help
  15. Select internal Ethernet MAC controller.
  16. config EXAMPLE_USE_DM9051
  17. bool "DM9051 Module"
  18. select EXAMPLE_USE_SPI_ETHERNET
  19. select ETH_USE_SPI_ETHERNET
  20. select ETH_SPI_ETHERNET_DM9051
  21. help
  22. Select external SPI-Ethernet module (DM9051).
  23. config EXAMPLE_USE_W5500
  24. bool "W5500 Module"
  25. select EXAMPLE_USE_SPI_ETHERNET
  26. select ETH_USE_SPI_ETHERNET
  27. select ETH_SPI_ETHERNET_W5500
  28. help
  29. Select external SPI-Ethernet module (W5500).
  30. config EXAMPLE_USE_KSZ8851SNL
  31. bool "KSZ8851SNL Module"
  32. select EXAMPLE_USE_SPI_ETHERNET
  33. select ETH_USE_SPI_ETHERNET
  34. select ETH_SPI_ETHERNET_KSZ8851SNL
  35. help
  36. Select external SPI-Ethernet module (KSZ8851SNL).
  37. endchoice # EXAMPLE_ETHERNET_TYPE
  38. if EXAMPLE_USE_INTERNAL_ETHERNET
  39. choice EXAMPLE_ETH_PHY_MODEL
  40. prompt "Ethernet PHY Device"
  41. default EXAMPLE_ETH_PHY_IP101
  42. help
  43. Select the Ethernet PHY device to use in the example.
  44. config EXAMPLE_ETH_PHY_IP101
  45. bool "IP101"
  46. help
  47. IP101 is a single port 10/100 MII/RMII/TP/Fiber Fast Ethernet Transceiver.
  48. Goto http://www.icplus.com.tw/pp-IP101G.html for more information about it.
  49. config EXAMPLE_ETH_PHY_RTL8201
  50. bool "RTL8201/SR8201"
  51. help
  52. RTL8201F/SR8201F is a single port 10/100Mb Ethernet Transceiver with auto MDIX.
  53. Goto http://www.corechip-sz.com/productsview.asp?id=22 for more information about it.
  54. config EXAMPLE_ETH_PHY_LAN8720
  55. bool "LAN8720"
  56. help
  57. LAN8720A is a small footprint RMII 10/100 Ethernet Transceiver with HP Auto-MDIX Support.
  58. Goto https://www.microchip.com/LAN8720A for more information about it.
  59. config EXAMPLE_ETH_PHY_DP83848
  60. bool "DP83848"
  61. help
  62. DP83848 is a single port 10/100Mb/s Ethernet Physical Layer Transceiver.
  63. Goto http://www.ti.com/product/DP83848J for more information about it.
  64. config EXAMPLE_ETH_PHY_KSZ8041
  65. bool "KSZ8041"
  66. help
  67. The KSZ8041 is a single supply 10Base-T/100Base-TX Physical Layer Transceiver.
  68. Goto https://www.microchip.com/wwwproducts/en/KSZ8041 for more information about it.
  69. config EXAMPLE_ETH_PHY_KSZ8081
  70. bool "KSZ8081"
  71. help
  72. The KSZ8081 is a single supply 10Base-T/100Base-TX Physical Layer Transceiver.
  73. Goto https://www.microchip.com/wwwproducts/en/KSZ8081 for more information about it.
  74. endchoice # EXAMPLE_ETH_PHY_MODEL
  75. config EXAMPLE_ETH_MDC_GPIO
  76. int "SMI MDC GPIO number"
  77. default 23
  78. help
  79. Set the GPIO number used by SMI MDC.
  80. config EXAMPLE_ETH_MDIO_GPIO
  81. int "SMI MDIO GPIO number"
  82. default 18
  83. help
  84. Set the GPIO number used by SMI MDIO.
  85. endif # EXAMPLE_USE_INTERNAL_ETHERNET
  86. if EXAMPLE_USE_SPI_ETHERNET
  87. config EXAMPLE_ETH_SPI_HOST
  88. int "SPI Host Number"
  89. range 0 2
  90. default 1
  91. help
  92. Set the SPI host used to communicate with the SPI Ethernet Controller.
  93. config EXAMPLE_ETH_SPI_SCLK_GPIO
  94. int "SPI SCLK GPIO number"
  95. range 0 34 if IDF_TARGET_ESP32
  96. range 0 46 if IDF_TARGET_ESP32S2
  97. range 0 19 if IDF_TARGET_ESP32C3
  98. default 18 if IDF_TARGET_ESP32
  99. default 20 if IDF_TARGET_ESP32S2
  100. default 6 if IDF_TARGET_ESP32C3
  101. help
  102. Set the GPIO number used by SPI SCLK.
  103. config EXAMPLE_ETH_SPI_MOSI_GPIO
  104. int "SPI MOSI GPIO number"
  105. range 0 34 if IDF_TARGET_ESP32
  106. range 0 46 if IDF_TARGET_ESP32S2
  107. range 0 19 if IDF_TARGET_ESP32C3
  108. default 23 if IDF_TARGET_ESP32
  109. default 19 if IDF_TARGET_ESP32S2
  110. default 7 if IDF_TARGET_ESP32C3
  111. help
  112. Set the GPIO number used by SPI MOSI.
  113. config EXAMPLE_ETH_SPI_MISO_GPIO
  114. int "SPI MISO GPIO number"
  115. range 0 34 if IDF_TARGET_ESP32
  116. range 0 46 if IDF_TARGET_ESP32S2
  117. range 0 19 if IDF_TARGET_ESP32C3
  118. default 19 if IDF_TARGET_ESP32
  119. default 18 if IDF_TARGET_ESP32S2
  120. default 2 if IDF_TARGET_ESP32C3
  121. help
  122. Set the GPIO number used by SPI MISO.
  123. config EXAMPLE_ETH_SPI_CS_GPIO
  124. int "SPI CS GPIO number"
  125. range 0 34 if IDF_TARGET_ESP32
  126. range 0 46 if IDF_TARGET_ESP32S2
  127. range 0 19 if IDF_TARGET_ESP32C3
  128. default 16 if IDF_TARGET_ESP32
  129. default 21 if IDF_TARGET_ESP32S2
  130. default 10 if IDF_TARGET_ESP32C3
  131. help
  132. Set the GPIO number used by SPI CS.
  133. config EXAMPLE_ETH_SPI_CLOCK_MHZ
  134. int "SPI clock speed (MHz)"
  135. range 5 80
  136. default 12 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32C3
  137. default 36 if IDF_TARGET_ESP32S2
  138. help
  139. Set the clock speed (MHz) of SPI interface.
  140. config EXAMPLE_ETH_SPI_INT_GPIO
  141. int "Interrupt GPIO number"
  142. default 17 if IDF_TARGET_ESP32
  143. default 4 if IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3
  144. help
  145. Set the GPIO number used by the SPI Ethernet module interrupt line.
  146. endif # EXAMPLE_USE_SPI_ETHERNET
  147. config EXAMPLE_ETH_PHY_RST_GPIO
  148. int "PHY Reset GPIO number"
  149. default 5
  150. help
  151. Set the GPIO number used to reset PHY chip.
  152. Set to -1 to disable PHY chip hardware reset.
  153. config EXAMPLE_ETH_PHY_ADDR
  154. int "PHY Address"
  155. range 0 31
  156. default 1
  157. help
  158. Set PHY address according your board schematic.
  159. endmenu